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

bip39-seeder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bip39-seeder

Creates a random numonic using Bip39 adding: CPU entropy, seed checking using bip39-checker, and a command-line interface.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Coverage Status

NPM Package

Seeder (bip39)

Create and validate bip39 compatible mnemonic seeds.

Entropy

Combines secure random generator and variations in CPU performance.

Validation

Mnemonic seeds contain a hidden checksum. Suggested spelling corrections are provided.

Command Line Interface

bip39-seeder -?

Create or validate bip39 mnemonic seeds.
> ocean earn race rack swing odor yard manage illegal draw window desk

Suggested spelling corrections are provided.

Options:
  --create, -c    Create a new secure random mnemonic seed             [boolean]
  --seed, -s      Provide mnemonic seed (12 words or so)
                                                        [string] [default: null]
  --bits, -b      Bit strength                           [number] [default: 128]
  --language, -l  language: chinese_simplified, chinese_traditional, english,
                  french, italian, japanese, spanish
                                                   [string] [default: "english"]
  --no-suggest    Do not suggest correction to misspelled words in the mnemonic
                  seed                                [boolean] [default: false]
  --help, -h, -?  Show help                                            [boolean]

Examples:
  bip39-seeder -c  Create a new random mnemonic seed
  bip39-seeder -s  Validate an existing seed

API

const assert = require('assert')
const {suggest, validSeed} = require('bip39-checker')
const {randomMnemonicSeed, mnemonicToSeed} = require('bip39-seeder')

randomMnemonicSeed(null, seed => {

    assert(validSeed(seed))

    // Strengthen the seed by 11 bits
    const stretched = mnemonicToSeed(seed)
    assert(stretched.toString('hex'))
    assert.equal(stretched.length, 64)
    // By convention:
    //  stretched.slice(0, 32) is the private key or HD master private key, etc..
    //  stretched.I.slice(32) may be used for something else like an initialization vector, chain code, etc..

    console.log('Random mnemonic seed:', seed)
})

FAQs

Package last updated on 27 May 2017

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