def __init__(self, testnet=False, service='blockr', username='',
                 password='', host='', port='', fee=None, token=None):
        """
        Args:
            testnet (bool): Whether to use the mainnet or testnet.
                Defaults to the mainnet (:const:`False`).
            service (str): Bitcoin communication interface: ``'blockr'``,
                ``'daemon'``, or ``'regtest'``. ``'blockr'`` refers to the
                public api, whereas ``'daemon'`` and ``'regtest'`` refer
                to the jsonrpc inteface. Defaults to ``'blockr'``.
            username (str): username for jsonrpc communications
            password (str): password for jsonrpc communications
            hostname (str): hostname of the bitcoin node when using jsonrpc
            port (str): port number of the bitcoin node when using jsonrpc
            fee (int): transaction fee
            token (int): token

        """
        self.testnet = testnet
        self._netcode = 'XTN' if testnet else 'BTC'
        self._t = Transactions(service=service, testnet=testnet, username=username,
                               password=password, host=host, port=port)
        # simple cache for spent outputs. Useful so that rapid firing transactions don't use the same outputs
        self._spents = Queue(maxsize=self.SPENTS_QUEUE_MAXSIZE)
        self.fee = fee or self.FEE
        self.token = token or self.TOKEN
def __init__ ( self , testnet = False , service = 'blockr' , username = '' , password = '' , host = '' , port = '' , fee = None , token = None ) : self . testnet = testnet self . _netcode = 'XTN' if testnet else 'BTC' self . _t = Transactions ( service = service , testnet = testnet , username = username , password = password , host = host , port = port ) self . _spents = Queue ( maxsize = self . SPENTS_QUEUE_MAXSIZE ) self . fee = fee or self . FEE self . token = token or self . TOKEN
Args:
            testnet (bool): Whether to use the mainnet or testnet.
                Defaults to the mainnet (:const:`False`).
            service (str): Bitcoin communication interface: ``'blockr'``,
                ``'daemon'``, or ``'regtest'``. ``'blockr'`` refers to the
                public api, whereas ``'daemon'`` and ``'regtest'`` refer
                to the jsonrpc inteface. Defaults to ``'blockr'``.
            username (str): username for jsonrpc communications
            password (str): password for jsonrpc communications
            hostname (str): hostname of the bitcoin node when using jsonrpc
            port (str): port number of the bitcoin node when using jsonrpc
            fee (int): transaction fee
            token (int): token