From 02a8db111b593a5c4c5ea1387e623b242c70d331 Mon Sep 17 00:00:00 2001 From: Vitalik Buterin Date: Thu, 2 Jan 2014 20:33:23 -0500 Subject: [PATCH] Added version to getBitcoinAddress --- demo/split-key.html | 0 src/eckey.js | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 demo/split-key.html diff --git a/demo/split-key.html b/demo/split-key.html old mode 100755 new mode 100644 diff --git a/src/eckey.js b/src/eckey.js index 435c81f..71cbc45 100644 --- a/src/eckey.js +++ b/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; };