SigilPanelViewModel
Self-contained sigil-identity bookkeeper for SigilStatusPanel.
Owns two flows:
Forge (forgeSigil): create a passkey via Credential Manager, then derive the sigil DID via
SigilIdentityProvider(PRF(passkey, SIGIL_SALT)→ Ed25519 →did:key:z6Mk…in the default impl). Two biometric prompts on first run.Sign in (restoreSeed): one biometric covers BOTH the sigil DID derivation AND the wallet seed pre-warm via the multi-salt PRF ceremony in
SigilSession.signIn. The wallet panel's first refresh after sign-in hits SeedVault cache instead of running its own PRF ceremony — no second prompt. Falls back to two biometrics on authenticators that don't support multi-salt PRF. Host-app state is restored (best-effort) via the wallet's silent seed-keyed com.midnight.kuira.sdk.MidnightWallet.fetchAppState.
Backup is no longer a manual action here — host app state is written automatically + silently by the wallet's seed-keyed path (#244). The old PRF AppStateBackup backup/restore was retired (it clobbered the same Block Store slot with a different key).
Held in BBoard's VM (not migrated):
authorizeAccessKey— needs aMidnightSdkinstance to derive the access key being authorized. The host bridges sigil + wallet for that flow.
Constructors
Functions
User chose "Start fresh" from the SigilStatus.BackupAvailable prompt: they acknowledge the cloud backup but want to proceed without restoring. Persist a flag so future launches don't keep nagging, and move to SigilStatus.None so the wallet panel unblocks and auto-bootstraps a fresh wallet.
Create a passkey + derive its did:key. Triggers the platform's Credential Manager UI on activity; the user picks an authenticator (device biometric / hardware key / etc.) and authorizes the create.
Sign in with an existing passkey — the post-PRF replacement for the old "restore from cloud" flow.
Sign out — biometric-gated. Clears the LOCAL sigil pointer and drops the cached SDK (MidnightSdkProvider.close), returning the panel to SigilStatus.None. Fully recoverable: the passkey stays in GPM, so the user signs back in (forge reuses it, or restore from cloud) to return to the SAME identity. The cloud backup is untouched. On biometric cancel or failure nothing changes — the sigil stays SigilStatus.Forged.