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
    Jul 16 '16 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
    Jul 17 '16 at 2:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.