Skip to content

v2.0.0 — Canonical TRON Networks and Pending Settlement

Choose a tag to compare

@roger-gan roger-gan released this 18 Sep 08:13
· 52 commits to develop since this release
96c3436

Version 2.0.0 makes decimal TRON CAIP-2 identifiers canonical and hardens receipt-backed settlement
when a transaction has been broadcast but final on-chain status is not yet known. The release keeps
deprecated hexadecimal network aliases as accepted inputs, normalizes them at boundaries, and
preserves transaction IDs in non-terminal settlement_pending responses so callers can reconcile
without rebroadcasting. Wallet adapters and runnable examples also support the typed transaction
artifacts and strict per-network resolution introduced by @bankofai/agent-wallet 3.0.

Upgrade Notes

  • Upgrade @bankofai/x402-tron to 2.0.0, @bankofai/x402-core to 1.1.1, and
    @bankofai/x402-evm to 1.1.1 together.
  • Upgrade example and application wallet integrations to @bankofai/agent-wallet 3.0 or newer.
    Use the raw_secret, wallet_cli, or privy providers; the former local_secure password flow
    is no longer available.
  • Replace configured and persisted hexadecimal TRON network identifiers with tron:728126428
    (mainnet), tron:3448148188 (Nile), or tron:2494104990 (Shasta).
  • Hexadecimal aliases remain accepted for migration, but newly emitted values and internal lookups
    use decimal identifiers.
  • Treat settlement_pending as non-terminal. Preserve its transaction ID and reconcile that
    transaction rather than resubmitting the authorization.
  • The default HTTP facilitator timeout is now 120 seconds; override timeoutMs only when the
    deployment has a different confirmation budget.

Reliability Changes

  • TRON receipt confirmation waiting is configurable and defaults to 90 seconds across exact,
    upto, batch-settlement, and GasFree paths.
  • Confirmed reverts remain terminal failures, while unavailable or indeterminate post-broadcast
    receipts return settlement_pending with the original transaction ID.
  • GasFree settlement validates relayer transaction IDs and rejects success responses that do not
    identify a transaction.
  • Settlement reconciliation is single-shot and does not rebroadcast an already submitted payment.
  • EVM and TRON wallet adapters accept agent-wallet 3.0 typed transaction artifacts while retaining
    compatibility with structural legacy signing results.
  • Runnable examples normalize deprecated hexadecimal TRON network aliases before resolving strict
    agent-wallet 3.0 wallets, and server-side PAY_TARGETS filtering follows the same matching rules
    as clients.
  • Legacy main, module, and types package metadata now points to files present in the published
    tarballs.

Verification

  • pnpm format:check: 17/17 workspace tasks passed.
  • pnpm lint:check: 17/17 workspace tasks passed.
  • pnpm build:release: forced release build passed for all 17 packages.
  • pnpm test: all 34 workspace tasks passed without using the build cache.
  • pnpm -r typecheck in examples/typescript: all 30 runnable example projects passed.
  • pnpm test in examples/typescript: all 4 payment-target configuration tests passed.
  • Core integration tests: 31/31 passed.
  • EVM and TRON exact examples passed on BSC testnet and TRON Nile.
  • All three npm tarballs contain the expected generated declarations and versions, with no remaining
    workspace: dependency ranges; the EVM and TRON tarballs depend on
    @bankofai/x402-core@~1.1.1.

Release Artifacts

  • @bankofai/x402-tron@2.0.0
  • @bankofai/x402-core@1.1.1
  • @bankofai/x402-evm@1.1.1

Implemented in PR #96,
PR #98, and
PR #101.