Layer 231
WalletTonConnectCreateSession
Start connecting the user's wallet to a d App over TON Connect, using the d App client ID and manifest URL from its connection link. Returns the session with the fetched manifest (or a manifest error). Continue with wallet. ton Connect Register Key and wallet. ton Connect Submit Connect Result.
method
wallet.tonConnectCreateSession#cc931046 dapp_client_id:string manifest_url:string = TonConnectSession;
Parameters
| Name | Type | Description |
|---|---|---|
| DappClientId | string | Client ID (public key) of the d App, from the id parameter of its TON Connect link |
| ManifestUrl | string | URL of the d App's tonconnect-manifest. json, from its connection request |
Returns
TonConnectSessionGogram Example
// Both values come from the dApp's tc:// link: "id" and the manifestUrl inside "r". session, err := client.WalletTonConnectCreateSession( "230f1e4df32364888a5dbd92a410266fcb974b73e30ff3e546a654fc8ee2c953", "https://app.example.com/tonconnect-manifest.json", ) if err != nil { log.Fatal(err) } fmt.Println("session", session.ID, "pending:", session.Pending) if session.Manifest != nil { fmt.Println("dApp:", session.Manifest.Name) }