Layer 231
WalletFetchEncryptedSecretPhrasePart
Fetch one encrypted share of the wallet secret phrase from a backup holder DC, as the second step of an export started with wallet. export Secret Phrase. It must be sent to each DC listed by that method. The share comes back encrypted to the one-time public key passed by the client, so only the device holding the matching private key can decrypt it.
method
wallet.fetchEncryptedSecretPhrasePart#f53925cf token:string public_key:bytes = wallet.EncryptedSecretPhrasePart;
Parameters
| Name | Type | Description |
|---|---|---|
| Token | string | Export token returned by wallet. export Secret Phrase |
| PublicKey | bytes | One-time public key generated on the device; the returned share is encrypted to it |
Returns
wallet.EncryptedSecretPhrasePartGogram Example
// Send to each DC listed by wallet.exportSecretPhrase. exportToken is its Token; // ephemeralPub is a one-time public key generated on this device. part, err := client.WalletFetchEncryptedSecretPhrasePart(exportToken, ephemeralPub) if err != nil { log.Fatal(err) } // Decrypt part.Data with the matching ephemeral private key, then combine all parts. fmt.Println("encrypted share:", len(part.Data), "bytes")