Web3 & TON
August 2026
TON Connect 2.0 & Web3 Integration for Telegram Mini Apps
The Open Network (TON) and Telegram represent the largest consumer Web3 ecosystem on the planet. By leveraging TON Connect 2.0, Mini Apps allow users to authenticate non-custodial crypto wallets like Tonkeeper, MyTonWallet, and Telegram Wallet with zero seed phrase exposure.
1. Setting Up the TON Connect Manifest
Host a public tonconnect-manifest.json accessible via HTTPS:
{
"url": "https://zentry.ir",
"name": "Zentry Web3 Platform",
"iconUrl": "https://zentry.ir/assets/images/zentry-icon.png",
"termsOfUseUrl": "https://zentry.ir/terms/",
"privacyPolicyUrl": "https://zentry.ir/policy/"
}
2. Initializing TON Connect UI in Javascript
Mount the official TON Connect UI button inside your Mini App:
import { TonConnectUI } from '@tonconnect/ui';
const tonConnectUI = new TonConnectUI({
manifestUrl: 'https://zentry.ir/tonconnect-manifest.json',
buttonRootId: 'ton-connect-btn'
});
// Listen for wallet connection
tonConnectUI.onStatusChange((wallet) => {
if (wallet) {
console.log('Connected wallet address:', wallet.account.address);
}
});
3. Sending Jettons and TON Transactions
Construct non-custodial payload transfers directly to smart contracts or merchants:
async function sendTonPayment(recipientAddress, nanoTonAmount) {
const transaction = {
validUntil: Math.floor(Date.now() / 1000) + 360,
messages: [
{
address: recipientAddress,
amount: nanoTonAmount.toString() // e.g. "1000000000" for 1 TON
}
]
};
const result = await tonConnectUI.sendTransaction(transaction);
console.log('BOC Payload:', result.boc);
}