Bitcoin

Output Script Descriptor – XPRIV/XPUB Type for P2TR

concept of xpub It comes from BIP32, which stands for Extended Public Key from which multiple subkeys can be derived.

At the time of BIP32, the only address type in common use was pay-to-pubkey-hash (P2PKH). Therefore, BIP32 was generally understood to mean a sequence of derived P2PKH addresses.

After segwit, when other address types like P2SH-P2WPKH and P2WPKH became common, people needed a way to pass “BIP32 extended public key but derived address P2SH-P2WPKH”. This became ypub Scheme defined in BIP49 for P2SH-P2WPKH and beyond zpub Scheme of BIP84 for P2WPKH. It contains exactly the same information as the BIP32 extended public key, but has a different prefix that indicates its address type. Various other variants have been defined and adopted by some software. Zpub However, as far as I know, it has not been standardized through the BIP process.

No other software was adopted. ypub/zpub/Zpub/…, because the constant need for new prefixes does not scale well, and the concept of compressing all address derivation information into a single key string also does not work for more complex configurations such as multi-signatures. For example, in the latest output descriptor (BIP380) standard: xpub It’s always used, but someone wpkh(xpub...) Indicates the P2WPKH address type.

As far as I know, there isn’t one. *pub-It’s still close to the standard for P2TR, but in my opinion it shouldn’t be. It’s much clearer to pass the address type information outside of the key string.

Disclaimer: I am the author of BIP32 and co-author of BIP380.

Related Articles

Back to top button