TON tooling
Wallets
Wallets allow the addition of custom RPC endpoints either by directly modifying the settings of an existing network or by adding a custom network and specifying a custom RPC endpoint.
To obtain the address of your RPC endpoint, navigate to the node details on the Chainstack console and locate the Execution client HTTPS endpoint in the Access and credentials section.
Note that there are different versions of TON wallets. This is because, essentially, any wallet is a smart contract running on the TON Blockchain. These smart contracts can be configured in different ways and may have different features.
Tonkeeper
This wallet does not offer an option to set custom RPC endpoints through the user interface. However, since the wallet is open-source, you can modify the RPC endpoint directly in the source code. Additionally, the wallet supports switching between different versions of wallet contracts.
To switch to Testnet, go to Settings, click on the Tonkeeper Web icon 5 times, and then change the active network.
MyTonWallet
This wallet does not offer an option to set custom RPC endpoints through the user interface. However, since the wallet is open-source, you can modify the RPC endpoint directly in the source code. Additionally, the wallet supports switching between different versions of wallet contracts.
To switch to Testnet, go to Settings, click on the MyTonWallet label 5 times, and then change the active network.
OpenMask
This wallet offers an option to set custom RPC endpoints through the user interface. It is an open-source MetaMask extension equivalent for TON. The wallet supports switching between different versions of wallet contracts.
To set a custom RPC endpoint, navigate to Wallet Settings.
To switch to Testnet, change the active network in the top menu of the wallet window.
TON Wallet
This wallet does not offer an option to set custom RPC endpoints through the user interface. However, since the wallet is open-source, you can modify the RPC endpoint directly in the source code. The wallet doesn’t support switching between different versions of wallet contracts.
IDEs
Cloud-based IDEs offer the flexibility to use injected providers. By adding a Chainstack RPC node to a wallet and connecting that wallet in your IDE, you can seamlessly interact with the network through the Chainstack node.
There are also multiple TON-related plugins for various IDEs. You can find them on the Awesome List page or the TON Research page.
Nujan IDE
To enable Nujan IDE to interact with the network via a Chainstack node, you can follow these steps:
Install and set up OpenMask to use a Chainstack node for interaction. Refer to the guide on interacting through OpenMask for detailed instructions.
Open the IDE and navigate to the Build & Deploy tab. Click on Connect Wallet and select a wallet with your configured custom RPC endpoint.
Blockchain interaction libraries
TON API types
Note that there are two types of APIs available for interacting with the TON network. The TON HTTP API enables access to indexed blockchain information, providing a way to work with data efficiently. On the other hand, the TON ADNL API offers a secure communication method based on the ADNL protocol, ensuring reliable and protected interactions with the TON network.
TonWeb
Build DApps on the TON Blockchain using TonWeb and custom RPC nodes.
Prerequisites
- Node.js installed on your machine.
- A package manager like npm or yarn.
Initialize a project
Install TonWeb
Initialize connection with a Chainstack RPC Node
Ton.js
Build DApps on the TON Blockchain using Ton.js and custom RPC nodes.
Prerequisites
- Node.js installed on your machine.
- A package manager like npm or yarn.
Initialize a project
Install Ton.js
Initialize connection with a Chainstack RPC Node
TonUtils
Build DApps on the TON Blockchain using TonUtils and custom RPC nodes.
Prerequisites
- Go installed on your machine (version 1.16 or higher).
- A Go package manager like go mod.
Initialize a project
Please make sure that go.mod
contains all required dependencies.
Install TonUtils
Initialize connection with a Chainstack RPC Node
TonGo
Build DApps on the TON Blockchain using tongo and custom RPC nodes.
Prerequisites
- Go installed on your machine (version 1.16 or higher).
- A Go package manager like go mod.
Initialize a project
Install TonGo
Initialize connection with a Chainstack RPC Node
Tonlib-rs
Build DApps on the TON Blockchain using Tonlib-rs and custom RPC nodes.
Prerequisites
- Rust installed on your machine (version 1.56.0 or higher).
- Cargo (the Rust package manager) should be installed as part of the Rust installation.
Install required packages
For Linux, ensure the following packages are installed:
For macOS, ensure the following packages are installed:
For Windows, ensure the following are installed:
CMake: Install via cmake.org
Install libsodium
and other dependencies via vcpkg
:
Initialize a project
Install tonlib-rs
- Open the
Cargo.toml
file in the root of your project. - Add the following dependencies under
[dependencies]
:
Initialize connection with a Chainstack RPC Node
Create a new file named main.rs
in the src
directory and add the following code:
TONsdk
Build DApps on the TON Blockchain using TONsdk and custom RPC nodes.
Prerequisites
- Python installed on your machine (version 3.6.0 or higher).
- pip (Python package manager) should be installed as part of the Python installation.
Initialize a project
Install TONsdk
Initialize connection with a Chainstack RPC Node
Create a new file named main.py
in the project directory and add the following code:
PyTONLib
Build DApps on the TON Blockchain using PyTONLib and custom RPC nodes.
Prerequisites
- Python installed on your machine (version 3.6.0 or higher).
- pip (Python package manager) should be installed as part of the Python installation.
Initialize a project
Install PyTONLib
Initialize connection with a Chainstack RPC Node
Create a new file named main.py
in the project directory and add the following code:
Pytoniq
Build DApps on the TON Blockchain using Pytoniq and custom RPC nodes.
Prerequisites
- Python installed on your machine (version 3.6.0 or higher).
- pip (Python package manager) should be installed as part of the Python installation.
Initialize a project
Install Pytoniq
Initialize connection with a Chainstack RPC Node
Create a new file named main.py
in the project directory and add the following code:
TonSdk.NET
Build DApps on the TON Blockchain using TonSdk.NET and custom RPC nodes.
Prerequisites
- .NET SDK installed on your machine (version 5.0 or higher).
Initialize a project
Install TonSDK.NET
Initialize connection with a Chainstack RPC Node
Replace the contents of the Program.cs
file with the following code:
Development frameworks and toolkits
Blueprint
Build DApps on the TON Blockchain using Blueprint and custom RPC nodes.
Prerequisites
- Node.js installed on your machine (version 18 or higher).
- A package manager like npm or yarn.
Initialize a Blueprint project
Create or update the configuration file
Add to your the project configuration file named blueprint.config.ts
your Chainstack endpoint:
Compile and deploy contracts
Update contracts wrappers and deployment scripts if needed. Compile the contracts:
Pick the appropriate network after running the followind command to deploy the contracts: