@k256/sdk 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,37 @@ interface RoutePlanStep {
99
99
  /** Percentage of input for this step (0-100) */
100
100
  percent: number;
101
101
  }
102
+ /**
103
+ * Mini block statistics (compact form used in FeeMarket.recentBlocks)
104
+ */
105
+ interface BlockMiniStats {
106
+ slot: number;
107
+ cuConsumed: number;
108
+ txCount: number;
109
+ utilizationPct: number;
110
+ avgCuPrice: number;
111
+ }
112
+ /**
113
+ * Direction of the fee trend
114
+ */
115
+ type TrendDirection = 'rising' | 'falling' | 'stable';
116
+ /**
117
+ * Full block-level statistics (standalone message 0x0F)
118
+ */
119
+ interface BlockStats {
120
+ slot: number;
121
+ cuConsumed: number;
122
+ executionCu: number;
123
+ cuLimit: number;
124
+ cuRemaining: number;
125
+ utilizationPct: number;
126
+ txCount: number;
127
+ avgCuPerTx: number;
128
+ avgCuPrice: number;
129
+ minCuPrice: number;
130
+ maxCuPrice: number;
131
+ timestampMs: number;
132
+ }
102
133
  /**
103
134
  * Per-writable-account fee data
104
135
  *
@@ -152,6 +183,10 @@ interface FeeMarket {
152
183
  blocksInWindow: number;
153
184
  /** Per-account fee data */
154
185
  accounts: AccountFee[];
186
+ /** Recent block mini-stats (v3) */
187
+ recentBlocks: BlockMiniStats[];
188
+ /** Fee trend direction (v3) */
189
+ trend: TrendDirection;
155
190
  }
156
191
  /**
157
192
  * Network congestion state
@@ -231,4 +266,4 @@ interface SubscribeQuoteRequest {
231
266
  refreshIntervalMs?: number;
232
267
  }
233
268
 
234
- export { type AccountFee, type Blockhash, type FeeMarket, type Heartbeat, NetworkState, type OrderLevel, type Pool, type PoolUpdate, type Quote, type RoutePlanStep, type SubscribeQuoteRequest, type SubscribeRequest, type Token };
269
+ export { type AccountFee, type BlockMiniStats, type BlockStats, type Blockhash, type FeeMarket, type Heartbeat, NetworkState, type OrderLevel, type Pool, type PoolUpdate, type Quote, type RoutePlanStep, type SubscribeQuoteRequest, type SubscribeRequest, type Token, type TrendDirection };
@@ -99,6 +99,37 @@ interface RoutePlanStep {
99
99
  /** Percentage of input for this step (0-100) */
100
100
  percent: number;
101
101
  }
102
+ /**
103
+ * Mini block statistics (compact form used in FeeMarket.recentBlocks)
104
+ */
105
+ interface BlockMiniStats {
106
+ slot: number;
107
+ cuConsumed: number;
108
+ txCount: number;
109
+ utilizationPct: number;
110
+ avgCuPrice: number;
111
+ }
112
+ /**
113
+ * Direction of the fee trend
114
+ */
115
+ type TrendDirection = 'rising' | 'falling' | 'stable';
116
+ /**
117
+ * Full block-level statistics (standalone message 0x0F)
118
+ */
119
+ interface BlockStats {
120
+ slot: number;
121
+ cuConsumed: number;
122
+ executionCu: number;
123
+ cuLimit: number;
124
+ cuRemaining: number;
125
+ utilizationPct: number;
126
+ txCount: number;
127
+ avgCuPerTx: number;
128
+ avgCuPrice: number;
129
+ minCuPrice: number;
130
+ maxCuPrice: number;
131
+ timestampMs: number;
132
+ }
102
133
  /**
103
134
  * Per-writable-account fee data
104
135
  *
@@ -152,6 +183,10 @@ interface FeeMarket {
152
183
  blocksInWindow: number;
153
184
  /** Per-account fee data */
154
185
  accounts: AccountFee[];
186
+ /** Recent block mini-stats (v3) */
187
+ recentBlocks: BlockMiniStats[];
188
+ /** Fee trend direction (v3) */
189
+ trend: TrendDirection;
155
190
  }
