diff --git a/test/privatekey.js b/test/privatekey.js index 508c57db0..e0dd4bd73 100644 --- a/test/privatekey.js +++ b/test/privatekey.js @@ -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'); + }); + });