A decentralized application (dapp) can ask a wallet to approve a transaction, request a template action, or sign a login challenge on BCH. For the 50,000-sat payment, the dapp could propose the amount and recipient while the wallet supplies the funding UTXO and signs.
What each layer owns
- Dapp. Defines the action the user is taking and sends a transaction or template request over a supported connection.
- Wallet app. Manages the user’s keys and outputs, presents the request for approval, and signs the inputs it controls. The selected integration determines who builds and broadcasts the transaction.
- CashVM. Evaluates the spending scripts against the parsed transaction and the UTXOs it spends. A validating node runs this check, and a wallet or dapp can run the same verification locally to preview it.
Choose an integration
Before requesting approval
- Choose the network explicitly. Confirm that the wallet, addresses and funding UTXOs belong to it.
- Request the minimum capabilities needed for the current interaction. Before signing a transaction, look up the UTXOs being spent and inspect the outputs being created, amounts, token categories, change and fee.
- Decide who broadcasts. When the wallet returns signed bytes without broadcasting, decode and verify the result before submitting it to your selected network.
- Treat wallet rejection, timeout, lost connection and approved-but-unconfirmed transactions as separate states. A reconnect or retry does not grant authorization for a different transaction.
Use the transaction lab to practice the transaction lifecycle. The dapp connection reference lists the precise methods, fields and wire identifiers.
An application that uses a decentralized system such as BCH and can ask a wallet to authorize an action or payment.Software or a device that manages addresses and tracks UTXOs, with signing wallets also holding private keys to authorize payments.A Bitcoin Cash record that defines new outputs and, for a payment, identifies the UTXOs being spent.The currency unit of Bitcoin Cash, equal to 100,000,000 satoshis.The smallest unit of BCH, equal to 0.00000001 BCH.The basic unit of spendable value on Bitcoin Cash, holding satoshis and any attached tokens under the spending rules defined by its locking bytecode.A transaction record that identifies a UTXO to spend and supplies its unlocking bytecode and sequence number.The Bitcoin Cash virtual machine that executes the scripts authorizing an input to spend its UTXO.Software that independently verifies blocks and transactions and maintains a view of the active chain and its unspent outputs.A shareable identifier a wallet decodes into a payment’s locking script, usually in CashAddr format on BCH.A 32-byte CashTokens identifier that groups related tokens and defines which fungible units are interchangeable.