Reviewed Aug 2026
DE
BA-04 · LESSON 12

HD wallet trees and extended-key anatomy

KEY DEFINITIONS

Terms used in this lesson

HD wallet
Hierarchical deterministic wallet: a wallet that derives many related keys from one root.
xpub
A serialized extended public key containing a public key and chain code for deriving normal public descendants.
BIP44
A hierarchical wallet path convention originally used for legacy single-key Bitcoin addresses.
BIP49
A hierarchical wallet path convention for single-key SegWit outputs nested inside P2SH.
BIP84
The wallet derivation convention for native SegWit single-key outputs.
BIP86
A hierarchical wallet path convention for single-key Taproot outputs.
BIP32
The Bitcoin standard for deriving a tree of child keys from one extended root key.
SegWit
Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
Taproot
A Bitcoin output and spending design that can combine a public-key path with privately committed alternative scripts.
HMAC
Hash-based message authentication code: a keyed hash construction used to authenticate data or derive deterministic secret material.
HMAC-SHA512
HMAC using SHA-512; BIP32 uses it to derive a master key and chain code from seed material.
P2PKH
Pay to Public Key Hash, a legacy Bitcoin output template that commits to the hash of a public key.
P2WPKH
Pay to Witness Public Key Hash: a native SegWit output for one public-key hash.
Descriptor
A machine-readable description of the scripts, keys, and derivation paths a Bitcoin wallet watches or can spend.

Decode xpub and xprv fields, derive BIP44, BIP49, BIP84, and BIP86 branches, and identify what recovery metadata and public-key exposure imply.

65 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

An extended key contains version, depth, parent fingerprint, child number, chain code, and key data. Its Base58Check text is commonly called xpub or xprv, although other prefixes can encode different script conventions. BIP32 defines derivation mathematics. BIP44, BIP49, BIP84, and BIP86 define common purpose paths for legacy, nested SegWit, native SegWit, and Taproot wallets.

GUIDED EXPLANATION1/5 ideas inspected
1

Decode the 78-byte payload

Read four version bytes, one depth byte, four parent-fingerprint bytes, four child-number bytes, a 32-byte chain code, and 33 bytes of public or private key data before validating Base58Check.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionAn xpub is only one address and is harmless to publish.

An xpub can reveal an entire normal public branch, future addresses, balances, and transaction links. In some leakage combinations it also threatens parent private material.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.