How can I specify multiple txids in createrawtransaction function?

0

I saw we can specify multiple txids, but I've never seen such a case. So I wanna make it sure. Thanks

西田龍

Posted 2018-03-08T11:15:47.837

Reputation: 59

Can you explain a bit more in detail? Or provide the. Example that you have seen? Do you want to use several inputs to be sent to a single output address?pebwindkraft 2018-03-08T11:44:53.133

Yeah exactly I want to use several inputs for an output.西田龍 2018-03-08T16:48:36.020

Adam provided the answer already :-)pebwindkraft 2018-03-08T20:00:47.687

I see I thought that it was the way of multi payment西田龍 2018-03-08T22:21:51.823

Answers

1

Send the command as following:

bitcoin-cli createrawtransaction 
[{"txid":"FIRST_INPUT_TXID","vout":2},    
{"txid":"SECOND_INPUT_TXID", "vout":3}]
{"FIRST_OUTPUT_ADDRESS":0.006, "SECOND_OUTPUT_ADDRESS":0.004}

if it didn't work try to skip quotation (") by adding backslash before it \"

Adam

Posted 2018-03-08T11:15:47.837

Reputation: 3 215