Function Signature
Description
Recovers encrypted backup for a wallet using the provided password and session. This function can optionally store the recovered shares and specify the number of shares to recover.Parameters
Required Parameters
accountAddress
(string
) - The wallet address to recover backup for (must include0x
prefix)password
(string
) - Password for decrypting the backupwalletOperation
(WalletOperation
) - The wallet operation for recovery
Optional Parameters
shareCount
(number
) - Number of shares to recover (defaults to 1)storeRecoveredShares
(boolean
) - Whether to store recovered shares (defaults to false)
Returns
Promise<any[]>
- Array of recovered shares
Example
Available Wallet Operations
SIGN_MESSAGE
- Message signing operationsSIGN_TRANSACTION
- Transaction signing operationsEXPORT_PRIVATE_KEY
- Private key export operations
Error Handling
Related Functions
storeEncryptedBackupByWallet()
- Store encrypted backuprequiresRestoreBackupSharesForOperation()
- Check if backup restore is required