Add toBase58, toWif to ECPubKey
This commit is contained in:
parent
ecbb6f81ee
commit
8ccb8ad70a
@ -148,6 +148,12 @@ ECPubKey.prototype.toBin = function() {
|
||||
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() {
|
||||
return this.getBitcoinAddress().toString()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user