• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    JavaScript
  • Created over 10 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mnemonic code for generating deterministic keys

jsBIP39

Ported from the reference implementation at https://github.com/trezor/python-mnemonic

Mnemonic code for generating deterministic keys

BIP39 Specification at https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki

Usage

var m = new Mnemonic("english")

// Generate new mnemonics
var words = m.generate();
"canyon subway other flower grocery diagram cigar such custom rude couch horror"

// Check mnemonics are valid
var isValid = m.check(words);
true

// Generate BIP32 seeds from mnemonics
var seed = m.toSeed(words, "mysecretpassword");
"b4f0524dd1fcfc15ac2408fc9228df71c706aab238f8558d3b2bb3f4bce8ea25be9a3a6fc684a16ebfbb1240aee3decb404b856dd57298ce150441965c91c6e9"

// Generate mnemonics of different strengths
var lessWords = m.generate(64)
"safe soon minute hungry toss mobile"

// Test mnemonics are valid
var invalidMnemonic = "safe soon minute hungry toss cigar";
m.check(invalidMnemonic);
false

Supported Languages

var m = new Mnemonic("english")
var m = new Mnemonic("japanese")
var m = new Mnemonic("spanish")
var m = new Mnemonic("chinese_simplified")
var m = new Mnemonic("chinese_traditional")
var m = new Mnemonic("french")
var m = new Mnemonic("italian")
var m = new Mnemonic("korean")

Tests

Tests run in the browser.

$ cd /path/to/repo/
$ python -m http.server

Open http://localhost:8000/test/ in your browser

Node / NPM

If you prefer to use node / npm please have a look at bitcoinjs/bip39.

Thanks

This code uses asmCrypto https://github.com/tresorit/asmcrypto.js

The people who authored and contributed to BIP39 and the reference client

More Repositories

1

bip39

A web tool for converting BIP39 mnemonic codes
JavaScript
3,507
star
2

strcase

A golang package for converting to snake_case or CamelCase
Go
1,013
star
3

orderedmap

orderedmap is a golang map where the keys keep the order that they're added. It can be de/serialized from/to JSON. It's based closely on the python collections.OrderedDict.
Go
356
star
4

shamir

Shamir Secret Sharing Scheme in single page which can be used offline.
HTML
221
star
5

cia_world_factbook_api

Converts the CIA World Factbook into a json data structure
Go
198
star
6

shamir39

Split BIP39 mnemonics using Shamir's Secret Sharing Scheme
HTML
189
star
7

python-iwlist

Scanner and parser for wireless networks
Python
62
star
8

keycompression

Convert bitcoin keys between compressed and uncompressed format
HTML
61
star
9

slip39

A web tool for SLIP39 mnemonic shares
JavaScript
54
star
10

eip2333-tool

Tool for generating bls12-381 keys using the EIP2333 standard
JavaScript
20
star
11

multisig

A tool to create multisig addresses and transactions
HTML
17
star
12

iancoleman.io

My webpages
HTML
9
star
13

blsttc_ui

UI for blsttc rust library
JavaScript
8
star
14

blocksize_calculator

What is the effect of changing the bitcoin MAX_BLOCK_SIZE
JavaScript
5
star
15

bitcoin-qr-popup

A simple POS-friendly interface to the bitcoin client.
C#
4
star
16

entropy_bias_calculator

A calculator to show bias in entropy generated from base N events, eg dice rolls.
JavaScript
4
star
17

BitcoinArmory-Daemon

A json rpc interface to BitcoinArmory
Python
4
star
18

self_encryption_ui

Browser-based interface for rust library self_encryption
JavaScript
4
star
19

iancoleman.github.io

JavaScript
3
star
20

randchacha-js

The ChaCha random number generator for javascript. Inspired by and compatible with the rust crate rand_chacha
JavaScript
3
star
21

bls_interop

A tool for checking the interoperability of different rust bls12-381 libraries.
Rust
2
star
22

maid_distribution

JavaScript
2
star
23

safe_network_simulations

Simulates some scenarios for vault joining / leaving on the safe network
Go
2
star
24

log_viewer_for_safe_nodes

A way to visually explore multiple log vaults for MaidSafe safe_vault.
JavaScript
1
star
25

wallet_gui_for_sn

An experimental wallet GUI for Safe Network
Rust
1
star
26

everywhereium

A way to give tips to any web page.
JavaScript
1
star
27

harken

Go
1
star
28

insight-api-websocket-test

Simple test for insight-api websocket
1
star
29

codechain_exploration

Exploring the use of git and codechain together
1
star
30

keygen_bruteforce_for_prefix

How long does it take to find a key fitting a specific bit prefix?
Rust
1
star
31

monero-toolkit

Tools for interacting with monero
HTML
1
star
32

ed25519_vs_bls_key_benchmarks

Compare performance of ed25519_dalek and threshold_crypto bls keys.
Rust
1
star
33

bitcoinalafuture

A web service to gamble on the future price of bitcoin. Project has been abandoned for many months now.
JavaScript
1
star
34

perpetual_auction_currency_game

A game to simulate the Perpetual Auction Currency reward algorithm.
JavaScript
1
star
35

youtube_transcript_to_srt

Convert youtube transcript into srt subtitle file
Go
1
star
36

groupsize_calculator

Calculates the network security when changes are made to group size on the SAFE network
HTML
1
star