add sign in block

This commit is contained in:
Matias Alejo Garcia 2014-04-09 23:04:22 -03:00
commit c3efcb3f27
6 changed files with 79 additions and 30 deletions

View file

@ -47,4 +47,24 @@ describe('PrivateKey model', function() {
}
}
});
it('should derive priv keys array', function () {
var w = new PrivateKey(config);
var wks = w.getAll(2,3);
wks.length.should.equal(5);
for(var j=0; j<wks.length; j++) {
var wk = wks[j];
should.exist(wk);
var o=wk.storeObj();
should.exist(o);
should.exist(o.priv);
should.exist(o.pub);
should.exist(o.addr);
var a = new Address(o.addr);
a.isValid().should.equal(true);
(function() {
var p = new PrivateKey(o.priv)
}).should.not.throw();
}
});
});