FlowGuard API - v1.2.0-rc.2
    Preparing search index...

    Function verifyChain

    • Verify the entire audit trail chain.

      Walks from the first event to the last, verifying:

      1. First event has prevHash === GENESIS_HASH
      2. Each subsequent event has prevHash === previous event's chainHash
      3. Each event's chainHash matches recomputation

      Events without chainHash/prevHash fields are skipped (legacy support). The chain continues from the last known hash after skipped events.

      In strict mode (options.strict = true), skipped events make the chain invalid. Regulated verification paths must use strict mode.

      Parameters

      • events: Record<string, unknown>[]

        The audit trail events in chronological order.

      • Optionaloptions: ChainVerifyOptions

        Verification options (strict mode, etc.).

      Returns ChainVerification

      ChainVerification with full results.