• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
        • Bip32
          • Bip32-wallet-structure
            • Bip32-compliant-addresses-for-limit-p
            • Bip32-compliant-accounts-for-limit-p
            • Bip32-compliant-chains-p
            • Bip32-compliant-addresses-p
            • Bip32-compliant-tree-p
            • Bip32-compliant-depth-p
            • Bip32-compliant-accounts-p
          • Bip32-key-trees
          • Bip32-key-serialization
          • Bip32-key-derivation
          • Bip32-executable-attachments
          • Bip32-extended-keys
          • Bip32-master-key-generation
        • Bech32
        • Bip39
        • Bip44
        • Base58
        • Bip43
        • Bytes
        • Base58check
        • Cryptography
        • Bip-350
        • Bip-173
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Bip32

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.