UNPKG

meta-log-db

Version:

Native database package for Meta-Log (ProLog, DataLog, R5RS)

39 lines 1.35 kB
/** * BIP39 Mnemonic Implementation * * Implements mnemonic phrase generation and validation using Web Crypto API * Based on BIP39 specification: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki * * Note: This is a simplified implementation. Full BIP39 requires: * - Word list (2048 words) * - Checksum validation * - Proper entropy generation */ /** * Generate BIP39 mnemonic phrase * * @param strength - Entropy strength in bits (128, 160, 192, 224, or 256) * @returns Mnemonic phrase (space-separated words) */ export declare function generateMnemonic(strength?: 128 | 160 | 192 | 224 | 256): Promise<string>; /** * Validate mnemonic phrase * * @param mnemonic - Mnemonic phrase to validate * @returns true if valid, false otherwise */ export declare function validateMnemonic(mnemonic: string): boolean; /** * Convert mnemonic to seed using PBKDF2 * * @param mnemonic - Mnemonic phrase * @param passphrase - Optional passphrase (default: empty string) * @returns Seed bytes (64 bytes) */ export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array>; /** * Convert seed to mnemonic (reverse operation - not standard BIP39) * This is a helper for testing/debugging */ export declare function seedToMnemonic(seed: Uint8Array): string; //# sourceMappingURL=bip39.d.ts.map