Browse Source

Added version to getBitcoinAddress

hk-custom-address
Vitalik Buterin 11 years ago
parent
commit
02a8db111b
  1. 0
      demo/split-key.html
  2. 4
      src/eckey.js

0
demo/split-key.html

4
src/eckey.js

@ -64,9 +64,9 @@ ECKey.prototype.getPubKeyHash = function () {
return this.pubKeyHash = util.sha256ripe160(this.getPub());
};
ECKey.prototype.getBitcoinAddress = function () {
ECKey.prototype.getBitcoinAddress = function (version) {
var hash = this.getPubKeyHash();
var addr = new Address(hash);
var addr = new Address(hash,version);
return addr;
};

Loading…
Cancel
Save