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> = listOf(StorageLocation.CLOUD)): Result<BackupResult>

Create a new backup with specified wrappers.

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

Delete the backup file.

Link copied to clipboard

Export the backup file to the device's Downloads folder.

Link copied to clipboard

Get backup metadata without decryption.

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

Check if a backup exists.

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

Import a backup file from an external path.

Link copied to clipboard

Check if backup export is supported on this platform. Export is supported when using LocalFileBackupProvider.

Link copied to clipboard

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

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(strategy: FlutterUnlockStrategy, fromLocation: StorageLocation? = null): Result<List<WalletRestoreResult>>

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