2

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?

2
  • 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
    Commented Jul 16, 2016 at 4:52
  • 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
    Commented Jul 17, 2016 at 2:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.