@triton-one/yellowstone-grpc 5.0.5 → 5.0.8

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.
@@ -29,6 +29,19 @@ export declare class DuplexStream {
29
29
  writeRaw(requestBytes: Buffer): void
30
30
  }
31
31
 
32
+ /**
33
+ * DuplexStreamDeshred Engine.
34
+ *
35
+ * Similar to `DuplexStream`, but targets the deshred pre-execution stream.
36
+ */
37
+ export declare class DuplexStreamDeshred {
38
+ /** Retrieve one `SubscribeUpdateDeshred` and convert it to generated N-API JS shape. */
39
+ read(): Promise<JsSubscribeUpdateDeshred | undefined | null>
40
+ close(): void
41
+ write(request: JsSubscribeDeshredRequest): void
42
+ writeRaw(requestBytes: Buffer): void
43
+ }
44
+
32
45
  /**
33
46
  * Main client struct exposed to JavaScript via NAPI.
34
47
  *
@@ -61,11 +74,21 @@ export declare class GrpcClient {
61
74
  * The returned value is consumed by the JS SDK `ClientDuplexStream` wrapper,
62
75
  * which handles Node stream lifecycle and protobuf-shape normalization.
63
76
  */
64
- subscribe(): DuplexStream
77
+ subscribe(): Promise<DuplexStream>
78
+ /**
79
+ * Creates a deshred subscription stream bound to this client connection.
80
+ *
81
+ * Unlike `subscribe()`, this method opens the underlying gRPC stream before
82
+ * resolving, so server-side `UNIMPLEMENTED` errors bubble to TypeScript
83
+ * callers through the returned Promise.
84
+ */
85
+ subscribeDeshred(): Promise<DuplexStreamDeshred>
65
86
  }
66
87
 
67
88
  export declare function decodeTxError(err: Array<number>): string
68
89
 
90
+ export declare function encodeDeshredTx(data: Uint8Array, encoding: WasmUiTransactionEncoding): string
91
+
69
92
  export declare function encodeTx(data: Uint8Array, encoding: WasmUiTransactionEncoding, maxSupportedTransactionVersion: number | undefined | null, showRewards: boolean): string
70
93
 
71
94
  export interface JsBlockHeight {
@@ -234,6 +257,11 @@ export interface JsRewards {
234
257
  numPartitions?: JsNumPartitions
235
258
  }
236
259
 
260
+ export interface JsSubscribeDeshredRequest {
261
+ deshredTransactions: Record<string, JsSubscribeRequestFilterDeshredTransactions>
262
+ ping?: JsSubscribeRequestPing
263
+ }
264
+
237
265
  export interface JsSubscribeReplayInfoRequest {
238
266
 
239
267
  }
@@ -312,6 +340,13 @@ export interface JsSubscribeRequestFilterBlocksMeta {
312
340
 
313
341
  }
314
342
 
343
+ export interface JsSubscribeRequestFilterDeshredTransactions {
344
+ vote?: boolean
345
+ accountInclude: Array<string>
346
+ accountExclude: Array<string>
347
+ accountRequired: Array<string>
348
+ }
349
+
315
350
  export interface JsSubscribeRequestFilterEntry {
316
351
 
317
352
  }
@@ -385,6 +420,31 @@ export interface JsSubscribeUpdateBlockMeta {
385
420
  entriesCount: string
386
421
  }
387
422
 
423
+ export interface JsSubscribeUpdateDeshred {
424
+ filters: Array<string>
425
+ createdAt?: Date
426
+ updateOneof?: JsSubscribeUpdateDeshredUpdateOneof
427
+ }
428
+
429
+ export interface JsSubscribeUpdateDeshredTransaction {
430
+ transaction?: JsSubscribeUpdateDeshredTransactionInfo
431
+ slot: string
432
+ }
433
+
434
+ export interface JsSubscribeUpdateDeshredTransactionInfo {
435
+ signature: Buffer
436
+ isVote: boolean
437
+ transaction?: JsTransaction
438
+ loadedWritableAddresses: Array<Buffer>
439
+ loadedReadonlyAddresses: Array<Buffer>
440
+ }
441
+
442
+ export interface JsSubscribeUpdateDeshredUpdateOneof {
443
+ deshredTransaction?: JsSubscribeUpdateDeshredTransaction
444
+ ping?: JsSubscribeUpdatePing
445
+ pong?: JsSubscribeUpdatePong
446
+ }
447
+
388
448
  export interface JsSubscribeUpdateEntry {
389
449
  slot: string
390
450
  index: string
@@ -204,5 +204,12 @@ export type MapTransactionEncodingToReturnType = {
204
204
  3: typeof json;
205
205
  4: typeof jsonParsed;
206
206
  };
207
+ export type DeshredTransactionEncodingToReturnType<T extends keyof MapTransactionEncodingToReturnType = keyof MapTransactionEncodingToReturnType> = {
208
+ signature: string;
209
+ isVote: boolean;
210
+ transaction: MapTransactionEncodingToReturnType[T];
211
+ loadedWritableAddresses: string[];
212
+ loadedReadonlyAddresses: string[];
213
+ };
207
214
  export type TransactionErrorSolana = TransactionError;
208
215
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triton-one/yellowstone-grpc",
3
- "version": "5.0.5",
3
+ "version": "5.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Triton One",
6
6
  "description": "Yellowstone gRPC Geyser Node.js Client",
@@ -39,10 +39,10 @@
39
39
  "@solana/rpc-types": "=5.1.0"
40
40
  },
41
41
  "optionalDependencies": {
42
- "@triton-one/yellowstone-grpc-napi-linux-x64-gnu": "0.0.10",
43
- "@triton-one/yellowstone-grpc-napi-linux-x64-musl": "0.0.10",
44
- "@triton-one/yellowstone-grpc-napi-darwin-arm64": "0.0.10",
45
- "@triton-one/yellowstone-grpc-napi-darwin-x64": "0.0.10"
42
+ "@triton-one/yellowstone-grpc-napi-linux-x64-gnu": "0.0.13",
43
+ "@triton-one/yellowstone-grpc-napi-linux-x64-musl": "0.0.13",
44
+ "@triton-one/yellowstone-grpc-napi-darwin-arm64": "0.0.13",
45
+ "@triton-one/yellowstone-grpc-napi-darwin-x64": "0.0.13"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/core": "^7.28.5",