UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
recovery-codes.ts File Reference
import type;

Functions

function lines (entry:Pick< VaultEntry, 'extra_vars'>)
 Single-use recovery codes (Phase 24.5).
 
function export codeStatus (entry:Pick< VaultEntry, 'extra_vars'>)
 

Variables

 return { total: all.length, remaining: all.filter((l) => !l.includes('\t')).length }
 

Function Documentation

◆ lines()

function lines (   entry:Pick< VaultEntry, 'extra_vars'>)

Single-use recovery codes (Phase 24.5).

Twin of the code_*/mark_used functions in vault-core/src/type_emit.rs, pinned by tests/fixtures/parity/recovery-codes.json.

One code per line in the entry's codes variable. A used code is not removed: it keeps its text and gains \tUSED <date>, so "which did I burn?" is still answerable. Reading never consumes (the HOTP rule) — a code is spent when the service accepts it, and only the user knows that.

◆ codeStatus()

function export codeStatus (   entry:Pick< VaultEntry, 'extra_vars'>)

Variable Documentation

◆ return

return { total: all.length, remaining: all.filter((l) => !l.includes('\t')).length }