WebSocket
WebSocket in the Carbium Library: 12 working Solana examples, among them Parallel Kit subscriptions and Multi-endpoint subscription dedup.
- Parallel Kit subscriptions HS0120
Stop MaxListenersExceededWarning when opening many @solana/kit subscriptions in parallel: one AbortController each, shown in one TypeScript file on Carbium.
- Multi-endpoint subscription dedup HS0118
Open one Solana logsSubscribe on two endpoints, drop repeats by signature and count what each feed missed, in one TypeScript file on Carbium.
- Snapshot plus subscription sync HS0116
Open accountSubscribe, read the account once, and drop notifications whose slot is not newer than the snapshot so old state never overwrites new state.
- Subscription ID tracking HS0115
Keep the node's subscription id from the subscribe reply, map it to each notification and send it back to unsubscribe, in one TypeScript file on Carbium.
- Program subscription filters HS0114
Filter programSubscribe for several values by opening one subscription per value, since filters combine with AND, in one TypeScript file on Carbium.
- Log mentions filter behavior HS0112
Learn what a logsSubscribe mentions filter matches on Solana: any transaction touching the address, logged or not, and a runnable check of it.
- Slot subscription reader HS0110
What slotSubscribe sends on a Solana WebSocket, what slot, parent and root mean, and a TypeScript reader that prints them on Carbium.
- Instruction log filter HS0067
Watch one program on logsSubscribe and print only transactions that ran a named instruction, matched inside that program's own log frame.
- Closed account detection HS0038
Catch closed Solana accounts: programSubscribe can miss the close, so a TypeScript file tracks what it sees and reports accounts that vanish.
- Account notification fields HS0037
Every field in an accountSubscribe notification on Solana, what it holds and how to decode it, shown with one read-only TypeScript watcher on Carbium.
- WebSocket keepalive and reconnect HS0036
Keep a Solana WebSocket alive with a silence watchdog, jittered backoff and a fresh subscribe, shown in one TypeScript file on Carbium.
- Multi-wallet log watcher HS0011
Watch many Solana wallets with one logsSubscribe per wallet, reconnect on drops and backfill gaps with getSignaturesForAddress, in one TypeScript file.