安全、经过审计且最小化的 BIP39 记忆词实施
Audited & minimal JS implementation of BIP39 mnemonic phrases.
Check out scure-bip32 if you need hierarchical deterministic wallets ("HD Wallets").
scure — audited micro-libraries.
npm install @scure/bip39
deno add jsr:@scure/bip39
We don't provide source maps. Wordlists are large, including source maps would double package size.
…This submodule contains the word lists defined by BIP39 for Czech, English, French, Italian, Japanese, Korean, Portuguese, Simplified and Traditional Chinese, and Spanish. These are not imported by default, as that would increase bundle sizes too much. Instead, you should import and use them explicitly.
function generateMnemonic(wordlist: string[], strength?: number): string;
function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
function validateMnemonic(mnemonic: string, wordlist: string[]): boolean;
function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise;
function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
function mnemonicToSeedWebcrypto(mnemonic: string, passphrase?: string): Promise;All wordlists (warning: non-english wordlists are officially discouraged by bip39):
…The library has been audited:
The library was initially developed for js-ethereum-cryptography.
At commit ae00e6d7,
it was extracted to a separate package called micro-bip39.
After the audit we've decided to use @scure NPM namespace for security.
To audit wordlist content, run node scripts/fetch-wordlist.js.
For this package, there is 1 dependency; and a few dev dependencies:
Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com)
暂无开放 Issues,或尚未同步最近议题。