Keys, wallets & account abstraction

extended public key (xpub)

An extended public key, usually written 'xpub', is a public key bundled together with its chain code — the extra 32 bytes of entropy that BIP-32 attaches to every node in the key tree. That pairing is exactly what is needed to keep deriving downward: an xpub can compute all of a node's non-hardened child public keys, and therefore all the addresses below it, without ever knowing a single private key.

This is the engine behind watch-only wallets. A merchant, an auditor, a hardware wallet's companion app, or a multisig coordinator can hold an xpub to generate an unlimited stream of fresh receiving addresses and monitor incoming funds, while the matching private keys stay offline in cold storage. The corresponding extended private key, 'xprv', additionally carries the private key and can both derive and spend — so xprv must be guarded exactly like a seed, whereas xpub can be shared for visibility.

But 'public' here does not mean 'safe to publish'. Two cautions matter. First, privacy: handing someone your xpub reveals every past and future address in that branch and lets them watch your entire balance and transaction history — a serious deanonymization leak. Second, the hardened-derivation hazard: if an xpub is exposed and an attacker also obtains any one non-hardened child private key derived from it, the parent private key can be reconstructed, compromising the whole branch. An xpub is a powerful convenience, but it should be treated as sensitive, not public.

An auditor is given a charity's xpub. They reconcile every donation by deriving the charity's address list and summing on-chain receipts — full transparency — yet they can never move a cent, because the xprv never left the treasurer's hardware wallet.

xpub is a Bitcoin-style prefix; you will also see ypub and zpub, which encode the same data but signal SegWit address formats (P2SH-wrapped and native bech32) so wallets render the right address type.

Also called
xpubextended key擴展金鑰