code: function pubKeyToAddress (pubKey, network, type) {
    pubKey = ensureBuffer(pubKey)
    const pubKeyHash = hash160(pubKey)
    const addr = pubKeyHashToAddress(pubKeyHash, network, type)
    return addr
  }
docs: Get address from pubKey.
  @param {!string|Buffer} pubKey - 65 byte uncompressed pubKey or 33 byte compressed pubKey.
  @param {!string} network - bitcoin, testnet, or litecoin.
  @param {!string} type - pubKeyHash or scriptHash.
  @return {string} Returns the address of pubKey.