A Bitcoin transaction is the transfer of ownership rights to bitcoins from one user to another.
The same term is also used to describe a record in the blockchain ledger that documents this process. A transaction is broadcast to the network and must be confirmed by other network participants. A mandatory requirement for such a crypto transaction is that both the sender and the recipient have a cryptocurrency wallet and a Bitcoin address. We explained how to create a cryptocurrency wallet here.
Private and Public Keys
To make a transaction in the Bitcoin network, every user must have:
• A private key (also known as a personal, secret, or private key);
• A public key (also known as a Bitcoin address or Bitcoin account).
The private key is required to have the right to control and spend bitcoins. It serves as the password for unlocking a personal cryptocurrency wallet. It is a large number generated by the system.
The public key is generated based on the private key. Therefore, knowing the private key allows you to derive the public key. However, this relationship is one-way: knowing the public key does not make it possible to determine the private key.

This is why it is extremely important for users to securely store their keys, especially the private key. If this information is lost, they will permanently lose access to their cryptocurrency wallet and the funds stored in it. It is impossible to recover a lost or forgotten private key in the Bitcoin network.
IMPORTANT TO REMEMBER:
• The public key (or Bitcoin address) can be shared with other users.
• The private key must be kept strictly confidential. It should be known only to its owner.
Transaction Inputs and Outputs
To record information about transferred funds on the blockchain, the concepts of transaction inputs (IN or INPUTS) and outputs (OUT or OUTPUTS) are used. A transaction input contains the sender's wallet address, as well as confirmation that the owner of the cryptocurrency intends to make the transfer. A transaction output contains the recipient's address, the amount being transferred, and confirmation that the transferred funds are intended specifically for that recipient.
The key rules for processing a transaction are as follows: 1.The total amount of cryptocurrency in the inputs must be greater than or equal to the amount of bitcoins in the outputs. 2.The entire amount contained in the input must be used in full and cannot be spent partially. 3. Any output can be used as an input, but only once.
In the blockchain, all transactions are interconnected and recorded in a shared ledger. Therefore, the input of every new transaction is simultaneously a reference to the output of a previous transaction. Accordingly, the output of a newly created transaction becomes the input for the next transaction, but only once. In other words, the reference specified in a transaction must not have been used previously. If the same reference is duplicated, only the first transaction will remain valid, while the others will not be confirmed by the network.
Let's look at an example of two transactions, A and B.
Transaction A. Suppose David has 50 BTC and wants to send 0.5 BTC to Anahit. David creates a transaction for 0.5 BTC. His IN (INPUT) will contain 50 BTC, and since the rule states that the amount in the input cannot be spent partially, David must use the entire 50 BTC. But how is that possible if he only wants to send 0.5 BTC? Here is the important part: David's wallet automatically creates a separate change address. As a result, 0.5 BTC is sent to Anahit, while the remaining 49.5 BTC is returned to David's wallet as change. So, the first transaction is completed, where the IN is David's 50 BTC, the first OUT is 0.5 BTC sent to Anahit, and the second OUT is 49.5 BTC returned to David as change.
Transaction B. This transaction is made by Anahit. Her address already contains 0.5 BTC received from David, as well as 0.1 BTC received from a stranger and 0.2 BTC received from her sister. Anahit wants to send 0.8 BTC to her employee as salary. A transaction is created in which the IN consists of all three sources (0.5 BTC from David, 0.1 BTC from a stranger, and 0.2 BTC from her sister), while the OUT is 0.8 BTC.
As we can see from this example, the 0.5 BTC output (OUT) from Transaction A became the 0.5 BTC input (IN) in Transaction B. This can happen only once, meaning the following rule applies: "Any output (OUTPUT) can be used as an input (INPUT), but only once."
The same applies to the rule stating that "the total amount of cryptocurrency in the inputs must be greater than or equal to the amount of bitcoins in the outputs." As shown in the example, this rule also works: in Transaction A, the IN of 50 BTC equals the OUT of 50 BTC, while in Transaction B, the IN of 0.8 BTC equals the OUT of 0.8 BTC. So why does the rule say "greater than or equal to"? The answer is simple. In these examples, we did not include the miner fee required to process the transaction. In practice, the INPUT is almost always greater than the OUTPUT, and the difference between them is the transaction fee paid to the miner. We will discuss this in the next section.

