This repository provides details on the TON Connect protocol.
If you just want to integrate TON Connect into your app, just follow the TON Documentation guides. No need to dive deep into the protocols.
If no SDK for your language, take the JS SDK as a reference and implement your own wrapper. Let us know about your work — we'd be happy to list it here.
If you implement an SDK, a wallet or want to learn more how Ton Connect works, please read below.
- Protocol workflow: an overview of all the protocols.
- Bridge API specifies how the data is transmitted between the app and the wallet.
- Session protocol ensures end-to-end encrypted communication over the bridge.
- Requests protocol defines requests and responses for the app and the wallet.
- Wallet guidelines defines guidelines for wallet developers.
Simply use the TON Documentation manuals and do not worry about the underlying protocols.
Please take the JS SDK as a reference and check out the protocol docs above.
JS SDK does that for you; just get wallets list connector.getWallets()
and check embedded
property of the corresponding list item. If you build your own SDK you should check window.[targetWalletJsBridgeKey].tonconnect.isWalletBrowser
.
Like with embedded apps (see above), JS SDK detects it for you via injected
property of the corresponding connector.getWallets()
list item. If you build your own SDK you should check that window.[targetWalletJsBridgeKey].tonconnect
exists.
See an example of dapp-backend
You don’t need to, unless you are building a wallet.
If you build a wallet, you will need to provide a bridge. See our reference implementation in Go.
Keep in mind that the wallet’s side of the bridge API is not mandated.
For a quick start you can use the common TON Connect bridge https://bridge.tonapi.io/bridge.
Submit a pull request for the wallets-list repository and fill our all the necessary metadata.
Apps may also add wallets directly through the SDK.