Enum Definition
enum BackupLocation {
DYNAMIC = 'dynamic',
GOOGLE_DRIVE = 'googleDrive',
ICLOUD = 'iCloud',
USER = 'user',
EXTERNAL = 'external',
}
Values
DYNAMIC
- Description: Dynamic’s secure cloud storage
- Use Case: Default backup location for all wallets
- Security: High security with encryption at rest
GOOGLE_DRIVE
- Description: Google Drive cloud storage
- Use Case: Optional backup to user’s Google Drive
- Security: Encrypted before upload
ICLOUD
- Description: Apple iCloud storage
- Use Case: Optional backup to user’s iCloud
- Security: Encrypted before upload
USER
- Description: User-provided backup location
- Use Case: Custom backup solutions
- Security: Depends on user implementation
EXTERNAL
- Description: External backup location
- Use Case: Third-party backup services
- Security: Encrypted before storage
Example
import { BackupLocation } from '@dynamic-labs-wallet/node';
// Check if wallet has Google Drive backup
const hasGoogleDriveBackup = backupInfo.backups[BackupLocation.GOOGLE_DRIVE].length > 0;
// Get all backup locations
const backupLocations = Object.values(BackupLocation);
console.log('Available backup locations:', backupLocations);
// Output: ['dynamic', 'googleDrive', 'iCloud', 'user', 'external']
// Check if wallet is backed up to Dynamic
const hasDynamicBackup = backupInfo.backups[BackupLocation.DYNAMIC].length > 0;
Usage
This enum is used in various backup-related operations:
- Key share backup: Specifying where to store key shares
- Backup verification: Checking if backups exist in specific locations
- Recovery operations: Determining which backup to use for recovery
Last modified on January 26, 2026