@triton-one/yellowstone-grpc 5.0.4 → 5.0.7
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.
- package/dist/cjs/index.js +216 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/napi/index.js +54 -52
- package/dist/cjs/napi/index.js.map +1 -1
- package/dist/esm/grpc/geyser.js +1 -1
- package/dist/esm/grpc/google/protobuf/timestamp.js +1 -1
- package/dist/esm/grpc/solana-storage.js +1 -1
- package/dist/esm/index.js +191 -16
- package/dist/esm/napi/index.js +54 -52
- package/dist/types/index.d.ts +22 -4
- package/dist/types/napi/index.d.ts +62 -1
- package/dist/types/types.d.ts +7 -0
- package/package.json +5 -5
|
@@ -26,6 +26,20 @@ export declare class DuplexStream {
|
|
|
26
26
|
*/
|
|
27
27
|
close(): void
|
|
28
28
|
write(request: JsSubscribeRequest): void
|
|
29
|
+
writeRaw(requestBytes: Buffer): void
|
|
30
|
+
}
|
|
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
|
|
29
43
|
}
|
|
30
44
|
|
|
31
45
|
/**
|
|
@@ -60,11 +74,21 @@ export declare class GrpcClient {
|
|
|
60
74
|
* The returned value is consumed by the JS SDK `ClientDuplexStream` wrapper,
|
|
61
75
|
* which handles Node stream lifecycle and protobuf-shape normalization.
|
|
62
76
|
*/
|
|
63
|
-
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>
|
|
64
86
|
}
|
|
65
87
|
|
|
66
88
|
export declare function decodeTxError(err: Array<number>): string
|
|
67
89
|
|
|
90
|
+
export declare function encodeDeshredTx(data: Uint8Array, encoding: WasmUiTransactionEncoding): string
|
|
91
|
+
|
|
68
92
|
export declare function encodeTx(data: Uint8Array, encoding: WasmUiTransactionEncoding, maxSupportedTransactionVersion: number | undefined | null, showRewards: boolean): string
|
|
69
93
|
|
|
70
94
|
export interface JsBlockHeight {
|
|
@@ -233,6 +257,11 @@ export interface JsRewards {
|
|
|
233
257
|
numPartitions?: JsNumPartitions
|
|
234
258
|
}
|
|
235
259
|
|
|
260
|
+
export interface JsSubscribeDeshredRequest {
|
|
261
|
+
deshredTransactions: Record<string, JsSubscribeRequestFilterDeshredTransactions>
|
|
262
|
+
ping?: JsSubscribeRequestPing
|
|
263
|
+
}
|
|
264
|
+
|
|
236
265
|
export interface JsSubscribeReplayInfoRequest {
|
|
237
266
|
|
|
238
267
|
}
|
|
@@ -311,6 +340,13 @@ export interface JsSubscribeRequestFilterBlocksMeta {
|
|
|
311
340
|
|
|
312
341
|
}
|
|
313
342
|
|
|
343
|
+
export interface JsSubscribeRequestFilterDeshredTransactions {
|
|
344
|
+
vote?: boolean
|
|
345
|
+
accountInclude: Array<string>
|
|
346
|
+
accountExclude: Array<string>
|
|
347
|
+
accountRequired: Array<string>
|
|
348
|
+
}
|
|
349
|
+
|
|
314
350
|
export interface JsSubscribeRequestFilterEntry {
|
|
315
351
|
|
|
316
352
|
}
|
|
@@ -384,6 +420,31 @@ export interface JsSubscribeUpdateBlockMeta {
|
|
|
384
420
|
entriesCount: string
|
|
385
421
|
}
|
|
386
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
|
+
|
|
387
448
|
export interface JsSubscribeUpdateEntry {
|
|
388
449
|
slot: string
|
|
389
450
|
index: string
|
package/dist/types/types.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "5.0.7",
|
|
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.
|
|
43
|
-
"@triton-one/yellowstone-grpc-napi-linux-x64-musl": "0.0.
|
|
44
|
-
"@triton-one/yellowstone-grpc-napi-darwin-arm64": "0.0.
|
|
45
|
-
"@triton-one/yellowstone-grpc-napi-darwin-x64": "0.0.
|
|
42
|
+
"@triton-one/yellowstone-grpc-napi-linux-x64-gnu": "0.0.12",
|
|
43
|
+
"@triton-one/yellowstone-grpc-napi-linux-x64-musl": "0.0.12",
|
|
44
|
+
"@triton-one/yellowstone-grpc-napi-darwin-arm64": "0.0.12",
|
|
45
|
+
"@triton-one/yellowstone-grpc-napi-darwin-x64": "0.0.12"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/core": "^7.28.5",
|