ワンクリックで
x402-payment
Pay for x402-enabled Agent endpoints using ERC20 tokens (USDT/USDC) on EVM or TRC20 tokens (USDT/USDD) on TRON.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Pay for x402-enabled Agent endpoints using ERC20 tokens (USDT/USDC) on EVM or TRC20 tokens (USDT/USDD) on TRON.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Execute token swaps, manage liquidity, and query market data on SunSwap DEX via the sun-cli.
Create meme tokens on SunPump (`sun sunpump launch`), trade them — both pre-launch (bonding curve via `sun sunpump buy/sell`) and post-launch (SunSwap via `sun swap`) — and query token info, rankings, holders, portfolios, and trade history.
Use when the user asks to generate an X/Twitter daily digest or says phrases such as "生成X日报", "生成 x 日报", "X日报", "推特日报", "Twitter digest", or wants an agent to analyze their own X/Twitter mentions, home timeline, reply opportunities, and daily social-media summaries. This skill is API-only.
Use when the user wants to install or authorize xurl for X/Twitter, generate "生成X日报", "X日报", "推特日报", or "Twitter digest" from the local xurl CLI, or optionally register/troubleshoot the hosted X MCP bridge.
BANK OF AI account query and recharge skill. Use for requests like 'recharge 1 usdt', '给 BANK OF AI 充值 1 USDT', or to query BANK OF AI balance/orders. Recharge uses the remote MCP endpoint https://recharge.bankofai.io/mcp with the single `recharge` tool.
Use when the user asks to create a wallet, check wallet addresses, sign transactions or messages, switch active wallets, or perform any blockchain signing operation using the agent-wallet CLI. Supports EVM and TRON networks.
| name | x402-payment |
| description | Pay for x402-enabled Agent endpoints using ERC20 tokens (USDT/USDC) on EVM or TRC20 tokens (USDT/USDD) on TRON. |
| version | 1.6.0 |
| author | bankofai |
| homepage | https://bankofai.io |
| tags | ["crypto","payments","x402","agents","api","usdt","usdd","usdc","tron","ethereum","evm","erc20","trc20"] |
| requires_tools | ["x402_invoke"] |
| arguments | {"url":{"description":"Base URL of the agent (v2) or full URL (v1/Discovery)","required":true},"entrypoint":{"description":"Entrypoint name to invoke (e.g., 'chat', 'search')","required":false},"input":{"description":"Input object to send to the entrypoint","required":false},"method":{"description":"HTTP method (GET/POST). Default: POST (v2), GET (Direct)","required":false},"network":{"description":"Network name (nile, mainnet, bsc-testnet, bsc)","required":false}} |
| dependencies | ["mcp-server-tron"] |
Invoke x402-enabled AI agent endpoints with automatic token payments on both TRON (TRC20) and EVM-compatible (ERC20) chains.
The x402-payment skill enables agents to interact with paid API endpoints. When an agent receives a 402 Payment Required response, this skill handles the negotiation, signing, and execution of the payment using the x402_invoke tool.
This release uses the modular BankofAI x402 SDK 1.0 packages, including Exact V2-compatible payload generation for EVM and TRON and TRON exact_gasfree.
Breaking changes vs 1.5.x:
- The
exact_permitscheme is gone from SDK 1.0; endpoints still advertisingexact_permit(pre-1.0 servers) are no longer payable and must upgrade toexact(Permit2-based in SDK 1.0).- EVM support is limited to BSC (
eip155:56/eip155:97); the formereip155:*wildcard coverage of other EVM chains was removed.
Wallet required: Run
agent-wallet listfirst.
If no wallets exist, invokebankofai-guide(Section C — Wallet Guard) before proceeding.
AGENT_WALLET_PASSWORD (required), AGENT_WALLET_DIR (optional).AGENT_WALLET_PRIVATE_KEY / AGENT_WALLET_MNEMONIC.AGENT_WALLET_MNEMONIC_ACCOUNT_INDEX.agent-wallet. It does not scan raw private keys from generic config files or unrelated MCP server configs.TRON_GRID_API_KEY is optional. Recommended on Mainnet to reduce rate-limit issues.@bankofai/x402-tron/gasfree. The tool prefers exact_gasfree over exact. GasFree requires an account with sufficient token balance in its GasFree wallet; inactive accounts can be activated on first payment when the advertised fees permit it.EVM_RPC_URL_56 (BSC mainnet) and EVM_RPC_URL_97 (BSC testnet) for non-default RPC endpoints; each network reads its own var so a custom RPC never bleeds across chains.npm install in the x402-payment/ directory before first use.TRON_GRID_API_KEY can also be set in x402-config.json.Before making payments, verify your wallet status:
npx tsx x402-payment/src/x402_invoke.ts --check
Most modern x402 agents use the v2 "invoke" pattern:
npx tsx x402-payment/src/x402_invoke.ts \
--url https://api.example.com \
--entrypoint chat \
--input '{"prompt": "Your query here"}' \
--network nile
npx tsx x402-payment/src/x402_invoke.ts --url https://api.example.com/.well-known/agent.json
npx tsx x402-payment/src/x402_invoke.ts --url https://api.example.com/entrypoints
Query GasFree wallet information (address, activation status, balance, nonce). Defaults: network=mainnet, wallet=agent-wallet active TRON wallet.
# Default: mainnet + active TRON wallet
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info
# Specify wallet address
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info --wallet <YOUR_WALLET_ADDRESS>
# Specify network
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info --network nile
# Both
npx tsx x402-payment/src/x402_invoke.ts --gasfree-info --wallet <YOUR_WALLET_ADDRESS> --network nile
Without --wallet, requires a configured TRON wallet from agent-wallet. Returns JSON with gasFreeAddress, active, allowSubmit, nonce, and per-token assets (balance, fees).
Activate a GasFree account that has not been activated yet. Use --gasfree-info first to check activation status.
Defaults: network=nile, token=USDT.
# Default: nile + USDT
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate
# Specify network
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate --network mainnet
# Specify network and token
npx tsx x402-payment/src/x402_invoke.ts --gasfree-activate --network nile --token USDT
Requires: TRON wallet configured in agent-wallet. Wallet must have enough tokens to cover activation fees (~3.05 USDT on nile). If the account is already activated, returns {"status": "already_active"} immediately.
Activation process:
activateFee + transferFee + 1 token from wallet to gasFreeAddress (on-chain TRC20)Returns JSON with status, depositTxId, gasFreeTraceId, gasFreeState, gasFreeTxHash, and final active status.
--network nile (testnet) or mainnet.--network bsc-testnet (testnet) or bsc (mainnet).| Chain | Network Name | Common Tokens | USDT Contract |
|---|---|---|---|
| TRON | mainnet | USDT, USDD | TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
| TRON | nile | USDT, USDD | TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf |
| BSC | bsc | USDT, USDC | 0x55d398326f99059fF775485246999027B3197955 |
| BSC | bsc-testnet | USDT, USDC, DHLU | 0x337610d27c682E347C9cD60BD4b3b107C9d34dDd |
[!CAUTION] Wallet Secret Safety: NEVER output wallet private keys or mnemonic phrases to logs or console. Use agent-wallet managed configuration.
[[ -n $AGENT_WALLET_PASSWORD ]] && echo "Configured" || echo "Missing" to verify local mode configuration without leaking secrets.npx tsx x402-payment/src/x402_invoke.ts --check to safely verify addresses.If the endpoint returns an image or binary data:
/tmp/x402_image_...).file_path, content_type, and bytes.If allowance is insufficient, the tool will automatically attempt an "infinite approval" transaction. Ensure you have native tokens (TRX or BNB/ETH) for gas.
Ensure you have enough USDT/USDC/USDD in your wallet on the specified network.
Set X402_DEBUG=1 to include full error stack traces in the JSON output when troubleshooting failures.