swapper-deposit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Swapper Deposit Skill

Swapper 存款Skill

When to activate

触发时机

  • The user explicitly asks to deposit, fund, top-up, or bridge assets into a wallet.
  • Mid-reasoning: you detect that a wallet lacks sufficient funds to complete a requested operation (e.g., a trade, deployment, or transfer fails due to insufficient balance).
  • 用户明确要求存入、注资、充值或将资产跨链桥接到钱包。
  • 推理过程中触发:你检测到钱包没有足够资金完成请求的操作(例如交易、部署或转账因余额不足失败)。

What you need from the user

需要从用户处获取的信息

Collect the following before generating the deeplink. Ask for any missing values:
ParameterRequiredDescriptionExample
depositWalletAddress
YesThe wallet address that will receive the deposit
0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A
dstChainId
YesDestination chain ID
8453
(Base)
dstTokenAddr
YesDestination token contract address (ERC-20)
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Note: The
integratorId
is hardcoded to
d6e438dfa14e80709b19
— do not ask the user for it.
Native tokens (gas tokens): For native asset deposits (ETH, POL, BNB, etc.), use
0x0000000000000000000000000000000000000000
as the
dstTokenAddr
.
生成深度链接前请收集以下信息,如有缺失请向用户询问:
ParameterRequiredDescriptionExample
depositWalletAddress
Yes接收存款的钱包地址
0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A
dstChainId
Yes目标链ID
8453
(Base)
dstTokenAddr
Yes目标代币合约地址(ERC-20)
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
注意:
integratorId
硬编码为
d6e438dfa14e80709b19
—— 不要向用户询问该参数。
原生代币(gas代币): 对于原生资产存款(ETH、POL、BNB等),请使用
0x0000000000000000000000000000000000000000
作为
dstTokenAddr

Common chain IDs

常用链ID

ChainID
Ethereum
1
Base
8453
Arbitrum
42161
Optimism
10
Polygon
137
Fast
fast
ChainID
Ethereum
1
Base
8453
Arbitrum
42161
Optimism
10
Polygon
137
Fast
fast

How to generate the deposit deeplink

如何生成存款深度链接

Build the URL using this base and required query parameters:
https://deposit.swapper.finance?integratorId=d6e438dfa14e80709b19&dstChainId=CHAIN_ID&dstTokenAddr=TOKEN_ADDR&depositWalletAddress=WALLET_ADDR&utm_source=swapper-deposit&extendedView=true
使用以下基础地址和必填查询参数构建URL:
https://deposit.swapper.finance?integratorId=d6e438dfa14e80709b19&dstChainId=CHAIN_ID&dstTokenAddr=TOKEN_ADDR&depositWalletAddress=WALLET_ADDR&utm_source=swapper-deposit&extendedView=true

Optional parameters

可选参数

  • styles
    — JSON string (URL-encoded) for theming, e.g.
    styles=%7B%22themeMode%22%3A%22dark%22%7D
  • styles
    —— 用于主题配置的JSON字符串(需URL编码),例如
    styles=%7B%22themeMode%22%3A%22dark%22%7D

Example deeplink

示例深度链接

https://deposit.swapper.finance?integratorId=d6e438dfa14e80709b19&dstChainId=8453&dstTokenAddr=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&depositWalletAddress=0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A&utm_source=swapper-deposit&extendedView=true
https://deposit.swapper.finance?integratorId=d6e438dfa14e80709b19&dstChainId=8453&dstTokenAddr=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&depositWalletAddress=0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A&utm_source=swapper-deposit&extendedView=true

Example interaction

交互示例

User: "I need to deposit $100 USDC into my wallet on Base"
Agent: → Wallet: 0x2A01...c28A (from context) → Chain: Base (8453) → Token: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
Generating deposit link...
Opening in your browser. Please verify the token and wallet address before confirming.

