Added 'wif' as an export format

This commit is contained in:
Vitalik Buterin 2014-01-08 18:51:33 -05:00
parent 1f33b7a291
commit ff3679a3fe

View file

@ -57,6 +57,7 @@ ECKey.prototype.export = function (format) {
if (this.compressed)
bytes.push(1)
return format === "base58" ? base58.checkEncode(bytes,128)
: format === "wif" ? base58.checkEncode(bytes,128)
: format === "bin" ? conv.bytesToString(bytes)
: format === "bytes" ? bytes
: format === "hex" ? conv.bytesToHex(bytes)