Rechercher

PythonReactSEOPDF
OpenClaw

x402_payment_tron

Pay for x402-enabled Agent endpoints using USDT on TRON

hades-ye0 installations selon la source☆ 0 Étoiles du dépôtv1.0.0

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install hades-ye/x402-payment-tron

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

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:
    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
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 o...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/hades-ye/x402-payment-tron
Version
1.0.0
Commit
5ff419485fcef343ab5cff875d24260665bae3b9
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

Contenu extrait

SKILL.md
# 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` o...

Skills associés

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.