bitcore-mnemonic
Advanced tools
Comparing version
@@ -10,14 +10,6 @@ # Change Log | ||
## [8.1.0](https://github.com/bitpay/bitcore-mnemonic/compare/v5.0.0-beta.44...v8.1.0) (2019-02-27) | ||
# [8.1.0](https://github.com/bitpay/bitcore-mnemonic/compare/v5.0.0-beta.44...v8.1.0) (2019-02-27) | ||
**Note:** Version bump only for package bitcore-mnemonic | ||
# [8.0.0](https://github.com/bitpay/bitcore-mnemonic/compare/v5.0.0-beta.44...v8.0.0) (2019-02-27) | ||
## [8.0.0](https://github.com/bitpay/bitcore-mnemonic/compare/v5.0.0-beta.44...v8.0.0) (2019-02-27) |
# Mnemonic | ||
The `Mnemonic` class provides an implementation of a mnemonic code or mnemonic sentence – a group of easy to remember words – for the generation of deterministic keys. The class handles code generation and its later conversion to a [HDPrivateKey](hierarchical.md). See [the official BIP-0039](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) for technical background information. | ||
## Installation | ||
Mnemonics is implemented as a separate module and you must add it to your dependencies: | ||
@@ -9,3 +11,3 @@ | ||
``` | ||
```sh | ||
npm install bitcore-mnemonic --save | ||
@@ -16,3 +18,3 @@ ``` | ||
``` | ||
```sh | ||
bower install bitcore-mnemonic --save | ||
@@ -22,2 +24,3 @@ ``` | ||
## Mnemonic generation | ||
For creating a new random mnemonic code you just create a new instance. | ||
@@ -33,2 +36,3 @@ | ||
## Multi-language support | ||
The `Mnemonic` class can use any list of 2048 unique words to generate the mnemonic code. For convenience the class provides default word lists for the following languages: English (default), Chinese, French, Japanese and Spanish. Those word list are published under `Mnemonic.Words.LANGUAGE`, take a look at the following example: | ||
@@ -46,2 +50,3 @@ | ||
## Validating a mnemonic | ||
The Mnemonic class provides a static method to check if a mnemonic string is valid. If you generated the mnemonic code using any of the default word list, the class will identify it, otherwise you must provide the word list used. | ||
@@ -60,2 +65,3 @@ | ||
## Generating a private key | ||
A mnemonic encodes entropy that can be used for creating a seed and later a [HDPrivateKey](hierarchical.md). During the seed generation process a passphrase can be used. The code for doing so looks like this: | ||
@@ -62,0 +68,0 @@ |
{ | ||
"name": "bitcore-mnemonic", | ||
"version": "8.1.1", | ||
"version": "8.2.0", | ||
"description": "BIP39 Mnemonics implemented for Bitcore.", | ||
@@ -39,3 +39,3 @@ "author": "BitPay <dev@bitpay.com>", | ||
"assert": "^1.4.1", | ||
"bitcore-build": "^8.1.1", | ||
"bitcore-build": "^8.2.0", | ||
"brfs": "^2.0.1", | ||
@@ -47,3 +47,3 @@ "chai": "^4.2.0", | ||
"dependencies": { | ||
"bitcore-lib": "^8.1.1", | ||
"bitcore-lib": "^8.2.0", | ||
"unorm": "^1.4.1" | ||
@@ -53,4 +53,3 @@ }, | ||
"bitcore-lib": "^8.0.0" | ||
}, | ||
"gitHead": "352df110d2087b4642b99bc7da0742e723a5eb23" | ||
} | ||
} |
@@ -1,4 +0,4 @@ | ||
<img src="http://bitcore.io/css/images/module-mnemonic.png" alt="bitcore mnemonics" height="35"> | ||
# Bitcore Mnemonics | ||
BIP39 Mnemonics for bitcore | ||
======= | ||
@@ -9,3 +9,3 @@ [](https://www.npmjs.org/package/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). | ||
**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).** | ||
@@ -17,7 +17,7 @@ ## Getting Started | ||
```sh | ||
npm install bitcore-lib # this to install bitcore-lib since it is a peerDependecy | ||
npm install bitcore-lib #this to install bitcore-lib since it is a peerDependecy | ||
npm install bitcore-mnemonic | ||
``` | ||
There are many examples of how to use it on the developer guide [section for mnemonic](http://bitcore.io/guide/module/mnemonic/index.html). For example, the following code would generate a new random mnemonic code and convert it to a `HDPrivateKey`. | ||
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`. | ||
@@ -39,2 +39,2 @@ ```javascript | ||
Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc. | ||
Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc. |
229027
-24.34%27
-3.57%Updated