import { bip39 } from '../deps.js';
// Word count → entropy strength for BIP39.
// 12 → 128, 15 → 160, 18 → 192, 21 → 224, 24 → 256.
export function generateSeedPhrase(strength = 128) {
return bip39().generateMnemonic(strength);
}
// BIP39 checksum + wordlist validation. Returns false for typos, bad
// word counts, and out-of-wordlist words.
export function validateSeedPhrase(phrase, wordlist = undefined) {
return bip39().validateMnemonic(phrase.trim(), wordlist || bip39().wordlists.english);
// BIP39 seed derivation. Passphrase is the optional "25th word";
// changing it produces a different wallet from the same mnemonic.
export async function seedFromPhrase(phrase, passphrase = '') {
return bip39().mnemonicToSeed(phrase.trim(), passphrase);
//# sourceMappingURL=seed.js.map