mnemonickeys
v1.0.0
Published
Mnemonic (BIP39) to trytes seed converter and generator.
Downloads
5
Maintainers
Readme
= IOTA Mnemonic Phrase and Seed Generator
This Javascript library provides Mnemonic seed/phrase generation and converts a valid Mnemonic (as the one generated by this library) to a unique random seed to be used in a IOTA wallet.
The main purpose of this library is to allow the user to safely generate a deterministic key/seed by using a Mnemonic code/phrase (group of words easy to remember and save) AND a passphrase.
Although optional, it is strongly advised to use a passphrase! (and it would be very silly not to.)
This method makes the (IOTA) seed safe in case of unwanted exposure of the Mnemonic (stolen or hacked digital store - not advised!), but most importantly it allows you to have plausible deniability and multiple "hidden" wallets using the same mnemonic (basically multiple accounts).
Implementation of Mnemonic generation and conversion is done using the Bitcoin BIP39 (Copyright (c) 2014, Wei Lu [email protected] and Daniel Cousens [email protected]). Thanks for the good work.
== Usage
npm install iota-bip39
const iotaBIP39 = require('iota-bip39');
// Generate mnemonic and secure it (pen & paper or encrypted offline password manager - [pass](https://www.passwordstore.org))
const secret = iotaBIP39.generate();
// => 'clog chalk fix anxiety betray horn envelope alpha acoustic man hood goose tray skate toilet frame airport glove beyond snack retreat memory confirm correct'
iotaBIP39.validate(secret);
// => true
// convert to IOTA wallet-compatible (81 trytes) seed
const iotaSeed = iotaBIP39.toSeed(secret, 'h4rdt0guessPa$$phrase');
// => '9BUAABSCBBCBYAUAVAWAQCUCWABBABYACBRCVABB9BCBAB9BRCTCZARCBBZAPCXA9BSCABABQCYATCPCT'