Mnemonic Constants
Constants for BIP-39 mnemonic generation, BIP-32/SLIP-0010 key derivation, and SEP-5 Stellar key derivation.
This object contains all numeric constants required for implementing:
BIP-39: Mnemonic code for generating deterministic keys (https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)
BIP-32: Hierarchical Deterministic Wallets (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
SLIP-0010: Universal private key derivation from master private key (https://github.com/satoshilabs/slips/blob/master/slip-0010.md)
SLIP-0044: Registered coin types for BIP-0044 (https://github.com/satoshilabs/slips/blob/master/slip-0044.md)
SEP-5: Key Derivation Methods for Stellar Keys (https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0005.md)
These constants ensure interoperability with other BIP-39/BIP-32 compliant wallets and are critical for deterministic key generation and recovery.
Properties
Offset for hardened child key derivation (2^31).
BIP-44 purpose field.
Number of bits encoded by each word in the mnemonic.
Size of chain code in bytes.
Number of entropy bits per checksum bit.
Size of derived Ed25519 private keys in bytes.
HMAC key for master key generation.
Entropy bits for 12-word mnemonics.
Entropy bits for 15-word mnemonics.
Entropy bits for 18-word mnemonics.
Entropy bits for 21-word mnemonics.
Entropy bits for 24-word mnemonics.
Entropy must be a multiple of 32 bits.
Entropy must be a multiple of 4 bytes (32 bits).
Length of data input for HMAC in child key derivation.
Maximum entropy size in bytes (256 bits = 32 bytes).
Minimum entropy size in bytes (128 bits = 16 bytes).
Ratio used to calculate the divider index between entropy and checksum bits.
Block length for SHA-512 in bytes.
Number of PBKDF2 iterations specified by BIP-39.
Output key length in bytes for PBKDF2 (512 bits = 64 bytes).
Salt prefix for PBKDF2 mnemonic-to-seed conversion.
Exclusive upper bound for random byte values.
Stellar's registered coin type in SLIP-0044.
Size of the BIP-39 word list.