
What Is a TXID? Its Role, Common Misunderstandings, and Design Tips in BSV
A TXID is the most common transaction identifier in BSV. It can be used to look up transactions, reference outputs, store business records, and build SPV proof flows. But a TXID identifies the whole transaction, not a specific output, and it does not mean the transaction is final. Real applications should store it together with the output index, status, raw transaction, and proof materials.
Ethan Lin
technical_editor
TXID is one of the most common on-chain identifiers in BSV development. It helps you look up transactions, reference outputs from previous transactions, store business records, and participate in SPV proof flows.
However, a TXID is only a transaction-level identifier. It is not the same as an output, and it is not final proof of a business state. In real applications, a TXID is usually the entry point for locating something on-chain—not the whole record.
What Is a TXID?
A TXID is the unique identifier of a transaction. It is typically derived by hashing the serialized transaction data.
Inside a program, a transaction may appear as a structured object with fields such as:
versioninputsoutputslocktime
But the network processes serialized bytes. A TXID is usually the result of applying double SHA-256 to the serialized transaction data.
A simplified view is:
Therefore, if a change to the transaction affects the serialized result, the TXID will usually change as well.
Where TXIDs Are Used in BSV Development
In BSV application development, TXIDs have several core uses.
1. Looking Up Transactions in a Block Explorer
After creating a transaction, you can use its TXID to view transaction details in a block explorer. For example, developers commonly use WhatsOnChain to look up BSV transactions, blocks, and address-related information.
2. Referencing Previous Outputs in Inputs
If transaction B wants to spend an output from transaction A, an input in transaction B must reference both the TXID of transaction A and the corresponding output index.
In other words, an input does not merely point to “the previous transaction.” It must point to a specific output within that previous transaction.
3. Storing On-Chain Records in Business Systems
If an application writes certificates, file hashes, or payment records to BSV, the business database will usually store the TXID. The TXID acts as an entry point for later tracing the on-chain transaction.
For example, after a file timestamping or notarization application creates an OP_RETURN transaction, it can store the TXID for future lookup of that on-chain record.
4. Supporting SPV Proof Flows
In an SPV scenario, a Merkle proof connects a transaction ID to the Merkle root of a block. The TXID is one of the basic identifiers in that proof path.
For SPV validation examples, see the official BSV documentation: SPV validation examples.
A TXID Is Not an Output
This is one of the easiest points for beginners to confuse: a TXID identifies an entire transaction, not a single output.
A transaction can contain multiple outputs, for example:
If you need to reference a UTXO, saving only the TXID is not enough. You must also save the output index, often called vout or index.
A complete reference is:
This combination is also called an outpoint.
Therefore, in wallets, payment systems, UTXO management, or contract-style applications, storing only the TXID is often insufficient. Without the output index, you cannot accurately locate the specific spendable output.
For more background on transaction inputs and outputs, see the BSV documentation: Transaction Inputs and Outputs.
A TXID Is Not the Complete Business State
A TXID is important, but it is not the entire business state.
Suppose you are building a file notarization application. After a user uploads a file hash, the system creates an OP_RETURN transaction and stores the TXID. That TXID can help you find the transaction on-chain, but it does not by itself form a complete evidence package.
Depending on the application requirements, you may also need to store:
- raw transaction data
- output index
- block height
- confirmation status
- Merkle proof
- block header reference
- file hash
- publisher signature
In other words, the TXID is an entry point, not a complete proof. A business system needs to combine transaction data, proof materials, and business object information to create a traceable and verifiable state record.
TXIDs and Unconfirmed Transactions
When you construct a transaction locally, you can usually calculate its TXID immediately. But that does not mean the transaction has entered the network, been accepted by a miner, or been written into a block.
A transaction lifecycle may look like this:
Therefore, an application should not mark every business state as final just because “there is already a TXID.”
A safer approach is to handle state in layers, for example:
- constructed locally
- broadcast
- accepted
- included in a block
- proof obtained
The exact status fields can be designed according to business complexity, but the principle is the same: a TXID is not a final completion state.
TXIDs and Endianness: A Common Pitfall When Debugging Raw Transactions
When debugging raw transactions, endianness is a frequent source of confusion.
The order in which a TXID is displayed in a block explorer may appear to be the reverse of the byte order used when the same TXID is referenced as an outpoint inside a raw transaction. This is a very common issue in low-level Bitcoin/BSV debugging.
The practical recommendation is: do not manually concatenate TXID strings based on intuition. Most applications should use mature SDKs to handle transaction serialization and outpoint encoding.
You only need to handle endianness directly when doing low-level parsing, debugging raw transactions, or implementing protocol-related logic.
TXID Design Recommendations for BSV Applications
In BSV applications, it is better to treat the TXID as part of the on-chain location information, not as the only status field.
A more robust design should store at least:
txidoutput indexnetworkcreated_atstatusraw transactionor a recoverable sourceproofstatus- business object ID
If the application needs to support SPV, it should also store BUMP, BEEF, or related proof materials.
This design allows the business system to quickly locate on-chain transactions through the TXID while retaining enough context and proof materials for later verification.
Common Misunderstandings for Beginners
To summarize, here are several common misconceptions:
- A TXID is not an address.
- A TXID identifies a transaction, not a single output.
- Calculating a TXID locally does not mean the transaction is already on-chain.
- A TXID is not a complete SPV proof.
- When debugging raw transactions, TXID byte order can be confusing.
- Storing only the TXID is often not enough for business systems.
The key to understanding TXIDs is to view them within the broader flow of transactions, UTXOs, proofs, and business states. A TXID is a basic identifier for locating an on-chain transaction, but it is not the only answer to every problem.
References
Recommended articles
BlockchainMay 26, 2026
One Address Can Have Many UTXOs: Understanding Addresses, Balances, and Transaction Construction in BSV
In BSV’s UTXO model, an address is not an account or a single balance slot. The same address can be associated with multiple UTXOs, and a wallet balance is simply the sum of those outputs. Understanding this is essential for transaction construction, fee handling, UTXO fragmentation, and privacy.
BlockchainMay 26, 2026
In BSV, Spending Means Consuming Old UTXOs and Creating New Ones
In BSV, spending does not update a balance. It consumes old UTXOs and creates new ones. Understanding this model helps explain payments, change, transaction chains, and the basic logic behind tokens and application state transitions.
BlockchainMay 26, 2026
What Is a UTXO? Understanding the Foundation of the BSV Transaction Model
A UTXO, or “unspent transaction output,” is the basic unit of the BSV transaction model. A wallet balance is not an on-chain account field, but the sum of controllable UTXOs. Understanding UTXOs helps explain BSV inputs, outputs, change, fees, double-spending, Script, and parallel processing.