What Is an xpub in a Bitcoin HD Wallet?
An xpub is a BIP32 extended public key. It includes a public key and chain code, allowing software to derive non-hardened descendant public keys and observe associated addresses without possessing the corresponding private signing keys.
Can an xpub spend Bitcoin?
No. An xpub alone does not authorize a Bitcoin spend. However, revealing it can expose address relationships, balances, and transaction history. In certain non-hardened derivation setups, leaking an xpub together with a descendant private key can compromise the parent private key.
Is every watch-only wallet an xpub wallet?
No. Watch-only software may use output descriptors, address lists, or other public metadata. For accurate scanning, the script type, network, derivation path, and address range matter as well as the public key.
Primary references
- BIP32 — Hierarchical Deterministic Wallets: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
