Skip to main content
Spend a token that is not already the destination collateral on the deposit chain. The execution API quotes Relay with the user’s Safe as the recipient. The connected wallet signs the steps. Relay delivers the collateral. This method waits for that transfer and registers it with logDeposit. sendDeposit calls this when spendToken is not the destination collateral. Call sendSwapDeposit when the integration already has the origin token contract, the origin chain, and the collateral to receive. Credit uses the verified collateral transfer into the Safe. A Relay refund or failure throws and does not register a deposit. Same-chain native ETH into WETH is rejected. That pair wraps in the wallet via sendDeposit. To review the quote without signing, call quoteSwapDeposit or quoteDeposit. Pass the returned orderId back to sendSwapDeposit to sign that order. Origin chains other than Ethereum, Base, and Arbitrum need an EIP-1193 wallet that can sign on the origin chain. A private-key signer can spend from Ethereum, Base, and Arbitrum.

Signature

destinationAsset is the collateral Relay should deliver, for example USDC, WETH, EURC, or cbBTC. The server resolves the contract. A missing route is an error. slippageBps is the max slippage tolerance in basis points. Omit it to use the server default of 200. The maximum is 500. It is stored when the funding order is created. Passing orderId signs that stored order and ignores a new slippageBps.

Example

sent.route is "swap". sent.txHash is the collateral transfer into the Safe, not the origin transaction. sent.orderId is the funding order. getSwapDeposit(orderId) returns that order, including depositId once registration exists.