add forPath and tests

This commit is contained in:
Matias Alejo Garcia 2014-07-30 11:59:07 -03:00
commit 96a5f0aeb8
2 changed files with 32 additions and 0 deletions

View file

@ -298,6 +298,15 @@ PublicKeyRing.prototype.getForPaths = function(paths) {
return paths.map(this.getForPath.bind(this));
};
PublicKeyRing.prototype.forPaths = function(paths) {
return {
pubKeys: paths.map(this.getForPath.bind(this)),
copayerIds: this.copayerIds,
}
};
// TODO this could be cached
PublicKeyRing.prototype._addScriptMap = function(map, path) {
var p = HDPath.indexesForPath(path);