# Path: bitcoinlib/config/config.py
# NETWORK_DENOMINATORS = {  # source: https://en.bitcoin.it/wiki/Units, https://en.wikipedia.org/wiki/Metric_prefix
#     0.00000000000001: 'µsat',
#     0.00000000001: 'msat',
#     0.000000001: 'n',
#     0.00000001: 'sat',
#     0.0000001: 'fin',
#     0.000001: 'µ',
#     0.001: 'm',
#     0.01: 'c',
#     0.1: 'd',
#     1: '',
#     10: 'da',
#     100: 'h',
#     1000: 'k',
#     1000000: 'M',
#     1000000000: 'G',
#     1000000000000: 'T',
#     1000000000000000: 'P',
#     1000000000000000000: 'E',
#     1000000000000000000000: 'Z',
#     1000000000000000000000000: 'Y',
# }


from bitcoinlib.networks import *
from bitcoinlib.config.config import NETWORK_DENOMINATORS
            raise ValueError("Value uses different network (%s) then supplied network: %s" % (value.network.name, network))
        value = value.value_sat
    return value


class Value:
    """
    Class to represent and convert cryptocurrency values
    """

    @classmethod
    def from_satoshi(cls, value, denominator=None, network=DEFAULT_NETWORK):
        """
        Initialize Value class with smallest denominator as input. Such as represented in script and transactions cryptocurrency values.

        :param value: Amount of Satoshi's / smallest denominator for this network
        :type value: int
        :param denominator: Denominator as integer or string. Such as 0.001 or m for milli, 1000 or k for kilo, etc. See NETWORK_DENOMINATORS for list of available denominator symbols.
        :type denominator: int, float, str
        :param network: Specify network if not supplied already in the value string
        :type network: str, Network

        :return Value:
        """
        if not isinstance(network, Network):
            network = Network(network)
        if denominator is None:
            denominator = network.denominator
        else:
            if isinstance(denominator, str):

# Path: bitcoinlib/config/config.py
# NETWORK_DENOMINATORS = {  # source: https://en.bitcoin.it/wiki/Units, https://en.wikipedia.org/wiki/Metric_prefix
#     0.00000000000001: 'µsat',
#     0.00000000001: 'msat',
#     0.000000001: 'n',
#     0.00000001: 'sat',
#     0.0000001: 'fin',
#     0.000001: 'µ',
#     0.001: 'm',
#     0.01: 'c',
#     0.1: 'd',
#     1: '',
#     10: 'da',
#     100: 'h',
#     1000: 'k',
#     1000000: 'M',
#     1000000000: 'G',
#     1000000000000: 'T',
#     1000000000000000: 'P',
#     1000000000000000000: 'E',
#     1000000000000000000000: 'Z',
#     1000000000000000000000000: 'Y',
# }


# Path: bitcoinlib/values.py
from bitcoinlib.networks import *
from bitcoinlib.config.config import NETWORK_DENOMINATORS

            raise ValueError("Value uses different network (%s) then supplied network: %s" % (value.network.name, network))
        value = value.value_sat
    return value


class Value:
    """
    Class to represent and convert cryptocurrency values
    """

    @classmethod
    def from_satoshi(cls, value, denominator=None, network=DEFAULT_NETWORK):
        """
        Initialize Value class with smallest denominator as input. Such as represented in script and transactions cryptocurrency values.

        :param value: Amount of Satoshi's / smallest denominator for this network
        :type value: int
        :param denominator: Denominator as integer or string. Such as 0.001 or m for milli, 1000 or k for kilo, etc. See NETWORK_DENOMINATORS for list of available denominator symbols.
        :type denominator: int, float, str
        :param network: Specify network if not supplied already in the value string
        :type network: str, Network

        :return Value:
        """
        if not isinstance(network, Network):
            network = Network(network)
        if denominator is None:
            denominator = network.denominator
        else:
            if isinstance(denominator, str):

                dens = [den for den, symb in NETWORK_DENOMINATORS.items() if symb == denominator]