@orbitflare/sdk 0.5.0 → 0.6.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.
Files changed (54) hide show
  1. package/README.md +116 -3
  2. package/dist/address.d.ts +2 -1
  3. package/dist/address.d.ts.map +1 -1
  4. package/dist/address.js +13 -1
  5. package/dist/address.js.map +1 -1
  6. package/dist/apex.d.ts.map +1 -1
  7. package/dist/apex.js.map +1 -1
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js +1 -0
  10. package/dist/config.js.map +1 -1
  11. package/dist/error.d.ts.map +1 -1
  12. package/dist/error.js +14 -1
  13. package/dist/error.js.map +1 -1
  14. package/dist/events.d.ts +45 -0
  15. package/dist/events.d.ts.map +1 -0
  16. package/dist/events.js +98 -0
  17. package/dist/events.js.map +1 -0
  18. package/dist/grpc.d.ts +51 -19
  19. package/dist/grpc.d.ts.map +1 -1
  20. package/dist/grpc.js +210 -119
  21. package/dist/grpc.js.map +1 -1
  22. package/dist/jetstream/index.d.ts +14 -18
  23. package/dist/jetstream/index.d.ts.map +1 -1
  24. package/dist/jetstream/index.js +66 -106
  25. package/dist/jetstream/index.js.map +1 -1
  26. package/dist/jetstream/v2.d.ts +23 -28
  27. package/dist/jetstream/v2.d.ts.map +1 -1
  28. package/dist/jetstream/v2.js +112 -196
  29. package/dist/jetstream/v2.js.map +1 -1
  30. package/dist/proto/geyser.d.ts +247 -3
  31. package/dist/proto/geyser.d.ts.map +1 -1
  32. package/dist/proto/geyser.js +5038 -1780
  33. package/dist/proto/geyser.js.map +1 -1
  34. package/dist/proto/google/protobuf/timestamp.d.ts +2 -1
  35. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  36. package/dist/proto/google/protobuf/timestamp.js +61 -31
  37. package/dist/proto/google/protobuf/timestamp.js.map +1 -1
  38. package/dist/proto/jetstream.d.ts +2 -1
  39. package/dist/proto/jetstream.d.ts.map +1 -1
  40. package/dist/proto/jetstream.js +1328 -976
  41. package/dist/proto/jetstream.js.map +1 -1
  42. package/dist/proto/jetstream_v2.d.ts +170 -26
  43. package/dist/proto/jetstream_v2.d.ts.map +1 -1
  44. package/dist/proto/jetstream_v2.js +1662 -721
  45. package/dist/proto/jetstream_v2.js.map +1 -1
  46. package/dist/proto/solana-storage.d.ts +21 -1
  47. package/dist/proto/solana-storage.d.ts.map +1 -1
  48. package/dist/proto/solana-storage.js +909 -681
  49. package/dist/proto/solana-storage.js.map +1 -1
  50. package/dist/streaming.d.ts +58 -0
  51. package/dist/streaming.d.ts.map +1 -0
  52. package/dist/streaming.js +169 -0
  53. package/dist/streaming.js.map +1 -0
  54. package/package.json +7 -5
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.7
3
+ // protoc-gen-ts_proto v2.18.0
4
4
  // protoc v4.23.4
5
5
  // source: jetstream_v2.proto
6
6
  /* eslint-disable */
@@ -8,6 +8,7 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
8
  import { makeGenericClientConstructor, } from "@grpc/grpc-js";
9
9
  import { Timestamp } from "./google/protobuf/timestamp.js";
10
10
  export const protobufPackage = "jetstream.v2";
11
+ export const protobufFileName = "jetstream_v2.proto";
11
12
  export var SlotStatus;
