Layer 231
WalletTonConnectRegisterKey
Register the wallet-side TON Connect client ID (session public key) for a session created with wallet. ton Connect Create Session. Returns a challenge to answer in wallet. ton Connect Submit Connect Result and the event ID to use for the connect event.
method
wallet.tonConnectRegisterKey#338bcf1c session_id:long client_id:string = wallet.TonConnectChallenge;
Parameters
| Name | Type | Description |
|---|---|---|
| SessionId | long | ID of the session created with wallet. ton Connect Create Session |
| ClientId | string | Wallet-side TON Connect client ID: hex public key of the session keypair generated on-device |
Returns
wallet.TonConnectChallengeGogram Example
// sessionKeyHex: hex public key of the wallet-side TON Connect session keypair generated on-device. ch, err := client.WalletTonConnectRegisterKey(sessionID, sessionKeyHex) if err != nil { log.Fatal(err) } fmt.Println("challenge:", len(ch.Challenge), "bytes, event id:", ch.EventID)