Workflows
Overview
First-time connection via http bridge
- App initiates SSE connection with bridge;
- App passes connection info to the wallet via universal link or deeplink or QR code;
- Wallet connects to the bridge with given parameters, and save connection info locally;
- Wallet sends account information to the app using bridge;
- App receives message and save connection info locally;
Reconnection with http bridge
- App reads connection info from localstorage
- App connects to the bridge
- User opens the wallet, the wallet connects to the bridge using stored connection info
First-time connection via js bridge
- App checks existing of the
window.[walletJsBridgeKey].tonconnect
- App calls
window.[walletJsBridgeKey].tonconnect.connect()
and waits for a response - Wallet sends account information to the app;
Making ordinary requests and responses
- App and wallet are in a connected state
- App generates request and sends it to the bridge
- Bridge forwards message to the wallet
- Wallet generates response and sends it to the bridge
- Bridge forwards message to the app
Specification
Read detailed specification here.