Gathering detailed insights and metrics for @getin-id/bip39
Gathering detailed insights and metrics for @getin-id/bip39
Secure, audited & minimal implementation of BIP39 mnemonic phrases
npm install @getin-id/bip39
Typescript
Module System
Node Version
NPM Version
78.1
Supply Chain
98.3
Quality
75.2
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
142
Last Day
2
Last Week
4
Last Month
10
Last Year
54
59 Commits
1 Branches
Minified
Minified + Gzipped
Latest Version
1.2.1
Package Id
@getin-id/bip39@1.2.1
Unpacked Size
169.28 kB
Size
66.45 kB
File Count
23
NPM Version
8.19.2
Node Version
18.12.1
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
300%
4
Compared to previous week
Last month
900%
10
Compared to previous month
Last year
-33.3%
54
Compared to previous year
2
4
Secure, audited & minimal implementation of BIP39 mnemonic phrases.
Compared to popular bip39
package, scure-bip39:
Check out scure-bip32 if you need hierarchical deterministic wallets ("HD Wallets").
scure — secure audited packages for every use case.
npm install @scure/bip39
Or
yarn add @scure/bip39
1import * as bip39 from '@scure/bip39';
2import { wordlist } from '@scure/bip39/wordlists/english';
3
4// Generate x random words. Uses Cryptographically-Secure Random Number Generator.
5const mn = bip39.generateMnemonic(wordlist);
6console.log(mn);
7
8// Reversible: Converts mnemonic string to raw entropy in form of byte array.
9const ent = bip39.mnemonicToEntropy(mn, wordlist)
10
11// Reversible: Converts raw entropy in form of byte array to mnemonic string.
12bip39.entropyToMnemonic(ent, wordlist);
13
14// Validates mnemonic for being 12-24 words contained in `wordlist`.
15bip39.validateMnemonic(mn, wordlist);
16
17// Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
18await bip39.mnemonicToSeed(mn, 'password');
19bip39.mnemonicToSeedSync(mn, 'password');
This submodule contains the word lists defined by BIP39 for Czech, English, French, Italian, Japanese, Korean, 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.
1function generateMnemonic(wordlist: string[], strength?: number): string; 2function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array; 3function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string; 4function validateMnemonic(mnemonic: string, wordlist: string[]): boolean; 5function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array>; 6function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
All wordlists:
1import { wordlist } from '@scure/bip39/wordlists/czech'; 2import { wordlist } from '@scure/bip39/wordlists/english'; 3import { wordlist } from '@scure/bip39/wordlists/french'; 4import { wordlist } from '@scure/bip39/wordlists/italian'; 5import { wordlist } from '@scure/bip39/wordlists/japanese'; 6import { wordlist } from '@scure/bip39/wordlists/korean'; 7import { wordlist } from '@scure/bip39/wordlists/simplified-chinese'; 8import { wordlist } from '@scure/bip39/wordlists/spanish'; 9import { wordlist } from '@scure/bip39/wordlists/traditional-chinese';
The library has been audited by Cure53 on Jan 5, 2022. Check out the audit PDF & URL. See changes since audit.
micro-bip39
@micro
namespace was taken, we've renamed the package to @scure/bip39
Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com)
No vulnerabilities found.
No security vulnerabilities found.