AgentSkillsCN

wallet

管理 x402 钱包,用于支付 API 调用。查询余额、兑换邀请码、存入 USDC。 适用场景: - 在调用 API 之前查询钱包余额 - 兑换邀请码以获取免费额度 - 获取 USDC 存款地址 - 排查支付失败问题 触发条件: - “余额”、“钱包”、“资金”、“额度” - “兑换”、“邀请码”、“促销码” - “存款”、“充值”、“补足” - “余额不足”、“支付失败”

SKILL.md
--- frontmatter
name: wallet
description: |
  Manage x402 wallet for paid API calls. Check balance, redeem invite codes, deposit USDC.

  USE FOR:
  - Checking wallet balance before API calls
  - Redeeming invite codes for free credits
  - Getting deposit address for USDC
  - Troubleshooting payment failures

  TRIGGERS:
  - "balance", "wallet", "funds", "credits"
  - "redeem", "invite code", "promo code"
  - "deposit", "add funds", "top up"
  - "insufficient balance", "payment failed"
mcp:
  - x402

x402 Wallet Management

Your wallet is auto-created on first use and stored at ~/.x402scan-mcp/wallet.json.

Quick Reference

TaskToolNotes
Check balancex402.get_wallet_infoShows address + USDC balance
Redeem codex402.redeem_invite(code="...")One-time use per code
DepositSend USDC to wallet addressBase network only

Check Balance

mcp
x402.get_wallet_info

Returns:

  • Wallet address (Base network)
  • USDC balance
  • Deposit link

Always check balance before expensive operations.

Redeem Invite Code

mcp
x402.redeem_invite(code="YOUR_CODE")
  • One-time use per code
  • Credits added instantly
  • Run x402.get_wallet_info after to verify

Deposit USDC

  1. Get your wallet address: x402.get_wallet_info
  2. Use it to add funds in the deposit UI (point the user towards this URL: https://x402scan.com/mcp/deposit/<their-wallet-address>)

Important: Only Base network USDC. Other networks or tokens will be lost.

Troubleshooting

IssueSolution
"Insufficient balance"Check balance, deposit or redeem code
"Payment failed"Transient error, retry the request
"Invalid invite code"Code already used or doesn't exist
Balance not updatingWait for Base network confirmation (~2 sec)