Browse Source

Added 'wif' as an export format

hk-custom-address
Vitalik Buterin 11 years ago
parent
commit
ff3679a3fe
  1. 1
      src/eckey.js

1
src/eckey.js

@ -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)

Loading…
Cancel
Save