TRON x402 Payment Skill for Openclaw

A specialized skill for automating TRC20 token payments to AI agent endpoints using the x402 protocol on the TRON network.

wzc1206
v1.0.0
Feb 6, 2026
1
4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tron-x402-payment

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tron-x402-payment using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is TRON x402 Payment Skill?

The TRON x402 Payment skill is a robust integration designed for developers working with Openclaw Skills to facilitate seamless financial transactions between AI agents. It leverages the x402 protocol to handle 402 Payment Required responses automatically, ensuring that agent-to-agent or user-to-agent interactions are never interrupted by manual payment hurdles. By supporting popular TRC20 tokens like USDT and USDD, this skill empowers decentralized AI ecosystems on the TRON blockchain.

Built with security and developer experience in mind, this skill manages complex blockchain operations such as signing EIP-712 typed data and managing infinite approvals internally. It allows Openclaw Skills users to invoke paid API endpoints with the same ease as free ones, abstracting away the complexities of wallet balances, gas fees, and transaction signing.

TRON x402 Payment Skill Use Cases

  • Invoking paid AI agent endpoints that require USDT or USDD payments per request.
  • Automating discovery of agent capabilities through manifest and entrypoint listing.
  • Handling binary data and image generation results from paid AI services.
  • Managing micro-payments for high-frequency AI model inferences on the TRON network.

How TRON x402 Payment Skill Works

  1. The tool constructs the appropriate endpoint URL based on the provided base URL and entrypoint name.
  2. It initiates an HTTP request to the target agent endpoint.
  3. If the agent returns a 402 Payment Required status, the skill parses the payment requirements, including the amount and asset.
  4. The skill checks the local wallet balance and token allowance; if necessary, it performs an infinite approval transaction.
  5. It signs a payment permit using the configured TRON private key and retries the request with the required X-PAYMENT header.
  6. The final response, including any generated binary data saved to temporary files, is returned to the user.

TRON x402 Payment Skill Setup

To get started with this skill in Openclaw Skills, ensure your TRON environment is configured.

# Set your private key as an environment variable
export TRON_PRIVATE_KEY='your_private_key_here'

# (Optional) For Mainnet usage, set your TronGrid API Key
export TRON_GRID_API_KEY='your_api_key_here'

# Verify your configuration and wallet status
node dist/x402_tron_invoke.js --check

TRON x402 Payment Skill Data Schema & Taxonomy

The TRON x402 Payment skill manages metadata and binary outputs structured as follows:

Feature Description
Wallet Auth Managed via TRON_PRIVATE_KEY or ~/.mcporter/mcporter.json.
Binary Storage Images and binaries are saved to /tmp/x402_...
Response Schema Returns JSON containing file_path, content_type, and bytes for binary data.
Token Config Supports USDT/USDD contracts on Mainnet, Nile, and Shasta.

TRON x402 Payment Skill Advanced Features

  • Automatic infinite approval handling to minimize future transaction friction.
  • Multi-network support spanning TRON Mainnet, Nile Testnet, and Shasta Testnet.
  • Secure wallet status verification tools that prevent private key leakage in logs.
  • Built-in binary and image handling for agents that generate media content.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*