open-aibank

x402-payment-tron

Professionalv0.0.4
By open-aibankUpdated 2026-05-184 versions · latest released 2026-02-03
#Tron#X402#Usdt#Payment#Crypto

According to AlphaMoat, as of 2026-09, x402-payment-tron has 4,715 downloads and 2 stars — ranked #2,012 of 5,078 AI skills overall, and #172 of 465 in Professional.

Installs
157
Downloads
4.7K
Stars
2
Overall Rank
#2,012
Top 40% overall · Top 37% in Professional
PlatformInstallsDownloadsStarsComments
ClawHub ↗1574.7K2-

Platforms count differently and update at different times.

What this skill does

It invokes an HTTP endpoint and handles payment requirements; a TRON private key and wallet funds are required. If allowance is insufficient, it may automatically grant an unlimited approval (MAX_UINT256). Use trusted endpoints, prefer a dedicated low-balance wallet and review payment terms before mainnet use. The prebuilt path needs Node. Verify the selected network; the documented default is nile, and the wallet needs both USDT and TRX for gas. Invoking the payment-aware tool can sign or approve automatically, so offline review must not call it. Load secrets internally through approved configuration, never print or search for keys; remove broad shared-config discovery before sensitive use. Exact or capped approvals require reviewing or changing the documented infinite-approval behavior. Delete temporary binary-response files after use.

Profile published 2026-10-27

What you can do with it

  • Plan paid x402 API calls
  • Review wallet and approval risks

When to use it

  • When the endpoint and payment terms are verified and the transaction is explicitly authorized

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Review this supplied agent manifest offline and list payment and approval risks without invoking the payment tool.
Explain the purpose of a dedicated low-balance wallet without transacting.

Monthly Trend

Downloads4.7K
4.0K4.4K4.8K2026-05 · Downloads 4.0K2026-06 · Downloads 4.2K2026-07 · Downloads 4.4K2026-08 · Downloads 4.5K2026-09 · Downloads 4.7K26-0526-09
Stars2
1232026-05 · Stars 22026-06 · Stars 22026-07 · Stars 22026-08 · Stars 22026-09 · Stars 226-0526-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-094.7K—2
2026-084.5K+2.6%2
2026-074.4K+5.9%2
2026-064.2K+3.1%2
2026-054.0K—2

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 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:
Show all (128 lines)
  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` | - |

Popular in Professional

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.