Zpub (Extended Public Key)
1 min read
A zpub is a form of extended public key (xpub) which follows an additional standard defined in BIP 84. Xpubs, ypubs, and zpubs all allow a wallet to generate a deterministic tree of public keys, but each form of extended public key instructs a wallet to derive different address types. Specifically, zpubs instruct a wallet to derive native SegWit addresses, which use either P2WPKH or P2WSH scripts.
P2WPKH is the most common SegWit address type. Unlike P2SH-wrapped P2WPKH addresses, which are generated by ypubs, P2WPKH addresses are not backwards compatible.
Zpubs are particularly useful for those who want to fully utilize the advantages of SegWit, including faster transaction times and reduced fees. By generating multiple native SegWit addresses from a single zpub, users can enhance privacy and simplify the management of multiple Bitcoin addresses within a single wallet. However, as with any extended public key, it’s important to keep your zpub secure to prevent others from monitoring your transaction activity.