register_btc_multisig_wallet
Registers a multisig Bitcoin wallet policy with a Ledger device. Constructs a descriptor from cosigners, verifies one matches the Ledger, and persists the policy for future signing.
Instructions
One-time registration of a multi-sig Bitcoin wallet policy with the Ledger BTC app (BIP-388 wallet policies). REQUIREMENTS: Ledger plugged in over USB, device unlocked, the 'Bitcoin' app open on-screen. Constructs a wsh(sortedmulti(M,@0/**,@1/**,...)) descriptor from the supplied cosigners, verifies the connected Ledger's master fingerprint matches exactly one cosigner slot, calls Ledger's registerWallet (the device walks every cosigner xpub fingerprint on-screen for verification — the user MUST confirm each fingerprint matches what they expect, since this is the moment that anchors the policy), and persists the descriptor + 32-byte HMAC. The HMAC is reused on every subsequent sign_btc_multisig_psbt call so the user only walks the descriptor approval flow once per setup. Phase 2 scope: P2WSH (wsh) only. Hard-validates every cosigner xpub via @scure/bip32 round-trip — typos that would silently register a wallet we can never sign with are refused up-front.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | User-chosen label for the multi-sig setup, e.g. "Family vault". Must be printable ASCII, ≤ 16 bytes (Ledger BTC app caps wallet-policy names at 16 bytes). Surfaces on-device during the registration approval flow and is the lookup key for `sign_btc_multisig_psbt`. Must be unique within the registered wallet set. | |
| threshold | Yes | M in M-of-N. Must be ≥ 1 and ≤ cosigner count. Phase 2 hard-caps at 15 (the Ledger BTC app's wallet-policy limit). | |
| cosigners | Yes | Cosigner slots in the order they should appear in the descriptor's `@N` slots. Slot order is part of the descriptor identity — every cosigner must agree on the same ordering or they'll register different wallets. Exactly one entry's fingerprint+xpub must match the connected Ledger; the device flags it `isOurs` and uses it for signing. Phase 2 requires ≥ 2 cosigners (1-of-1 is single-sig). | |
| scriptType | Yes | Script type for the multi-sig wrapper. Phase 2 supports "wsh" only (P2WSH native segwit, `bc1q...`-style addresses). Taproot multi-sig and P2SH-wrapped multi-sig are deferred. |