Coin98
English
English
  • Coin98
  • Products
    • Coin98 AI Wallet
    • Coin98 Telegram Wallet
      • How to create a Coin98 Telegram Wallet
      • General Settings
      • How to invite friends on Coin98 Telegram Wallet
      • How to create/import a hot wallet on Coin98 Telegram Wallet
      • How to activate a wallet on Coin98 Telegram Wallet
      • How to manage blockchains on Coin98 Telegram Wallet
      • How to use Watch-only Wallet
      • How to retrieve Seed Phrase/Private key on Coin98 Telegram Wallet
      • How to buy cryptocurrency by fiat on Coin98 Telegram Wallet
      • How to Send a Token
      • How to Receive tokens
      • How to swap natively on Coin98 Telegram Wallet
      • How to contact Live Chat on the Coin98 Telegram Wallet
    • Coin98 Super Wallet
      • Mobile
        • Coin98 Super Wallet V16 UI Overview
        • Getting Started
          • How to download and install Coin98 Super Wallet
          • General Settings
          • How to automatically update Coin98 Super Wallet
          • How to manage notifications on Coin98 Super Wallet
          • How to create or import a Multichain Wallet to Coin98 Super Wallet
          • How to buy cryptocurrency by fiat on Coin98 Super Wallet?
          • How to add a contact on Coin98 Super Wallet
          • FAQs
            • What is the difference between Private Key and Seed phrase?
            • Do I have to backup every time my Wallet updates?
            • Does Coin98 Super Wallet hold my funds?
            • I can't find an answer to my question. Where do I find an answer?
        • Wallet Management
          • How to activate a wallet on Coin98 Super Wallet
          • How to show Seed Phrase / Private key
          • How to import Multi-chain wallets to Coin98 Super Wallet
          • How to switch a single-chain wallet to another chain wallet on Coin98 Super Wallet
          • How to use Seed Phrase Recover Tool
          • How to connect Hardware Wallet on Coin98 Super Wallet
          • How to use Watch-only Wallet
          • How to rename/remove Wallet
          • FAQ: Why did I recover a wallet but my balance shows 0 and the addresses are changed?
        • Social Wallet
          • How to create a Social Wallet
          • How to restore a Social Wallet logged via Email
          • How to manage a Social Wallet
        • Zen Card Wallet
          • How to Create a Zen Card Wallet
          • How to Restore a Zen Card Wallet
          • Migrate Hot Wallets to Zen Card
          • How to Manage Zen Card
          • How to Setup and Manage a Profile for eCard
          • How to Redeem Zen Gift
          • How to Use Zen Card
          • FAQs
        • Asset Management
          • How to manage blockchains on Coin98 Super Wallet
          • How to add Custom Blockchain on Coin98 Super Wallet
          • How to withdraw tokens from Binance to Coin98 Super Wallet
          • How to create a send request for someone
          • How to Send a Token
          • How to send a token to multiple addresses
          • How to add a Custom Token on Coin98 Super Wallet
          • How to Receive (Deposit) a Token
          • How to hide/unhide tokens on Coin98 Super Wallet
          • How to create a token using Token Issuer
          • How to create a portfolio on Coin98 Super Wallet
          • How to track portfolio on Coin98 Super Wallet
          • FAQs
            • Balances Not Loading or Showing on my wallet
            • Why can't I send USDT to other wallets?
        • NFTs
          • How to create a NFT using NFT Issuer
          • How to Receive (Deposit) an NFT
          • How to Send NFT
          • How to send multiple NFTs to an address
          • NFTverse
            • How to buy NFT in Coin98 Super Wallet
            • How to list an NFT on Marketplace
        • SwapX
          • How to swap tokens natively on SwapX
          • How to convert tokens on SwapX?
          • FAQs
            • Why did my transaction fail?
            • What is gas setting
            • Why did I have to pay gas fees for a failed transaction?
            • What is slippage tolerance
            • What is inverse rate
            • What is Unlimited approval?
            • What is Transaction Deadline
            • FAQs
        • BOBA Points - On-chain Rewards Program
          • How to earn BOBA
        • Futures
          • How to trade Futures on Coin98 Super Wallet
        • OneID
          • OneID Profile: Log in with OneID, Manage Profile and Get OneID Referral Link
          • How to link a wallet to a OneID on Coin98 Super Wallet
          • How to use OneID on Coin98 Super Wallet
          • How to perform KYC Verification on Coin98 Super Wallet
        • Stake Master
          • How to unstake Coin98 Staking V1
          • How to use Coin98 PowerPool on Coin98 Super Wallet
          • How to use Dynamic Rate Staking on Coin98 Super Wallet
        • Coin98 Messenger
          • How to change Messenger settings
          • How to start new conversation in Coin98 Messenger
          • How to create a request for someone to send their tokens
          • Cypheus Assistant Bot
          • How to set up a Lucky Gift
          • How to receive a Lucky Gift
          • How to set up a Quiz Gift
          • How to receive a Quiz Gift
          • How to contact Coin98 Live Support via Coin98 Messenger
        • Market
        • Third party platforms and dApps
          • How to use multichain dApp browser on Coin98 Super Wallet
          • How to use Faucet on Coin98 Super Wallet
          • How to manage connections of the wallet
          • How to use Super Connect
        • Coin98 Vault
          • How to use Coin98 Vault on Coin98 Super Wallet
        • Security & Privacy
          • What to do when your wallet has been hacked?
          • How to use Cloud Backup on the Coin98 Super Wallet
          • How to revoke token allowances using Wallet Approval
          • How to use Clear Clipboard on Coin98 Super Wallet?
      • Extension
        • Getting Started
          • How to install Coin98 Extension
          • General Settings
          • How to update Coin98 Extension
          • How to create or import a Multichain Wallet to Coin98 Extension
          • How to buy cryptocurrency by fiat on Coin98 Extension?
          • Get Started with Coin98 Extension: Set a password and Create your new wallet
          • How to change your Coin98 Extension Password
        • Wallet Management
          • How to activate a wallet on Coin98 Extension
          • How to show Seed Phrase / Private key
          • How to switch a single-chain wallet to another chain wallet on Coin98 Extension
          • How to Refresh a Multichain Wallet
          • How to connect Hardware Wallet on Coin98 Extension
          • How to use Watch-only Wallet
          • How to rename/remove Wallet
        • Social Wallet
          • How to create a Social Wallet
          • How to restore a Social Wallet
        • Asset Management
          • How to manage blockchains on Coin98 Extension
          • How to add Custom Network on Coin98 Extension
          • How to Send a Token
          • How to send a token to multiple addresses
          • How to add a Custom Token on Coin98 Extension
          • How to Receive (Deposit) a Token
        • Swap
          • How to swap natively on Coin98 Extension
        • Bridge
          • How to convert tokens on Bridge?
        • Security & Privacy
          • How to use Cloud Backup on the Coin98 Extension
    • Zen Card
      • How to use Zen Card with Coin98 Super Wallet
      • Legal
        • PRIVACY POLICY
        • TERMS OF USE
      • FAQs
    • Coin98 Vault
      • How to claim Vault on Coin98 Super Wallet
      • How to claim Vault with Coin98 Extension
      • How to create Vault to distribute tokens
      • How to Sponsor Gas for Vault
    • Coin98 Staking
      • How to stake C98 on Coin98 Super Wallet
      • How to stake C98 on Coin98 Staking website
      • Fixed Rate Staking
    • Coin98 Token
      • Why is the C98 token issued on Ethereum, BNB Chain, Solana, Polygon and Viction?
      • How can I get Coin98 (C98) Token?
      • Where to trade C98
      • Where can I store my C98
      • Can I get back the money when I sent C98 to the contract address?
      • How to convert C98 token on Coin98 Super Wallet
    • Coin98 Terminals
      • Token Issuer
        • How to use Token Issuer on Coin98 Super Wallet
        • How to use Token Issuer on Coin98 Extension
      • Multisender
        • How to use Multisend
    • Coin98 Markets
      • How to use Coin98 Markets
    • Single Chain Wallet
      • Ancient8 Wallet
        • How to migrate social wallet to V2
        • Terms of Service
        • Privacy Policy
        • Developer Guide
  • Audits
    • Coin98 Token
    • Coin98 Staking
    • Coin98 Vault
    • 🐞BUG BOUNTY
  • Developer Guide
    • Coin98 Adapter
      • Setup Coin98 Adapter for Next.js
      • Setup Coin98 Adapter for React
      • Hooks
        • useWallet
        • useWalletModal
      • Example
    • Coin98 Connect Integration
    • Bitcoin Dapps Integration
    • Ethereum DApps Integration
    • EthereumPoW DApps Integration
    • BNB Chain DApps Integration
    • Kucoin Chain DApps Integration
    • Solana DApps Integration
    • Near DApps Integration
    • Cosmos DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Secret Network DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • KAVA DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Persistence DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Terra DApps Integration
      • Terra Station Override
    • Ronin DApps Integration
    • Arbitrum DApps Integration
    • Optimism DApps Integration
    • Boba Network DApps Integration
    • Harmony DApps Integration
    • Klaytn DApps Integration
    • Fantom DApps Integration
    • Celo DApps Integration
    • Gnosis Chain DApps Integration
    • GateChain DApps Integration
    • Polygon DApps Integration
    • Viction DApps Integration
    • Avalanche DApps Integration
    • OKExChain DApps Integration
    • Heco DApps Integration
    • Aurora DApps Integration
    • Cronos DApps Integration
    • Bittorrent DApps Integration
    • PlatON Network DApps Integration
    • Moonbeam DApps Integration
    • Kardia DApps Integration
    • Aptos Dapps Integration
    • Sui DApps Integration
    • Sei DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Osmosis DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Injective DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Oasis network DApps Integration
    • Evmos DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Juno network DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Agoric DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Archway (Testnet) DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Stargaze DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Umee DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Stride DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Deeplink
    • Kujira DApps Integration
      • Keplr Override
        • Basic API
        • Use with CosmJs
        • Use with SecretJS
        • Suggest Chain
    • Mantle DApps Integration
    • DApps Integration
      • EVM-compatible DApps Integration
    • Ethereum Coin98 Telegram Wallet SDK Bot Integration
      • Ethereum Coin98 Telegram Wallet SDK Bot Integration For React
      • Ethereum Coin98 Telegram Wallet SDK Bot Integration For Vanilla Javascript
  • Ton SDK Integration Guide For Partners
  • Legal
    • Coin98 Super Wallet
      • Terms of Service
      • Privacy Policy
    • Coin98 Telegram Game
      • Terms of Use
      • Privacy Policy
  • Coin98 Links and Communities
    • Official Coin98 Links
    • Official Communities
  • BRAND ASSETS & GUIDLINES
    • Brand Assets & Guidelines
