Bitcoin Forum
December 12, 2017, 07:06:53 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: need explanation of "vout" from listunspent output  (Read 932 times)
shark255
Full Member
***
Offline Offline

Activity: 234



View Profile
April 06, 2015, 01:17:58 PM
 #1

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!

Выкупаю ВТС для своего проекта. Только опт. Предложу лучший процент. Строго через ПМ форума.
1513105613
Hero Member
*
Offline Offline

Posts: 1513105613

View Profile Personal Message (Offline)

Ignore
1513105613
Reply with quote  #2

1513105613
Report to moderator
1513105613
Hero Member
*
Offline Offline

Posts: 1513105613

View Profile Personal Message (Offline)

Ignore
1513105613
Reply with quote  #2

1513105613
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513105613
Hero Member
*
Offline Offline

Posts: 1513105613

View Profile Personal Message (Offline)

Ignore
1513105613
Reply with quote  #2

1513105613
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 2002



View Profile
April 06, 2015, 01:53:29 PM
 #2

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.

shark255
Full Member
***
Offline Offline

Activity: 234



View Profile
April 06, 2015, 02:15:34 PM
 #3

Quote
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 ?

Выкупаю ВТС для своего проекта. Только опт. Предложу лучший процент. Строго через ПМ форума.
DannyHamilton
Legendary
*
Offline Offline

Activity: 2002



View Profile
April 06, 2015, 04:05:45 PM
 #4

Quote
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.


shark255
Full Member
***
Offline Offline

Activity: 234



View Profile
April 08, 2015, 11:05:52 AM
 #5

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

Выкупаю ВТС для своего проекта. Только опт. Предложу лучший процент. Строго через ПМ форума.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!