UNPKG

655 BTypeScriptView Raw
1/**
2 * @name mnemonicToLegacySeed
3 * @summary Creates a valid Ethereum/Bitcoin-compatible seed from a mnemonic input
4 * @example
5 * <BR>
6 *
7 * ```javascript
8 * import { mnemonicGenerate, mnemonicToLegacySeed, mnemonicValidate } from '@polkadot/util-crypto';
9 *
10 * const mnemonic = mnemonicGenerate(); // => string
11 * const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean
12 *
13 * if (isValidMnemonic) {
14 * console.log(`Seed generated from mnemonic: ${mnemonicToLegacySeed(mnemonic)}`); => u8a
15 * }
16 * ```
17 */
18export declare function mnemonicToLegacySeed(mnemonic: string, password?: string, onlyJs?: boolean, byteLength?: 32 | 64): Uint8Array;