Layer 231
WalletGetProofChallenge
Get a challenge (payload and domain, with an expiry) that the client signs with a wallet private key to prove ownership of that key. The signature and timestamp form a wallet Ownership Proof, used by wallet. replace Wallet (importing a wallet) and by wallet. enable Backup / wallet. disable Backup when rotating to a new key.
method
wallet.getProofChallenge#2025e697 = wallet.ProofChallenge;
Returns
wallet.ProofChallengeGogram Example
ch, err := client.WalletGetProofChallenge() if err != nil { log.Fatal(err) } // tonProofSignature: on-device Ed25519 signature with the wallet's private key over // ch.Domain + ch.Payload (TON Connect ton_proof format). Used by wallet.replaceWallet etc. proof := &tg.WalletOwnershipProof{Timestamp: int32(time.Now().Unix()), Signature: tonProofSignature} fmt.Println("challenge for", ch.Domain, "expires", time.Unix(int64(ch.Expires), 0), "proof ts:", proof.Timestamp)