A module for bitcore that implements Mnemonic code for generating deterministic keys.
You should be import they first:
https://github.com/WoeOm/react-native-secure-randombytes
import { asyncRandomBytes } from 'react-native-secure-randombytes'
window.randomBytes = asyncRandomBytes
This library is distributed in both the npm and bower packaging systems.
npm install bitcore-mnemonic-react-native
bower install bitcore-mnemonic-react-native
There are many examples of how to use it on the developer guide section for mnemonic. For example, the following code would generate a new random mnemonic code and convert it to a HDPrivateKey
.
var Mnemonic = require('bitcore-mnemonic-react-native');
var code = new Mnemonic(Mnemonic.Words.SPANISH);
code.toString(); // natal hada sutil año sólido papel jamón combate aula flota ver esfera...
var xpriv = code.toHDPrivateKey();
See CONTRIBUTING.md on the main bitcore repo for information about how to contribute.
Code released under the MIT license.
Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.