Closed tajelp closed 5 months ago
Hi @tajelp
I do not support or updated this library for years. It was a spin-off of my python-bitcoin-utils library. The examples should work, although they are using bitcoin testnet addresses. If you use their respective litecoin address they should work.
I remember litecoin added some new addresses that are not support.
I would suggest you try to make it work only with legacy addresses first and then move on to the rest (don't do all of they at once).
The following example spends a P2PKH and sends the funds to another P2PKH. Study it, update with appropriate litecoin addresses / UTXOs and try to make it run, etc.
https://github.com/karask/python-litecoin-utils/blob/master/examples/p2pkh_transaction.py
I hope the above helps!
Hello there, I looked at the examples but it's still not very clear to me how to generate the code for these 3 scenarios:
I am trying to create a function with this signature
create_litecoin_tx(sender_address, sender_pkey, dest_address, inputs, outputs, values_by_vout)
.The function will return
(signed_tx_hex, error)
.The params are:
sender_address
is the sender address (string)sender_pkey
is the sender private key (string)dest_address
is the dest address (string)inputs
is something like this:outputs
is something like this:values_by_vout
is a dict vout: lit. In this case we are spending 0.52 and using 0.52-0.518 as feeCan you please help me create a working function? This is what I have come up with so far: