Skip to content

Commit b46eb16

Browse files
authored
Update getblock-ton-api.md
1 parent b969fa9 commit b46eb16

File tree

1 file changed

+22
-32
lines changed

1 file changed

+22
-32
lines changed
Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
# TON API by GetBlock
22

33
:::tip TON Infrastructure Status
4-
* [status.toncenter](https://status.toncenter.com/) - various statistics of nodes activity during the last hour.
5-
* [Tonstat.us](https://tonstat.us/) - a real-time Grafana, updated every 5 minutes.
4+
* [status.toncenter](https://status.toncenter.com/) - Provides various statistics of node activity in the last hour.
5+
* [Tonstat.us](https://tonstat.us/) - A real-time Grafana dashboard that updates every 5 minutes.
66
:::
77

8-
This guide will cover essential steps in acquiring and using private RPC endpoints by GetBlock to access the TON blockchain.
8+
This guide covers essential steps in acquiring and using private RPC endpoints by GetBlock to access the TON blockchain.
99

1010
:::info
11-
[GetBlock](https://getblock.io/) is a Web3 infrastructure provider, offers HTTP-based API endpoints for clients to interact with various blockchain networks, including TON.
11+
[GetBlock](https://getblock.io/) is a Web3 infrastructure provider that offers HTTP-based API endpoints for clients to interact with multiple blockchain networks, including TON.
1212
:::
1313

1414
## How to Access TON Blockchain Endpoints
15-
To start using GetBlock’s endpoints, users are required to log in to their account, retrieve a TON endpoint URL, and they're good to go. Follow along for more detailed guidance.
15+
To start using GetBlock’s endpoints, users need to log in to their accounts, and retrieve a TON endpoint URL. Follow these instructions:
1616

1717
### 1. Create a GetBlock Account
18-
Visit the GetBlock [website](https://getblock.io/?utm_source=external&utm_medium=article&utm_campaign=ton_docs) and locate the Get Started for Free button on the main page. Sign up for an account with your email address or by connecting a MetaMask wallet.
18+
Visit the GetBlock [website](https://getblock.io/?utm_source=external&utm_medium=article&utm_campaign=ton_docs) and click on the "Get Started for Free" button. Sign up using your email address or by connecting your MetaMask wallet.
1919

2020
![**GetBlock.io_main_page**](/img/docs/getblock-img/unnamed-2.png?=RAW)
2121

2222

2323
### 2. Select the TON Blockchain
24-
After signing in, you’ll be redirected to the dashboard. Locate the section titled "My Endpoints" and select "TON" under the "Protocols" dropdown menu.
25-
26-
Choose the desired network and API type (JSON-RPC or JSON-RPC(v2)).
24+
After signing in, go to the "My Endpoints" section. Choose TON from the "Protocols" dropdown menu and select the desired network and API type (JSON-RPC or JSON-RPC(v2)).
2725

2826
![**GetBlock_account__dashboard**](/img/docs/getblock-img/unnamed-4.png)
2927

3028
### 3. Generate Your Endpoint URL
31-
Click on the “Get” button to generate your TON blockchain endpoint URL.
32-
33-
All endpoints within the GetBlock API follow a consistent structure: `https://go.getblock.io/[ACCESS TOKEN]/`.
29+
Click the “Get” button to generate your TON blockchain endpoint URL. The structure of the endpoint will be: `https://go.getblock.io/[ACCESS TOKEN]/`.
3430

35-
These access tokens serve as unique identifiers for each user or application and contain information necessary for routing the request to appropriate endpoints without revealing sensitive details. It essentially replaces the need for separate authorization headers or API keys.
31+
Access tokens act as unique identifiers for your requests, eliminating the need for separate API keys or authorization headers.
3632

3733
Users have the flexibility to generate multiple endpoints, roll tokens if compromised, or delete unused endpoints.
3834

@@ -42,11 +38,7 @@ Now, you can use these URLs to interact with the TON blockchain, query data, sen
4238

4339
### Free Requests and User Limits
4440

45-
Please note that every registered GetBlock user receives 40,000 free requests capped at 60 RPS (Requests per Second). The request balance is renewed daily and can be utilized on any shared endpoints across supported blockchains.
46-
47-
For enhanced features and capabilities, users have the option to explore paid options, which will be outlined below.
48-
49-
GetBlock.io offers two types of plans: Shared Nodes and Dedicated Nodes. Clients can choose the tariff based on their requirements and budget.
41+
Each registered user receives 40,000 free requests per day, with a cap of 60 requests per second (RPS). This balance is renewed daily and can be used for any supported blockchain.
5042

5143
### Shared Nodes
5244

@@ -62,19 +54,19 @@ As developers scale their applications and require additional resources, they ca
6254
### Dedicated Nodes
6355

6456
- One node is exclusively allocated to a single client;
65-
No request limits;
57+
- No request limits;
6658
- Opens access to archive nodes, a variety of server locations, and custom settings;
6759
- Guarantees premium-level service and support to clients.
6860

6961
This is a next-level solution for developers and decentralized applications (dApps) that require enhanced throughput, higher speed of node connection, and guaranteed resources as they scale.
7062

7163
## How to use TON HTTP API by GetBlock
7264

73-
In this section, we'll delve into the practical usage of the TON HTTP API provided by GetBlock. We'll explore examples to showcase how to effectively utilize the generated endpoints for your blockchain interactions.
65+
In this section, we delve into the practical usage of the TON HTTP API provided by GetBlock. We explore the examples to showcase how to effectively utilize the generated endpoints for your blockchain interactions.
7466

7567
### Examples of common API calls
7668

77-
Let's begin with a simple example using the ‘/getAddressBalance’ method to retrieve the balance for a specific address using the curl command.
69+
You can use the ‘/getAddressBalance’ method to get the balance for a specific TON address:
7870

7971
curl --location --request GET 'https://go.getblock.io/[ACCESS-TOKEN]/getAddressBalance?address=EQDXZ2c5LnA12Eum-DlguTmfYkMOvNeFCh4rBD0tgmwjcFI-' \
8072

@@ -90,23 +82,21 @@ Some other available methods to query the TON blockchain:
9082

9183
| # | Method | Endpoint | Description |
9284
|---|--------|--------------------|------------------------------------------------------------------------------------------------------------|
93-
| 1 | GET | getAddressState | returns the current status (uninitialized, active, or frozen) of a specified address on the TON blockchain |
94-
| 2 | GET | getMasterchainInfo | Fetches information about the state of the masterchain |
95-
| 3 | GET | getTokenData | Retrieves details about an NFT or Jetton associated with a specified TON account |
96-
| 4 | GET | packAddress | Converts a TON address from its raw format to a human-readable format |
97-
| 5 | POST | sendBoc | Sends serialized BOC files along with external messages to the blockchain for execution |
85+
| 1 | GET | getAddressState | Returns the current state of a specified address (uninitialized, active, or frozen). |
86+
| 2 | GET | getMasterchainInfo | Fetches the state of the masterchain. |
87+
| 3 | GET | getTokenData | Retrieves details about an NFT or Jetton associated with the address. |
88+
| 4 | GET | packAddress | Converts a TON address from raw format to human-readable format. |
89+
| 5 | POST | sendBoc | Sends serialized BOC files with external messages for blockchain execution. |
9890

99-
Please refer to GetBlock's [documentation](https://getblock.io/docs/ton/json-rpc/ton_jsonrpc/) for a comprehensive API reference with examples and a list of additional methods.
91+
For a comprehensive list of methods and detailed API documentation, please refer to GetBlock's [documentation](https://getblock.io/docs/ton/json-rpc/ton_jsonrpc/).
10092

10193
### Deploying smart contracts
10294

103-
Developers can utilize the same endpoint URLs to seamlessly deploy contracts onto the TON blockchain using the TON library.
104-
105-
The library will initialize a client to connect to the network via the GetBlock HTTP API endpoints.
95+
Developers can utilize the TON library to deploy and interact with contracts. The library will initialize a client to connect to the network via the GetBlock HTTP API endpoints.
10696

10797
![**Image from TON Blueprint IDE**](/img/docs/getblock-img/unnamed-6.png)
10898

109-
This tutorial should provide a comprehensive guide for developers looking to utilize GetBlock's API with the TON Blockchain effectively.
99+
By following this guide, developers can easily access the TON blockchain using GetBlock's infrastructure. Whether you're working on decentralized applications (dApps) or simply querying data, GetBlock simplifies the process by offering ready-to-use HTTP API endpoints with various features.
110100

111-
Feel free to learn more from the [website](https://getblock.io/?utm_source=external&utm_medium=article&utm_campaign=ton_docs) or drop a line to GetBlock’s support via live chat, [Telegram](https://t.me/GetBlock_Support_Bot), or a website form.
101+
Feel free to learn more at the [website](https://getblock.io/?utm_source=external&utm_medium=article&utm_campaign=ton_docs) or drop a line to GetBlock’s support via live chat, [Telegram](https://t.me/GetBlock_Support_Bot), or a website form.
112102

0 commit comments

Comments
 (0)