Ton SDK Integration Guide For Partners

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

https://docs.ton.org/v3/guidelines/ton-connect/guidelines/creating-manifest


2. Install the Ton Connect SDK

  • Install the Ton Connect UI React package from GitHub:

https://github.com/ton-connect/sdk/tree/main/packages/ui-react

  • 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)

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)

3.2. Sending Transactions

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

3.3. Wallet Disconnection

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


Reference

For further questions or issues, please refer to https://docs.ton.org/

Last updated