recoverWallet
Recovers a wallet using a specified backup method.
Function Signature
Parameters
method
: The backup method to use for recovery. Supported methods:.GoogleDrive
: Recover from Google Drive backup.iCloud
: Recover from iCloud backup.Password
: Recover using password.Passkey
: Recover using passkey.local
: Recover from local backup
withCipherText
: Optional cipher text from a previous backup. Required for some backup methods.usingProgressCallback
: Optional callback to track the recovery progress. Receives anMpcStatus
object containing:status
: Current operation being performed:.readingShare
: Reading the stored share.decryptingShare
: Decrypting the share.parsingShare
: Parsing the share data.generatingShare
: Generating the share data.storingShare
: Saving the recovered share.done
: Process completed
done
: Boolean indicating whether the operation is complete
Returns
PortalRecoverWalletResponse
containing:
ethereum
: The recovered Ethereum addresssolana
: The recovered Solana address, if available
Throws
PortalClassError.cannotRecoverWallet
if the Ethereum address cannot be recoveredVarious backup method-specific errors if recovery fails
Example Usage
Last updated
Was this helpful?