$ show toncenter/ton-http-api
This repository provides an HTTP API service for interacting with the TON (The Open Network) blockchain. It acts as an intermediary, translating HTTP requests into calls to the TON blockchain via the tonlib library. The service is built with FastAPI and uses a pool of worker processes to communicate with TON nodes, handling load balancing and failover. It supports caching of responses via Redis to reduce load on the blockchain nodes. The service exposes both REST and JSON-RPC endpoints for a wide range of blockchain operations, including querying account information, executing smart contract methods, and sending transactions.
The LLM identified 1 files worth highlighting for reuse:
Provides a decorator for caching async function results in Redis, with the ability to skip caching of error responses. Uses a custom storage class to conditionally cache based on the result value (does not cache if the result has an '@type' of 'error'). Isolated from TON-specific logic, depending only on redis and ring libraries.