@signumjs/crypto
Version:
Cryptographic functions for building Signum Network apps.
34 lines (33 loc) • 932 B
TypeScript
/**
* Original work Copyright (c) 2024 Signum Network
*/
/**
* The Strength of the generated mnemonic
* Ranging from 128 bit (12 Words) to 256 bit (24 Words)
*
* @see {@link generateMnemonic}
*
* @category signing
*/
export declare enum Strength {
Bits_128 = 12,
Bits_160 = 15,
Bits_192 = 18,
Bits_224 = 21,
Bits_256 = 24
}
export type GenerateMnemonicArgs = {
/**
* The strength of the resulting passphrase given in bits. Ranging from 128 bit (12 Words) to 256 bit (24 Words)
*/
strength?: Strength;
/**
* An array of words (at least 1024 words) to be used for generation. Default is the official BIP39 English Word List
*/
dictionary?: string[];
};
/**
* Generates a passphrase aka mnemonic aka recovery phrase based on given dictionary, and strength
* @category signing
*/
export declare function generateMnemonic(args?: Partial<GenerateMnemonicArgs>): string;