โ† TON

๐Ÿ” TON Proof

Verify a TON Connect ton_proof: the wallet's signature over your domain, timestamp and payload.

How the proof is built

message = "ton-proof-item-v2/" โ€– workchain (int32, big-endian) โ€– address hash โ€– domain length (uint32, little-endian) โ€– domain โ€– timestamp (uint64, little-endian) โ€– payload

signed = sha256(0xffff โ€– "ton-connect" โ€– sha256(message)). The wallet signs it with ed25519.

Your backend should also check that the payload is one it issued, that the domain is yours and that the proof is recent.