Bip32-wallet-structure
Wallet structure.
[BIP32] describes a recommended structure for the key tree.
This is illustrated in a figure in [BIP32],
an explained in Section `Specification: Wallet structure' of [BIP32].
According to the figure, each key in the tree has depth 0, 1, 2, or 3.
The master key is at depth 0, as always.
The keys at depth 1 are account keys, one per account.
The keys at depth 2 are chain keys, one per chain.
The keys at depth 3 are account keys, one per account.
We formalize this structure as a predicate over key trees.
With that in hand, we can formally say whether
(the key tree of) a wallet is compliant with this structure or not.
This compliance predicate is defined incrementally below.
Subtopics
- Bip32-compliant-addresses-for-limit-p
- Check if the address keys under a given chain key in a tree
comply with the BIP 32 wallet structure,
for a given address index limit.
- Bip32-compliant-accounts-for-limit-p
- Check if the account keys in a tree
comply with the BIP 32 wallet structure,
for a given account index limit.
- Bip32-compliant-chains-p
- Check if the chain keys under a given account key in a tree
comply with the BIP 32 wallet structure.
- Bip32-compliant-addresses-p
- Check if the address keys under a given chain key in a tree
comply with the BIP 32 wallet structure.
- Bip32-compliant-tree-p
- Check if a key tree complies with the BIP 32 wallet structure.
- Bip32-compliant-depth-p
- Check if the depth of a key tree
complies with the BIP 32 wallet structure.
- Bip32-compliant-accounts-p
- Check if the account keys in a tree
comply with the BIP 32 wallet structure.