1200wd / bitcoinlib

Bitcoin and other Cryptocurrencies Library for Python. Includes a fully functional wallet, Mnemonic key generation and management and connection with various service providers to receive and send blockchain and transaction information.
http://bitcoinlib.readthedocs.io/
GNU General Public License v3.0
615 stars 204 forks source link

Transaction's Not Sending, Litecoin #277

Closed Catchii69 closed 1 year ago

Catchii69 commented 1 year ago

Code im using

     srv = Service(network=NETWORK)
     pk = w1.wif()
     k = HDKey(pk, network=NETWORK)
     fee = srv.estimatefee(2)
     value = 200000
     addr_to = 'LUm3rxLbwTFNzNrgKZQXNYSCt6ybNNMiCQ'

     utxos = Service(network='litecoin').getutxos(k.address())
     t = Transaction(network='litecoin', fee=fee, witness_type='segwit')
     for utxo in utxos:
         t.add_input(utxo['txid'], utxo['output_n'], value=utxo['value'], witness_type='segwit')
         value += utxo['value']
     t.add_output(value - fee, addr_to)
     t.sign(pk)
     t.verify()
     t.info()
     tx = srv.sendrawtransaction(t.raw)

error log.

2022/12/11 17:33:23 WARNING <module>(67) Could not include fastecdsa library, using slower ecdsa instead. 
2022/12/11 17:33:26 WARNING _provider_execute(213) Aborting, max errors exceeded: ['blockcypher.litecoin', 'blockchair.litecoin', 'litecoreio.litecoin']

t.info() gives out

Transaction d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43
Date: None
Network: litecoin
Version: 1
Witness type: segwit
Status: new
Verified: True
Inputs
Outputs
- LUm3rxLbwTFNzNrgKZQXNYSCt6ybNNMiCQ 0.00199000 LTC p2pkh U
Size: 10
Vsize: 10
Fee: 1000
Confirmations: None
Block: None

help would be appriciated

mccwdev commented 1 year ago

See https://github.com/1200wd/bitcoinlib/issues/275