Let's say I have a wallet that in total received 1 bitcoin over 10 transactions of 0.1 bitcoin each. If I want to send 0.5 bitcoin to another address, will it work having only one input with one prev_out value, even though the TX referenced there only had a value of 0.1 btc? If that will not work, how do I need to make the transaction such that it will work?
1 Answer
If I want to send 0.5 bitcoin to another address, will it work having only one input with one prev_out value
No, it will not work with just 1 input.
If that will not work, how do I need to make the transaction such that it will work?
You will need to create a transaction that uses 5 inputs of 0.1 to create a total of 0.5 bitcoin.
-
-
1yes, every input needs: previous transaction ID, v_out (output position from previous transaction), and value. The previous transaction will likely be different but it doesn't have to be different either, for example the outputs could have been all created in the same previous transaction, and in that case only your v_outs would be different. Mar 7 at 21:08