/** * @fileoverview Provides utilities for entropy padding, generation of mnemonic sentences from entropy, * and conversion of mnemonic sentences back to entropy. * @author Jacob V. B. Haap * @license MIT */ /** * Apply padding to a Uint8Array to reach a permitted initial entropy length (ENT), so that * `ENT / 32` can yield an integer `CS`, and that `ENT + CS` are a multiple of 11 for mnemonic * sentence generation. * @example * const ent: Uint8Array = Uint8Array.from([68, 105, 110, 111, 115, 97, 117, 114, 115]); * const padded = padBytes(ent); // Uint8Array(12) [68, 105, 110, 111, 115, 97, 117, 114, 115, 0, 0, 0] */ export declare function padBytes(ent: Uint8Array): Uint8Array; /** * Apply padding to a bitstream string to reach a multiple of 11 for mnemonic sentence generation. * @example * const ent: string = "010001000110100101101110011011110111001101100001011101010111001001110011"; * const padded = padBitstream(ent); // 01000100011010010110111001101111011100110110000101110101011100100111001100000 */ export declare function padBitstream(ent: string): string; /** * Convert a bitstream string to a mnemonic sentence. * When the optional `ext` parameter is *true*, any entropy length will be accepted, and padding will * be applied internally to meet the requirements for mnemonic sentence generation. * @example * const bits: string = "01000010011011110110010101101001011011100110"; * const ms = bitstreamToMs(english, bits); // draw kite fog system */ export declare function bitstreamToMs(wordlist: string[], ent: string, ext?: boolean): string; /** * Convert a mnemonic sentence to a bitstream string. * @example * const ms: string = "draw kite fog system"; * const bits = msToBitstream(english, ms); // 01000010011011110110010101101001011011100110 */ export declare function msToBitstream(wordlist: string[], ms: string): string; //# sourceMappingURL=mnemonic.d.ts.map