destinationExecutions — arbitrary calls that run on the destination chain as part of the intent settlement.
The flow works as follows:
- Encode the vault deposit call
- Build the meta intent with the deposit execution
- Get a quote from Rhinestone
- Fulfill any token requirements
- Sign the intent
- Submit and poll for completion
Encoding the Vault Deposit
- EOA
- Smart Account
For EOAs, destination executions run in an intermediary contract — not in the user’s account context. The requested tokens are automatically swept to the user after execution, but any tokens received as a result of the execution (such as vault shares) are not automatically swept.You must include an explicit
transfer call to send the vault shares back to the user’s address.Since executions run outside the user’s account, you need the second
transfer call to move vault shares to the user. This limitation will be addressed in a future API update with a new field for specifying expected output tokens.Constructing the Meta Intent
- EOA
- Smart Account
Getting a Quote
Submit the meta intent to the/intents/route endpoint to get a quote:
intentOp: the intent operation elements to signintentCost: the cost of the intent in input tokenstokenRequirements: any prerequisite token operations (EOA only)
Getting a Quote
See the full guide for advanced options like sponsorship and source chain filtering
Fulfilling Token Requirements
- EOA
- Smart Account
Before submitting, EOAs must fulfill the token requirements returned in the quote. There are two types:ERC-20 Approvals — approve tokens to the Permit2 contract:ETH Wrapping — wrap native ETH to WETH:
Approvals are only ever to the Permit2 contract. We recommend using max approvals for the best UX. Alternatively, inspect the
tokensSpent field on the intent elements for the exact amount needed.Token Requirements
Full details on fulfilling token requirements
Signing the Intent
- EOA
- Smart Account
EOAs sign each intent element using EIP-712 typed data via Permit2. You need one signature per input chain. The last origin signature doubles as the destination signature.
Signing
See the full signing guide for the
getTypedData implementation and type definitionsSubmitting and Polling
Submit the signed intent to the/intent-operations endpoint: