Author

Topic: need explanation of "vout" from listunspent output (Read 1102 times)

full member
Activity: 224
Merit: 100
Thanks mate. You really helped me. I did not find your bitcoin address in profile - you can send me PM, I'll send you some tips  Smiley
legendary
Activity: 3472
Merit: 4801
Second question - to use "vout" in createrawtransaction I should use the same value as I found in listunspent ?

If that's the output that you want to spend.


Why this vout cant be extracted from txid in createrawtransaction command?

Because an transaction (identified with the txid) can have multiple outputs.  If you don't specify which output you intend to spend, then the transaction can't be built.

I have in listunpsent vout with "33", and what if I put 0 instead of 33 in createrawtransaction ?

Then you would be attempting to spend the first output from the transaction instead of the 34th output.  If you don't have the private key that is associated with the address that the first output used, then you won't be able to sign the transaction and therefore won't be able to transmit a valid transaction.

full member
Activity: 224
Merit: 100
Second question - to use "vout" in createrawtransaction I should use the same value as I found in listunspent ?

If that's the output that you want to spend.


Why this vout cant be extracted from txid in createrawtransaction command ?

I have in listunpsent vout with "33", and what if I put 0 instead of 33 in createrawtransaction ?
legendary
Activity: 3472
Merit: 4801
After running bitcoin-cli listunspent

I see list of something like this :
- snip -
First question is what does "vout" mean ?

It identifies a specific output from a transaction (transactions can have multiple outputs).

The first output is vout: 0
The second output is vout: 1
The third output is vout: 2
The fourth output is vout: 3

and so on...

Second question - to use "vout" in createrawtransaction I should use the same value as I found in listunspent ?

If that's the output that you want to spend.
full member
Activity: 224
Merit: 100
After running bitcoin-cli listunspent

I see list of something like this :

Quote
    {
        "txid" : "6d5c27365f40d3628f9794f28b7bb690bd66ea730e736a167c78b256...",
        "vout" : 0,
        "address" : "1JtmTYwKoQDGsdp6chuEN8ta2..",
        "scriptPubKey" : "76a914c44476bf0a3128b50258c95289ee79..",
        "amount" : 0.05000000,
        "confirmations" : 1,
        "spendable" : true
    }
    {
        "txid" : "423faf7016695d81ec301b65548394828144499656e7d....",
        "vout" : 940,
        "address" : "17u3RBnKPXivBfvNVTpaCmBJGXwpb....",
        "scriptPubKey" : "76a9144ba866feb56c2bb2f0a24f0d184316524e....",
        "amount" : 0.74859980,
        "confirmations" : 4,
        "spendable" : true
    }


First question is what does "vout" mean ?

Second question - to use "vout" in createrawtransaction I should use the same value as I found in listunspent ?

Many thanks for help!
Jump to: