Vincent - A wallet for agents
Use this skill to safely create a wallet the agent can use for transfers, swaps, and any EVM chain transaction without ever exposing private keys to the agent. Create a wallet, set spending policies, and your agent can transfer tokens, do swaps, and interact with smart contracts within the boundaries you define.
The agent never sees the private key. All transactions are executed server-side through a smart account. The wallet owner controls what the agent can do via configurable policies.
Which Wallet Type to Use
| Type | Use Case | Network | Gas |
|---|
| INLINECODE0 | Transfers, swaps, DeFi, contract calls | Any EVM chain | Sponsored (free) |
| INLINECODE1 |
Raw message signing for special protocols | Any (Ethereum + Solana) | You pay |
|
POLYMARKET_WALLET | Prediction market trading | Polygon only | Sponsored (free) |
Choose EVM_WALLET (default) for:
- - Sending ETH or tokens
- Swapping tokens on DEXs
- Interacting with smart contracts
- Any standard EVM transaction
Choose RAW_SIGNER only when you need:
- - Raw ECDSA/Ed25519 signatures for protocols that don't work with smart accounts
- To sign transaction hashes you'll broadcast yourself
- Solana signatures
Choose POLYMARKET_WALLET only for:
- - Betting on Polymarket prediction markets
- Requires USDC.e on Polygon for funding
Configuration
All API requests require a Bearer token (the API key returned when creating a wallet). If you're an openclaw instance, store and retrieve it from ~/.openclaw/credentials/agentwallet/<API_KEY_ID>.json. Otherwise, you can store it in your current working directory at agentwallet/<API_KEY_ID>.json.
CODEBLOCK0
Quick Start
1. Create a Wallet
Create a new smart account wallet for your agent. This generates a private key server-side (you never see it), creates a ZeroDev smart account, and returns an API key for the agent plus a claim URL for the wallet owner.
CODEBLOCK1
Response includes:
- -
apiKey -- store this securely; use it as the Bearer token for all future requests - INLINECODE9 -- share this with the user so they can claim the wallet and set policies
- INLINECODE10 -- the smart account address
After creating, tell the user:
"Here is your wallet claim URL: <claimUrl>. Use this to claim ownership, set spending policies, and monitor your agent's wallet activity."
2. Get Wallet Address
CODEBLOCK2
3. Check Balances
CODEBLOCK3
Returns all ERC-20 tokens and native balances with symbols, decimals, logos, and USD values.
4. Transfer ETH or Tokens
CODEBLOCK4
5. Swap Tokens
Swap one token for another using DEX liquidity (powered by 0x).
CODEBLOCK5
- -
sellToken / buyToken: Token contract addresses. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH. - INLINECODE15 : Human-readable amount to sell (e.g.
"0.1" for 0.1 ETH). - INLINECODE17 : The chain to swap on (1 = Ethereum, 137 = Polygon, 42161 = Arbitrum, 10 = Optimism, 8453 = Base, etc.).
- INLINECODE18 : Optional slippage tolerance in basis points (100 = 1%). Defaults to 100.
The preview endpoint returns expected buy amount, route info, and fees without executing. The execute endpoint performs the actual swap through the smart account, handling ERC20 approvals automatically.
6. Send Arbitrary Transaction
Interact with any smart contract by sending custom calldata.
CODEBLOCK6
Policies
The wallet owner controls what the agent can do by setting policies via the claim URL. If a transaction violates a policy, the API will reject it or require human approval via Telegram.
| Policy | What it does |
|---|
| Address allowlist | Only allow transfers/calls to specific addresses |
| Token allowlist |
Only allow transfers of specific ERC-20 tokens |
|
Function allowlist | Only allow calling specific contract functions (by 4-byte selector) |
|
Spending limit (per tx) | Max USD value per transaction |
|
Spending limit (daily) | Max USD value per rolling 24 hours |
|
Spending limit (weekly) | Max USD value per rolling 7 days |
|
Require approval | Every transaction needs human approval via Telegram |
|
Approval threshold | Transactions above a USD amount need human approval |
If no policies are set, all actions are allowed by default. Once the owner claims the wallet and adds policies, the agent operates within those boundaries.
Re-linking (Recovering API Access)
If the agent loses its API key, the wallet owner can generate a re-link token from the frontend. The agent then exchanges this token for a new API key.
How it works:
- 1. The user generates a re-link token from the wallet detail page in the frontend
- The user gives the token to the agent (e.g. by pasting it in chat)
- The agent calls the re-link endpoint to exchange the token for a new API key
CODEBLOCK7
Response includes:
- -
secret -- the wallet metadata (id, type, address, chainId, etc.) - INLINECODE20 -- the new API key to use as Bearer token for all future requests
Important: Re-link tokens are one-time use and expire after 10 minutes. No authentication is required on this endpoint -- the token itself is the authorization.
If a user tells you they have a re-link token, use this endpoint to regain access to the wallet. Store the returned API key and use it for all subsequent requests.
Important Notes
- - No gas needed. A paymaster is fully set up -- all transaction gas fees are sponsored automatically. The wallet does not need ETH for gas.
- Never try to access raw secret values. The private key stays server-side -- that's the whole point.
- Always store the API key from wallet creation. If you're an openclaw instance, store it in
~/.openclaw/credentials/agentwallet/<API_KEY_ID>.json. Otherwise, you can store it in your current working directory at agentwallet/<API_KEY_ID>.json. - Always search for the API keys in the credentials folder before using the API. If you're an openclaw instance, search for the API key in
~/.openclaw/credentials/agentwallet/<API_KEY_ID>.json. Otherwise, you can search for the API key in your current working directory at agentwallet/<API_KEY_ID>.json. - Always share the claim URL with the user after creating a wallet.
- If a transaction is rejected, it may be blocked by a policy. Tell the user to check their policy settings via the frontend at
https://heyvincent.ai. - If a transaction requires approval, it will return
status: "pending_approval". The wallet owner will receive a Telegram notification to approve or deny.
Raw Signer (Advanced)
For raw ECDSA/Ed25519 signing when smart accounts won't work.
Create a Raw Signer
CODEBLOCK8
Response includes both Ethereum (secp256k1) and Solana (ed25519) addresses derived from the same seed.
Get Addresses
CODEBLOCK9
Returns ethAddress and solanaAddress.
Sign a Message
CODEBLOCK10
- -
message: Hex-encoded bytes to sign (must start with 0x) - INLINECODE31 :
"ethereum" for secp256k1 ECDSA, "solana" for ed25519
Returns a hex-encoded signature. For Ethereum, this is r || s || v (65 bytes). For Solana, it's a 64-byte ed25519 signature.
Polymarket Prediction Markets
Polymarket wallets use Gnosis Safe wallets on Polygon with gasless trading through Polymarket's relayer.
Create a Polymarket Wallet
CODEBLOCK11
Response includes:
- -
apiKey -- use as Bearer token for all Polymarket requests - INLINECODE36 -- share with the user to claim ownership and set policies
- INLINECODE37 -- the EOA address (Safe is deployed lazily on first use)
Important: After creation, the wallet has no funds. The user must send USDC.e (bridged USDC) on Polygon to the Safe address before placing bets.
Get Balance
CODEBLOCK12
Returns:
- -
walletAddress -- the Safe address (deployed on first call if needed) - INLINECODE39 -- USDC.e balance available for trading
- INLINECODE40 -- approved amount for Polymarket contracts
Note: The first balance call triggers Safe deployment and collateral approval (gasless via relayer). This may take 30-60 seconds.
Fund the Wallet
Before placing bets, the user must send USDC.e to the Safe address:
- 1. Get the wallet address from
/balance endpoint - Send USDC.e (bridged USDC, contract
0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) on Polygon to that address - Minimum $1 required per bet (Polymarket minimum)
Do not send native USDC (0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359). Polymarket only accepts bridged USDC.e.
Browse & Search Markets
CODEBLOCK13
Market response includes:
- -
question: The market question - INLINECODE45 : Array like
["Yes", "No"] or INLINECODE47 - INLINECODE48 : Current prices for each outcome
- INLINECODE49 : Array of token IDs for each outcome - use these for placing bets
- INLINECODE50 : Whether the market is open for trading
- INLINECODE51 : Whether the market has resolved
Important: Always use the tokenIds array from the market response. Each outcome has a corresponding token ID at the same index. For a "Yes/No" market:
- -
tokenIds[0] = "Yes" token ID - INLINECODE54 = "No" token ID
Get Order Book
CODEBLOCK14
Returns bids and asks with prices and sizes. Use this to determine current market prices before placing orders.
Place a Bet
CODEBLOCK15
Parameters:
- -
tokenId: The outcome token ID (from market data or order book) - INLINECODE56 :
"BUY" or INLINECODE58 - INLINECODE59 : For BUY orders, USD amount to spend. For SELL orders, number of shares to sell.
- INLINECODE60 : Limit price (0.01 to 0.99). Optional -- omit for market order.
BUY orders:
- -
amount is the USD you want to spend (e.g., 5 = $5) - You'll receive
amount / price shares (e.g., $5 at 0.50 = 10 shares) - Minimum order is $1
SELL orders:
- -
amount is the number of shares to sell - You'll receive
amount * price USD - Must own the shares first (from a previous BUY)
Important timing: After a BUY fills, wait a few seconds before selling. Shares need time to settle on-chain.
View Positions & Orders
CODEBLOCK16
Cancel Orders
CODEBLOCK17
Polymarket Workflow Example
- 1. Create wallet:
CODEBLOCK18
- 2. Get Safe address (triggers deployment):
CODEBLOCK19
- 3. User sends USDC.e to the Safe address on Polygon
- 4. Search for a market:
CODEBLOCK20
Response example:
CODEBLOCK21
- 5. Check order book for the outcome you want:
CODEBLOCK22
- 6. Place BUY bet using the correct token ID:
CODEBLOCK23
- 7. Wait for settlement (a few seconds)
- 8. Sell position:
CODEBLOCK24
Common Errors:
- -
"No orderbook exists for the requested token id" - The market is closed or you're using the wrong ID. Make sure:
- The market has
acceptingOrders: true
- You're using a
tokenId from the
tokenIds array, not the
conditionId
- The market hasn't already resolved
Vincent - 代理钱包
使用此技能安全地创建一个代理可用的钱包,用于转账、兑换以及任何EVM链交易,而无需向代理暴露私钥。创建钱包、设置支出策略后,您的代理即可在您定义的范围内进行代币转账、兑换以及与智能合约交互。
代理永远不会看到私钥。 所有交易均通过智能账户在服务端执行。钱包所有者通过可配置策略控制代理的操作权限。
选择钱包类型
| 类型 | 用途场景 | 网络 | Gas费用 |
|---|
| EVMWALLET | 转账、兑换、DeFi、合约调用 | 任意EVM链 | 赞助(免费) |
| RAWSIGNER |
特殊协议的原始消息签名 | 任意(以太坊 + Solana) | 您自行支付 |
| POLYMARKET_WALLET | 预测市场交易 | 仅Polygon | 赞助(免费) |
选择 EVM_WALLET(默认)适用于:
- - 发送ETH或代币
- 在DEX上兑换代币
- 与智能合约交互
- 任何标准EVM交易
仅在需要以下功能时选择 RAW_SIGNER:
- - 为不兼容智能账户的协议提供原始ECDSA/Ed25519签名
- 签署您将自行广播的交易哈希
- Solana签名
仅在选择 POLYMARKET_WALLET 时用于:
- - 在Polymarket预测市场下注
- 需要在Polygon上存入USDC.e作为资金
配置
所有API请求都需要Bearer令牌(创建钱包时返回的API密钥)。如果您是openclaw实例,请将其存储在 ~/.openclaw/credentials/agentwallet/KEYID>.json 中。否则,您可以将其存储在当前工作目录的 agentwallet/KEYID>.json 中。
Authorization: Bearer
快速开始
1. 创建钱包
为您的代理创建一个新的智能账户钱包。这会在服务端生成一个私钥(您永远看不到),创建一个ZeroDev智能账户,并返回一个供代理使用的API密钥以及一个供钱包所有者认领的URL。
bash
curl -X POST https://heyvincent.ai/api/secrets \
-H Content-Type: application/json \
-d {
type: EVM_WALLET,
memo: 我的代理钱包,
chainId: 84532
}
响应包含:
- - apiKey -- 安全存储;将其用作所有未来请求的Bearer令牌
- claimUrl -- 与用户共享,以便他们认领钱包并设置策略
- address -- 智能账户地址
创建后,告知用户:
这是您的钱包认领URL:。使用此URL认领所有权、设置支出策略并监控代理钱包活动。
2. 获取钱包地址
bash
curl -X GET https://heyvincent.ai/api/skills/evm-wallet/address \
-H Authorization: Bearer
3. 检查余额
bash
获取所有支持链上的所有代币余额(ETH、WETH、USDC等)
curl -X GET https://heyvincent.ai/api/skills/evm-wallet/balances \
-H Authorization: Bearer
筛选特定链(逗号分隔的链ID)
curl -X GET https://heyvincent.ai/api/skills/evm-wallet/balances?chainIds=1,137,42161 \
-H Authorization: Bearer
返回所有ERC-20代币和原生余额,包含符号、小数位数、图标和美元价值。
4. 转账ETH或代币
bash
转账原生ETH
curl -X POST https://heyvincent.ai/api/skills/evm-wallet/transfer \
-H Authorization: Bearer \
-H Content-Type: application/json \
-d {
to: 0x接收地址,
amount: 0.01
}
转账ERC-20代币
curl -X POST https://heyvincent.ai/api/skills/evm-wallet/transfer \
-H Authorization: Bearer \
-H Content-Type: application/json \
-d {
to: 0x接收地址,
amount: 100,
token: 0x代币合约地址
}
5. 兑换代币
使用DEX流动性(由0x提供支持)将一种代币兑换为另一种。
bash
预览兑换(仅定价,不执行)
curl -X POST https://heyvincent.ai/api/skills/evm-wallet/swap/preview \
-H Authorization: Bearer \
-H Content-Type: application/json \
-d {
sellToken: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,
buyToken: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,
sellAmount: 0.1,
chainId: 1
}
执行兑换
curl -X POST https://heyvincent.ai/api/skills/evm-wallet/swap/execute \
-H Authorization: Bearer \
-H Content-Type: application/json \
-d {
sellToken: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,
buyToken: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,
sellAmount: 0.1,
chainId: 1,
slippageBps: 100
}
- - sellToken / buyToken:代币合约地址。使用 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE 表示原生ETH。
- sellAmount:人类可读的卖出数量(例如 0.1 表示0.1 ETH)。
- chainId:兑换所在的链(1 = 以太坊,137 = Polygon,42161 = Arbitrum,10 = Optimism,8453 = Base等)。
- slippageBps:可选滑点容忍度,以基点为单位(100 = 1%)。默认为100。
预览端点返回预期买入金额、路由信息和费用,但不执行。执行端点通过智能账户执行实际兑换,自动处理ERC20授权。
6. 发送任意交易
通过发送自定义calldata与任何智能合约交互。
bash
curl -X POST https://heyvincent.ai/api/skills/evm-wallet/send-transaction \
-H Authorization: Bearer \
-H Content-Type: application/json \
-d {
to: 0x合约地址,
data: 0xCalldata,
value: 0
}
策略
钱包所有者通过认领URL设置策略来控制代理的操作权限。如果交易违反策略,API将拒绝该交易或要求通过Telegram进行人工审批。
| 策略 | 功能 |
|---|
| 地址白名单 | 仅允许向特定地址转账/调用 |
| 代币白名单 |
仅允许转账特定ERC-20代币 |
| 函数白名单 | 仅允许调用特定合约函数(按4字节选择器) |
| 支出限额(每笔交易) | 每笔交易的最大美元价值 |
| 支出限额(每日) | 每滚动24小时的最大美元价值 |
| 支出限额(每周) | 每滚动7天的最大美元价值 |
| 需要审批 | 每笔交易都需要通过Telegram进行人工审批 |
| 审批阈值 | 超过一定美元金额的交易需要人工审批 |
如果未设置任何策略,默认允许所有操作。一旦所有者认领钱包并添加策略,代理将在这些边界内运行。
重新链接(恢复API访问)
如果代理丢失了API密钥,钱包所有者可以从前端生成一个重新链接令牌。代理随后用此令牌换取新的API密钥。
工作原理:
- 1. 用户在前端的钱包详情页面生成一个重新链接令牌
- 用户将令牌提供给代理(例如粘贴到聊天中)