For the complete documentation index, see llms.txt. This page is also available as Markdown.

Wallet Deposit

Key: walletDeposit · Deposit method: dex_swap

The wallet-deposit flow lets a crypto-native user fund straight from their own wallet, with tokens they already hold on any supported chain. Swapper finds the best route, swaps, and bridges as needed to deliver your destination token.

What the user experiences

  1. Chooses Wallet Deposit.

  2. Connects a wallet — or, if your app already passed one via wallet, reuses that connection with no extra step.

  3. Picks a source chain and token they hold, and an amount.

  4. Reviews the quote — estimated output, minimum after slippage, and fees.

  5. Approves (for ERC-20 sources) and signs the swap. Cross-chain routes bridge automatically.

  6. The destination token arrives at depositWalletAddress.

Sources span multiple ecosystems (EVM, Solana, and more). Which source chains can reach a given destination is determined by Swapper's routing engine.

How routing works

Under the hood the widget quotes the best route for the source → destination pair, then drives the user's wallet through the transactions it needs:

  • An approve (when the source is an ERC-20 and not yet approved) followed by a swap, or a single Solana VersionedTransaction.

  • Cross-chain routes bridge automatically.

  • Network and token fees are shown in the quote before the user signs.

You don't implement any of this — the widget drives the wallet for the user.

Slippage, minimums, and fees

  • The quote shows a minimum received after slippage; settlement never delivers less.

  • minDepositUsd is honored, but this flow additionally floors the minimum by a gas-based estimate so the user can always cover network fees.

  • Native-token sources skip the approve step.

What your app receives

A transaction.completed webhook whose deposit.method is dex_swap, with providerData.type = "dex_swap" (carrying the route id and router address when available), plus the source and destination assets and tx hashes.

In the browser you also get a transaction_success widget event with depositOption: "walletDeposit", including txHash, explorerUrl, tokenSymbol, chainId, and amountReceived when known.

Chaining actions after the swap

Because the swap ends by delivering a token, you can attach custom contract calls to stake, wrap, or otherwise put the funds to work in the same flow.

Enabling it

Last updated