aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-04-17 11:28:48 -0400
committerAva Chow <github@achow101.com>2024-04-17 11:29:50 -0400
commit003785c961e1b25f7052ee48d6751c5e7d1d774b (patch)
treeed161903b178555378e8dae7f58cc511f1559416 /doc
parent5562f698b7f4a2b5905b0aaa7c1e54cb78989739 (diff)
parent24b67fa9f602cdeac0e9736256f77d048f616c48 (diff)
downloadbitcoin-003785c961e1b25f7052ee48d6751c5e7d1d774b.tar.xz
Merge bitcoin/bitcoin#28373: doc: Add example of mixing private and public keys in descriptors
24b67fa9f602cdeac0e9736256f77d048f616c48 doc: Add example of mixing private and public keys in descriptors (Anton A) Pull request description: closes: #27414 ACKs for top commit: achow101: ACK 24b67fa9f602cdeac0e9736256f77d048f616c48 alfonsoromanz: Re ACK 24b67fa9f602cdeac0e9736256f77d048f616c48 Tree-SHA512: 8c063f23199ac0ff35909f786a5b0de1b4a9b15d1e93bdcdac10cb4bd2002c12e99b6fb1c2e56d16971e7622b67d910b79088429df92c48279be2d7797049911
Diffstat (limited to 'doc')
-rw-r--r--doc/descriptors.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/descriptors.md b/doc/descriptors.md
index 1baf652f30..3b94ec03e4 100644
--- a/doc/descriptors.md
+++ b/doc/descriptors.md
@@ -243,7 +243,18 @@ Often it is useful to communicate a description of scripts along with the
necessary private keys. For this reason, anywhere a public key or xpub is
supported, a private key in WIF format or xprv may be provided instead.
This is useful when private keys are necessary for hardened derivation
-steps, or for dumping wallet descriptors including private key material.
+steps, for signing transactions, or for dumping wallet descriptors
+including private key material.
+
+For example, after importing the following 2-of-3 multisig descriptor
+into a wallet, one could use `signrawtransactionwithwallet`
+to sign a transaction with the first key:
+```
+sh(multi(2,xprv.../84'/0'/0'/0/0,xpub1...,xpub2...))
+```
+Note how the first key is an xprv private key with a specific derivation path,
+while the other two are public keys.
+
### Compatibility with old wallets