How can you sign multiple inputs originating from various addresses?
Closed this issue · 4 comments
dinno-invis1ble commented
Hello,
Is there a method to sign multiple inputs that come from different addresses? I couldn't locate this information in the documentation.
Thank you in advance.
merc1er commented
If you build a transaction, that should give you a signed transaction with multiple unspents.
from bitcash import Key
key = Key("...")
outputs = [("bitcoincash:qq2j4wmn285l38jem8ftfxnrv4ea5ljzrg6j37gmuj", 2000, "satoshi")]
unspents = key.get_unspents()
key.create_transaction(outputs, unspents=unspents)
# Returns: 0100000002bef932533cxxx0000
Does that answer the question?
dinno-invis1ble commented
What I'm trying to understand is how to consolidate funds from #address1 and #address2 in a single transaction. I've prepared the unspents, but how do I sign the transaction using both private keys?
merc1er commented
Sadly BitCash does not support HD wallets. So you can only send funds from a single address.
dinno-invis1ble commented
Thank you for assistance! 😄