include derivation path in tx proposal
This commit is contained in:
parent
2b3c29a563
commit
6af9ee68e2
4 changed files with 33 additions and 7 deletions
|
|
@ -61,8 +61,11 @@ PrivateKey.prototype._getHK = function(path) {
|
|||
return this.bip.derive(path);
|
||||
};
|
||||
|
||||
PrivateKey.prototype.get = function(index,isChange) {
|
||||
var path = Structure.FullBranch(index, isChange);
|
||||
PrivateKey.prototype.getForPaths = function(paths) {
|
||||
return paths.map(this.getForPath.bind(this));
|
||||
};
|
||||
|
||||
PrivateKey.prototype.getForPath = function(path) {
|
||||
var pk = this.privateKeyCache[path];
|
||||
if (!pk) {
|
||||
var derivedHK = this._getHK(path);
|
||||
|
|
@ -73,6 +76,11 @@ PrivateKey.prototype.get = function(index,isChange) {
|
|||
return wk;
|
||||
};
|
||||
|
||||
PrivateKey.prototype.get = function(index,isChange) {
|
||||
var path = Structure.FullBranch(index, isChange);
|
||||
return this.getForPath(path);
|
||||
};
|
||||
|
||||
PrivateKey.prototype.getAll = function(addressIndex, changeAddressIndex) {
|
||||
var ret = [];
|
||||
for(var i=0;i<addressIndex; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue