How does one reference an unspent transaction output?

2

In a bitcoin transaction the previous unspent transaction outputs are referenced.

How are these referenced?

Do outputs have unique reference or maybe as

unique transaction reference X output recipient's address (its public key)

croraf

Posted 2017-10-30T20:44:31.270

Reputation: 1 112

Answers

5

Each transaction output is uniquely identified by an outpoint. Outpoints consist of

  • txid: The unique transaction ID of the transaction that created the output. The txid is the 32-byte sha256d hash of the transaction.
  • index: The output index (vout) that marks the position of the output in that transaction. The output index starts counting at zero and is a 4-byte unsigned integer.

As an arbitrarily picked example, the outpoint

e06a3193c6ac49b8dd862baf9bd3561ffe86d65b6e8a9e73ebe1dc91e3ca2978:1

refers to the second output of the transaction e06a3193c6ac49b8dd862baf9bd3561ffe86d65b6e8a9e73ebe1dc91e3ca2978 worth 0.001 BTC which was sent to address 1La27vpuDDr9NR1aZ6GpxoJyNYmHT62nRb.

Murch

Posted 2017-10-30T20:44:31.270

Reputation: 41 609

First time I heard the word "outpoint". Is it widely used term?sanket1729 2017-10-31T04:56:36.330

@sanket1729: It has been around at least since 2011, see e.g. https://bitcoin.stackexchange.com/a/2359/5406

Murch 2017-10-31T08:54:05.207