ton-http
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBased on ton-http-api (sources/ton-http) and TON Index (Go) v3. For request parameters and return values of any endpoint, use Swagger UI or OpenAPI doc.json.
TON nodes use ADNL binary transport; an HTTP API is an intermediary that accepts HTTP and talks to TON lite servers (via tonlib). Use the public toncenter.com or run your own instance from the ton-http-api repo. TON Index v3 (at toncenter.com) adds indexed REST APIs (accounts, actions, jettons, NFTs, etc.) on top of stored chain data.
基于ton-http-api(sources/ton-http)和TON Index (Go) v3构建。如需查看任意接口的请求参数和返回值,可使用Swagger UI或OpenAPI doc.json。
TON节点采用ADNL二进制传输协议;HTTP API作为中间层,接收HTTP请求并与TON轻节点(通过tonlib)通信。你可以使用公共服务toncenter.com,也可以从ton-http-api仓库部署自己的实例。TON Index v3(部署在toncenter.com)在已存储的链上数据基础上,新增了索引化的REST API(涵盖账户、操作、Jetton、NFT等)。
Looking up endpoint parameters and return values
查看接口参数和返回值
- Swagger UI (recommended): https://toncenter.com/api/v3/index.html#/ — browse by group, inspect query/body and response schemas.
- OpenAPI JSON: https://toncenter.com/api/v3/doc.json — full machine-readable spec for parameters and models.
When calling or wrapping TON Center APIs, consult the above to confirm query/body parameters and response shapes.
- Swagger UI(推荐): https://toncenter.com/api/v3/index.html#/ —— 按分组浏览,查看查询/请求体及响应结构。
- OpenAPI JSON: https://toncenter.com/api/v3/doc.json —— 包含参数和模型的完整机器可读规范。
在调用或封装TON Center API时,请参考上述资源确认查询/请求体参数及响应格式。
Core References
核心参考文档
| Topic | Description | Reference |
|---|---|---|
| API groups and Swagger | Group list, base URL, where to look up params and return values | core-api-overview |
| Deployment and configuration | Run locally or with Docker; webserver, tonlib, and cache env vars | core-deployment-config |
| 主题 | 描述 | 参考链接 |
|---|---|---|
| API分组与Swagger | 分组列表、基础URL、参数及返回值查询位置 | core-api-overview |
| 部署与配置 | 本地或Docker部署;Web服务器、tonlib及缓存环境变量 | core-deployment-config |
API groups (quick reference)
API分组(快速参考)
From ton-http-api (sources/ton-http)
来自ton-http-api(sources/ton-http)
| Tag | Description | Example endpoints |
|---|---|---|
| accounts | Address info, wallet, balance, state, transactions, pack/unpack, token data | |
| blocks | Masterchain, shards, block lookup, block transactions, block header | |
| transactions | Locate transactions by message | |
| get config | Config param, libraries | |
| run method | Run get-method on contract | |
| send | Send BOC/query, estimate fee | |
| json rpc | All methods via JSON-RPC | |
| 标签 | 描述 | 示例接口 |
|---|---|---|
| accounts | 地址信息、钱包、余额、状态、交易、打包/解包、代币数据 | |
| blocks | 主链、分片、区块查询、区块交易、区块头 | |
| transactions | 通过消息定位交易 | |
| get config | 配置参数、库 | |
| run method | 在合约上运行get-method | |
| send | 发送BOC/查询、估算手续费 | |
| json rpc | 通过JSON-RPC调用所有方法 | |
From TON Index v3 (toncenter.com)
来自TON Index v3(toncenter.com)
| Group | Description | Example endpoints |
|---|---|---|
| accounts | Account states, address book, metadata, wallet states | |
| actions | Actions and traces | |
| api/v2 | Address info, estimate fee, send message, runGetMethod, wallet info | |
| blockchain | Blocks, transactions, messages, masterchain | |
| utils | Decode | |
| dns | TON DNS | |
| jettons | Jetton masters, wallets, transfers, burns | |
| multisig | Multisig wallets and orders | |
| nfts | NFT collections, items, transfers | |
| stats | Top accounts by balance | |
| vesting | Vesting contracts | |
| 分组 | 描述 | 示例接口 |
|---|---|---|
| accounts | 账户状态、地址簿、元数据、钱包状态 | |
| actions | 操作与追踪 | |
| api/v2 | 地址信息、手续费估算、发送消息、runGetMethod、钱包信息 | |
| blockchain | 区块、交易、消息、主链 | |
| utils | 解码 | |
| dns | TON DNS | |
| jettons | Jetton主合约、钱包、转账、销毁 | |
| multisig | 多签钱包与订单 | |
| nfts | NFT集合、物品、转账 | |
| stats | 余额排名靠前的账户 | |
| vesting | 锁仓合约 | |