@me2em/pact
    Preparing search index...

    Function encodeEvent

    • Canonical wire bytes of the event: JCS(event) — UTF-8. No schema validation here (assemblers build valid events; the strict gate is decodeEvent / assertValidPayload).

      Parameters

      • event: Event

        The event to serialize.

      Returns Uint8Array

      The canonical JCS bytes (UTF-8).

      PactError MALFORMED @ codec when the event is not JSON-representable.

      const line = encodeEvent(event); // one NDJSON line of the export