— —
Follow on X
LESSONS

HD wallets, seeds and derivation paths

A seed phrase becomes a master key that derives a tree of keys. The derivation path says where in the tree; without the right path, the right words find an empty wallet.

7 MIN READ
Words become a seed, a master key, a derivation path and addresses.
LEVEL · Advanced
IN THIS LESSON · 6 OF 8
BY THE END YOU WILL BE ABLE TO ANSWER
  • What is a seed phrase, technically?
  • You restore the right words and see zero balance. What is the likely cause?
  • In the path m/86'/0'/0'/1/3, what does the 1 in the fourth position mean?

Then prove it: a 2-question quiz · a challenge. The lesson marks itself complete at 100%.

BIP 39: words to seed

Take 128 or 256 bits of entropy, append a checksum, and split into 11-bit chunks; each chunk indexes a 2,048-word list. That gives 12 or 24 words. The words plus an optional passphrase are run through a slow hash (PBKDF2, 2,048 rounds) to produce a 512-bit seed. The words are not the key; they are the recipe for it.

BIP 32: seed to tree

The seed produces a master private key and a chain code. From any key and chain code you can derive child keys by index, and from children, grandchildren, without limit. Hardened derivation (indices written with an apostrophe) uses the private key, so a leaked child cannot compromise the parent. Normal derivation lets a watch-only wallet derive public keys from an xpub without any private key.

Derivation paths

A path like m/84'/0'/0'/0/5 means: purpose 84 (native SegWit), coin 0 (bitcoin), account 0, external chain (0 for receiving, 1 for change), index 5. The purpose numbers come from BIPs: 44 for legacy, 49 for wrapped SegWit, 84 for native SegWit, 86 for Taproot. Wallets agree on these so a seed restores the same addresses anywhere.

Why paths matter

Restore a seed in a wallet that scans a different path and you will see an empty balance and panic. The coins are fine; the wallet is looking in the wrong branch. Record your derivation path and script type with your backup. Output descriptors are the modern way to write all of this in one string.

The gap limit

Wallets scan addresses in order and stop after 20 unused ones in a row. If you handed out many addresses that were never paid, a restore might miss later ones until you raise the gap limit.

MINI CHALLENGERead the path

In the path m/86'/0'/0'/1/3, what does the 1 in the fourth position mean?

CHECK YOURSELF
1/2 What is a seed phrase, technically?
2/2 You restore the right words and see zero balance. What is the likely cause?
pick an answer for each question

SOURCES

  1. Learn Me A Bitcoin: Derivation paths
  2. BIP 32
  3. BIP 39
Progress is saved in this browser only.