Adds compression flag to toHex/toBin and tests
This commit is contained in:
parent
c42e0fb8e0
commit
a96dfea1f4
2 changed files with 33 additions and 14 deletions
src
|
@ -156,12 +156,12 @@ ECPubKey.prototype.toBytes = function(compressed) {
|
|||
return this.pub.getEncoded(compressed)
|
||||
}
|
||||
|
||||
ECPubKey.prototype.toHex = function() {
|
||||
return convert.bytesToHex(this.toBytes())
|
||||
ECPubKey.prototype.toHex = function(compressed) {
|
||||
return convert.bytesToHex(this.toBytes(compressed))
|
||||
}
|
||||
|
||||
ECPubKey.prototype.toBin = function() {
|
||||
return convert.bytesToString(this.toBytes())
|
||||
ECPubKey.prototype.toBin = function(compressed) {
|
||||
return convert.bytesToString(this.toBytes(compressed))
|
||||
}
|
||||
|
||||
ECPubKey.prototype.toWif = function(version) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue