@mimicprotocol/sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axia/validators.d.ts +217 -208
- package/dist/axia/validators.d.ts.map +1 -1
- package/dist/axia/validators.js +2 -0
- package/dist/axia/validators.js.map +1 -1
- package/dist/client/domains/IntentsClient.d.ts +1 -16
- package/dist/client/domains/IntentsClient.d.ts.map +1 -1
- package/dist/client/domains/IntentsClient.js +0 -16
- package/dist/client/domains/IntentsClient.js.map +1 -1
- package/dist/oracle/validators.d.ts +62 -62
- package/dist/registry/TriggerSigner.d.ts.map +1 -1
- package/dist/registry/TriggerSigner.js +2 -1
- package/dist/registry/TriggerSigner.js.map +1 -1
- package/dist/registry/validators.d.ts +579 -124
- package/dist/registry/validators.d.ts.map +1 -1
- package/dist/registry/validators.js +17 -2
- package/dist/registry/validators.js.map +1 -1
- package/dist/relayer/validators.d.ts +132 -132
- package/dist/runner/validators.d.ts +46 -46
- package/dist/shared/codec/encoder.d.ts +5 -5
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.d.ts.map +1 -1
- package/dist/shared/utils/index.js +1 -0
- package/dist/shared/utils/index.js.map +1 -1
- package/dist/shared/utils/operations.d.ts +24 -0
- package/dist/shared/utils/operations.d.ts.map +1 -0
- package/dist/shared/utils/operations.js +32 -0
- package/dist/shared/utils/operations.js.map +1 -0
- package/dist/shared/validators/executions.d.ts +10 -10
- package/dist/shared/validators/intents.d.ts +50 -50
- package/dist/shared/validators/primitives.d.ts +2 -2
- package/dist/shared/validators/primitives.js +13 -13
- package/dist/shared/validators/primitives.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,32 +17,32 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
17
17
|
to: z.ZodEffects<z.ZodString, string, string>;
|
|
18
18
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
data: string;
|
|
21
20
|
chainId: number;
|
|
22
|
-
|
|
21
|
+
data: string;
|
|
23
22
|
timestamp: number;
|
|
23
|
+
to: string;
|
|
24
24
|
}, {
|
|
25
|
-
data: string;
|
|
26
25
|
chainId: number;
|
|
27
|
-
|
|
26
|
+
data: string;
|
|
28
27
|
timestamp: number;
|
|
28
|
+
to: string;
|
|
29
29
|
}>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
31
|
name: "EvmCallQuery";
|
|
32
32
|
params: {
|
|
33
|
-
data: string;
|
|
34
33
|
chainId: number;
|
|
35
|
-
|
|
34
|
+
data: string;
|
|
36
35
|
timestamp: number;
|
|
36
|
+
to: string;
|
|
37
37
|
};
|
|
38
38
|
hash: string;
|
|
39
39
|
}, {
|
|
40
40
|
name: "EvmCallQuery";
|
|
41
41
|
params: {
|
|
42
|
-
data: string;
|
|
43
42
|
chainId: number;
|
|
44
|
-
|
|
43
|
+
data: string;
|
|
45
44
|
timestamp: number;
|
|
45
|
+
to: string;
|
|
46
46
|
};
|
|
47
47
|
hash: string;
|
|
48
48
|
}>;
|
|
@@ -60,10 +60,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
60
60
|
query: {
|
|
61
61
|
name: "EvmCallQuery";
|
|
62
62
|
params: {
|
|
63
|
-
data: string;
|
|
64
63
|
chainId: number;
|
|
65
|
-
|
|
64
|
+
data: string;
|
|
66
65
|
timestamp: number;
|
|
66
|
+
to: string;
|
|
67
67
|
};
|
|
68
68
|
hash: string;
|
|
69
69
|
};
|
|
@@ -75,10 +75,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
75
75
|
query: {
|
|
76
76
|
name: "EvmCallQuery";
|
|
77
77
|
params: {
|
|
78
|
-
data: string;
|
|
79
78
|
chainId: number;
|
|
80
|
-
|
|
79
|
+
data: string;
|
|
81
80
|
timestamp: number;
|
|
81
|
+
to: string;
|
|
82
82
|
};
|
|
83
83
|
hash: string;
|
|
84
84
|
};
|
|
@@ -101,36 +101,36 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
101
101
|
chainId: number;
|
|
102
102
|
}>;
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
timestamp: number;
|
|
104
105
|
token: {
|
|
105
106
|
address: string;
|
|
106
107
|
chainId: number;
|
|
107
108
|
};
|
|
108
|
-
timestamp: number;
|
|
109
109
|
}, {
|
|
110
|
+
timestamp: number;
|
|
110
111
|
token: {
|
|
111
112
|
address: string;
|
|
112
113
|
chainId: number;
|
|
113
114
|
};
|
|
114
|
-
timestamp: number;
|
|
115
115
|
}>;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
117
|
name: "TokenPriceQuery";
|
|
118
118
|
params: {
|
|
119
|
+
timestamp: number;
|
|
119
120
|
token: {
|
|
120
121
|
address: string;
|
|
121
122
|
chainId: number;
|
|
122
123
|
};
|
|
123
|
-
timestamp: number;
|
|
124
124
|
};
|
|
125
125
|
hash: string;
|
|
126
126
|
}, {
|
|
127
127
|
name: "TokenPriceQuery";
|
|
128
128
|
params: {
|
|
129
|
+
timestamp: number;
|
|
129
130
|
token: {
|
|
130
131
|
address: string;
|
|
131
132
|
chainId: number;
|
|
132
133
|
};
|
|
133
|
-
timestamp: number;
|
|
134
134
|
};
|
|
135
135
|
hash: string;
|
|
136
136
|
}>;
|
|
@@ -148,11 +148,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
148
148
|
query: {
|
|
149
149
|
name: "TokenPriceQuery";
|
|
150
150
|
params: {
|
|
151
|
+
timestamp: number;
|
|
151
152
|
token: {
|
|
152
153
|
address: string;
|
|
153
154
|
chainId: number;
|
|
154
155
|
};
|
|
155
|
-
timestamp: number;
|
|
156
156
|
};
|
|
157
157
|
hash: string;
|
|
158
158
|
};
|
|
@@ -164,11 +164,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
164
164
|
query: {
|
|
165
165
|
name: "TokenPriceQuery";
|
|
166
166
|
params: {
|
|
167
|
+
timestamp: number;
|
|
167
168
|
token: {
|
|
168
169
|
address: string;
|
|
169
170
|
chainId: number;
|
|
170
171
|
};
|
|
171
|
-
timestamp: number;
|
|
172
172
|
};
|
|
173
173
|
hash: string;
|
|
174
174
|
};
|
|
@@ -502,34 +502,34 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
502
502
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
503
503
|
rentEpoch: z.ZodEffects<z.ZodString, string, string>;
|
|
504
504
|
}, "strip", z.ZodTypeAny, {
|
|
505
|
-
data: string;
|
|
506
505
|
executable: boolean;
|
|
507
506
|
owner: string;
|
|
508
507
|
lamports: string;
|
|
508
|
+
data: string;
|
|
509
509
|
rentEpoch: string;
|
|
510
510
|
}, {
|
|
511
|
-
data: string;
|
|
512
511
|
executable: boolean;
|
|
513
512
|
owner: string;
|
|
514
513
|
lamports: string;
|
|
514
|
+
data: string;
|
|
515
515
|
rentEpoch: string;
|
|
516
516
|
}>, "many">;
|
|
517
517
|
slot: z.ZodEffects<z.ZodString, string, string>;
|
|
518
518
|
}, "strip", z.ZodTypeAny, {
|
|
519
519
|
accountsInfo: {
|
|
520
|
-
data: string;
|
|
521
520
|
executable: boolean;
|
|
522
521
|
owner: string;
|
|
523
522
|
lamports: string;
|
|
523
|
+
data: string;
|
|
524
524
|
rentEpoch: string;
|
|
525
525
|
}[];
|
|
526
526
|
slot: string;
|
|
527
527
|
}, {
|
|
528
528
|
accountsInfo: {
|
|
529
|
-
data: string;
|
|
530
529
|
executable: boolean;
|
|
531
530
|
owner: string;
|
|
532
531
|
lamports: string;
|
|
532
|
+
data: string;
|
|
533
533
|
rentEpoch: string;
|
|
534
534
|
}[];
|
|
535
535
|
slot: string;
|
|
@@ -537,10 +537,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
537
537
|
}, "strip", z.ZodTypeAny, {
|
|
538
538
|
value: {
|
|
539
539
|
accountsInfo: {
|
|
540
|
-
data: string;
|
|
541
540
|
executable: boolean;
|
|
542
541
|
owner: string;
|
|
543
542
|
lamports: string;
|
|
543
|
+
data: string;
|
|
544
544
|
rentEpoch: string;
|
|
545
545
|
}[];
|
|
546
546
|
slot: string;
|
|
@@ -548,10 +548,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
548
548
|
}, {
|
|
549
549
|
value: {
|
|
550
550
|
accountsInfo: {
|
|
551
|
-
data: string;
|
|
552
551
|
executable: boolean;
|
|
553
552
|
owner: string;
|
|
554
553
|
lamports: string;
|
|
554
|
+
data: string;
|
|
555
555
|
rentEpoch: string;
|
|
556
556
|
}[];
|
|
557
557
|
slot: string;
|
|
@@ -561,10 +561,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
561
561
|
result: {
|
|
562
562
|
value: {
|
|
563
563
|
accountsInfo: {
|
|
564
|
-
data: string;
|
|
565
564
|
executable: boolean;
|
|
566
565
|
owner: string;
|
|
567
566
|
lamports: string;
|
|
567
|
+
data: string;
|
|
568
568
|
rentEpoch: string;
|
|
569
569
|
}[];
|
|
570
570
|
slot: string;
|
|
@@ -583,10 +583,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
583
583
|
result: {
|
|
584
584
|
value: {
|
|
585
585
|
accountsInfo: {
|
|
586
|
-
data: string;
|
|
587
586
|
executable: boolean;
|
|
588
587
|
owner: string;
|
|
589
588
|
lamports: string;
|
|
589
|
+
data: string;
|
|
590
590
|
rentEpoch: string;
|
|
591
591
|
}[];
|
|
592
592
|
slot: string;
|
|
@@ -621,8 +621,8 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
621
621
|
version: z.ZodEffects<z.ZodString, string, string>;
|
|
622
622
|
}, "strip", z.ZodTypeAny, {
|
|
623
623
|
triggerSig: string;
|
|
624
|
-
user: string;
|
|
625
624
|
timestamp: number;
|
|
625
|
+
user: string;
|
|
626
626
|
hash: string;
|
|
627
627
|
version: string;
|
|
628
628
|
input: Record<string, unknown>;
|
|
@@ -640,10 +640,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
640
640
|
query: {
|
|
641
641
|
name: "EvmCallQuery";
|
|
642
642
|
params: {
|
|
643
|
-
data: string;
|
|
644
643
|
chainId: number;
|
|
645
|
-
|
|
644
|
+
data: string;
|
|
646
645
|
timestamp: number;
|
|
646
|
+
to: string;
|
|
647
647
|
};
|
|
648
648
|
hash: string;
|
|
649
649
|
};
|
|
@@ -652,10 +652,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
652
652
|
result: {
|
|
653
653
|
value: {
|
|
654
654
|
accountsInfo: {
|
|
655
|
-
data: string;
|
|
656
655
|
executable: boolean;
|
|
657
656
|
owner: string;
|
|
658
657
|
lamports: string;
|
|
658
|
+
data: string;
|
|
659
659
|
rentEpoch: string;
|
|
660
660
|
}[];
|
|
661
661
|
slot: string;
|
|
@@ -677,11 +677,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
677
677
|
query: {
|
|
678
678
|
name: "TokenPriceQuery";
|
|
679
679
|
params: {
|
|
680
|
+
timestamp: number;
|
|
680
681
|
token: {
|
|
681
682
|
address: string;
|
|
682
683
|
chainId: number;
|
|
683
684
|
};
|
|
684
|
-
timestamp: number;
|
|
685
685
|
};
|
|
686
686
|
hash: string;
|
|
687
687
|
};
|
|
@@ -735,8 +735,8 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
735
735
|
})[] | undefined;
|
|
736
736
|
}, {
|
|
737
737
|
triggerSig: string;
|
|
738
|
-
user: string;
|
|
739
738
|
timestamp: number;
|
|
739
|
+
user: string;
|
|
740
740
|
hash: string;
|
|
741
741
|
version: string;
|
|
742
742
|
input: Record<string, unknown>;
|
|
@@ -754,10 +754,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
754
754
|
query: {
|
|
755
755
|
name: "EvmCallQuery";
|
|
756
756
|
params: {
|
|
757
|
-
data: string;
|
|
758
757
|
chainId: number;
|
|
759
|
-
|
|
758
|
+
data: string;
|
|
760
759
|
timestamp: number;
|
|
760
|
+
to: string;
|
|
761
761
|
};
|
|
762
762
|
hash: string;
|
|
763
763
|
};
|
|
@@ -766,10 +766,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
766
766
|
result: {
|
|
767
767
|
value: {
|
|
768
768
|
accountsInfo: {
|
|
769
|
-
data: string;
|
|
770
769
|
executable: boolean;
|
|
771
770
|
owner: string;
|
|
772
771
|
lamports: string;
|
|
772
|
+
data: string;
|
|
773
773
|
rentEpoch: string;
|
|
774
774
|
}[];
|
|
775
775
|
slot: string;
|
|
@@ -791,11 +791,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
791
791
|
query: {
|
|
792
792
|
name: "TokenPriceQuery";
|
|
793
793
|
params: {
|
|
794
|
+
timestamp: number;
|
|
794
795
|
token: {
|
|
795
796
|
address: string;
|
|
796
797
|
chainId: number;
|
|
797
798
|
};
|
|
798
|
-
timestamp: number;
|
|
799
799
|
};
|
|
800
800
|
hash: string;
|
|
801
801
|
};
|
|
@@ -849,8 +849,8 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
849
849
|
})[] | undefined;
|
|
850
850
|
}>, {
|
|
851
851
|
triggerSig: string;
|
|
852
|
-
user: string;
|
|
853
852
|
timestamp: number;
|
|
853
|
+
user: string;
|
|
854
854
|
hash: string;
|
|
855
855
|
version: string;
|
|
856
856
|
input: Record<string, unknown>;
|
|
@@ -868,10 +868,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
868
868
|
query: {
|
|
869
869
|
name: "EvmCallQuery";
|
|
870
870
|
params: {
|
|
871
|
-
data: string;
|
|
872
871
|
chainId: number;
|
|
873
|
-
|
|
872
|
+
data: string;
|
|
874
873
|
timestamp: number;
|
|
874
|
+
to: string;
|
|
875
875
|
};
|
|
876
876
|
hash: string;
|
|
877
877
|
};
|
|
@@ -880,10 +880,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
880
880
|
result: {
|
|
881
881
|
value: {
|
|
882
882
|
accountsInfo: {
|
|
883
|
-
data: string;
|
|
884
883
|
executable: boolean;
|
|
885
884
|
owner: string;
|
|
886
885
|
lamports: string;
|
|
886
|
+
data: string;
|
|
887
887
|
rentEpoch: string;
|
|
888
888
|
}[];
|
|
889
889
|
slot: string;
|
|
@@ -905,11 +905,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
905
905
|
query: {
|
|
906
906
|
name: "TokenPriceQuery";
|
|
907
907
|
params: {
|
|
908
|
+
timestamp: number;
|
|
908
909
|
token: {
|
|
909
910
|
address: string;
|
|
910
911
|
chainId: number;
|
|
911
912
|
};
|
|
912
|
-
timestamp: number;
|
|
913
913
|
};
|
|
914
914
|
hash: string;
|
|
915
915
|
};
|
|
@@ -963,8 +963,8 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
963
963
|
})[] | undefined;
|
|
964
964
|
}, {
|
|
965
965
|
triggerSig: string;
|
|
966
|
-
user: string;
|
|
967
966
|
timestamp: number;
|
|
967
|
+
user: string;
|
|
968
968
|
hash: string;
|
|
969
969
|
version: string;
|
|
970
970
|
input: Record<string, unknown>;
|
|
@@ -982,10 +982,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
982
982
|
query: {
|
|
983
983
|
name: "EvmCallQuery";
|
|
984
984
|
params: {
|
|
985
|
-
data: string;
|
|
986
985
|
chainId: number;
|
|
987
|
-
|
|
986
|
+
data: string;
|
|
988
987
|
timestamp: number;
|
|
988
|
+
to: string;
|
|
989
989
|
};
|
|
990
990
|
hash: string;
|
|
991
991
|
};
|
|
@@ -994,10 +994,10 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
994
994
|
result: {
|
|
995
995
|
value: {
|
|
996
996
|
accountsInfo: {
|
|
997
|
-
data: string;
|
|
998
997
|
executable: boolean;
|
|
999
998
|
owner: string;
|
|
1000
999
|
lamports: string;
|
|
1000
|
+
data: string;
|
|
1001
1001
|
rentEpoch: string;
|
|
1002
1002
|
}[];
|
|
1003
1003
|
slot: string;
|
|
@@ -1019,11 +1019,11 @@ export declare const RunExecutionRequestValidator: z.ZodEffects<z.ZodObject<{
|
|
|
1019
1019
|
query: {
|
|
1020
1020
|
name: "TokenPriceQuery";
|
|
1021
1021
|
params: {
|
|
1022
|
+
timestamp: number;
|
|
1022
1023
|
token: {
|
|
1023
1024
|
address: string;
|
|
1024
1025
|
chainId: number;
|
|
1025
1026
|
};
|
|
1026
|
-
timestamp: number;
|
|
1027
1027
|
};
|
|
1028
1028
|
hash: string;
|
|
1029
1029
|
};
|
|
@@ -35,13 +35,13 @@ export declare function toRawOperation(output: RunnerOperation): {
|
|
|
35
35
|
}[];
|
|
36
36
|
} | {
|
|
37
37
|
data: string;
|
|
38
|
+
chainId: number;
|
|
38
39
|
opType: 0 | 1 | 2 | 3 | 4 | 5;
|
|
39
40
|
user: string;
|
|
40
41
|
events: {
|
|
41
42
|
data: string;
|
|
42
43
|
topic: string;
|
|
43
44
|
}[];
|
|
44
|
-
chainId: number;
|
|
45
45
|
transfers: {
|
|
46
46
|
token: string;
|
|
47
47
|
amount: string;
|
|
@@ -49,13 +49,13 @@ export declare function toRawOperation(output: RunnerOperation): {
|
|
|
49
49
|
}[];
|
|
50
50
|
} | {
|
|
51
51
|
data: string;
|
|
52
|
+
chainId: number;
|
|
52
53
|
opType: 0 | 1 | 2 | 3 | 4 | 5;
|
|
53
54
|
user: string;
|
|
54
55
|
events: {
|
|
55
56
|
data: string;
|
|
56
57
|
topic: string;
|
|
57
58
|
}[];
|
|
58
|
-
chainId: number;
|
|
59
59
|
calls: {
|
|
60
60
|
value: string;
|
|
61
61
|
data: string;
|
|
@@ -63,13 +63,13 @@ export declare function toRawOperation(output: RunnerOperation): {
|
|
|
63
63
|
}[];
|
|
64
64
|
} | {
|
|
65
65
|
data: string;
|
|
66
|
+
chainId: number;
|
|
66
67
|
opType: 0 | 1 | 2 | 3 | 4 | 5;
|
|
67
68
|
user: string;
|
|
68
69
|
events: {
|
|
69
70
|
data: string;
|
|
70
71
|
topic: string;
|
|
71
72
|
}[];
|
|
72
|
-
chainId: number;
|
|
73
73
|
calls: {
|
|
74
74
|
value: string;
|
|
75
75
|
target: string;
|
|
@@ -103,6 +103,7 @@ export declare function toRawIntent(intent: RunnerIntent & {
|
|
|
103
103
|
minValidations: number;
|
|
104
104
|
}): {
|
|
105
105
|
hash: string;
|
|
106
|
+
triggerSig: string;
|
|
106
107
|
feePayer: string;
|
|
107
108
|
settler: string;
|
|
108
109
|
nonce: string;
|
|
@@ -111,12 +112,11 @@ export declare function toRawIntent(intent: RunnerIntent & {
|
|
|
111
112
|
token: string;
|
|
112
113
|
amount: string;
|
|
113
114
|
}[];
|
|
114
|
-
triggerSig: string;
|
|
115
115
|
minValidations: number;
|
|
116
116
|
operations: {
|
|
117
|
+
data: string;
|
|
117
118
|
opType: 0 | 1 | 2 | 3 | 4 | 5;
|
|
118
119
|
user: string;
|
|
119
|
-
data: string;
|
|
120
120
|
events: {
|
|
121
121
|
data: string;
|
|
122
122
|
topic: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA"}
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./bytes"), exports);
|
|
|
19
19
|
__exportStar(require("./chains"), exports);
|
|
20
20
|
__exportStar(require("./constants"), exports);
|
|
21
21
|
__exportStar(require("./numbers"), exports);
|
|
22
|
+
__exportStar(require("./operations"), exports);
|
|
22
23
|
__exportStar(require("./random"), exports);
|
|
23
24
|
__exportStar(require("./time"), exports);
|
|
24
25
|
__exportStar(require("./tokens"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,4CAAyB;AACzB,2CAAwB;AACxB,yCAAsB;AACtB,2CAAwB;AACxB,gDAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,4CAAyB;AACzB,+CAA4B;AAC5B,2CAAwB;AACxB,yCAAsB;AACtB,2CAAwB;AACxB,gDAA6B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Operation } from '../types/intents';
|
|
2
|
+
import { OpType } from '../validators/intents';
|
|
3
|
+
export declare function isSwap(data: Operation): data is Operation & {
|
|
4
|
+
opType: typeof OpType.Swap | typeof OpType.CrossChainSwap;
|
|
5
|
+
};
|
|
6
|
+
export declare function isSingleChainSwap(operation: Operation): operation is Operation & {
|
|
7
|
+
opType: typeof OpType.Swap;
|
|
8
|
+
};
|
|
9
|
+
export declare function isCrossChainSwap(operation: Operation): operation is Operation & {
|
|
10
|
+
opType: typeof OpType.CrossChainSwap;
|
|
11
|
+
};
|
|
12
|
+
export declare function isTransfer(data: Operation): data is Operation & {
|
|
13
|
+
opType: typeof OpType.Transfer;
|
|
14
|
+
};
|
|
15
|
+
export declare function isEvmCall(data: Operation): data is Operation & {
|
|
16
|
+
opType: typeof OpType.EvmCall;
|
|
17
|
+
};
|
|
18
|
+
export declare function isEvmDynamicCall(data: Operation): data is Operation & {
|
|
19
|
+
opType: typeof OpType.EvmDynamicCall;
|
|
20
|
+
};
|
|
21
|
+
export declare function isSvmCall(data: Operation): data is Operation & {
|
|
22
|
+
opType: typeof OpType.SvmCall;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C,wBAAgB,MAAM,CACpB,IAAI,EAAE,SAAS,GACd,IAAI,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,IAAI,GAAG,OAAO,MAAM,CAAC,cAAc,CAAA;CAAE,CAEnF;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,IAAI,CAAA;CAAE,CAE/G;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,GACnB,SAAS,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,cAAc,CAAA;CAAE,CAEnE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,QAAQ,CAAA;CAAE,CAElG;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,OAAO,CAAA;CAAE,CAEhG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,cAAc,CAAA;CAAE,CAE9G;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,IAAI,SAAS,GAAG;IAAE,MAAM,EAAE,OAAO,MAAM,CAAC,OAAO,CAAA;CAAE,CAEhG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isSwap = isSwap;
|
|
4
|
+
exports.isSingleChainSwap = isSingleChainSwap;
|
|
5
|
+
exports.isCrossChainSwap = isCrossChainSwap;
|
|
6
|
+
exports.isTransfer = isTransfer;
|
|
7
|
+
exports.isEvmCall = isEvmCall;
|
|
8
|
+
exports.isEvmDynamicCall = isEvmDynamicCall;
|
|
9
|
+
exports.isSvmCall = isSvmCall;
|
|
10
|
+
const intents_1 = require("../validators/intents");
|
|
11
|
+
function isSwap(data) {
|
|
12
|
+
return isCrossChainSwap(data) || isSingleChainSwap(data);
|
|
13
|
+
}
|
|
14
|
+
function isSingleChainSwap(operation) {
|
|
15
|
+
return operation.opType === intents_1.OpType.Swap;
|
|
16
|
+
}
|
|
17
|
+
function isCrossChainSwap(operation) {
|
|
18
|
+
return operation.opType === intents_1.OpType.CrossChainSwap;
|
|
19
|
+
}
|
|
20
|
+
function isTransfer(data) {
|
|
21
|
+
return data.opType === intents_1.OpType.Transfer;
|
|
22
|
+
}
|
|
23
|
+
function isEvmCall(data) {
|
|
24
|
+
return data.opType === intents_1.OpType.EvmCall;
|
|
25
|
+
}
|
|
26
|
+
function isEvmDynamicCall(data) {
|
|
27
|
+
return data.opType === intents_1.OpType.EvmDynamicCall;
|
|
28
|
+
}
|
|
29
|
+
function isSvmCall(data) {
|
|
30
|
+
return data.opType === intents_1.OpType.SvmCall;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/shared/utils/operations.ts"],"names":[],"mappings":";;AAGA,wBAIC;AAED,8CAEC;AAED,4CAIC;AAED,gCAEC;AAED,8BAEC;AAED,4CAEC;AAED,8BAEC;AAhCD,mDAA8C;AAE9C,SAAgB,MAAM,CACpB,IAAe;IAEf,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAA;AAC1D,CAAC;AAED,SAAgB,iBAAiB,CAAC,SAAoB;IACpD,OAAO,SAAS,CAAC,MAAM,KAAK,gBAAM,CAAC,IAAI,CAAA;AACzC,CAAC;AAED,SAAgB,gBAAgB,CAC9B,SAAoB;IAEpB,OAAO,SAAS,CAAC,MAAM,KAAK,gBAAM,CAAC,cAAc,CAAA;AACnD,CAAC;AAED,SAAgB,UAAU,CAAC,IAAe;IACxC,OAAO,IAAI,CAAC,MAAM,KAAK,gBAAM,CAAC,QAAQ,CAAA;AACxC,CAAC;AAED,SAAgB,SAAS,CAAC,IAAe;IACvC,OAAO,IAAI,CAAC,MAAM,KAAK,gBAAM,CAAC,OAAO,CAAA;AACvC,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAe;IAC9C,OAAO,IAAI,CAAC,MAAM,KAAK,gBAAM,CAAC,cAAc,CAAA;AAC9C,CAAC;AAED,SAAgB,SAAS,CAAC,IAAe;IACvC,OAAO,IAAI,CAAC,MAAM,KAAK,gBAAM,CAAC,OAAO,CAAA;AACvC,CAAC"}
|
|
@@ -41,14 +41,14 @@ export declare const CronExecutionValidator: z.ZodObject<z.objectUtil.extendShap
|
|
|
41
41
|
timestamp: z.ZodNumber;
|
|
42
42
|
}>, "strip", z.ZodTypeAny, {
|
|
43
43
|
triggerSig: string;
|
|
44
|
-
timestamp: number;
|
|
45
44
|
triggerType: 0 | 1 | 2;
|
|
46
45
|
triggerData: string;
|
|
46
|
+
timestamp: number;
|
|
47
47
|
}, {
|
|
48
48
|
triggerSig: string;
|
|
49
|
-
timestamp: number;
|
|
50
49
|
triggerType: 0 | 1 | 2;
|
|
51
50
|
triggerData: string;
|
|
51
|
+
timestamp: number;
|
|
52
52
|
}>;
|
|
53
53
|
export declare const EventExecutionDataValidator: z.ZodObject<{
|
|
54
54
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -60,16 +60,16 @@ export declare const EventExecutionDataValidator: z.ZodObject<{
|
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
61
|
address: string;
|
|
62
62
|
chainId: number;
|
|
63
|
-
topics: string[];
|
|
64
63
|
blockHash: string;
|
|
65
64
|
index: number;
|
|
65
|
+
topics: string[];
|
|
66
66
|
eventData: string;
|
|
67
67
|
}, {
|
|
68
68
|
address: string;
|
|
69
69
|
chainId: number;
|
|
70
|
-
topics: string[];
|
|
71
70
|
blockHash: string;
|
|
72
71
|
index: number;
|
|
72
|
+
topics: string[];
|
|
73
73
|
eventData: string;
|
|
74
74
|
}>;
|
|
75
75
|
export declare const EventExecutionValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -88,24 +88,24 @@ export declare const EventExecutionValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
88
88
|
topics: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">;
|
|
89
89
|
eventData: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
90
90
|
}>, "strip", z.ZodTypeAny, {
|
|
91
|
-
triggerSig: string;
|
|
92
91
|
address: string;
|
|
93
92
|
chainId: number;
|
|
94
|
-
|
|
93
|
+
triggerSig: string;
|
|
95
94
|
triggerType: 0 | 1 | 2;
|
|
96
95
|
triggerData: string;
|
|
97
96
|
blockHash: string;
|
|
98
97
|
index: number;
|
|
98
|
+
topics: string[];
|
|
99
99
|
eventData: string;
|
|
100
100
|
}, {
|
|
101
|
-
triggerSig: string;
|
|
102
101
|
address: string;
|
|
103
102
|
chainId: number;
|
|
104
|
-
|
|
103
|
+
triggerSig: string;
|
|
105
104
|
triggerType: 0 | 1 | 2;
|
|
106
105
|
triggerData: string;
|
|
107
106
|
blockHash: string;
|
|
108
107
|
index: number;
|
|
108
|
+
topics: string[];
|
|
109
109
|
eventData: string;
|
|
110
110
|
}>;
|
|
111
111
|
export declare const OnceExecutionDataValidator: z.ZodObject<{
|
|
@@ -127,13 +127,13 @@ export declare const OnceExecutionValidator: z.ZodObject<z.objectUtil.extendShap
|
|
|
127
127
|
startDate: z.ZodNumber;
|
|
128
128
|
}>, "strip", z.ZodTypeAny, {
|
|
129
129
|
triggerSig: string;
|
|
130
|
-
startDate: number;
|
|
131
130
|
triggerType: 0 | 1 | 2;
|
|
132
131
|
triggerData: string;
|
|
132
|
+
startDate: number;
|
|
133
133
|
}, {
|
|
134
134
|
triggerSig: string;
|
|
135
|
-
startDate: number;
|
|
136
135
|
triggerType: 0 | 1 | 2;
|
|
137
136
|
triggerData: string;
|
|
137
|
+
startDate: number;
|
|
138
138
|
}>;
|
|
139
139
|
//# sourceMappingURL=executions.d.ts.map
|