Add tests for importing from WIF

This commit is contained in:
Esteban Ordano 2014-12-15 18:58:41 -03:00
parent d1a590dc89
commit fcc3a1c961
1 changed files with 10 additions and 0 deletions

View File

@ -303,4 +303,14 @@ describe('PrivateKey', function() {
});
it('creates an address as expected from WIF, livenet', function() {
var privkey = new PrivateKey('5J2NYGstJg7aJQEqNwYp4enG5BSfFdKXVTtBLvHicnRGD5kjxi6')
privkey.publicKey.toAddress().toString().should.equal('135bwugFCmhmNU3SeCsJeTqvo5ViymgwZ9');
});
it('creates an address as expected from WIF, testnet', function() {
var privkey = new PrivateKey('92VYMmwFLXRwXn5688edGxYYgMFsc3fUXYhGp17WocQhU6zG1kd')
privkey.publicKey.toAddress().toString().should.equal('moiAvLUw16qgrwhFGo1eDnXHC2wPMYiv7Y');
});
});