Follow a 50,000-satoshi payment on Bitcoin Cash, from your receiving address to the block that confirms the payment.
One payment, three amounts
Your wallet receives 100,000 satoshis in one unspent transaction output (UTXO). A satoshi (sat) is one hundred-millionth of a BCH (0.00000001 BCH). When you pay someone, an input identifies the existing UTXO and spends it in full. Your transaction creates two new UTXOs, one for the payment and one for your change.
- Recipient UTXO · Output 050,000 sats
- Change UTXO · Output 149,700 sats
- Fee to miner300 sats
The remaining 300 sats are the transaction fee. The miner who includes the payment in a block can claim it.
All three UTXOs in this example use pay to public key hash (P2PKH), the most common script used for standard payments. Each UTXO has a locking script that commits to the hash of a public key. To spend one later, the wallet provides that public key and a signature made with its private key.
Try a simulated payment
Derive the receiving address, find its funding UTXO, and inspect the signed payment. Then follow CashVM, the engine that runs the spending scripts, as it checks the input.
Derive your receiving address
View the example private key
Start with the private key. Derive its public key, hash it with HASH160, and encode the result as a P2PKH receiving address.
- Compressed public key
- Public-key hash
- Receiving address
Find your funding UTXO
Decode the address to get its locking script. Find the 100,000-sat UTXO that uses that script.
- Outpoint (transaction ID and output index)
- Value
- · Block
- Locking script
Step through CashVM
Select Load CashVM trace to sign the 50,000-sat payment and inspect its bytes. Select a transaction field to highlight it, or step through a script instruction to see how it changes the stack. CashVM adds and removes items from the top of the stack.
- Spending transaction ID
Version and input fields
Unlocking script
Sequence, outputs and locktime
Funding UTXO locking script
Funding UTXO locking script
Signed transaction hex
Stack Top first
Empty
Input valid. The stack holds a single true value.
To broadcast and mine the same payment, open the Transaction Lab in a new tab, leave Mocknet selected, and keep the default recipient, amount, and fee.
Follow the payment through the handbook
Next, derive the receiving address. Then find the UTXO it received, decode the payment bytes, and run the scripts that authorize the spend.
Try it on Chipnet
Choose Chipnet in the lab when you want to send a live test transaction. The lab saves its Chipnet wallet in your browser. Copy its address, request test sats from the Chipnet faucet, and choose Check for funding. Build, sign, and broadcast with the amount available. Follow your transaction from broadcast to confirmation in the Chipnet explorer.
The smallest unit of BCH, equal to 0.00000001 BCH.SHA-256 followed by RIPEMD-160, producing the 20-byte public-key hash used by P2PKH.A shareable identifier a wallet decodes into a payment’s locking script, usually in CashAddr format on BCH.Software or a device that manages addresses and tracks UTXOs, with signing wallets also holding private keys to authorize payments.The basic unit of spendable value on Bitcoin Cash, holding satoshis and any attached tokens under the spending rules defined by its locking bytecode.The currency unit of Bitcoin Cash, equal to 100,000,000 satoshis.A transaction record that identifies a UTXO to spend and supplies its unlocking bytecode and sequence number.A Bitcoin Cash record that defines new outputs and, for a payment, identifies the UTXOs being spent.A new output sent back to your wallet with value left over after the payment and fee.The difference between a transaction’s total input and output values, which the miner can claim in the block’s coinbase.A spending condition that checks a public key against a saved hash and verifies a signature made with the corresponding private key.The program in an output that specifies the conditions required to spend it.A fixed-length digest used to identify data or commit to its contents, such as a transaction ID or public-key hash.A cryptographic value derived from a private key and used to verify its signatures.A value made with a private key that lets someone with the corresponding public key verify authorization of the signed data.A secret cryptographic value used to sign and derive the corresponding public key.The Bitcoin Cash virtual machine that executes the scripts authorizing an input to spend its UTXO.BCH Ninja’s isolated browser chain for building and inspecting transactions using its own keys and UTXOs.A public Bitcoin Cash test chain that uses test coins and bchtest: addresses to exercise upgrades and applications.A transaction has one confirmation when included in a block on the active chain and gains another for each subsequent block.