BitcoinJMnemonicService
Implementation of MnemonicService using BitcoinJ library.
This implementation uses the BitcoinJ library which implements standard BIP-39 (same algorithm as @scure/bip39 used by midnight-wallet SDK).
Compatibility:
Compatible with any standard BIP-39 implementation
Same algorithm as midnight-wallet SDK (@scure/bip39)
Should produce identical outputs for same inputs
Battle-tested in Bitcoin wallets since 2013
Security:
Uses cryptographically secure random number generation
Implements standard PBKDF2-HMAC-SHA512 with 2048 iterations
Wipes sensitive entropy from memory after use
Based on official BIP-39 specification
Android Compatibility:
Works correctly on Android (verified on Android 16)
Includes defensive fallback for unusual configurations
Functions
Reconstructs a BIP-39 mnemonic phrase from raw entropy bytes.
Generates a random BIP-39 mnemonic phrase.
Extracts the raw entropy bytes from a BIP-39 mnemonic phrase.
Converts a mnemonic phrase to a seed using PBKDF2-HMAC-SHA512.
Validates a BIP-39 mnemonic phrase.