Layer 231
WalletExportSecretPhrase
Start recovering the backed-up secret phrase of the user's built-in wallet. Requires the 2 FA password; returns an export token and the list of DCs holding encrypted shares. Then call wallet. fetch Encrypted Secret Phrase Part with the token on each listed DC and combine the decrypted shares on-device.
method
wallet.exportSecretPhrase#9077c9ac flags:# password:flags.0?InputCheckPasswordSRP = wallet.SecretPhraseParts;
Parameters
| Name | Type | Description |
|---|---|---|
| Password | flags.0?InputCheckPasswordSRP | SRP proof of the user's 2 FA password (tg. Get Input Check Password) |
Returns
wallet.SecretPhrasePartsGogram Example
pwd, _ := client.AccountGetPassword() srp, err := tg.GetInputCheckPassword("my-2fa-password", pwd) if err != nil { log.Fatal(err) } parts, err := client.WalletExportSecretPhrase(srp) if err != nil { log.Fatal(err) } // Next: call wallet.fetchEncryptedSecretPhrasePart with parts.Token on each of these DCs. fmt.Println("export token:", parts.Token, "holder DCs:", parts.Dcs)