remove _deriveKey
This commit is contained in:
parent
84551e17e2
commit
51b0d83444
@ -755,30 +755,6 @@ Wallet.prototype.createKey = function createKey(change, index) {
|
||||
};
|
||||
};
|
||||
|
||||
Wallet.prototype._deriveKey = function _deriveKey(purposeKey, cosignerIndex, change, index) {
|
||||
var path, key;
|
||||
|
||||
assert(this.derivation !== 'normal');
|
||||
|
||||
if (typeof change === 'string') {
|
||||
path = change;
|
||||
} else {
|
||||
if (index == null)
|
||||
index = change ? this.changeDepth : this.addressDepth;
|
||||
path = 'm/' + (change ? 1 : 0) + '/' + index;
|
||||
}
|
||||
|
||||
key = this.derivation === 'bip45'
|
||||
? purposeKey.derive(cosignerIndex)
|
||||
: purposeKey;
|
||||
|
||||
key = key.derive(path);
|
||||
|
||||
key.path = path;
|
||||
|
||||
return key;
|
||||
};
|
||||
|
||||
Wallet.prototype.setAddressDepth = function setAddressDepth(depth) {
|
||||
assert(this.derivation !== 'normal');
|
||||
for (var i = this.addressDepth; i < depth; i++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user