diff --git a/trezorlib/coins.py b/trezorlib/coins.py index 6737f1a..907c3bc 100644 --- a/trezorlib/coins.py +++ b/trezorlib/coins.py @@ -1,4 +1,4 @@ -from .tx_api import TxApiBitcoin, TxApiTestnet, TxApiLitecoin, TxApiZcash, TxApiDash, TxApiBcash, TxApiDecredTestnet +from .tx_api import TxApiBitcoin, TxApiTestnet, TxApiLitecoin, TxApiZcash, TxApiDash, TxApiBcash, TxApiDecredTestnet, TxApiDogecoin coins_slip44 = { 'Bitcoin': 0, @@ -23,4 +23,5 @@ coins_txapi = { 'Zcash': TxApiZcash, 'Bcash': TxApiBcash, 'Decred Testnet': TxApiDecredTestnet, + 'Dogecoin': TxApiDogecoin, } diff --git a/trezorlib/tx_api.py b/trezorlib/tx_api.py index 8ed6e8e..60d30fd 100644 --- a/trezorlib/tx_api.py +++ b/trezorlib/tx_api.py @@ -158,7 +158,7 @@ class TxApiBlockCypher(TxApi): t.lock_time = data['lock_time'] for vin in data['inputs']: - i = t.inputs.add() + i = t._add_inputs() if 'prev_hash' not in vin: i.prev_hash = b"\0" * 32 i.prev_index = 0xffffffff # signed int -1 @@ -171,7 +171,7 @@ class TxApiBlockCypher(TxApi): i.sequence = vin['sequence'] for vout in data['outputs']: - o = t.bin_outputs.add() + o = t._add_bin_outputs() o.amount = int(str(vout['value']), 10) o.script_pubkey = binascii.unhexlify(vout['script']) @@ -186,4 +186,6 @@ TxApiZcash = TxApiInsight(network='insight_zcash', url='https://zec-bitcore1.tre TxApiBcash = TxApiInsight(network='insight_zcash', url='https://bch-bitcore2.trezor.io/api/') TxApiDecredTestnet = TxApiInsight(network='insight_decred_testnet', url='https://testnet.decred.org/api/') +TxApiDogecoin = TxApiBlockCypher(network='blockcypher_dogecoin', url='http://api.blockcypher.com/v1/doge/main/') + TxApiSegnet = TxApiSmartbit(network='smartbit_segnet', url='https://segnet-api.smartbit.com.au/v1/blockchain/')