Skip to content

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Jul 21, 2025

This combines:

So the general workflow is:

  • create a Bitcoin Core wallet
  • register a policy (manually or with wallet: support bip388 policy with external signer bitcoin/bitcoin#33008)
  • send coins to it
  • draft a transaction: bitcoin rpc send '[{"bc1p...": 0.000001}]' fee_rate=1 add_to_wallet=false psbt=true (optionally use keypath_only=true)
    • this will stubbornly try to sign on the device, use bitcoin rpc setwalletflag external_signer false and reload the wallet if needed
  • call hwi signtx
  • send result to bitcoin-cli walletprocesspsbt
  • call hwi signtx
  • send result to bitcoin-cli walletprocesspsbt (should return a hex)

Note that Ledger is a bit finicky (which we should probably work around):

  • round 1 should not have any other public nonces
  • round 2 should not have any other partial signature

TODO:

  • displayaddress support for policy; the nice thing is that we can just pass an index along with the policy, so we can make --policy mutually exclusive with --path and --desc

@Sjors
Copy link
Member Author

Sjors commented Jul 31, 2025

Cherry-picked the latest version of all the independent PRs. Other than displaying an address this should be all you need to use MuSig2.

Sjors and others added 3 commits September 5, 2025 12:28
Co-Authored-By: Salvatore Ingala <[email protected]>
Taken from LedgerHQ/app-bitcoin-new at 2.4.1

Conflicts:
	hwilib/devices/ledger.py

Rename tx to psbt.
This adds support handling public nonces and partial signatures.
@Sjors
Copy link
Member Author

Sjors commented Sep 5, 2025

Somehow I thought I already implemented sending, but it seems I didn't. Done now. Tested with key path as well as script path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant