| 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 | {"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.
node dist/index.js --url <URL> [options]
Option 2: Development
npm install
npm start -- --url <URL>
Tool Reference
- Wallet: A TRON private key must be available. The skill automatically looks for it in:
TRON_PRIVATE_KEY environment variable.
~/.mcporter/mcporter.json (AIBank standard configuration).
x402-config.json in the current directory.
~/.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:
- Negotiates payment requirements.
- Checks USDT allowance. If insufficient, it performs an infinite approval (MAX_UINT256) to minimize future transactions.
- Signs the payment permit (EIP-712).
- 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
url: https://api.example.com/chat
method: POST
body: {"prompt": "Tell me a joke"}
Agent Discovery