@apibara/protocol 2.0.0-beta.5 → 2.0.0-beta.6

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.
@@ -0,0 +1,1248 @@
1
+ 'use strict';
2
+
3
+ const _m0 = require('protobufjs/minimal');
4
+ const schema = require('@effect/schema');
5
+ const effect = require('effect');
6
+ const viem = require('viem');
7
+ const Long = require('long');
8
+
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
10
+
11
+ const _m0__default = /*#__PURE__*/_interopDefaultCompat(_m0);
12
+ const Long__default = /*#__PURE__*/_interopDefaultCompat(Long);
13
+
14
+ function createBaseDuration() {
15
+ return { seconds: BigInt("0"), nanos: 0 };
16
+ }
17
+ const Duration$1 = {
18
+ encode(message, writer = _m0__default.Writer.create()) {
19
+ if (message.seconds !== BigInt("0")) {
20
+ if (BigInt.asIntN(64, message.seconds) !== message.seconds) {
21
+ throw new globalThis.Error("value provided for field message.seconds of type int64 too large");
22
+ }
23
+ writer.uint32(8).int64(message.seconds.toString());
24
+ }
25
+ if (message.nanos !== 0) {
26
+ writer.uint32(16).int32(message.nanos);
27
+ }
28
+ return writer;
29
+ },
30
+ decode(input, length) {
31
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
32
+ let end = length === void 0 ? reader.len : reader.pos + length;
33
+ const message = createBaseDuration();
34
+ while (reader.pos < end) {
35
+ const tag = reader.uint32();
36
+ switch (tag >>> 3) {
37
+ case 1:
38
+ if (tag !== 8) {
39
+ break;
40
+ }
41
+ message.seconds = longToBigint$1(reader.int64());
42
+ continue;
43
+ case 2:
44
+ if (tag !== 16) {
45
+ break;
46
+ }
47
+ message.nanos = reader.int32();
48
+ continue;
49
+ }
50
+ if ((tag & 7) === 4 || tag === 0) {
51
+ break;
52
+ }
53
+ reader.skipType(tag & 7);
54
+ }
55
+ return message;
56
+ },
57
+ fromJSON(object) {
58
+ return {
59
+ seconds: isSet$2(object.seconds) ? BigInt(object.seconds) : BigInt("0"),
60
+ nanos: isSet$2(object.nanos) ? globalThis.Number(object.nanos) : 0
61
+ };
62
+ },
63
+ toJSON(message) {
64
+ const obj = {};
65
+ if (message.seconds !== BigInt("0")) {
66
+ obj.seconds = message.seconds.toString();
67
+ }
68
+ if (message.nanos !== 0) {
69
+ obj.nanos = Math.round(message.nanos);
70
+ }
71
+ return obj;
72
+ },
73
+ create(base) {
74
+ return Duration$1.fromPartial(base ?? {});
75
+ },
76
+ fromPartial(object) {
77
+ const message = createBaseDuration();
78
+ message.seconds = object.seconds ?? BigInt("0");
79
+ message.nanos = object.nanos ?? 0;
80
+ return message;
81
+ }
82
+ };
83
+ function longToBigint$1(long) {
84
+ return BigInt(long.toString());
85
+ }
86
+ if (_m0__default.util.Long !== Long__default) {
87
+ _m0__default.util.Long = Long__default;
88
+ _m0__default.configure();
89
+ }
90
+ function isSet$2(value) {
91
+ return value !== null && value !== void 0;
92
+ }
93
+
94
+ const protobufPackage$1 = "dna.v2.stream";
95
+ var DataFinality$1 = /* @__PURE__ */ ((DataFinality2) => {
96
+ DataFinality2[DataFinality2["UNKNOWN"] = 0] = "UNKNOWN";
97
+ DataFinality2[DataFinality2["PENDING"] = 1] = "PENDING";
98
+ DataFinality2[DataFinality2["ACCEPTED"] = 2] = "ACCEPTED";
99
+ DataFinality2[DataFinality2["FINALIZED"] = 3] = "FINALIZED";
100
+ DataFinality2[DataFinality2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
101
+ return DataFinality2;
102
+ })(DataFinality$1 || {});
103
+ function dataFinalityFromJSON(object) {
104
+ switch (object) {
105
+ case 0:
106
+ case "DATA_FINALITY_UNKNOWN":
107
+ return 0 /* UNKNOWN */;
108
+ case 1:
109
+ case "DATA_FINALITY_PENDING":
110
+ return 1 /* PENDING */;
111
+ case 2:
112
+ case "DATA_FINALITY_ACCEPTED":
113
+ return 2 /* ACCEPTED */;
114
+ case 3:
115
+ case "DATA_FINALITY_FINALIZED":
116
+ return 3 /* FINALIZED */;
117
+ case -1:
118
+ case "UNRECOGNIZED":
119
+ default:
120
+ return -1 /* UNRECOGNIZED */;
121
+ }
122
+ }
123
+ function dataFinalityToJSON(object) {
124
+ switch (object) {
125
+ case 0 /* UNKNOWN */:
126
+ return "DATA_FINALITY_UNKNOWN";
127
+ case 1 /* PENDING */:
128
+ return "DATA_FINALITY_PENDING";
129
+ case 2 /* ACCEPTED */:
130
+ return "DATA_FINALITY_ACCEPTED";
131
+ case 3 /* FINALIZED */:
132
+ return "DATA_FINALITY_FINALIZED";
133
+ case -1 /* UNRECOGNIZED */:
134
+ default:
135
+ return "UNRECOGNIZED";
136
+ }
137
+ }
138
+ function createBaseCursor() {
139
+ return { orderKey: BigInt("0"), uniqueKey: new Uint8Array(0) };
140
+ }
141
+ const Cursor$1 = {
142
+ encode(message, writer = _m0__default.Writer.create()) {
143
+ if (message.orderKey !== BigInt("0")) {
144
+ if (BigInt.asUintN(64, message.orderKey) !== message.orderKey) {
145
+ throw new globalThis.Error("value provided for field message.orderKey of type uint64 too large");
146
+ }
147
+ writer.uint32(8).uint64(message.orderKey.toString());
148
+ }
149
+ if (message.uniqueKey.length !== 0) {
150
+ writer.uint32(18).bytes(message.uniqueKey);
151
+ }
152
+ return writer;
153
+ },
154
+ decode(input, length) {
155
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
156
+ let end = length === void 0 ? reader.len : reader.pos + length;
157
+ const message = createBaseCursor();
158
+ while (reader.pos < end) {
159
+ const tag = reader.uint32();
160
+ switch (tag >>> 3) {
161
+ case 1:
162
+ if (tag !== 8) {
163
+ break;
164
+ }
165
+ message.orderKey = longToBigint(reader.uint64());
166
+ continue;
167
+ case 2:
168
+ if (tag !== 18) {
169
+ break;
170
+ }
171
+ message.uniqueKey = reader.bytes();
172
+ continue;
173
+ }
174
+ if ((tag & 7) === 4 || tag === 0) {
175
+ break;
176
+ }
177
+ reader.skipType(tag & 7);
178
+ }
179
+ return message;
180
+ },
181
+ fromJSON(object) {
182
+ return {
183
+ orderKey: isSet$1(object.orderKey) ? BigInt(object.orderKey) : BigInt("0"),
184
+ uniqueKey: isSet$1(object.uniqueKey) ? bytesFromBase64(object.uniqueKey) : new Uint8Array(0)
185
+ };
186
+ },
187
+ toJSON(message) {
188
+ const obj = {};
189
+ if (message.orderKey !== BigInt("0")) {
190
+ obj.orderKey = message.orderKey.toString();
191
+ }
192
+ if (message.uniqueKey.length !== 0) {
193
+ obj.uniqueKey = base64FromBytes(message.uniqueKey);
194
+ }
195
+ return obj;
196
+ },
197
+ create(base) {
198
+ return Cursor$1.fromPartial(base ?? {});
199
+ },
200
+ fromPartial(object) {
201
+ const message = createBaseCursor();
202
+ message.orderKey = object.orderKey ?? BigInt("0");
203
+ message.uniqueKey = object.uniqueKey ?? new Uint8Array(0);
204
+ return message;
205
+ }
206
+ };
207
+ function createBaseStatusRequest() {
208
+ return {};
209
+ }
210
+ const StatusRequest = {
211
+ encode(_, writer = _m0__default.Writer.create()) {
212
+ return writer;
213
+ },
214
+ decode(input, length) {
215
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
216
+ let end = length === void 0 ? reader.len : reader.pos + length;
217
+ const message = createBaseStatusRequest();
218
+ while (reader.pos < end) {
219
+ const tag = reader.uint32();
220
+ if ((tag & 7) === 4 || tag === 0) {
221
+ break;
222
+ }
223
+ reader.skipType(tag & 7);
224
+ }
225
+ return message;
226
+ },
227
+ fromJSON(_) {
228
+ return {};
229
+ },
230
+ toJSON(_) {
231
+ const obj = {};
232
+ return obj;
233
+ },
234
+ create(base) {
235
+ return StatusRequest.fromPartial(base ?? {});
236
+ },
237
+ fromPartial(_) {
238
+ const message = createBaseStatusRequest();
239
+ return message;
240
+ }
241
+ };
242
+ function createBaseStatusResponse() {
243
+ return { currentHead: void 0, lastIngested: void 0, finalized: void 0, starting: void 0 };
244
+ }
245
+ const StatusResponse = {
246
+ encode(message, writer = _m0__default.Writer.create()) {
247
+ if (message.currentHead !== void 0) {
248
+ Cursor$1.encode(message.currentHead, writer.uint32(10).fork()).ldelim();
249
+ }
250
+ if (message.lastIngested !== void 0) {
251
+ Cursor$1.encode(message.lastIngested, writer.uint32(18).fork()).ldelim();
252
+ }
253
+ if (message.finalized !== void 0) {
254
+ Cursor$1.encode(message.finalized, writer.uint32(26).fork()).ldelim();
255
+ }
256
+ if (message.starting !== void 0) {
257
+ Cursor$1.encode(message.starting, writer.uint32(34).fork()).ldelim();
258
+ }
259
+ return writer;
260
+ },
261
+ decode(input, length) {
262
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
263
+ let end = length === void 0 ? reader.len : reader.pos + length;
264
+ const message = createBaseStatusResponse();
265
+ while (reader.pos < end) {
266
+ const tag = reader.uint32();
267
+ switch (tag >>> 3) {
268
+ case 1:
269
+ if (tag !== 10) {
270
+ break;
271
+ }
272
+ message.currentHead = Cursor$1.decode(reader, reader.uint32());
273
+ continue;
274
+ case 2:
275
+ if (tag !== 18) {
276
+ break;
277
+ }
278
+ message.lastIngested = Cursor$1.decode(reader, reader.uint32());
279
+ continue;
280
+ case 3:
281
+ if (tag !== 26) {
282
+ break;
283
+ }
284
+ message.finalized = Cursor$1.decode(reader, reader.uint32());
285
+ continue;
286
+ case 4:
287
+ if (tag !== 34) {
288
+ break;
289
+ }
290
+ message.starting = Cursor$1.decode(reader, reader.uint32());
291
+ continue;
292
+ }
293
+ if ((tag & 7) === 4 || tag === 0) {
294
+ break;
295
+ }
296
+ reader.skipType(tag & 7);
297
+ }
298
+ return message;
299
+ },
300
+ fromJSON(object) {
301
+ return {
302
+ currentHead: isSet$1(object.currentHead) ? Cursor$1.fromJSON(object.currentHead) : void 0,
303
+ lastIngested: isSet$1(object.lastIngested) ? Cursor$1.fromJSON(object.lastIngested) : void 0,
304
+ finalized: isSet$1(object.finalized) ? Cursor$1.fromJSON(object.finalized) : void 0,
305
+ starting: isSet$1(object.starting) ? Cursor$1.fromJSON(object.starting) : void 0
306
+ };
307
+ },
308
+ toJSON(message) {
309
+ const obj = {};
310
+ if (message.currentHead !== void 0) {
311
+ obj.currentHead = Cursor$1.toJSON(message.currentHead);
312
+ }
313
+ if (message.lastIngested !== void 0) {
314
+ obj.lastIngested = Cursor$1.toJSON(message.lastIngested);
315
+ }
316
+ if (message.finalized !== void 0) {
317
+ obj.finalized = Cursor$1.toJSON(message.finalized);
318
+ }
319
+ if (message.starting !== void 0) {
320
+ obj.starting = Cursor$1.toJSON(message.starting);
321
+ }
322
+ return obj;
323
+ },
324
+ create(base) {
325
+ return StatusResponse.fromPartial(base ?? {});
326
+ },
327
+ fromPartial(object) {
328
+ const message = createBaseStatusResponse();
329
+ message.currentHead = object.currentHead !== void 0 && object.currentHead !== null ? Cursor$1.fromPartial(object.currentHead) : void 0;
330
+ message.lastIngested = object.lastIngested !== void 0 && object.lastIngested !== null ? Cursor$1.fromPartial(object.lastIngested) : void 0;
331
+ message.finalized = object.finalized !== void 0 && object.finalized !== null ? Cursor$1.fromPartial(object.finalized) : void 0;
332
+ message.starting = object.starting !== void 0 && object.starting !== null ? Cursor$1.fromPartial(object.starting) : void 0;
333
+ return message;
334
+ }
335
+ };
336
+ function createBaseStreamDataRequest() {
337
+ return { startingCursor: void 0, finality: void 0, filter: [], heartbeatInterval: void 0 };
338
+ }
339
+ const StreamDataRequest$1 = {
340
+ encode(message, writer = _m0__default.Writer.create()) {
341
+ if (message.startingCursor !== void 0) {
342
+ Cursor$1.encode(message.startingCursor, writer.uint32(10).fork()).ldelim();
343
+ }
344
+ if (message.finality !== void 0) {
345
+ writer.uint32(16).int32(message.finality);
346
+ }
347
+ for (const v of message.filter) {
348
+ writer.uint32(26).bytes(v);
349
+ }
350
+ if (message.heartbeatInterval !== void 0) {
351
+ Duration$1.encode(message.heartbeatInterval, writer.uint32(34).fork()).ldelim();
352
+ }
353
+ return writer;
354
+ },
355
+ decode(input, length) {
356
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
357
+ let end = length === void 0 ? reader.len : reader.pos + length;
358
+ const message = createBaseStreamDataRequest();
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.startingCursor = Cursor$1.decode(reader, reader.uint32());
367
+ continue;
368
+ case 2:
369
+ if (tag !== 16) {
370
+ break;
371
+ }
372
+ message.finality = reader.int32();
373
+ continue;
374
+ case 3:
375
+ if (tag !== 26) {
376
+ break;
377
+ }
378
+ message.filter.push(reader.bytes());
379
+ continue;
380
+ case 4:
381
+ if (tag !== 34) {
382
+ break;
383
+ }
384
+ message.heartbeatInterval = Duration$1.decode(reader, reader.uint32());
385
+ continue;
386
+ }
387
+ if ((tag & 7) === 4 || tag === 0) {
388
+ break;
389
+ }
390
+ reader.skipType(tag & 7);
391
+ }
392
+ return message;
393
+ },
394
+ fromJSON(object) {
395
+ return {
396
+ startingCursor: isSet$1(object.startingCursor) ? Cursor$1.fromJSON(object.startingCursor) : void 0,
397
+ finality: isSet$1(object.finality) ? dataFinalityFromJSON(object.finality) : void 0,
398
+ filter: globalThis.Array.isArray(object?.filter) ? object.filter.map((e) => bytesFromBase64(e)) : [],
399
+ heartbeatInterval: isSet$1(object.heartbeatInterval) ? Duration$1.fromJSON(object.heartbeatInterval) : void 0
400
+ };
401
+ },
402
+ toJSON(message) {
403
+ const obj = {};
404
+ if (message.startingCursor !== void 0) {
405
+ obj.startingCursor = Cursor$1.toJSON(message.startingCursor);
406
+ }
407
+ if (message.finality !== void 0) {
408
+ obj.finality = dataFinalityToJSON(message.finality);
409
+ }
410
+ if (message.filter?.length) {
411
+ obj.filter = message.filter.map((e) => base64FromBytes(e));
412
+ }
413
+ if (message.heartbeatInterval !== void 0) {
414
+ obj.heartbeatInterval = Duration$1.toJSON(message.heartbeatInterval);
415
+ }
416
+ return obj;
417
+ },
418
+ create(base) {
419
+ return StreamDataRequest$1.fromPartial(base ?? {});
420
+ },
421
+ fromPartial(object) {
422
+ const message = createBaseStreamDataRequest();
423
+ message.startingCursor = object.startingCursor !== void 0 && object.startingCursor !== null ? Cursor$1.fromPartial(object.startingCursor) : void 0;
424
+ message.finality = object.finality ?? void 0;
425
+ message.filter = object.filter?.map((e) => e) || [];
426
+ message.heartbeatInterval = object.heartbeatInterval !== void 0 && object.heartbeatInterval !== null ? Duration$1.fromPartial(object.heartbeatInterval) : void 0;
427
+ return message;
428
+ }
429
+ };
430
+ function createBaseStreamDataResponse() {
431
+ return { message: void 0 };
432
+ }
433
+ const StreamDataResponse$1 = {
434
+ encode(message, writer = _m0__default.Writer.create()) {
435
+ switch (message.message?.$case) {
436
+ case "data":
437
+ Data$1.encode(message.message.data, writer.uint32(10).fork()).ldelim();
438
+ break;
439
+ case "invalidate":
440
+ Invalidate$1.encode(message.message.invalidate, writer.uint32(18).fork()).ldelim();
441
+ break;
442
+ case "finalize":
443
+ Finalize$1.encode(message.message.finalize, writer.uint32(26).fork()).ldelim();
444
+ break;
445
+ case "heartbeat":
446
+ Heartbeat$1.encode(message.message.heartbeat, writer.uint32(34).fork()).ldelim();
447
+ break;
448
+ case "systemMessage":
449
+ SystemMessage$1.encode(message.message.systemMessage, writer.uint32(42).fork()).ldelim();
450
+ break;
451
+ }
452
+ return writer;
453
+ },
454
+ decode(input, length) {
455
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
456
+ let end = length === void 0 ? reader.len : reader.pos + length;
457
+ const message = createBaseStreamDataResponse();
458
+ while (reader.pos < end) {
459
+ const tag = reader.uint32();
460
+ switch (tag >>> 3) {
461
+ case 1:
462
+ if (tag !== 10) {
463
+ break;
464
+ }
465
+ message.message = { $case: "data", data: Data$1.decode(reader, reader.uint32()) };
466
+ continue;
467
+ case 2:
468
+ if (tag !== 18) {
469
+ break;
470
+ }
471
+ message.message = { $case: "invalidate", invalidate: Invalidate$1.decode(reader, reader.uint32()) };
472
+ continue;
473
+ case 3:
474
+ if (tag !== 26) {
475
+ break;
476
+ }
477
+ message.message = { $case: "finalize", finalize: Finalize$1.decode(reader, reader.uint32()) };
478
+ continue;
479
+ case 4:
480
+ if (tag !== 34) {
481
+ break;
482
+ }
483
+ message.message = { $case: "heartbeat", heartbeat: Heartbeat$1.decode(reader, reader.uint32()) };
484
+ continue;
485
+ case 5:
486
+ if (tag !== 42) {
487
+ break;
488
+ }
489
+ message.message = { $case: "systemMessage", systemMessage: SystemMessage$1.decode(reader, reader.uint32()) };
490
+ continue;
491
+ }
492
+ if ((tag & 7) === 4 || tag === 0) {
493
+ break;
494
+ }
495
+ reader.skipType(tag & 7);
496
+ }
497
+ return message;
498
+ },
499
+ fromJSON(object) {
500
+ return {
501
+ message: isSet$1(object.data) ? { $case: "data", data: Data$1.fromJSON(object.data) } : isSet$1(object.invalidate) ? { $case: "invalidate", invalidate: Invalidate$1.fromJSON(object.invalidate) } : isSet$1(object.finalize) ? { $case: "finalize", finalize: Finalize$1.fromJSON(object.finalize) } : isSet$1(object.heartbeat) ? { $case: "heartbeat", heartbeat: Heartbeat$1.fromJSON(object.heartbeat) } : isSet$1(object.systemMessage) ? { $case: "systemMessage", systemMessage: SystemMessage$1.fromJSON(object.systemMessage) } : void 0
502
+ };
503
+ },
504
+ toJSON(message) {
505
+ const obj = {};
506
+ if (message.message?.$case === "data") {
507
+ obj.data = Data$1.toJSON(message.message.data);
508
+ }
509
+ if (message.message?.$case === "invalidate") {
510
+ obj.invalidate = Invalidate$1.toJSON(message.message.invalidate);
511
+ }
512
+ if (message.message?.$case === "finalize") {
513
+ obj.finalize = Finalize$1.toJSON(message.message.finalize);
514
+ }
515
+ if (message.message?.$case === "heartbeat") {
516
+ obj.heartbeat = Heartbeat$1.toJSON(message.message.heartbeat);
517
+ }
518
+ if (message.message?.$case === "systemMessage") {
519
+ obj.systemMessage = SystemMessage$1.toJSON(message.message.systemMessage);
520
+ }
521
+ return obj;
522
+ },
523
+ create(base) {
524
+ return StreamDataResponse$1.fromPartial(base ?? {});
525
+ },
526
+ fromPartial(object) {
527
+ const message = createBaseStreamDataResponse();
528
+ if (object.message?.$case === "data" && object.message?.data !== void 0 && object.message?.data !== null) {
529
+ message.message = { $case: "data", data: Data$1.fromPartial(object.message.data) };
530
+ }
531
+ if (object.message?.$case === "invalidate" && object.message?.invalidate !== void 0 && object.message?.invalidate !== null) {
532
+ message.message = { $case: "invalidate", invalidate: Invalidate$1.fromPartial(object.message.invalidate) };
533
+ }
534
+ if (object.message?.$case === "finalize" && object.message?.finalize !== void 0 && object.message?.finalize !== null) {
535
+ message.message = { $case: "finalize", finalize: Finalize$1.fromPartial(object.message.finalize) };
536
+ }
537
+ if (object.message?.$case === "heartbeat" && object.message?.heartbeat !== void 0 && object.message?.heartbeat !== null) {
538
+ message.message = { $case: "heartbeat", heartbeat: Heartbeat$1.fromPartial(object.message.heartbeat) };
539
+ }
540
+ if (object.message?.$case === "systemMessage" && object.message?.systemMessage !== void 0 && object.message?.systemMessage !== null) {
541
+ message.message = {
542
+ $case: "systemMessage",
543
+ systemMessage: SystemMessage$1.fromPartial(object.message.systemMessage)
544
+ };
545
+ }
546
+ return message;
547
+ }
548
+ };
549
+ function createBaseInvalidate() {
550
+ return { cursor: void 0, removed: [] };
551
+ }
552
+ const Invalidate$1 = {
553
+ encode(message, writer = _m0__default.Writer.create()) {
554
+ if (message.cursor !== void 0) {
555
+ Cursor$1.encode(message.cursor, writer.uint32(10).fork()).ldelim();
556
+ }
557
+ for (const v of message.removed) {
558
+ Cursor$1.encode(v, writer.uint32(18).fork()).ldelim();
559
+ }
560
+ return writer;
561
+ },
562
+ decode(input, length) {
563
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
564
+ let end = length === void 0 ? reader.len : reader.pos + length;
565
+ const message = createBaseInvalidate();
566
+ while (reader.pos < end) {
567
+ const tag = reader.uint32();
568
+ switch (tag >>> 3) {
569
+ case 1:
570
+ if (tag !== 10) {
571
+ break;
572
+ }
573
+ message.cursor = Cursor$1.decode(reader, reader.uint32());
574
+ continue;
575
+ case 2:
576
+ if (tag !== 18) {
577
+ break;
578
+ }
579
+ message.removed.push(Cursor$1.decode(reader, reader.uint32()));
580
+ continue;
581
+ }
582
+ if ((tag & 7) === 4 || tag === 0) {
583
+ break;
584
+ }
585
+ reader.skipType(tag & 7);
586
+ }
587
+ return message;
588
+ },
589
+ fromJSON(object) {
590
+ return {
591
+ cursor: isSet$1(object.cursor) ? Cursor$1.fromJSON(object.cursor) : void 0,
592
+ removed: globalThis.Array.isArray(object?.removed) ? object.removed.map((e) => Cursor$1.fromJSON(e)) : []
593
+ };
594
+ },
595
+ toJSON(message) {
596
+ const obj = {};
597
+ if (message.cursor !== void 0) {
598
+ obj.cursor = Cursor$1.toJSON(message.cursor);
599
+ }
600
+ if (message.removed?.length) {
601
+ obj.removed = message.removed.map((e) => Cursor$1.toJSON(e));
602
+ }
603
+ return obj;
604
+ },
605
+ create(base) {
606
+ return Invalidate$1.fromPartial(base ?? {});
607
+ },
608
+ fromPartial(object) {
609
+ const message = createBaseInvalidate();
610
+ message.cursor = object.cursor !== void 0 && object.cursor !== null ? Cursor$1.fromPartial(object.cursor) : void 0;
611
+ message.removed = object.removed?.map((e) => Cursor$1.fromPartial(e)) || [];
612
+ return message;
613
+ }
614
+ };
615
+ function createBaseFinalize() {
616
+ return { cursor: void 0 };
617
+ }
618
+ const Finalize$1 = {
619
+ encode(message, writer = _m0__default.Writer.create()) {
620
+ if (message.cursor !== void 0) {
621
+ Cursor$1.encode(message.cursor, writer.uint32(10).fork()).ldelim();
622
+ }
623
+ return writer;
624
+ },
625
+ decode(input, length) {
626
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
627
+ let end = length === void 0 ? reader.len : reader.pos + length;
628
+ const message = createBaseFinalize();
629
+ while (reader.pos < end) {
630
+ const tag = reader.uint32();
631
+ switch (tag >>> 3) {
632
+ case 1:
633
+ if (tag !== 10) {
634
+ break;
635
+ }
636
+ message.cursor = Cursor$1.decode(reader, reader.uint32());
637
+ continue;
638
+ }
639
+ if ((tag & 7) === 4 || tag === 0) {
640
+ break;
641
+ }
642
+ reader.skipType(tag & 7);
643
+ }
644
+ return message;
645
+ },
646
+ fromJSON(object) {
647
+ return { cursor: isSet$1(object.cursor) ? Cursor$1.fromJSON(object.cursor) : void 0 };
648
+ },
649
+ toJSON(message) {
650
+ const obj = {};
651
+ if (message.cursor !== void 0) {
652
+ obj.cursor = Cursor$1.toJSON(message.cursor);
653
+ }
654
+ return obj;
655
+ },
656
+ create(base) {
657
+ return Finalize$1.fromPartial(base ?? {});
658
+ },
659
+ fromPartial(object) {
660
+ const message = createBaseFinalize();
661
+ message.cursor = object.cursor !== void 0 && object.cursor !== null ? Cursor$1.fromPartial(object.cursor) : void 0;
662
+ return message;
663
+ }
664
+ };
665
+ function createBaseData() {
666
+ return { cursor: void 0, endCursor: void 0, finality: 0, data: [] };
667
+ }
668
+ const Data$1 = {
669
+ encode(message, writer = _m0__default.Writer.create()) {
670
+ if (message.cursor !== void 0) {
671
+ Cursor$1.encode(message.cursor, writer.uint32(10).fork()).ldelim();
672
+ }
673
+ if (message.endCursor !== void 0) {
674
+ Cursor$1.encode(message.endCursor, writer.uint32(18).fork()).ldelim();
675
+ }
676
+ if (message.finality !== 0) {
677
+ writer.uint32(24).int32(message.finality);
678
+ }
679
+ for (const v of message.data) {
680
+ writer.uint32(34).bytes(v);
681
+ }
682
+ return writer;
683
+ },
684
+ decode(input, length) {
685
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
686
+ let end = length === void 0 ? reader.len : reader.pos + length;
687
+ const message = createBaseData();
688
+ while (reader.pos < end) {
689
+ const tag = reader.uint32();
690
+ switch (tag >>> 3) {
691
+ case 1:
692
+ if (tag !== 10) {
693
+ break;
694
+ }
695
+ message.cursor = Cursor$1.decode(reader, reader.uint32());
696
+ continue;
697
+ case 2:
698
+ if (tag !== 18) {
699
+ break;
700
+ }
701
+ message.endCursor = Cursor$1.decode(reader, reader.uint32());
702
+ continue;
703
+ case 3:
704
+ if (tag !== 24) {
705
+ break;
706
+ }
707
+ message.finality = reader.int32();
708
+ continue;
709
+ case 4:
710
+ if (tag !== 34) {
711
+ break;
712
+ }
713
+ message.data.push(reader.bytes());
714
+ continue;
715
+ }
716
+ if ((tag & 7) === 4 || tag === 0) {
717
+ break;
718
+ }
719
+ reader.skipType(tag & 7);
720
+ }
721
+ return message;
722
+ },
723
+ fromJSON(object) {
724
+ return {
725
+ cursor: isSet$1(object.cursor) ? Cursor$1.fromJSON(object.cursor) : void 0,
726
+ endCursor: isSet$1(object.endCursor) ? Cursor$1.fromJSON(object.endCursor) : void 0,
727
+ finality: isSet$1(object.finality) ? dataFinalityFromJSON(object.finality) : 0,
728
+ data: globalThis.Array.isArray(object?.data) ? object.data.map((e) => bytesFromBase64(e)) : []
729
+ };
730
+ },
731
+ toJSON(message) {
732
+ const obj = {};
733
+ if (message.cursor !== void 0) {
734
+ obj.cursor = Cursor$1.toJSON(message.cursor);
735
+ }
736
+ if (message.endCursor !== void 0) {
737
+ obj.endCursor = Cursor$1.toJSON(message.endCursor);
738
+ }
739
+ if (message.finality !== 0) {
740
+ obj.finality = dataFinalityToJSON(message.finality);
741
+ }
742
+ if (message.data?.length) {
743
+ obj.data = message.data.map((e) => base64FromBytes(e));
744
+ }
745
+ return obj;
746
+ },
747
+ create(base) {
748
+ return Data$1.fromPartial(base ?? {});
749
+ },
750
+ fromPartial(object) {
751
+ const message = createBaseData();
752
+ message.cursor = object.cursor !== void 0 && object.cursor !== null ? Cursor$1.fromPartial(object.cursor) : void 0;
753
+ message.endCursor = object.endCursor !== void 0 && object.endCursor !== null ? Cursor$1.fromPartial(object.endCursor) : void 0;
754
+ message.finality = object.finality ?? 0;
755
+ message.data = object.data?.map((e) => e) || [];
756
+ return message;
757
+ }
758
+ };
759
+ function createBaseHeartbeat() {
760
+ return {};
761
+ }
762
+ const Heartbeat$1 = {
763
+ encode(_, writer = _m0__default.Writer.create()) {
764
+ return writer;
765
+ },
766
+ decode(input, length) {
767
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
768
+ let end = length === void 0 ? reader.len : reader.pos + length;
769
+ const message = createBaseHeartbeat();
770
+ while (reader.pos < end) {
771
+ const tag = reader.uint32();
772
+ if ((tag & 7) === 4 || tag === 0) {
773
+ break;
774
+ }
775
+ reader.skipType(tag & 7);
776
+ }
777
+ return message;
778
+ },
779
+ fromJSON(_) {
780
+ return {};
781
+ },
782
+ toJSON(_) {
783
+ const obj = {};
784
+ return obj;
785
+ },
786
+ create(base) {
787
+ return Heartbeat$1.fromPartial(base ?? {});
788
+ },
789
+ fromPartial(_) {
790
+ const message = createBaseHeartbeat();
791
+ return message;
792
+ }
793
+ };
794
+ function createBaseSystemMessage() {
795
+ return { output: void 0 };
796
+ }
797
+ const SystemMessage$1 = {
798
+ encode(message, writer = _m0__default.Writer.create()) {
799
+ switch (message.output?.$case) {
800
+ case "stdout":
801
+ writer.uint32(10).string(message.output.stdout);
802
+ break;
803
+ case "stderr":
804
+ writer.uint32(18).string(message.output.stderr);
805
+ break;
806
+ }
807
+ return writer;
808
+ },
809
+ decode(input, length) {
810
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
811
+ let end = length === void 0 ? reader.len : reader.pos + length;
812
+ const message = createBaseSystemMessage();
813
+ while (reader.pos < end) {
814
+ const tag = reader.uint32();
815
+ switch (tag >>> 3) {
816
+ case 1:
817
+ if (tag !== 10) {
818
+ break;
819
+ }
820
+ message.output = { $case: "stdout", stdout: reader.string() };
821
+ continue;
822
+ case 2:
823
+ if (tag !== 18) {
824
+ break;
825
+ }
826
+ message.output = { $case: "stderr", stderr: reader.string() };
827
+ continue;
828
+ }
829
+ if ((tag & 7) === 4 || tag === 0) {
830
+ break;
831
+ }
832
+ reader.skipType(tag & 7);
833
+ }
834
+ return message;
835
+ },
836
+ fromJSON(object) {
837
+ return {
838
+ output: isSet$1(object.stdout) ? { $case: "stdout", stdout: globalThis.String(object.stdout) } : isSet$1(object.stderr) ? { $case: "stderr", stderr: globalThis.String(object.stderr) } : void 0
839
+ };
840
+ },
841
+ toJSON(message) {
842
+ const obj = {};
843
+ if (message.output?.$case === "stdout") {
844
+ obj.stdout = message.output.stdout;
845
+ }
846
+ if (message.output?.$case === "stderr") {
847
+ obj.stderr = message.output.stderr;
848
+ }
849
+ return obj;
850
+ },
851
+ create(base) {
852
+ return SystemMessage$1.fromPartial(base ?? {});
853
+ },
854
+ fromPartial(object) {
855
+ const message = createBaseSystemMessage();
856
+ if (object.output?.$case === "stdout" && object.output?.stdout !== void 0 && object.output?.stdout !== null) {
857
+ message.output = { $case: "stdout", stdout: object.output.stdout };
858
+ }
859
+ if (object.output?.$case === "stderr" && object.output?.stderr !== void 0 && object.output?.stderr !== null) {
860
+ message.output = { $case: "stderr", stderr: object.output.stderr };
861
+ }
862
+ return message;
863
+ }
864
+ };
865
+ const DnaStreamDefinition = {
866
+ name: "DnaStream",
867
+ fullName: "dna.v2.stream.DnaStream",
868
+ methods: {
869
+ /** Stream data from the server. */
870
+ streamData: {
871
+ name: "StreamData",
872
+ requestType: StreamDataRequest$1,
873
+ requestStream: false,
874
+ responseType: StreamDataResponse$1,
875
+ responseStream: true,
876
+ options: {}
877
+ },
878
+ /** Get DNA server status. */
879
+ status: {
880
+ name: "Status",
881
+ requestType: StatusRequest,
882
+ requestStream: false,
883
+ responseType: StatusResponse,
884
+ responseStream: false,
885
+ options: {}
886
+ }
887
+ }
888
+ };
889
+ function bytesFromBase64(b64) {
890
+ if (globalThis.Buffer) {
891
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
892
+ } else {
893
+ const bin = globalThis.atob(b64);
894
+ const arr = new Uint8Array(bin.length);
895
+ for (let i = 0; i < bin.length; ++i) {
896
+ arr[i] = bin.charCodeAt(i);
897
+ }
898
+ return arr;
899
+ }
900
+ }
901
+ function base64FromBytes(arr) {
902
+ if (globalThis.Buffer) {
903
+ return globalThis.Buffer.from(arr).toString("base64");
904
+ } else {
905
+ const bin = [];
906
+ arr.forEach((byte) => {
907
+ bin.push(globalThis.String.fromCharCode(byte));
908
+ });
909
+ return globalThis.btoa(bin.join(""));
910
+ }
911
+ }
912
+ function longToBigint(long) {
913
+ return BigInt(long.toString());
914
+ }
915
+ if (_m0__default.util.Long !== Long__default) {
916
+ _m0__default.util.Long = Long__default;
917
+ _m0__default.configure();
918
+ }
919
+ function isSet$1(value) {
920
+ return value !== null && value !== void 0;
921
+ }
922
+
923
+ const stream = {
924
+ __proto__: null,
925
+ Cursor: Cursor$1,
926
+ Data: Data$1,
927
+ DataFinality: DataFinality$1,
928
+ DnaStreamDefinition: DnaStreamDefinition,
929
+ Finalize: Finalize$1,
930
+ Heartbeat: Heartbeat$1,
931
+ Invalidate: Invalidate$1,
932
+ StatusRequest: StatusRequest,
933
+ StatusResponse: StatusResponse,
934
+ StreamDataRequest: StreamDataRequest$1,
935
+ StreamDataResponse: StreamDataResponse$1,
936
+ SystemMessage: SystemMessage$1,
937
+ dataFinalityFromJSON: dataFinalityFromJSON,
938
+ dataFinalityToJSON: dataFinalityToJSON,
939
+ protobufPackage: protobufPackage$1
940
+ };
941
+
942
+ const protobufPackage = "dna.v2.testing";
943
+ function createBaseMockFilter() {
944
+ return { filter: void 0 };
945
+ }
946
+ const MockFilter = {
947
+ encode(message, writer = _m0__default.Writer.create()) {
948
+ if (message.filter !== void 0) {
949
+ writer.uint32(10).string(message.filter);
950
+ }
951
+ return writer;
952
+ },
953
+ decode(input, length) {
954
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
955
+ let end = length === void 0 ? reader.len : reader.pos + length;
956
+ const message = createBaseMockFilter();
957
+ while (reader.pos < end) {
958
+ const tag = reader.uint32();
959
+ switch (tag >>> 3) {
960
+ case 1:
961
+ if (tag !== 10) {
962
+ break;
963
+ }
964
+ message.filter = reader.string();
965
+ continue;
966
+ }
967
+ if ((tag & 7) === 4 || tag === 0) {
968
+ break;
969
+ }
970
+ reader.skipType(tag & 7);
971
+ }
972
+ return message;
973
+ },
974
+ fromJSON(object) {
975
+ return { filter: isSet(object.filter) ? globalThis.String(object.filter) : void 0 };
976
+ },
977
+ toJSON(message) {
978
+ const obj = {};
979
+ if (message.filter !== void 0) {
980
+ obj.filter = message.filter;
981
+ }
982
+ return obj;
983
+ },
984
+ create(base) {
985
+ return MockFilter.fromPartial(base ?? {});
986
+ },
987
+ fromPartial(object) {
988
+ const message = createBaseMockFilter();
989
+ message.filter = object.filter ?? void 0;
990
+ return message;
991
+ }
992
+ };
993
+ function createBaseMockBlock() {
994
+ return { data: void 0 };
995
+ }
996
+ const MockBlock = {
997
+ encode(message, writer = _m0__default.Writer.create()) {
998
+ if (message.data !== void 0) {
999
+ writer.uint32(10).string(message.data);
1000
+ }
1001
+ return writer;
1002
+ },
1003
+ decode(input, length) {
1004
+ const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
1005
+ let end = length === void 0 ? reader.len : reader.pos + length;
1006
+ const message = createBaseMockBlock();
1007
+ while (reader.pos < end) {
1008
+ const tag = reader.uint32();
1009
+ switch (tag >>> 3) {
1010
+ case 1:
1011
+ if (tag !== 10) {
1012
+ break;
1013
+ }
1014
+ message.data = reader.string();
1015
+ continue;
1016
+ }
1017
+ if ((tag & 7) === 4 || tag === 0) {
1018
+ break;
1019
+ }
1020
+ reader.skipType(tag & 7);
1021
+ }
1022
+ return message;
1023
+ },
1024
+ fromJSON(object) {
1025
+ return { data: isSet(object.data) ? globalThis.String(object.data) : void 0 };
1026
+ },
1027
+ toJSON(message) {
1028
+ const obj = {};
1029
+ if (message.data !== void 0) {
1030
+ obj.data = message.data;
1031
+ }
1032
+ return obj;
1033
+ },
1034
+ create(base) {
1035
+ return MockBlock.fromPartial(base ?? {});
1036
+ },
1037
+ fromPartial(object) {
1038
+ const message = createBaseMockBlock();
1039
+ message.data = object.data ?? void 0;
1040
+ return message;
1041
+ }
1042
+ };
1043
+ function isSet(value) {
1044
+ return value !== null && value !== void 0;
1045
+ }
1046
+
1047
+ const testing = {
1048
+ __proto__: null,
1049
+ MockBlock: MockBlock,
1050
+ MockFilter: MockFilter,
1051
+ protobufPackage: protobufPackage
1052
+ };
1053
+
1054
+ const Bytes = schema.Schema.TemplateLiteral(
1055
+ schema.Schema.Literal("0x"),
1056
+ schema.Schema.String
1057
+ );
1058
+ const BytesFromUint8Array = schema.Schema.requiredToOptional(
1059
+ schema.Schema.Uint8ArrayFromSelf,
1060
+ Bytes,
1061
+ {
1062
+ decode(value) {
1063
+ if (value.length === 0) {
1064
+ return effect.Option.none();
1065
+ }
1066
+ return effect.Option.some(viem.toHex(value));
1067
+ },
1068
+ encode(value) {
1069
+ return value.pipe(
1070
+ effect.Option.map(viem.hexToBytes),
1071
+ effect.Option.getOrElse(() => new Uint8Array(0))
1072
+ );
1073
+ }
1074
+ }
1075
+ );
1076
+ const _Cursor = schema.Schema.Struct({
1077
+ /** The block number. */
1078
+ orderKey: schema.Schema.BigIntFromSelf,
1079
+ /** The block hash, if any. */
1080
+ uniqueKey: BytesFromUint8Array
1081
+ });
1082
+ const Cursor = _Cursor;
1083
+ const createCursor = (props) => props;
1084
+ const cursorToProto = schema.Schema.encodeSync(Cursor);
1085
+ const cursorFromProto = schema.Schema.decodeSync(Cursor);
1086
+ const CursorFromBytes = schema.Schema.transform(
1087
+ schema.Schema.Uint8ArrayFromSelf,
1088
+ Cursor,
1089
+ {
1090
+ decode(value) {
1091
+ return Cursor$1.decode(value);
1092
+ },
1093
+ encode(value) {
1094
+ return Cursor$1.encode(value).finish();
1095
+ }
1096
+ }
1097
+ );
1098
+ const cursorToBytes = schema.Schema.encodeSync(CursorFromBytes);
1099
+ const cursorFromBytes = schema.Schema.decodeSync(CursorFromBytes);
1100
+
1101
+ const DataFinality = schema.Schema.transform(
1102
+ schema.Schema.Enums(DataFinality$1),
1103
+ schema.Schema.Literal("finalized", "accepted", "pending", "unknown"),
1104
+ {
1105
+ decode(value) {
1106
+ const enumMap = {
1107
+ [DataFinality$1.FINALIZED]: "finalized",
1108
+ [DataFinality$1.ACCEPTED]: "accepted",
1109
+ [DataFinality$1.PENDING]: "pending",
1110
+ [DataFinality$1.UNKNOWN]: "unknown",
1111
+ [DataFinality$1.UNRECOGNIZED]: "unknown"
1112
+ };
1113
+ return enumMap[value] ?? "unknown";
1114
+ },
1115
+ encode(value) {
1116
+ const enumMap = {
1117
+ finalized: DataFinality$1.FINALIZED,
1118
+ accepted: DataFinality$1.ACCEPTED,
1119
+ pending: DataFinality$1.PENDING,
1120
+ unknown: DataFinality$1.UNKNOWN
1121
+ };
1122
+ return enumMap[value] ?? DataFinality$1.UNKNOWN;
1123
+ }
1124
+ }
1125
+ );
1126
+ const Duration = schema.Schema.Struct({
1127
+ seconds: schema.Schema.BigIntFromSelf,
1128
+ nanos: schema.Schema.Number
1129
+ });
1130
+ const StreamDataRequest = (filter) => schema.Schema.Struct({
1131
+ finality: schema.Schema.optional(DataFinality),
1132
+ startingCursor: schema.Schema.optional(Cursor),
1133
+ filter: schema.Schema.mutable(schema.Schema.Array(filter)),
1134
+ heartbeatInterval: schema.Schema.optional(Duration)
1135
+ });
1136
+ const Invalidate = schema.Schema.Struct({
1137
+ _tag: tag("invalidate"),
1138
+ invalidate: schema.Schema.Struct({
1139
+ cursor: schema.Schema.optional(Cursor)
1140
+ })
1141
+ });
1142
+ const Finalize = schema.Schema.Struct({
1143
+ _tag: tag("finalize"),
1144
+ finalize: schema.Schema.Struct({
1145
+ cursor: schema.Schema.optional(Cursor)
1146
+ })
1147
+ });
1148
+ const Heartbeat = schema.Schema.Struct({
1149
+ _tag: tag("heartbeat")
1150
+ });
1151
+ const StdOut = schema.Schema.Struct({
1152
+ _tag: tag("stdout"),
1153
+ stdout: schema.Schema.String
1154
+ });
1155
+ const StdErr = schema.Schema.Struct({
1156
+ _tag: tag("stderr"),
1157
+ stderr: schema.Schema.String
1158
+ });
1159
+ const SystemMessage = schema.Schema.Struct({
1160
+ _tag: tag("systemMessage"),
1161
+ systemMessage: schema.Schema.Struct({
1162
+ output: schema.Schema.optional(schema.Schema.Union(StdOut, StdErr))
1163
+ })
1164
+ });
1165
+ const Data = (schema$1) => schema.Schema.Struct({
1166
+ _tag: tag("data"),
1167
+ data: schema.Schema.Struct({
1168
+ cursor: schema.Schema.optional(Cursor),
1169
+ endCursor: schema.Schema.optional(Cursor),
1170
+ finality: DataFinality,
1171
+ data: schema.Schema.Array(schema$1)
1172
+ })
1173
+ });
1174
+ const StreamDataResponse = (data) => schema.Schema.Union(Data(data), Invalidate, Finalize, Heartbeat, SystemMessage);
1175
+ schema.Schema.Union(
1176
+ Invalidate,
1177
+ Finalize,
1178
+ Heartbeat,
1179
+ SystemMessage
1180
+ );
1181
+ function tag(tag2) {
1182
+ return schema.Schema.Literal(tag2).pipe(
1183
+ schema.Schema.propertySignature,
1184
+ schema.Schema.fromKey("$case")
1185
+ );
1186
+ }
1187
+
1188
+ var __defProp = Object.defineProperty;
1189
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1190
+ var __publicField = (obj, key, value) => {
1191
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1192
+ return value;
1193
+ };
1194
+ class StreamConfig {
1195
+ constructor(filter, block, mergeFilter) {
1196
+ this.filter = filter;
1197
+ this.block = block;
1198
+ this.mergeFilter = mergeFilter;
1199
+ __publicField(this, "request");
1200
+ __publicField(this, "response");
1201
+ this.request = StreamDataRequest(this.filter);
1202
+ this.response = StreamDataResponse(this.block);
1203
+ }
1204
+ /** Filter schema. */
1205
+ get Filter() {
1206
+ return this.filter;
1207
+ }
1208
+ /** Block schema. */
1209
+ get Block() {
1210
+ return this.block;
1211
+ }
1212
+ /** Stream data request schema. */
1213
+ get Request() {
1214
+ return this.request;
1215
+ }
1216
+ /** Stream data response schema. */
1217
+ get Response() {
1218
+ return this.response;
1219
+ }
1220
+ }
1221
+
1222
+ exports.Bytes = Bytes;
1223
+ exports.BytesFromUint8Array = BytesFromUint8Array;
1224
+ exports.Cursor = Cursor;
1225
+ exports.CursorFromBytes = CursorFromBytes;
1226
+ exports.Data = Data;
1227
+ exports.DataFinality = DataFinality;
1228
+ exports.DnaStreamDefinition = DnaStreamDefinition;
1229
+ exports.Duration = Duration;
1230
+ exports.Finalize = Finalize;
1231
+ exports.Heartbeat = Heartbeat;
1232
+ exports.Invalidate = Invalidate;
1233
+ exports.MockBlock = MockBlock;
1234
+ exports.MockFilter = MockFilter;
1235
+ exports.StdErr = StdErr;
1236
+ exports.StdOut = StdOut;
1237
+ exports.StreamConfig = StreamConfig;
1238
+ exports.StreamDataRequest = StreamDataRequest;
1239
+ exports.StreamDataResponse = StreamDataResponse;
1240
+ exports.SystemMessage = SystemMessage;
1241
+ exports._Cursor = _Cursor;
1242
+ exports.createCursor = createCursor;
1243
+ exports.cursorFromBytes = cursorFromBytes;
1244
+ exports.cursorFromProto = cursorFromProto;
1245
+ exports.cursorToBytes = cursorToBytes;
1246
+ exports.cursorToProto = cursorToProto;
1247
+ exports.stream = stream;
1248
+ exports.testing = testing;