code: def _make_pkh_address(pubkey_hash, witness=False, cashaddr=True):
      '''
      bytes, bool -> str
      '''
      addr_bytes = bytearray()
      if riemann.network.CASHADDR_P2PKH is not None and cashaddr:
          addr_bytes.extend(riemann.network.CASHADDR_P2PKH)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.CASHADDR_ENCODER.encode(addr_bytes)
      if witness:
          addr_bytes.extend(riemann.network.P2WPKH_PREFIX)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.SEGWIT_ENCODER.encode(addr_bytes)
      else:
          addr_bytes.extend(riemann.network.P2PKH_PREFIX)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.LEGACY_ENCODER.encode(addr_bytesf _make_pkh_address(pubkey_hash, witness=False, cashaddr=True):
      '''
      bytes, bool -> str
      '''
      addr_bytes = bytearray()
      if riemann.network.CASHADDR_P2PKH is not None and cashaddr:
          addr_bytes.extend(riemann.network.CASHADDR_P2PKH)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.CASHADDR_ENCODER.encode(addr_bytes)
      if witness:
          addr_bytes.extend(riemann.network.P2WPKH_PREFIX)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.SEGWIT_ENCODER.encode(addr_bytes)
      else:
          addr_bytes.extend(riemann.network.P2PKH_PREFIX)
          addr_bytes.extend(pubkey_hash)
          return riemann.network.LEGACY_ENCODER.encode(addr_bytes)
docs: bytes, bool -> str