WebSocket Streaming Samples
Use WebSocket subscriptions for live streams and HTTP backfill for durability.
export WS_URL=ws://127.0.0.1:8546
pnpm tsx chains/ethereum/samples/websocket/subscribe-newheads.ts
pnpm tsx chains/ethereum/samples/websocket/subscribe-logs.ts
Both scripts reconnect with bounded exponential backoff. Production consumers should persist the last processed block and run eth_getLogs after reconnect.