Powered by GitBook
On this page
  • 1. Create the Manifest
  • 2. Install the Ton Connect SDK
  • 3. Ton Connect Core Functions
  • Reference

Ton SDK Integration Guide For Partners

PreviousEthereum Coin98 Telegram Wallet SDK Bot Integration For Vanilla JavascriptNextCoin98 Super Wallet

Last updated 3 months ago

This document provides step-by-step instructions for integrating Ton Connect SDK of Coin98 Telegram Wallet into your application.


1. Create the Manifest

Create a manifest.json - Manifest URL as described in


2. Install the Ton Connect SDK

  • Install the Ton Connect UI React package from GitHub:

  • Attach to provider at the outermost part of app

<TonConnectUIProvider
   manifestUrl={MANIFEST_URL}
   uiPreferences={{ theme: THEME.DARK }}
   walletsListConfiguration={{
       includeWallets: [
         {
           appName: "coin98-telegram-wallet-bot",
           name: "Coin98 Telegram Bot",
           imageUrl: "https://coin98.s3.ap-southeast-1.amazonaws.com/SocialLogo/ninetyeight.png",
           aboutUrl: "https://docs.coin98.com",
           bridgeUrl: "https://ton-bridge.coin98.tech/bridge",
           platforms: ["ios", "android", "macos", "windows", "linux"],
           universalLink: "https://t.me/Coin98_bot?attach=wallet"
         }
       ]
   }}
