Blockchain is a public ledger of transactions that contains all the information about a cryptocurrency since its launch. To find and view fragments of interest in this huge database, special cryptographic codes are used, including a transaction identifier.
Transaction ID: what is it?
Transaction ID (TxID) is a unique code consisting of a specific sequence of letters and numbers. It is assigned to each transaction on the blockchain and is its hash - a unique value that is generated using a cryptographic algorithm based on the information contained in the transaction. The resulting hash is used to identify and ensure the security of payments on the blockchain.
Why is TxID needed?
Using TxID, each new transaction is associated with the previous one. This helps ensure that transactions are in the correct order and that they have not been altered or tampered with.
Hash values also allow you to secure wallets and other systems with confidential information. In addition, they help protect user data from unauthorized access.
Conditions for creating TxID
Each cryptocurrency wallet has a certain set of functions, including the ability to automatically generate TxID. When a user makes a cryptocurrency transfer, they sign it with a private key and a unique identifier is assigned to the transaction. This TxID can be tracked on the blockchain immediately after the transfer is sent from the wallet.
Next, the transaction must pass verification and receive confirmation from network nodes (miners). As a result, her TxID is added to the block and stored in the public registry. After this, the data cannot be changed.
Thus, a transaction ID is created the moment the user submits it, and even before confirmation is received on the blockchain.
Sometimes network nodes may reject transfers for various reasons - due to low fees, insufficient balance at the sender, network congestion, etc. In these cases, the TxID generated in the wallet will not be used and will not be associated with any transaction in blockchain. Then it will become invalid and disappear from the public register.
The user can re-create the translation with corrected data, then he will receive a new unique identifier. This transaction will be sent to the network for verification in the same way and can be tracked using the new TxID.
TxID creation process
A hash value (or hash) is calculated using a hash function. It is a mathematical algorithm that transforms arbitrary input text (such as transaction data) into a unique fixed-length hash output. A hash function is usually one-way, meaning the hash code cannot be used to reconstruct the original data.
Each cryptocurrency network has its own hashing method. For example, Bitcoin uses the SHA-256 algorithm (Secure Hash Algorithm 256-bit). It takes as input the data that needs to be hashed and returns a 256-bit hash value of 64 characters, approximately in the following format:
0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098
This process can be represented in the following steps:
The hash function receives input data - transaction information.
From this data, the hash function generates a unique hash code - a set of characters of a fixed length (256 bits in Bitcoin).
The resulting hash code is stored in the blockchain, where it becomes part of a unique block chain.
On the next transfer, the hash value of the previous transaction is used to create a new hash that will become part of a new block in the chain.
Thus, the hash value plays an important role in ensuring the security of the cryptocurrency network, because any changes in the transaction data require a change in the corresponding hash value, and this will immediately lead to the rejection of the transaction.
How a transaction is created
A cryptocurrency transaction is the process of transferring coins from one account to another. It contains information about the payment amount, sender and recipient addresses, as well as other data that may vary depending on the blockchain.
For example, the Bitcoin network uses three types of data to create a hash value:
transaction inputs;
transaction outputs;
signature.
The entire blockchain is a sequential combination of this information. Without them, it is impossible to send cryptocurrency.
Transaction inputs
Inputs are coins that are received from incoming transactions and have not yet been used in outgoing ones, that is, they are in the account.
When creating a new payment, the sender selects the wallet entry that he wants to use for the current transaction. Thus, the input is a link to the previous transaction from which the cryptocurrency will be transferred again.
This link contains the following information:
the output ID, which is now used as an input;
sender's address;
recipient address;
sum.
When creating a new payment, the sender can specify one or more inputs. For example, if your wallet has two inputs - 3 and 4 BTC, you can use both to transfer 7 BTC to a new address.
Transaction outputs
Outputs display information about coins that were used for external transfers. Each output contains the following information:
a link to the entry from which it was created;
about which addresses the cryptocurrency will be sent to;
about the transfer amount.
In this case, the sender can split the inputs into parts. For example, from an input of 10 BTC you can create an output of 3 BTC. The remaining amount of 7 BTC is unspent transaction outputs (UTXO). The sender can also transfer cryptocurrency to multiple addresses at the same time.
Signature
When a user submits a transaction, they use their private key to create a digital signature, which is then verified against their public key. If the signature matches the key, the transaction is confirmed and sent to the blockchain. This ensures security and protection against fraud, since only the owner of the private key can create the correct signature
Thus, transaction information is at the core of blockchain security.
The principle of constructing a chain of inputs and outputs
For example, we can consider the process of interaction between three accounts A, B and C, which transfer coin X among themselves.
If account holder A wants to create a transaction (T1), he must specify:
recipient (for example, account B);
number of coins (for example, 1X).
This information is encrypted and stored in the T1 transaction ID.
At the time of sending, such a translation receives the following properties:
becomes an exit from account A - a continuation of previous receipts;
becomes an entry into B's account.
As long as the 1X coin remains in account B, transaction T1 is considered an entry.
Similarly, if the owner of account B wants to transfer 1X to account C, he must indicate (T2):
recipient - account C;
number of coins - 1X.
At the time of sending, the T2 transfer receives the following properties:
becomes an exit from account B - a continuation of transaction T1;
becomes an input to C's account.
As long as the 1X coin remains in account C, transaction T2 is considered an entry.
How can you use a transaction ID?
Users can manually apply the ID for other purposes. For example, using TxID, counterparties can control transfers:
the sender can verify that his payment has successfully entered the blockchain;
the recipient can verify that the transfer was sent to his account.
In addition, TxID allows you to view additional information:
amount;
currency (coin or token);
status: completed, incomplete, pending, in progress, etc.;
block number in which the transaction is saved;
time of transfer;
commission, etc.
The completeness and format of this information depends on the blockchain and the service used for verification.
There are different browsers for different blockchains:
Bitcoin — blockchain.info;
Ethereum — etherscan.io;
BNB — bscscan.com;
TRON — tronscan.org;
Polkadot — explorer.polkascan.io.
The public register is available for everyone to view, but its volume is huge. For example, the BNB blockchain processes more than 5 million transactions per day. To find the required fragment in this data array, you need the appropriate cryptographic code. You can search for information not only by identifier, but also by address, block, token, etc.
Only cryptographic information can be viewed. No one knows who sent the payment to whom and why - this simultaneously ensures the publicity of the network and the anonymity of users.

