add AddressIndex model

This commit is contained in:
Manuel Araoz 2014-06-04 13:44:32 -03:00
commit 51d5d7164e
8 changed files with 104 additions and 16 deletions

View file

@ -82,6 +82,9 @@ PrivateKey.prototype.get = function(index,isChange) {
};
PrivateKey.prototype.getAll = function(receiveIndex, changeIndex) {
if (typeof receiveIndex === 'undefined' || typeof changeIndex === 'undefined')
throw new Error('Invalid parameters');
var ret = [];
for(var i=0;i<receiveIndex; i++) {
ret.push(this.get(i,false));