CloudBackupStatus

sealed interface CloudBackupStatus

Cloud-backup status for one lane (dust checkpoint or app state), surfaced by MidnightWallet.backupStatus so the UI can show what's happening instead of a silent log. The SDK stays best-effort/non-crashing — this is observation only.

Identity/seed recovery is NOT a lane here: it's the passkey (GPM-synced), sourced from the sigil store at the app layer, not the wallet.

Inheritors

Types

Link copied to clipboard
data class Failed(val message: String) : CloudBackupStatus

Last upload failed for a real reason (auth/quota/corruption); message for logs/UI.

Link copied to clipboard
data object Idle : CloudBackupStatus

Nothing attempted yet, or nothing to back up (no coordinator / no data).

Link copied to clipboard

Drive consent hasn't been granted — the UI should offer "enable". Dust only.

Link copied to clipboard

Couldn't reach the cloud due to a transient network/DNS blip (e.g. the device momentarily can't resolve www.googleapis.com). Distinct from Failed: the backup is enabled and healthy, just deferred — the next sync retries. The UI should NOT alarm (no red error); backup is best-effort.

Link copied to clipboard

An upload is in flight.

Link copied to clipboard
data class UpToDate(val atEpochMs: Long) : CloudBackupStatus

Last upload succeeded at atEpochMs (wall-clock, for a "backed up · 2m ago" label).