Skip to content

Commit 003785c

Browse files
committed
Merge bitcoin/bitcoin#28373: doc: Add example of mixing private and public keys in descriptors
24b67fa doc: Add example of mixing private and public keys in descriptors (Anton A) Pull request description: closes: #27414 ACKs for top commit: achow101: ACK 24b67fa alfonsoromanz: Re ACK 24b67fa Tree-SHA512: 8c063f23199ac0ff35909f786a5b0de1b4a9b15d1e93bdcdac10cb4bd2002c12e99b6fb1c2e56d16971e7622b67d910b79088429df92c48279be2d7797049911
2 parents 5562f69 + 24b67fa commit 003785c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

doc/descriptors.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,18 @@ Often it is useful to communicate a description of scripts along with the
243243
necessary private keys. For this reason, anywhere a public key or xpub is
244244
supported, a private key in WIF format or xprv may be provided instead.
245245
This is useful when private keys are necessary for hardened derivation
246-
steps, or for dumping wallet descriptors including private key material.
246+
steps, for signing transactions, or for dumping wallet descriptors
247+
including private key material.
248+
249+
For example, after importing the following 2-of-3 multisig descriptor
250+
into a wallet, one could use `signrawtransactionwithwallet`
251+
to sign a transaction with the first key:
252+
```
253+
sh(multi(2,xprv.../84'/0'/0'/0/0,xpub1...,xpub2...))
254+
```
255+
Note how the first key is an xprv private key with a specific derivation path,
256+
while the other two are public keys.
257+
247258

248259
### Compatibility with old wallets
249260

0 commit comments

Comments
 (0)