TON Connect Integration for TON Apps in Mobile Wallet

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
TON Connect Integration for TON Apps in Mobile Wallet
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

TON Connect Integration for Mobile Wallet Applications

TON Connect is a communication protocol between a dApp and wallet in the TON Blockchain ecosystem. Unlike WalletConnect (EVM world), it has its own protocol on top of an HTTP bridge with push notifications via SSE. Implementation in a mobile application requires understanding not only the SDK but also how the transport layer works.

How TON Connect Transport Works

The protocol works via a bridge server (bridge.tonapi.io or self-hosted). Wallet and dApp exchange encrypted messages through this bridge — no direct connection. Encryption is NaCl box (X25519 + XSalsa20-Poly1305).

Mobile wallet application connects to bridge via SSE (Server-Sent Events): GET /bridge/{clientId}/events. This is a long-lived HTTP request that keeps the connection open. On iOS — a problem: URLSession doesn't support SSE natively, requiring an EventSource library or custom implementation via URLSessionDataDelegate. On Android with OkHttp — also no built-in SSE support, but EventSource from the OkHttp team (com.squareup.okhttp3:okhttp-sse) solves the issue.

Alternative transport — deeplink. dApp encodes a tc:// or https://ton.app/... link, user clicks, wallet opens and receives connect request from URL parameters. This is synchronous flow without bridge — works simpler, but requires dApp and wallet to be on the same device.

Handling connect request in wallet

Upon receiving a connection request, the wallet should:

  1. Decode ConnectRequest from encrypted payload (or from deeplink parameter r).
  2. Show the user: which dApp is requesting connection, what items are needed (ton_addr, ton_proof).
  3. Obtain user approval.
  4. Form ConnectResponse with wallet address, network (mainnet/testnet), public key, and ton_proof if requested.

ton_proof is cryptographic proof of wallet ownership without transaction signing. Format: ton-proof-item-v2/<wc>:<addr_bytes>/<app_domain>/<timestamp>/<payload>. Signed with wallet private key via Ed25519. dApp verifies signature via TON API, not trusting the wallet.

Common implementation mistake: incorrect serialization of addr_bytes — needs raw format (workchain + 32 bytes hash), not user-friendly bounce/non-bounce address.

Signing Transactions

After connection, dApp sends SendTransactionRequest with BOC (Bag of Cells) — binary representation of TON transaction. Wallet:

  1. Decodes BOC via ton-core or @ton/ton.
  2. Shows transaction details to user: recipient, amount, comment.
  3. Signs transaction with private key.
  4. Sends signed BOC to TON network via tonapi.io or toncenter.com.
  5. Returns SendTransactionResponse with transaction hash to dApp.

BOC decoding for UI display — non-trivial task. BOC may contain arbitrary smart contract calls with payloads. For standard jetton transfers there's an OP-code parser (0xf8a7ea5 — jetton transfer), otherwise — show raw hex with warning.

TON Connect SDK for Mobile

Official @tonconnect/sdk is written for JavaScript/TypeScript — works in React Native with polyfills (react-native-crypto, buffer). For native platforms there's no official SDK — implement the protocol yourself per spec or use community libraries (TonSdk.NET for MAUI, ton-kotlin for Android).

Tonkeeper — open source, excellent reference for understanding real TON Connect implementation on mobile.

Timeline

Integrating TON Connect into existing wallet (connection and transaction signing only) — 3–5 weeks. Full-fledged TON wallet from scratch (seed management, key derivation, jetton support, NFT, staking) — 4 to 6 months.