Comparing version 2.0.7 to 2.0.8
@@ -109,3 +109,3 @@ var BN = require('bn.js') | ||
tweak = new BN(tweak) | ||
if (util.isOverflow(tweak) || util.isZero(tweak)) { | ||
if (util.isOverflow(tweak) || tweak.isZero()) { | ||
throw new Error(messages.EC_PUBKEY_TWEAK_MUL_FAIL) | ||
@@ -112,0 +112,0 @@ } |
@@ -168,3 +168,3 @@ var BN = require('bn.js') | ||
bn = util.bnReduce(bn.iadd(new BN(secretKey))) | ||
if (util.isZero(bn)) { | ||
if (bn.isZero()) { | ||
throw new Error(messages.EC_PRIVKEY_TWEAK_ADD_FAIL) | ||
@@ -191,3 +191,3 @@ } | ||
var bn = new BN(tweak) | ||
if (util.isOverflow(bn) || util.isZero(bn)) { | ||
if (util.isOverflow(bn) || bn.isZero()) { | ||
throw new Error(messages.EC_PRIVKEY_TWEAK_MUL_FAIL) | ||
@@ -194,0 +194,0 @@ } |
@@ -5,4 +5,2 @@ var BN = require('bn.js') | ||
var ZERO = new BN(0) | ||
/** | ||
@@ -14,3 +12,3 @@ * @param {Buffer} secretKey | ||
var bn = new BN(secretKey) | ||
return !exports.isOverflow(bn) && !exports.isZero(bn) | ||
return !exports.isOverflow(bn) && !bn.isZero() | ||
} | ||
@@ -72,10 +70,2 @@ | ||
* @param {BN} bn | ||
* @return {boolean} | ||
*/ | ||
exports.isZero = function (bn) { | ||
return bn.cmp(ZERO) === 0 | ||
} | ||
/** | ||
* @param {BN} bn | ||
* @return {BN} | ||
@@ -82,0 +72,0 @@ */ |
{ | ||
"name": "secp256k1", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "This module provides native bindings to ecdsa secp256k1 functions", | ||
@@ -58,3 +58,3 @@ "keywords": [ | ||
"bluebird": "^3.0.2", | ||
"bn.js": "^4.2.0", | ||
"bn.js": "^4.6.4", | ||
"elliptic": "^6.0.2", | ||
@@ -61,0 +61,0 @@ "nan": "^2.0.9", |
@@ -10,3 +10,3 @@ # secp256k1-node | ||
This module provides native bindings to ecdsa [secp256k1](https://github.com/bitcoin/secp256k1) functions. | ||
This library is experimental, so use at your own risk. Works on node version 0.10 or greater. | ||
This library is experimental, so use at your own risk. Works on node version 0.10 or greater and in the Browser via browserify. | ||
@@ -13,0 +13,0 @@ # Installation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
776099
121
923
Updatedbn.js@^4.6.4