Providers
TONAPI
Balances and history on TON through tonapi.io, Jetton transfers included and failed ones omitted. Keyless.
- provider
- create("ton")
- auth
- none
- chains
- TON (The Open Network)
- capabilities
- balance, history
- endpoint
- tonapi.io
- default chain
- ton
Address it
const ton = await create("ton");
await ton.getTxHistory("…", "ton", { limit: 20 });
What it reads
/v2/accounts/:address for the balance and /v2/accounts/:address/events for history. Each event becomes a Transaction; a TON transfer sets the value, anything else marks isContractInteraction, and Jetton transfers inside an event become tokenTransfers with the Jetton's own decimals.
Gotchas
- Nanotons, nine decimals.
- A failed Jetton transfer is dropped from
tokenTransfersrather than listed as if it moved anything. - TONAPI has no block lookup compatible with a single block number, so
getBlockInfostays unsupported.getTxDetailtoo: history is the only transaction read. - Addresses come in several encodings and the provider passes them through as typed; the explorer page does not normalise them.
Where it lives
src/providers/ton.ts.