Add toBase58, toWif to ECPubKey
This commit is contained in:
parent
ecbb6f81ee
commit
8ccb8ad70a
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue