x402-payment-demo
Demo of x402 payment protocol by fetching a protected image. Triggers: 'demo x402-payment'
Why use this skill?
Learn how to use the x402-payment-demo skill to automate TRON network payments and fetch protected resources with your OpenClaw AI agent.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hades-ye/x402-payment-demoWhat This Skill Does
The x402-payment-demo skill serves as a functional implementation reference for the x402 payment protocol, specifically tailored for the TRON blockchain ecosystem. Designed for OpenClaw agents, this skill automates the complex handshake required when encountering a 402 Payment Required status code. Instead of failing when a protected resource is requested, the skill coordinates with the network to process the necessary payment, sign the required permits, and successfully unlock the content. In this specific demo, the skill fetches a protected image from the AIBank infrastructure. It manages the entire lifecycle: from initial request and protocol-mandated payment negotiation to the secure display of the image and the subsequent cleanup of temporary local files to maintain agent system hygiene. It is an essential tool for developers looking to understand how to bridge AI agent autonomy with decentralized payment rails.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/hades-ye/x402-payment-demo
Ensure that your environment has the necessary TRON wallet dependencies configured, as the agent will require signing capabilities to fulfill payment obligations on the Nile, Shasta, or Mainnet testnets.
Use Cases
This skill is primarily intended for developers and researchers exploring the intersection of AI agents and micro-payments. It is perfect for testing pay-per-request API architectures, verifying TRON network smart contract interactions, and building proof-of-concept autonomous commerce systems where an agent must purchase data or compute resources on its own initiative.
Example Prompts
- "demo x402-payment"
- "Please run the x402-payment-demo skill to fetch the protected image from the TRON Nile network."
- "Execute the x402-payment-demo and show me the result once the transaction is confirmed."
Tips & Limitations
By default, the skill targets the TRON Nile testnet, which is the safest environment for development. Ensure you have testnet tokens in your configured wallet before running the skill. While the skill automatically handles file cleanup, always ensure your agent has appropriate file-system permissions. The skill currently focuses on image retrieval; extending this logic to other data types will require customizing the response handling section of the source code found in the openclaw/skills repository.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hades-ye-x402-payment-demo": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: network-access, file-write, file-read, external-api
Related Skills
newsriver-global-intelligence
Professional Quantitative Intelligence & DeFi Execution for AI Agents. 10 years of news-price correlation, Enso DeFi super-aggregator (200+ DEXs, 15+ chains), cross-chain bridge (Across Protocol), and Privy TEE-secured wallets.
AB-Agents-Vision-MiniMax
👁️ Image analysis via MiniMax VL API. Describe images, extract text from screenshots, analyze photos. Requires MiniMax Token Plan API key (free tier available).
AB-Agents-Vision
👁️ Image analysis using MiniMax VL API. Describe images, extract text from screenshots, analyze photos. Works with local files and URLs. Simple shell wrapper.
send-usd
Send USD from one agent to another.
feishu-sticker
Send images as native Feishu stickers. Features auto-upload, caching, and GIF-to-WebP conversion.