APN TRON payments for AI agents

Agent Payment Node (APN) sends native TRX and canonical USDT on TRON mainnet from a local software wallet. An AI agent prepares each transfer with a total TRX resource cap, and the owner approves it in a foreground terminal. This page covers the assets, commands, fee cap, owner limits and recovery.

Updated

Which TRON assets can an AI agent send with APN?

Only two assets exist on this path: native TRX (native:trx) and canonical TRON USDT at TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t. Both use six decimal places. APN checks the USDT contract's six-decimal response before token preparation or evidence acceptance.

  • Arbitrary TRC-20 assets, TRC-10 assets, delegated permission signing, self-transfers and arbitrary signing or broadcasting are outside this payment profile.
  • A recipient may be a canonical Base58Check address or a 42-digit hex address beginning with 41. APN normalizes it to Base58Check.
  • The local sender must already be an activated normal TRON account. Receiving only TRC-20 USDT does not activate an address, so a wallet can show a USDT balance and still be unable to send.

Which wallet profiles work on TRON?

ProfileDirect transfer
Local localAvailable. Needs an activated sender, foreground policy and transfer approval.
Coinbase coinbase-awalBlocked: pinned_provider_has_no_tron_rail
MetaMask metamask-smart-accountBlocked: pinned_provider_has_no_tron_rail
MetaMask metamask-agent-walletBlocked: pinned_provider_has_no_tron_rail

TRON x402, gas sponsorship and other gasless execution, and bridge execution from TRON are unavailable for every profile. These capabilities are not inherited from an EVM provider or from the presence of USDT. TRON is a bridge destination for the NEAR 1Click lanes. See bridges and wallets.

Which owner allowlist rail applies to TRON transfers?

The direct rail. TRX and USDT start denied, and a transfer must fit two owner decisions.

  1. The owner allowlist policy must admit the asset on the direct rail. Its per-operation and daily caps apply.
  2. The chain policy, admitted in a foreground terminal, caps the total resource fee in TRX and enforces its own per-transfer and UTC-daily principal limits.
{ "chain": "tron:00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc", "kind": "token", "identifier": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "rail": "direct", "maximumPerTransferAtomic": "3000000", "dailyLimitAtomic": "10000000" }

That row is the repository's example for TRON USDT. The caps are examples only. Both checks run at prepare and again before signing. See security.

How do I send TRX or USDT on TRON from an AI agent?

Create the wallet, set an explicit public HTTPS RPC, set the chain policy, then prepare and approve. There is no default TRON endpoint. --accept-risk true is mandatory because APN and the unlocked macOS user session hold the signing capability.

apn wallet ensure-tron --profile tron-local --provider local --accept-risk true
export APN_TRON_RPC_URL=https://your-tron-mainnet-api.example
export APN_TRON_RPC_MIN_POST_INTERVAL_MS=1000
apn wallet balance-tron --profile tron-local --asset trx
apn wallet balance-tron --profile tron-local --asset usdt

apn policy admit-tron --profile tron-local --asset usdt \
  --max-per-transfer 1 --daily-limit 3 --max-fee-trx 30

apn pay transfer prepare-tron --profile tron-local --asset usdt \
  --to <tron-recipient> --amount 1 --max-fee-trx 30 \
  --idempotency-key tron-usdt-example-001

apn pay transfer approve --operation <operation-id>
apn operation status --operation <operation-id>
apn operation resume --operation <operation-id>
apn receipt get --operation <operation-id>

For TRX, use --asset trx with the same commands. The repository's TRX example uses --max-per-transfer 2 --daily-limit 5 --max-fee-trx 2. The values only illustrate syntax. Amounts and fee caps must be positive canonical decimals with at most six fractional digits. Run apn wallet capabilities-tron to inspect the capability matrix without network access.

Over MCP, the dedicated tools are apn_wallet_ensure_tron, apn_wallet_balance_tron, apn_wallet_capabilities_tron and apn_pay_transfer_prepare_tron. Policy admission and approval are reachable only through apn_foreground_handoff, which returns the exact CLI command.

What does --max-fee-trx cap on TRON?

