packages/bitcoin-utils/lib/index.js
function getAddressNetwork (address) {
  const prefix = base58.decode(address).toString('hex').substring(0, 2).toUpperCase()
  const networkKey = findKey(networks,
    network => [network.pubKeyHash, network.scriptHash].includes(prefix))
  return networks[networkKey]
}
function getAddressNetwork (address) {
  const prefix = base58.decode(address).toString('hex').substring(0, 2).toUpperCase()
  const networkKey = findKey(networks,
    network => [network.pubKeyHash, network.scriptHash].includes(prefix))
  return networks[networkKey]
}
function getAddressNetwork ( address ) { const prefix = base58 . decode ( address ) . toString ( 'hex' ) . substring ( 0 , 2 ) . toUpperCase ( ) const networkKey = findKey ( networks , network => [ network . pubKeyHash , network . scriptHash ] . includes ( prefix ) ) return networks [ networkKey ] }
Get a network object from an address
@param {string} address The bitcoin address
@return {Network}
Get a network object from an address