Skip to content

Commit 78c0979

Browse files
committed
fixes
1 parent 2d35f88 commit 78c0979

File tree

1 file changed

+66
-60
lines changed

1 file changed

+66
-60
lines changed

ecosystem/rpc/overview.mdx

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,118 +3,124 @@ title: "Overview"
33
description: "Understand the main ways to access the TON blockchain."
44
---
55

6+
import { Aside } from '/snippets/aside.jsx';
7+
68
## Types of API
79

810
TON exposes several access layers for interacting with the blockchain, each serving different needs:
911

10-
- **HTTP API** - standard web access for querying accounts, blocks, and sending transactions.
11-
- **Indexed API** - database-backed API providing structured, decoded, and historical data.
12+
- **HTTP API** - standard web access for querying accounts, blocks, and sending transactions.
13+
- **Indexed API** - database-backed API providing structured, decoded, and historical data.
1214
- **ADNL** - low-level peer-to-peer protocol for direct communication with nodes.
1315

14-
<Note>
15-
**Indexed vs Non-Indexed**
16-
In TON, APIs differ by how deeply they process data before returning it.
17-
**Non-indexed APIs** fetch results from liteservers through `tonlibjson`. They’re simple and fast, but the data comes directly from the node: no decoding, joins, or long-term history.
18-
**Indexed APIs** run an indexer alongside a node. The indexer reads blocks from RocksDB, decodes transactions and actions, and stores them in PostgreSQL for structured access.
19-
That extra database layer makes it possible to query decoded, historical, and aggregated data without talking to the node directly.
20-
</Note>
21-
22-
16+
<Aside type="note">
17+
**Indexed vs Non-Indexed**\
18+
In TON, APIs differ by how deeply they process data before returning it.\
19+
**Non-indexed APIs** fetch results from liteservers through `tonlibjson`. They’re simple and fast, but the data comes directly from the node: no decoding, joins, or long-term history.\
20+
**Indexed APIs** run an indexer alongside a node. The indexer reads blocks from RocksDB, decodes transactions and actions, and stores them in PostgreSQL for structured access.\
21+
That extra database layer makes it possible to query decoded, historical, and aggregated data without talking to the node directly.
22+
</Aside>
2323

2424
## HTTP API
2525

26-
The HTTP API exposes the TON blockchain through both **REST** and **JSON-RPC** interfaces.
26+
The HTTP API exposes the TON blockchain through both **REST** and **JSON-RPC** interfaces.\
2727
It allows developers to fetch account and wallet information, explore blocks and transactions, send messages, call smart contract methods, and more.
2828

29-
<Note>
30-
For production, it’s recommended to integrate at least two providers to ensure uptime.
31-
</Note>
29+
<Aside type="note">
30+
For production, it’s recommended to integrate at least two providers to ensure uptime.
31+
</Aside>
3232

3333
### Typical use cases
34-
- Querying accounts, balances, or transactions
35-
- Sending messages or deploying smart contracts
36-
- Building wallets and basic dApps
34+
35+
- Querying accounts, balances, or transactions
36+
- Sending messages or deploying smart contracts
37+
- Building wallets and basic dApps
3738

