swan-bitcoin / xpub-tool

A JavaScript library to derive bitcoin addresses from extended public keys. Includes a web tool and CLI.
MIT License
47 stars 21 forks source link

Support new taproot xpub syntax with path and checksum #60

Open iBobik opened 20 hours ago

iBobik commented 20 hours ago

Hi, Trezor generates xpub like this:

tr([9bc00f63/86'/0'/0']xpub6xxxx/<0;1>/*)#w0mz6ul2

BtcPay encodes the same xpub like this:

xpub6xxxx-[taproot]

But neither can be validated by the xpub-tool.

iBobik commented 20 hours ago

Related discussion: https://github.com/spesmilo/electrum/issues/7544