diff options
author | Anton A <contact@antonphp.com> | 2023-04-04 09:56:11 +0930 |
---|---|---|
committer | naiyoma <lankas.aurelia@gmail.com> | 2024-03-15 16:28:43 +0300 |
commit | 24b67fa9f602cdeac0e9736256f77d048f616c48 (patch) | |
tree | 0784f8a0d9c9ed3ec6a4280f70b21207a0bc60d9 /doc | |
parent | 369d4c03b7084de967576759545ba36a17fc18bb (diff) |
doc: Add example of mixing private and public keys in descriptors
Diffstat (limited to 'doc')
-rw-r--r-- | doc/descriptors.md | 13 |
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 |