v0.5.7
v0.5.7 - Fallback RPC for TRON Mainnet
Release date: March 30, 2026
New
- Fallback RPC endpoint for mainnet: When
TRON_GRID_API_KEYis not set, the SDK now automatically routes TRON mainnet RPC calls tohttps://hptg.bankofai.ioinstead of the rate-limited TronGrid endpoint. This eliminates setup friction for developers who don't have a TronGrid API key. WhenTRON_GRID_API_KEYis set, behavior is unchanged. - Warning on fallback usage: Both Python (
logger.warning) and TypeScript (console.warn) emit a one-time warning when the fallback endpoint is activated, so operators are aware of the routing. getTronRpcUrl()helper (TypeScript): New exported function for fallback-aware TRON RPC URL resolution.TRON_MAINNET_FALLBACK_URLconstant (Python): Exported constant for the fallback endpoint URL.
Changes
resolveRpcUrl()in TypeScript now delegates togetTronRpcUrl()for TRON networks, ensuring fallback logic applies consistently across all URL resolution paths.TronClientSigner.getTronWeb()uses the new helper instead of directly indexingTRON_RPC_URLS.
Breaking Changes
None. Existing behavior when TRON_GRID_API_KEY is set is fully preserved.
Affected SDKs
- Python:
bankofai-x402==0.5.7 - TypeScript:
@bankofai/x402@0.5.7