This folder owns recovery bundle primitives and watchtower authorization helpers.
runtimeId + runtimeSeedtypes.ts
Shared bundle, appointment, receipt, and restore response contracts.bundle.ts
Runtime checkpoint bundle builder and deterministic hash validation.crypto.ts
Lookup-key derivation, AES-GCM encrypt/decrypt for blind tower mode, and
watchtower authorization hash helpers.deriveRuntimeRecoveryLookupKey(...)
Blind backup namespace used for full encrypted runtime restore.deriveRuntimeRecoveryActionLookupKey(...)
Per-account last-resort tower namespace used for delayed last-resort dispute
appointments.Those two lookup families must stay separate. The tower should not learn backup availability from the action path or action coverage from the blind restore path.
frontend/src/lib/stores/vault/vaultStore.ts
Schedules upload of encrypted runtime backups and restores from tower on a
fresh device or missing local DB.core/watchtower/http.ts
Verifies owner-signed appointments and serves blind-backup restore payloads.core/watchtower/standalone-server.ts
Standalone tower API service backed by LevelDB.runtime.ts
Restores an Env back from a canonical checkpoint snapshot.This is intentionally the narrow recovery/watchtower cryptography layer:
The recovery bundle reuses the same checkpoint snapshot format that storage/WAL already treats as canonical truth.