open-aibank

x402-payment-tron

專業領域v0.0.4
作者:open-aibank更新於 2026-05-18共 4 個版本 · 最新版本釋出於 2026-02-03
#Tron#X402#Usdt#Payment#Crypto

據 AlphaMoat 統計,截至 2026-09,x402-payment-tron 累計下載 4,715 次、獲 2 個星標,在全部 5,078 個 AI 技能中排名第 2,012 位,在「專業領域」分類(465 個)中排名第 172 位。

累計安裝
157
累計下載
4715
星標
2
全站排名
#2,012
全站前 40% · 「專業領域」前 37%
平台累計安裝累計下載星標評論
ClawHub ↗15747152-

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

呼叫 HTTP 端點並處理支付要求;需 TRON 私鑰和錢包資金。額度不足時可能自動執行無限授權(MAX_UINT256)。僅呼叫可信端點,優先使用專用低餘額錢包,並在主網使用前審核支付要求。 預先建置路徑需 Node。核對網路,文件預設 nile,錢包除 USDT 還需 TRX 支付 gas。呼叫支付工具會自動簽名或授權,離線審閱不得呼叫它。金鑰僅經獲准設定內部載入,不列印或自行搜尋;敏感使用前移除廣泛共享設定探測。精確或封頂授權需審查或修改現有無限授權實作;使用後清理暫時二進位回應檔案。

資料釋出於 2026-10-27

可以用來做什麼

  • 規劃 x402 付費 API 呼叫
  • 審查錢包及授權風險

什麼時候用

  • 端點與付款條件已核實,且交易獲明確授權時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

離線審閱這份已提供的代理 manifest,列出付款與授權風險,不呼叫支付工具。
不交易,說明專用低餘額錢包的作用。

月度資料趨勢

累計下載4715
3996438247682026-05 · 累計下載 40492026-06 · 累計下載 41762026-07 · 累計下載 44232026-08 · 累計下載 45402026-09 · 累計下載 471526-0526-09
星標2
1232026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 226-0526-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094715—2
2026-084540+2.6%2
2026-074423+5.9%2
2026-064176+3.1%2
2026-054049—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

4.3 KB · ClawHub v0.0.4
---
name: x402_payment_tron
description: "Pay for x402-enabled Agent endpoints using USDT on TRON"
version: 1.0.0
author: x402-protocol
homepage: https://x402.org
metadata: {"clawdbot":{"emoji":"💳","env":["TRON_PRIVATE_KEY"]}}
tags: [crypto, payments, x402, agents, api, usdt, tron]
requires_tools: [x402_tron_invoke]
arguments:
展開全部(共 128 行)
  agent_url:
    description: "Base URL of the x402 agent"
    required: false
  endpoint:
    description: "Entrypoint name to invoke (e.g., 'chat', 'search')"
    required: false
---

# x402 Payment Protocol for TRON Agents

Invoke x402-enabled AI agent endpoints with automatic USDT micropayments on TRON.

## Quick Start

### Option 1: Run Pre-built (Recommended for Agents)
The skill is pre-bundled into a single file. No installation required.
```bash
node dist/index.js --url <URL> [options]
```

### Option 2: Development
```bash
npm install
npm start -- --url <URL>
```

## Tool Reference

- **Wallet**: A TRON private key must be available. The skill automatically looks for it in:
  1. `TRON_PRIVATE_KEY` environment variable.
  2. `~/.mcporter/mcporter.json` (AIBank standard configuration).
  3. `x402-config.json` in the current directory.
  4. `~/.x402-config.json` in the home directory.
- **USDT on TRON**: Wallet needs USDT and some TRX for gas.

---

## Tool Reference

### x402_tron_invoke

Invokes an HTTP endpoint. If payment is required (402), it automatically:
1. Negotiates payment requirements.
2. Checks USDT allowance. If insufficient, it performs an **infinite approval** (MAX_UINT256) to minimize future transactions.
3. Signs the payment permit (EIP-712).
4. Retries the request with the payment signature.

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Full URL to invoke |
| `method` | string | No | HTTP method (GET, POST, etc.) Default: GET |
| `body` | object | No | JSON body for the request |
| `network` | string | No | `mainnet`, `nile`, `shasta` (Default: `nile`) |

### Example: Chat with Agent

```tool:x402_tron_invoke
url: https://api.example.com/chat
method: POST
body: {"prompt": "Tell me a joke"}
```

---

## Agent Discovery

You can discover available endpoints and their pricing by checking the agent's manifest.

### Fetch Agent Manifest

```tool:x402_tron_invoke
url: https://api.example.com/.well-known/agent.json
method: GET
```

---

## Security Rules for Agents

- **No Private Key Output**: The Agent MUST NOT print, echo, or output the `TRON_PRIVATE_KEY` or any other signing secret to the dialogue context.
- **Internal Loading Only**: The Agent should rely on the skill or underlying scripts to load the key internally.
- **No Export Commands**: The Agent MUST NOT execute shell commands that contain the private key as a literal string (e.g., `export TRON_PRIVATE_KEY=...`).
- **Sanitized Logs**: Ensure that logs or error messages do not leak the key.

## Troubleshooting

### "Private key not found"
Ensure the `TRON_PRIVATE_KEY` environment variable is set or a valid `x402-config.json` exists in the expected locations. 
**Agent Note**: If this error occurs, simply inform the user that the environment is not configured. DO NOT attempt to search for or read private keys from files yourself.

### "Insufficient Allowance"
The tool will attempt to broadcast an **infinite approve** transaction. This requires TRX for gas. Ensure your wallet has TRX.

### "Transaction Failed"
Check if you have enough USDT and TRX.

---

## Binary and Image Handling

If the endpoint returns an image (Content-Type: `image/*`) or binary data (`application/octet-stream`):
1. The data is automatically saved to a temporary file (e.g., `/tmp/x402_image_...` or `/tmp/x402_binary_...`).
2. The tool returns a JSON object with:
    - `file_path`: Path to the temporary file.
    - `content_type`: The MIME type of the content.
    - `bytes`: File size in bytes.
3. **Important**: The Agent is responsible for deleting the temporary file after it has been used or processed.

---

## Network Reference

| Network | Chain ID | CAIP-2 | USDT Contract |
|---------|----------|--------|---------------|
| TRON Mainnet | 0x2b6653dc | `eip155:728126428`, `tron:mainnet` | `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` |
| TRON Nile | 0xcd8690dc | `eip155:3448148188`, `tron:nile` | `TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf` |
| TRON Shasta | 0x94a9059e | `eip155:2494104990`, `tron:shasta` | - |

「專業領域」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。