/*! * Copyright (c) 2026 Interop Alliance. All rights reserved. */ /** * The derived sets a wallet's audit tests assert: the invariants a transient * visit reaches, the gaps the registration index implies, and census * completeness. Each is computed from the table and the sites alone, so a * converger that quietly loses a trigger a transient visit fires, or an * invariant no registration reports any more, moves a derived set and fails * the wallet's pin. */ import { type InvariantId } from './ids.js'; import type { MenderRegistry } from './registry.js'; import type { InvariantGap, RegistrationSite } from './types.js'; /** * One derived gap: the declared row's key and kind, without its prose. */ type DerivedGap = Pick; /** * The invariants a transient visit on a standing credential reaches. The * two chain triggers are read through `dueAt` over the ladder held set; a * `login-routing` site counts unless the client-key-record probe guards it; * a `ceremony-tail` entry counts, every such ceremony running on any * session type; and a detector no site reports (a declaration carrying * `holdsWhen`) counts when it is checked at a trigger a transient visit * fires and, on the chain, under an authority the ladder held set carries. * An unreported declaration with no detector is reached by nothing. * * @param options {object} * @param options.registry {MenderRegistry} * @returns {ReadonlyArray} in table order */ export declare function transientReachableInvariants({ registry }: { registry: MenderRegistry; }): ReadonlyArray; /** * The gaps the index implies. An invariant no site reports derives `none`, * unless it is checked at ceremony tails alone (converged by the ceremony's * own sequenced code, which is never registered). A detector is not a * mender: a declaration carrying `holdsWhen` and no registration derives * `none` like any other unreported one, so adding a detector never retires * a gap. A declaration naming a chain or routing trigger no site backs * derives `none` whatever else it names. An invariant reported only at sites * a transient visit cannot reach, on an account shape the violation can * stand on, derives `unreachable`. Nothing else derives a gap. * * @param options {object} * @param options.registry {MenderRegistry} * @returns {ReadonlyArray} */ export declare function deriveGaps({ registry }: { registry: MenderRegistry; }): ReadonlyArray; /** * Compares the derived gaps with a wallet's declared allowlist. The * derivation admits gaps and retires none: a declared row the derivation no * longer produces passes, and a derived gap with no declaration fails. A * derived `none` needs a declared `none` row for its invariant; a derived * `unreachable` needs any declared row for it, since a declared `none` may * be scoped to a different torn state of the same predicate. * * @param options {object} * @param options.derived {ReadonlyArray} * @param options.declared {ReadonlyArray} * @returns {ReadonlyArray} the * derived gaps no declaration covers; empty when the allowlist is complete */ export declare function undeclaredGaps({ derived, declared }: { derived: ReadonlyArray; declared: ReadonlyArray; }): ReadonlyArray; /** * Census completeness: the ids in {@link INVARIANT_IDS} the table does not * declare. Duplicated ids and undeclared reports are refused by * `menderRegistry` at construction, so a registry in hand has neither. * * @param options {object} * @param options.registry {MenderRegistry} * @returns {ReadonlyArray} empty when the census is complete */ export declare function undeclaredInvariants({ registry }: { registry: MenderRegistry; }): ReadonlyArray; export {}; //# sourceMappingURL=derive.d.ts.map