Leaf
    Preparing search index...

    Function encodeClientMessage

    • Encode a client message to binary.

      Parameters

      • msg:
            | { entityId: `leaf:${string}`; type: "unsubscribe" }
            | {
                entityId: `leaf:${string}`;
                snapshot: Uint8Array<ArrayBufferLike>;
                type: "subscribe";
            }
            | {
                entityId: `leaf:${string}`;
                type: "sendUpdate";
                update: Uint8Array<ArrayBufferLike>;
            }

      Returns Uint8Array