Network models3 min read

Bitcoin UTXO Identity: Transaction ID and Output Index

Use Bitcoin outpoints to identify spendable outputs, resolve input references correctly, and avoid treating a transaction ID as a unique holding.

Editorial illustration accompanying bitcoin utxo identity: transaction id and output index.

Overview

When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.

A Bitcoin output is identified by an outpoint: transaction ID plus output index. One transaction can create many outputs, and later inputs spend particular outputs rather than an undifferentiated transaction balance.

Keep the pair together

Store txid and vout as separate typed fields or a documented composite key. Resolve each input’s referenced output to obtain the value and script it spends. A transaction hash without an output index cannot tell which of several outputs is being referenced. Preserve network identity as part of application storage and cache boundaries.

Worked example: two outputs to one wallet

Transaction T creates outputs zero and two that both belong to a wallet. Spending T:0 does not spend T:2. A store keyed only by T can mistakenly remove both holdings. Outpoint-level state keeps the second output available and makes the spending relationship auditable.

Track accepted spend state

Record the creating and spending transactions and their accepted block context. Test duplicate input processing, reorganisations and an output whose historical detail is unavailable. A current UTXO lookup answers whether an output is unspent under that view; it is not a complete historical record of every output the wallet ever controlled.

A practical acceptance test

Create two wallet-owned outputs under one transaction ID and spend only the first. The second must remain unspent. Repeat the spending input delivery and verify no additional decrease. Then displace the spending block under the fixture’s accepted-chain model and restore the appropriate output state while preserving the original observation history.

Questions about the topic

Frequently asked questions

Is a transaction ID a UTXO ID?

Not by itself; the output index is required.

Does spending one output spend all outputs of that transaction?

No. Inputs reference specific outpoints.

Standards & technical documentation

Further reading

{{TODO: author name}}

Practical explanations of blockchain data, software integration and the context behind a record.

About Indexbase
← Back to all articles

Build with better context.

Get an update when private beta opens.

Form setup in progress. Nothing entered here is sent or saved. {{TODO: endpoint}} See the full form and email alternative.