>
<div id=”app”>
   //CODE APP HERE
   {children}
</div>

</TonConnectUIProvider>

3. Ton Connect Core Functions

Currently, we support three main functions:

3.1. Connect with a Specific Wallet

Two distinct connection methods depend on whether you want to set Coin98 Wallet as the default.

3.1.1. Set Coin98 Wallet as default

  • Clicking "Connect Wallet" via TON SDK automatically opens the Coin98 app without any wallet selection, forcing exclusive use of Coin98 Telegram Wallet;

  • If you agree, proceed with integration. To open a modal window for a specific wallet, use the openSingleWalletModal() method with the wallet's appName as a parameter (refer to wallets-list.json file)

import { useTonConnectUI } from '@tonconnect/ui-react';

const MyComponent = () => {
  const [tonConnectUI] = useTonConnectUI();

  const handleConnect = async () => {
    // Connect using the specific wallet "coin98-telegram-wallet-bot" 
    // Set Coin98 Telegram Wallet as default
    return tonConnectUI.openSingleWalletModal('coin98-telegram-wallet-bot');
  };

  return (
    <div>
      <button onClick={handleConnect}>Connect Wallet</button>
    </div>
  );
};

export default MyComponent;

3.1.2. Do not set Coin98 Wallet as default

  • Calling connect method opens TON's modal, allowing users to choose from multiple wallets; to use Coin98 Telegram, select the Coin98 Telegram Wallet option.

  • To open a modal window for a specific wallet, use the openSingleWalletModal() method with the wallet's appName as a parameter (refer to wallets-list.json file)

