Creating a Bitcoin Transaction: A Step-by-Step Guide
Alice wants to pay 5 BTC to Bob for a digital item.
To make this payment, she needs to create a Bitcoin transaction using the unspent outputs (UTXOs) in her wallet.
To make this payment, she needs to create a Bitcoin transaction using the unspent outputs (UTXOs) in her wallet.
1. Inputs: Where the Money Comes From
To create a transaction, Alice needs to specify which UTXOs she wants to use as inputs:
- UTXO #1: 4 BTC (from Transaction 1, Output Index 1)
- UTXO #2: 2 BTC (from Transaction 2, Output Index 0)
Together, these UTXOs provide enough funds (4 BTC + 2 BTC = 6 BTC) for the payment and any transaction fees.
Each input must include:
- The Transaction ID
- The Output Index
- A placeholder for the Signature (which will be added when Alice signs the transaction)
2. Outputs: Where the Money Goes
For this transaction, Alice creates two outputs:
- 5 BTC to Bob (the payment amount)
- 0.99 BTC back to Alice (as change, assuming 0.01 BTC transaction fee)
Learn more about:
- Transaction Fees
- Signing Process
- Change Outputs
- And more...