Layer 231
WalletDisableBackup
Turn off the server-side backup of the secret phrase of the user's built-in TON wallet, so Telegram no longer holds encrypted shares of it. Requires the 2 FA password. The wallet key can be rotated in the same call by passing new_public_key together with an ownership proof built from wallet. get Proof Challenge.
method
wallet.disableBackup#b0bf0da flags:# password:flags.0?InputCheckPasswordSRP new_public_key:flags.1?bytes proof:flags.2?WalletOwnershipProof = WalletState;
Parameters
| Name | Type | Description |
|---|---|---|
| Password | flags.0?InputCheckPasswordSRP | SRP proof of the user's 2 FA password (tg. Get Input Check Password) |
| NewPublicKey | flags.1?bytes | New wallet public key, when rotating the wallet key in the same call |
| Proof | flags.2?WalletOwnershipProof | Proof of ownership of new_public_key, signed over the wallet. get Proof Challenge payload |
Returns
WalletStateGogram Example
// Stop Telegram from holding encrypted backup shares of your wallet's secret phrase. pwd, _ := client.AccountGetPassword() srp, err := tg.GetInputCheckPassword("my-2fa-password", pwd) if err != nil { log.Fatal(err) } // To rotate keys at the same time, pass the new public key and a tg.WalletOwnershipProof signed with it. state, err := client.WalletDisableBackup(srp, nil, nil) if err != nil { log.Fatal(err) } if s, ok := state.(*tg.WalletStateObj); ok { fmt.Println("backup enabled:", s.BackupEnabled) }