UNPKG

cipher-ethereum

Version:

An Ethereum library used by Cipher Browser, a mobile Ethereum client

19 lines (18 loc) 885 B
/// <reference types="node" /> export declare type Pbkdf2SyncFunction = (password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string) => Buffer; export declare type Pbkdf2Function = (password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer | null) => void) => void; export declare class Mnemonic { static pbkdf2Sync: Pbkdf2SyncFunction; static pbkdf2: Pbkdf2Function; private _entropy; private _words; private _phrase; private constructor(); static generate(entropy: Buffer): Mnemonic | null; static parse(phrase: string): Mnemonic | null; get entropy(): Buffer; get words(): string[]; get phrase(): string; toSeed(passphrase?: string): Buffer; toSeedAsync(passphrase?: string): Promise<Buffer>; }