TON Connect Wallet Auth Quickstart
TON Connect is the standard wallet connection layer for apps built on The Open Network. If your product needs users to connect a TON wallet, approve a transaction, or continue inside a Telegram Mini App without inventing a custom wallet flow, TON Connect is usually the first protocol to evaluate.
This quickstart is for builders who already know they need TON wallet authentication and want the shortest path to a working mental model. It focuses on the pieces that matter first: how the manifest works, how wallet state should be wired into the app, how TON signing differs from a typical EVM flow, and where integration mistakes usually appear.
Why teams use TON Connect for wallet auth
Most builders are not looking for wallet auth in the abstract. They are trying to solve a concrete product problem.
- users need to connect a TON wallet before they can sign or pay
- a TON dapp needs one standard path across compatible wallets
- a Telegram Mini App needs embedded wallet support that feels native to the runtime
- the app must request signing without handling private keys directly
- onboarding has to work for both crypto-native users and Telegram-first flows
TON Connect fits those needs because it gives the app a consistent connection and signing pattern while leaving key custody inside the user’s wallet.
What TON Connect helps you do first
TON Connect is usually the right starting point when you need:
- wallet connection across common TON wallets
- authenticated wallet state inside a TON web app or Telegram Mini App
- transaction signing for TON payments, jetton actions, or contract interactions
- a standard provider flow instead of wallet-specific custom logic
- a predictable bridge between frontend wallet UX and TON-native transaction requests
That makes this page different from a general onboarding guide. The goal here is to help you decide whether TON Connect is the right protocol for the auth layer and to show the shortest reliable setup path once the answer is yes.
The setup values that matter first
The current repo context points to one install path and three environment values that matter early.
pnpm add @tonconnect/ui-react @tonconnect/sdk @ton/ton @ton/coreNEXT_PUBLIC_TONCONNECT_MANIFEST_URL=
TON_API_ENDPOINT=
TONCENTER_API_KEY=- NEXT_PUBLIC_TONCONNECT_MANIFEST_URL points wallets to the public HTTPS manifest that identifies your app
- TON_API_ENDPOINT gives your app a TON RPC-style endpoint for chain reads and post-connect state checks
- TONCENTER_API_KEY is optional, but may matter if you rely on Toncenter and need higher rate limits for reads
For most teams, the manifest URL is the first real dependency. If that file is not publicly reachable over HTTPS, the rest of the wallet flow can look correct in the UI while still failing in practice.
A practical TON Connect wallet auth quickstart
1. Publish the manifest before styling the connect flow
A TON Connect implementation starts with tonconnect-manifest.json, not with the wallet button.
Wallets use the manifest to identify the application. That means the manifest has to be reachable from the real environment where users connect, not only from a local development setup.
Manifest checks
- 01serve the manifest over HTTPS
- 02keep the manifest URL stable in the environment users actually open
- 03verify the app name, URL, and icon metadata are correct
- 04confirm the wallet can fetch the manifest without silent network or certificate issues
2. Wrap the app in a single TON Connect provider
The current repo context points to the common React pattern:
<TonConnectUIProvider manifestUrl={NEXT_PUBLIC_TONCONNECT_MANIFEST_URL}>This is more than setup boilerplate. It creates one predictable wallet state layer for the application.
Teams usually move faster when they keep connection state centralized instead of scattering wallet logic across modal triggers, page components, and custom event handlers.
3. Read wallet state as product state, not just transport state
The current repo integration data points to hooks such as:
- useTonAddress()
- useTonWallet()
- useTonConnectUI()
Those hooks should drive more than a connected badge. They should drive product decisions such as:
- whether the user can continue to the next task
- which wallet-dependent screens can render safely
- whether the app should show a payment, signature, or account-specific flow
- whether reconnect and disconnect controls are easy to find
4. Build transaction requests in TON format
TON signing is one of the places where builders coming from EVM patterns lose time.
The repo context describes the transaction shape as:
{
validUntil,
messages: [{ address, amount, payload }]
}- amount is denominated in nanoTON
- payload is a base64 BoC when the action requires one
- the wallet returns a BoC of the signed external message
Many products are not connecting a wallet only to show an address. They are connecting because the user is about to sign for a payment, jetton transfer, NFT action, or contract call.
5. Use TON chain reads to confirm the post-connect flow
Connection alone is not enough. Most real apps need to read chain state right after connect.
The current repo context points to @ton/ton with a TonClientpattern for reads such as balances or contract methods. In practice, that means the wallet-auth quickstart should also account for what happens right after the session is established.
- balance checks before the user pays or sends
- account-state checks before a contract interaction
- post-sign polling when the product needs to reflect final status
- method calls needed to show token or app-specific state
Where TON wallet auth differs from a typical EVM flow
Every account is a smart contract
TON does not follow the familiar EVM assumption that a visible address is a simple externally owned account. In TON, accounts are smart contracts.
Sending to an uninitialized address or assuming every address is already fully ready for interaction can create unexpected failure states.
Payloads use BoC serialization
TON payload construction is not generic JSON. When the app needs a payload, it usually has to be packed into TON’s Bag of Cells format.
That matters because a wallet UI can connect successfully even while the real contract interaction fails later.
Cross-shard effects are asynchronous
TON finality is fast, but downstream effects can still land later than the wallet-approval moment suggests. A signed request is not always the same thing as a completed user outcome.
Telegram changes the runtime
TON Connect is especially relevant for Telegram Mini Apps, and Telegram can change the behavior of wallet detection, embedded flows, and runtime assumptions.
Common TON Connect wallet auth mistakes
Treating the wallet button as the implementation
The button is only the visible trigger. The actual implementation includes manifest reliability, provider setup, state handling, transaction formatting, and a meaningful next step after connection.
Assuming connection success means transaction readiness
A user can connect a wallet successfully while the first real action still fails because the payload format, amount conversion, or account assumptions are wrong.
Hiding the next step after connect
Wallet connection performs better when it is attached to a clear action. If the app connects the user and then leaves them in a blank or generic state, the flow loses momentum.
Skipping environment-specific testing
A local browser demo is useful, but it is not enough if the product runs inside Telegram or depends on production manifest hosting. Runtime-specific behavior should be tested where users actually connect.
Treating TON like a drop-in EVM copy
TON has a different account model, payload expectations, and transaction follow-through patterns. The wallet UX may feel familiar, but the implementation details are not interchangeable.
When TON Connect is the right fit
- the product is a TON dapp or Telegram Mini App
- the team needs standard wallet connection and signing rather than a custom wallet bridge
- users must approve TON-native actions without handing keys to the app
- the product needs a known wallet-auth path across common TON wallets
- the team wants to move from protocol evaluation into implementation quickly
It is especially useful for teams that want one protocol-standard answer to the question, “How should users connect and sign in TON?”
A launch checklist for builders
Launch checklist
- 01the manifest is publicly reachable over HTTPS
- 02the provider is initialized once at the app shell level
- 03wallet state is easy to inspect from the UI
- 04the first post-connect action is obvious to the user
- 05amount conversion and payload formatting are tested for the actual transaction type you support
- 06chain reads work after connect from the same environment users will use
- 07Telegram-specific behavior is validated separately if the app runs inside Telegram
- 08post-sign status handling accounts for TON’s asynchronous settlement behavior where relevant
FAQ
What is TON Connect?
TON Connect is the standard wallet connection protocol for apps built on The Open Network. It lets a dapp connect to compatible TON wallets and request signing without taking custody of the user’s keys.
Is TON Connect only for browser dapps?
No. It is relevant for both TON web apps and Telegram Mini Apps, which is one reason environment-specific testing matters.
What does TON Connect wallet auth usually include?
In practice, it usually includes manifest setup, provider wiring, wallet connection state, a signing-ready transaction structure, and chain reads that support the first post-connect action.
Why does the manifest URL matter so much?
Wallets use the manifest to identify the application. If it is not served correctly over HTTPS or cannot be fetched reliably, the wallet flow can fail even when the UI looks finished.
How is TON Connect different from a generic wallet-connect flow?
The connection pattern may feel familiar, but TON-specific details matter: smart-contract account behavior, BoC payload serialization, Telegram runtime differences, and post-sign asynchronous settlement effects.
What should happen right after a wallet connects?
The app should show useful connected state immediately and move the user into the next task, such as sign-in confirmation, balance-aware onboarding, payment, or a contract interaction.
Confirm protocol fit, then move straight into the implementation workflow
If you are still deciding whether TON Connect is the right protocol surface, start with the TON Connect protocol page. If you already know TON Connect is the right fit and want a more implementation-oriented walkthrough, continue to the TON Connect wallet onboarding guide.