src/key/index.js
function sign (privateKey, data) {
  const pair = ECPair.fromWIF(privateKey)
  return btcMessage.sign(data, pair.d.toBuffer(32), pair.compressed).toString('base64')
}
function sign (privateKey, data) {
  const pair = ECPair.fromWIF(privateKey)
  return btcMessage.sign(data, pair.d.toBuffer(32), pair.compressed).toString('base64')
}
function sign ( privateKey , data ) { const pair = ECPair . fromWIF ( privateKey ) return btcMessage . sign ( data , pair . d . toBuffer ( 32 ) , pair . compressed ) . toString ( 'base64' ) }
Signs data with a bitcoin signature
@param {string} privateKey - Bitcoin private key in WIF formate
@param {string} data - Data to sign
@return {string} - Base64 encoded signature
Signs data with a bitcoin signature