VITE_API_BASE_URL.
Base URL
Authentication
The API does not require tokens or sessions. Wallet identity is asserted via a single HTTP header:WalletConnect Transactions
Every write action returns awcTransaction object rather than broadcasting directly. The frontend passes this to the connected wallet (Paytaca, Cashonize) via WalletConnect v2 using bch_signTransaction. After the wallet signs and broadcasts, the frontend calls the corresponding confirm-* endpoint with the resulting txHash.
Common Response Shape
Successful responses always include"success": true at the top level:
"error" and optionally "message":
Lifecycle Pattern
Every on-chain contract follows the same two-step lifecycle:Build
Call the action endpoint (e.g.
POST /api/streams/create). The backend deploys a CashScript contract and returns a wcTransaction for the wallet to sign.Status Values
All covenant resources share the same status lifecycle:| Status | Meaning |
|---|---|
PENDING | Contract deployed, awaiting funding |
ACTIVE | Funded and live on-chain |
PAUSED | Temporarily halted by authority |
CANCELLED | Terminated early, funds returned |
COMPLETED | All obligations fulfilled |

