add master key reference to hd keys.
This commit is contained in:
parent
243d3fd69f
commit
bb9974b818
@ -151,6 +151,8 @@ function HDPriv(options) {
|
||||
data = options;
|
||||
}
|
||||
|
||||
this.master = options.master || this;
|
||||
|
||||
data = this._normalize(data, network.prefixes.xprivkey);
|
||||
|
||||
this.data = data;
|
||||
@ -323,6 +325,7 @@ HDPriv.prototype.derive = function(index, hard) {
|
||||
var privateKey = leftPart.add(new bn(this.privateKey)).mod(ec.curve.n).toArray();
|
||||
|
||||
return new HDPriv({
|
||||
master: this.master,
|
||||
// version: this.version,
|
||||
depth: this.depth + 1,
|
||||
parentFingerPrint: this.fingerPrint,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user