Function Signature
Description
Recovers a wallet from a backup using the specified backup method. This is used when a user needs to access their wallet on a new device.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
method | PortalBackupMethod | Yes | The backup method that was used |
password | String | No | Required when recovering with PortalBackupMethod.password |
cipherText | String | No | The encrypted backup data (for self-managed backups) |
Returns
PortalAddresses - An object containing the recovered wallet addresses:
| Property | Type | Description |
|---|---|---|
ethereum | String? | The Ethereum/EVM address |
solana | String? | The Solana address |
Example
Self-Managed Backup Recovery
Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
RECOVERY_FAILED | The recovery operation failed |
INVALID_PASSWORD | The provided password is incorrect |
BACKUP_NOT_FOUND | No backup found for the specified method |