12
13
  (function (SlotStatus) {
13
14
  SlotStatus[SlotStatus["SLOT_STATUS_UNSPECIFIED"] = 0] = "SLOT_STATUS_UNSPECIFIED";
@@ -17,6 +18,15 @@ export var SlotStatus;
17
18
  SlotStatus[SlotStatus["SLOT_STATUS_COMPLETE"] = 2] = "SLOT_STATUS_COMPLETE";
18
19
  /** SLOT_STATUS_DEAD - slot skipped, or superseded by later slots without completing */
19
20
  SlotStatus[SlotStatus["SLOT_STATUS_DEAD"] = 3] = "SLOT_STATUS_DEAD";
21
+ /**
22
+ * SLOT_STATUS_BLOCK_FOOTER - The slot's block footer; SlotEvent.block_footer is set. Sent only to
23
+ * streams that set include_block_footer, at most once per slot. It usually
24
+ * arrives right around COMPLETE, before or after it (the two are not
25
+ * ordered), and can also follow DEAD or arrive for a slot that never gets
26
+ * COMPLETE. It does not change the slot's status and is not a terminal
27
+ * event. A slot without a footer gets no such event.
28
+ */
29
+ SlotStatus[SlotStatus["SLOT_STATUS_BLOCK_FOOTER"] = 4] = "SLOT_STATUS_BLOCK_FOOTER";
20
30
  SlotStatus[SlotStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
31
  })(SlotStatus || (SlotStatus = {}));
22
32
  export function slotStatusFromJSON(object) {
@@ -33,6 +43,9 @@ export function slotStatusFromJSON(object) {
33
43
  case 3:
34
44
  case "SLOT_STATUS_DEAD":
35
45
  return SlotStatus.SLOT_STATUS_DEAD;
46
+ case 4:
47
+ case "SLOT_STATUS_BLOCK_FOOTER":
48
+ return SlotStatus.SLOT_STATUS_BLOCK_FOOTER;
36
49
  case -1:
37
50
  case "UNRECOGNIZED":
38
51
  default:
@@ -49,11 +62,38 @@ export function slotStatusToJSON(object) {
49
62
  return "SLOT_STATUS_COMPLETE";
50
63
  case SlotStatus.SLOT_STATUS_DEAD:
51
64
  return "SLOT_STATUS_DEAD";
65
+ case SlotStatus.SLOT_STATUS_BLOCK_FOOTER:
66
+ return "SLOT_STATUS_BLOCK_FOOTER";
52
67
  case SlotStatus.UNRECOGNIZED:
53
68
  default:
54
69
  return "UNRECOGNIZED";
55
70
  }
56
71
  }
72
+ export var BlockFooterSignatureKind;
73
+ (function (BlockFooterSignatureKind) {
74
+ BlockFooterSignatureKind[BlockFooterSignatureKind["COMPRESSED_BLS12_381_G2"] = 0] = "COMPRESSED_BLS12_381_G2";
75
+ BlockFooterSignatureKind[BlockFooterSignatureKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
76
+ })(BlockFooterSignatureKind || (BlockFooterSignatureKind = {}));
77
+ export function blockFooterSignatureKindFromJSON(object) {
78
+ switch (object) {
79
+ case 0:
80
+ case "COMPRESSED_BLS12_381_G2":
81
+ return BlockFooterSignatureKind.COMPRESSED_BLS12_381_G2;
82
+ case -1:
83
+ case "UNRECOGNIZED":
84
+ default:
85
+ return BlockFooterSignatureKind.UNRECOGNIZED;
86
+ }
87
+ }
88
+ export function blockFooterSignatureKindToJSON(object) {
89
+ switch (object) {
90
+ case BlockFooterSignatureKind.COMPRESSED_BLS12_381_G2:
91
+ return "COMPRESSED_BLS12_381_G2";
92
+ case BlockFooterSignatureKind.UNRECOGNIZED:
93
+ default:
94
+ return "UNRECOGNIZED";
95
+ }
96
+ }
57
97
  function createBaseSubscribeTransactionsRequest() {
58
98
  return { ping: undefined, addFilters: undefined, removeFilters: undefined };
59
99
  }
@@ -72,39 +112,49 @@ export const SubscribeTransactionsRequest = {
72
112
  },
73
113
  decode(input, length) {
74
114
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
75
- const end = length === undefined ? reader.len : reader.pos + length;
76
- const message = createBaseSubscribeTransactionsRequest();
77
- while (reader.pos < end) {
78
- const tag = reader.uint32();
79
- switch (tag >>> 3) {
80
- case 1: {
81
- if (tag !== 10) {
82
- break;
83
- }
84
- message.ping = Ping.decode(reader, reader.uint32());
85
- continue;
86
- }
87
- case 2: {
88
- if (tag !== 18) {
89
- break;
90
- }
91
- message.addFilters = AddFilters.decode(reader, reader.uint32());
92
- continue;
93
- }
94
- case 3: {
95
- if (tag !== 26) {
96
- break;
97
- }
98
- message.removeFilters = RemoveFilters.decode(reader, reader.uint32());
99
- continue;
100
- }
101
- }
102
- if ((tag & 7) === 4 || tag === 0) {
103
- break;
115
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
116
+ if (previousRecursionDepth >= 100) {
117
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
118
+ }
119
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
120
+ try {
121
+ const end = length === undefined ? reader.len : reader.pos + length;
122
+ const message = createBaseSubscribeTransactionsRequest();
123
+ while (reader.pos < end) {
124
+ const tag = reader.uint32();
125
+ switch (tag >>> 3) {
126
+ case 1: {
127
+ if (tag !== 10) {
128
+ break;
129
+ }
130
+ message.ping = Ping.decode(reader, reader.uint32());
131
+ continue;
132
+ }
133
+ case 2: {
134
+ if (tag !== 18) {
135
+ break;
136
+ }
137
+ message.addFilters = AddFilters.decode(reader, reader.uint32());
138
+ continue;
139
+ }
140
+ case 3: {
141
+ if (tag !== 26) {
142
+ break;
143
+ }
144
+ message.removeFilters = RemoveFilters.decode(reader, reader.uint32());
145
+ continue;
146
+ }
147
+ }
148
+ if ((tag & 7) === 4 || tag === 0) {
149
+ break;
150
+ }
151
+ reader.skip(tag & 7);
104
152
  }
105
- reader.skip(tag & 7);
153
+ return message;
154
+ }
155
+ finally {
156
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
106
157
  }
107
- return message;
108
158
  },
109
159
  fromJSON(object) {
110
160
  return {
@@ -161,25 +211,35 @@ export const Ping = {
161
211
  },
162
212
  decode(input, length) {
163
213
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
164
- const end = length === undefined ? reader.len : reader.pos + length;
165
- const message = createBasePing();
166
- while (reader.pos < end) {
167
- const tag = reader.uint32();
168
- switch (tag >>> 3) {
169
- case 1: {
170
- if (tag !== 8) {
171
- break;
172
- }
173
- message.pingId = reader.int32();
174
- continue;
175
- }
214
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
215
+ if (previousRecursionDepth >= 100) {
216
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
217
+ }
218
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
219
+ try {
220
+ const end = length === undefined ? reader.len : reader.pos + length;
221
+ const message = createBasePing();
222
+ while (reader.pos < end) {
223
+ const tag = reader.uint32();
224
+ switch (tag >>> 3) {
225
+ case 1: {
226
+ if (tag !== 8) {
227
+ break;
228
+ }
229
+ message.pingId = reader.int32();
230
+ continue;
231
+ }
232
+ }
233
+ if ((tag & 7) === 4 || tag === 0) {
234
+ break;
235
+ }
236
+ reader.skip(tag & 7);
176
237
  }
177
- if ((tag & 7) === 4 || tag === 0) {
178
- break;
179
- }
180
- reader.skip(tag & 7);
238
+ return message;
239
+ }
240
+ finally {
241
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
181
242
  }
182
- return message;
183
243
  },
184
244
  fromJSON(object) {
185
245
  return {
@@ -218,25 +278,35 @@ export const AddFilters = {
218
278
  },
219
279
  decode(input, length) {
220
280
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
221
- const end = length === undefined ? reader.len : reader.pos + length;
222
- const message = createBaseAddFilters();
223
- while (reader.pos < end) {
224
- const tag = reader.uint32();
225
- switch (tag >>> 3) {
226
- case 1: {
227
- if (tag !== 10) {
228
- break;
229
- }
230
- message.filters.push(TxFilter.decode(reader, reader.uint32()));
231
- continue;
232
- }
233
- }
234
- if ((tag & 7) === 4 || tag === 0) {
235
- break;
281
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
282
+ if (previousRecursionDepth >= 100) {
283
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
284
+ }
285
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
286
+ try {
287
+ const end = length === undefined ? reader.len : reader.pos + length;
288
+ const message = createBaseAddFilters();
289
+ while (reader.pos < end) {
290
+ const tag = reader.uint32();
291
+ switch (tag >>> 3) {
292
+ case 1: {
293
+ if (tag !== 10) {
294
+ break;
295
+ }
296
+ message.filters.push(TxFilter.decode(reader, reader.uint32()));
297
+ continue;
298
+ }
299
+ }
300
+ if ((tag & 7) === 4 || tag === 0) {
301
+ break;
302
+ }
303
+ reader.skip(tag & 7);
236
304
  }
237
- reader.skip(tag & 7);
305
+ return message;
306
+ }
307
+ finally {
308
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
238
309
  }
239
- return message;
240
310
  },
241
311
  fromJSON(object) {
242
312
  return {
@@ -274,32 +344,42 @@ export const TxFilter = {
274
344
  },
275
345
  decode(input, length) {
276
346
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
277
- const end = length === undefined ? reader.len : reader.pos + length;
278
- const message = createBaseTxFilter();
279
- while (reader.pos < end) {
280
- const tag = reader.uint32();
281
- switch (tag >>> 3) {
282
- case 1: {
283
- if (tag !== 10) {
284
- break;
285
- }
286
- message.filterId = reader.string();
287
- continue;
288
- }
289
- case 2: {
290
- if (tag !== 18) {
291
- break;
292
- }
293
- message.filter = SubscribeRequestFilterTransactions.decode(reader, reader.uint32());
294
- continue;
295
- }
296
- }
297
- if ((tag & 7) === 4 || tag === 0) {
298
- break;
347
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
348
+ if (previousRecursionDepth >= 100) {
349
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
350
+ }
351
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
352
+ try {
353
+ const end = length === undefined ? reader.len : reader.pos + length;
354
+ const message = createBaseTxFilter();
355
+ while (reader.pos < end) {
356
+ const tag = reader.uint32();
357
+ switch (tag >>> 3) {
358
+ case 1: {
359
+ if (tag !== 10) {
360
+ break;
361
+ }
362
+ message.filterId = reader.string();
363
+ continue;
364
+ }
365
+ case 2: {
366
+ if (tag !== 18) {
367
+ break;
368
+ }
369
+ message.filter = SubscribeRequestFilterTransactions.decode(reader, reader.uint32());
370
+ continue;
371
+ }
372
+ }
373
+ if ((tag & 7) === 4 || tag === 0) {
374
+ break;
375
+ }
376
+ reader.skip(tag & 7);
299
377
  }
300
- reader.skip(tag & 7);
378
+ return message;
379
+ }
380
+ finally {
381
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
301
382
  }
302
- return message;
303
383
  },
304
384
  fromJSON(object) {
305
385
  return {
@@ -354,46 +434,56 @@ export const SubscribeRequestFilterTransactions = {
354
434
  },
355
435
  decode(input, length) {
356
436
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
357
- const end = length === undefined ? reader.len : reader.pos + length;
358
- const message = createBaseSubscribeRequestFilterTransactions();
359
- while (reader.pos < end) {
360
- const tag = reader.uint32();
361
- switch (tag >>> 3) {
362
- case 1: {
363
- if (tag !== 10) {
364
- break;
365
- }
366
- message.accountInclude.push(reader.string());
367
- continue;
368
- }
369
- case 2: {
370
- if (tag !== 18) {
371
- break;
372
- }
373
- message.accountExclude.push(reader.string());
374
- continue;
375
- }
376
- case 3: {
377
- if (tag !== 26) {
378
- break;
379
- }
380
- message.accountRequired.push(reader.string());
381
- continue;
382
- }
383
- case 4: {
384
- if (tag !== 32) {
385
- break;
386
- }
387
- message.includeEnrichment = reader.bool();
388
- continue;
389
- }
390
- }
391
- if ((tag & 7) === 4 || tag === 0) {
392
- break;
437
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
438
+ if (previousRecursionDepth >= 100) {
439
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
440
+ }
441
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
442
+ try {
443
+ const end = length === undefined ? reader.len : reader.pos + length;
444
+ const message = createBaseSubscribeRequestFilterTransactions();
445
+ while (reader.pos < end) {
446
+ const tag = reader.uint32();
447
+ switch (tag >>> 3) {
448
+ case 1: {
449
+ if (tag !== 10) {
450
+ break;
451
+ }
452
+ message.accountInclude.push(reader.string());
453
+ continue;
454
+ }
455
+ case 2: {
456
+ if (tag !== 18) {
457
+ break;
458
+ }
459
+ message.accountExclude.push(reader.string());
460
+ continue;
461
+ }
462
+ case 3: {
463
+ if (tag !== 26) {
464
+ break;
465
+ }
466
+ message.accountRequired.push(reader.string());
467
+ continue;
468
+ }
469
+ case 4: {
470
+ if (tag !== 32) {
471
+ break;
472
+ }
473
+ message.includeEnrichment = reader.bool();
474
+ continue;
475
+ }
476
+ }
477
+ if ((tag & 7) === 4 || tag === 0) {
478
+ break;
479
+ }
480
+ reader.skip(tag & 7);
393
481
  }
394
- reader.skip(tag & 7);
482
+ return message;
483
+ }
484
+ finally {
485
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
395
486
  }
396
- return message;
397
487
  },
398
488
  fromJSON(object) {
399
489
  return {
@@ -459,25 +549,35 @@ export const RemoveFilters = {
459
549
  },
460
550
  decode(input, length) {
461
551
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
462
- const end = length === undefined ? reader.len : reader.pos + length;
463
- const message = createBaseRemoveFilters();
464
- while (reader.pos < end) {
465
- const tag = reader.uint32();
466
- switch (tag >>> 3) {
467
- case 1: {
468
- if (tag !== 10) {
469
- break;
470
- }
471
- message.filterIds.push(reader.string());
472
- continue;
473
- }
474
- }
475
- if ((tag & 7) === 4 || tag === 0) {
476
- break;
552
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
553
+ if (previousRecursionDepth >= 100) {
554
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
555
+ }
556
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
557
+ try {
558
+ const end = length === undefined ? reader.len : reader.pos + length;
559
+ const message = createBaseRemoveFilters();
560
+ while (reader.pos < end) {
561
+ const tag = reader.uint32();
562
+ switch (tag >>> 3) {
563
+ case 1: {
564
+ if (tag !== 10) {
565
+ break;
566
+ }
567
+ message.filterIds.push(reader.string());
568
+ continue;
569
+ }
570
+ }
571
+ if ((tag & 7) === 4 || tag === 0) {
572
+ break;
573
+ }
574
+ reader.skip(tag & 7);
477
575
  }
478
- reader.skip(tag & 7);
576
+ return message;
577
+ }
578
+ finally {
579
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
479
580
  }
480
- return message;
481
581
  },
482
582
  fromJSON(object) {
483
583
  return {
@@ -541,60 +641,70 @@ export const SubscribeTransactionsResponse = {
541
641
  },
542
642
  decode(input, length) {
543
643
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
544
- const end = length === undefined ? reader.len : reader.pos + length;
545
- const message = createBaseSubscribeTransactionsResponse();
546
- while (reader.pos < end) {
547
- const tag = reader.uint32();
548
- switch (tag >>> 3) {
549
- case 1: {
550
- if (tag !== 10) {
551
- break;
552
- }
553
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
554
- continue;
555
- }
556
- case 2: {
557
- if (tag !== 18) {
558
- break;
559
- }
560
- message.transaction = FilteredTransaction.decode(reader, reader.uint32());
561
- continue;
562
- }
563
- case 3: {
564
- if (tag !== 26) {
565
- break;
566
- }
567
- message.pong = Pong.decode(reader, reader.uint32());
568
- continue;
569
- }
570
- case 5: {
571
- if (tag !== 42) {
572
- break;
573
- }
574
- message.filterValidation = FilterResult.decode(reader, reader.uint32());
575
- continue;
576
- }
577
- case 6: {
578
- if (tag !== 50) {
579
- break;
580
- }
581
- message.heartbeat = Heartbeat.decode(reader, reader.uint32());
582
- continue;
583
- }
584
- case 4: {
585
- if (tag !== 32) {
586
- break;
587
- }
588
- message.sequence = reader.uint64();
589
- continue;
590
- }
591
- }
592
- if ((tag & 7) === 4 || tag === 0) {
593
- break;
644
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
645
+ if (previousRecursionDepth >= 100) {
646
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
647
+ }
648
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
649
+ try {
650
+ const end = length === undefined ? reader.len : reader.pos + length;
651
+ const message = createBaseSubscribeTransactionsResponse();
652
+ while (reader.pos < end) {
653
+ const tag = reader.uint32();
654
+ switch (tag >>> 3) {
655
+ case 1: {
656
+ if (tag !== 10) {
657
+ break;
658
+ }
659
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
660
+ continue;
661
+ }
662
+ case 2: {
663
+ if (tag !== 18) {
664
+ break;
665
+ }
666
+ message.transaction = FilteredTransaction.decode(reader, reader.uint32());
667
+ continue;
668
+ }
669
+ case 3: {
670
+ if (tag !== 26) {
671
+ break;
672
+ }
673
+ message.pong = Pong.decode(reader, reader.uint32());
674
+ continue;
675
+ }
676
+ case 5: {
677
+ if (tag !== 42) {
678
+ break;
679
+ }
680
+ message.filterValidation = FilterResult.decode(reader, reader.uint32());
681
+ continue;
682
+ }
683
+ case 6: {
684
+ if (tag !== 50) {
685
+ break;
686
+ }
687
+ message.heartbeat = Heartbeat.decode(reader, reader.uint32());
688
+ continue;
689
+ }
690
+ case 4: {
691
+ if (tag !== 32) {
692
+ break;
693
+ }
694
+ message.sequence = reader.uint64();
695
+ continue;
696
+ }
697
+ }
698
+ if ((tag & 7) === 4 || tag === 0) {
699
+ break;
700
+ }
701
+ reader.skip(tag & 7);
594
702
  }
595
- reader.skip(tag & 7);
703
+ return message;
704
+ }
705
+ finally {
706
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
596
707
  }
597
- return message;
598
708
  },
599
709
  fromJSON(object) {
600
710
  return {
@@ -652,7 +762,7 @@ export const SubscribeTransactionsResponse = {
652
762
  message.heartbeat = (object.heartbeat !== undefined && object.heartbeat !== null)
653
763
  ? Heartbeat.fromPartial(object.heartbeat)
654
764
  : undefined;
655
- message.sequence = object.sequence ?? 0n;
765
+ message.sequence = (object.sequence !== undefined && object.sequence !== null) ? BigInt(object.sequence) : 0n;
656
766
  return message;
657
767
  },
658
768
  };
@@ -668,25 +778,35 @@ export const Pong = {
668
778
  },
669
779
  decode(input, length) {
670
780
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
671
- const end = length === undefined ? reader.len : reader.pos + length;
672
- const message = createBasePong();
673
- while (reader.pos < end) {
674
- const tag = reader.uint32();
675
- switch (tag >>> 3) {
676
- case 1: {
677
- if (tag !== 8) {
678
- break;
679
- }
680
- message.pingId = reader.int32();
681
- continue;
682
- }
781
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
782
+ if (previousRecursionDepth >= 100) {
783
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
784
+ }
785
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
786
+ try {
787
+ const end = length === undefined ? reader.len : reader.pos + length;
788
+ const message = createBasePong();
789
+ while (reader.pos < end) {
790
+ const tag = reader.uint32();
791
+ switch (tag >>> 3) {
792
+ case 1: {
793
+ if (tag !== 8) {
794
+ break;
795
+ }
796
+ message.pingId = reader.int32();
797
+ continue;
798
+ }
799
+ }
800
+ if ((tag & 7) === 4 || tag === 0) {
801
+ break;
802
+ }
803
+ reader.skip(tag & 7);
683
804
  }
684
- if ((tag & 7) === 4 || tag === 0) {
685
- break;
686
- }
687
- reader.skip(tag & 7);
805
+ return message;
806
+ }
807
+ finally {
808
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
688
809
  }
689
- return message;
690
810
  },
691
811
  fromJSON(object) {
692
812
  return {
@@ -731,39 +851,49 @@ export const FilterResult = {
731
851
  },
732
852
  decode(input, length) {
733
853
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
734
- const end = length === undefined ? reader.len : reader.pos + length;
735
- const message = createBaseFilterResult();
736
- while (reader.pos < end) {
737
- const tag = reader.uint32();
738
- switch (tag >>> 3) {
739
- case 1: {
740
- if (tag !== 10) {
741
- break;
742
- }
743
- message.filterId = reader.string();
744
- continue;
745
- }
746
- case 2: {
747
- if (tag !== 16) {
748
- break;
749
- }
750
- message.accepted = reader.bool();
751
- continue;
752
- }
753
- case 3: {
754
- if (tag !== 26) {
755
- break;
756
- }
757
- message.rejectionReason = reader.string();
758
- continue;
759
- }
854
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
855
+ if (previousRecursionDepth >= 100) {
856
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
857
+ }
858
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
859
+ try {
860
+ const end = length === undefined ? reader.len : reader.pos + length;
861
+ const message = createBaseFilterResult();
862
+ while (reader.pos < end) {
863
+ const tag = reader.uint32();
864
+ switch (tag >>> 3) {
865
+ case 1: {
866
+ if (tag !== 10) {
867
+ break;
868
+ }
869
+ message.filterId = reader.string();
870
+ continue;
871
+ }
872
+ case 2: {
873
+ if (tag !== 16) {
874
+ break;
875
+ }
876
+ message.accepted = reader.bool();
877
+ continue;
878
+ }
879
+ case 3: {
880
+ if (tag !== 26) {
881
+ break;
882
+ }
883
+ message.rejectionReason = reader.string();
884
+ continue;
885
+ }
886
+ }
887
+ if ((tag & 7) === 4 || tag === 0) {
888
+ break;
889
+ }
890
+ reader.skip(tag & 7);
760
891
  }
761
- if ((tag & 7) === 4 || tag === 0) {
762
- break;
763
- }
764
- reader.skip(tag & 7);
892
+ return message;
893
+ }
894
+ finally {
895
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
765
896
  }
766
- return message;
767
897
  },
768
898
  fromJSON(object) {
769
899
  return {
@@ -819,25 +949,35 @@ export const Heartbeat = {
819
949
  },
820
950
  decode(input, length) {
821
951
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
822
- const end = length === undefined ? reader.len : reader.pos + length;
823
- const message = createBaseHeartbeat();
824
- while (reader.pos < end) {
825
- const tag = reader.uint32();
826
- switch (tag >>> 3) {
827
- case 1: {
828
- if (tag !== 8) {
829
- break;
830
- }
831
- message.serverTsMs = reader.uint64();
832
- continue;
833
- }
834
- }
835
- if ((tag & 7) === 4 || tag === 0) {
836
- break;
952
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
953
+ if (previousRecursionDepth >= 100) {
954
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
955
+ }
956
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
957
+ try {
958
+ const end = length === undefined ? reader.len : reader.pos + length;
959
+ const message = createBaseHeartbeat();
960
+ while (reader.pos < end) {
961
+ const tag = reader.uint32();
962
+ switch (tag >>> 3) {
963
+ case 1: {
964
+ if (tag !== 8) {
965
+ break;
966
+ }
967
+ message.serverTsMs = reader.uint64();
968
+ continue;
969
+ }
970
+ }
971
+ if ((tag & 7) === 4 || tag === 0) {
972
+ break;
973
+ }
974
+ reader.skip(tag & 7);
837
975
  }
838
- reader.skip(tag & 7);
976
+ return message;
977
+ }
978
+ finally {
979
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
839
980
  }
840
- return message;
841
981
  },
842
982
  fromJSON(object) {
843
983
  return {
@@ -860,7 +1000,9 @@ export const Heartbeat = {
860
1000
  },
861
1001
  fromPartial(object) {
862
1002
  const message = createBaseHeartbeat();
863
- message.serverTsMs = object.serverTsMs ?? 0n;
1003
+ message.serverTsMs = (object.serverTsMs !== undefined && object.serverTsMs !== null)
1004
+ ? BigInt(object.serverTsMs)
1005
+ : 0n;
864
1006
  return message;
865
1007
  },
866
1008
  };
@@ -879,32 +1021,42 @@ export const FilteredTransaction = {
879
1021
  },
880
1022
  decode(input, length) {
881
1023
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
882
- const end = length === undefined ? reader.len : reader.pos + length;
883
- const message = createBaseFilteredTransaction();
884
- while (reader.pos < end) {
885
- const tag = reader.uint32();
886
- switch (tag >>> 3) {
887
- case 1: {
888
- if (tag !== 10) {
889
- break;
890
- }
891
- message.filterIds.push(reader.string());
892
- continue;
893
- }
894
- case 2: {
895
- if (tag !== 18) {
896
- break;
897
- }
898
- message.transaction = TransactionMessage.decode(reader, reader.uint32());
899
- continue;
900
- }
901
- }
902
- if ((tag & 7) === 4 || tag === 0) {
903
- break;
1024
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1025
+ if (previousRecursionDepth >= 100) {
1026
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1027
+ }
1028
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1029
+ try {
1030
+ const end = length === undefined ? reader.len : reader.pos + length;
1031
+ const message = createBaseFilteredTransaction();
1032
+ while (reader.pos < end) {
1033
+ const tag = reader.uint32();
1034
+ switch (tag >>> 3) {
1035
+ case 1: {
1036
+ if (tag !== 10) {
1037
+ break;
1038
+ }
1039
+ message.filterIds.push(reader.string());
1040
+ continue;
1041
+ }
1042
+ case 2: {
1043
+ if (tag !== 18) {
1044
+ break;
1045
+ }
1046
+ message.transaction = TransactionMessage.decode(reader, reader.uint32());
1047
+ continue;
1048
+ }
1049
+ }
1050
+ if ((tag & 7) === 4 || tag === 0) {
1051
+ break;
1052
+ }
1053
+ reader.skip(tag & 7);
904
1054
  }
905
- reader.skip(tag & 7);
1055
+ return message;
1056
+ }
1057
+ finally {
1058
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
906
1059
  }
907
- return message;
908
1060
  },
909
1061
  fromJSON(object) {
910
1062
  return {
@@ -963,7 +1115,7 @@ function createBaseTransactionMessage() {
963
1115
  loadedReadonlyAddresses: [],
964
1116
  altResolutionIncomplete: false,
965
1117
  config: undefined,
966
- priorityFeeLamports: undefined,
1118
+ priorityFeeLamports: 0n,
967
1119
  };
968
1120
  }
969
1121
  export const TransactionMessage = {
@@ -1043,7 +1195,7 @@ export const TransactionMessage = {
1043
1195
  if (message.config !== undefined) {
1044
1196
  TransactionConfig.encode(message.config, writer.uint32(186).fork()).join();
1045
1197
  }
1046
- if (message.priorityFeeLamports !== undefined) {
1198
+ if (message.priorityFeeLamports !== 0n) {
1047
1199
  if (BigInt.asUintN(64, message.priorityFeeLamports) !== message.priorityFeeLamports) {
1048
1200
  throw new globalThis.Error("value provided for field message.priorityFeeLamports of type uint64 too large");
1049
1201
  }
@@ -1053,186 +1205,196 @@ export const TransactionMessage = {
1053
1205
  },
1054
1206
  decode(input, length) {
1055
1207
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1056
- const end = length === undefined ? reader.len : reader.pos + length;
1057
- const message = createBaseTransactionMessage();
1058
- while (reader.pos < end) {
1059
- const tag = reader.uint32();
1060
- switch (tag >>> 3) {
1061
- case 1: {
1062
- if (tag !== 8) {
1063
- break;
1064
- }
1065
- message.slot = reader.uint64();
1066
- continue;
1067
- }
1068
- case 2: {
1069
- if (tag !== 18) {
1070
- break;
1071
- }
1072
- message.signature = reader.bytes();
1073
- continue;
1074
- }
1075
- case 3: {
1076
- if (tag !== 24) {
1077
- break;
1078
- }
1079
- message.txIndex = reader.uint32();
1080
- continue;
1081
- }
1082
- case 4: {
1083
- if (tag !== 34) {
1084
- break;
1085
- }
1086
- message.signatures.push(reader.bytes());
1087
- continue;
1088
- }
1089
- case 5: {
1090
- if (tag !== 40) {
1091
- break;
1092
- }
1093
- message.isVote = reader.bool();
1094
- continue;
1095
- }
1096
- case 6: {
1097
- if (tag !== 48) {
1098
- break;
1099
- }
1100
- message.numRequiredSignatures = reader.uint32();
1101
- continue;
1102
- }
1103
- case 7: {
1104
- if (tag !== 56) {
1105
- break;
1106
- }
1107
- message.numReadonlySignedAccounts = reader.uint32();
1108
- continue;
1109
- }
1110
- case 8: {
1111
- if (tag !== 64) {
1112
- break;
1113
- }
1114
- message.numReadonlyUnsignedAccounts = reader.uint32();
1115
- continue;
1116
- }
1117
- case 9: {
1118
- if (tag !== 74) {
1119
- break;
1120
- }
1121
- message.recentBlockhash = reader.bytes();
1122
- continue;
1123
- }
1124
- case 10: {
1125
- if (tag !== 80) {
1126
- break;
1127
- }
1128
- message.versioned = reader.bool();
1129
- continue;
1130
- }
1131
- case 11: {
1132
- if (tag !== 90) {
1133
- break;
1134
- }
1135
- message.accountKeys.push(reader.bytes());
1136
- continue;
1137
- }
1138
- case 12: {
1139
- if (tag !== 98) {
1140
- break;
1141
- }
1142
- message.instructions.push(CompiledInstruction.decode(reader, reader.uint32()));
1143
- continue;
1144
- }
1145
- case 13: {
1146
- if (tag !== 106) {
1147
- break;
1148
- }
1149
- message.addressTableLookups.push(MessageAddressTableLookup.decode(reader, reader.uint32()));
1150
- continue;
1151
- }
1152
- case 14: {
1153
- if (tag !== 114) {
1154
- break;
1155
- }
1156
- message.feePayer = reader.bytes();
1157
- continue;
1158
- }
1159
- case 15: {
1160
- if (tag !== 122) {
1161
- break;
1162
- }
1163
- message.writableAccounts.push(reader.bytes());
1164
- continue;
1165
- }
1166
- case 16: {
1167
- if (tag !== 130) {
1168
- break;
1169
- }
1170
- message.programIds.push(reader.bytes());
1171
- continue;
1172
- }
1173
- case 17: {
1174
- if (tag !== 136) {
1175
- break;
1176
- }
1177
- message.computeUnitPrice = reader.uint64();
1178
- continue;
1179
- }
1180
- case 18: {
1181
- if (tag !== 144) {
1182
- break;
1183
- }
1184
- message.computeLimit = reader.uint32();
1185
- continue;
1186
- }
1187
- case 19: {
1188
- if (tag !== 152) {
1189
- break;
1190
- }
1191
- message.txSize = reader.uint32();
1192
- continue;
1193
- }
1194
- case 20: {
1195
- if (tag !== 162) {
1196
- break;
1197
- }
1198
- message.loadedWritableAddresses.push(reader.bytes());
1199
- continue;
1200
- }
1201
- case 21: {
1202
- if (tag !== 170) {
1203
- break;
1204
- }
1205
- message.loadedReadonlyAddresses.push(reader.bytes());
1206
- continue;
1207
- }
1208
- case 22: {
1209
- if (tag !== 176) {
1210
- break;
1211
- }
1212
- message.altResolutionIncomplete = reader.bool();
1213
- continue;
1214
- }
1215
- case 23: {
1216
- if (tag !== 186) {
1217
- break;
1218
- }
1219
- message.config = TransactionConfig.decode(reader, reader.uint32());
1220
- continue;
1221
- }
1222
- case 24: {
1223
- if (tag !== 192) {
1224
- break;
1225
- }
1226
- message.priorityFeeLamports = reader.uint64();
1227
- continue;
1228
- }
1208
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1209
+ if (previousRecursionDepth >= 100) {
1210
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1211
+ }
1212
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1213
+ try {
1214
+ const end = length === undefined ? reader.len : reader.pos + length;
1215
+ const message = createBaseTransactionMessage();
1216
+ while (reader.pos < end) {
1217
+ const tag = reader.uint32();
1218
+ switch (tag >>> 3) {
1219
+ case 1: {
1220
+ if (tag !== 8) {
1221
+ break;
1222
+ }
1223
+ message.slot = reader.uint64();
1224
+ continue;
1225
+ }
1226
+ case 2: {
1227
+ if (tag !== 18) {
1228
+ break;
1229
+ }
1230
+ message.signature = reader.bytes();
1231
+ continue;
1232
+ }
1233
+ case 3: {
1234
+ if (tag !== 24) {
1235
+ break;
1236
+ }
1237
+ message.txIndex = reader.uint32();
1238
+ continue;
1239
+ }
1240
+ case 4: {
1241
+ if (tag !== 34) {
1242
+ break;
1243
+ }
1244
+ message.signatures.push(reader.bytes());
1245
+ continue;
1246
+ }
1247
+ case 5: {
1248
+ if (tag !== 40) {
1249
+ break;
1250
+ }
1251
+ message.isVote = reader.bool();
1252
+ continue;
1253
+ }
1254
+ case 6: {
1255
+ if (tag !== 48) {
1256
+ break;
1257
+ }
1258
+ message.numRequiredSignatures = reader.uint32();
1259
+ continue;
1260
+ }
1261
+ case 7: {
1262
+ if (tag !== 56) {
1263
+ break;
1264
+ }
1265
+ message.numReadonlySignedAccounts = reader.uint32();
1266
+ continue;
1267
+ }
1268
+ case 8: {
1269
+ if (tag !== 64) {
1270
+ break;
1271
+ }
1272
+ message.numReadonlyUnsignedAccounts = reader.uint32();
1273
+ continue;
1274
+ }
1275
+ case 9: {
1276
+ if (tag !== 74) {
1277
+ break;
1278
+ }
1279
+ message.recentBlockhash = reader.bytes();
1280
+ continue;
1281
+ }
1282
+ case 10: {
1283
+ if (tag !== 80) {
1284
+ break;
1285
+ }
1286
+ message.versioned = reader.bool();
1287
+ continue;
1288
+ }
1289
+ case 11: {
1290
+ if (tag !== 90) {
1291
+ break;
1292
+ }
1293
+ message.accountKeys.push(reader.bytes());
1294
+ continue;
1295
+ }
1296
+ case 12: {
1297
+ if (tag !== 98) {
1298
+ break;
1299
+ }
1300
+ message.instructions.push(CompiledInstruction.decode(reader, reader.uint32()));
1301
+ continue;
1302
+ }
1303
+ case 13: {
1304
+ if (tag !== 106) {
1305
+ break;
1306
+ }
1307
+ message.addressTableLookups.push(MessageAddressTableLookup.decode(reader, reader.uint32()));
1308
+ continue;
1309
+ }
1310
+ case 14: {
1311
+ if (tag !== 114) {
1312
+ break;
1313
+ }
1314
+ message.feePayer = reader.bytes();
1315
+ continue;
1316
+ }
1317
+ case 15: {
1318
+ if (tag !== 122) {
1319
+ break;
1320
+ }
1321
+ message.writableAccounts.push(reader.bytes());
1322
+ continue;
1323
+ }
1324
+ case 16: {
1325
+ if (tag !== 130) {
1326
+ break;
1327
+ }
1328
+ message.programIds.push(reader.bytes());
1329
+ continue;
1330
+ }
1331
+ case 17: {
1332
+ if (tag !== 136) {
1333
+ break;
1334
+ }
1335
+ message.computeUnitPrice = reader.uint64();
1336
+ continue;
1337
+ }
1338
+ case 18: {
1339
+ if (tag !== 144) {
1340
+ break;
1341
+ }
1342
+ message.computeLimit = reader.uint32();
1343
+ continue;
1344
+ }
1345
+ case 19: {
1346
+ if (tag !== 152) {
1347
+ break;
1348
+ }
1349
+ message.txSize = reader.uint32();
1350
+ continue;
1351
+ }
1352
+ case 20: {
1353
+ if (tag !== 162) {
1354
+ break;
1355
+ }
1356
+ message.loadedWritableAddresses.push(reader.bytes());
1357
+ continue;
1358
+ }
1359
+ case 21: {
1360
+ if (tag !== 170) {
1361
+ break;
1362
+ }
1363
+ message.loadedReadonlyAddresses.push(reader.bytes());
1364
+ continue;
1365
+ }
1366
+ case 22: {
1367
+ if (tag !== 176) {
1368
+ break;
1369
+ }
1370
+ message.altResolutionIncomplete = reader.bool();
1371
+ continue;
1372
+ }
1373
+ case 23: {
1374
+ if (tag !== 186) {
1375
+ break;
1376
+ }
1377
+ message.config = TransactionConfig.decode(reader, reader.uint32());
1378
+ continue;
1379
+ }
1380
+ case 24: {
1381
+ if (tag !== 192) {
1382
+ break;
1383
+ }
1384
+ message.priorityFeeLamports = reader.uint64();
1385
+ continue;
1386
+ }
1387
+ }
1388
+ if ((tag & 7) === 4 || tag === 0) {
1389
+ break;
1390
+ }
1391
+ reader.skip(tag & 7);
1229
1392
  }
1230
- if ((tag & 7) === 4 || tag === 0) {
1231
- break;
1232
- }
1233
- reader.skip(tag & 7);
1393
+ return message;
1394
+ }
1395
+ finally {
1396
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1234
1397
  }
1235
- return message;
1236
1398
  },
1237
1399
  fromJSON(object) {
1238
1400
  return {
@@ -1335,7 +1497,7 @@ export const TransactionMessage = {
1335
1497
  ? BigInt(object.priorityFeeLamports)
1336
1498
  : isSet(object.priority_fee_lamports)
1337
1499
  ? BigInt(object.priority_fee_lamports)
1338
- : undefined,
1500
+ : 0n,
1339
1501
  };
1340
1502
  },
1341
1503
  toJSON(message) {
@@ -1409,7 +1571,7 @@ export const TransactionMessage = {
1409
1571
  if (message.config !== undefined) {
1410
1572
  obj.config = TransactionConfig.toJSON(message.config);
1411
1573
  }
1412
- if (message.priorityFeeLamports !== undefined) {
1574
+ if (message.priorityFeeLamports !== 0n) {
1413
1575
  obj.priorityFeeLamports = message.priorityFeeLamports.toString();
1414
1576
  }
1415
1577
  return obj;
@@ -1419,7 +1581,7 @@ export const TransactionMessage = {
1419
1581
  },
1420
1582
  fromPartial(object) {
1421
1583
  const message = createBaseTransactionMessage();
1422
- message.slot = object.slot ?? 0n;
1584
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
1423
1585
  message.signature = object.signature ?? new Uint8Array(0);
1424
1586
  message.txIndex = object.txIndex ?? 0;
1425
1587
  message.signatures = object.signatures?.map((e) => e) || [];
@@ -1436,7 +1598,9 @@ export const TransactionMessage = {
1436
1598
  message.feePayer = object.feePayer ?? new Uint8Array(0);
1437
1599
  message.writableAccounts = object.writableAccounts?.map((e) => e) || [];
1438
1600
  message.programIds = object.programIds?.map((e) => e) || [];
1439
- message.computeUnitPrice = object.computeUnitPrice ?? 0n;
1601
+ message.computeUnitPrice = (object.computeUnitPrice !== undefined && object.computeUnitPrice !== null)
1602
+ ? BigInt(object.computeUnitPrice)
1603
+ : 0n;
1440
1604
  message.computeLimit = object.computeLimit ?? 0;
1441
1605
  message.txSize = object.txSize ?? 0;
1442
1606
  message.loadedWritableAddresses = object.loadedWritableAddresses?.map((e) => e) || [];
@@ -1445,79 +1609,96 @@ export const TransactionMessage = {
1445
1609
  message.config = (object.config !== undefined && object.config !== null)
1446
1610
  ? TransactionConfig.fromPartial(object.config)
1447
1611
  : undefined;
1448
- message.priorityFeeLamports = object.priorityFeeLamports ?? undefined;
1612
+ message.priorityFeeLamports = (object.priorityFeeLamports !== undefined && object.priorityFeeLamports !== null)
1613
+ ? BigInt(object.priorityFeeLamports)
1614
+ : 0n;
1449
1615
  return message;
1450
1616
  },
1451
1617
  };
1452
1618
  function createBaseTransactionConfig() {
1453
- return {
1454
- priorityFee: undefined,
1455
- computeUnitLimit: undefined,
1456
- loadedAccountsDataSizeLimit: undefined,
1457
- heapSize: undefined,
1458
- };
1619
+ return { priorityFee: 0n, computeUnitLimit: 0, loadedAccountsDataSizeLimit: 0, heapSize: 0, configMask: 0 };
1459
1620
  }
1460
1621
  export const TransactionConfig = {
1461
1622
  encode(message, writer = new BinaryWriter()) {
1462
- if (message.priorityFee !== undefined) {
1623
+ if (message.priorityFee !== 0n) {
1463
1624
  if (BigInt.asUintN(64, message.priorityFee) !== message.priorityFee) {
1464
1625
  throw new globalThis.Error("value provided for field message.priorityFee of type uint64 too large");
1465
1626
  }
1466
1627
  writer.uint32(8).uint64(message.priorityFee);
1467
1628
  }
1468
- if (message.computeUnitLimit !== undefined) {
1629
+ if (message.computeUnitLimit !== 0) {
1469
1630
  writer.uint32(16).uint32(message.computeUnitLimit);
1470
1631
  }
1471
- if (message.loadedAccountsDataSizeLimit !== undefined) {
1632
+ if (message.loadedAccountsDataSizeLimit !== 0) {
1472
1633
  writer.uint32(24).uint32(message.loadedAccountsDataSizeLimit);
1473
1634
  }
1474
- if (message.heapSize !== undefined) {
1635
+ if (message.heapSize !== 0) {
1475
1636
  writer.uint32(32).uint32(message.heapSize);
1476
1637
  }
1638
+ if (message.configMask !== 0) {
1639
+ writer.uint32(40).uint32(message.configMask);
1640
+ }
1477
1641
  return writer;
1478
1642
  },
1479
1643
  decode(input, length) {
1480
1644
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1481
- const end = length === undefined ? reader.len : reader.pos + length;
1482
- const message = createBaseTransactionConfig();
1483
- while (reader.pos < end) {
1484
- const tag = reader.uint32();
1485
- switch (tag >>> 3) {
1486
- case 1: {
1487
- if (tag !== 8) {
1488
- break;
1489
- }
1490
- message.priorityFee = reader.uint64();
1491
- continue;
1492
- }
1493
- case 2: {
1494
- if (tag !== 16) {
1495
- break;
1496
- }
1497
- message.computeUnitLimit = reader.uint32();
1498
- continue;
1499
- }
1500
- case 3: {
1501
- if (tag !== 24) {
1502
- break;
1503
- }
1504
- message.loadedAccountsDataSizeLimit = reader.uint32();
1505
- continue;
1506
- }
1507
- case 4: {
1508
- if (tag !== 32) {
1509
- break;
1510
- }
1511
- message.heapSize = reader.uint32();
1512
- continue;
1513
- }
1514
- }
1515
- if ((tag & 7) === 4 || tag === 0) {
1516
- break;
1645
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1646
+ if (previousRecursionDepth >= 100) {
1647
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1648
+ }
1649
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1650
+ try {
1651
+ const end = length === undefined ? reader.len : reader.pos + length;
1652
+ const message = createBaseTransactionConfig();
1653
+ while (reader.pos < end) {
1654
+ const tag = reader.uint32();
1655
+ switch (tag >>> 3) {
1656
+ case 1: {
1657
+ if (tag !== 8) {
1658
+ break;
1659
+ }
1660
+ message.priorityFee = reader.uint64();
1661
+ continue;
1662
+ }
1663
+ case 2: {
1664
+ if (tag !== 16) {
1665
+ break;
1666
+ }
1667
+ message.computeUnitLimit = reader.uint32();
1668
+ continue;
1669
+ }
1670
+ case 3: {
1671
+ if (tag !== 24) {
1672
+ break;
1673
+ }
1674
+ message.loadedAccountsDataSizeLimit = reader.uint32();
1675
+ continue;
1676
+ }
1677
+ case 4: {
1678
+ if (tag !== 32) {
1679
+ break;
1680
+ }
1681
+ message.heapSize = reader.uint32();
1682
+ continue;
1683
+ }
1684
+ case 5: {
1685
+ if (tag !== 40) {
1686
+ break;
1687
+ }
1688
+ message.configMask = reader.uint32();
1689
+ continue;
1690
+ }
1691
+ }
1692
+ if ((tag & 7) === 4 || tag === 0) {
1693
+ break;
1694
+ }
1695
+ reader.skip(tag & 7);
1517
1696
  }
1518
- reader.skip(tag & 7);
1697
+ return message;
1698
+ }
1699
+ finally {
1700
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1519
1701
  }
1520
- return message;
1521
1702
  },
1522
1703
  fromJSON(object) {
1523
1704
  return {
@@ -1525,38 +1706,46 @@ export const TransactionConfig = {
1525
1706
  ? BigInt(object.priorityFee)
1526
1707
  : isSet(object.priority_fee)
1527
1708
  ? BigInt(object.priority_fee)
1528
- : undefined,
1709
+ : 0n,
1529
1710
  computeUnitLimit: isSet(object.computeUnitLimit)
1530
1711
  ? globalThis.Number(object.computeUnitLimit)
1531
1712
  : isSet(object.compute_unit_limit)
1532
1713
  ? globalThis.Number(object.compute_unit_limit)
1533
- : undefined,
1714
+ : 0,
1534
1715
  loadedAccountsDataSizeLimit: isSet(object.loadedAccountsDataSizeLimit)
1535
1716
  ? globalThis.Number(object.loadedAccountsDataSizeLimit)
1536
1717
  : isSet(object.loaded_accounts_data_size_limit)
1537
1718
  ? globalThis.Number(object.loaded_accounts_data_size_limit)
1538
- : undefined,
1719
+ : 0,
1539
1720
  heapSize: isSet(object.heapSize)
1540
1721
  ? globalThis.Number(object.heapSize)
1541
1722
  : isSet(object.heap_size)
1542
1723
  ? globalThis.Number(object.heap_size)
1543
- : undefined,
1724
+ : 0,
1725
+ configMask: isSet(object.configMask)
1726
+ ? globalThis.Number(object.configMask)
1727
+ : isSet(object.config_mask)
1728
+ ? globalThis.Number(object.config_mask)
1729
+ : 0,
1544
1730
  };
1545
1731
  },
1546
1732
  toJSON(message) {
1547
1733
  const obj = {};
1548
- if (message.priorityFee !== undefined) {
1734
+ if (message.priorityFee !== 0n) {
1549
1735
  obj.priorityFee = message.priorityFee.toString();
1550
1736
  }
1551
- if (message.computeUnitLimit !== undefined) {
1737
+ if (message.computeUnitLimit !== 0) {
1552
1738
  obj.computeUnitLimit = Math.round(message.computeUnitLimit);
1553
1739
  }
1554
- if (message.loadedAccountsDataSizeLimit !== undefined) {
1740
+ if (message.loadedAccountsDataSizeLimit !== 0) {
1555
1741
  obj.loadedAccountsDataSizeLimit = Math.round(message.loadedAccountsDataSizeLimit);
1556
1742
  }
1557
- if (message.heapSize !== undefined) {
1743
+ if (message.heapSize !== 0) {
1558
1744
  obj.heapSize = Math.round(message.heapSize);
1559
1745
  }
1746
+ if (message.configMask !== 0) {
1747
+ obj.configMask = Math.round(message.configMask);
1748
+ }
1560
1749
  return obj;
1561
1750
  },
1562
1751
  create(base) {
@@ -1564,10 +1753,13 @@ export const TransactionConfig = {
1564
1753
  },
1565
1754
  fromPartial(object) {
1566
1755
  const message = createBaseTransactionConfig();
1567
- message.priorityFee = object.priorityFee ?? undefined;
1568
- message.computeUnitLimit = object.computeUnitLimit ?? undefined;
1569
- message.loadedAccountsDataSizeLimit = object.loadedAccountsDataSizeLimit ?? undefined;
1570
- message.heapSize = object.heapSize ?? undefined;
1756
+ message.priorityFee = (object.priorityFee !== undefined && object.priorityFee !== null)
1757
+ ? BigInt(object.priorityFee)
1758
+ : 0n;
1759
+ message.computeUnitLimit = object.computeUnitLimit ?? 0;
1760
+ message.loadedAccountsDataSizeLimit = object.loadedAccountsDataSizeLimit ?? 0;
1761
+ message.heapSize = object.heapSize ?? 0;
1762
+ message.configMask = object.configMask ?? 0;
1571
1763
  return message;
1572
1764
  },
1573
1765
  };
@@ -1589,39 +1781,49 @@ export const CompiledInstruction = {
1589
1781
  },
1590
1782
  decode(input, length) {
1591
1783
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1592
- const end = length === undefined ? reader.len : reader.pos + length;
1593
- const message = createBaseCompiledInstruction();
1594
- while (reader.pos < end) {
1595
- const tag = reader.uint32();
1596
- switch (tag >>> 3) {
1597
- case 1: {
1598
- if (tag !== 8) {
1599
- break;
1600
- }
1601
- message.programIdIndex = reader.uint32();
1602
- continue;
1603
- }
1604
- case 2: {
1605
- if (tag !== 18) {
1606
- break;
1607
- }
1608
- message.accounts = reader.bytes();
1609
- continue;
1610
- }
1611
- case 3: {
1612
- if (tag !== 26) {
1613
- break;
1614
- }
1615
- message.data = reader.bytes();
1616
- continue;
1617
- }
1618
- }
1619
- if ((tag & 7) === 4 || tag === 0) {
1620
- break;
1784
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1785
+ if (previousRecursionDepth >= 100) {
1786
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1787
+ }
1788
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1789
+ try {
1790
+ const end = length === undefined ? reader.len : reader.pos + length;
1791
+ const message = createBaseCompiledInstruction();
1792
+ while (reader.pos < end) {
1793
+ const tag = reader.uint32();
1794
+ switch (tag >>> 3) {
1795
+ case 1: {
1796
+ if (tag !== 8) {
1797
+ break;
1798
+ }
1799
+ message.programIdIndex = reader.uint32();
1800
+ continue;
1801
+ }
1802
+ case 2: {
1803
+ if (tag !== 18) {
1804
+ break;
1805
+ }
1806
+ message.accounts = reader.bytes();
1807
+ continue;
1808
+ }
1809
+ case 3: {
1810
+ if (tag !== 26) {
1811
+ break;
1812
+ }
1813
+ message.data = reader.bytes();
1814
+ continue;
1815
+ }
1816
+ }
1817
+ if ((tag & 7) === 4 || tag === 0) {
1818
+ break;
1819
+ }
1820
+ reader.skip(tag & 7);
1621
1821
  }
1622
- reader.skip(tag & 7);
1822
+ return message;
1823
+ }
1824
+ finally {
1825
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1623
1826
  }
1624
- return message;
1625
1827
  },
1626
1828
  fromJSON(object) {
1627
1829
  return {
@@ -1676,39 +1878,49 @@ export const MessageAddressTableLookup = {
1676
1878
  },
1677
1879
  decode(input, length) {
1678
1880
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1679
- const end = length === undefined ? reader.len : reader.pos + length;
1680
- const message = createBaseMessageAddressTableLookup();
1681
- while (reader.pos < end) {
1682
- const tag = reader.uint32();
1683
- switch (tag >>> 3) {
1684
- case 1: {
1685
- if (tag !== 10) {
1686
- break;
1687
- }
1688
- message.accountKey = reader.bytes();
1689
- continue;
1690
- }
1691
- case 2: {
1692
- if (tag !== 18) {
1693
- break;
1694
- }
1695
- message.writableIndexes = reader.bytes();
1696
- continue;
1697
- }
1698
- case 3: {
1699
- if (tag !== 26) {
1700
- break;
1701
- }
1702
- message.readonlyIndexes = reader.bytes();
1703
- continue;
1704
- }
1881
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1882
+ if (previousRecursionDepth >= 100) {
1883
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1884
+ }
1885
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1886
+ try {
1887
+ const end = length === undefined ? reader.len : reader.pos + length;
1888
+ const message = createBaseMessageAddressTableLookup();
1889
+ while (reader.pos < end) {
1890
+ const tag = reader.uint32();
1891
+ switch (tag >>> 3) {
1892
+ case 1: {
1893
+ if (tag !== 10) {
1894
+ break;
1895
+ }
1896
+ message.accountKey = reader.bytes();
1897
+ continue;
1898
+ }
1899
+ case 2: {
1900
+ if (tag !== 18) {
1901
+ break;
1902
+ }
1903
+ message.writableIndexes = reader.bytes();
1904
+ continue;
1905
+ }
1906
+ case 3: {
1907
+ if (tag !== 26) {
1908
+ break;
1909
+ }
1910
+ message.readonlyIndexes = reader.bytes();
1911
+ continue;
1912
+ }
1913
+ }
1914
+ if ((tag & 7) === 4 || tag === 0) {
1915
+ break;
1916
+ }
1917
+ reader.skip(tag & 7);
1705
1918
  }
1706
- if ((tag & 7) === 4 || tag === 0) {
1707
- break;
1708
- }
1709
- reader.skip(tag & 7);
1919
+ return message;
1920
+ }
1921
+ finally {
1922
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1710
1923
  }
1711
- return message;
1712
1924
  },
1713
1925
  fromJSON(object) {
1714
1926
  return {
@@ -1754,44 +1966,81 @@ export const MessageAddressTableLookup = {
1754
1966
  },
1755
1967
  };
1756
1968
  function createBaseSubscribeSlotsRequest() {
1757
- return {};
1969
+ return { includeBlockFooter: false };
1758
1970
  }
1759
1971
  export const SubscribeSlotsRequest = {
1760
- encode(_, writer = new BinaryWriter()) {
1972
+ encode(message, writer = new BinaryWriter()) {
1973
+ if (message.includeBlockFooter !== false) {
1974
+ writer.uint32(8).bool(message.includeBlockFooter);
1975
+ }
1761
1976
  return writer;
1762
1977
  },
1763
1978
  decode(input, length) {
1764
1979
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1765
- const end = length === undefined ? reader.len : reader.pos + length;
1766
- const message = createBaseSubscribeSlotsRequest();
1767
- while (reader.pos < end) {
1768
- const tag = reader.uint32();
1769
- switch (tag >>> 3) {
1770
- }
1771
- if ((tag & 7) === 4 || tag === 0) {
1772
- break;
1980
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1981
+ if (previousRecursionDepth >= 100) {
1982
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1983
+ }
1984
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1985
+ try {
1986
+ const end = length === undefined ? reader.len : reader.pos + length;
1987
+ const message = createBaseSubscribeSlotsRequest();
1988
+ while (reader.pos < end) {
1989
+ const tag = reader.uint32();
1990
+ switch (tag >>> 3) {
1991
+ case 1: {
1992
+ if (tag !== 8) {
1993
+ break;
1994
+ }
1995
+ message.includeBlockFooter = reader.bool();
1996
+ continue;
1997
+ }
1998
+ }
1999
+ if ((tag & 7) === 4 || tag === 0) {
2000
+ break;
2001
+ }
2002
+ reader.skip(tag & 7);
1773
2003
  }
1774
- reader.skip(tag & 7);
2004
+ return message;
2005
+ }
2006
+ finally {
2007
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1775
2008
  }
1776
- return message;
1777
2009
  },
1778
- fromJSON(_) {
1779
- return {};
2010
+ fromJSON(object) {
2011
+ return {
2012
+ includeBlockFooter: isSet(object.includeBlockFooter)
2013
+ ? globalThis.Boolean(object.includeBlockFooter)
2014
+ : isSet(object.include_block_footer)
2015
+ ? globalThis.Boolean(object.include_block_footer)
2016
+ : false,
2017
+ };
1780
2018
  },
1781
- toJSON(_) {
2019
+ toJSON(message) {
1782
2020
  const obj = {};
2021
+ if (message.includeBlockFooter !== false) {
2022
+ obj.includeBlockFooter = message.includeBlockFooter;
2023
+ }
1783
2024
  return obj;
1784
2025
  },
1785
2026
  create(base) {
1786
2027
  return SubscribeSlotsRequest.fromPartial(base ?? {});
1787
2028
  },
1788
- fromPartial(_) {
2029
+ fromPartial(object) {
1789
2030
  const message = createBaseSubscribeSlotsRequest();
2031
+ message.includeBlockFooter = object.includeBlockFooter ?? false;
1790
2032
  return message;
1791
2033
  },
1792
2034
  };
1793
2035
  function createBaseSlotEvent() {
1794
- return { slot: 0n, status: 0, currentLeader: new Uint8Array(0), parentSlot: 0n, sequence: 0n };
2036
+ return {
2037
+ slot: 0n,
2038
+ status: 0,
2039
+ currentLeader: new Uint8Array(0),
2040
+ parentSlot: 0n,
2041
+ sequence: 0n,
2042
+ blockFooter: undefined,
2043
+ };
1795
2044
  }
1796
2045
  export const SlotEvent = {
1797
2046
  encode(message, writer = new BinaryWriter()) {
@@ -1819,57 +2068,77 @@ export const SlotEvent = {
1819
2068
  }
1820
2069
  writer.uint32(40).uint64(message.sequence);
1821
2070
  }
2071
+ if (message.blockFooter !== undefined) {
2072
+ BlockFooter.encode(message.blockFooter, writer.uint32(50).fork()).join();
2073
+ }
1822
2074
  return writer;
1823
2075
  },
1824
2076
  decode(input, length) {
1825
2077
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1826
- const end = length === undefined ? reader.len : reader.pos + length;
1827
- const message = createBaseSlotEvent();
1828
- while (reader.pos < end) {
1829
- const tag = reader.uint32();
1830
- switch (tag >>> 3) {
1831
- case 1: {
1832
- if (tag !== 8) {
1833
- break;
1834
- }
1835
- message.slot = reader.uint64();
1836
- continue;
1837
- }
1838
- case 2: {
1839
- if (tag !== 16) {
1840
- break;
1841
- }
1842
- message.status = reader.int32();
1843
- continue;
1844
- }
1845
- case 3: {
1846
- if (tag !== 26) {
1847
- break;
1848
- }
1849
- message.currentLeader = reader.bytes();
1850
- continue;
1851
- }
1852
- case 4: {
1853
- if (tag !== 32) {
1854
- break;
1855
- }
1856
- message.parentSlot = reader.uint64();
1857
- continue;
1858
- }
1859
- case 5: {
1860
- if (tag !== 40) {
1861
- break;
1862
- }
1863
- message.sequence = reader.uint64();
1864
- continue;
1865
- }
2078
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2079
+ if (previousRecursionDepth >= 100) {
2080
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2081
+ }
2082
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2083
+ try {
2084
+ const end = length === undefined ? reader.len : reader.pos + length;
2085
+ const message = createBaseSlotEvent();
2086
+ while (reader.pos < end) {
2087
+ const tag = reader.uint32();
2088
+ switch (tag >>> 3) {
2089
+ case 1: {
2090
+ if (tag !== 8) {
2091
+ break;
2092
+ }
2093
+ message.slot = reader.uint64();
2094
+ continue;
2095
+ }
2096
+ case 2: {
2097
+ if (tag !== 16) {
2098
+ break;
2099
+ }
2100
+ message.status = reader.int32();
2101
+ continue;
2102
+ }
2103
+ case 3: {
2104
+ if (tag !== 26) {
2105
+ break;
2106
+ }
2107
+ message.currentLeader = reader.bytes();
2108
+ continue;
2109
+ }
2110
+ case 4: {
2111
+ if (tag !== 32) {
2112
+ break;
2113
+ }
2114
+ message.parentSlot = reader.uint64();
2115
+ continue;
2116
+ }
2117
+ case 5: {
2118
+ if (tag !== 40) {
2119
+ break;
2120
+ }
2121
+ message.sequence = reader.uint64();
2122
+ continue;
2123
+ }
2124
+ case 6: {
2125
+ if (tag !== 50) {
2126
+ break;
2127
+ }
2128
+ message.blockFooter = BlockFooter.decode(reader, reader.uint32());
2129
+ continue;
2130
+ }
2131
+ }
2132
+ if ((tag & 7) === 4 || tag === 0) {
2133
+ break;
2134
+ }
2135
+ reader.skip(tag & 7);
1866
2136
  }
1867
- if ((tag & 7) === 4 || tag === 0) {
1868
- break;
1869
- }
1870
- reader.skip(tag & 7);
2137
+ return message;
2138
+ }
2139
+ finally {
2140
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1871
2141
  }
1872
- return message;
1873
2142
  },
1874
2143
  fromJSON(object) {
1875
2144
  return {
@@ -1886,6 +2155,11 @@ export const SlotEvent = {
1886
2155
  ? BigInt(object.parent_slot)
1887
2156
  : 0n,
1888
2157
  sequence: isSet(object.sequence) ? BigInt(object.sequence) : 0n,
2158
+ blockFooter: isSet(object.blockFooter)
2159
+ ? BlockFooter.fromJSON(object.blockFooter)
2160
+ : isSet(object.block_footer)
2161
+ ? BlockFooter.fromJSON(object.block_footer)
2162
+ : undefined,
1889
2163
  };
1890
2164
  },
1891
2165
  toJSON(message) {
@@ -1905,6 +2179,9 @@ export const SlotEvent = {
1905
2179
  if (message.sequence !== 0n) {
1906
2180
  obj.sequence = message.sequence.toString();
1907
2181
  }
2182
+ if (message.blockFooter !== undefined) {
2183
+ obj.blockFooter = BlockFooter.toJSON(message.blockFooter);
2184
+ }
1908
2185
  return obj;
1909
2186
  },
1910
2187
  create(base) {
@@ -1912,11 +2189,635 @@ export const SlotEvent = {
1912
2189
  },
1913
2190
  fromPartial(object) {
1914
2191
  const message = createBaseSlotEvent();
1915
- message.slot = object.slot ?? 0n;
2192
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
1916
2193
  message.status = object.status ?? 0;
1917
2194
  message.currentLeader = object.currentLeader ?? new Uint8Array(0);
1918
- message.parentSlot = object.parentSlot ?? 0n;
1919
- message.sequence = object.sequence ?? 0n;
2195
+ message.parentSlot = (object.parentSlot !== undefined && object.parentSlot !== null)
2196
+ ? BigInt(object.parentSlot)
2197
+ : 0n;
2198
+ message.sequence = (object.sequence !== undefined && object.sequence !== null) ? BigInt(object.sequence) : 0n;
2199
+ message.blockFooter = (object.blockFooter !== undefined && object.blockFooter !== null)
2200
+ ? BlockFooter.fromPartial(object.blockFooter)
2201
+ : undefined;
2202
+ return message;
2203
+ },
2204
+ };
2205
+ function createBaseBlockFooter() {
2206
+ return {
2207
+ slot: 0n,
2208
+ bankHash: new Uint8Array(0),
2209
+ blockProducerTimeNanos: 0n,
2210
+ blockUserAgent: new Uint8Array(0),
2211
+ blockFinalCert: undefined,
2212
+ skipRewardCert: undefined,
2213
+ notarRewardCert: undefined,
2214
+ blockId: new Uint8Array(0),
2215
+ };
2216
+ }
2217
+ export const BlockFooter = {
2218
+ encode(message, writer = new BinaryWriter()) {
2219
+ if (message.slot !== 0n) {
2220
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2221
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2222
+ }
2223
+ writer.uint32(8).uint64(message.slot);
2224
+ }
2225
+ if (message.bankHash.length !== 0) {
2226
+ writer.uint32(26).bytes(message.bankHash);
2227
+ }
2228
+ if (message.blockProducerTimeNanos !== 0n) {
2229
+ if (BigInt.asUintN(64, message.blockProducerTimeNanos) !== message.blockProducerTimeNanos) {
2230
+ throw new globalThis.Error("value provided for field message.blockProducerTimeNanos of type uint64 too large");
2231
+ }
2232
+ writer.uint32(32).uint64(message.blockProducerTimeNanos);
2233
+ }
2234
+ if (message.blockUserAgent.length !== 0) {
2235
+ writer.uint32(42).bytes(message.blockUserAgent);
2236
+ }
2237
+ if (message.blockFinalCert !== undefined) {
2238
+ BlockFooterFinalCert.encode(message.blockFinalCert, writer.uint32(74).fork()).join();
2239
+ }
2240
+ if (message.skipRewardCert !== undefined) {
2241
+ BlockFooterSkipRewardCert.encode(message.skipRewardCert, writer.uint32(82).fork()).join();
2242
+ }
2243
+ if (message.notarRewardCert !== undefined) {
2244
+ BlockFooterNotarRewardCert.encode(message.notarRewardCert, writer.uint32(90).fork()).join();
2245
+ }
2246
+ if (message.blockId.length !== 0) {
2247
+ writer.uint32(802).bytes(message.blockId);
2248
+ }
2249
+ return writer;
2250
+ },
2251
+ decode(input, length) {
2252
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2253
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2254
+ if (previousRecursionDepth >= 100) {
2255
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2256
+ }
2257
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2258
+ try {
2259
+ const end = length === undefined ? reader.len : reader.pos + length;
2260
+ const message = createBaseBlockFooter();
2261
+ while (reader.pos < end) {
2262
+ const tag = reader.uint32();
2263
+ switch (tag >>> 3) {
2264
+ case 1: {
2265
+ if (tag !== 8) {
2266
+ break;
2267
+ }
2268
+ message.slot = reader.uint64();
2269
+ continue;
2270
+ }
2271
+ case 3: {
2272
+ if (tag !== 26) {
2273
+ break;
2274
+ }
2275
+ message.bankHash = reader.bytes();
2276
+ continue;
2277
+ }
2278
+ case 4: {
2279
+ if (tag !== 32) {
2280
+ break;
2281
+ }
2282
+ message.blockProducerTimeNanos = reader.uint64();
2283
+ continue;
2284
+ }
2285
+ case 5: {
2286
+ if (tag !== 42) {
2287
+ break;
2288
+ }
2289
+ message.blockUserAgent = reader.bytes();
2290
+ continue;
2291
+ }
2292
+ case 9: {
2293
+ if (tag !== 74) {
2294
+ break;
2295
+ }
2296
+ message.blockFinalCert = BlockFooterFinalCert.decode(reader, reader.uint32());
2297
+ continue;
2298
+ }
2299
+ case 10: {
2300
+ if (tag !== 82) {
2301
+ break;
2302
+ }
2303
+ message.skipRewardCert = BlockFooterSkipRewardCert.decode(reader, reader.uint32());
2304
+ continue;
2305
+ }
2306
+ case 11: {
2307
+ if (tag !== 90) {
2308
+ break;
2309
+ }
2310
+ message.notarRewardCert = BlockFooterNotarRewardCert.decode(reader, reader.uint32());
2311
+ continue;
2312
+ }
2313
+ case 100: {
2314
+ if (tag !== 802) {
2315
+ break;
2316
+ }
2317
+ message.blockId = reader.bytes();
2318
+ continue;
2319
+ }
2320
+ }
2321
+ if ((tag & 7) === 4 || tag === 0) {
2322
+ break;
2323
+ }
2324
+ reader.skip(tag & 7);
2325
+ }
2326
+ return message;
2327
+ }
2328
+ finally {
2329
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2330
+ }
2331
+ },
2332
+ fromJSON(object) {
2333
+ return {
2334
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2335
+ bankHash: isSet(object.bankHash)
2336
+ ? bytesFromBase64(object.bankHash)
2337
+ : isSet(object.bank_hash)
2338
+ ? bytesFromBase64(object.bank_hash)
2339
+ : new Uint8Array(0),
2340
+ blockProducerTimeNanos: isSet(object.blockProducerTimeNanos)
2341
+ ? BigInt(object.blockProducerTimeNanos)
2342
+ : isSet(object.block_producer_time_nanos)
2343
+ ? BigInt(object.block_producer_time_nanos)
2344
+ : 0n,
2345
+ blockUserAgent: isSet(object.blockUserAgent)
2346
+ ? bytesFromBase64(object.blockUserAgent)
2347
+ : isSet(object.block_user_agent)
2348
+ ? bytesFromBase64(object.block_user_agent)
2349
+ : new Uint8Array(0),
2350
+ blockFinalCert: isSet(object.blockFinalCert)
2351
+ ? BlockFooterFinalCert.fromJSON(object.blockFinalCert)
2352
+ : isSet(object.block_final_cert)
2353
+ ? BlockFooterFinalCert.fromJSON(object.block_final_cert)
2354
+ : undefined,
2355
+ skipRewardCert: isSet(object.skipRewardCert)
2356
+ ? BlockFooterSkipRewardCert.fromJSON(object.skipRewardCert)
2357
+ : isSet(object.skip_reward_cert)
2358
+ ? BlockFooterSkipRewardCert.fromJSON(object.skip_reward_cert)
2359
+ : undefined,
2360
+ notarRewardCert: isSet(object.notarRewardCert)
2361
+ ? BlockFooterNotarRewardCert.fromJSON(object.notarRewardCert)
2362
+ : isSet(object.notar_reward_cert)
2363
+ ? BlockFooterNotarRewardCert.fromJSON(object.notar_reward_cert)
2364
+ : undefined,
2365
+ blockId: isSet(object.blockId)
2366
+ ? bytesFromBase64(object.blockId)
2367
+ : isSet(object.block_id)
2368
+ ? bytesFromBase64(object.block_id)
2369
+ : new Uint8Array(0),
2370
+ };
2371
+ },
2372
+ toJSON(message) {
2373
+ const obj = {};
2374
+ if (message.slot !== 0n) {
2375
+ obj.slot = message.slot.toString();
2376
+ }
2377
+ if (message.bankHash.length !== 0) {
2378
+ obj.bankHash = base64FromBytes(message.bankHash);
2379
+ }
2380
+ if (message.blockProducerTimeNanos !== 0n) {
2381
+ obj.blockProducerTimeNanos = message.blockProducerTimeNanos.toString();
2382
+ }
2383
+ if (message.blockUserAgent.length !== 0) {
2384
+ obj.blockUserAgent = base64FromBytes(message.blockUserAgent);
2385
+ }
2386
+ if (message.blockFinalCert !== undefined) {
2387
+ obj.blockFinalCert = BlockFooterFinalCert.toJSON(message.blockFinalCert);
2388
+ }
2389
+ if (message.skipRewardCert !== undefined) {
2390
+ obj.skipRewardCert = BlockFooterSkipRewardCert.toJSON(message.skipRewardCert);
2391
+ }
2392
+ if (message.notarRewardCert !== undefined) {
2393
+ obj.notarRewardCert = BlockFooterNotarRewardCert.toJSON(message.notarRewardCert);
2394
+ }
2395
+ if (message.blockId.length !== 0) {
2396
+ obj.blockId = base64FromBytes(message.blockId);
2397
+ }
2398
+ return obj;
2399
+ },
2400
+ create(base) {
2401
+ return BlockFooter.fromPartial(base ?? {});
2402
+ },
2403
+ fromPartial(object) {
2404
+ const message = createBaseBlockFooter();
2405
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
2406
+ message.bankHash = object.bankHash ?? new Uint8Array(0);
2407
+ message.blockProducerTimeNanos =
2408
+ (object.blockProducerTimeNanos !== undefined && object.blockProducerTimeNanos !== null)
2409
+ ? BigInt(object.blockProducerTimeNanos)
2410
+ : 0n;
2411
+ message.blockUserAgent = object.blockUserAgent ?? new Uint8Array(0);
2412
+ message.blockFinalCert = (object.blockFinalCert !== undefined && object.blockFinalCert !== null)
2413
+ ? BlockFooterFinalCert.fromPartial(object.blockFinalCert)
2414
+ : undefined;
2415
+ message.skipRewardCert = (object.skipRewardCert !== undefined && object.skipRewardCert !== null)
2416
+ ? BlockFooterSkipRewardCert.fromPartial(object.skipRewardCert)
2417
+ : undefined;
2418
+ message.notarRewardCert = (object.notarRewardCert !== undefined && object.notarRewardCert !== null)
2419
+ ? BlockFooterNotarRewardCert.fromPartial(object.notarRewardCert)
2420
+ : undefined;
2421
+ message.blockId = object.blockId ?? new Uint8Array(0);
2422
+ return message;
2423
+ },
2424
+ };
2425
+ function createBaseBlockFooterVotesAggregate() {
2426
+ return {
2427
+ signatureKind: 0,
2428
+ signature: new Uint8Array(0),
2429
+ blockId: new Uint8Array(0),
2430
+ signerBitmap: new Uint8Array(0),
2431
+ };
2432
+ }
2433
+ export const BlockFooterVotesAggregate = {
2434
+ encode(message, writer = new BinaryWriter()) {
2435
+ if (message.signatureKind !== 0) {
2436
+ writer.uint32(8).int32(message.signatureKind);
2437
+ }
2438
+ if (message.signature.length !== 0) {
2439
+ writer.uint32(18).bytes(message.signature);
2440
+ }
2441
+ if (message.blockId.length !== 0) {
2442
+ writer.uint32(26).bytes(message.blockId);
2443
+ }
2444
+ if (message.signerBitmap.length !== 0) {
2445
+ writer.uint32(34).bytes(message.signerBitmap);
2446
+ }
2447
+ return writer;
2448
+ },
2449
+ decode(input, length) {
2450
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2451
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2452
+ if (previousRecursionDepth >= 100) {
2453
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2454
+ }
2455
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2456
+ try {
2457
+ const end = length === undefined ? reader.len : reader.pos + length;
2458
+ const message = createBaseBlockFooterVotesAggregate();
2459
+ while (reader.pos < end) {
2460
+ const tag = reader.uint32();
2461
+ switch (tag >>> 3) {
2462
+ case 1: {
2463
+ if (tag !== 8) {
2464
+ break;
2465
+ }
2466
+ message.signatureKind = reader.int32();
2467
+ continue;
2468
+ }
2469
+ case 2: {
2470
+ if (tag !== 18) {
2471
+ break;
2472
+ }
2473
+ message.signature = reader.bytes();
2474
+ continue;
2475
+ }
2476
+ case 3: {
2477
+ if (tag !== 26) {
2478
+ break;
2479
+ }
2480
+ message.blockId = reader.bytes();
2481
+ continue;
2482
+ }
2483
+ case 4: {
2484
+ if (tag !== 34) {
2485
+ break;
2486
+ }
2487
+ message.signerBitmap = reader.bytes();
2488
+ continue;
2489
+ }
2490
+ }
2491
+ if ((tag & 7) === 4 || tag === 0) {
2492
+ break;
2493
+ }
2494
+ reader.skip(tag & 7);
2495
+ }
2496
+ return message;
2497
+ }
2498
+ finally {
2499
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2500
+ }
2501
+ },
2502
+ fromJSON(object) {
2503
+ return {
2504
+ signatureKind: isSet(object.signatureKind)
2505
+ ? blockFooterSignatureKindFromJSON(object.signatureKind)
2506
+ : isSet(object.signature_kind)
2507
+ ? blockFooterSignatureKindFromJSON(object.signature_kind)
2508
+ : 0,
2509
+ signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
2510
+ blockId: isSet(object.blockId)
2511
+ ? bytesFromBase64(object.blockId)
2512
+ : isSet(object.block_id)
2513
+ ? bytesFromBase64(object.block_id)
2514
+ : new Uint8Array(0),
2515
+ signerBitmap: isSet(object.signerBitmap)
2516
+ ? bytesFromBase64(object.signerBitmap)
2517
+ : isSet(object.signer_bitmap)
2518
+ ? bytesFromBase64(object.signer_bitmap)
2519
+ : new Uint8Array(0),
2520
+ };
2521
+ },
2522
+ toJSON(message) {
2523
+ const obj = {};
2524
+ if (message.signatureKind !== 0) {
2525
+ obj.signatureKind = blockFooterSignatureKindToJSON(message.signatureKind);
2526
+ }
2527
+ if (message.signature.length !== 0) {
2528
+ obj.signature = base64FromBytes(message.signature);
2529
+ }
2530
+ if (message.blockId.length !== 0) {
2531
+ obj.blockId = base64FromBytes(message.blockId);
2532
+ }
2533
+ if (message.signerBitmap.length !== 0) {
2534
+ obj.signerBitmap = base64FromBytes(message.signerBitmap);
2535
+ }
2536
+ return obj;
2537
+ },
2538
+ create(base) {
2539
+ return BlockFooterVotesAggregate.fromPartial(base ?? {});
2540
+ },
2541
+ fromPartial(object) {
2542
+ const message = createBaseBlockFooterVotesAggregate();
2543
+ message.signatureKind = object.signatureKind ?? 0;
2544
+ message.signature = object.signature ?? new Uint8Array(0);
2545
+ message.blockId = object.blockId ?? new Uint8Array(0);
2546
+ message.signerBitmap = object.signerBitmap ?? new Uint8Array(0);
2547
+ return message;
2548
+ },
2549
+ };
2550
+ function createBaseBlockFooterFinalCert() {
2551
+ return { slot: 0n, finalAggregate: undefined, notarAggregate: undefined };
2552
+ }
2553
+ export const BlockFooterFinalCert = {
2554
+ encode(message, writer = new BinaryWriter()) {
2555
+ if (message.slot !== 0n) {
2556
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2557
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2558
+ }
2559
+ writer.uint32(8).uint64(message.slot);
2560
+ }
2561
+ if (message.finalAggregate !== undefined) {
2562
+ BlockFooterVotesAggregate.encode(message.finalAggregate, writer.uint32(18).fork()).join();
2563
+ }
2564
+ if (message.notarAggregate !== undefined) {
2565
+ BlockFooterVotesAggregate.encode(message.notarAggregate, writer.uint32(26).fork()).join();
2566
+ }
2567
+ return writer;
2568
+ },
2569
+ decode(input, length) {
2570
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2571
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2572
+ if (previousRecursionDepth >= 100) {
2573
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2574
+ }
2575
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2576
+ try {
2577
+ const end = length === undefined ? reader.len : reader.pos + length;
2578
+ const message = createBaseBlockFooterFinalCert();
2579
+ while (reader.pos < end) {
2580
+ const tag = reader.uint32();
2581
+ switch (tag >>> 3) {
2582
+ case 1: {
2583
+ if (tag !== 8) {
2584
+ break;
2585
+ }
2586
+ message.slot = reader.uint64();
2587
+ continue;
2588
+ }
2589
+ case 2: {
2590
+ if (tag !== 18) {
2591
+ break;
2592
+ }
2593
+ message.finalAggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
2594
+ continue;
2595
+ }
2596
+ case 3: {
2597
+ if (tag !== 26) {
2598
+ break;
2599
+ }
2600
+ message.notarAggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
2601
+ continue;
2602
+ }
2603
+ }
2604
+ if ((tag & 7) === 4 || tag === 0) {
2605
+ break;
2606
+ }
2607
+ reader.skip(tag & 7);
2608
+ }
2609
+ return message;
2610
+ }
2611
+ finally {
2612
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2613
+ }
2614
+ },
2615
+ fromJSON(object) {
2616
+ return {
2617
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2618
+ finalAggregate: isSet(object.finalAggregate)
2619
+ ? BlockFooterVotesAggregate.fromJSON(object.finalAggregate)
2620
+ : isSet(object.final_aggregate)
2621
+ ? BlockFooterVotesAggregate.fromJSON(object.final_aggregate)
2622
+ : undefined,
2623
+ notarAggregate: isSet(object.notarAggregate)
2624
+ ? BlockFooterVotesAggregate.fromJSON(object.notarAggregate)
2625
+ : isSet(object.notar_aggregate)
2626
+ ? BlockFooterVotesAggregate.fromJSON(object.notar_aggregate)
2627
+ : undefined,
2628
+ };
2629
+ },
2630
+ toJSON(message) {
2631
+ const obj = {};
2632
+ if (message.slot !== 0n) {
2633
+ obj.slot = message.slot.toString();
2634
+ }
2635
+ if (message.finalAggregate !== undefined) {
2636
+ obj.finalAggregate = BlockFooterVotesAggregate.toJSON(message.finalAggregate);
2637
+ }
2638
+ if (message.notarAggregate !== undefined) {
2639
+ obj.notarAggregate = BlockFooterVotesAggregate.toJSON(message.notarAggregate);
2640
+ }
2641
+ return obj;
2642
+ },
2643
+ create(base) {
2644
+ return BlockFooterFinalCert.fromPartial(base ?? {});
2645
+ },
2646
+ fromPartial(object) {
2647
+ const message = createBaseBlockFooterFinalCert();
2648
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
2649
+ message.finalAggregate = (object.finalAggregate !== undefined && object.finalAggregate !== null)
2650
+ ? BlockFooterVotesAggregate.fromPartial(object.finalAggregate)
2651
+ : undefined;
2652
+ message.notarAggregate = (object.notarAggregate !== undefined && object.notarAggregate !== null)
2653
+ ? BlockFooterVotesAggregate.fromPartial(object.notarAggregate)
2654
+ : undefined;
2655
+ return message;
2656
+ },
2657
+ };
2658
+ function createBaseBlockFooterSkipRewardCert() {
2659
+ return { slot: 0n, aggregate: undefined };
2660
+ }
2661
+ export const BlockFooterSkipRewardCert = {
2662
+ encode(message, writer = new BinaryWriter()) {
2663
+ if (message.slot !== 0n) {
2664
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2665
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2666
+ }
2667
+ writer.uint32(8).uint64(message.slot);
2668
+ }
2669
+ if (message.aggregate !== undefined) {
2670
+ BlockFooterVotesAggregate.encode(message.aggregate, writer.uint32(18).fork()).join();
2671
+ }
2672
+ return writer;
2673
+ },
2674
+ decode(input, length) {
2675
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2676
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2677
+ if (previousRecursionDepth >= 100) {
2678
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2679
+ }
2680
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2681
+ try {
2682
+ const end = length === undefined ? reader.len : reader.pos + length;
2683
+ const message = createBaseBlockFooterSkipRewardCert();
2684
+ while (reader.pos < end) {
2685
+ const tag = reader.uint32();
2686
+ switch (tag >>> 3) {
2687
+ case 1: {
2688
+ if (tag !== 8) {
2689
+ break;
2690
+ }
2691
+ message.slot = reader.uint64();
2692
+ continue;
2693
+ }
2694
+ case 2: {
2695
+ if (tag !== 18) {
2696
+ break;
2697
+ }
2698
+ message.aggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
2699
+ continue;
2700
+ }
2701
+ }
2702
+ if ((tag & 7) === 4 || tag === 0) {
2703
+ break;
2704
+ }
2705
+ reader.skip(tag & 7);
2706
+ }
2707
+ return message;
2708
+ }
2709
+ finally {
2710
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2711
+ }
2712
+ },
2713
+ fromJSON(object) {
2714
+ return {
2715
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2716
+ aggregate: isSet(object.aggregate) ? BlockFooterVotesAggregate.fromJSON(object.aggregate) : undefined,
2717
+ };
2718
+ },
2719
+ toJSON(message) {
2720
+ const obj = {};
2721
+ if (message.slot !== 0n) {
2722
+ obj.slot = message.slot.toString();
2723
+ }
2724
+ if (message.aggregate !== undefined) {
2725
+ obj.aggregate = BlockFooterVotesAggregate.toJSON(message.aggregate);
2726
+ }
2727
+ return obj;
2728
+ },
2729
+ create(base) {
2730
+ return BlockFooterSkipRewardCert.fromPartial(base ?? {});
2731
+ },
2732
+ fromPartial(object) {
2733
+ const message = createBaseBlockFooterSkipRewardCert();
2734
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
2735
+ message.aggregate = (object.aggregate !== undefined && object.aggregate !== null)
2736
+ ? BlockFooterVotesAggregate.fromPartial(object.aggregate)
2737
+ : undefined;
2738
+ return message;
2739
+ },
2740
+ };
2741
+ function createBaseBlockFooterNotarRewardCert() {
2742
+ return { slot: 0n, aggregate: undefined };
2743
+ }
2744
+ export const BlockFooterNotarRewardCert = {
2745
+ encode(message, writer = new BinaryWriter()) {
2746
+ if (message.slot !== 0n) {
2747
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2748
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2749
+ }
2750
+ writer.uint32(8).uint64(message.slot);
2751
+ }
2752
+ if (message.aggregate !== undefined) {
2753
+ BlockFooterVotesAggregate.encode(message.aggregate, writer.uint32(18).fork()).join();
2754
+ }
2755
+ return writer;
2756
+ },
2757
+ decode(input, length) {
2758
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2759
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2760
+ if (previousRecursionDepth >= 100) {
2761
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2762
+ }
2763
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2764
+ try {
2765
+ const end = length === undefined ? reader.len : reader.pos + length;
2766
+ const message = createBaseBlockFooterNotarRewardCert();
2767
+ while (reader.pos < end) {
2768
+ const tag = reader.uint32();
2769
+ switch (tag >>> 3) {
2770
+ case 1: {
2771
+ if (tag !== 8) {
2772
+ break;
2773
+ }
2774
+ message.slot = reader.uint64();
2775
+ continue;
2776
+ }
2777
+ case 2: {
2778
+ if (tag !== 18) {
2779
+ break;
2780
+ }
2781
+ message.aggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
2782
+ continue;
2783
+ }
2784
+ }
2785
+ if ((tag & 7) === 4 || tag === 0) {
2786
+ break;
2787
+ }
2788
+ reader.skip(tag & 7);
2789
+ }
2790
+ return message;
2791
+ }
2792
+ finally {
2793
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2794
+ }
2795
+ },
2796
+ fromJSON(object) {
2797
+ return {
2798
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2799
+ aggregate: isSet(object.aggregate) ? BlockFooterVotesAggregate.fromJSON(object.aggregate) : undefined,
2800
+ };
2801
+ },
2802
+ toJSON(message) {
2803
+ const obj = {};
2804
+ if (message.slot !== 0n) {
2805
+ obj.slot = message.slot.toString();
2806
+ }
2807
+ if (message.aggregate !== undefined) {
2808
+ obj.aggregate = BlockFooterVotesAggregate.toJSON(message.aggregate);
2809
+ }
2810
+ return obj;
2811
+ },
2812
+ create(base) {
2813
+ return BlockFooterNotarRewardCert.fromPartial(base ?? {});
2814
+ },
2815
+ fromPartial(object) {
2816
+ const message = createBaseBlockFooterNotarRewardCert();
2817
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
2818
+ message.aggregate = (object.aggregate !== undefined && object.aggregate !== null)
2819
+ ? BlockFooterVotesAggregate.fromPartial(object.aggregate)
2820
+ : undefined;
1920
2821
  return message;
1921
2822
  },
1922
2823
  };
@@ -1932,25 +2833,35 @@ export const PingRequest = {
1932
2833
  },
1933
2834
  decode(input, length) {
1934
2835
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1935
- const end = length === undefined ? reader.len : reader.pos + length;
1936
- const message = createBasePingRequest();
1937
- while (reader.pos < end) {
1938
- const tag = reader.uint32();
1939
- switch (tag >>> 3) {
1940
- case 1: {
1941
- if (tag !== 8) {
1942
- break;
1943
- }
1944
- message.count = reader.int32();
1945
- continue;
1946
- }
2836
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2837
+ if (previousRecursionDepth >= 100) {
2838
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2839
+ }
2840
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2841
+ try {
2842
+ const end = length === undefined ? reader.len : reader.pos + length;
2843
+ const message = createBasePingRequest();
2844
+ while (reader.pos < end) {
2845
+ const tag = reader.uint32();
2846
+ switch (tag >>> 3) {
2847
+ case 1: {
2848
+ if (tag !== 8) {
2849
+ break;
2850
+ }
2851
+ message.count = reader.int32();
2852
+ continue;
2853
+ }
2854
+ }
2855
+ if ((tag & 7) === 4 || tag === 0) {
2856
+ break;
2857
+ }
2858
+ reader.skip(tag & 7);
1947
2859
  }
1948
- if ((tag & 7) === 4 || tag === 0) {
1949
- break;
1950
- }
1951
- reader.skip(tag & 7);
2860
+ return message;
2861
+ }
2862
+ finally {
2863
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1952
2864
  }
1953
- return message;
1954
2865
  },
1955
2866
  fromJSON(object) {
1956
2867
  return { count: isSet(object.count) ? globalThis.Number(object.count) : 0 };
@@ -1983,25 +2894,35 @@ export const PongResponse = {
1983
2894
  },
1984
2895
  decode(input, length) {
1985
2896
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1986
- const end = length === undefined ? reader.len : reader.pos + length;
1987
- const message = createBasePongResponse();
1988
- while (reader.pos < end) {
1989
- const tag = reader.uint32();
1990
- switch (tag >>> 3) {
1991
- case 1: {
1992
- if (tag !== 8) {
1993
- break;
1994
- }
1995
- message.count = reader.int32();
1996
- continue;
1997
- }
2897
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2898
+ if (previousRecursionDepth >= 100) {
2899
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2900
+ }
2901
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2902
+ try {
2903
+ const end = length === undefined ? reader.len : reader.pos + length;
2904
+ const message = createBasePongResponse();
2905
+ while (reader.pos < end) {
2906
+ const tag = reader.uint32();
2907
+ switch (tag >>> 3) {
2908
+ case 1: {
2909
+ if (tag !== 8) {
2910
+ break;
2911
+ }
2912
+ message.count = reader.int32();
2913
+ continue;
2914
+ }
2915
+ }
2916
+ if ((tag & 7) === 4 || tag === 0) {
2917
+ break;
2918
+ }
2919
+ reader.skip(tag & 7);
1998
2920
  }
1999
- if ((tag & 7) === 4 || tag === 0) {
2000
- break;
2001
- }
2002
- reader.skip(tag & 7);
2921
+ return message;
2922
+ }
2923
+ finally {
2924
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2003
2925
  }
2004
- return message;
2005
2926
  },
2006
2927
  fromJSON(object) {
2007
2928
  return { count: isSet(object.count) ? globalThis.Number(object.count) : 0 };
@@ -2031,18 +2952,28 @@ export const GetVersionRequest = {
2031
2952
  },
2032
2953
  decode(input, length) {
2033
2954
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2034
- const end = length === undefined ? reader.len : reader.pos + length;
2035
- const message = createBaseGetVersionRequest();
2036
- while (reader.pos < end) {
2037
- const tag = reader.uint32();
2038
- switch (tag >>> 3) {
2039
- }
2040
- if ((tag & 7) === 4 || tag === 0) {
2041
- break;
2955
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2956
+ if (previousRecursionDepth >= 100) {
2957
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2958
+ }
2959
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2960
+ try {
2961
+ const end = length === undefined ? reader.len : reader.pos + length;
2962
+ const message = createBaseGetVersionRequest();
2963
+ while (reader.pos < end) {
2964
+ const tag = reader.uint32();
2965
+ switch (tag >>> 3) {
2966
+ }
2967
+ if ((tag & 7) === 4 || tag === 0) {
2968
+ break;
2969
+ }
2970
+ reader.skip(tag & 7);
2042
2971
  }
2043
- reader.skip(tag & 7);
2972
+ return message;
2973
+ }
2974
+ finally {
2975
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2044
2976
  }
2045
- return message;
2046
2977
  },
2047
2978
  fromJSON(_) {
2048
2979
  return {};
@@ -2071,25 +3002,35 @@ export const GetVersionResponse = {
2071
3002
  },
2072
3003
  decode(input, length) {
2073
3004
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2074
- const end = length === undefined ? reader.len : reader.pos + length;
2075
- const message = createBaseGetVersionResponse();
2076
- while (reader.pos < end) {
2077
- const tag = reader.uint32();
2078
- switch (tag >>> 3) {
2079
- case 1: {
2080
- if (tag !== 10) {
2081
- break;
2082
- }
2083
- message.version = reader.string();
2084
- continue;
2085
- }
3005
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3006
+ if (previousRecursionDepth >= 100) {
3007
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3008
+ }
3009
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3010
+ try {
3011
+ const end = length === undefined ? reader.len : reader.pos + length;
3012
+ const message = createBaseGetVersionResponse();
3013
+ while (reader.pos < end) {
3014
+ const tag = reader.uint32();
3015
+ switch (tag >>> 3) {
3016
+ case 1: {
3017
+ if (tag !== 10) {
3018
+ break;
3019
+ }
3020
+ message.version = reader.string();
3021
+ continue;
3022
+ }
3023
+ }
3024
+ if ((tag & 7) === 4 || tag === 0) {
3025
+ break;
3026
+ }
3027
+ reader.skip(tag & 7);
2086
3028
  }
2087
- if ((tag & 7) === 4 || tag === 0) {
2088
- break;
2089
- }
2090
- reader.skip(tag & 7);
3029
+ return message;
3030
+ }
3031
+ finally {
3032
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2091
3033
  }
2092
- return message;
2093
3034
  },
2094
3035
  fromJSON(object) {
2095
3036
  return { version: isSet(object.version) ? globalThis.String(object.version) : "" };