@erudite-intelligence/x402-tron
v1.0.0
Published
x402 payment scheme plugin for Tron (TRC-20 USDT) — enables x402 agentic payments on the Tron network via TronTransferAuthorization wrapper contract
Downloads
19
Maintainers
Readme
@erudite/x402-tron
x402 payment scheme plugin for Tron (TRC-20 USDT)
The first x402 facilitator implementation on the Tron network. Enables HTTP 402 agentic payments using USDT TRC-20 through the TronTransferAuthorization wrapper contract.
Built by Erudite Intelligence LLC — FinCEN MSB Registered.
Quick Start
For Facilitator Operators (Server Side)
import { registerExactTronScheme } from "@erudite/x402-tron/exact/server";
// Register Tron support with your x402 facilitator
registerExactTronScheme(server, {
tronWebConfig: {
fullHost: "https://api.trongrid.io",
privateKey: process.env.FACILITATOR_PRIVATE_KEY,
},
});For AI Agents / Payers (Client Side)
import { createPayment, encodePaymentHeader } from "@erudite/x402-tron/exact/client";
// Create a signed payment
const payment = await createPayment({
privateKey: "YOUR_PRIVATE_KEY",
to: "MERCHANT_TRON_ADDRESS",
amount: "1000000", // 1 USDT (6 decimals)
});
// Send as X-PAYMENT header
const header = encodePaymentHeader(payment);
const response = await fetch(url, {
headers: { "X-PAYMENT": header },
});Contract Details
| Field | Value |
|-------|-------|
| Contract | THGkLBrLY1G5VovZjjK1jP9upyxRdMNL3b |
| Chain | Tron Mainnet |
| Token | USDT TRC-20 (TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) |
| Protocol Fee | 0.25% (immutable, on-chain) |
| Facilitator | http://49.13.47.185:3000 |
Fees
- Protocol fee: 0.25% — hardcoded on-chain, immutable, no admin override
- No monthly fees, no signup fees, no minimum volume
- Compare: Stripe 2.9% + $0.30, PayPal 2.99%
USDT Amount Reference
| USDT | Raw Value | |------|-----------| | $0.01 | 10000 | | $0.10 | 100000 | | $1.00 | 1000000 | | $10.00 | 10000000 | | $100.00 | 100000000 |
API
Server (Facilitator)
import { registerExactTronScheme, verifyPayment, settlePayment } from "@erudite/x402-tron/exact/server";registerExactTronScheme(server, config)— Register scheme with facilitatorverifyPayment(payload, expectedTo, expectedAmount, config)— Verify authorizationsettlePayment(payload, config)— Execute on-chain settlement
Client (AI Agent / Payer)
import { createPayment, payFor, encodePaymentHeader } from "@erudite/x402-tron/exact/client";createPayment(options)— Create signed payment authorizationpayFor(paymentRequired, privateKey)— Auto-pay from a 402 responseencodePaymentHeader(payload)— Encode for X-PAYMENT header
Testing
Check facilitator health:
curl http://49.13.47.185:3000/healthLicense
MIT — Erudite Intelligence LLC © 2026
