Layer 231
TonConnectSessionObj
A TON Connect session between the user's wallet and a d App.
constructor
tonConnectSession#126556c6 flags:# pending:flags.0?true closing:flags.1?true closed:flags.2?true id:long dapp_client_id:string client_id:flags.3?string nonce:bytes manifest:flags.4?TonConnectManifest manifest_error:flags.5?int date:int = TonConnectSession;
Parameters
| Name | Type | Description |
|---|---|---|
| Pending | flags.0?true | Whether the connection is not completed yet |
| Closing | flags.1?true | Whether the session is being closed |
| Closed | flags.2?true | Whether the session is closed |
| Id | long | Session ID |
| DappClientId | string | Client ID of the d App |
| ClientId | flags.3?string | Wallet-side client ID of the session |
| Nonce | bytes | Session nonce |
| Manifest | flags.4?TonConnectManifest | Manifest of the d App |
| ManifestError | flags.5?int | Error code if the manifest couldn't be fetched |
| Date | int | When the session was created |
Returns
TonConnectSessionGogram Example
// Creating TonConnectSessionObj constructor obj := &tg.TonConnectSessionObj{ Id: int64(1234567890), DappClientId: "example", Nonce: []byte{0x01, 0x02, 0x03}, Date: int32(time.Now().Unix()), // Optional fields: // Pending: true, // Closing: true, // Closed: true, // ClientId: "example", // ... more optional fields }