156
191
  /**
157
192
  * Network congestion state
@@ -231,4 +266,4 @@ interface SubscribeQuoteRequest {
231
266
  refreshIntervalMs?: number;
232
267
  }
233
268
 
234
- export { type AccountFee, type Blockhash, type FeeMarket, type Heartbeat, NetworkState, type OrderLevel, type Pool, type PoolUpdate, type Quote, type RoutePlanStep, type SubscribeQuoteRequest, type SubscribeRequest, type Token };
269
+ export { type AccountFee, type BlockMiniStats, type BlockStats, type Blockhash, type FeeMarket, type Heartbeat, NetworkState, type OrderLevel, type Pool, type PoolUpdate, type Quote, type RoutePlanStep, type SubscribeQuoteRequest, type SubscribeRequest, type Token, type TrendDirection };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts"],"names":["NetworkState"],"mappings":";AAuKO,IAAK,YAAA,qBAAAA,aAAAA,KAAL;AACL,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,SAAM,CAAA,CAAA,GAAN,KAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,UAAO,CAAA,CAAA,GAAP,MAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,eAAY,CAAA,CAAA,GAAZ,WAAA;AAJU,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA","file":"index.js","sourcesContent":["/**\n * Shared type definitions for K256 SDK\n *\n * These types are used across WebSocket and REST API modules.\n *\n * @module @k256/sdk/types\n */\n\n/**\n * Pool state from DEX\n */\nexport interface Pool {\n /** Pool address (Base58) */\n address: string;\n /** Protocol/DEX name */\n protocol: string;\n /** Token mints in the pool (Base58) */\n tokenMints: string[];\n /** Token balances (as strings for precision) */\n tokenBalances: string[];\n /** Token decimals */\n tokenDecimals: number[];\n}\n\n/**\n * Real-time pool state update\n */\nexport interface PoolUpdate extends Pool {\n /** Global sequence number (monotonically increasing) */\n sequence: number;\n /** Solana slot when updated */\n slot: number;\n /** Write version within slot */\n writeVersion: number;\n /** Best bid price/size (orderbook pools only) */\n bestBid?: OrderLevel;\n /** Best ask price/size (orderbook pools only) */\n bestAsk?: OrderLevel;\n}\n\n/**\n * Order book level (bid or ask)\n */\nexport interface OrderLevel {\n /** Price in base units (as string for precision) */\n price: string;\n /** Size in base units (as string for precision) */\n size: string;\n}\n\n/**\n * Token metadata\n */\nexport interface Token {\n /** Token mint address (Base58) */\n mint: string;\n /** Token symbol (e.g., \"SOL\", \"USDC\") */\n symbol: string;\n /** Token name */\n name: string;\n /** Decimal places */\n decimals: number;\n /** Logo URL (optional) */\n logoUri?: string;\n /** Coingecko ID (optional) */\n coingeckoId?: string;\n}\n\n/**\n * Swap quote from aggregator\n */\nexport interface Quote {\n /** Input token mint (Base58) */\n inputMint: string;\n /** Output token mint (Base58) */\n outputMint: string;\n /** Input amount (as string for precision) */\n inAmount: string;\n /** Output amount (as string for precision) */\n outAmount: string;\n /** Price impact in basis points */\n priceImpactBps: number;\n /** Slippage in basis points */\n slippageBps: number;\n /** Route plan (DEXes used) */\n routePlan: RoutePlanStep[];\n /** Context slot */\n contextSlot: number;\n /** Algorithm used for routing */\n algorithm: string;\n}\n\n/**\n * Step in a swap route\n */\nexport interface RoutePlanStep {\n /** DEX/protocol name */\n protocol: string;\n /** Pool address (Base58) */\n poolAddress: string;\n /** Input mint for this step */\n inputMint: string;\n /** Output mint for this step */\n outputMint: string;\n /** Percentage of input for this step (0-100) */\n percent: number;\n}\n\n/**\n * Per-writable-account fee data\n *\n * Solana's scheduler limits each writable account to 12M CU per block.\n * Fee pricing is per-account: the fee you pay should be\n * max(p75(account) for account in your writable accounts).\n */\nexport interface AccountFee {\n /** Account public key (Base58) */\n pubkey: string;\n /** Total transactions touching this account in the window */\n totalTxs: number;\n /** Number of slots where this account was active */\n activeSlots: number;\n /** Total CU consumed by transactions touching this account */\n cuConsumed: number;\n /** Account utilization percentage (0-100) of 12M CU limit */\n utilizationPct: number;\n /** 25th percentile fee in microlamports/CU */\n p25: number;\n /** 50th percentile fee in microlamports/CU */\n p50: number;\n /** 75th percentile fee in microlamports/CU */\n p75: number;\n /** 90th percentile fee in microlamports/CU */\n p90: number;\n /** Minimum non-zero fee observed */\n minNonzeroPrice: number;\n}\n\n/**\n * Fee market update (per-writable-account model)\n *\n * Replaces the old flat PriorityFees struct. Now provides per-account\n * fee data so clients can price transactions based on the specific\n * writable accounts they touch.\n */\nexport interface FeeMarket {\n /** Current slot */\n slot: number;\n /** Timestamp in milliseconds */\n timestampMs: number;\n /** Recommended fee in microlamports/CU (max p75 across hottest accounts) */\n recommended: number;\n /** Network state (0=low, 1=normal, 2=high, 3=extreme) */\n state: NetworkState;\n /** Whether data is stale */\n isStale: boolean;\n /** Block utilization percentage (0-100) */\n blockUtilizationPct: number;\n /** Number of blocks in the observation window */\n blocksInWindow: number;\n /** Per-account fee data */\n accounts: AccountFee[];\n}\n\n/**\n * Network congestion state\n */\nexport enum NetworkState {\n Low = 0,\n Normal = 1,\n High = 2,\n Congested = 3,\n}\n\n/**\n * Recent blockhash for transactions\n */\nexport interface Blockhash {\n /** Slot of blockhash */\n slot: number;\n /** Timestamp in milliseconds */\n timestampMs: number;\n /** Recent blockhash (Base58) */\n blockhash: string;\n /** Block height */\n blockHeight: number;\n /** Last valid block height for transactions */\n lastValidBlockHeight: number;\n /** Whether data is stale */\n isStale: boolean;\n}\n\n/**\n * WebSocket connection heartbeat\n */\nexport interface Heartbeat {\n /** Server timestamp in milliseconds */\n timestampMs: number;\n /** Connection uptime in seconds */\n uptimeSecs: number;\n /** Total messages sent */\n messagesSent: number;\n /** Pool updates sent */\n poolUpdatesSent: number;\n /** Messages dropped (slow client) */\n messagesDropped: number;\n /** Whether pool updates are enabled */\n poolUpdatesEnabled: boolean;\n /** Subscribed channels */\n subscribedChannels: string[];\n /** Server sequence number */\n serverSequence: number;\n}\n\n/**\n * Subscribe request for WebSocket\n */\nexport interface SubscribeRequest {\n /** Channels to subscribe to */\n channels: ('pools' | 'priority_fees' | 'blockhash')[];\n /** Response format (default: binary) */\n format?: 'binary' | 'json';\n /** Filter by protocol names */\n protocols?: string[];\n /** Filter by pool addresses (Base58) */\n pools?: string[];\n /** Filter by token pairs [[mintA, mintB], ...] */\n tokenPairs?: [string, string][];\n}\n\n/**\n * Quote subscription request\n */\nexport interface SubscribeQuoteRequest {\n /** Input token mint (Base58) */\n inputMint: string;\n /** Output token mint (Base58) */\n outputMint: string;\n /** Amount in base units */\n amount: number;\n /** Slippage tolerance in basis points */\n slippageBps?: number;\n /** Refresh interval in milliseconds */\n refreshIntervalMs?: number;\n}\n"]}
1
+ {"version":3,"sources":["../../src/types/index.ts"],"names":["NetworkState"],"mappings":";AA6MO,IAAK,YAAA,qBAAAA,aAAAA,KAAL;AACL,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,SAAM,CAAA,CAAA,GAAN,KAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,UAAO,CAAA,CAAA,GAAP,MAAA;AACA,EAAAA,aAAAA,CAAAA,aAAAA,CAAA,eAAY,CAAA,CAAA,GAAZ,WAAA;AAJU,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA","file":"index.js","sourcesContent":["/**\n * Shared type definitions for K256 SDK\n *\n * These types are used across WebSocket and REST API modules.\n *\n * @module @k256/sdk/types\n */\n\n/**\n * Pool state from DEX\n */\nexport interface Pool {\n /** Pool address (Base58) */\n address: string;\n /** Protocol/DEX name */\n protocol: string;\n /** Token mints in the pool (Base58) */\n tokenMints: string[];\n /** Token balances (as strings for precision) */\n tokenBalances: string[];\n /** Token decimals */\n tokenDecimals: number[];\n}\n\n/**\n * Real-time pool state update\n */\nexport interface PoolUpdate extends Pool {\n /** Global sequence number (monotonically increasing) */\n sequence: number;\n /** Solana slot when updated */\n slot: number;\n /** Write version within slot */\n writeVersion: number;\n /** Best bid price/size (orderbook pools only) */\n bestBid?: OrderLevel;\n /** Best ask price/size (orderbook pools only) */\n bestAsk?: OrderLevel;\n}\n\n/**\n * Order book level (bid or ask)\n */\nexport interface OrderLevel {\n /** Price in base units (as string for precision) */\n price: string;\n /** Size in base units (as string for precision) */\n size: string;\n}\n\n/**\n * Token metadata\n */\nexport interface Token {\n /** Token mint address (Base58) */\n mint: string;\n /** Token symbol (e.g., \"SOL\", \"USDC\") */\n symbol: string;\n /** Token name */\n name: string;\n /** Decimal places */\n decimals: number;\n /** Logo URL (optional) */\n logoUri?: string;\n /** Coingecko ID (optional) */\n coingeckoId?: string;\n}\n\n/**\n * Swap quote from aggregator\n */\nexport interface Quote {\n /** Input token mint (Base58) */\n inputMint: string;\n /** Output token mint (Base58) */\n outputMint: string;\n /** Input amount (as string for precision) */\n inAmount: string;\n /** Output amount (as string for precision) */\n outAmount: string;\n /** Price impact in basis points */\n priceImpactBps: number;\n /** Slippage in basis points */\n slippageBps: number;\n /** Route plan (DEXes used) */\n routePlan: RoutePlanStep[];\n /** Context slot */\n contextSlot: number;\n /** Algorithm used for routing */\n algorithm: string;\n}\n\n/**\n * Step in a swap route\n */\nexport interface RoutePlanStep {\n /** DEX/protocol name */\n protocol: string;\n /** Pool address (Base58) */\n poolAddress: string;\n /** Input mint for this step */\n inputMint: string;\n /** Output mint for this step */\n outputMint: string;\n /** Percentage of input for this step (0-100) */\n percent: number;\n}\n\n/**\n * Mini block statistics (compact form used in FeeMarket.recentBlocks)\n */\nexport interface BlockMiniStats {\n slot: number\n cuConsumed: number\n txCount: number\n utilizationPct: number\n avgCuPrice: number\n}\n\n/**\n * Direction of the fee trend\n */\nexport type TrendDirection = 'rising' | 'falling' | 'stable'\n\n/**\n * Full block-level statistics (standalone message 0x0F)\n */\nexport interface BlockStats {\n slot: number\n cuConsumed: number\n executionCu: number\n cuLimit: number\n cuRemaining: number\n utilizationPct: number\n txCount: number\n avgCuPerTx: number\n avgCuPrice: number\n minCuPrice: number\n maxCuPrice: number\n timestampMs: number\n}\n\n/**\n * Per-writable-account fee data\n *\n * Solana's scheduler limits each writable account to 12M CU per block.\n * Fee pricing is per-account: the fee you pay should be\n * max(p75(account) for account in your writable accounts).\n */\nexport interface AccountFee {\n /** Account public key (Base58) */\n pubkey: string;\n /** Total transactions touching this account in the window */\n totalTxs: number;\n /** Number of slots where this account was active */\n activeSlots: number;\n /** Total CU consumed by transactions touching this account */\n cuConsumed: number;\n /** Account utilization percentage (0-100) of 12M CU limit */\n utilizationPct: number;\n /** 25th percentile fee in microlamports/CU */\n p25: number;\n /** 50th percentile fee in microlamports/CU */\n p50: number;\n /** 75th percentile fee in microlamports/CU */\n p75: number;\n /** 90th percentile fee in microlamports/CU */\n p90: number;\n /** Minimum non-zero fee observed */\n minNonzeroPrice: number;\n}\n\n/**\n * Fee market update (per-writable-account model)\n *\n * Replaces the old flat PriorityFees struct. Now provides per-account\n * fee data so clients can price transactions based on the specific\n * writable accounts they touch.\n */\nexport interface FeeMarket {\n /** Current slot */\n slot: number;\n /** Timestamp in milliseconds */\n timestampMs: number;\n /** Recommended fee in microlamports/CU (max p75 across hottest accounts) */\n recommended: number;\n /** Network state (0=low, 1=normal, 2=high, 3=extreme) */\n state: NetworkState;\n /** Whether data is stale */\n isStale: boolean;\n /** Block utilization percentage (0-100) */\n blockUtilizationPct: number;\n /** Number of blocks in the observation window */\n blocksInWindow: number;\n /** Per-account fee data */\n accounts: AccountFee[];\n /** Recent block mini-stats (v3) */\n recentBlocks: BlockMiniStats[];\n /** Fee trend direction (v3) */\n trend: TrendDirection;\n}\n\n/**\n * Network congestion state\n */\nexport enum NetworkState {\n Low = 0,\n Normal = 1,\n High = 2,\n Congested = 3,\n}\n\n/**\n * Recent blockhash for transactions\n */\nexport interface Blockhash {\n /** Slot of blockhash */\n slot: number;\n /** Timestamp in milliseconds */\n timestampMs: number;\n /** Recent blockhash (Base58) */\n blockhash: string;\n /** Block height */\n blockHeight: number;\n /** Last valid block height for transactions */\n lastValidBlockHeight: number;\n /** Whether data is stale */\n isStale: boolean;\n}\n\n/**\n * WebSocket connection heartbeat\n */\nexport interface Heartbeat {\n /** Server timestamp in milliseconds */\n timestampMs: number;\n /** Connection uptime in seconds */\n uptimeSecs: number;\n /** Total messages sent */\n messagesSent: number;\n /** Pool updates sent */\n poolUpdatesSent: number;\n /** Messages dropped (slow client) */\n messagesDropped: number;\n /** Whether pool updates are enabled */\n poolUpdatesEnabled: boolean;\n /** Subscribed channels */\n subscribedChannels: string[];\n /** Server sequence number */\n serverSequence: number;\n}\n\n/**\n * Subscribe request for WebSocket\n */\nexport interface SubscribeRequest {\n /** Channels to subscribe to */\n channels: ('pools' | 'priority_fees' | 'blockhash')[];\n /** Response format (default: binary) */\n format?: 'binary' | 'json';\n /** Filter by protocol names */\n protocols?: string[];\n /** Filter by pool addresses (Base58) */\n pools?: string[];\n /** Filter by token pairs [[mintA, mintB], ...] */\n tokenPairs?: [string, string][];\n}\n\n/**\n * Quote subscription request\n */\nexport interface SubscribeQuoteRequest {\n /** Input token mint (Base58) */\n inputMint: string;\n /** Output token mint (Base58) */\n outputMint: string;\n /** Amount in base units */\n amount: number;\n /** Slippage tolerance in basis points */\n slippageBps?: number;\n /** Refresh interval in milliseconds */\n refreshIntervalMs?: number;\n}\n"]}
package/dist/ws/index.cjs CHANGED
@@ -53,6 +53,8 @@ var MessageType = {
53
53
  Heartbeat: 13,
54
54
  /** Batched pool updates for high throughput */
55
55
  PoolUpdateBatch: 14,
56
+ /** Block-level statistics (v3) */
57
+ BlockStats: 15,
56
58
  /** Error message (UTF-8 string) */
57
59
  Error: 255
58
60
  };
