Browse Source

Add toBase58, toWif to ECPubKey

hk-custom-address
Andreas Brekken 11 years ago
parent
commit
8ccb8ad70a
  1. 6
      src/eckey.js

6
src/eckey.js

@ -148,6 +148,12 @@ ECPubKey.prototype.toBin = function() {
return conv.bytesToString(this.toBytes()) return conv.bytesToString(this.toBytes())
} }
ECPubKey.prototype.toBase58 = function() {
return base58.checkEncode(this.toBytes(), 128)
}
ECPubKey.prototype.toWif = ECPubKey.prototype.toBase58
ECPubKey.prototype.toString = function() { ECPubKey.prototype.toString = function() {
return this.getBitcoinAddress().toString() return this.getBitcoinAddress().toString()
} }

Loading…
Cancel
Save