lib/address.js
function privKeyToWIF(privKey) {
  var toCompressed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  var wif = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : zconfig.mainnet.wif;

  if (toCompressed) privKey = privKey + '01';

  return bs58check.encode(Buffer.from(wif + privKey, 'hex'));
}
function privKeyToWIF(privKey) {
  var toCompressed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  var wif = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : zconfig.mainnet.wif;

  if (toCompressed) privKey = privKey + '01';

  return bs58check.encode(Buffer.from(wif + privKey, 'hex'));
}
function privKeyToWIF ( privKey ) { var toCompressed = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : false ; var wif = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : zconfig . mainnet . wif ; if ( toCompressed ) privKey = privKey + '01' ; return bs58check . encode ( Buffer . from ( wif + privKey , 'hex' ) ) ; }
/*
Converts a private key to WIF format
@param {String} privKey (private key)
@param {boolean} toCompressed (Convert to WIF compressed key or nah)
@param {String} wif (wif hashing bytes (default: 0x80))
@return {Sting} WIF format (uncompressed)
/ * Converts a private key to WIF format