# Path: pypeerassets/exceptions.py
# class UnsupportedNetwork(Exception):
#     '''This network is not suppored by pypeerassets.'''


from collections import namedtuple
from decimal import Decimal
from btcpy.structs.transaction import TxOut
from btcpy.structs.script import NulldataScript
from pypeerassets.exceptions import UnsupportedNetwork
        'p2pkh': bytearray(b'\x6f'),
        'p2sh': bytearray(b'\xc4'),
    },
    bech32_hrp='tpc',
    bech32_net='testnet',
    xkeys_prefix='t',
    xpub_version=b'\x04\x35\x87\xcf',
    xprv_version=b'\x04\x35\x83\x94',
    wif_prefix=0xef,
    from_unit=Decimal('1e-6'),
    to_unit=Decimal('1e6'),
    min_tx_fee=Decimal(0.001),
    tx_timestamp=True,
    tx_out_cls=PeercoinTxOut,
    op_return_max_bytes=256
)


networks = (PeercoinMainnet, PeercoinTestnet,)


def net_query(name: str) -> Constants:
    '''Find the NetworkParams for a network by its long or short name. Raises
    UnsupportedNetwork if no NetworkParams is found.
    '''

    for net_params in networks:
        if name in (net_params.name, net_params.shortname,):
            return net_params


# Path: pypeerassets/exceptions.py
# class UnsupportedNetwork(Exception):
#     '''This network is not suppored by pypeerassets.'''


# Path: pypeerassets/networks.py
from collections import namedtuple
from decimal import Decimal
from btcpy.structs.transaction import TxOut
from btcpy.structs.script import NulldataScript
from pypeerassets.exceptions import UnsupportedNetwork

        'p2pkh': bytearray(b'\x6f'),
        'p2sh': bytearray(b'\xc4'),
    },
    bech32_hrp='tpc',
    bech32_net='testnet',
    xkeys_prefix='t',
    xpub_version=b'\x04\x35\x87\xcf',
    xprv_version=b'\x04\x35\x83\x94',
    wif_prefix=0xef,
    from_unit=Decimal('1e-6'),
    to_unit=Decimal('1e6'),
    min_tx_fee=Decimal(0.001),
    tx_timestamp=True,
    tx_out_cls=PeercoinTxOut,
    op_return_max_bytes=256
)


networks = (PeercoinMainnet, PeercoinTestnet,)


def net_query(name: str) -> Constants:
    '''Find the NetworkParams for a network by its long or short name. Raises
    UnsupportedNetwork if no NetworkParams is found.
    '''

    for net_params in networks:
        if name in (net_params.name, net_params.shortname,):
            return net_params


    raise UnsupportedNetwork