The Main Elements of a Transaction
A Bitcoin transaction consists of three main elements:
- The Bitcoin address of the cryptocurrency sender (input — INPUT);
- The Bitcoin address of the cryptocurrency recipient (output — OUTPUT);
- The amount of bitcoins being transferred.
The sender's Bitcoin address is required to determine the source of the funds that the sender has decided to transfer through the network. By knowing the sender's Bitcoin address, anyone can see how many bitcoins are stored in that wallet. Information about the presence and amount of cryptocurrency associated with each address is publicly available. At the same time, the identity of the cryptocurrency owner remains completely anonymous. The recipient's Bitcoin address indicates who obtains the right to control the transferred funds. The personal information of this user also remains completely anonymous.
Now let's look at a real Bitcoin transaction.

On the right-hand side are the INPUTS. Here we can see the sender's two public keys (Bitcoin addresses): 1PqrBnVWNBG7GP6YKiLEpCF8L4RTW3ksDband 1Kj13XtgchqvHTGEAjqe6S11W9eSyd6NRr, along with two amounts. Since the funds were received by the sender's address from two different sources, they are displayed separately: 0.5840243 + 0.0002704 = 0.5842947 BTC
On the left-hand side are the OUTPUTS. Here we can see two public keys (Bitcoin addresses): 1CXrf5zSwR1FVvrsMxGsnpYbadRR1yZEAY and 3yu31uHRkreEFiyumP2QSULb1pAvmMrZz. One of them is the recipient's address, while the other is the sender's change address, where the remaining funds are returned. We do not know which address belongs to the recipient and which one is the change address because the wallet generates a new address for the change instead of returning it to the same address from which the funds were sent. Although some wallets allow this behavior to be changed in the settings, we do not recommend doing so, as generating a new change address helps preserve transaction anonymity. We can see the amounts and the addresses, but determining who owns those addresses is extremely difficult.
0.0001257 + 0.584 = 0.5841257 BTC
In total: INPUTS = 0.5842947 BTC ; OUTPUTS = 0.5841257 BTC. As we can see, the total input amount is greater than the total output amount. So where did the remaining amount go? The difference between these two amounts is the miner fee paid for processing the transaction.
0.5842947 − 0.5841257 = 0.000169 BTC (fee)
How a Transaction Is Made
In simplified form, the process of making a Bitcoin transaction can be described as follows:
- A user who wants to transfer a certain amount of cryptocurrency to another party signs the transaction using their private key (one-time private keys are used for this purpose).
- Using their Bitcoin address (public key), the user sends the prepared transaction request to the network, specifying the recipient's address and the amount to be transferred.
- The transaction information is processed for a period of time by the network's computing nodes. Once processing is complete, the transaction record is added to the blockchain, meaning it has been confirmed. At this stage, the transaction is considered complete, and the cryptocurrency is regarded as belonging to the recipient, who gains full control over it.
To access and spend the funds received in the cryptocurrency wallet, the recipient must use their private key.

At the same time, the following processes take place within the Bitcoin network:
- A transaction is created by one of the users.
- The transaction record is broadcast to all nodes in the network.
- The transaction is verified for validity.
- A block is created (through mining) in which the transaction is recorded.
Until the transaction is included in one of the blockchain's blocks, it has no effect and is considered unconfirmed.
Viewing Transactions on the Blockchain. Transaction Hash
Every day, an enormous number of cryptocurrency transfers are recorded on the blockchain. To locate a specific transaction within the system and obtain all the necessary information about it, you need to know the transaction's hash. A Tx Hash (transaction hash) is a unique identification number consisting of a long combination of letters and numbers. In other words, the hash is the unique identifier of a specific transaction. It is usually generated automatically by the system after the user completes a payment. In most cases, the hash is displayed in the field directly above the payment information. In our previous example, it was: ca731da58729172331db1da51b803094d00c5bc9ef2b8c20f649bc9fa72731ab
A transaction hash may be required in situations where the transfer of funds is delayed, the cryptocurrency has not arrived in the recipient's wallet, or in similar cases. To determine the cause of the issue, the user should check the status of the transaction using dedicated services known as blockchain explorers. To do this, the user needs to open one of the blockchain explorer websites and enter the transaction hash into the designated search field. Based on the entered data, the system will quickly locate the transaction and display complete information about it.

In the next part, we will cover: how to track a transaction, what confirmed and unconfirmed transactions are, what affects the transaction confirmation speed, how to calculate the transaction fee, what to do if a transaction remains unconfirmed for a long time.