Create a client
MeridianClient.create() parses and validates the token before opening the WebSocket. It returns an Effect.
Config
| Option | Type | Default | Description |
|---|---|---|---|
url | string | — | Server base URL (http:// or ws://, both work) |
namespace | string | — | Namespace to connect to |
token | string | — | Meridian token |
autoConnect | boolean | true | Open WebSocket immediately |
Properties
CRDT handles
All handles are cached bycrdtId — calling the same method twice returns the same instance.
orset, lwwregister, and presence, passing an Effect Schema enables runtime validation of incoming deltas. Without a schema, T = unknown.
HTTP client
Wait for connection
CONNECTED state. Useful in tests or when you need to send an operation immediately after creating the client (before the connection handshake completes).
Throws Error: WsTransport: connect timeout if the timeout elapses.