packages/bitcoin-utils/lib/index.js
function pubKeyToAddress (pubKey, network, type) {
  pubKey = ensureBuffer(pubKey)
  const pubKeyHash = hash160(pubKey)
  const addr = pubKeyHashToAddress(pubKeyHash, network, type)
  return addr
}
function pubKeyToAddress (pubKey, network, type) {
  pubKey = ensureBuffer(pubKey)
  const pubKeyHash = hash160(pubKey)
  const addr = pubKeyHashToAddress(pubKeyHash, network, type)
  return addr
}
function pubKeyToAddress ( pubKey , network , type ) { pubKey = ensureBuffer ( pubKey ) const pubKeyHash = hash160 ( pubKey ) const addr = pubKeyHashToAddress ( pubKeyHash , network , type ) return addr }
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.
Get address from pubKey .