import { useTonConnectUI } from '@tonconnect/ui-react';

const MyComponent = () => {
  const [tonConnectUI] = useTonConnectUI();

//Not set Coin98 Telegram Wallet as default
  const handleConnect = async () => {
    return tonConnectUI.openModal();
  };

  return (
    <div>
      <button onClick={handleConnect}>Connect Wallet</button>
    </div>
  );
};

export default MyComponent;

3.2. Sending Transactions

To send TON coins (in nanotons) to a specific address, define your transaction details and call the sendTransaction() method.

import { useTonConnectUI } from '@tonconnect/ui-react';

const transaction = {
  validUntil: Date.now() + 5 * 60 * 1000, // Valid for 5 minutes
  messages: [
    {
      address: "0QD-SuoCHsCL2pIZfE8IAKsjc0aDpDUQAoo-ALHl2mje04A-", // Destination address (user-friendly format)
      amount: "20000000", // Amount in nanotons (20,000,000 nanotons)
    },
  ],
};

const SendTransactionComponent = () => {
  const [tonConnectUI] = useTonConnectUI();

  const handleSignSendTransaction = async () => {
    await tonConnectUI.sendTransaction(transaction);
  };

  return (
    <div>
      <button onClick={handleSignSendTransaction}>Send Transaction</button>
    </div>
  );
};

export default SendTransactionComponent;

3.3. Wallet Disconnection

To disconnect the wallet, simply call the disconnect() method.

import { useTonConnectUI } from '@tonconnect/ui-react';

const DisconnectComponent = () => {
  const [tonConnectUI] = useTonConnectUI();

  const handleDisconnect = async () => {
    await tonConnectUI.disconnect();
  };

  return (
    <div>
      <button onClick={handleDisconnect}>Disconnect Wallet</button>
    </div>
  );
};

export default DisconnectComponent;

Reference

For further questions or issues, please refer to

https://docs.ton.org/v3/guidelines/ton-connect/guidelines/creating-manifest
https://github.com/ton-connect/sdk/tree/main/packages/ui-react
https://docs.ton.org/