Introduction to TON Blockchain
TON (The Open Network) blockchain operates using TON Coin (previously called TonCoin) as its native cryptocurrency. Similar to ETH on Ethereum, TON coins are used to pay transaction fees (gas) when executing operations on the network. If you're engaging with the TON ecosystem, you likely already hold some TON coins and may possess a wallet.
This comprehensive tutorial will walk you through:
- Creating a new TON wallet using a wallet application
- Programmatically accessing your wallet
- Understanding wallet functionality within the TON ecosystem
Mainnet vs. Testnet: Choosing Your Network
TON offers two blockchain variants:
| Network | Characteristics | Best For |
|---|---|---|
| Mainnet | Real TON blockchain using actual TON coins | Production environments, real transactions |
| Testnet | Simulated environment with free test coins | Development testing, practice |
While testnets are attractive for beginners due to their free nature, experienced developers often prefer mainnet for its reliability and realistic conditions. TON transactions are remarkably affordable—approximately $0.01 per transaction—making mainnet practical even for extensive testing.
Step-by-Step Wallet Setup
Step 1: Creating Your Wallet with Tonkeeper
- Visit TON Wallets and select Tonkeeper from the list
- Install the Tonkeeper mobile app and launch it
For testnet usage (optional):
- Navigate to Settings > Tap Tonkeeper logo 5 times
- Enable "Developer Menu" > Select "Switch to Testnet"
Step 2: Securing Your Recovery Phrase
Upon creation, Tonkeeper displays your 24-word recovery phrase. This critical backup:
- Provides sole access to your funds
- Must be stored securely (never share digitally)
- Uses mnemonic encoding for error-resistant recording
"Your recovery phrase is like the master key to your digital vault—guard it accordingly."
Step 3: Examining Your Wallet Address
Locate your wallet address in Tonkeeper:
- Tap the upper-left corner to copy your address OR
- Select "Receive" to view your address
Sample TON wallet address:
kQCJRglfvsQzAIF0UAhkYH6zkdGPFxVNYMH1nPTN_UpDqEFKStep 4: Funding and Deploying Your Wallet
- Funding: Send 2 TON to your address (use Testnet Faucet for test coins)
Deployment: Initiate an outgoing transfer (0.01 TON suggested)
- This automatically deploys your wallet contract
- Expect a small fee (~0.0136 TON)
👉 Get started with TON wallet deployment
Understanding Wallet Contracts
Wallet Versions Explained
TON has released multiple wallet contract versions (v1-v4). Your Tonkeeper wallet likely uses v4 r2, visible in blockchain explorers like Tonscan.
Key facts:
- Same mnemonic can generate different addresses across versions
- Version differences affect functionality and security features
- Always verify your contract version when programmatically accessing
Programmatic Wallet Access
Development Environment Setup
Prerequisites:
- Node.js v16+
- TypeScript support
- IDE (Visual Studio Code recommended)
Install required packages:
npm install @ton/ton @ton/crypto @ton/core @orbs-network/ton-accessKey Operations
Address Calculation (Offline)
import { WalletContractV4 } from "@ton/ton"; const wallet = WalletContractV4.create({ publicKey, workchain: 0 }); console.log(wallet.address.toString());Reading Wallet State
const client = new TonClient({ endpoint }); const balance = await client.getBalance(wallet.address); const seqno = await walletContract.getSeqno();Sending Transactions
await walletContract.sendTransfer({ secretKey, messages: [internal({ to: address, value: "0.05" })] });
👉 Explore advanced TON wallet operations
Frequently Asked Questions
Is my wallet address secure to share?
Yes, wallet addresses are public information. Sharing enables others to send you TON but doesn't grant spending access.
Can I recover funds if I lose my recovery phrase?
No, the 24-word phrase is irreplaceable. Without it, funds become permanently inaccessible.
Why does my balance show zero after restoration?
You might be viewing a different wallet version. Verify you're checking the correct contract version associated with your funds.
How long do transactions take?
TON transactions typically confirm within 5-10 seconds due to its 5-second block time.
What's the cost of wallet deployment?
Deployment costs approximately 0.0136 TON (about $0.01 at current rates).
Conclusion
This guide has equipped you with fundamental TON wallet management skills, from basic setup to programmatic interaction. The TON ecosystem offers extensive possibilities for developers, with wallet integration being your first step toward building sophisticated blockchain applications.
For continued learning:
Happy coding on TON blockchain!