For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Wallet Deposit

Key: walletDeposit · UI: "Buy with Wallet" / "Deposit with Wallet" · Deposit method: dex_swap

The wallet-deposit flow lets a crypto-native user fund straight from a wallet they connect — on EVM chains or Solana — with tokens they already hold. Swapper finds the best route, and the user signs it in their own wallet: an approval and a swap, or a single Solana transaction. Bridging happens automatically when the source and destination chains differ.

What the user experiences

  1. Chooses Buy with Wallet (or Deposit with Wallet with actionLabel: "deposit").

  2. Picks EVM or Solana (when the destination accepts both) and connects a wallet — or, if your app already passed one via wallet, reuses that EVM connection with no extra step.

  3. Picks a token they hold — the list comes from their wallet balances — and enters an amount.

  4. Reviews the quote: estimated output, minimum received after slippage, and the network fee. The widget asks to switch network if the wallet is on another chain.

  5. Signs:

    • EVM — an approve first when the source is an ERC-20 that isn't approved yet, then the swap;

    • Solana — one VersionedTransaction.

  6. The widget tracks the transfer until the destination token arrives at depositWalletAddress.

Bitcoin and Tron aren't available here — users on those chains can fund with Transfer Crypto (QR), which needs no wallet connection.

How routing works

Under the hood the widget uses the same routing the API exposes:

  • it quotes a route for the source → destination pair;

  • the quote returns the exact transactions to sign — an approve (when needed) followed by a swap, or a single Solana transaction;

  • fees are itemized, and the quote states the minimum the user will receive.

To build the same experience in your own UI, use POST /v1/quote and GET /v1/status.

Slippage, minimums, and fees

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

  • minDepositUsd / maxDepositUsd (or your integrator minimum) are applied to the amount.

  • The user pays the source chain's network fee from their own wallet. Native-token sources skip the approve step.

What your app receives

A transaction.completed webhook whose deposit.method is dex_swap (flow: "wallet_deposit"), 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, tokenAddress, 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.

Last updated