@apibara/starknet 2.0.0-beta.2 → 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +29 -37
- package/src/block.ts +37 -11
- package/src/common.test.ts +4 -4
- package/src/common.ts +14 -14
- package/src/filter.test.ts +29 -29
- package/src/filter.ts +42 -9
- package/src/proto/common.ts +41 -41
- package/src/proto/data.ts +310 -137
- package/src/proto/filter.ts +289 -238
- package/CHANGELOG.md +0 -53
- package/LICENSE.txt +0 -202
- package/buf.gen.yaml +0 -15
- package/build.config.ts +0 -11
- package/dist/index.cjs +0 -6106
- package/dist/index.d.cts +0 -4834
- package/dist/index.d.mts +0 -4834
- package/dist/index.d.ts +0 -4834
- package/dist/index.mjs +0 -6031
- package/proto/common.proto +0 -11
- package/proto/data.proto +0 -377
- package/proto/filter.proto +0 -126
- package/tsconfig.json +0 -11
package/src/proto/filter.ts
CHANGED
|
@@ -12,6 +12,51 @@ export const protobufPackage = "starknet.v2";
|
|
|
12
12
|
|
|
13
13
|
/** Starknet DNA definitions (filter). */
|
|
14
14
|
|
|
15
|
+
export enum TransactionStatusFilter {
|
|
16
|
+
UNSPECIFIED = 0,
|
|
17
|
+
SUCCEEDED = 1,
|
|
18
|
+
REVERTED = 2,
|
|
19
|
+
ALL = 3,
|
|
20
|
+
UNRECOGNIZED = -1,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function transactionStatusFilterFromJSON(object: any): TransactionStatusFilter {
|
|
24
|
+
switch (object) {
|
|
25
|
+
case 0:
|
|
26
|
+
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
27
|
+
return TransactionStatusFilter.UNSPECIFIED;
|
|
28
|
+
case 1:
|
|
29
|
+
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
30
|
+
return TransactionStatusFilter.SUCCEEDED;
|
|
31
|
+
case 2:
|
|
32
|
+
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
33
|
+
return TransactionStatusFilter.REVERTED;
|
|
34
|
+
case 3:
|
|
35
|
+
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
36
|
+
return TransactionStatusFilter.ALL;
|
|
37
|
+
case -1:
|
|
38
|
+
case "UNRECOGNIZED":
|
|
39
|
+
default:
|
|
40
|
+
return TransactionStatusFilter.UNRECOGNIZED;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function transactionStatusFilterToJSON(object: TransactionStatusFilter): string {
|
|
45
|
+
switch (object) {
|
|
46
|
+
case TransactionStatusFilter.UNSPECIFIED:
|
|
47
|
+
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
48
|
+
case TransactionStatusFilter.SUCCEEDED:
|
|
49
|
+
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
50
|
+
case TransactionStatusFilter.REVERTED:
|
|
51
|
+
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
52
|
+
case TransactionStatusFilter.ALL:
|
|
53
|
+
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
54
|
+
case TransactionStatusFilter.UNRECOGNIZED:
|
|
55
|
+
default:
|
|
56
|
+
return "UNRECOGNIZED";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
15
60
|
export interface Filter {
|
|
16
61
|
/** Include header. */
|
|
17
62
|
readonly header?:
|
|
@@ -36,8 +81,11 @@ export interface HeaderFilter {
|
|
|
36
81
|
|
|
37
82
|
/** Filter events. */
|
|
38
83
|
export interface EventFilter {
|
|
84
|
+
readonly id?:
|
|
85
|
+
| number
|
|
86
|
+
| undefined;
|
|
39
87
|
/** Filter by contract emitting the event. */
|
|
40
|
-
readonly
|
|
88
|
+
readonly address?:
|
|
41
89
|
| FieldElement
|
|
42
90
|
| undefined;
|
|
43
91
|
/** Filter keys that prefix-match the given data. */
|
|
@@ -53,12 +101,12 @@ export interface EventFilter {
|
|
|
53
101
|
| boolean
|
|
54
102
|
| undefined;
|
|
55
103
|
/**
|
|
56
|
-
*
|
|
104
|
+
* Filter based on the transaction status.
|
|
57
105
|
*
|
|
58
|
-
* Defaults to
|
|
106
|
+
* Defaults to `Succeeded`.
|
|
59
107
|
*/
|
|
60
|
-
readonly
|
|
61
|
-
|
|
|
108
|
+
readonly transactionStatus?:
|
|
109
|
+
| TransactionStatusFilter
|
|
62
110
|
| undefined;
|
|
63
111
|
/**
|
|
64
112
|
* Include the transaction that emitted the event.
|
|
@@ -93,11 +141,15 @@ export interface EventFilter {
|
|
|
93
141
|
}
|
|
94
142
|
|
|
95
143
|
export interface Key {
|
|
144
|
+
/** The event key. If empty, matches any event key. */
|
|
96
145
|
readonly value?: FieldElement | undefined;
|
|
97
146
|
}
|
|
98
147
|
|
|
99
148
|
/** Filter messages to L1. */
|
|
100
149
|
export interface MessageToL1Filter {
|
|
150
|
+
readonly id?:
|
|
151
|
+
| number
|
|
152
|
+
| undefined;
|
|
101
153
|
/** Filter by sender address. */
|
|
102
154
|
readonly fromAddress?:
|
|
103
155
|
| FieldElement
|
|
@@ -107,12 +159,12 @@ export interface MessageToL1Filter {
|
|
|
107
159
|
| FieldElement
|
|
108
160
|
| undefined;
|
|
109
161
|
/**
|
|
110
|
-
*
|
|
162
|
+
* Filter based on the transaction status.
|
|
111
163
|
*
|
|
112
|
-
* Defaults to
|
|
164
|
+
* Defaults to `Succeeded`.
|
|
113
165
|
*/
|
|
114
|
-
readonly
|
|
115
|
-
|
|
|
166
|
+
readonly transactionStatus?:
|
|
167
|
+
| TransactionStatusFilter
|
|
116
168
|
| undefined;
|
|
117
169
|
/**
|
|
118
170
|
* Include the transaction that sent the message.
|
|
@@ -135,18 +187,29 @@ export interface MessageToL1Filter {
|
|
|
135
187
|
*
|
|
136
188
|
* Defaults to false.
|
|
137
189
|
*/
|
|
138
|
-
readonly includeEvents?:
|
|
190
|
+
readonly includeEvents?:
|
|
191
|
+
| boolean
|
|
192
|
+
| undefined;
|
|
193
|
+
/**
|
|
194
|
+
* Include the messages of the transaction that sent the message.
|
|
195
|
+
*
|
|
196
|
+
* Defaults to false.
|
|
197
|
+
*/
|
|
198
|
+
readonly includeSiblings?: boolean | undefined;
|
|
139
199
|
}
|
|
140
200
|
|
|
141
201
|
/** Filter transactions. */
|
|
142
202
|
export interface TransactionFilter {
|
|
203
|
+
readonly id?:
|
|
204
|
+
| number
|
|
205
|
+
| undefined;
|
|
143
206
|
/**
|
|
144
|
-
*
|
|
207
|
+
* Filter based on the transaction status.
|
|
145
208
|
*
|
|
146
|
-
* Defaults to
|
|
209
|
+
* Defaults to `Succeeded`.
|
|
147
210
|
*/
|
|
148
|
-
readonly
|
|
149
|
-
|
|
|
211
|
+
readonly transactionStatus?:
|
|
212
|
+
| TransactionStatusFilter
|
|
150
213
|
| undefined;
|
|
151
214
|
/**
|
|
152
215
|
* Flag to request the transaction's receipt.
|
|
@@ -170,7 +233,7 @@ export interface TransactionFilter {
|
|
|
170
233
|
* Defaults to `false`.
|
|
171
234
|
*/
|
|
172
235
|
readonly includeMessages?: boolean | undefined;
|
|
173
|
-
readonly
|
|
236
|
+
readonly inner?:
|
|
174
237
|
| { readonly $case: "invokeV0"; readonly invokeV0: InvokeTransactionV0Filter }
|
|
175
238
|
| { readonly $case: "invokeV1"; readonly invokeV1: InvokeTransactionV1Filter }
|
|
176
239
|
| { readonly $case: "invokeV3"; readonly invokeV3: InvokeTransactionV3Filter }
|
|
@@ -393,10 +456,11 @@ export const HeaderFilter = {
|
|
|
393
456
|
|
|
394
457
|
function createBaseEventFilter(): EventFilter {
|
|
395
458
|
return {
|
|
396
|
-
|
|
459
|
+
id: 0,
|
|
460
|
+
address: undefined,
|
|
397
461
|
keys: [],
|
|
398
462
|
strict: undefined,
|
|
399
|
-
|
|
463
|
+
transactionStatus: undefined,
|
|
400
464
|
includeTransaction: undefined,
|
|
401
465
|
includeReceipt: undefined,
|
|
402
466
|
includeMessages: undefined,
|
|
@@ -406,31 +470,34 @@ function createBaseEventFilter(): EventFilter {
|
|
|
406
470
|
|
|
407
471
|
export const EventFilter = {
|
|
408
472
|
encode(message: EventFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
409
|
-
if (message.
|
|
410
|
-
|
|
473
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
474
|
+
writer.uint32(8).uint32(message.id);
|
|
475
|
+
}
|
|
476
|
+
if (message.address !== undefined) {
|
|
477
|
+
FieldElement.encode(message.address, writer.uint32(18).fork()).ldelim();
|
|
411
478
|
}
|
|
412
479
|
if (message.keys !== undefined && message.keys.length !== 0) {
|
|
413
480
|
for (const v of message.keys) {
|
|
414
|
-
Key.encode(v!, writer.uint32(
|
|
481
|
+
Key.encode(v!, writer.uint32(26).fork()).ldelim();
|
|
415
482
|
}
|
|
416
483
|
}
|
|
417
484
|
if (message.strict !== undefined) {
|
|
418
|
-
writer.uint32(
|
|
485
|
+
writer.uint32(32).bool(message.strict);
|
|
419
486
|
}
|
|
420
|
-
if (message.
|
|
421
|
-
writer.uint32(
|
|
487
|
+
if (message.transactionStatus !== undefined) {
|
|
488
|
+
writer.uint32(40).int32(message.transactionStatus);
|
|
422
489
|
}
|
|
423
490
|
if (message.includeTransaction !== undefined) {
|
|
424
|
-
writer.uint32(
|
|
491
|
+
writer.uint32(48).bool(message.includeTransaction);
|
|
425
492
|
}
|
|
426
493
|
if (message.includeReceipt !== undefined) {
|
|
427
|
-
writer.uint32(
|
|
494
|
+
writer.uint32(56).bool(message.includeReceipt);
|
|
428
495
|
}
|
|
429
496
|
if (message.includeMessages !== undefined) {
|
|
430
|
-
writer.uint32(
|
|
497
|
+
writer.uint32(64).bool(message.includeMessages);
|
|
431
498
|
}
|
|
432
499
|
if (message.includeSiblings !== undefined) {
|
|
433
|
-
writer.uint32(
|
|
500
|
+
writer.uint32(72).bool(message.includeSiblings);
|
|
434
501
|
}
|
|
435
502
|
return writer;
|
|
436
503
|
},
|
|
@@ -443,59 +510,66 @@ export const EventFilter = {
|
|
|
443
510
|
const tag = reader.uint32();
|
|
444
511
|
switch (tag >>> 3) {
|
|
445
512
|
case 1:
|
|
446
|
-
if (tag !==
|
|
513
|
+
if (tag !== 8) {
|
|
447
514
|
break;
|
|
448
515
|
}
|
|
449
516
|
|
|
450
|
-
message.
|
|
517
|
+
message.id = reader.uint32();
|
|
451
518
|
continue;
|
|
452
519
|
case 2:
|
|
453
520
|
if (tag !== 18) {
|
|
454
521
|
break;
|
|
455
522
|
}
|
|
456
523
|
|
|
457
|
-
message.
|
|
524
|
+
message.address = FieldElement.decode(reader, reader.uint32());
|
|
458
525
|
continue;
|
|
459
526
|
case 3:
|
|
460
|
-
if (tag !==
|
|
527
|
+
if (tag !== 26) {
|
|
461
528
|
break;
|
|
462
529
|
}
|
|
463
530
|
|
|
464
|
-
message.
|
|
531
|
+
message.keys!.push(Key.decode(reader, reader.uint32()));
|
|
465
532
|
continue;
|
|
466
533
|
case 4:
|
|
467
534
|
if (tag !== 32) {
|
|
468
535
|
break;
|
|
469
536
|
}
|
|
470
537
|
|
|
471
|
-
message.
|
|
538
|
+
message.strict = reader.bool();
|
|
472
539
|
continue;
|
|
473
540
|
case 5:
|
|
474
541
|
if (tag !== 40) {
|
|
475
542
|
break;
|
|
476
543
|
}
|
|
477
544
|
|
|
478
|
-
message.
|
|
545
|
+
message.transactionStatus = reader.int32() as any;
|
|
479
546
|
continue;
|
|
480
547
|
case 6:
|
|
481
548
|
if (tag !== 48) {
|
|
482
549
|
break;
|
|
483
550
|
}
|
|
484
551
|
|
|
485
|
-
message.
|
|
552
|
+
message.includeTransaction = reader.bool();
|
|
486
553
|
continue;
|
|
487
554
|
case 7:
|
|
488
555
|
if (tag !== 56) {
|
|
489
556
|
break;
|
|
490
557
|
}
|
|
491
558
|
|
|
492
|
-
message.
|
|
559
|
+
message.includeReceipt = reader.bool();
|
|
493
560
|
continue;
|
|
494
561
|
case 8:
|
|
495
562
|
if (tag !== 64) {
|
|
496
563
|
break;
|
|
497
564
|
}
|
|
498
565
|
|
|
566
|
+
message.includeMessages = reader.bool();
|
|
567
|
+
continue;
|
|
568
|
+
case 9:
|
|
569
|
+
if (tag !== 72) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
|
|
499
573
|
message.includeSiblings = reader.bool();
|
|
500
574
|
continue;
|
|
501
575
|
}
|
|
@@ -509,10 +583,13 @@ export const EventFilter = {
|
|
|
509
583
|
|
|
510
584
|
fromJSON(object: any): EventFilter {
|
|
511
585
|
return {
|
|
512
|
-
|
|
586
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
587
|
+
address: isSet(object.address) ? FieldElement.fromJSON(object.address) : undefined,
|
|
513
588
|
keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e: any) => Key.fromJSON(e)) : [],
|
|
514
589
|
strict: isSet(object.strict) ? globalThis.Boolean(object.strict) : undefined,
|
|
515
|
-
|
|
590
|
+
transactionStatus: isSet(object.transactionStatus)
|
|
591
|
+
? transactionStatusFilterFromJSON(object.transactionStatus)
|
|
592
|
+
: undefined,
|
|
516
593
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : undefined,
|
|
517
594
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : undefined,
|
|
518
595
|
includeMessages: isSet(object.includeMessages) ? globalThis.Boolean(object.includeMessages) : undefined,
|
|
@@ -522,8 +599,11 @@ export const EventFilter = {
|
|
|
522
599
|
|
|
523
600
|
toJSON(message: EventFilter): unknown {
|
|
524
601
|
const obj: any = {};
|
|
525
|
-
if (message.
|
|
526
|
-
obj.
|
|
602
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
603
|
+
obj.id = Math.round(message.id);
|
|
604
|
+
}
|
|
605
|
+
if (message.address !== undefined) {
|
|
606
|
+
obj.address = FieldElement.toJSON(message.address);
|
|
527
607
|
}
|
|
528
608
|
if (message.keys?.length) {
|
|
529
609
|
obj.keys = message.keys.map((e) => Key.toJSON(e));
|
|
@@ -531,8 +611,8 @@ export const EventFilter = {
|
|
|
531
611
|
if (message.strict !== undefined) {
|
|
532
612
|
obj.strict = message.strict;
|
|
533
613
|
}
|
|
534
|
-
if (message.
|
|
535
|
-
obj.
|
|
614
|
+
if (message.transactionStatus !== undefined) {
|
|
615
|
+
obj.transactionStatus = transactionStatusFilterToJSON(message.transactionStatus);
|
|
536
616
|
}
|
|
537
617
|
if (message.includeTransaction !== undefined) {
|
|
538
618
|
obj.includeTransaction = message.includeTransaction;
|
|
@@ -554,12 +634,13 @@ export const EventFilter = {
|
|
|
554
634
|
},
|
|
555
635
|
fromPartial(object: DeepPartial<EventFilter>): EventFilter {
|
|
556
636
|
const message = createBaseEventFilter() as any;
|
|
557
|
-
message.
|
|
558
|
-
|
|
637
|
+
message.id = object.id ?? 0;
|
|
638
|
+
message.address = (object.address !== undefined && object.address !== null)
|
|
639
|
+
? FieldElement.fromPartial(object.address)
|
|
559
640
|
: undefined;
|
|
560
641
|
message.keys = object.keys?.map((e) => Key.fromPartial(e)) || [];
|
|
561
642
|
message.strict = object.strict ?? undefined;
|
|
562
|
-
message.
|
|
643
|
+
message.transactionStatus = object.transactionStatus ?? undefined;
|
|
563
644
|
message.includeTransaction = object.includeTransaction ?? undefined;
|
|
564
645
|
message.includeReceipt = object.includeReceipt ?? undefined;
|
|
565
646
|
message.includeMessages = object.includeMessages ?? undefined;
|
|
@@ -629,34 +710,42 @@ export const Key = {
|
|
|
629
710
|
|
|
630
711
|
function createBaseMessageToL1Filter(): MessageToL1Filter {
|
|
631
712
|
return {
|
|
713
|
+
id: 0,
|
|
632
714
|
fromAddress: undefined,
|
|
633
715
|
toAddress: undefined,
|
|
634
|
-
|
|
716
|
+
transactionStatus: undefined,
|
|
635
717
|
includeTransaction: undefined,
|
|
636
718
|
includeReceipt: undefined,
|
|
637
719
|
includeEvents: undefined,
|
|
720
|
+
includeSiblings: undefined,
|
|
638
721
|
};
|
|
639
722
|
}
|
|
640
723
|
|
|
641
724
|
export const MessageToL1Filter = {
|
|
642
725
|
encode(message: MessageToL1Filter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
726
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
727
|
+
writer.uint32(8).uint32(message.id);
|
|
728
|
+
}
|
|
643
729
|
if (message.fromAddress !== undefined) {
|
|
644
|
-
FieldElement.encode(message.fromAddress, writer.uint32(
|
|
730
|
+
FieldElement.encode(message.fromAddress, writer.uint32(18).fork()).ldelim();
|
|
645
731
|
}
|
|
646
732
|
if (message.toAddress !== undefined) {
|
|
647
|
-
FieldElement.encode(message.toAddress, writer.uint32(
|
|
733
|
+
FieldElement.encode(message.toAddress, writer.uint32(26).fork()).ldelim();
|
|
648
734
|
}
|
|
649
|
-
if (message.
|
|
650
|
-
writer.uint32(
|
|
735
|
+
if (message.transactionStatus !== undefined) {
|
|
736
|
+
writer.uint32(32).int32(message.transactionStatus);
|
|
651
737
|
}
|
|
652
738
|
if (message.includeTransaction !== undefined) {
|
|
653
|
-
writer.uint32(
|
|
739
|
+
writer.uint32(40).bool(message.includeTransaction);
|
|
654
740
|
}
|
|
655
741
|
if (message.includeReceipt !== undefined) {
|
|
656
|
-
writer.uint32(
|
|
742
|
+
writer.uint32(48).bool(message.includeReceipt);
|
|
657
743
|
}
|
|
658
744
|
if (message.includeEvents !== undefined) {
|
|
659
|
-
writer.uint32(
|
|
745
|
+
writer.uint32(56).bool(message.includeEvents);
|
|
746
|
+
}
|
|
747
|
+
if (message.includeSiblings !== undefined) {
|
|
748
|
+
writer.uint32(64).bool(message.includeSiblings);
|
|
660
749
|
}
|
|
661
750
|
return writer;
|
|
662
751
|
},
|
|
@@ -669,47 +758,61 @@ export const MessageToL1Filter = {
|
|
|
669
758
|
const tag = reader.uint32();
|
|
670
759
|
switch (tag >>> 3) {
|
|
671
760
|
case 1:
|
|
672
|
-
if (tag !==
|
|
761
|
+
if (tag !== 8) {
|
|
673
762
|
break;
|
|
674
763
|
}
|
|
675
764
|
|
|
676
|
-
message.
|
|
765
|
+
message.id = reader.uint32();
|
|
677
766
|
continue;
|
|
678
767
|
case 2:
|
|
679
768
|
if (tag !== 18) {
|
|
680
769
|
break;
|
|
681
770
|
}
|
|
682
771
|
|
|
683
|
-
message.
|
|
772
|
+
message.fromAddress = FieldElement.decode(reader, reader.uint32());
|
|
684
773
|
continue;
|
|
685
774
|
case 3:
|
|
686
|
-
if (tag !==
|
|
775
|
+
if (tag !== 26) {
|
|
687
776
|
break;
|
|
688
777
|
}
|
|
689
778
|
|
|
690
|
-
message.
|
|
779
|
+
message.toAddress = FieldElement.decode(reader, reader.uint32());
|
|
691
780
|
continue;
|
|
692
781
|
case 4:
|
|
693
782
|
if (tag !== 32) {
|
|
694
783
|
break;
|
|
695
784
|
}
|
|
696
785
|
|
|
697
|
-
message.
|
|
786
|
+
message.transactionStatus = reader.int32() as any;
|
|
698
787
|
continue;
|
|
699
788
|
case 5:
|
|
700
789
|
if (tag !== 40) {
|
|
701
790
|
break;
|
|
702
791
|
}
|
|
703
792
|
|
|
704
|
-
message.
|
|
793
|
+
message.includeTransaction = reader.bool();
|
|
705
794
|
continue;
|
|
706
795
|
case 6:
|
|
707
796
|
if (tag !== 48) {
|
|
708
797
|
break;
|
|
709
798
|
}
|
|
710
799
|
|
|
800
|
+
message.includeReceipt = reader.bool();
|
|
801
|
+
continue;
|
|
802
|
+
case 7:
|
|
803
|
+
if (tag !== 56) {
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
|
|
711
807
|
message.includeEvents = reader.bool();
|
|
712
808
|
continue;
|
|
809
|
+
case 8:
|
|
810
|
+
if (tag !== 64) {
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
message.includeSiblings = reader.bool();
|
|
815
|
+
continue;
|
|
713
816
|
}
|
|
714
817
|
if ((tag & 7) === 4 || tag === 0) {
|
|
715
818
|
break;
|
|
@@ -721,25 +824,32 @@ export const MessageToL1Filter = {
|
|
|
721
824
|
|
|
722
825
|
fromJSON(object: any): MessageToL1Filter {
|
|
723
826
|
return {
|
|
827
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
724
828
|
fromAddress: isSet(object.fromAddress) ? FieldElement.fromJSON(object.fromAddress) : undefined,
|
|
725
829
|
toAddress: isSet(object.toAddress) ? FieldElement.fromJSON(object.toAddress) : undefined,
|
|
726
|
-
|
|
830
|
+
transactionStatus: isSet(object.transactionStatus)
|
|
831
|
+
? transactionStatusFilterFromJSON(object.transactionStatus)
|
|
832
|
+
: undefined,
|
|
727
833
|
includeTransaction: isSet(object.includeTransaction) ? globalThis.Boolean(object.includeTransaction) : undefined,
|
|
728
834
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : undefined,
|
|
729
835
|
includeEvents: isSet(object.includeEvents) ? globalThis.Boolean(object.includeEvents) : undefined,
|
|
836
|
+
includeSiblings: isSet(object.includeSiblings) ? globalThis.Boolean(object.includeSiblings) : undefined,
|
|
730
837
|
};
|
|
731
838
|
},
|
|
732
839
|
|
|
733
840
|
toJSON(message: MessageToL1Filter): unknown {
|
|
734
841
|
const obj: any = {};
|
|
842
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
843
|
+
obj.id = Math.round(message.id);
|
|
844
|
+
}
|
|
735
845
|
if (message.fromAddress !== undefined) {
|
|
736
846
|
obj.fromAddress = FieldElement.toJSON(message.fromAddress);
|
|
737
847
|
}
|
|
738
848
|
if (message.toAddress !== undefined) {
|
|
739
849
|
obj.toAddress = FieldElement.toJSON(message.toAddress);
|
|
740
850
|
}
|
|
741
|
-
if (message.
|
|
742
|
-
obj.
|
|
851
|
+
if (message.transactionStatus !== undefined) {
|
|
852
|
+
obj.transactionStatus = transactionStatusFilterToJSON(message.transactionStatus);
|
|
743
853
|
}
|
|
744
854
|
if (message.includeTransaction !== undefined) {
|
|
745
855
|
obj.includeTransaction = message.includeTransaction;
|
|
@@ -750,6 +860,9 @@ export const MessageToL1Filter = {
|
|
|
750
860
|
if (message.includeEvents !== undefined) {
|
|
751
861
|
obj.includeEvents = message.includeEvents;
|
|
752
862
|
}
|
|
863
|
+
if (message.includeSiblings !== undefined) {
|
|
864
|
+
obj.includeSiblings = message.includeSiblings;
|
|
865
|
+
}
|
|
753
866
|
return obj;
|
|
754
867
|
},
|
|
755
868
|
|
|
@@ -758,79 +871,83 @@ export const MessageToL1Filter = {
|
|
|
758
871
|
},
|
|
759
872
|
fromPartial(object: DeepPartial<MessageToL1Filter>): MessageToL1Filter {
|
|
760
873
|
const message = createBaseMessageToL1Filter() as any;
|
|
874
|
+
message.id = object.id ?? 0;
|
|
761
875
|
message.fromAddress = (object.fromAddress !== undefined && object.fromAddress !== null)
|
|
762
876
|
? FieldElement.fromPartial(object.fromAddress)
|
|
763
877
|
: undefined;
|
|
764
878
|
message.toAddress = (object.toAddress !== undefined && object.toAddress !== null)
|
|
765
879
|
? FieldElement.fromPartial(object.toAddress)
|
|
766
880
|
: undefined;
|
|
767
|
-
message.
|
|
881
|
+
message.transactionStatus = object.transactionStatus ?? undefined;
|
|
768
882
|
message.includeTransaction = object.includeTransaction ?? undefined;
|
|
769
883
|
message.includeReceipt = object.includeReceipt ?? undefined;
|
|
770
884
|
message.includeEvents = object.includeEvents ?? undefined;
|
|
885
|
+
message.includeSiblings = object.includeSiblings ?? undefined;
|
|
771
886
|
return message;
|
|
772
887
|
},
|
|
773
888
|
};
|
|
774
889
|
|
|
775
890
|
function createBaseTransactionFilter(): TransactionFilter {
|
|
776
891
|
return {
|
|
777
|
-
|
|
892
|
+
id: 0,
|
|
893
|
+
transactionStatus: undefined,
|
|
778
894
|
includeReceipt: undefined,
|
|
779
895
|
includeEvents: undefined,
|
|
780
896
|
includeMessages: undefined,
|
|
781
|
-
|
|
897
|
+
inner: undefined,
|
|
782
898
|
};
|
|
783
899
|
}
|
|
784
900
|
|
|
785
901
|
export const TransactionFilter = {
|
|
786
902
|
encode(message: TransactionFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
787
|
-
if (message.
|
|
788
|
-
writer.uint32(8).
|
|
903
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
904
|
+
writer.uint32(8).uint32(message.id);
|
|
905
|
+
}
|
|
906
|
+
if (message.transactionStatus !== undefined) {
|
|
907
|
+
writer.uint32(16).int32(message.transactionStatus);
|
|
789
908
|
}
|
|
790
909
|
if (message.includeReceipt !== undefined) {
|
|
791
|
-
writer.uint32(
|
|
910
|
+
writer.uint32(24).bool(message.includeReceipt);
|
|
792
911
|
}
|
|
793
912
|
if (message.includeEvents !== undefined) {
|
|
794
|
-
writer.uint32(
|
|
913
|
+
writer.uint32(32).bool(message.includeEvents);
|
|
795
914
|
}
|
|
796
915
|
if (message.includeMessages !== undefined) {
|
|
797
|
-
writer.uint32(
|
|
916
|
+
writer.uint32(40).bool(message.includeMessages);
|
|
798
917
|
}
|
|
799
|
-
switch (message.
|
|
918
|
+
switch (message.inner?.$case) {
|
|
800
919
|
case "invokeV0":
|
|
801
|
-
InvokeTransactionV0Filter.encode(message.
|
|
920
|
+
InvokeTransactionV0Filter.encode(message.inner.invokeV0, writer.uint32(50).fork()).ldelim();
|
|
802
921
|
break;
|
|
803
922
|
case "invokeV1":
|
|
804
|
-
InvokeTransactionV1Filter.encode(message.
|
|
923
|
+
InvokeTransactionV1Filter.encode(message.inner.invokeV1, writer.uint32(58).fork()).ldelim();
|
|
805
924
|
break;
|
|
806
925
|
case "invokeV3":
|
|
807
|
-
InvokeTransactionV3Filter.encode(message.
|
|
926
|
+
InvokeTransactionV3Filter.encode(message.inner.invokeV3, writer.uint32(66).fork()).ldelim();
|
|
808
927
|
break;
|
|
809
928
|
case "deploy":
|
|
810
|
-
DeployTransactionFilter.encode(message.
|
|
929
|
+
DeployTransactionFilter.encode(message.inner.deploy, writer.uint32(74).fork()).ldelim();
|
|
811
930
|
break;
|
|
812
931
|
case "declareV0":
|
|
813
|
-
DeclareV0TransactionFilter.encode(message.
|
|
932
|
+
DeclareV0TransactionFilter.encode(message.inner.declareV0, writer.uint32(82).fork()).ldelim();
|
|
814
933
|
break;
|
|
815
934
|
case "declareV1":
|
|
816
|
-
DeclareV1TransactionFilter.encode(message.
|
|
935
|
+
DeclareV1TransactionFilter.encode(message.inner.declareV1, writer.uint32(90).fork()).ldelim();
|
|
817
936
|
break;
|
|
818
937
|
case "declareV2":
|
|
819
|
-
DeclareV2TransactionFilter.encode(message.
|
|
938
|
+
DeclareV2TransactionFilter.encode(message.inner.declareV2, writer.uint32(98).fork()).ldelim();
|
|
820
939
|
break;
|
|
821
940
|
case "declareV3":
|
|
822
|
-
DeclareV3TransactionFilter.encode(message.
|
|
941
|
+
DeclareV3TransactionFilter.encode(message.inner.declareV3, writer.uint32(106).fork()).ldelim();
|
|
823
942
|
break;
|
|
824
943
|
case "l1Handler":
|
|
825
|
-
L1HandlerTransactionFilter.encode(message.
|
|
944
|
+
L1HandlerTransactionFilter.encode(message.inner.l1Handler, writer.uint32(114).fork()).ldelim();
|
|
826
945
|
break;
|
|
827
946
|
case "deployAccountV1":
|
|
828
|
-
DeployAccountV1TransactionFilter.encode(message.
|
|
829
|
-
.ldelim();
|
|
947
|
+
DeployAccountV1TransactionFilter.encode(message.inner.deployAccountV1, writer.uint32(122).fork()).ldelim();
|
|
830
948
|
break;
|
|
831
949
|
case "deployAccountV3":
|
|
832
|
-
DeployAccountV3TransactionFilter.encode(message.
|
|
833
|
-
.ldelim();
|
|
950
|
+
DeployAccountV3TransactionFilter.encode(message.inner.deployAccountV3, writer.uint32(130).fork()).ldelim();
|
|
834
951
|
break;
|
|
835
952
|
}
|
|
836
953
|
return writer;
|
|
@@ -848,135 +965,115 @@ export const TransactionFilter = {
|
|
|
848
965
|
break;
|
|
849
966
|
}
|
|
850
967
|
|
|
851
|
-
message.
|
|
968
|
+
message.id = reader.uint32();
|
|
852
969
|
continue;
|
|
853
970
|
case 2:
|
|
854
971
|
if (tag !== 16) {
|
|
855
972
|
break;
|
|
856
973
|
}
|
|
857
974
|
|
|
858
|
-
message.
|
|
975
|
+
message.transactionStatus = reader.int32() as any;
|
|
859
976
|
continue;
|
|
860
977
|
case 3:
|
|
861
978
|
if (tag !== 24) {
|
|
862
979
|
break;
|
|
863
980
|
}
|
|
864
981
|
|
|
865
|
-
message.
|
|
982
|
+
message.includeReceipt = reader.bool();
|
|
866
983
|
continue;
|
|
867
984
|
case 4:
|
|
868
985
|
if (tag !== 32) {
|
|
869
986
|
break;
|
|
870
987
|
}
|
|
871
988
|
|
|
872
|
-
message.
|
|
989
|
+
message.includeEvents = reader.bool();
|
|
873
990
|
continue;
|
|
874
991
|
case 5:
|
|
875
|
-
if (tag !==
|
|
992
|
+
if (tag !== 40) {
|
|
876
993
|
break;
|
|
877
994
|
}
|
|
878
995
|
|
|
879
|
-
message.
|
|
880
|
-
$case: "invokeV0",
|
|
881
|
-
invokeV0: InvokeTransactionV0Filter.decode(reader, reader.uint32()),
|
|
882
|
-
};
|
|
996
|
+
message.includeMessages = reader.bool();
|
|
883
997
|
continue;
|
|
884
998
|
case 6:
|
|
885
999
|
if (tag !== 50) {
|
|
886
1000
|
break;
|
|
887
1001
|
}
|
|
888
1002
|
|
|
889
|
-
message.
|
|
890
|
-
$case: "invokeV1",
|
|
891
|
-
invokeV1: InvokeTransactionV1Filter.decode(reader, reader.uint32()),
|
|
892
|
-
};
|
|
1003
|
+
message.inner = { $case: "invokeV0", invokeV0: InvokeTransactionV0Filter.decode(reader, reader.uint32()) };
|
|
893
1004
|
continue;
|
|
894
1005
|
case 7:
|
|
895
1006
|
if (tag !== 58) {
|
|
896
1007
|
break;
|
|
897
1008
|
}
|
|
898
1009
|
|
|
899
|
-
message.
|
|
900
|
-
$case: "invokeV3",
|
|
901
|
-
invokeV3: InvokeTransactionV3Filter.decode(reader, reader.uint32()),
|
|
902
|
-
};
|
|
1010
|
+
message.inner = { $case: "invokeV1", invokeV1: InvokeTransactionV1Filter.decode(reader, reader.uint32()) };
|
|
903
1011
|
continue;
|
|
904
1012
|
case 8:
|
|
905
1013
|
if (tag !== 66) {
|
|
906
1014
|
break;
|
|
907
1015
|
}
|
|
908
1016
|
|
|
909
|
-
message.
|
|
910
|
-
$case: "deploy",
|
|
911
|
-
deploy: DeployTransactionFilter.decode(reader, reader.uint32()),
|
|
912
|
-
};
|
|
1017
|
+
message.inner = { $case: "invokeV3", invokeV3: InvokeTransactionV3Filter.decode(reader, reader.uint32()) };
|
|
913
1018
|
continue;
|
|
914
1019
|
case 9:
|
|
915
1020
|
if (tag !== 74) {
|
|
916
1021
|
break;
|
|
917
1022
|
}
|
|
918
1023
|
|
|
919
|
-
message.
|
|
920
|
-
$case: "declareV0",
|
|
921
|
-
declareV0: DeclareV0TransactionFilter.decode(reader, reader.uint32()),
|
|
922
|
-
};
|
|
1024
|
+
message.inner = { $case: "deploy", deploy: DeployTransactionFilter.decode(reader, reader.uint32()) };
|
|
923
1025
|
continue;
|
|
924
1026
|
case 10:
|
|
925
1027
|
if (tag !== 82) {
|
|
926
1028
|
break;
|
|
927
1029
|
}
|
|
928
1030
|
|
|
929
|
-
message.
|
|
930
|
-
$case: "declareV1",
|
|
931
|
-
declareV1: DeclareV1TransactionFilter.decode(reader, reader.uint32()),
|
|
932
|
-
};
|
|
1031
|
+
message.inner = { $case: "declareV0", declareV0: DeclareV0TransactionFilter.decode(reader, reader.uint32()) };
|
|
933
1032
|
continue;
|
|
934
1033
|
case 11:
|
|
935
1034
|
if (tag !== 90) {
|
|
936
1035
|
break;
|
|
937
1036
|
}
|
|
938
1037
|
|
|
939
|
-
message.
|
|
940
|
-
$case: "declareV2",
|
|
941
|
-
declareV2: DeclareV2TransactionFilter.decode(reader, reader.uint32()),
|
|
942
|
-
};
|
|
1038
|
+
message.inner = { $case: "declareV1", declareV1: DeclareV1TransactionFilter.decode(reader, reader.uint32()) };
|
|
943
1039
|
continue;
|
|
944
1040
|
case 12:
|
|
945
1041
|
if (tag !== 98) {
|
|
946
1042
|
break;
|
|
947
1043
|
}
|
|
948
1044
|
|
|
949
|
-
message.
|
|
950
|
-
$case: "declareV3",
|
|
951
|
-
declareV3: DeclareV3TransactionFilter.decode(reader, reader.uint32()),
|
|
952
|
-
};
|
|
1045
|
+
message.inner = { $case: "declareV2", declareV2: DeclareV2TransactionFilter.decode(reader, reader.uint32()) };
|
|
953
1046
|
continue;
|
|
954
1047
|
case 13:
|
|
955
1048
|
if (tag !== 106) {
|
|
956
1049
|
break;
|
|
957
1050
|
}
|
|
958
1051
|
|
|
959
|
-
message.
|
|
960
|
-
$case: "l1Handler",
|
|
961
|
-
l1Handler: L1HandlerTransactionFilter.decode(reader, reader.uint32()),
|
|
962
|
-
};
|
|
1052
|
+
message.inner = { $case: "declareV3", declareV3: DeclareV3TransactionFilter.decode(reader, reader.uint32()) };
|
|
963
1053
|
continue;
|
|
964
1054
|
case 14:
|
|
965
1055
|
if (tag !== 114) {
|
|
966
1056
|
break;
|
|
967
1057
|
}
|
|
968
1058
|
|
|
969
|
-
message.
|
|
1059
|
+
message.inner = { $case: "l1Handler", l1Handler: L1HandlerTransactionFilter.decode(reader, reader.uint32()) };
|
|
1060
|
+
continue;
|
|
1061
|
+
case 15:
|
|
1062
|
+
if (tag !== 122) {
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
message.inner = {
|
|
970
1067
|
$case: "deployAccountV1",
|
|
971
1068
|
deployAccountV1: DeployAccountV1TransactionFilter.decode(reader, reader.uint32()),
|
|
972
1069
|
};
|
|
973
1070
|
continue;
|
|
974
|
-
case
|
|
975
|
-
if (tag !==
|
|
1071
|
+
case 16:
|
|
1072
|
+
if (tag !== 130) {
|
|
976
1073
|
break;
|
|
977
1074
|
}
|
|
978
1075
|
|
|
979
|
-
message.
|
|
1076
|
+
message.inner = {
|
|
980
1077
|
$case: "deployAccountV3",
|
|
981
1078
|
deployAccountV3: DeployAccountV3TransactionFilter.decode(reader, reader.uint32()),
|
|
982
1079
|
};
|
|
@@ -992,11 +1089,14 @@ export const TransactionFilter = {
|
|
|
992
1089
|
|
|
993
1090
|
fromJSON(object: any): TransactionFilter {
|
|
994
1091
|
return {
|
|
995
|
-
|
|
1092
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
1093
|
+
transactionStatus: isSet(object.transactionStatus)
|
|
1094
|
+
? transactionStatusFilterFromJSON(object.transactionStatus)
|
|
1095
|
+
: undefined,
|
|
996
1096
|
includeReceipt: isSet(object.includeReceipt) ? globalThis.Boolean(object.includeReceipt) : undefined,
|
|
997
1097
|
includeEvents: isSet(object.includeEvents) ? globalThis.Boolean(object.includeEvents) : undefined,
|
|
998
1098
|
includeMessages: isSet(object.includeMessages) ? globalThis.Boolean(object.includeMessages) : undefined,
|
|
999
|
-
|
|
1099
|
+
inner: isSet(object.invokeV0)
|
|
1000
1100
|
? { $case: "invokeV0", invokeV0: InvokeTransactionV0Filter.fromJSON(object.invokeV0) }
|
|
1001
1101
|
: isSet(object.invokeV1)
|
|
1002
1102
|
? { $case: "invokeV1", invokeV1: InvokeTransactionV1Filter.fromJSON(object.invokeV1) }
|
|
@@ -1030,8 +1130,11 @@ export const TransactionFilter = {
|
|
|
1030
1130
|
|
|
1031
1131
|
toJSON(message: TransactionFilter): unknown {
|
|
1032
1132
|
const obj: any = {};
|
|
1033
|
-
if (message.
|
|
1034
|
-
obj.
|
|
1133
|
+
if (message.id !== undefined && message.id !== 0) {
|
|
1134
|
+
obj.id = Math.round(message.id);
|
|
1135
|
+
}
|
|
1136
|
+
if (message.transactionStatus !== undefined) {
|
|
1137
|
+
obj.transactionStatus = transactionStatusFilterToJSON(message.transactionStatus);
|
|
1035
1138
|
}
|
|
1036
1139
|
if (message.includeReceipt !== undefined) {
|
|
1037
1140
|
obj.includeReceipt = message.includeReceipt;
|
|
@@ -1042,38 +1145,38 @@ export const TransactionFilter = {
|
|
|
1042
1145
|
if (message.includeMessages !== undefined) {
|
|
1043
1146
|
obj.includeMessages = message.includeMessages;
|
|
1044
1147
|
}
|
|
1045
|
-
if (message.
|
|
1046
|
-
obj.invokeV0 = InvokeTransactionV0Filter.toJSON(message.
|
|
1148
|
+
if (message.inner?.$case === "invokeV0") {
|
|
1149
|
+
obj.invokeV0 = InvokeTransactionV0Filter.toJSON(message.inner.invokeV0);
|
|
1047
1150
|
}
|
|
1048
|
-
if (message.
|
|
1049
|
-
obj.invokeV1 = InvokeTransactionV1Filter.toJSON(message.
|
|
1151
|
+
if (message.inner?.$case === "invokeV1") {
|
|
1152
|
+
obj.invokeV1 = InvokeTransactionV1Filter.toJSON(message.inner.invokeV1);
|
|
1050
1153
|
}
|
|
1051
|
-
if (message.
|
|
1052
|
-
obj.invokeV3 = InvokeTransactionV3Filter.toJSON(message.
|
|
1154
|
+
if (message.inner?.$case === "invokeV3") {
|
|
1155
|
+
obj.invokeV3 = InvokeTransactionV3Filter.toJSON(message.inner.invokeV3);
|
|
1053
1156
|
}
|
|
1054
|
-
if (message.
|
|
1055
|
-
obj.deploy = DeployTransactionFilter.toJSON(message.
|
|
1157
|
+
if (message.inner?.$case === "deploy") {
|
|
1158
|
+
obj.deploy = DeployTransactionFilter.toJSON(message.inner.deploy);
|
|
1056
1159
|
}
|
|
1057
|
-
if (message.
|
|
1058
|
-
obj.declareV0 = DeclareV0TransactionFilter.toJSON(message.
|
|
1160
|
+
if (message.inner?.$case === "declareV0") {
|
|
1161
|
+
obj.declareV0 = DeclareV0TransactionFilter.toJSON(message.inner.declareV0);
|
|
1059
1162
|
}
|
|
1060
|
-
if (message.
|
|
1061
|
-
obj.declareV1 = DeclareV1TransactionFilter.toJSON(message.
|
|
1163
|
+
if (message.inner?.$case === "declareV1") {
|
|
1164
|
+
obj.declareV1 = DeclareV1TransactionFilter.toJSON(message.inner.declareV1);
|
|
1062
1165
|
}
|
|
1063
|
-
if (message.
|
|
1064
|
-
obj.declareV2 = DeclareV2TransactionFilter.toJSON(message.
|
|
1166
|
+
if (message.inner?.$case === "declareV2") {
|
|
1167
|
+
obj.declareV2 = DeclareV2TransactionFilter.toJSON(message.inner.declareV2);
|
|
1065
1168
|
}
|
|
1066
|
-
if (message.
|
|
1067
|
-
obj.declareV3 = DeclareV3TransactionFilter.toJSON(message.
|
|
1169
|
+
if (message.inner?.$case === "declareV3") {
|
|
1170
|
+
obj.declareV3 = DeclareV3TransactionFilter.toJSON(message.inner.declareV3);
|
|
1068
1171
|
}
|
|
1069
|
-
if (message.
|
|
1070
|
-
obj.l1Handler = L1HandlerTransactionFilter.toJSON(message.
|
|
1172
|
+
if (message.inner?.$case === "l1Handler") {
|
|
1173
|
+
obj.l1Handler = L1HandlerTransactionFilter.toJSON(message.inner.l1Handler);
|
|
1071
1174
|
}
|
|
1072
|
-
if (message.
|
|
1073
|
-
obj.deployAccountV1 = DeployAccountV1TransactionFilter.toJSON(message.
|
|
1175
|
+
if (message.inner?.$case === "deployAccountV1") {
|
|
1176
|
+
obj.deployAccountV1 = DeployAccountV1TransactionFilter.toJSON(message.inner.deployAccountV1);
|
|
1074
1177
|
}
|
|
1075
|
-
if (message.
|
|
1076
|
-
obj.deployAccountV3 = DeployAccountV3TransactionFilter.toJSON(message.
|
|
1178
|
+
if (message.inner?.$case === "deployAccountV3") {
|
|
1179
|
+
obj.deployAccountV3 = DeployAccountV3TransactionFilter.toJSON(message.inner.deployAccountV3);
|
|
1077
1180
|
}
|
|
1078
1181
|
return obj;
|
|
1079
1182
|
},
|
|
@@ -1083,118 +1186,66 @@ export const TransactionFilter = {
|
|
|
1083
1186
|
},
|
|
1084
1187
|
fromPartial(object: DeepPartial<TransactionFilter>): TransactionFilter {
|
|
1085
1188
|
const message = createBaseTransactionFilter() as any;
|
|
1086
|
-
message.
|
|
1189
|
+
message.id = object.id ?? 0;
|
|
1190
|
+
message.transactionStatus = object.transactionStatus ?? undefined;
|
|
1087
1191
|
message.includeReceipt = object.includeReceipt ?? undefined;
|
|
1088
1192
|
message.includeEvents = object.includeEvents ?? undefined;
|
|
1089
1193
|
message.includeMessages = object.includeMessages ?? undefined;
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1092
|
-
object.transactionType?.invokeV0 !== undefined &&
|
|
1093
|
-
object.transactionType?.invokeV0 !== null
|
|
1094
|
-
) {
|
|
1095
|
-
message.transactionType = {
|
|
1096
|
-
$case: "invokeV0",
|
|
1097
|
-
invokeV0: InvokeTransactionV0Filter.fromPartial(object.transactionType.invokeV0),
|
|
1098
|
-
};
|
|
1194
|
+
if (object.inner?.$case === "invokeV0" && object.inner?.invokeV0 !== undefined && object.inner?.invokeV0 !== null) {
|
|
1195
|
+
message.inner = { $case: "invokeV0", invokeV0: InvokeTransactionV0Filter.fromPartial(object.inner.invokeV0) };
|
|
1099
1196
|
}
|
|
1100
|
-
if (
|
|
1101
|
-
|
|
1102
|
-
object.transactionType?.invokeV1 !== undefined &&
|
|
1103
|
-
object.transactionType?.invokeV1 !== null
|
|
1104
|
-
) {
|
|
1105
|
-
message.transactionType = {
|
|
1106
|
-
$case: "invokeV1",
|
|
1107
|
-
invokeV1: InvokeTransactionV1Filter.fromPartial(object.transactionType.invokeV1),
|
|
1108
|
-
};
|
|
1197
|
+
if (object.inner?.$case === "invokeV1" && object.inner?.invokeV1 !== undefined && object.inner?.invokeV1 !== null) {
|
|
1198
|
+
message.inner = { $case: "invokeV1", invokeV1: InvokeTransactionV1Filter.fromPartial(object.inner.invokeV1) };
|
|
1109
1199
|
}
|
|
1110
|
-
if (
|
|
1111
|
-
|
|
1112
|
-
object.transactionType?.invokeV3 !== undefined &&
|
|
1113
|
-
object.transactionType?.invokeV3 !== null
|
|
1114
|
-
) {
|
|
1115
|
-
message.transactionType = {
|
|
1116
|
-
$case: "invokeV3",
|
|
1117
|
-
invokeV3: InvokeTransactionV3Filter.fromPartial(object.transactionType.invokeV3),
|
|
1118
|
-
};
|
|
1200
|
+
if (object.inner?.$case === "invokeV3" && object.inner?.invokeV3 !== undefined && object.inner?.invokeV3 !== null) {
|
|
1201
|
+
message.inner = { $case: "invokeV3", invokeV3: InvokeTransactionV3Filter.fromPartial(object.inner.invokeV3) };
|
|
1119
1202
|
}
|
|
1120
|
-
if (
|
|
1121
|
-
|
|
1122
|
-
object.transactionType?.deploy !== undefined &&
|
|
1123
|
-
object.transactionType?.deploy !== null
|
|
1124
|
-
) {
|
|
1125
|
-
message.transactionType = {
|
|
1126
|
-
$case: "deploy",
|
|
1127
|
-
deploy: DeployTransactionFilter.fromPartial(object.transactionType.deploy),
|
|
1128
|
-
};
|
|
1203
|
+
if (object.inner?.$case === "deploy" && object.inner?.deploy !== undefined && object.inner?.deploy !== null) {
|
|
1204
|
+
message.inner = { $case: "deploy", deploy: DeployTransactionFilter.fromPartial(object.inner.deploy) };
|
|
1129
1205
|
}
|
|
1130
1206
|
if (
|
|
1131
|
-
object.
|
|
1132
|
-
object.transactionType?.declareV0 !== undefined &&
|
|
1133
|
-
object.transactionType?.declareV0 !== null
|
|
1207
|
+
object.inner?.$case === "declareV0" && object.inner?.declareV0 !== undefined && object.inner?.declareV0 !== null
|
|
1134
1208
|
) {
|
|
1135
|
-
message.
|
|
1136
|
-
$case: "declareV0",
|
|
1137
|
-
declareV0: DeclareV0TransactionFilter.fromPartial(object.transactionType.declareV0),
|
|
1138
|
-
};
|
|
1209
|
+
message.inner = { $case: "declareV0", declareV0: DeclareV0TransactionFilter.fromPartial(object.inner.declareV0) };
|
|
1139
1210
|
}
|
|
1140
1211
|
if (
|
|
1141
|
-
object.
|
|
1142
|
-
object.transactionType?.declareV1 !== undefined &&
|
|
1143
|
-
object.transactionType?.declareV1 !== null
|
|
1212
|
+
object.inner?.$case === "declareV1" && object.inner?.declareV1 !== undefined && object.inner?.declareV1 !== null
|
|
1144
1213
|
) {
|
|
1145
|
-
message.
|
|
1146
|
-
$case: "declareV1",
|
|
1147
|
-
declareV1: DeclareV1TransactionFilter.fromPartial(object.transactionType.declareV1),
|
|
1148
|
-
};
|
|
1214
|
+
message.inner = { $case: "declareV1", declareV1: DeclareV1TransactionFilter.fromPartial(object.inner.declareV1) };
|
|
1149
1215
|
}
|
|
1150
1216
|
if (
|
|
1151
|
-
object.
|
|
1152
|
-
object.transactionType?.declareV2 !== undefined &&
|
|
1153
|
-
object.transactionType?.declareV2 !== null
|
|
1217
|
+
object.inner?.$case === "declareV2" && object.inner?.declareV2 !== undefined && object.inner?.declareV2 !== null
|
|
1154
1218
|
) {
|
|
1155
|
-
message.
|
|
1156
|
-
$case: "declareV2",
|
|
1157
|
-
declareV2: DeclareV2TransactionFilter.fromPartial(object.transactionType.declareV2),
|
|
1158
|
-
};
|
|
1219
|
+
message.inner = { $case: "declareV2", declareV2: DeclareV2TransactionFilter.fromPartial(object.inner.declareV2) };
|
|
1159
1220
|
}
|
|
1160
1221
|
if (
|
|
1161
|
-
object.
|
|
1162
|
-
object.transactionType?.declareV3 !== undefined &&
|
|
1163
|
-
object.transactionType?.declareV3 !== null
|
|
1222
|
+
object.inner?.$case === "declareV3" && object.inner?.declareV3 !== undefined && object.inner?.declareV3 !== null
|
|
1164
1223
|
) {
|
|
1165
|
-
message.
|
|
1166
|
-
$case: "declareV3",
|
|
1167
|
-
declareV3: DeclareV3TransactionFilter.fromPartial(object.transactionType.declareV3),
|
|
1168
|
-
};
|
|
1224
|
+
message.inner = { $case: "declareV3", declareV3: DeclareV3TransactionFilter.fromPartial(object.inner.declareV3) };
|
|
1169
1225
|
}
|
|
1170
1226
|
if (
|
|
1171
|
-
object.
|
|
1172
|
-
object.transactionType?.l1Handler !== undefined &&
|
|
1173
|
-
object.transactionType?.l1Handler !== null
|
|
1227
|
+
object.inner?.$case === "l1Handler" && object.inner?.l1Handler !== undefined && object.inner?.l1Handler !== null
|
|
1174
1228
|
) {
|
|
1175
|
-
message.
|
|
1176
|
-
$case: "l1Handler",
|
|
1177
|
-
l1Handler: L1HandlerTransactionFilter.fromPartial(object.transactionType.l1Handler),
|
|
1178
|
-
};
|
|
1229
|
+
message.inner = { $case: "l1Handler", l1Handler: L1HandlerTransactionFilter.fromPartial(object.inner.l1Handler) };
|
|
1179
1230
|
}
|
|
1180
1231
|
if (
|
|
1181
|
-
object.
|
|
1182
|
-
object.
|
|
1183
|
-
object.
|
|
1232
|
+
object.inner?.$case === "deployAccountV1" &&
|
|
1233
|
+
object.inner?.deployAccountV1 !== undefined &&
|
|
1234
|
+
object.inner?.deployAccountV1 !== null
|
|
1184
1235
|
) {
|
|
1185
|
-
message.
|
|
1236
|
+
message.inner = {
|
|
1186
1237
|
$case: "deployAccountV1",
|
|
1187
|
-
deployAccountV1: DeployAccountV1TransactionFilter.fromPartial(object.
|
|
1238
|
+
deployAccountV1: DeployAccountV1TransactionFilter.fromPartial(object.inner.deployAccountV1),
|
|
1188
1239
|
};
|
|
1189
1240
|
}
|
|
1190
1241
|
if (
|
|
1191
|
-
object.
|
|
1192
|
-
object.
|
|
1193
|
-
object.
|
|
1242
|
+
object.inner?.$case === "deployAccountV3" &&
|
|
1243
|
+
object.inner?.deployAccountV3 !== undefined &&
|
|
1244
|
+
object.inner?.deployAccountV3 !== null
|
|
1194
1245
|
) {
|
|
1195
|
-
message.
|
|
1246
|
+
message.inner = {
|
|
1196
1247
|
$case: "deployAccountV3",
|
|
1197
|
-
deployAccountV3: DeployAccountV3TransactionFilter.fromPartial(object.
|
|
1248
|
+
deployAccountV3: DeployAccountV3TransactionFilter.fromPartial(object.inner.deployAccountV3),
|
|
1198
1249
|
};
|
|
1199
1250
|
}
|
|
1200
1251
|
return message;
|