THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

What Is an xpub in a Bitcoin HD Wallet?

permalink THAMER
#bip32#bitcoin-xpub#extended-public-key#privacy#watch-only

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

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects