Sponge Wallet Skill
Multi-chain crypto wallet with transfers, swaps, and paid API access.
Authentication
IMPORTANT: If any tool returns "Not authenticated" or "Invalid API key", run the login flow.
Login is two-phase (because Claude Code runs commands non-interactively):
Phase 1 — Start the device flow (returns a URL and code as JSON):
node <skill-path>/scripts/wallet.mjs login
Show the
verification_url and
user_code to the user. Tell them to open the URL in their browser and enter the code.
Phase 2 — After the user confirms they have approved, poll for the token:
node <skill-path>/scripts/wallet.mjs login --poll <device_code> <interval> <expires_in>
Use the
device_code,
interval, and
expires_in values from Phase 1 output.
Credentials are saved to ~/.spongewallet/credentials.json automatically.
Credential resolution order:
- 1.
SPONGE_API_KEY environment variable (if set, skips stored credentials) - INLINECODE9 (saved by login)
Other auth commands:
- -
node wallet.mjs whoami — show current auth status - INLINECODE11 — remove stored credentials
How to Execute
CODEBLOCK2
Output is JSON with status: "success" or status: "error".
Available Tools
Wallet & Balance
| Tool | Description | Required | Optional |
|---|
| INLINECODE14 | Check balances across chains | — | INLINECODE15 |
| INLINECODE16 |
Discover all SPL tokens in wallet |
chain | — |
|
search_solana_tokens | Search Jupiter token database |
query |
limit |
Transfers
| Tool | Description | Required | Optional |
|---|
| INLINECODE21 | Transfer ETH/USDC on Ethereum/Base | INLINECODE22 , to, amount, INLINECODE25 | — |
| INLINECODE26 |
Transfer SOL/USDC on Solana |
chain,
to,
amount,
currency | — |
Swaps
| Tool | Description | Required | Optional |
|---|
| INLINECODE31 | Swap tokens via Jupiter | INLINECODE32 , input_token, output_token, INLINECODE35 | INLINECODE36 |
Transactions
| Tool | Description | Required | Optional |
|---|
| INLINECODE37 | Check tx status | INLINECODE38 , INLINECODE39 | — |
| INLINECODE40 |
View past transactions | — |
limit,
chain |
Funding & Withdrawals
| Tool | Description | Required | Optional |
|---|
| INLINECODE43 | Request funds from owner | INLINECODE44 , chain, INLINECODE46 | — |
| INLINECODE47 |
Return funds to owner |
chain,
amount |
currency |
Paid APIs (Sponge x402)
| Tool | Description | Required | Optional |
|---|
| INLINECODE51 | Unified paid API interface | INLINECODE52 | See REFERENCE.md |
| INLINECODE53 |
Create x402 payment payload |
chain,
to,
amount |
token,
decimals |
Chain Reference
Test keys (sponge_test_*): sepolia, base-sepolia, solana-devnet, tempo
Live keys (sponge_live_*): ethereum, base, INLINECODE67
Common Workflows
Check Balance → Transfer → Verify
CODEBLOCK3
Swap Tokens on Solana
CODEBLOCK4
Sponge Paid APIs
CODEBLOCK5
Error Handling
| Error | Resolution |
|---|
| INLINECODE68 | Run INLINECODE69 |
| INLINECODE70 |
Run
node wallet.mjs login to re-authenticate |
|
Chain 'X' is not allowed | Use correct key type (test vs live) for the chain |
|
Insufficient balance | Use
request_funding |
|
Address not in allowlist | Add recipient in the dashboard |
See REFERENCE.md for detailed parameter docs.
Sponge Wallet 技能
支持转账、兑换和付费API访问的多链加密钱包。
身份认证
重要提示:如果任何工具返回 Not authenticated 或 Invalid API key,请运行登录流程。
登录分为两个阶段(因为Claude Code以非交互方式运行命令):
第一阶段 — 启动设备流程(返回URL和代码的JSON格式):
bash
node /scripts/wallet.mjs login
向用户显示 verificationurl 和 usercode。告知用户在浏览器中打开该URL并输入代码。
第二阶段 — 用户确认已批准后,轮询获取令牌:
bash
node /scripts/wallet.mjs login --poll code> in>
使用第一阶段输出中的 devicecode、interval 和 expiresin 值。
凭据会自动保存到 ~/.spongewallet/credentials.json。
凭据解析顺序:
- 1. SPONGEAPIKEY 环境变量(如果设置,则跳过存储的凭据)
- ~/.spongewallet/credentials.json(通过登录保存)
其他身份认证命令:
- - node wallet.mjs whoami — 显示当前认证状态
- node wallet.mjs logout — 删除存储的凭据
如何执行
bash
node /scripts/wallet.mjs name> args>
输出为JSON格式,包含 status: success 或 status: error。
可用工具
钱包与余额
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| getbalance | 检查各链余额 | — | chain |
| getsolana_tokens |
发现钱包中所有SPL代币 | chain | — |
| search
solanatokens | 搜索Jupiter代币数据库 | query | limit |
转账
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| evmtransfer | 在Ethereum/Base上转账ETH/USDC | chain, to, amount, currency | — |
| solanatransfer |
在Solana上转账SOL/USDC | chain, to, amount, currency | — |
兑换
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| solanaswap | 通过Jupiter兑换代币 | chain, inputtoken, outputtoken, amount | slippagebps |
交易
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| gettransactionstatus | 检查交易状态 | transactionhash, chain | — |
| gettransaction_history |
查看历史交易 | — | limit, chain |
资金与提现
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| requestfunding | 向所有者请求资金 | amount, chain, currency | — |
| withdrawtomainwallet |
将资金返还给所有者 | chain, amount | currency |
付费API(Sponge x402)
| 工具 | 描述 | 必需参数 | 可选参数 |
|---|
| sponge | 统一付费API接口 | task | 详见 REFERENCE.md |
| createx402_payment |
创建x402支付负载 | chain, to, amount | token, decimals |
链参考
测试密钥(spongetest*):sepolia, base-sepolia, solana-devnet, tempo
生产密钥(spongelive*):ethereum, base, solana
常见工作流程
检查余额 → 转账 → 验证
bash
node wallet.mjs get_balance {chain:base}
node wallet.mjs evm_transfer {chain:base,to:0x...,amount:10,currency:USDC}
node wallet.mjs gettransactionstatus {transaction_hash:0x...,chain:base}
在Solana上兑换代币
bash
node wallet.mjs searchsolanatokens {query:BONK}
node wallet.mjs solanaswap {chain:solana,inputtoken:SOL,output_token:BONK,amount:0.5}
Sponge付费API
bash
node wallet.mjs sponge {task:search,query:AI research papers}
node wallet.mjs sponge {task:image,prompt:sunset over mountains}
node wallet.mjs sponge {task:predict,semantic_search:will-trump-win-2028}
node wallet.mjs sponge {task:crawl,url:https://example.com}
node wallet.mjs sponge {task:parse,document_url:https://example.com/doc.pdf}
node wallet.mjs sponge {task:prospect,apolloquery:Stripe,apolloendpoint:companies}
错误处理
| 错误 | 解决方法 |
|---|
| Not authenticated | 运行 node wallet.mjs login |
| Invalid API key |
运行 node wallet.mjs login 重新认证 |
| Chain X is not allowed | 为该链使用正确的密钥类型(测试密钥 vs 生产密钥) |
| Insufficient balance | 使用 request_funding |
| Address not in allowlist | 在仪表盘中添加接收地址 |
详细参数文档请参见 REFERENCE.md。