Loading...
Loading...
Pay for x402-enabled Agent endpoints using ERC20 tokens (USDT/USDC) on EVM or TRC20 tokens (USDT/USDD) on TRON.
npx skill4agent add bofai/skills x402-paymentx402-payment402 Payment Requiredx402_invokeAGENT_WALLET_PASSWORDAGENT_WALLET_DIRAGENT_WALLET_PRIVATE_KEYAGENT_WALLET_MNEMONICAGENT_WALLET_MNEMONIC_ACCOUNT_INDEXTRON_GRID_API_KEYGASFREE_API_KEYGASFREE_API_SECRETexact_gasfreeexact_permitnpm installx402-payment/TRON_GRID_API_KEYGASFREE_API_KEYGASFREE_API_SECRETx402-config.jsonnpx tsx x402-payment/src/x402_invoke.ts --checknpx tsx x402-payment/src/x402_invoke.ts \
--url https://api.example.com \
--entrypoint chat \
--input '{"prompt": "Your query here"}' \
--network nilenpx tsx x402-payment/src/x402_invoke.ts --url https://api.example.com/.well-known/agent.jsonnpx tsx x402-payment/src/x402_invoke.ts --url https://api.example.com/entrypoints# 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 nileGASFREE_API_KEYGASFREE_API_SECRET--walletgasFreeAddressactiveallowSubmitnonceassets--gasfree-info# 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 USDTGASFREE_API_KEYGASFREE_API_SECRET{"status": "already_active"}activateFee + transferFee + 1 tokenstatusdepositTxIdgasFreeTraceIdgasFreeStategasFreeTxHashactive--network nilemainnet--network bsc-testnetbsc| Chain | Network Name | Common Tokens | USDT Contract |
|---|---|---|---|
| TRON | | USDT, USDD | |
| TRON | | USDT, USDD | |
| BSC | | USDT, USDC | |
| BSC | | USDT, USDC, DHLU | |
[!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"npx tsx x402-payment/src/x402_invoke.ts --check/tmp/x402_image_...file_pathcontent_typebytesX402_DEBUG=1