--max-fee-trx is the owner's ceiling for all native resource debit of one operation. APN derives a transaction-specific maximum no greater than that ceiling, shows it at approval, and requires the sender's TRX balance to cover it.

  • TRX to an activated recipient: the frozen transaction's Bandwidth bytes times the current Bandwidth price.
  • TRX to an absent recipient: APN supports native account activation. It uses the larger of the ordinary Bandwidth maximum and the system activation fee plus the fixed account-creation Bandwidth fallback.
  • USDT: the transaction's caller Energy fee_limit plus its Bandwidth maximum. A TRC-20 recipient incurs no activation component. USDT still needs a separate TRX balance for the full frozen maximum.

Staked Bandwidth or Energy may reduce the fee eventually burned, but it does not raise the frozen ceiling. APN records actual Bandwidth use and burn, Energy use and burn and any activation component in terminal evidence. There is no TRON rent component.

How long is a prepared TRON transfer valid?

Bandwidth price, Energy price, activation fees and the maximum fee_limit are dynamic governance parameters. APN reads the next maintenance time, then the parameters, then the head once. It binds the exact values into the operation and sets expiry to at most 120 seconds, strictly before the next maintenance boundary. Fewer than ten seconds remaining returns APN_REPREPARE_REQUIRED before signing.

  • Approval needs foreground stdin and stderr attached to a TTY. The owner types the displayed phrase within 60 seconds or the shorter transaction expiry.
  • APN signs at most one permission-0 transaction with one signature and no memo. A USDT approval makes about 13 TRON requests before the broadcast.
  • By default APN starts at most two TRON POSTs per second. APN_TRON_RPC_MIN_POST_INTERVAL_MS accepts an integer from 0 to 1000.
  • Keyless public TRON APIs answer bursts with HTTP 429, which APN reports as APN_RPC_RATE_LIMITED.

What happens if a TRON transfer is interrupted?

Local signing stores the exact signed transaction in encrypted custody before submission, and submission intent is durable before the first broadcast. Once a broadcast may have occurred, approval replay, status and resume never send it again. See recovery.

  • operation resume uses APN_TRON_RPC_URL for one bounded solidified-history observation of the same transaction ID. --observe-only true is refused on this rail.
  • A missing acknowledgment, missing solidified history or incomplete evidence leaves the operation unknown_finality. Keep observing. Do not prepare a replacement payment.
  • Completion needs the exact signed transaction in the exact solidified block and actual fees within the frozen maximum. USDT also needs exactly one canonical Transfer log from the canonical contract with the exact sender, recipient and amount.
  • If solidified history never shows the transaction after expiry, the owner can run apn operation abandon --operation <operation-id> in a foreground terminal. The outcome stays unknown, and the profile can prepare a new transfer.

Can an agent swap TRX for USDT with APN?

Yes. apn swap tron sunswap swaps native TRX for canonical USDT through the SunSwap V2 router. It uses no API key and no off-chain quote. Price and reserves come from the pinned router and pair, the transaction is encoded locally, and only the owner's local TRON key signs it. This uses the swap rail, so the owner must admit both TRX and USDT on it. Commands and pins are on the swaps page.

Questions

Can an AI agent send USDT on TRON with APN?

Yes, from a local software wallet that is an activated TRON account. APN sends canonical USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t after the owner admits it and approves the transfer.

Does the sender need TRX to send USDT?

Yes. USDT transfers need a separate TRX balance that covers the full frozen maximum: Energy fee_limit plus Bandwidth.

Is there a default TRON RPC endpoint?

No. Set APN_TRON_RPC_URL to a public HTTPS API base. URL credentials, query parameters and non-443 ports are rejected.

Can Coinbase or MetaMask wallets send on TRON through APN?

No. All three provider profiles are blocked with pinned_provider_has_no_tron_rail.

Sources
  1. tron.md: assets, policy, fee cap, approval, recovery
  2. allowlist-direct-integration.md: direct rail and TRON example
  3. sunswap.md: SunSwap V2 swap
  4. lifi.md: NEAR 1Click lanes to TRON