• Encode an event into a binary buffer

    Returns

    Binary buffer containing the encoded event

    Type Parameters

    Parameters

    • eventType: K

      The type of event from the registry

    • data: EventTypes<T>[K]

      The event data matching the schema

    • registry: T = ...

      Optional custom registry (defaults to EventSchemas)

    Returns Uint8Array