acceptPreDerivedSeed

suspend fun acceptPreDerivedSeed(activity: FragmentActivity, prfEntropy: ByteArray): ByteArray

Pre-warm SeedVault with a PRF output the caller already derived in a multi-purpose ceremony — used by SigilSession to collapse "sign in + first wallet refresh" to one biometric.

Flow:

  1. If SeedVault already holds a PRF-flagged entry, biometric- decrypt and return its seed (no new write — the cached entry is authoritative). This is the cache-hit branch.

  2. Legacy unflagged vault → wipe, then go to step 3.

  3. Run entropyToBip39Seed(prfEntropy) locally (pure compute, no biometric), store into SeedVault, set the PRF flag.

Caller wipes the input prfEntropy after the call returns — WalletSeedSource only reads from it, never retains it.

The serialization point with ensureSeedReady is the shared bootstrapMutex — concurrent calls are safe.