TON Connect
What TON Connect Is
TON Connect is the standard wallet connection protocol for TON blockchain applications. It provides a secure, standardized mechanism for TON wallets to authenticate with dApps without exposing private keys.
Repute AI uses TON Connect via the @tonconnect/ui-react library to integrate wallet connection into the Telegram Mini App interface.
Integration Overview
The Repute AI Mini App uses @tonconnect/ui-react to render the wallet connection button and manage the connection lifecycle.
import { TonConnectUIProvider, TonConnectButton } from '@tonconnect/ui-react'
// Wrap your app with the provider
function App() {
return (
<TonConnectUIProvider manifestUrl="https://repute.ai/tonconnect-manifest.json">
<ReputeApp />
</TonConnectUIProvider>
)
}
// Use the button component anywhere in your UI
function WalletSection() {
return (
<div>
<TonConnectButton />
</div>
)
}The TonConnectButton component handles the entire connection flow — wallet detection, QR code display, mobile deep linking, and connection state management.
Connection Flow
- User taps Connect Wallet — The TON Connect UI opens, showing available wallet options detected on the device
- Wallet selection — User selects their preferred wallet (Tonkeeper, OpenMask, MyTonWallet, or other TON Connect–compatible wallet)
- Wallet authorization — The selected wallet app opens and presents the connection request. The user approves.
- Address returned — The wallet’s public address is returned to Repute AI via the TON Connect protocol
- Protocol binding — Repute AI associates the wallet address with the authenticated Telegram identity
What Permissions Are Requested
TON Connect requests and Repute AI uses only:
| Permission | Requested | Purpose |
|---|---|---|
| Wallet address (public key) | Yes | To mint the REP soulbound token to your wallet |
| Transaction signing (minting fee) | Yes, explicitly prompted | One-time REP token minting transaction |
| Arbitrary transaction signing | No | Never requested |
| Private key access | No | Never possible via TON Connect |
| Account balance or history | No | Not requested |
Every transaction submitted to your wallet (including the initial minting fee) requires explicit approval inside your wallet app. No transaction is submitted without your confirmation.
The TON Connect Manifest
The Repute AI TON Connect manifest describes the application to wallets:
{
"url": "https://repute.ai",
"name": "Repute AI",
"iconUrl": "https://repute.ai/icon-192.png",
"termsOfUseUrl": "https://repute.ai/terms",
"privacyPolicyUrl": "https://repute.ai/privacy"
}Wallets display this information to the user during the connection approval step so you can verify you are connecting to the legitimate Repute AI application.
Supported Wallets
| Wallet | Platform | TON Connect Version |
|---|---|---|
| Tonkeeper | iOS, Android, Browser Extension | v2 |
| OpenMask | Browser Extension (Chrome, Firefox) | v2 |
| MyTonWallet | iOS, Android, Web | v2 |
| Tonhub | iOS, Android | v2 |
Any wallet that implements the TON Connect v2 protocol is compatible. The wallet list in the UI is dynamically populated from the TON Connect registry.
Disconnecting
Disconnecting your wallet from Repute AI:
- Removes the wallet connection from the Repute AI session
- Does not revoke or transfer your REP soulbound token (it remains in your wallet)
- Does not change your Telegram-to-wallet binding (permanent once minted)
If you disconnect and reconnect with a different wallet, Repute AI will detect the mismatch with your existing soulbound token binding and prompt you to reconnect with your original wallet.