Beispiel #1
0
    def __init__(self,
                 service='blockr',
                 testnet=False,
                 username='',
                 password='',
                 host='',
                 port=''):
        self.testnet = testnet

        if service not in SERVICES:
            raise Exception("Service '{}' not supported".format(service))
        if service == 'daemon':
            self._service = BitcoinDaemonService(username, password, host,
                                                 port, testnet)
        elif service == 'blockr':
            self._service = BitcoinBlockrService(testnet)
        elif service == 'regtest':
            self.testnet = True
            self._service = RegtestDaemonService(username, password, host,
                                                 port, testnet)

        self._min_tx_fee = self._service._min_transaction_fee
        self._dust = self._service._min_dust