@@ -130,6 +132,25 @@ function decodeMessage(data) {
130
132
  });
131
133
  offset += 92;
132
134
  }
135
+ const recentBlocksCount = Number(payloadView.getBigUint64(offset, true));
136
+ offset += 8;
137
+ const recentBlocks = [];
138
+ for (let i = 0; i < recentBlocksCount; i++) {
139
+ const rbSlot = Number(payloadView.getBigUint64(offset, true));
140
+ offset += 8;
141
+ const rbCuConsumed = Number(payloadView.getBigUint64(offset, true));
142
+ offset += 8;
143
+ const rbTxCount = payloadView.getUint32(offset, true);
144
+ offset += 4;
145
+ const rbUtilizationPct = payloadView.getFloat32(offset, true);
146
+ offset += 4;
147
+ const rbAvgCuPrice = Number(payloadView.getBigUint64(offset, true));
148
+ offset += 8;
149
+ recentBlocks.push({ slot: rbSlot, cuConsumed: rbCuConsumed, txCount: rbTxCount, utilizationPct: rbUtilizationPct, avgCuPrice: rbAvgCuPrice });
150
+ }
151
+ const trendByte = payloadView.getUint8(offset);
152
+ offset += 1;
153
+ const trend = trendByte === 0 ? "rising" : trendByte === 1 ? "falling" : "stable";
133
154
  return {
134
155
  type: "fee_market",
135
156
  data: {
@@ -140,7 +161,9 @@ function decodeMessage(data) {
140
161
  isStale,
141
162
  blockUtilizationPct,
142
163
  blocksInWindow,
143
- accounts
164
+ accounts,
165
+ recentBlocks,
166
+ trend
144
167
  }
145
168
  };
146
169
  }
