pay-for-service by coinbase/agentic-wallet-skills
npx skills add https://github.com/coinbase/agentic-wallet-skills --skill pay-for-service使用 npx awal@2.0.3 x402 pay 命令,通过 Base 网络自动支付 USDC 来调用付费 API 端点。
npx awal@2.0.3 status
如果钱包未授权,请参考 authenticate-wallet 技能。
npx awal@2.0.3 x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| 选项 | 描述 |
|---|---|
-X, --method <method> | HTTP 方法(默认:GET) |
-d, --data <json> |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 请求体,JSON 字符串格式 |
-q, --query <params> | 查询参数,JSON 字符串格式 |
-h, --headers <json> | 自定义 HTTP 请求头,JSON 字符串格式 |
--max-amount <amount> | 最大支付金额(USDC 原子单位,1000000 = $1.00) |
--correlation-id <id> | 关联相关操作 |
--json | 以 JSON 格式输出 |
X402 使用 USDC 原子单位(6 位小数):
| 原子单位 | 美元 |
|---|---|
| 1000000 | $1.00 |
| 100000 | $0.10 |
| 50000 | $0.05 |
| 10000 | $0.01 |
重要提示:对于包含 $ 的金额,请始终使用单引号包裹,以防止 bash 变量扩展(例如使用 '$1.00' 而不是 $1.00)。
在构建命令之前,请验证所有用户提供的值,以防止 shell 注入:
https:// 或 http:// 开头。如果包含空格、分号、管道符、反引号或 shell 元字符,则拒绝。^\d+$)。请勿将未经验证的用户输入传递给命令。
# 发起 GET 请求(自动支付)
npx awal@2.0.3 x402 pay https://example.com/api/weather
# 发起带请求体的 POST 请求
npx awal@2.0.3 x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# 限制最大支付金额为 $0.10
npx awal@2.0.3 x402 pay https://example.com/api/data --max-amount 100000
npx awal@2.0.3 status 检查,参见 authenticate-wallet 技能)npx awal@2.0.3 balance 检查)search-for-service 技能查找服务awal auth login <email>,或参见 authenticate-wallet 技能search-for-service 查找有效端点fund 技能每周安装量
1.4K
代码仓库
GitHub 星标数
78
首次出现
2026年2月10日
安全审计
安装于
codex1.2K
opencode1.2K
gemini-cli1.2K
github-copilot1.2K
kimi-cli1.1K
amp1.1K
Use the npx awal@2.0.3 x402 pay command to call paid API endpoints with automatic USDC payment on Base.
npx awal@2.0.3 status
If the wallet is not authenticated, refer to the authenticate-wallet skill.
npx awal@2.0.3 x402 pay <url> [-X <method>] [-d <json>] [-q <params>] [-h <json>] [--max-amount <n>] [--json]
| Option | Description |
|---|---|
-X, --method <method> | HTTP method (default: GET) |
-d, --data <json> | Request body as JSON string |
-q, --query <params> | Query parameters as JSON string |
-h, --headers <json> | Custom HTTP headers as JSON string |
--max-amount <amount> | Max payment in USDC atomic units (1000000 = $1.00) |
--correlation-id <id> | Group related operations |
--json | Output as JSON |
X402 uses USDC atomic units (6 decimals):
| Atomic Units | USD |
|---|---|
| 1000000 | $1.00 |
| 100000 | $0.10 |
| 50000 | $0.05 |
| 10000 | $0.01 |
IMPORTANT : Always single-quote amounts that use $ to prevent bash variable expansion (e.g. '$1.00' not $1.00).
Before constructing the command, validate all user-provided values to prevent shell injection:
https:// or http://. Reject if it contains spaces, semicolons, pipes, backticks, or shell metacharacters.^\d+$).Do not pass unvalidated user input into the command.
# Make a GET request (auto-pays)
npx awal@2.0.3 x402 pay https://example.com/api/weather
# Make a POST request with body
npx awal@2.0.3 x402 pay https://example.com/api/sentiment -X POST -d '{"text": "I love this product"}'
# Limit max payment to $0.10
npx awal@2.0.3 x402 pay https://example.com/api/data --max-amount 100000
npx awal@2.0.3 status to check, see authenticate-wallet skill)npx awal@2.0.3 balance to check)search-for-service skill to find services firstawal auth login <email> first, or see authenticate-wallet skillsearch-for-service to find valid endpointsfund skillWeekly Installs
1.4K
Repository
GitHub Stars
78
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
codex1.2K
opencode1.2K
gemini-cli1.2K
github-copilot1.2K
kimi-cli1.1K
amp1.1K
97,600 周安装