Layer 231
method
wallet.tonConnectSubmitConnectResult#c2c00779 flags:# error:flags.0?true session_id:long challenge_answer:bytes body:bytes trace_id:flags.1?string = Bool;

Parameters

Name Type Description
Error flags.0?true If set, the connection was rejected or failed and body contains an error event
SessionId long ID of the TON Connect session
ChallengeAnswer bytes Answer to the challenge returned by wallet. ton Connect Register Key
Body bytes Encrypted connect event (or error event) to deliver to the d App
TraceId flags.1?string Trace ID of the connection request, for correlating events

Returns

Bool

Gogram Example

// challengeAnswer answers the wallet.tonConnectRegisterKey challenge; encryptedConnectEvent is the
// TON Connect "connect" event (with ton_proof if requested), encrypted on-device for the dApp.
ok, err := client.WalletTonConnectSubmitConnectResult(&tg.WalletTonConnectSubmitConnectResultParams{
	SessionID:       sessionID,
	ChallengeAnswer: challengeAnswer,
	Body:            encryptedConnectEvent,
})
if err != nil {
	log.Fatal(err)
}
fmt.Println("dApp connected:", ok)