BIP-39 mnemonic phrase generation, checksum validation, and PBKDF2-HMAC-SHA512 seed derivation.
Bip39 implements the BIP-39 mnemonic code standard backed by @scure/bip39: entropy-to-word encoding (12 to 24 words with SHA-256 checksum), mnemonic validation, and 64-byte seed derivation via PBKDF2-HMAC-SHA512 (2048 iterations).
BIP-39 passphrases have no checksum: a typo in the passphrase silently derives a valid but completely different seed and set of addresses. Never rely on mnemonicToSeed to validate a passphrase.
Zero seed buffers: Call seed.fill(0) after initializing the master HD key with HDWallet.
Errors: Invalid entropy lengths throw InvalidEntropyError; invalid mnemonics in assertValidMnemonic throw InvalidMnemonicError; other failures throw Bip39Error.