bitcoinjs / bitcoinjs-lib

A javascript Bitcoin library for node.js and browsers.
MIT License
5.68k stars 2.1k forks source link

How to create a Taproot address from a mnemonic seed and then an output script example? #1873

Closed BasedOrg closed 1 year ago

BasedOrg commented 1 year ago

Can we please get an example of how to go from creating a seed/mnemonic to a taproot address and then a p2tr with that address?

It would be a huge help to see it go from end to end and then finally spend that output.

Thanks in advance

junderw commented 1 year ago

Added an example. Let me know if you have any questions.

BasedOrg commented 1 year ago

This works great! Quick question... How can we get the xpub from the xprv (rootKey)?