interface JetstreamOptions

Options for the Jetstream class.

Properties

endpoint?: string

The full subscription endpoint to connect to.

Default: "wss://jetstream1.us-east.bsky.network/subscribe"

wantedCollections?: WantedCollections[]

The record collections that you want to receive updates for. Leave this empty to receive updates for all record collections.

wantedDids?: string[]

The DIDs that you want to receive updates for. Leave this empty to receive updates for all DIDs.

maxMessageSizeBytes?: number

The maximum size of a payload that this client would like to receive. Zero means no limit, negative values are treated as zero.

Default: 0

cursor?: number

The Unix timestamp in microseconds that you want to receive updates from.

ws?: unknown

The WebSocket implementation to use (e.g. import ws from "ws"). Not required if you are on Node 21.0.0 or newer, or another environment that provides a WebSocket implementation.