Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,8 @@ | ||
1.1.2 / 2020-04-16 | ||
------------------ | ||
- Fix extremely rare types bug ([#33](https://github.com/cryptocoinjs/hdkey/pull/33)) | ||
- Use `bs58check` dependency instead of `coinstring` ([#30](https://github.com/cryptocoinjs/hdkey/pull/30)) | ||
- Don't publish test files ([#27](https://github.com/cryptocoinjs/hdkey/issues/27), [#34](https://github.com/cryptocoinjs/hdkey/pull/34)) | ||
1.1.1 / 2019-02-09 | ||
@@ -2,0 +9,0 @@ ------------------ |
var assert = require('assert') | ||
var Buffer = require('safe-buffer').Buffer | ||
var crypto = require('crypto') | ||
var cs = require('coinstring') | ||
var bs58check = require('bs58check') | ||
var secp256k1 = require('secp256k1') | ||
@@ -61,3 +61,3 @@ | ||
get: function () { | ||
if (this._privateKey) return cs.encode(serialize(this, this.versions.private, Buffer.concat([Buffer.alloc(1, 0), this.privateKey]))) | ||
if (this._privateKey) return bs58check.encode(serialize(this, this.versions.private, Buffer.concat([Buffer.alloc(1, 0), this.privateKey]))) | ||
else return null | ||
@@ -69,3 +69,3 @@ } | ||
get: function () { | ||
return cs.encode(serialize(this, this.versions.public, this.publicKey)) | ||
return bs58check.encode(serialize(this, this.versions.public, this.publicKey)) | ||
} | ||
@@ -134,3 +134,3 @@ }) | ||
// In case parse256(IL) >= n or ki == 0, one should proceed with the next value for i | ||
return this.derive(index + 1) | ||
return this.deriveChild(index + 1) | ||
} | ||
@@ -146,3 +146,3 @@ // Public parent key -> public child key | ||
// In case parse256(IL) >= n or Ki is the point at infinity, one should proceed with the next value for i | ||
return this.derive(index + 1, isHardened) | ||
return this.deriveChild(index + 1) | ||
} | ||
@@ -197,3 +197,3 @@ } | ||
var keyBuffer = cs.decode(base58key) | ||
var keyBuffer = bs58check.decode(base58key) | ||
@@ -200,0 +200,0 @@ var version = keyBuffer.readUInt32BE(0) |
{ | ||
"name": "hdkey", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Bitcoin BIP32 hierarchical deterministic keys", | ||
@@ -24,10 +24,11 @@ "main": "lib/hdkey.js", | ||
"homepage": "https://github.com/cryptocoinjs/hdkey", | ||
"files": [], | ||
"devDependencies": { | ||
"bigi": "^1.1.0", | ||
"coveralls": "^2.10.0", | ||
"coveralls": "^3.0.4", | ||
"ecurve": "^1.0.0", | ||
"istanbul": "^0.3.17", | ||
"mocha": "^2.2.5", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^6.1.4", | ||
"mocha-lcov-reporter": "0.0.1", | ||
"mochify": "^2.10.0", | ||
"mochify": "^6.3.0", | ||
"secure-random": "^1.0.0", | ||
@@ -37,3 +38,3 @@ "standard": "^7.1.1" | ||
"dependencies": { | ||
"coinstring": "^2.0.0", | ||
"bs58check": "^2.1.2", | ||
"safe-buffer": "^5.1.1", | ||
@@ -40,0 +41,0 @@ "secp256k1": "^3.0.1" |
@@ -25,3 +25,3 @@ hdkey | ||
var seed = 'a0c42a9c3ac6abf2ba6a9946ae83af18f51bf1c9fa7dacc4c92513cc4dd015834341c775dcd4c0fac73547c5662d81a9e9361a0aac604a73a321bd9103bce8af' | ||
var hdkey = HDKey.fromMasterSeed(new Buffer(seed, 'hex')) | ||
var hdkey = HDKey.fromMasterSeed(Buffer.from(seed, 'hex')) | ||
console.log(hdkey.privateExtendedKey) | ||
@@ -40,3 +40,3 @@ // => 'xprv9s21ZrQH143K2SKJK9EYRW3Vsg8tWVHRS54hAJasj1eGsQXeWDHLeuu5hpLHRbeKedDJM4Wj9wHHMmuhPF8dQ3bzyup6R7qmMQ1i1FtzNEW' | ||
var seed = 'a0c42a9c3ac6abf2ba6a9946ae83af18f51bf1c9fa7dacc4c92513cc4dd015834341c775dcd4c0fac73547c5662d81a9e9361a0aac604a73a321bd9103bce8af' | ||
var hdkey = HDKey.fromMasterSeed(new Buffer(seed, 'hex')) | ||
var hdkey = HDKey.fromMasterSeed(Buffer.from(seed, 'hex')) | ||
``` | ||
@@ -43,0 +43,0 @@ |
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
18128
5
196
+ Addedbs58check@^2.1.2
+ Addedbase-x@3.0.10(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbs58check@2.1.2(transitive)
- Removedcoinstring@^2.0.0
- Removedbs58@2.0.1(transitive)
- Removedcoinstring@2.3.1(transitive)