WebSocket Samples
WebSocket samples cover accountSubscribe, logsSubscribe, programSubscribe, and signatureSubscribe, documented in Solana WebSocket RPC docs. They reconnect with exponential backoff because subscriptions are connection-scoped.
const request = { jsonrpc: "2.0", id: 1, method: "signatureSubscribe", params: [signature, { commitment: "confirmed" }] };
note
Persist highest processed slot outside the WebSocket client and backfill after reconnect.