bitcore-mnemonic
Advanced tools
Comparing version 1.5.0 to 1.7.0
@@ -1,6 +0,4 @@ | ||
'use strict'; | ||
var gulp_bitcore = require('bitcore-build'); | ||
var startGulp = require('bitcore-build'); | ||
Object.assign(exports, startGulp('mnemonic')) | ||
gulp_bitcore('mnemonic'); | ||
@@ -53,2 +53,3 @@ 'use strict'; | ||
seed = data; | ||
ent = seed.length * 8; | ||
} else if (_.isString(data)) { | ||
@@ -80,4 +81,4 @@ phrase = unorm.nfkd(data); | ||
} | ||
if (ent % 32 !== 0 || ent < 128) { | ||
throw new bitcore.errors.InvalidArgument('ENT', 'Values must be ENT > 128 and ENT % 32 == 0'); | ||
if (ent % 32 !== 0 || ent < 128 || ent > 256) { | ||
throw new bitcore.errors.InvalidArgument('ENT', 'Values must be ENT > 128 and ENT < 256 and ENT % 32 == 0'); | ||
} | ||
@@ -245,3 +246,3 @@ | ||
* | ||
* @param {Number} entropy - Entropy buffer | ||
* @param {Buffer} entropy - Entropy buffer | ||
* @param {Array} wordlist - Array of words to generate the mnemonic | ||
@@ -277,3 +278,3 @@ * @returns {String} Mnemonic string | ||
* | ||
* @param entropy | ||
* @param {Buffer} entropy | ||
* @returns {string} Checksum of entropy length / 32 | ||
@@ -280,0 +281,0 @@ * @private |
@@ -7,3 +7,4 @@ module.exports = { | ||
'JAPANESE': require('./japanese'), | ||
'KOREAN': require('./korean'), | ||
'SPANISH': require('./spanish') | ||
}; |
{ | ||
"name": "bitcore-mnemonic", | ||
"version": "1.5.0", | ||
"version": "1.7.0", | ||
"description": "BIP39 Mnemonics implemented for Bitcore.", | ||
@@ -37,13 +37,14 @@ "author": "BitPay <dev@bitpay.com>", | ||
"devDependencies": { | ||
"assert": "^1.1.2", | ||
"bitcore-build": "git://github.com/bitpay/bitcore-build.git", | ||
"brfs": "^1.2.0", | ||
"chai": "^1.10.0", | ||
"gulp": "^3.8.10", | ||
"mocha": "^2.2.5" | ||
"assert": "^1.4.1", | ||
"bitcore-build": "https://github.com/bitpay/bitcore-build.git#1023e8a99cd42b9241ccafe8e34c52f308c10284", | ||
"brfs": "^2.0.1", | ||
"mocha": "^5.2.0" | ||
}, | ||
"dependencies": { | ||
"bitcore-lib": "^0.15.0", | ||
"unorm": "^1.3.3" | ||
"bitcore-lib": "^0.16.0", | ||
"unorm": "^1.4.1" | ||
}, | ||
"peerDependencies": { | ||
"bitcore-lib": "^0.16.0" | ||
} | ||
} |
@@ -13,7 +13,7 @@ <img src="http://bitcore.io/css/images/module-mnemonic.png" alt="bitcore mnemonics" height="35"> | ||
This library is distributed in both the npm and bower packaging systems. | ||
This library is distributed in both the npm packaging systems. | ||
```sh | ||
npm install bitcore-lib # this to install bitcore-lib since it is a peerDependecy | ||
npm install bitcore-mnemonic | ||
bower install bitcore-mnemonic | ||
``` | ||
@@ -20,0 +20,0 @@ |
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
228561
4
26
1507
0
3
+ Addedbitcore-lib@0.16.0(transitive)
- Removedbitcore-lib@0.15.0(transitive)
Updatedbitcore-lib@^0.16.0
Updatedunorm@^1.4.1