Providers
TRONSCAN
TRON balances, history, details and blocks through apilist.tronscanapi.com. Needs TRONSCAN_API_KEY.
- provider
- create("tronscan")
- auth
- TRONSCAN_API_KEY
- chains
- TRON
- capabilities
- balance, history, tx detail, block
- endpoint
- apilist.tronscanapi.com
- default chain
- tron
Address it
const tronscan = await create("tronscan"); // TRONSCAN_API_KEY required
await tronscan.getBalance("T…", "tron");
The key travels in the TRON-PRO-API-KEY header. Single chain, UnsupportedChainError elsewhere.
What it reads
Account detail for the balance, the transaction list for history, transaction info for one, block detail for a block.
Gotchas
- Sun, six decimals.
balanceFormattedis TRX. - TRON hashes are 64 hex characters without
0x, soclassifyInputon this chain treats such a string as a transaction. - No token or contract reads and no fee data.
Where it lives
src/providers/tronscan.ts.