thor-devkit
Version:
Typescript library to aid DApp development on VeChain Thor
20 lines (19 loc) • 727 B
TypeScript
/// <reference types="node" />
export declare namespace mnemonic {
/**
* generate BIP39 mnemonic words
* @param rng the optional random number generator, which generates 16~32 (step 4) random bytes.
* Every 4 bytes produce 3 words.
*/
function generate(rng?: () => Buffer): string[];
/**
* check if the given mnemonic words have valid checksum
* @param words mnemonic words
*/
function validate(words: string[]): boolean;
/**
* derive private key at index 0 from mnemonic words according to BIP32.
* the derivation path is defined at https://github.com/satoshilabs/slips/blob/master/slip-0044.md
*/
function derivePrivateKey(words: string[]): Buffer;
}