Lace JavaScript API
    Preparing search index...

    Interface WebSocketOptions

    interface WebSocketOptions {
        bySecret?: string;
        channelBinding?: BytesLike;
        expectedPeerBy?: string;
        peerProof?: "disabled" | "confidential-channel" | "channel-bound";
        port?: string;
        role: "listener" | "connector";
        socket: WebSocket;
        streamEncodings?: readonly string[];
        wasm?: unknown;
        wasmUrl?: string | URL;
    }

    Hierarchy (View Summary)

    Index
    bySecret?: string
    channelBinding?: BytesLike

    Exactly 32 opaque bytes, required only for channel-bound; copied at factory entry.

    expectedPeerBy?: string

    Canonical V..H3 text; requires confidential-channel or channel-bound. Every logical session rejects missing or different live peer proof before record work.

    peerProof?: "disabled" | "confidential-channel" | "channel-bound"

    Disabled by default. Confidential-channel asserts confidentiality, integrity, and endpoint confinement for the complete channel. Channel-bound additionally binds live proofs to a host-established encrypted session and requires bySecret. Neither mode secures the transport.

    port?: string

    What this side wants to talk to, sent in every preface of the carrier: nonempty printable-ASCII segments separated by /, at most 122 bytes. Invalid text rejects construction before protocol IO. Omitted, prefaces name no port.

    role: "listener" | "connector"
    socket: WebSocket

    Already OPEN; construction adopts the socket without dialing.

    streamEncodings?: readonly string[]

    Lace-065 stream-encoding tokens, used as both encode preference and decode set. Omitted, every compiled-in encoding (['zstd20c', 'deflate12c']); identity is implied, so [] offers identity only. Unknown, repeated, or identity tokens reject construction before protocol IO.

    wasm?: unknown
    wasmUrl?: string | URL