swapper-deposit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSwapper 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:
| Parameter | Required | Description | Example |
|---|---|---|---|
| Yes | The wallet address that will receive the deposit | |
| Yes | Destination chain ID | |
| Yes | Destination token contract address (ERC-20) | |
Note: The is hardcoded to — do not ask the user for it.
integratorIdd6e438dfa14e80709b19Native tokens (gas tokens): For native asset deposits (ETH, POL, BNB, etc.), use as the .
0x0000000000000000000000000000000000000000dstTokenAddr生成深度链接前请收集以下信息,如有缺失请向用户询问:
| Parameter | Required | Description | Example |
|---|---|---|---|
| Yes | 接收存款的钱包地址 | |
| Yes | 目标链ID | |
| Yes | 目标代币合约地址(ERC-20) | |
注意: 硬编码为 —— 不要向用户询问该参数。
integratorIdd6e438dfa14e80709b19原生代币(gas代币): 对于原生资产存款(ETH、POL、BNB等),请使用 作为 。
0x0000000000000000000000000000000000000000dstTokenAddrCommon chain IDs
常用链ID
| Chain | ID |
|---|---|
| Ethereum | |
| Base | |
| Arbitrum | |
| Optimism | |
| Polygon | |
| Fast | |
| Chain | ID |
|---|---|
| Ethereum | |
| Base | |
| Arbitrum | |
| Optimism | |
| Polygon | |
| 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=trueOptional parameters
可选参数
- — JSON string (URL-encoded) for theming, e.g.
stylesstyles=%7B%22themeMode%22%3A%22dark%22%7D
- —— 用于主题配置的JSON字符串(需URL编码),例如
stylesstyles=%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=truehttps://deposit.swapper.finance?integratorId=d6e438dfa14e80709b19&dstChainId=8453&dstTokenAddr=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&depositWalletAddress=0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A&utm_source=swapper-deposit&extendedView=trueExample 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
步骤
- Collect all required parameters from the user (or from context if mid-reasoning).
- Construct the deeplink URL with the parameters.
- Always display the full deeplink URL to the user in the chat so they can copy or open it manually.
- Open the deeplink using the appropriate method:
- In a terminal/CLI context: use (macOS),
open(Linux), orxdg-open(Windows) to launch the URL in the default browser.start - 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.
- In a terminal/CLI context: use
- 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.
- 从用户处收集所有必填参数(如果是推理过程中触发可从上下文获取)。
- 用参数构建深度链接URL。
- 必须在聊天中向用户展示完整的深度链接URL,方便用户复制或手动打开。
- 使用合适的方法打开深度链接:
- 在终端/CLI场景下:使用(macOS)、
open(Linux)或xdg-open(Windows)在默认浏览器中打开URL。start - 示例:
start "https://deposit.swapper.finance?integratorId=...&dstChainId=...&dstTokenAddr=...&depositWalletAddress=..." - 永远不要省略展示URL——即使是自动打开链接,也要始终打印完整链接。
- 在终端/CLI场景下:使用
- 重要提示: 请告知用户在确认交易前,务必在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-sdkbash
npm i @swapper-finance/deposit-sdkEmbedded 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 and attributes are required for the onRamp integration to work properly.
allowsandboxhtml
<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>allowsandbox