BackupServiceModule

Flutter submodule for backup and restore operations.

Provides:

  • Create backups with multiple wrappers (PRF, PIN, Password, Guardian)

  • Restore from backups with explicit unlock strategy

  • Get backup metadata (without decryption)

  • Add/remove wrappers from existing backup

  • Export/import backup files

  • System backup status

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Add a new wrapper to an existing backup. The existing backup data is NOT re-encrypted - only a new DEK wrap is added.

Link copied to clipboard
suspend fun createBackup(groupId: String, wrappers: List<FlutterWrapperConfig>, storageLocations: List<StorageLocation>): Result<BackupResult>

Create a new backup with specified wrappers.

Link copied to clipboard
suspend fun deleteBackup(locations: List<StorageLocation>): Result<Boolean>

Delete all backup files at the platform cloud destination.

Link copied to clipboard
suspend fun exportToDownloads(groupId: String, location: StorageLocation): Result<String>

Export the backup file to the device's user-visible directory.

Link copied to clipboard
suspend fun getBackupInfo(groupId: String, location: StorageLocation): Result<BackupInfo>

Get backup metadata without decryption.

Link copied to clipboard
suspend fun hasBackup(location: StorageLocation): Result<Boolean>

Check if any backup exists at the platform cloud destination.

Link copied to clipboard
suspend fun importFromFile(filePath: String, locations: List<StorageLocation>): Result<Boolean>

Import a backup file from an external path.

Link copied to clipboard

Check if backup export is supported.

Link copied to clipboard

Check if system backup (iCloud/Google Backup) is enabled.

Link copied to clipboard

List all backups at the platform cloud destination.

Link copied to clipboard

Open system backup settings (iOS Settings / Android Backup).

Link copied to clipboard
suspend fun removeWrapper(wrapId: String): Result<BackupResult>

Remove a wrapper from an existing backup.

Link copied to clipboard
suspend fun restore(groupId: String, strategy: FlutterUnlockStrategy, location: StorageLocation): Result<List<WalletRestoreResult>>

Restore wallet(s) from backup using the specified unlock strategy.