A seed gives a wallet a tree of keys. Shared path conventions tell it where to look, and output conventions tell it which coins those keys can spend.
BIP 32 derives a master key and a tree of child keys from a seed. Two wallets can restore the same seed but search different parts of that tree. Each may then miss the other’s coins. They need a shared path convention. BIP 84’s author identifies this compatibility between wallets as the aim.1,2,3
BIP 44, assigned in 2014, is that agreement. It is an application-layer convention on top of BIP 32 and BIP 43, not a change to the derivation itself. BIP 84 (2017) and BIP 86 (2021) reuse its structure for SegWit and Taproot. All three are recorded as deployed.1,4
This chapter is an independent explanation, not the proposal itself. Preamble fields are shown as the
pinned files record them, without author e-mail addresses. Status is the proposal’s own field. It is not
an endorsement or a sign of consensus.
BIP 44: Multi-Account Hierarchy for Deterministic Wallets
BIP 44’s first example path. Three hardened levels pick a convention, a coin and an account; below the account line, two public levels number the addresses.5,6,7,8,9,10
Five levels, each with a job
BIP 44 fixes five levels below the master key: purpose, coin type, account, change and address index. An apostrophe after a number marks hardened derivation, and the first three levels are hardened. The author’s aim was a hierarchy that handles many coins, many accounts, separate receiving and change chains, and millions of addresses per chain.2,5
The purpose is a constant, 44′, which tells software that everything below follows this specification. The coin type gives each coin its own subtree, avoiding address reuse across coins. It is 0′ for Bitcoin and 1′ for Bitcoin testnet, with a longer list kept outside the BIP in SLIP-0044.6,7
Accounts separate keys into independent identities, numbered from 0. A wallet following BIP 44 does not mix coins between accounts. The BIP compares them to bank accounts for donations, savings or shared expenses.8
The change level uses 0 for the external chain and 1 for the internal chain. External addresses are intended for use outside the wallet, such as receiving payments. Internal addresses receive transaction change. Each chain numbers its addresses from 0.9,10
Account discovery starts with account 0 and searches its external chain for transactions. If it finds transactions, it continues with the next account. It stops at the first account with no transaction history. This works because software should not create a new account while the previous one has no history.8,11
BIP 44 gave the gap limit as 20: scanning a chain stops after 20 consecutive unused addresses. Wallet software should warn before a user gives out an address beyond that limit.12
BIP 44 scans only external chains, reasoning that internal chains receive only coins that come from the associated external chains. This identifies which accounts have been used. Recovering their funds also requires finding their internal/change outputs.11,12,13
FIG. A12.2
Fig. A12.2 Finding the accounts again
01 Derive account 0′ and its external chain, then check its addresses for transactions, one index at a time.
02 BIP 44 gave the gap limit as 20: after 20 unused addresses in a row, it stops scanning that chain.
03 Account 0′ had transactions, so try account 1′. Its external chain has none: discovery stops there.
How a restored wallet finds its accounts, as BIP 44 describes it. Which addresses are used is made up for the drawing; the gap limit is BIP 44’s.8,11,12Two paths from BIP 44’s example table
BIP 44’s own examples make the pattern concrete. Its table lists 16 paths: the first and second address on the external and change chains, for the first and second account, on Bitcoin and on testnet. The first Bitcoin receiving address of the first account is m/44′/0′/0′/0/0; its first change address is m/44′/0′/0′/1/0.9,14
Walking a published path
Follow the same seed down the published BIP 84 and BIP 86 paths. Step from the account to a receiving key, then switch to a change key. Watch where the route changes and how the final key becomes an output.5,15,16
FIG. A12.3
Fig. A12.3 One level at a time
Static view: BIP 84 · P2WPKH, first receiving address, every level walked. With JavaScript you can switch scheme, switch between receiving and change, and step down one level at a time.
BIP 84 · P2WPKH, first receiving: HASH160 of the key goes into 0014 ‖ hash; the bech32 address is bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu.
BIP 84 and BIP 86 test vectors from the “abandon … about” mnemonic; every key and address was derived by the tested model and checked against the vectors at build time. BIP 44 publishes paths but no keys: its keys come from the same mnemonic. Public test material; never use it for funds.
Published paths from BIPs 84, 86 and 44, stepped from the master key down to the address. A black tab marks a hardened level.5,15,16,17
The line between the third and fourth levels matters most. Above it, each step is hardened and needs the parent’s private key. Below it, change and index use public derivation, which anyone holding the parent’s extended public key can do.5,9,10
An account’s extended public key can derive every receiving and change address in that account. The model demonstrates this with the published account public keys: it re-derives every published address below them. Sharing an account xpub therefore reveals the account’s address history and future addresses. The xpub alone does not let its holder spend funds.17
BIP 84’s account extended public key and every address its test vectors publish below it, receiving and change, each re-derived from the xpub alone.15,17
For BIP 84’s first receiving address, derivation produces a compressed public key. Its hash supplies the 20 bytes in the output, which the address encodes with Bech32. In BIP 86, the derived key’s x coordinate identifies the internal key. A tweak produces the output key encoded in the address.15,18,19
The spending witnesses differ too. BIP 84 expects a signature and public key. BIP 86 expects a signature alone. Both leave the scriptSig empty.20
FIG. A12.5
Fig. A12.5 What a spend carries
Both outputs are spent with an empty scriptSig. BIP 84’s witness carries a signature and the public key; BIP 86’s carries only a signature.20
Caveat
An account extended public key is not a single address. It exposes every receiving and change address of that account, which is why sharing it is a privacy decision.9,10,17
Published values behind the explorer
BIP 84 and BIP 86 each publish test vectors from the same well-known mnemonic: the root keys, the first account’s keys, and three addresses, two receiving and one change. Step down their paths in Fig. A12.3 above. Every value is derived by this site’s tested BIP 32 code. The account keys and every published leaf value are checked against the vectors when the site is built, and the intermediate values are implied by them.15
What the purpose decides
BIP 44 stops at the key. It defines the path and nothing about the script that key should be used in, nor the address format. Later BIPs treat the purpose value as what signals the script type.5,16
BIP 84 specifies the output type for SegWit version 0. It keeps BIP 44’s path structure and changes only the purpose, 84′. Each key produces a pay-to-witness-public-key-hash output: 0x0014 followed by the key’s 20-byte hash. The address encodes this with Bech32. BIP 84 also assigns different version bytes to extended keys, so they print as zpub and zprv instead of xpub and xprv.18,21
The author’s reason was compatibility in one direction: dedicated SegWit accounts mean only wallets that implement the scheme will find them. BIP 84 is deliberately not backwards compatible, and a wallet that does not know it will not discover the accounts at all.3,22
Changing the hardened purpose changes every key below it. BIP 84 and BIP 86 also specify how to turn their keys into output scripts; BIP 44 itself does not.15,16,18,19,21,23
BIP 86 specifies the output type for Taproot. Purpose 86′ marks keys used as the internal key of a single-key P2TR output. The wallet derives a tweak by hashing the internal key without a script-tree root, then applies it to obtain the output key. This commits to an unspendable script path, as BIP 341 recommends.19
The wallet puts the result into a version 1 output: 0x5120 followed by the 32-byte output key. BIP 86 defines no alternate version bytes. Its test vectors print as xprv and xpub.15,19
A seed gives the wallet its tree of keys. A path convention tells it where to look, and an output convention tells it what to look for. Restoring the keys and finding their coins are related, but separate, jobs.16,23,24,25
Evidence
Each numbered marker in the text points here, and the ↩ links lead back to the text. Quotes are verbatim
from the BIP files at commit 3a10b5b, wiki markup
included. Links open the exact lines. Labels say what kind of statement each entry is: a rule, the
author’s rationale, history, a test vector, or our own inference.
↩ a b Rule BIP 44 defines a logical hierarchy on top of BIP 32's derivation algorithm and BIP 43's purpose scheme; it is a particular application of BIP 43.
This BIP defines a logical hierarchy for deterministic wallets based on an algorithm described in BIP-0032 (BIP32 from now on) and purpose scheme described in BIP-0043 (BIP43 from now on). This BIP is a particular application of BIP43.
↩ a b Author’s rationale BIP 44's hierarchy is meant to handle multiple coins, multiple accounts, external and internal chains per account, and millions of addresses per chain.
It allows the handling of multiple coins, multiple accounts, external and internal chains per account and millions of addresses per chain.
↩ a b Author’s rationale BIP 84's motivation: a common scheme lets different wallets share a seed, and dedicated SegWit accounts mean only compatible wallets detect them.
With the usage of P2WPKH transactions it is necessary to have a common derivation scheme. It allows the user to use different HD wallets with the same masterseed and/or a single account seamlessly. Thus the user needs to create dedicated segregated witness accounts, which ensures that only wallets compatible with this BIP will detect the accounts and handle them appropriately.
↩ History BIP 44 (Palatinus, Rusnak; assigned 2014; requires BIPs 32 and 43), BIP 84 (Rusnak; 2017) and BIP 86 (Chow; 2021) are application-layer specifications, all recorded as Deployed.
Layer: Applications Title: Multi-Account Hierarchy for Deterministic Wallets Authors: Marek Palatinus <slush@satoshilabs.com> Pavol Rusnak <stick@satoshilabs.com>
Layer: Applications Title: Key Derivation for Single Key P2TR Outputs Authors: Ava Chow <me@achow101.com> Status: Deployed Type: Specification Assigned: 2021-06-22
↩ a b c d e f Rule BIP 44 defines five levels below m: purpose', coin_type', account', change and address_index; an apostrophe marks hardened derivation.
We define the following 5 levels in BIP32 path: <pre> m / purpose' / coin_type' / account' / change / address_index </pre> Apostrophe in the path indicates that BIP32 hardened derivation is used.
↩ a b Rule Purpose is the constant 44' (0x8000002C), following BIP 43, and marks the subtree as following this specification; it is hardened.
Purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation. It indicates that the subtree of this node is used according to this specification. Hardened derivation is used at this level.
↩ a b Rule Coin type gives each coin its own hardened subtree, avoiding address reuse across coins; BIP 44 lists 0' for Bitcoin and 1' for Bitcoin testnet and points to SLIP-0044 for the full list.
This BIP is not a central directory for the registered coin types, please visit SatoshiLabs that maintains the full list:
[[https://github.com/satoshilabs/slips/blob/master/slip-0044.md|SLIP-0044 : Registered coin types for BIP-0044]]
↩ a b c d Rule Accounts split the key space into independent user identities so coins are never mixed; they are numbered from 0, use hardened derivation, and software should not create an account while the previous one has no transaction history. BIP 44 likens them to bank accounts: one for donations, one for savings, one for common expenses.
This level splits the key space into independent user identities, so the wallet never mixes the coins across different accounts.
Accounts are numbered from index 0 in sequentially increasing manner. This number is used as child index in BIP32 derivation. Hardened derivation is used at this level. Software should prevent a creation of an account if a previous account does not have a transaction history
Users can use these accounts to organize the funds in the same fashion as bank accounts; for donation purposes (where all addresses are considered public), for saving purposes, for common expenses etc.
↩ a b c d e Rule Change is 0 for the external chain (addresses shown outside the wallet, for receiving) and 1 for the internal chain (change); it uses public derivation.
Constant 0 is used for external chain and constant 1 for internal chain (also known as change addresses). External chain is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal chain is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. Public derivation is used at this level.
↩ a b c d Rule Addresses are numbered from 0 along each chain, with public derivation.
Addresses are numbered from index 0 in sequentially increasing manner. This number is used as child index in BIP32 derivation. Public derivation is used at this level.
↩ a b c Rule After importing a seed, software discovers accounts in order, scanning each account's external chain and stopping at the first account with no transactions; it works on transaction history, not balances.
# derive the first account's node (index = 0) # derive the external chain node of this account # scan addresses of the external chain; respect the gap limit described below # if no transactions are found on the external chain, stop discovery # if there are some transactions, increase the account index and go to step 1
Please note that the algorithm works with the transaction history, not account balances
↩ a b c History BIP 44 gives the address gap limit as 20 at the time of writing: after 20 unused addresses in a row, software stops scanning that chain. For account discovery, it scans only external chains, reasoning that internal chains receive only coins that come from the associated external chains, and wallet software should warn a user who tries to exceed the limit.
Address gap limit is currently set to 20. If the software hits 20 unused addresses in a row, it expects there are no used addresses beyond this point and stops searching the address chain. We scan just the external chains, because internal chains receive only coins that come from the associated external chains.
Wallet software should warn when the user is trying to exceed the gap limit on an external chain by generating a new address.
↩ Editorial inference External-chain history determines which accounts BIP 44 discovers; recovering those accounts’ funds must also include their internal/change outputs. The recovery distinction is an inference from the account-discovery procedure and the internal chain’s stated use for returning change.
Constant 0 is used for external chain and constant 1 for internal chain (also known as change addresses). External chain is used for addresses that are meant to be visible outside of the wallet (e.g. for receiving payments). Internal chain is used for addresses which are not meant to be visible outside of the wallet and is used for return transaction change. Public derivation is used at this level.
# derive the first account's node (index = 0) # derive the external chain node of this account # scan addresses of the external chain; respect the gap limit described below # if no transactions are found on the external chain, stop discovery # if there are some transactions, increase the account index and go to step 1
↩ Test vector BIP 44's examples table lists 16 paths: the first and second address of the external and change chains, for the first and second account, for Bitcoin and for Bitcoin testnet.
↩ a b c d e f g Test vector This site's model, starting from BIP 84's and BIP 86's published mnemonic, reproduces every published root, account and address value in both BIPs' test vectors (zprv/zpub for BIP 84; xprv/xpub, internal key, output key, scriptPubKey and address for BIP 86); the build fails otherwise. Intermediate values (node keys, fingerprints, key hashes, tweaks) are derived by the same tested model and implied by the published leaves, but not published themselves. BIP 86 defines no alternate version bytes, and its vectors print as xprv/xpub.
↩ a b c d e Editorial inference BIP 44 itself names no script type or address format; BIPs 84 and 86 treat the purpose value as what signals the script type or serialization, and tie one to each purpose.
but only uses a different purpose value to indicate the different transaction serialization method.
To derive a public key from the root account, this BIP uses the same account-structure as defined in BIPs [[bip-0044.mediawiki|44]], [[bip-0049.mediawiki|49]], and [[bip-0084.mediawiki|84]], but with a different purpose value for the script type.
↩ a b c d Test vector From an account's extended public key alone, the model re-derives every published receiving and change address of that account, because the two levels below the account use public derivation. On its own such a key cannot spend.
↩ a b c Rule BIP 84 keeps BIP 44's account structure and changes only the purpose, 84', to indicate the P2WPKH serialization (the BIP 173 format), building addresses with BIP 141's P2WPKH encapsulation.
This BIP defines the derivation scheme for HD wallets using the P2WPKH ([[bip-0173.mediawiki|BIP 173]]) serialization format for segregated witness transactions.
this BIP uses the same account-structure as defined in [[bip-0044.mediawiki|BIP 44]] and [[bip-0049.mediawiki|BIP 49]], but only uses a different purpose value to indicate the different transaction serialization method.
For the <code>purpose</code>-path level it uses <code>84'</code>.
↩ a b c d Rule BIP 86 uses purpose 86' for keys used as the internal key of single-key P2TR outputs: the internal key is lift_x(derived key), tweaked with a hash of the key alone so that, as BIP 341 recommends, the output commits to an unspendable script path rather than none, in a version 1 output 0x5120{output key}.
This document suggests a derivation scheme for HD wallets whose keys are involved in single key P2TR ([[bip-0341.mediawiki|BIP 341]]) outputs as the Taproot internal key.
For the <tt>purpose</tt>-path level it uses <tt>86'</tt>.
If the spending conditions do not require a script path, the output key should commit to an unspendable script path instead of having no script path.
↩ a b Rule BIP 84's outputs are spent with an empty scriptSig and a witness of a signature and the public key; BIP 86's with an empty scriptSig and a witness holding only a signature.
Extended public keys use <code>0x04b24746</code> to produce a "zpub" prefix, and private keys use <code>0x04b2430c</code> to produce a "zprv" prefix. Testnet uses <code>0x045f1cf6</code> "vpub" and <code>0x045f18bc</code> "vprv."
↩ Rule BIPs 84 and 86 are not backwards compatible by design: a wallet that does not implement them will not discover the accounts at all.
This BIP is not backwards compatible by design as described under [[#considerations|considerations]]. An incompatible wallet will not discover accounts at all and the user will notice that something is wrong.
This BIP is not backwards compatible by design. An incompatible wallet will not discover these accounts at all and the user will notice that something is wrong.
↩ a b Test vector The same mnemonic gives unrelated keys under purposes 44', 84' and 86' (and the schemes use different output types).
// Account 0, first receiving address = m/84'/0'/0'/0/0
// Account 0, first receiving address = m/86'/0'/0'/0/0
↩ Author’s rationale BIP 86's motivation: many wallets and hardware signers still use seed backups without derivation path or script information, so a fixed path makes single-key Taproot outputs likely to be recoverable; although there are now solutions that avoid fixed paths, it largely reuses the approach of BIPs 49 and 84 for ease of implementation.
it is useful to have a common derivation scheme so that HD wallets that only have a backup of the HD seed can be likely to recover single key Taproot outputs. Although there are now solutions which obviate the need for fixed derivation paths for specific script types, many software wallets and hardware signers still use seed backups which lack derivation path and script information. Thus we largely use the same approach used in BIPs [[bip-0049.mediawiki|49]] and [[bip-0084.mediawiki|84]] for ease of implementation.
↩ Author’s rationale BIP 86 notes that because it uses the same method as BIPs 44, 49 and 84 it should not be difficult to implement; BIP 84 points to SLIP-0132 for further registered version bytes.