|
|
@ -27,11 +27,8 @@ function HDKey(versions) { |
|
|
|
this.chainCode = null |
|
|
|
} |
|
|
|
|
|
|
|
Object.defineProperty(HDKey.prototype, 'identifier', { |
|
|
|
get: function() { |
|
|
|
return this._identifier |
|
|
|
} |
|
|
|
}) |
|
|
|
Object.defineProperty(HDKey.prototype, 'fingerprint', {get: function() { return this.identifier.slice(0, 4) } }) |
|
|
|
Object.defineProperty(HDKey.prototype, 'identifier', {get: function() { return this._identifier } }) |
|
|
|
|
|
|
|
Object.defineProperty(HDKey.prototype, 'privateKey', { |
|
|
|
get: function() { |
|
|
@ -71,10 +68,6 @@ Object.defineProperty(HDKey.prototype, 'publicOld', { |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
HDKey.prototype.getFingerprint = function() { |
|
|
|
return this.identifier.slice(0, 4) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HDKey.prototype.derive = function(path) { |
|
|
|
var e = path.split('/') |
|
|
@ -170,7 +163,7 @@ HDKey.prototype.deriveChild = function(index) { |
|
|
|
|
|
|
|
hd.chainCode = IR |
|
|
|
hd.depth = this.depth + 1 |
|
|
|
hd.parentFingerprint = this.getFingerprint().readUInt32BE(0) |
|
|
|
hd.parentFingerprint = this.fingerprint.readUInt32BE(0) |
|
|
|
hd.index = index |
|
|
|
|
|
|
|
return hd |
|
|
|