doc: Add example of how to mix private and public keys in descriptors #27414

pull meglio wants to merge 2 commits into bitcoin:master from meglio:patch-1 changing 1 files +12 −1
  1. meglio commented at 12:31 AM on April 4, 2023: contributor

    It took me quite a while to understand how to use both xpriv and public keys in a single descriptor. The trick was to use xprv key + derivation path. Also, it was not obvious that Bitcoin Core would figure it out and sign a multisig transaction if the xpriv is present in the descriptor. As a newbie to Bitcoin Core, I had to consult stackexchange to understand that.

    Adding an example would make it easier to "gotcha" for the reader.

  2. Example: mixing private and public keys in descriptors 42107710a3
  3. DrahtBot commented at 12:31 AM on April 4, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK jonatack, RandyMcMillan, achow101, furszy
    Stale ACK S3RK

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28373 (doc: Add example of mixing private and public keys in descriptors by naiyoma)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. DrahtBot added the label Docs on Apr 4, 2023
  5. in doc/descriptors.md:251 in 42107710a3 outdated
     247 | +steps, signing transactions, or for dumping wallet descriptors
     248 | +including private key material.
     249 | +
     250 | +For example, after importing the following 2-of-3 multisig descriptor
     251 | +into a wallet, one could use `signrawtransactionwithwallet`
     252 | +to sign a transaction with the first signature:
    


    S3RK commented at 6:29 AM on April 4, 2023:

    typo: to sign a transaction with the first signature key


    meglio commented at 8:10 AM on April 4, 2023:

    Thank you, fixed.

  6. S3RK commented at 6:31 AM on April 4, 2023: contributor

    ACK 42107710a35dd4b489757dd9317251f4b27cd3be

  7. Change "first signature" to "first key" in descriptor example comment 96bd00b4d9
  8. fanquake requested review from achow101 on Apr 4, 2023
  9. in doc/descriptors.md:246 in 96bd00b4d9
     242 | @@ -243,7 +243,18 @@ Often it is useful to communicate a description of scripts along with the
     243 |  necessary private keys. For this reason, anywhere a public key or xpub is
     244 |  supported, a private key in WIF format or xprv may be provided instead.
     245 |  This is useful when private keys are necessary for hardened derivation
     246 | -steps, or for dumping wallet descriptors including private key material.
     247 | +steps, signing transactions, or for dumping wallet descriptors
    


    jonatack commented at 3:35 PM on April 4, 2023:
    steps, for signing transactions, or for dumping wallet descriptors
    

    (alternatively, s/for dumping/dumping/

  10. jonatack commented at 3:39 PM on April 4, 2023: member

    Concept ACK.

    The second commit is only modifying the first commit, so the two should be squashed into one commit.

  11. RandyMcMillan commented at 6:52 PM on April 4, 2023: contributor

    Concept ACK

  12. achow101 commented at 12:38 PM on April 10, 2023: member

    Concept ACK

    Please squash your commits

  13. DrahtBot commented at 9:13 AM on August 8, 2023: contributor

    <!--8ac04cdde196e94527acabf64b896448-->

    There hasn't been much activity lately. What is the status here?

    Finding reviewers may take time. However, if the patch is no longer relevant, please close this pull request. If the author lost interest or time to work on this, please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

  14. DrahtBot added the label Waiting for author on Aug 8, 2023
  15. furszy commented at 12:08 AM on August 9, 2023: member

    Concept ACK

    +1 for squashing the commits.

  16. maflcko commented at 5:17 AM on August 9, 2023: member

    I think this can be closed "Up for grabs"? Does someone want to pick it up?

  17. maflcko added the label Up for grabs on Aug 9, 2023
  18. maflcko commented at 5:19 AM on August 9, 2023: member
  19. naiyoma commented at 11:44 AM on August 30, 2023: contributor

    I think this can be closed "Up for grabs"? Does someone want to pick it up?

    I'd like to pick this up.

  20. achow101 commented at 3:39 PM on September 26, 2023: member

    Superseded by #28373

  21. achow101 closed this on Sep 26, 2023

  22. fanquake removed the label Up for grabs on Sep 26, 2023
  23. fanquake removed the label Waiting for author on Sep 26, 2023
  24. achow101 referenced this in commit 003785c961 on Apr 17, 2024
  25. bitcoin locked this on Sep 25, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me