Socket
Socket
Sign inDemoInstall

@scure/bip39

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scure/bip39

Secure, audited & minimal implementation of BIP39 mnemonic phrases


Version published
Weekly downloads
1.5M
increased by9.23%
Maintainers
1
Weekly downloads
 
Created

What is @scure/bip39?

@scure/bip39 is an npm package that provides functionality for generating and working with BIP-39 mnemonic phrases, which are used in the creation of cryptocurrency wallets. It allows for the generation of mnemonic phrases, conversion between mnemonic phrases and seed values, and validation of mnemonic phrases.

What are @scure/bip39's main functionalities?

Generate Mnemonic

This feature allows you to generate a new BIP-39 mnemonic phrase using the English wordlist.

const { generateMnemonic } = require('@scure/bip39');
const { wordlist } = require('@scure/bip39/wordlists/english');
const mnemonic = generateMnemonic(wordlist);
console.log(mnemonic);

Mnemonic to Seed

This feature converts a BIP-39 mnemonic phrase to a seed value, which can be used to derive keys for cryptocurrency wallets.

const { mnemonicToSeedSync } = require('@scure/bip39');
const mnemonic = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about';
const seed = mnemonicToSeedSync(mnemonic);
console.log(seed.toString('hex'));

Validate Mnemonic

This feature checks if a given BIP-39 mnemonic phrase is valid according to the specified wordlist.

const { validateMnemonic } = require('@scure/bip39');
const { wordlist } = require('@scure/bip39/wordlists/english');
const mnemonic = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about';
const isValid = validateMnemonic(mnemonic, wordlist);
console.log(isValid);

Other packages similar to @scure/bip39

Keywords

FAQs

Package last updated on 03 Sep 2024

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