FlowGuard API - v1.2.0-tp.1
    Preparing search index...

    Interface ChainVerification

    Result of full chain verification.

    interface ChainVerification {
        valid: boolean;
        totalEvents: number;
        verifiedCount: number;
        skippedCount: number;
        firstBreak: EventVerification | null;
        results: readonly EventVerification[];
        reason: ChainVerificationReason | null;
        timestampMonotonicity:
            | { valid: boolean; firstBreak: number
            | null; message: string | null }
            | null;
        missingTimestampEvidence: readonly number[];
        tsaImprintMismatches: readonly number[];
        tokenVerificationRequired: readonly number[];
    }
    Index

    Properties

    valid: boolean

    Whether the entire chain is valid.

    totalEvents: number

    Total events in the trail.

    verifiedCount: number

    Events verified (with hash fields).

    skippedCount: number

    Events skipped (without hash fields — legacy/pre-chain).

    firstBreak: EventVerification | null

    First broken event (null if no hash chain break).

    results: readonly EventVerification[]

    All verification results (one per chained event).

    reason: ChainVerificationReason | null

    Top-level failure classification. Null when chain is valid.

    • CHAIN_BREAK: hash mismatch detected (firstBreak has details).
    • LEGACY_EVENTS_NOT_ALLOWED_IN_STRICT_MODE: strict mode rejects unchained legacy events (skippedCount > 0).
    • LEGACY_AUDIT_CHAIN_NOT_VERIFIABLE_WITH_V2: chained legacy format cannot be verified under current v2 guarantees.
    • UNSUPPORTED_AUDIT_FORMAT_VERSION: event declares an unknown format.
    • TIMESTAMP_NON_MONOTONIC: timestamps decrease between events.
    • TIMESTAMP_EVIDENCE_MISSING: critical events lack timestamp evidence.
    • TSA_MESSAGE_IMPRINT_MISMATCH: TSA stamp does not match canonical digest.
    • TOKEN_VERIFICATION_REQUIRED: TSA-stamped event has tokenDerBase64 that must be cryptographically verified before imprint can be trusted.

    Priority: CHAIN_BREAK > unsupported format > legacy format > legacy unchained > timestamp_*.

    timestampMonotonicity:
        | { valid: boolean; firstBreak: number
        | null; message: string | null }
        | null

    Timestamp monotonicity result (null if strictTimestamps not enabled).

    missingTimestampEvidence: readonly number[]

    Indices of critical events missing timestamp evidence.

    tsaImprintMismatches: readonly number[]

    Indices of events with TSA messageImprint mismatch.

    tokenVerificationRequired: readonly number[]

    Indices of TSA-stamped events with tokenDerBase64 that require token verification.