A
A
AlexSearcher2020-06-18 10:03:15
bitcoin
AlexSearcher, 2020-06-18 10:03:15

How to connect vout & vin in bitcoin transactions?

Hello.

We need to connect the outputs and inputs from two bitcoin transactions. A little confused. Questions:
- in the transaction data, in the vin list there is a vout (int) and txid field; I understand correctly that this is a link to the vout transaction from the txid transaction?
- if yes, then why sometimes there are rather large values ​​in vout - like 47 or 138? (in the transactions that are specified there is no such number of vouts)
- vout can only go to one vin, right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Leonov, 2020-06-18
@AlexSearcher

It all depends where you are looking. If in bitcoin core, then there you can see something like this:

"vin": [
    {
      "txid": "9d5d817f9f8f6952962d967edfc95e9cf0c72f4cb91a6caca03e4efc70cd4342",
      "vout": 1,
      "scriptSig": {
        "asm": "304402200e6dd02b0988009646b4ea58f7d9d229a10451eb3fbce1cd5b4c157fe4177bce02207647eceeaf816d46719336712621d8c102b3c9b8ebc470dfc288cc85f7c15d0e[ALL] 02de13cfbf101a1e90fc0d3450ee56d9fa3a31da611161f96b73553de1dd6aa9fb",
        "hex": "47304402200e6dd02b0988009646b4ea58f7d9d229a10451eb3fbce1cd5b4c157fe4177bce02207647eceeaf816d46719336712621d8c102b3c9b8ebc470dfc288cc85f7c15d0e012102de13cfbf101a1e90fc0d3450ee56d9fa3a31da611161f96b73553de1dd6aa9fb"
      },
      "sequence": 4294967295
    }
  ],

where txid is a reference to a transaction with an unused output. vout number of this output in that transaction

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question