3839
### Run your own instance
39-
Use the open-source [ton-http-api](https://github.com/toncenter/ton-http-api) to host your own endpoint.
40+
41+
Use the open-source [ton-http-api](https://github.com/toncenter/ton-http-api) to host your own endpoint.
4042

4143
## Indexed API
4244

43-
Indexed APIs extend HTTP functionality by offering structured, decoded, and historical blockchain data.
45+
Indexed APIs extend HTTP functionality by offering structured, decoded, and historical blockchain data.\
4446
They are built on top of the **TON Indexer**, which reads data from a full node, decodes transactions and actions, and stores them in a PostgreSQL database for efficient querying.
4547

4648
These APIs power explorers and analytics tools that need complex searches or decoded data.
4749

4850
### Typical use cases
49-
- Blockchain explorers and analytics dashboards
50-
- Historical or decoded transaction queries
51-
- NFT and Jetton tracking
5251

53-
### HTTP vs Indexer
52+
- Blockchain explorers and analytics dashboards
53+
- Historical or decoded transaction queries
54+
- NFT and Jetton tracking
5455

55-
| Type | Best for | What you get |
56-
| --- | --- | --- |
57-
| **HTTP** | Sending messages or performing standard read requests | Data processed by `tonlib` and served through liteservers over REST or JSON-RPC. Useful for querying accounts, balances, or transactions without indexing overhead. |
58-
| **Indexer** | Accessing decoded, historical, or aggregated data | Responses served from an indexing database built from a full node’s data. Ideal for explorers, analytics, and structured blockchain queries. |
56+
### HTTP vs Indexer
5957

58+
| Type | Best for | What you get |
59+
| ----------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60+
| **HTTP** | Sending messages or performing standard read requests | Data processed by `tonlib` and served through liteservers over REST or JSON-RPC. Useful for querying accounts, balances, or transactions without indexing overhead. |
61+
| **Indexer** | Accessing decoded, historical, or aggregated data | Responses served from an indexing database built from a full node’s data. Ideal for explorers, analytics, and structured blockchain queries. |
6062

61-
<Tip>
62-
Prefer **Indexed APIs** for nearly all read operations, as they provide broader coverage, better performance, and decoded data.
63-
Use **HTTP APIs** when you need to **send messages or transactions** directly to the network.
64-
</Tip>
63+
<Aside type="tip">
64+
Prefer **Indexed APIs** for nearly all read operations, as they provide broader coverage, better performance, and decoded data.\
65+
Use **HTTP APIs** when you need to **send messages or transactions** directly to the network.
66+
</Aside>
6567

6668
### Run your own instance
67-
Use the open-source [ton-indexer](https://github.com/toncenter/ton-indexer) to host your own endpoint.
69+
70+
Use the open-source [ton-indexer](https://github.com/toncenter/ton-indexer) to host your own endpoint.
6871

6972
## ADNL API
7073

71-
**ADNL (Abstract Datagram Network Layer)** is TON’s peer-to-peer protocol for direct node communication.
74+
**ADNL (Abstract Datagram Network Layer)** is TON’s peer-to-peer protocol for direct node communication.\
7275
It provides verifiable, low-level access to blockchain data and transaction submission.
7376

7477
Clients connect directly to **liteservers** using a binary protocol, downloading key blocks, account states, and Merkle proofs to verify data authenticity.
7578

7679
For read operations (such as `runGetMethod`), the client executes a local TVM run using the verified state, without downloading the full blockchain.
7780

7881
### Typical use cases
79-
- Running validators or custom node software
80-
- Building node management and monitoring tools
82+
83+
- Running validators or custom node software
84+
- Building node management and monitoring tools
8185
- Applications requiring Merkle-proof validation
8286

8387
### HTTP vs ADNL
8488

85-
| Type | Best for | What you get |
86-
| --- | --- | --- |
89+
| Type | Best for | What you get |
90+
| -------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8791
| **HTTP** | General-purpose access to blockchain data and message submission | Returns processed data produced by `tonlib` through liteservers, exposed over REST or JSON-RPC. The data is already parsed and formatted for applications, not a raw or verifiable ledger snapshot. |
88-
| **ADNL** | Direct and verifiable access to the blockchain state | Native peer-to-peer protocol used by TON nodes. Provides binary responses with Merkle proofs, allowing clients to verify the authenticity of account states and transactions directly. |
92+
| **ADNL** | Direct and verifiable access to the blockchain state | Native peer-to-peer protocol used by TON nodes. Provides binary responses with Merkle proofs, allowing clients to verify the authenticity of account states and transactions directly. |
8993

90-
<Tip>
91-
For most applications, prefer an **Indexed API** for reads, because it provides broader coverage and faster, decoded data.
92-
Use **HTTP** when you need to **send messages or transactions** directly to the network.
93-
Choose **ADNL** for low-level, verifiable access or when running your own node or validator infrastructure.
94-
</Tip>
94+
<Aside type="tip">
95+
For most applications, prefer an **Indexed API** for reads, because it provides broader coverage and faster, decoded data.\
96+
Use **HTTP** when you need to **send messages or transactions** directly to the network.\
97+
Choose **ADNL** for low-level, verifiable access or when running your own node or validator infrastructure.
98+
</Aside>
9599

96100
### Run your own instance
101+
97102
Use [MyTonCtrl](../node/setup-mytonctrl) to enable a liteserver and expose an ADNL endpoint.
98103

99104
## Providers
100105

101106
### Official providers
102107

103-
| Provider | Type | Public Endpoints | Docs |
104-
| --- | --- | --- | --- |
105-
| [TON Center API v2](https://github.com/toncenter/ton-http-api) | HTTP | `https://toncenter.com/api/v2/`, `https://testnet.toncenter.com/api/v2/` | [Docs](./toncenter/get-api-key) |
106-
| [TON Center API v3](https://github.com/toncenter/ton-indexer) | Indexer | `https://toncenter.com/api/v3/` | [Docs](./toncenter/get-api-key) |
107-
| [dTON](https://t.me/dtontech_bot) | ADNL | Provided by dTON via [request through official bot](https://t.me/dtontech_bot) ||
108-
| Public liteservers | ADNL | `https://ton.org/global-config.json`, `https://ton.org/testnet-global.config.json` ||
108+
| Provider | Type | Public Endpoints | Docs |
109+
| -------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------- | ------------------------------- |
110+
| [TON Center API v2](https://github.com/toncenter/ton-http-api) | HTTP | `https://toncenter.com/api/v2/`, `https://testnet.toncenter.com/api/v2/` | [Docs](./toncenter/get-api-key) |
111+
| [TON Center API v3](https://github.com/toncenter/ton-indexer) | Indexer | `https://toncenter.com/api/v3/` | [Docs](./toncenter/get-api-key) |
112+
| [dTON](https://t.me/dtontech_bot) | ADNL | Provided by dTON via [request through official bot](https://t.me/dtontech_bot) | |
113+
| Public liteservers | ADNL | `https://ton.org/global-config.json`, `https://ton.org/testnet-global.config.json` | |
109114

110115
### Third party providers
111-
| Provider | Type | Public Endpoints | Docs |
112-
| --- | --- | --- | --- |
113-
| [Chainstack](https://chainstack.com/build-better-with-ton/) | HTTP, Indexer, ADNL | Access via dashboard or project workspace | [Docs](https://docs.chainstack.com/reference/getting-started-ton#getting-started-ton) |
114-
| [TON API](https://docs.tonconsole.com/tonapi) | Indexer | `https://testnet.tonapi.io`,`https://tonapi.io` | [Docs](https://docs.tonconsole.com/tonapi) |
115-
| [Ankr](https://www.ankr.com/rpc/ton/) | HTTP | `https://rpc.ankr.com/http/ton_api_v2` | [Docs](https://www.ankr.com/docs/rpc-service/chains/chains-api/ton/) |
116-
| [QuickNode](https://www.quicknode.com/chains/ton) | HTTP | Access via dashboard or project workspace | [Docs](https://www.quicknode.com/docs/ton) |
117-
| [Tatum](https://tatum.io/) | HTTP, Indexer | `https://ton-mainnet.gateway.tatum.io`, `https://ton-testnet.gateway.tatum.io` | [Docs](https://docs.tatum.io/guides/blockchain/the-open-network-ton) |
118-
| [GetBlock](https://getblock.io/nodes/ton/) | HTTP | `https://ton.getblock.io/mainnet/`, `https://ton.getblock.io/testnet/` | [Docs](https://docs.getblock.io/api-reference/the-open-network-ton) |
119-
| [Chainbase](https://chainbase.com/) | HTTP | Access via dashboard or project workspace | [Docs](https://docs.chainbase.com/api-reference/overview) |
120-
| [NowNodes](https://nownodes.io/nodes/ton) | HTTP, Indexer | `https://ton-open-api.nownodes.io/v2`, `https://ton-index.nownodes.io/api/v3` | [Docs](https://nownodes.gitbook.io/ton-toncoin) |
116+
117+
| Provider | Type | Public Endpoints | Docs |
118+
| ----------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
119+
| [Chainstack](https://chainstack.com/build-better-with-ton/) | HTTP, Indexer, ADNL | Access via dashboard or project workspace | [Docs](https://docs.chainstack.com/reference/getting-started-ton#getting-started-ton) |
120+
| [TON API](https://docs.tonconsole.com/tonapi) | Indexer | `https://testnet.tonapi.io`,`https://tonapi.io` | [Docs](https://docs.tonconsole.com/tonapi) |
121+
| [Ankr](https://www.ankr.com/rpc/ton/) | HTTP | `https://rpc.ankr.com/http/ton_api_v2` | [Docs](https://www.ankr.com/docs/rpc-service/chains/chains-api/ton/) |
122+
| [QuickNode](https://www.quicknode.com/chains/ton) | HTTP | Access via dashboard or project workspace | [Docs](https://www.quicknode.com/docs/ton) |
123+
| [Tatum](https://tatum.io/) | HTTP, Indexer | `https://ton-mainnet.gateway.tatum.io`, `https://ton-testnet.gateway.tatum.io` | [Docs](https://docs.tatum.io/guides/blockchain/the-open-network-ton) |
124+
| [GetBlock](https://getblock.io/nodes/ton/) | HTTP | `https://ton.getblock.io/mainnet/`, `https://ton.getblock.io/testnet/` | [Docs](https://docs.getblock.io/api-reference/the-open-network-ton) |
125+
| [Chainbase](https://chainbase.com/) | HTTP | Access via dashboard or project workspace | [Docs](https://docs.chainbase.com/api-reference/overview) |
126+
| [NowNodes](https://nownodes.io/nodes/ton) | HTTP, Indexer | `https://ton-open-api.nownodes.io/v2`, `https://ton-index.nownodes.io/api/v3` | [Docs](https://nownodes.gitbook.io/ton-toncoin) |

0 commit comments

Comments
 (0)