Interface: WsStoredState<TWSTopicSubscribeEvent extends string | object>
Type Parameters
| Type Parameter |
|---|
TWSTopicSubscribeEvent extends string | object |
Properties
| Property | Type | Description |
|---|---|---|
activePingTimer? | Timeout | A timer that will send an upstream heartbeat (ping) when it expires |
activePongTimer? | Timeout | A timer tracking that an upstream heartbeat was sent, expecting a reply before it expires |
activeReconnectTimer? | Timeout | If a reconnection is in progress, this will have the timer for the delayed reconnect |
connectionState? | WsConnectionStateEnum | The current lifecycle state of the connection (enum) |
connectionStateChangedAt? | Date | - |
deferredPromiseStore | Record<string, DeferredPromise> | When a connection attempt is in progress (even for reconnect), a promise is stored here. This promise will resolve once connected (and will then get removed); |
didAuthWSAPI? | boolean | Whether this connection has completed authentication before for the Websocket API, so it k nows to automatically reauth if reconnected |
isAuthenticated? | boolean | Whether this connection has completed authentication (only applies to private connections) |
subscribedTopics | Set<TWSTopicSubscribeEvent> | All the topics we are expected to be subscribed to on this connection (and we automatically resubscribe to if the connection drops) A "Set" and a deep-object-match are used to ensure we only subscribe to a topic once (tracking a list of unique topics we're expected to be connected to) |
ws? | WebSocket | The currently active websocket connection |
WSAPIAuthChannel? | string | To reauthenticate on the WS API, which channel do we send to? |