A web component that generates a BIP39 mnemonic seed and 12 word phrase
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install to install your element's dependencies, then run polymer serve to serve your element locally.
$ npm install blox-mnemonic
$ polymer serve
$ polymer test
$ import 'blox-mnemonic';
<blox-mnemonic
password="secret!!"
mnemonic="{{mnemonic}}"
seed="{{seed}}">
</blox-mnemonic><blox-mnemonic id="bloxMnemonic"></blox-mnemonic>
<script>
this.$.bloxMnemonic.mnemonicfromPassword('secret!!')
.then((hash) => {
// Do Something
})
.catch((err) => {
// Do Something
})
</script>