Helius SDK - v5.0.0
    Preparing search index...

    Interface ParsedStreamsClientOptions

    interface ParsedStreamsClientOptions {
        discoveryUrl?: string;
        maxReconnectAttempts?: number;
        onDisconnect?: (info: ParsedStreamsReconnectInfo) => void;
        onReconnect?: (info: ParsedStreamsReconnectInfo) => void;
        reconnect?: boolean;
        url?: string;
        WebSocket?: new (url: string) => unknown;
    }
    Index

    Properties

    discoveryUrl?: string

    Override the describeProgram endpoint (full URL, including the API key).

    maxReconnectAttempts?: number

    Consecutive failed reconnect attempts before giving up. Defaults to 10.

    onDisconnect?: (info: ParsedStreamsReconnectInfo) => void

    Called when the connection drops while subscriptions are open, before any reconnect attempt, so before any notification from the new connection. Notifications already buffered can still be read after it fires; they are all at or before lastSlot.

    Fires once per outage, which lasts until onReconnect. Failed reconnect attempts don't fire it again. With several subscriptions, those already resubscribed deliver again before onReconnect, and a drop in that window doesn't fire it again either; backfilling from the first lastSlot covers both. If the subscriptions can't be restored (reconnect off, slow consumer, attempts exhausted), their iterators throw and onReconnect never follows. Not called for ParsedStreamsClient.close, or once every subscription has ended.

    onReconnect?: (info: ParsedStreamsReconnectInfo) => void

    Called after a reconnect resubscribes the open subscriptions. A filter the server now rejects ends that subscription's iterator with the error.

    reconnect?: boolean

    Reconnect and resubscribe when the server closes the connection. Defaults to true.

    url?: string

    Override the subscription endpoint (full URL, including the API key).

    WebSocket?: new (url: string) => unknown

    WebSocket implementation. Defaults to the global WebSocket (browsers, Node 22+). On Node 20, pass WebSocket from the ws package, which also lets the client watch the server's pings to detect a dead connection.