@@ -185,6 +208,51 @@ function decodeMessage(data) {
185
208
  }
186
209
  };
187
210
  }
211
+ case MessageType.BlockStats: {
212
+ let offset = 0;
213
+ const slot = Number(payloadView.getBigUint64(offset, true));
214
+ offset += 8;
215
+ const cuConsumed = Number(payloadView.getBigUint64(offset, true));
216
+ offset += 8;
217
+ const executionCu = Number(payloadView.getBigUint64(offset, true));
218
+ offset += 8;
219
+ const cuLimit = Number(payloadView.getBigUint64(offset, true));
220
+ offset += 8;
221
+ const cuRemaining = Number(payloadView.getBigUint64(offset, true));
222
+ offset += 8;
223
+ const utilizationPct = payloadView.getFloat32(offset, true);
224
+ offset += 4;
225
+ const txCount = payloadView.getUint32(offset, true);
226
+ offset += 4;
227
+ const avgCuPerTx = payloadView.getUint32(offset, true);
228
+ offset += 4;
229
+ const avgCuPrice = Number(payloadView.getBigUint64(offset, true));
230
+ offset += 8;
231
+ const minCuPrice = Number(payloadView.getBigUint64(offset, true));
232
+ offset += 8;
233
+ const maxCuPrice = Number(payloadView.getBigUint64(offset, true));
234
+ offset += 8;
235
+ const timestampMs = Number(payloadView.getBigUint64(offset, true));
236
+ offset += 8;
237
+ return {
238
+ type: "block_stats",
239
+ data: {
240
+ slot,
241
+ cuConsumed,
242
+ executionCu,
243
+ cuLimit,
244
+ cuRemaining,
245
+ utilizationPct,
246
+ txCount,
247
+ avgCuPerTx,
248
+ avgCuPrice,
249
+ minCuPrice,
250
+ maxCuPrice,
251
+ timestampMs
252
+ },
253
+ receivedAt: Date.now()
254
+ };
255
+ }
188
256
  default:
189
257
  return null;
190
258
  }
@@ -642,6 +710,9 @@ var K256WebSocketClient = class {
642
710
  case "fee_market":
643
711
  this.config.onFeeMarket?.(decoded);
644
712
  break;
713
+ case "block_stats":
714
+ this.config.onBlockStats?.(decoded);
715
+ break;
645
716
  case "blockhash":
646
717
  this.config.onBlockhash?.(decoded);
647
718
  break;