Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bip39

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bip39

Bitcoin BIP39: Mnemonic code for generating deterministic keys

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
373K
decreased by-12.55%
Maintainers
2
Weekly downloads
 
Created

What is bip39?

The bip39 npm package is a JavaScript implementation of the BIP39 standard for generating mnemonic codes for generating deterministic keys. It is commonly used in cryptocurrency applications for creating and managing mnemonic phrases, which can be used to derive cryptographic keys.

What are bip39's main functionalities?

Generate Mnemonic

This feature allows you to generate a random mnemonic phrase. The mnemonic phrase is a set of words that can be used to generate a deterministic wallet.

const bip39 = require('bip39');
const mnemonic = bip39.generateMnemonic();
console.log(mnemonic);

Validate Mnemonic

This feature allows you to validate a given mnemonic phrase. It checks if the mnemonic is valid according to the BIP39 standard.

const bip39 = require('bip39');
const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost';
const isValid = bip39.validateMnemonic(mnemonic);
console.log(isValid);

Mnemonic to Seed

This feature converts a mnemonic phrase to a seed. The seed can be used to derive cryptographic keys.

const bip39 = require('bip39');
const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost';
const seed = bip39.mnemonicToSeedSync(mnemonic).toString('hex');
console.log(seed);

Mnemonic to Seed with Password

This feature converts a mnemonic phrase to a seed using an optional password. The password adds an extra layer of security.

const bip39 = require('bip39');
const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost';
const seed = bip39.mnemonicToSeedSync(mnemonic, 'password').toString('hex');
console.log(seed);

Other packages similar to bip39

FAQs

Package last updated on 25 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc