bitcore-mnemonic
Version:
BIP39 Mnemonics implemented for Bitcore.
38 lines (24 loc) • 1.71 kB
Markdown
BIP39 Mnemonics for bitcore
[](https://www.npmjs.org/package/bitcore-mnemonic)
[](https://travis-ci.org/bitpay/bitcore-mnemonic)
[](https://coveralls.io/r/bitpay/bitcore-mnemonic)
**A module for [bitcore](https://github.com/bitpay/bitcore) that implements [Mnemonic code for generating deterministic keys](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki).**
This library is distributed in both the npm packaging systems.
```sh
npm install bitcore-lib
npm install bitcore-mnemonic
```
There are many examples of how to use it on the developer guide [section for mnemonic](./docs/index.md). For example, the following code would generate a new random mnemonic code and convert it to a `HDPrivateKey`.
```javascript
var Mnemonic = require('bitcore-mnemonic');
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](https://github.com/bitpay/bitcore/blob/master/CONTRIBUTING.md) on the main bitcore repo for information about how to contribute.
Code released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).
Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.