encodedRoute from the quote, poll for fulfillment.
For the full OpenAPI surface, see the API Reference.
0. Prerequisites
- Source-chain RPC and a funded wallet
- HTTP client (curl, fetch, axios)
- Web3 library (viem, ethers)
dAppID in the request body for attribution.
1. Get a quote
The V3 quote API returns the best quote ready for onchain execution. It returns theencodedRoute you’ll pass straight to the Portal — you don’t construct the intent struct yourself.
| Endpoint | Use for |
|---|---|
POST /api/v3/quotes/single | Best single quote, ready for execution |
POST /api/v3/quotes/exactIn | Specify input amount, get multiple competing quotes |
POST /api/v3/quotes/exactOut | Specify output amount, get quotes for required input |
2. Approve the reward token
Standard ERC-20 approve tocontracts.sourcePortal for the reward amount (quoteResponse.sourceAmount).
3. Publish and fund
Build the reward struct from the quote and callpublishAndFund on the source Portal.
4. Track fulfillment
5. Refunds (if expired)
If the intent expires unfulfilled, callrefund(routeHash, reward) on the source Portal to reclaim the reward tokens. Refunds are also driven by an independent permissionless service.
Custom intents with destination calls
If you need arbitrary contract calls on the destination chain (bridge AND deposit, for example), build the intent’sroute.calls array yourself and call publishAndFund with a hand-built route — see Destination calls.
Read next
API Reference
Every REST endpoint, request/response shapes.
Portal contract
The contract you’re calling.
Recipes
End-to-end task guides.
