A Bitcoin payment can return part of its input value to your own wallet. That return output is called change. If a transaction sends the correct amount to the recipient but redirects the change elsewhere, checking the recipient alone will miss the loss.
Rockpile’s native Bitcoin payment validator checks the entire approved transaction: the outputs being spent, the recipient, the change, and the fee. This article describes that ordinary-payment validation path, rather than every possible Bitcoin script or transaction format.
Account for every output
Bitcoin spends previously created outputs, commonly called UTXOs: unspent transaction outputs. A transaction consumes selected outputs and creates new ones. The fee is the total input value minus the total output value. The Bitcoin developer guide explains this model.
For example, consider an input worth 100,000 satoshis. A payment might assign 60,000 satoshis to the recipient, 39,000 to change, and 1,000 to the fee. Every satoshi must be accounted for. A label saying “change” does not establish that the 39,000-satoshi output belongs to you.
The validator compares the transaction with approval terms held in protected native records. It checks the selected network and exact transaction, rather than accepting a caller’s description of what the transaction is supposed to do.
Establish which inputs belong to the wallet
An input identifies a previous transaction and one of its outputs. To check its amount and ownership, the signer needs reliable information about that previous output.
Rockpile requires the full previous transaction for each input in this path. It compares the supplied signing data with the wallet’s stored transaction graph—the records connecting previous payments and their outputs—and derives the expected signing metadata from the account’s trusted policy. A claimed amount or an interface-supplied ownership label is insufficient.
This matters because misleading input values can hide an excessive fee. Incorrect derivation metadata can also direct a signer toward the wrong account or signing policy. The validator reconstructs the expected metadata rather than treating the contents of a signing package as authoritative.
The wallet’s chain view remains a separate dependency. Matching a stored transaction does not by itself prove fresh confirmation or that an output is still available on the canonical chain.
Verify change from the wallet’s own policy
A Bitcoin descriptor defines how an account derives addresses and the conditions for spending their funds. Rockpile uses the account’s trusted descriptor to identify its internal change branch: the sequence of addresses reserved for returning value to the wallet.
An output presented as change must satisfy that ownership check. It cannot become wallet-owned simply because a transaction builder names it “change.” The recipient and amount must also match the protected approval. In the 100,000-satoshi example, redirecting the 39,000-satoshi change output fails this check even if the recipient still receives the approved 60,000.
Protected payment approval
↓
Check inputs and previous outputs
↓
Verify recipient and owned change
↓
Check fee and signing policy
↓
Authorize the unchanged payment
The ordinary path deliberately supports a restricted transaction shape. Unsupported scripts or signing metadata are rejected instead of being passed through under an incomplete review.
Reserve inputs for the pending payment
Two local payment requests can compete for the same output. The native payment controller keeps durable reservations, and the validator requires the transaction’s input set to match those reservations exactly. Duplicate inputs are rejected.
Reservations coordinate the wallet’s own work; they do not lock coins on the blockchain. Another copy of the wallet could spend an output, or the chain view could change. Ordinary validation therefore also checks whether the selected inputs remain unspent in the current wallet view.
Retaining payment state across restarts helps the app distinguish an unresolved operation from a new request. A restart must not make a pending payment’s inputs appear freely available merely because an in-memory list was lost.
Check the signature’s scope and the fee
Bitcoin supports signature modes that commit to different parts of a transaction. This validator accepts only the supported modes that commit to the complete payment: ALL, or DEFAULT for Taproot. It checks the accompanying signing metadata as well. The intent is to sign the approved payment, including its outputs, rather than allow an unexpected mode to leave part of it changeable.
The validator recomputes the fee from the inputs and outputs and compares it with the approved fee. The native signing path also checks the fee rate against the finalized transaction’s virtual size before returning the signed payment. A fee ceiling rejects an excessive request; it does not establish an optimal fee or guarantee confirmation speed.
Tests cover substituted previous outputs, modified change, mismatched approval terms, reservation mismatches, and signing metadata. These are implementation checks. Complete release assurance also requires recovery, synchronization, interrupted delivery, and signed-platform exercises for the shipping build.
Bitcoin’s input-and-change model makes the details of validation different from Solana’s. The underlying requirement is the same: the signature must authorize the payment you reviewed. See transaction review and recovery design for the boundaries around that decision.