TON Blockchain Hello World: A Beginner's Guide to Wallet Creation and Management

·

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:

Mainnet vs. Testnet: Choosing Your Network

TON offers two blockchain variants:

NetworkCharacteristicsBest For
MainnetReal TON blockchain using actual TON coinsProduction environments, real transactions
TestnetSimulated environment with free test coinsDevelopment 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

  1. Visit TON Wallets and select Tonkeeper from the list
  2. Install the Tonkeeper mobile app and launch it
  3. 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:

"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:

  1. Tap the upper-left corner to copy your address OR
  2. Select "Receive" to view your address

Sample TON wallet address:

kQCJRglfvsQzAIF0UAhkYH6zkdGPFxVNYMH1nPTN_UpDqEFK

Step 4: Funding and Deploying Your Wallet

  1. Funding: Send 2 TON to your address (use Testnet Faucet for test coins)
  2. 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:

Programmatic Wallet Access

Development Environment Setup

Prerequisites:

Install required packages:

npm install @ton/ton @ton/crypto @ton/core @orbs-network/ton-access

Key Operations

  1. Address Calculation (Offline)

    import { WalletContractV4 } from "@ton/ton";
    const wallet = WalletContractV4.create({ publicKey, workchain: 0 });
    console.log(wallet.address.toString());
  2. Reading Wallet State

    const client = new TonClient({ endpoint });
    const balance = await client.getBalance(wallet.address);
    const seqno = await walletContract.getSeqno();
  3. 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!