We don't provide source maps.
Wordlists are large, including source maps would double package size.
import * as bip39 from '@scure/bip39';import { wordlist } from '@scure/bip39/wordlists/english.js';// Generate x random words. Uses Cryptographically-Secure Random Number Generator.const mn = bip39.generateMnemonic(wordlist);console.log(mn);// You can customize the strength of the generated mnemonic by passing a value between 128 and 256 as the second argument to the generateMnemonic function.// This value must be a multiple of 32. Default is 128.const mn256 = bip39.generateMnemonic(wordlist, 256);console.log(mn256);// Reversible: Converts mnemonic string to raw entropy in form of byte array.const ent = bip39.mnemonicToEntropy(mn, wordlist);// Reversible: Converts raw entropy in form of byte array to mnemonic string.bip39.
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.
All wordlists (warning: non-english wordlists are officially discouraged by bip39):
import { wordlist as czech } from '@scure/bip39/wordlists/czech.js';import { wordlist as english } from '@scure/bip39/wordlists/english.js';import { wordlist as french } from '@scure/bip39/wordlists/french.js';import { wordlist as italian } from '@scure/bip39/wordlists/italian.js';import { wordlist as japanese } from '@scure/bip39/wordlists/japanese.js';import { wordlist as korean } from '@scure/bip39/wordlists/korean.js';import { wordlist as portuguese } from '@scure/bip39/wordlists/portuguese.js';import { wordlist as simplifiedChinese } from '@scure/bip39/wordlists/simplified-chinese.js';
Security
The library has been audited:
at version 2.2.0, in Apr 2026, by ourselves (self-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.
Supply chain security
Commits are signed with PGP keys to prevent forgery. Be sure to verify the commit signatures
Releases are made transparently through token-less GitHub CI and Trusted Publishing. Be sure to verify the provenance logs for authenticity.
Rare releasing is practiced to minimize the need for re-audits by end-users.
Dependencies are minimized and strictly pinned to reduce supply-chain risk.
We use as few dependencies as possible.
Version ranges are locked, and changes are checked with npm-diff.
Dev dependencies are excluded from end-user installs; they’re only used for development and build steps.
For this package, there is 1 dependency; and a few dev dependencies: