Code Monkey home page Code Monkey logo

bip-39's Introduction

@nibyou/bip39

From the Bitcoin Improvement Proposal 39 (https://en.bitcoin.it/wiki/BIP_0039) (bitcoin/bips)

Mnemonic lists, basically a collection of 2048 nouns in different languages in an array.

In Bitcoin, lists like these are used to generate IDs for Wallets that humans can more easily remember than just a bunch of numbers. At Nibyou, we use the BIP-39 representation of random bytes to generate recovery passwords in human readable form (example below)

The following languages are currently supported:

Language Language Code
German de_DE
English en_US
Spanish es_ES
French fr_FR
Italian it_IT
Japanese ja_JP
Korean ko_KP
Portugese pt_PT
Simplified Chinese zh_CN
Traditional Chinese zh_TW

Installation

Install the package with npm

$ npm i --save @nibyou/bip39

or with yarn

$ yarn add @nibyou/bip39

Note that the generateMnemonic() function only works in browser contexts (i.e. where window.crypto.getRandomValues() is available).

Usage

Import/Require it in you code:

const bip39 = require("@nibyou/bip39");
// or in typescript
import bip39 from "@nibyou/bip39"

And finally, generate the mnemonic:

let mnemonic = bip39.generateMnemonic(bip39.LANGUAGES.de_DE, 6, '-');
// => 'zylinder-altertum-gitarre-roggen-asteroid-eiszeit'

License

CC-BY-SA-4.0

bip-39's People

Contributors

lucakiebel avatar

Stargazers

Dagmawi zewdu avatar uwenayo allain pacifique avatar  avatar

Watchers

 avatar

Forkers

tgkprog 22388o

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.