@me2em/pact
    Preparing search index...

    Function buildEvent

    • Builds, signs and verifies a follow-up event against the prefix: position from positionOf, signatures via signaturesFor, commit through finalize.

      Parameters

      • events: Event[]

        The verified journal prefix.

      • ty: EventType

        The event type (v1 registry — see EVENT_TYPES).

      • pl: Record<string, unknown>

        The payload (strict shape per type — the codec validates).

      • keys: Uint8Array[]

        Pact private keys of the signers (quorum per constitution; duplicates reject).

      • Optionalclock: Clock

        Optional clock injection (Р4); defaults to the system clock.

      Returns Event

      The assembled, verified event.

      PactError on an empty prefix, duplicate signer keys or any verification failure (B-7 — fail-closed).

      const act = buildEvent(events, 'ACT', { no: 'approved' }, [memberKey]);