- Create and fund a testnet wallet
- Deploy and sync a liteserver node
- Connect SDKs to your own node and Toncenter API
- Simulate trace flows and handle deposit or withdrawal logic
- Monitor transaction finality and infrastructure health
Prerequisites
Before starting the integration process, make sure your environment meets the following:System requirements
- macOS, Linux, or WSL (Windows Subsystem for Linux)
- Git and curl installed
- Telegram account (used for faucet access)
Node hardware requirements
- CPU: 16 cores minimum
- RAM: 128 GB
- Storage: 1 TB+ NVMe SSD (64,000+ IOPS)
- Bandwidth: 1 Gbps, 16 TB monthly traffic budget
- Network: Static public IP address
Provider requirements
For production, use self-hosted or dedicated bare-metal servers. If using cloud, choose from the recommended providers list and ensure consistent IOPS, high throughput, and a fixed public IP.Hot wallet setup
Before integrating TON into your backend, you’ll need a hot wallet to run test transactions. A hot wallet is a cryptocurrency wallet that stays connected to the internet, enabling fast transactions. This differs from a cold wallet, which remains offline for long-term storage and maximum security. There are different ways to create hot wallets in TON, and you can choose any method that fits your workflow, but for simplicity, we will use Tonkeeper.Testnet wallets should only be used for development. For production, switch to mainnet to ensure accurate fee calculation, transaction finality, and live trace verification.
Create wallet with Tonkeeper
Tonkeeper is a widely used TON mobile wallet that allows you to create a working address in minutes, which you can later import into your SDK for automated testing. To use Tonkeeper:- Download the Tonkeeper mobile app.
- Go to Settings → Wallets → Add Wallet → Testnet Account.
- Save the 24-word seed phrase securely and copy the generated wallet address.
-
Base64 address – A user-friendly, encoded version designed for readability and safety.
This format includes a checksum to help prevent errors when copying or sending funds.
Example (Base64):UQBlXWdp1eP7W8RGeaH4vM86Y/8rT1hY+7XfF1t4dKQ=
-
Raw HEX address – The low-level representation containing the workchain ID and account ID.
This is the direct blockchain reference to your wallet’s smart contract and is used in technical or SDK-based operations.
Example (Raw HEX):-1:fcb91a3a3816d0f7b8c2c76108b8a9bc5a6b7a55bd79f8ab101c52db29232260
Request testnet Toncoin
Every transaction on TON requires a small amount of Toncoin to cover network gas and forwarding fees. Before you can test deposits, withdrawals, or fee estimation, you’ll need to fund your hot wallet with testnet TON. There are two main ways to do this:Option A – Request from TON team (Recommended)
For CEX integration testing, the most reliable method is to request Testnet funds directly from the TON Support team on Telegram. This way, you’ll have enough balance to run tests continuously without frequent top-ups.Option B – Telegram faucet (Quick Start)
If you only need a small amount for initial or manual testing, use the public faucet:- Open Telegram and start the
@test_giver_ton_bot
. - Paste your testnet wallet address. The bot will send 2 TON to your address.
You can only request once per hour. For repeated or automated testing, use Option A to get a larger Testnet allocation and avoid interruptions.
Verify balance via explorer
After requesting TON, confirm that your wallet has been funded by using one of these official testnet explorers: Paste your wallet address into the search bar. You should see:- Balance:
2 TON
(or more, if you’ve made repeated requests) - Address: (your wallet address)
- State:
uninit
orinactive
If you see
nonexist
, it means the balance of the account is 0 or the contract does not have any data.Core infrastructure: nodes and indexers
To support deposits and withdrawals on TON, your exchange backend needs reliable access to both read blockchain state (balances, account status, confirmations) and write transactions (relaying signed deposits, withdrawals, or contract calls). This requires running a node with liteserver enabled.Node modes
A node can operate in two modes:Mode | Description | Suitable for | Limitations | Example Use Case |
---|---|---|---|---|
Non-archival | Keeps only recent blockchain state; older history is pruned automatically. | Everyday deposit and withdrawal processing where only the latest account state matters. | Cannot retrieve or verify old transactions. History beyond the retention window is unavailable. | Verifying a user deposit made in the last few blocks before crediting their balance. |
Archival | Stores the full blockchain history. Can optionally use TTL/expiry settings to limit how long old data is retained. | Compliance, audits, dispute resolution, or reconstructing account history months later. | Higher storage and infrastructure requirements. If TTL is configured, very old history may still be dropped. | A regulator requests proof of deposits from one year ago, or a customer disputes a withdrawal made six months earlier. |
For production exchanges, an archival node is strongly preferred. It ensures access to the full transaction history, which is critical for compliance and customer support. Non-archival nodes can serve lightweight setups but impose strict limits on historical queries.
Deployment options
You can provision a node in two ways:- Run your own node : Install MyTonCtrl in archival or non-archival mode on dedicated infrastructure. Provides full control over synchronization, networking, and security policies.
- Rent a dedicated node : Providers such as TON Center offer fully configured archival and non-archival nodes. This removes operational overhead while still giving you API access to the blockchain.
API layers
Nodes expose a liteserver endpoint, but it uses a low-level binary protocol that is not practical for exchange integration. Instead, TON Center APIs provide higher-level, developer-friendly access:- v2 API : Real-time account state and transaction submission over HTTP/JSON. Optimized for deposit and withdrawal flows where balances and finality must be verified quickly.
- v3 API : Indexed blockchain history (transactions, traces, receipts) powered by the TON Indexer and PostgreSQL. Essential for large-scale queries, compliance reporting, and customer dispute resolution.
Best Practice
- Use v2 for operational flows (deposits, withdrawals, balance checks).
- Use v3 for historical data, compliance, and large-scale reporting.
- Cross-check critical fields (e.g. transaction hash, block height, finality) across both APIs to combine cryptographic trust with query efficiency.
Install archival node with liteserver
Follow these steps to install and configure an archival node with liteserver using MyTonCtrl.Step 1 - Prepare storage (ZFS)
- Install ZFS:
- Create a pool on your dedicated
<disk>
nameddata
:
- Enable compression:
- Create a dataset and mount it at
/var/ton-work
:
Step 2 - Install MyTonCtrl
Download and run the installer:- Select
liteserver
mode and choose the network. - When prompted
Do you want to download archive blocks via TON Storage?
, enter1
to set up an archive node. - Run installation in the background when asked, as archive sync can take several days.
Step 3 - Run and sync
After installation, the node will download and import all blocks. This may take weeks depending on hardware.Step 4 - Verify sync status
Check synchronization with MyTonCtrl:last_masterchain_block
: latest block your node has syncedpeers
: number of connected nodes (ideally >3)is_working
: confirms the node is actively syncing
Optional — Cross-check with Toncenter API
You can also verify your node’s sync against Toncenter’s v3 API:- Endpoint:
/api/v3/masterchainInfo
- Swagger UI: Toncenter API v3
If
peers = 0
or is_working = false
, check that the correct ports are open, the -d
flag was used during install, and your server has a static IP with stable internet.Step 6 - Connect SDKs to your liteserver
Once your node is running and synced, you can connect to it using SDKs in your backend. This allows you to:- Query account states
- Track transactions
- Fetch traces
Generate your config file
Inside the MyTonCtrl CLI, run:/usr/bin/ton/local.config.json
Copy this file into your project directory (or rename it to config.json
).
Per-language SDK setup
Golang (tonutils-go)
Golang (tonutils-go)
Python (pytoniq)
Python (pytoniq)
JavaScript (ton-lite-client)
JavaScript (ton-lite-client)