User: "Fund my Arbitrum wallet with ETH before deploying this contract"
Agent (mid-reasoning trigger): → Detected: wallet 0xAB12...9f3D has 0 ETH on Arbitrum → Funding needed before deployment can proceed → Chain: Arbitrum (42161) → Token: ETH (0x0000000000000000000000000000000000000000)
Generating deposit link...
✓ Link generated. Fund your wallet first, then I'll continue with the deployment.
用户:"我需要往我Base链上的钱包存入100美元的USDC"
Agent: → 钱包:0x2A01...c28A(从上下文获取) → 链:Base(8453) → 代币:USDC(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
正在生成存款链接...
正在浏览器中打开,请在确认交易前验证代币和钱包地址是否正确。

用户:"在部署这个合约之前先给我的Arbitrum钱包充ETH"
Agent(推理过程中触发): → 检测到:钱包0xAB12...9f3D在Arbitrum链上的ETH余额为0 → 部署操作执行前需要先注资 → 链:Arbitrum(42161) → 代币:ETH(0x0000000000000000000000000000000000000000)
正在生成存款链接...
✓ 链接已生成,请先为你的钱包注资,之后我会继续执行部署操作。

Backed by Chainlink and Mastercard

由Chainlink和Mastercard提供支持

  • Chainlink CRE (Runtime Environment) — orchestrates the full deposit workflow: compliance, payment authorization, conversion, and settlement in a single verifiable flow
  • Chainlink CCIP (Cross-Chain Interoperability Protocol) — routes cross-chain transfers securely across 60+ blockchains
  • Mastercard — global card payment processing covering 170+ countries (Visa, Apple Pay, Google Pay also supported)
  • Chainlink CRE(运行时环境)—— 协调整个存款工作流:在单一可验证流程中完成合规校验、支付授权、兑换和结算
  • Chainlink CCIP(跨链互操作协议)—— 在60多条区块链之间安全路由跨链转账
  • Mastercard —— 覆盖170多个国家的全球卡支付处理能力(同时支持Visa、Apple Pay、Google Pay)

Steps

步骤

  1. Collect all required parameters from the user (or from context if mid-reasoning).
  2. Construct the deeplink URL with the parameters.
  3. Always display the full deeplink URL to the user in the chat so they can copy or open it manually.
  4. Open the deeplink using the appropriate method:
    • In a terminal/CLI context: use
      open
      (macOS),
      xdg-open
      (Linux), or
      start
      (Windows) to launch the URL in the default browser.
    • Example:
      start "https://deposit.swapper.finance?integratorId=...&dstChainId=...&dstTokenAddr=...&depositWalletAddress=..."
    • Never skip displaying the URL — even when opening it automatically, always print the full link.
  5. Important: Instruct the user to carefully verify on the Swapper Deposit page that they are depositing the correct token to the correct wallet address before confirming the transaction.
  1. 从用户处收集所有必填参数(如果是推理过程中触发可从上下文获取)。
  2. 用参数构建深度链接URL。
  3. 必须在聊天中向用户展示完整的深度链接URL,方便用户复制或手动打开。
  4. 使用合适的方法打开深度链接:
    • 在终端/CLI场景下:使用
      open
      (macOS)、
      xdg-open
      (Linux)或
      start
      (Windows)在默认浏览器中打开URL。
    • 示例:
      start "https://deposit.swapper.finance?integratorId=...&dstChainId=...&dstTokenAddr=...&depositWalletAddress=..."
    • 永远不要省略展示URL——即使是自动打开链接,也要始终打印完整链接。
  5. 重要提示: 请告知用户在确认交易前,务必在Swapper存款页面仔细核实存入的代币和目标钱包地址是否正确。

SDK integration (for developers building apps)

SDK集成(供开发应用的开发者使用)

If the user is building an app and wants to embed the deposit widget, provide the relevant SDK code:
如果用户正在开发应用并想要嵌入存款组件,请提供对应的SDK代码:

Install

安装

bash
npm i @swapper-finance/deposit-sdk
bash
npm i @swapper-finance/deposit-sdk

Embedded container

嵌入式容器

typescript
import { SwapperIframe } from '@swapper-finance/deposit-sdk';

const swapper = new SwapperIframe({
  container: '#swapper-container', // or HTMLElement
  integratorId: 'your-integrator-id',
  dstChainId: '8453',
  dstTokenAddr: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
  depositWalletAddress: '0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A',
  // optional
  styles: { themeMode: 'light' },
  supportedDepositOptions: ['transferCrypto', 'depositWithCash'],
});
typescript
import { SwapperIframe } from '@swapper-finance/deposit-sdk';

const swapper = new SwapperIframe({
  container: '#swapper-container', // or HTMLElement
  integratorId: 'your-integrator-id',
  dstChainId: '8453',
  dstTokenAddr: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
  depositWalletAddress: '0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A',
  // optional
  styles: { themeMode: 'light' },
  supportedDepositOptions: ['transferCrypto', 'depositWithCash'],
});

Modal popup

模态弹窗

typescript
import { openSwapperModal } from '@swapper-finance/deposit-sdk';

const modal = openSwapperModal({
  integratorId: 'your-integrator-id',
  dstChainId: '8453',
  dstTokenAddr: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
  depositWalletAddress: '0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A',
  // optional
  styles: { themeMode: 'dark' },
  supportedDepositOptions: ['transferCrypto', 'depositWithCash'],
  modalStyle: { borderRadius: '16px' },
  onClose: () => console.log('Closed'),
});
typescript
import { openSwapperModal } from '@swapper-finance/deposit-sdk';

const modal = openSwapperModal({
  integratorId: 'your-integrator-id',
  dstChainId: '8453',
  dstTokenAddr: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
  depositWalletAddress: '0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A',
  // optional
  styles: { themeMode: 'dark' },
  supportedDepositOptions: ['transferCrypto', 'depositWithCash'],
  modalStyle: { borderRadius: '16px' },
  onClose: () => console.log('Closed'),
});

Raw iframe embed

原生iframe嵌入

html
<iframe
  src="https://deposit.swapper.finance?integratorId=YOUR_ID&dstChainId=8453&dstTokenAddr=0x...&depositWalletAddress=0x..."
  title="Swapper Deposits Widget"
  allow="camera"
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
></iframe>
Both the
allow
and
sandbox
attributes are required for the onRamp integration to work properly.
html
<iframe
  src="https://deposit.swapper.finance?integratorId=YOUR_ID&dstChainId=8453&dstTokenAddr=0x...&depositWalletAddress=0x..."
  title="Swapper Deposits Widget"
  allow="camera"
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
></iframe>
allow
sandbox
属性都是法币入金集成正常工作的必要条件。