Layer 231
WalletTonConnectClaimRequest
Claim (or decline) a pending request from a d App connected over TON Connect, before the wallet processes it. Pending requests are listed by wallet. ton Connect Get Pending; after claiming, the wallet answers with wallet. ton Connect Submit Response.
method
wallet.tonConnectClaimRequest#66b57b41 flags:# declined:flags.1?true session_id:long msg_id:int app_request_id:string challenge_answer:flags.0?bytes = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Declined | flags.1?true | If set, decline the request instead of claiming it |
| SessionId | long | ID of the TON Connect session the request belongs to |
| MsgId | int | ID of the pending request, from wallet. ton Connect Get Pending |
| AppRequestId | string | ID the d App assigned to the request (the id of its JSON-RPC message) |
| ChallengeAnswer | flags.0?bytes | Answer to the session challenge, proving possession of the session key |
Returns
BoolGogram Example
// Claim a pending dApp request (req, from wallet.tonConnectGetPending) before answering it. // appRequestID is the "id" of the decrypted JSON-RPC request. ok, err := client.WalletTonConnectClaimRequest(&tg.WalletTonConnectClaimRequestParams{ SessionID: req.SessionID, MsgID: req.MsgID, AppRequestID: appRequestID, }) if err != nil { log.Fatal(err) } fmt.Println("request claimed:", ok) // Set Declined: true to reject it instead.