Skip to content
Developer Handbook

Dapp connection protocols

On this page

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.

CashVM validation flow

Choose an integration

IntegrationUse it for
WizardConnectConnect an HD wallet and derive public keys for named paths. The app provides a pairing URI, the proposed transaction and the input derivation paths.
WalletConnect for BCHRequest addresses or signatures from a compatible wallet. The app provides a BCH session proposal and requests an approved method on the chosen chain.
CashConnectAsk a wallet to execute a named action such as sending 25 loyalty points. The app supplies the template that defines the action and the values for this request.
XO StackCoordinate a transaction among participants. A shared invitation records who still needs to provide a value, an input, or a signature.
CashAccounts v2Resolve an on-chain identity for payments and sign-in. The app supplies an account identifier or a CashID challenge.

Before requesting approval

  1. Choose the network explicitly. Confirm that the wallet, addresses and funding UTXOs belong to it.
  2. 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.
  3. Decide who broadcasts. When the wallet returns signed bytes without broadcasting, decode and verify the result before submitting it to your selected network.
  4. 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.