vout value in createrawtransaction

2

1

I have been following the Bitcoin Core tutorial on creating a simple raw transaction from an offline computer using the CLI.

The part on createrawtransaction indicates that the raw transaction should have a vout value:

The output index number (vout) of the outpoint; the first output in a transaction is index 0

Therefore, if there is only one outpoint, its vout value should be 0.

However, createrawtransaction only works with vout=1, even though I have only one txid in the command - what am I missing here?

Adam Matan

Posted 2016-07-16T01:41:29.397

Reputation: 547

Can you post the transaction id of the output you are trying to use to create the transaction? If the unspent output has a vout=0, it should work just fine with createrawtransaction '[{"txid":"6aeSomeTxId", "vout":0}]' '{"1SomeOtherAddress":0.01,"1changeAddress":0.05}'m1xolyd1an 2016-07-16T04:52:31.553

Are you using the vout of the transaction you're spending or the transaction you're creating? It should be the vout of the outpoint you're spending.Nick ODell 2016-07-17T02:58:01.097

No answers