# Send x402-payment-tron to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x402-payment-tron",
    "name": "x402-payment-tron",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/Hades-Ye/x402-payment-tron",
    "canonicalUrl": "https://clawhub.ai/Hades-Ye/x402-payment-tron",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/x402-payment-tron",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x402-payment-tron",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package.json",
      "tsconfig.json",
      "src/index.ts",
      "dist/index.js",
      "dist/package.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/x402-payment-tron"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/x402-payment-tron",
    "downloadUrl": "https://openagent3.xyz/downloads/x402-payment-tron",
    "agentUrl": "https://openagent3.xyz/skills/x402-payment-tron/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x402-payment-tron/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x402-payment-tron/agent.md"
  }
}
```
## Documentation

### x402 Payment Protocol for TRON Agents

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

### 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.

### 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.

ParameterTypeRequiredDescriptionurlstringYesFull URL to invokemethodstringNoHTTP method (GET, POST, etc.) Default: GETbodyobjectNoJSON body for the requestnetworkstringNomainnet, nile, shasta (Default: nile)

### Example: Chat with Agent

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

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.

### "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):

The data is automatically saved to a temporary file (e.g., /tmp/x402_image_... or /tmp/x402_binary_...).
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.


Important: The Agent is responsible for deleting the temporary file after it has been used or processed.

### Network Reference

NetworkChain IDCAIP-2USDT ContractTRON Mainnet0x2b6653dceip155:728126428, tron:mainnetTR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6tTRON Nile0xcd8690dceip155:3448148188, tron:nileTXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBfTRON Shasta0x94a9059eeip155:2494104990, tron:shasta-
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Hades-Ye
- Version: 0.0.4
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x402-payment-tron)
- [Send to Agent page](https://openagent3.xyz/skills/x402-payment-tron/agent)
- [JSON manifest](https://openagent3.xyz/skills/x402-payment-tron/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x402-payment-tron/agent.md)
- [Download page](https://openagent3.xyz/downloads/x402-payment-tron)