Prerequisites
Before you begin, ensure that you’ve: These are required so any example below runs with a validkit and adapter.
Specify a recipient
Set the recipient with theto parameter. For a same-chain swap, to.chain
defaults to the source chain (from.chain), so you only need to set
to.recipientAddress.
This example swaps 1.00 USDC for EURC on Arc Testnet and sends the EURC to a
different address than the one that signs the swap:
TypeScript
to.recipientAddress sets where the output tokens are sent. It’s different from
config.customFee.recipientAddress, which sets the recipient of a
custom swap fee.