code: function compressPubKey (pubKey) {
    const x = pubKey.substring(2, 66)
    const y = pubKey.substring(66, 130)
    const even = parseInt(y.substring(62, 64), 16) % 2 === 0
    const prefix = even ? '02' : '03'
  
    return prefix + x
  }
docs: Get compressed pubKey from pubKey.
  @param {!string} pubKey - 65 byte string with prefix, x, y.
  @return {string} Returns the compressed pubKey of uncompressed pubKey.