@mimicprotocol/sdk 0.0.1-rc.2 → 0.0.1-rc.20
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/constants.d.ts +17 -2
- package/dist/axia/constants.d.ts.map +1 -1
- package/dist/axia/constants.js +20 -2
- package/dist/axia/constants.js.map +1 -1
- package/dist/axia/types.d.ts +3 -1
- package/dist/axia/types.d.ts.map +1 -1
- package/dist/axia/validators.d.ts +1789 -442
- package/dist/axia/validators.d.ts.map +1 -1
- package/dist/axia/validators.js +28 -11
- package/dist/axia/validators.js.map +1 -1
- package/dist/client/core/auth.d.ts +2 -1
- package/dist/client/core/auth.d.ts.map +1 -1
- package/dist/client/core/auth.js +3 -2
- package/dist/client/core/auth.js.map +1 -1
- package/dist/client/core/config.d.ts +2 -2
- package/dist/client/core/config.d.ts.map +1 -1
- package/dist/client/core/config.js +7 -5
- package/dist/client/core/config.js.map +1 -1
- package/dist/client/domains/BalancesClient.d.ts +8 -0
- package/dist/client/domains/BalancesClient.d.ts.map +1 -0
- package/dist/client/domains/BalancesClient.js +17 -0
- package/dist/client/domains/BalancesClient.js.map +1 -0
- package/dist/client/domains/Client.d.ts.map +1 -1
- package/dist/client/domains/Client.js +4 -2
- package/dist/client/domains/Client.js.map +1 -1
- package/dist/client/domains/ConfigsClient.d.ts +4 -1
- package/dist/client/domains/ConfigsClient.d.ts.map +1 -1
- package/dist/client/domains/ConfigsClient.js +33 -3
- package/dist/client/domains/ConfigsClient.js.map +1 -1
- package/dist/client/domains/IntentsClient.d.ts +22 -5
- package/dist/client/domains/IntentsClient.d.ts.map +1 -1
- package/dist/client/domains/IntentsClient.js +26 -4
- package/dist/client/domains/IntentsClient.js.map +1 -1
- package/dist/client/domains/TasksClient.d.ts.map +1 -1
- package/dist/client/domains/TasksClient.js +1 -4
- package/dist/client/domains/TasksClient.js.map +1 -1
- package/dist/client/domains/UsersClient.d.ts +16 -0
- package/dist/client/domains/UsersClient.d.ts.map +1 -0
- package/dist/client/domains/UsersClient.js +45 -0
- package/dist/client/domains/UsersClient.js.map +1 -0
- package/dist/client/domains/index.d.ts +2 -0
- package/dist/client/domains/index.d.ts.map +1 -1
- package/dist/client/domains/index.js +5 -1
- package/dist/client/domains/index.js.map +1 -1
- package/dist/client/index.d.ts +7 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +25 -6
- package/dist/client/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/oracle/eip712Types.d.ts +44 -0
- package/dist/oracle/eip712Types.d.ts.map +1 -1
- package/dist/oracle/eip712Types.js +45 -3
- package/dist/oracle/eip712Types.js.map +1 -1
- package/dist/oracle/types.d.ts +15 -1
- package/dist/oracle/types.d.ts.map +1 -1
- package/dist/oracle/validators.d.ts +799 -177
- package/dist/oracle/validators.d.ts.map +1 -1
- package/dist/oracle/validators.js +36 -6
- package/dist/oracle/validators.js.map +1 -1
- package/dist/registry/AuthSigner.d.ts +5 -4
- package/dist/registry/AuthSigner.d.ts.map +1 -1
- package/dist/registry/AuthSigner.js +6 -5
- package/dist/registry/AuthSigner.js.map +1 -1
- package/dist/registry/ConfigSigner.d.ts +1 -1
- package/dist/registry/ConfigSigner.d.ts.map +1 -1
- package/dist/registry/ConfigSigner.js +4 -2
- package/dist/registry/ConfigSigner.js.map +1 -1
- package/dist/registry/eip712Types.d.ts.map +1 -1
- package/dist/registry/eip712Types.js +3 -1
- package/dist/registry/eip712Types.js.map +1 -1
- package/dist/registry/types.d.ts +7 -1
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/types.js.map +1 -1
- package/dist/registry/validations.d.ts +2 -2
- package/dist/registry/validations.d.ts.map +1 -1
- package/dist/registry/validations.js +5 -5
- package/dist/registry/validations.js.map +1 -1
- package/dist/registry/validators.d.ts +242 -128
- package/dist/registry/validators.d.ts.map +1 -1
- package/dist/registry/validators.js +37 -12
- package/dist/registry/validators.js.map +1 -1
- package/dist/relayer/eip712Types.d.ts +4 -0
- package/dist/relayer/eip712Types.d.ts.map +1 -1
- package/dist/relayer/types.d.ts +2 -1
- package/dist/relayer/types.d.ts.map +1 -1
- package/dist/relayer/validators.d.ts +1623 -305
- package/dist/relayer/validators.d.ts.map +1 -1
- package/dist/relayer/validators.js +7 -15
- package/dist/relayer/validators.js.map +1 -1
- package/dist/runner/validators.d.ts +675 -81
- package/dist/runner/validators.d.ts.map +1 -1
- package/dist/runner/validators.js +10 -1
- package/dist/runner/validators.js.map +1 -1
- package/dist/shared/codec/chains/evm.d.ts +9 -0
- package/dist/shared/codec/chains/evm.d.ts.map +1 -0
- package/dist/shared/codec/chains/evm.js +122 -0
- package/dist/shared/codec/chains/evm.js.map +1 -0
- package/dist/shared/codec/chains/svm.d.ts +22 -0
- package/dist/shared/codec/chains/svm.d.ts.map +1 -0
- package/dist/shared/codec/chains/svm.js +233 -0
- package/dist/shared/codec/chains/svm.js.map +1 -0
- package/dist/shared/codec/decoder.d.ts +6 -2
- package/dist/shared/codec/decoder.d.ts.map +1 -1
- package/dist/shared/codec/decoder.js +42 -44
- package/dist/shared/codec/decoder.js.map +1 -1
- package/dist/shared/codec/encoder.d.ts +97 -4
- package/dist/shared/codec/encoder.d.ts.map +1 -1
- package/dist/shared/codec/encoder.js +32 -54
- package/dist/shared/codec/encoder.js.map +1 -1
- package/dist/shared/codec/index.d.ts +1 -0
- package/dist/shared/codec/index.d.ts.map +1 -1
- package/dist/shared/codec/index.js +14 -0
- package/dist/shared/codec/index.js.map +1 -1
- package/dist/shared/eip712Types/index.d.ts +6 -1
- package/dist/shared/eip712Types/index.d.ts.map +1 -1
- package/dist/shared/eip712Types/index.js +14 -6
- package/dist/shared/eip712Types/index.js.map +1 -1
- package/dist/shared/signer/WindowEthereumSigner.d.ts.map +1 -1
- package/dist/shared/signer/WindowEthereumSigner.js +1 -6
- package/dist/shared/signer/WindowEthereumSigner.js.map +1 -1
- package/dist/shared/types/executions.d.ts +1 -2
- package/dist/shared/types/executions.d.ts.map +1 -1
- package/dist/shared/types/index.d.ts +0 -1
- package/dist/shared/types/index.d.ts.map +1 -1
- package/dist/shared/types/index.js +0 -1
- package/dist/shared/types/index.js.map +1 -1
- package/dist/shared/types/intents.d.ts +11 -4
- package/dist/shared/types/intents.d.ts.map +1 -1
- package/dist/shared/types/primitives.d.ts +3 -1
- package/dist/shared/types/primitives.d.ts.map +1 -1
- package/dist/shared/utils/addresses.d.ts +2 -0
- package/dist/shared/utils/addresses.d.ts.map +1 -1
- package/dist/shared/utils/addresses.js +9 -0
- package/dist/shared/utils/addresses.js.map +1 -1
- package/dist/shared/utils/bytes.d.ts +2 -0
- package/dist/shared/utils/bytes.d.ts.map +1 -1
- package/dist/shared/utils/bytes.js +10 -0
- package/dist/shared/utils/bytes.js.map +1 -1
- package/dist/shared/utils/chains.d.ts +1 -0
- package/dist/shared/utils/chains.d.ts.map +1 -1
- package/dist/shared/utils/chains.js +1 -0
- package/dist/shared/utils/chains.js.map +1 -1
- 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/numbers.d.ts +7 -6
- package/dist/shared/utils/numbers.d.ts.map +1 -1
- package/dist/shared/utils/numbers.js +61 -22
- package/dist/shared/utils/numbers.js.map +1 -1
- package/dist/shared/utils/random.d.ts +4 -1
- package/dist/shared/utils/random.d.ts.map +1 -1
- package/dist/shared/utils/random.js +22 -4
- package/dist/shared/utils/random.js.map +1 -1
- package/dist/shared/utils/time.d.ts +11 -0
- package/dist/shared/utils/time.d.ts.map +1 -0
- package/dist/shared/utils/time.js +42 -0
- package/dist/shared/utils/time.js.map +1 -0
- package/dist/shared/utils/validations.d.ts +7 -1
- package/dist/shared/utils/validations.d.ts.map +1 -1
- package/dist/shared/utils/validations.js +36 -3
- package/dist/shared/utils/validations.js.map +1 -1
- package/dist/shared/validators/executions.d.ts +18 -35
- package/dist/shared/validators/executions.d.ts.map +1 -1
- package/dist/shared/validators/executions.js +4 -17
- package/dist/shared/validators/executions.js.map +1 -1
- package/dist/shared/validators/index.d.ts +0 -1
- package/dist/shared/validators/index.d.ts.map +1 -1
- package/dist/shared/validators/index.js +0 -1
- package/dist/shared/validators/index.js.map +1 -1
- package/dist/shared/validators/intents.d.ts +409 -7
- package/dist/shared/validators/intents.d.ts.map +1 -1
- package/dist/shared/validators/intents.js +35 -8
- package/dist/shared/validators/intents.js.map +1 -1
- package/dist/shared/validators/primitives.d.ts +24 -0
- package/dist/shared/validators/primitives.d.ts.map +1 -1
- package/dist/shared/validators/primitives.js +18 -5
- package/dist/shared/validators/primitives.js.map +1 -1
- package/dist/validator/ValidatorSigner.d.ts +10 -4
- package/dist/validator/ValidatorSigner.d.ts.map +1 -1
- package/dist/validator/ValidatorSigner.js +14 -8
- package/dist/validator/ValidatorSigner.js.map +1 -1
- package/dist/validator/eip712Types.d.ts.map +1 -1
- package/dist/validator/eip712Types.js +5 -2
- package/dist/validator/eip712Types.js.map +1 -1
- package/package.json +4 -1
- package/dist/shared/types/events.d.ts +0 -4
- package/dist/shared/types/events.d.ts.map +0 -1
- package/dist/shared/types/events.js +0 -3
- package/dist/shared/types/events.js.map +0 -1
- package/dist/shared/validators/events.d.ts +0 -20
- package/dist/shared/validators/events.d.ts.map +0 -1
- package/dist/shared/validators/events.js +0 -17
- package/dist/shared/validators/events.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./eip712Types"), exports);
|
|
18
|
-
__exportStar(require("./events"), exports);
|
|
19
18
|
__exportStar(require("./executions"), exports);
|
|
20
19
|
__exportStar(require("./intents"), exports);
|
|
21
20
|
__exportStar(require("./primitives"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/validators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/validators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,+CAA4B;AAC5B,4CAAyB;AACzB,+CAA4B"}
|
|
@@ -2,7 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare enum OpType {
|
|
3
3
|
Swap = 0,
|
|
4
4
|
Transfer = 1,
|
|
5
|
-
|
|
5
|
+
EvmCall = 2,
|
|
6
|
+
SvmCall = 3
|
|
6
7
|
}
|
|
7
8
|
export declare const MaxFeeValidator: z.ZodObject<{
|
|
8
9
|
token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -24,6 +25,26 @@ export declare const MaxFeesValidator: z.ZodArray<z.ZodObject<{
|
|
|
24
25
|
token: string;
|
|
25
26
|
amount: string;
|
|
26
27
|
}>, "many">;
|
|
28
|
+
export declare const IntentEventValidator: z.ZodObject<{
|
|
29
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
30
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
data: string;
|
|
33
|
+
topic: string;
|
|
34
|
+
}, {
|
|
35
|
+
data: string;
|
|
36
|
+
topic: string;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const IntentEventsValidator: z.ZodArray<z.ZodObject<{
|
|
39
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
40
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
data: string;
|
|
43
|
+
topic: string;
|
|
44
|
+
}, {
|
|
45
|
+
data: string;
|
|
46
|
+
topic: string;
|
|
47
|
+
}>, "many">;
|
|
27
48
|
export declare const IntentValidator: z.ZodObject<{
|
|
28
49
|
op: z.ZodNativeEnum<typeof OpType>;
|
|
29
50
|
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -41,8 +62,21 @@ export declare const IntentValidator: z.ZodObject<{
|
|
|
41
62
|
token: string;
|
|
42
63
|
amount: string;
|
|
43
64
|
}>, "many">;
|
|
65
|
+
events: z.ZodArray<z.ZodObject<{
|
|
66
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
67
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
data: string;
|
|
70
|
+
topic: string;
|
|
71
|
+
}, {
|
|
72
|
+
data: string;
|
|
73
|
+
topic: string;
|
|
74
|
+
}>, "many">;
|
|
75
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
76
|
+
minValidations: z.ZodNumber;
|
|
44
77
|
}, "strip", z.ZodTypeAny, {
|
|
45
78
|
data: string;
|
|
79
|
+
configSig: string;
|
|
46
80
|
op: OpType;
|
|
47
81
|
user: string;
|
|
48
82
|
settler: string;
|
|
@@ -52,8 +86,14 @@ export declare const IntentValidator: z.ZodObject<{
|
|
|
52
86
|
token: string;
|
|
53
87
|
amount: string;
|
|
54
88
|
}[];
|
|
89
|
+
events: {
|
|
90
|
+
data: string;
|
|
91
|
+
topic: string;
|
|
92
|
+
}[];
|
|
93
|
+
minValidations: number;
|
|
55
94
|
}, {
|
|
56
95
|
data: string;
|
|
96
|
+
configSig: string;
|
|
57
97
|
op: OpType;
|
|
58
98
|
user: string;
|
|
59
99
|
settler: string;
|
|
@@ -63,6 +103,79 @@ export declare const IntentValidator: z.ZodObject<{
|
|
|
63
103
|
token: string;
|
|
64
104
|
amount: string;
|
|
65
105
|
}[];
|
|
106
|
+
events: {
|
|
107
|
+
data: string;
|
|
108
|
+
topic: string;
|
|
109
|
+
}[];
|
|
110
|
+
minValidations: number;
|
|
111
|
+
}>;
|
|
112
|
+
export declare const ValidatedIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
113
|
+
op: z.ZodNativeEnum<typeof OpType>;
|
|
114
|
+
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
115
|
+
settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
116
|
+
nonce: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
117
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
118
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
119
|
+
maxFees: z.ZodArray<z.ZodObject<{
|
|
120
|
+
token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
121
|
+
amount: z.ZodEffects<z.ZodString, string, string>;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
token: string;
|
|
124
|
+
amount: string;
|
|
125
|
+
}, {
|
|
126
|
+
token: string;
|
|
127
|
+
amount: string;
|
|
128
|
+
}>, "many">;
|
|
129
|
+
events: z.ZodArray<z.ZodObject<{
|
|
130
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
131
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
data: string;
|
|
134
|
+
topic: string;
|
|
135
|
+
}, {
|
|
136
|
+
data: string;
|
|
137
|
+
topic: string;
|
|
138
|
+
}>, "many">;
|
|
139
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
140
|
+
minValidations: z.ZodNumber;
|
|
141
|
+
}, {
|
|
142
|
+
validations: z.ZodArray<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">, "many">;
|
|
143
|
+
}>, "strip", z.ZodTypeAny, {
|
|
144
|
+
data: string;
|
|
145
|
+
configSig: string;
|
|
146
|
+
op: OpType;
|
|
147
|
+
user: string;
|
|
148
|
+
settler: string;
|
|
149
|
+
nonce: string;
|
|
150
|
+
deadline: string;
|
|
151
|
+
maxFees: {
|
|
152
|
+
token: string;
|
|
153
|
+
amount: string;
|
|
154
|
+
}[];
|
|
155
|
+
events: {
|
|
156
|
+
data: string;
|
|
157
|
+
topic: string;
|
|
158
|
+
}[];
|
|
159
|
+
minValidations: number;
|
|
160
|
+
validations: string[][];
|
|
161
|
+
}, {
|
|
162
|
+
data: string;
|
|
163
|
+
configSig: string;
|
|
164
|
+
op: OpType;
|
|
165
|
+
user: string;
|
|
166
|
+
settler: string;
|
|
167
|
+
nonce: string;
|
|
168
|
+
deadline: string;
|
|
169
|
+
maxFees: {
|
|
170
|
+
token: string;
|
|
171
|
+
amount: string;
|
|
172
|
+
}[];
|
|
173
|
+
events: {
|
|
174
|
+
data: string;
|
|
175
|
+
topic: string;
|
|
176
|
+
}[];
|
|
177
|
+
minValidations: number;
|
|
178
|
+
validations: string[][];
|
|
66
179
|
}>;
|
|
67
180
|
export declare const ProposalValidator: z.ZodObject<{
|
|
68
181
|
solver: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -171,6 +284,18 @@ export declare const SwapIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
171
284
|
token: string;
|
|
172
285
|
amount: string;
|
|
173
286
|
}>, "many">;
|
|
287
|
+
events: z.ZodArray<z.ZodObject<{
|
|
288
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
289
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
data: string;
|
|
292
|
+
topic: string;
|
|
293
|
+
}, {
|
|
294
|
+
data: string;
|
|
295
|
+
topic: string;
|
|
296
|
+
}>, "many">;
|
|
297
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
298
|
+
minValidations: z.ZodNumber;
|
|
174
299
|
}, {
|
|
175
300
|
sourceChain: z.ZodEffects<z.ZodNumber, number, number>;
|
|
176
301
|
destinationChain: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -199,6 +324,7 @@ export declare const SwapIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
199
324
|
}>, "many">;
|
|
200
325
|
}>, "strip", z.ZodTypeAny, {
|
|
201
326
|
data: string;
|
|
327
|
+
configSig: string;
|
|
202
328
|
op: OpType;
|
|
203
329
|
user: string;
|
|
204
330
|
settler: string;
|
|
@@ -208,6 +334,11 @@ export declare const SwapIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
208
334
|
token: string;
|
|
209
335
|
amount: string;
|
|
210
336
|
}[];
|
|
337
|
+
events: {
|
|
338
|
+
data: string;
|
|
339
|
+
topic: string;
|
|
340
|
+
}[];
|
|
341
|
+
minValidations: number;
|
|
211
342
|
sourceChain: number;
|
|
212
343
|
destinationChain: number;
|
|
213
344
|
tokensIn: {
|
|
@@ -221,6 +352,7 @@ export declare const SwapIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
221
352
|
}[];
|
|
222
353
|
}, {
|
|
223
354
|
data: string;
|
|
355
|
+
configSig: string;
|
|
224
356
|
op: OpType;
|
|
225
357
|
user: string;
|
|
226
358
|
settler: string;
|
|
@@ -230,6 +362,11 @@ export declare const SwapIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
230
362
|
token: string;
|
|
231
363
|
amount: string;
|
|
232
364
|
}[];
|
|
365
|
+
events: {
|
|
366
|
+
data: string;
|
|
367
|
+
topic: string;
|
|
368
|
+
}[];
|
|
369
|
+
minValidations: number;
|
|
233
370
|
sourceChain: number;
|
|
234
371
|
destinationChain: number;
|
|
235
372
|
tokensIn: {
|
|
@@ -341,6 +478,18 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
341
478
|
token: string;
|
|
342
479
|
amount: string;
|
|
343
480
|
}>, "many">;
|
|
481
|
+
events: z.ZodArray<z.ZodObject<{
|
|
482
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
483
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
484
|
+
}, "strip", z.ZodTypeAny, {
|
|
485
|
+
data: string;
|
|
486
|
+
topic: string;
|
|
487
|
+
}, {
|
|
488
|
+
data: string;
|
|
489
|
+
topic: string;
|
|
490
|
+
}>, "many">;
|
|
491
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
492
|
+
minValidations: z.ZodNumber;
|
|
344
493
|
}, {
|
|
345
494
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
346
495
|
transfers: z.ZodArray<z.ZodObject<{
|
|
@@ -359,6 +508,7 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
359
508
|
}>, "strip", z.ZodTypeAny, {
|
|
360
509
|
chainId: number;
|
|
361
510
|
data: string;
|
|
511
|
+
configSig: string;
|
|
362
512
|
op: OpType;
|
|
363
513
|
user: string;
|
|
364
514
|
settler: string;
|
|
@@ -368,6 +518,11 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
368
518
|
token: string;
|
|
369
519
|
amount: string;
|
|
370
520
|
}[];
|
|
521
|
+
events: {
|
|
522
|
+
data: string;
|
|
523
|
+
topic: string;
|
|
524
|
+
}[];
|
|
525
|
+
minValidations: number;
|
|
371
526
|
transfers: {
|
|
372
527
|
token: string;
|
|
373
528
|
amount: string;
|
|
@@ -376,6 +531,7 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
376
531
|
}, {
|
|
377
532
|
chainId: number;
|
|
378
533
|
data: string;
|
|
534
|
+
configSig: string;
|
|
379
535
|
op: OpType;
|
|
380
536
|
user: string;
|
|
381
537
|
settler: string;
|
|
@@ -385,14 +541,19 @@ export declare const TransferIntentValidator: z.ZodObject<z.objectUtil.extendSha
|
|
|
385
541
|
token: string;
|
|
386
542
|
amount: string;
|
|
387
543
|
}[];
|
|
544
|
+
events: {
|
|
545
|
+
data: string;
|
|
546
|
+
topic: string;
|
|
547
|
+
}[];
|
|
548
|
+
minValidations: number;
|
|
388
549
|
transfers: {
|
|
389
550
|
token: string;
|
|
390
551
|
amount: string;
|
|
391
552
|
recipient: string;
|
|
392
553
|
}[];
|
|
393
554
|
}>;
|
|
394
|
-
export declare const
|
|
395
|
-
target: z.ZodEffects<z.
|
|
555
|
+
export declare const EvmCallIntentCallValidator: z.ZodObject<{
|
|
556
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
396
557
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
397
558
|
value: z.ZodEffects<z.ZodString, string, string>;
|
|
398
559
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -404,10 +565,10 @@ export declare const CallIntentCallValidator: z.ZodObject<{
|
|
|
404
565
|
value: string;
|
|
405
566
|
target: string;
|
|
406
567
|
}>;
|
|
407
|
-
export declare const
|
|
568
|
+
export declare const EvmCallIntentDataValidator: z.ZodObject<{
|
|
408
569
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
409
570
|
calls: z.ZodArray<z.ZodObject<{
|
|
410
|
-
target: z.ZodEffects<z.
|
|
571
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
411
572
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
412
573
|
value: z.ZodEffects<z.ZodString, string, string>;
|
|
413
574
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -434,7 +595,7 @@ export declare const CallIntentDataValidator: z.ZodObject<{
|
|
|
434
595
|
target: string;
|
|
435
596
|
}[];
|
|
436
597
|
}>;
|
|
437
|
-
export declare const
|
|
598
|
+
export declare const EvmCallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
438
599
|
op: z.ZodNativeEnum<typeof OpType>;
|
|
439
600
|
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
440
601
|
settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -451,10 +612,22 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
451
612
|
token: string;
|
|
452
613
|
amount: string;
|
|
453
614
|
}>, "many">;
|
|
615
|
+
events: z.ZodArray<z.ZodObject<{
|
|
616
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
617
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
618
|
+
}, "strip", z.ZodTypeAny, {
|
|
619
|
+
data: string;
|
|
620
|
+
topic: string;
|
|
621
|
+
}, {
|
|
622
|
+
data: string;
|
|
623
|
+
topic: string;
|
|
624
|
+
}>, "many">;
|
|
625
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
626
|
+
minValidations: z.ZodNumber;
|
|
454
627
|
}, {
|
|
455
628
|
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
456
629
|
calls: z.ZodArray<z.ZodObject<{
|
|
457
|
-
target: z.ZodEffects<z.
|
|
630
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
458
631
|
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
459
632
|
value: z.ZodEffects<z.ZodString, string, string>;
|
|
460
633
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -469,6 +642,7 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
469
642
|
}>, "strip", z.ZodTypeAny, {
|
|
470
643
|
chainId: number;
|
|
471
644
|
data: string;
|
|
645
|
+
configSig: string;
|
|
472
646
|
op: OpType;
|
|
473
647
|
user: string;
|
|
474
648
|
settler: string;
|
|
@@ -478,6 +652,11 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
478
652
|
token: string;
|
|
479
653
|
amount: string;
|
|
480
654
|
}[];
|
|
655
|
+
events: {
|
|
656
|
+
data: string;
|
|
657
|
+
topic: string;
|
|
658
|
+
}[];
|
|
659
|
+
minValidations: number;
|
|
481
660
|
calls: {
|
|
482
661
|
data: string;
|
|
483
662
|
value: string;
|
|
@@ -486,6 +665,7 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
486
665
|
}, {
|
|
487
666
|
chainId: number;
|
|
488
667
|
data: string;
|
|
668
|
+
configSig: string;
|
|
489
669
|
op: OpType;
|
|
490
670
|
user: string;
|
|
491
671
|
settler: string;
|
|
@@ -495,10 +675,232 @@ export declare const CallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
495
675
|
token: string;
|
|
496
676
|
amount: string;
|
|
497
677
|
}[];
|
|
678
|
+
events: {
|
|
679
|
+
data: string;
|
|
680
|
+
topic: string;
|
|
681
|
+
}[];
|
|
682
|
+
minValidations: number;
|
|
498
683
|
calls: {
|
|
499
684
|
data: string;
|
|
500
685
|
value: string;
|
|
501
686
|
target: string;
|
|
502
687
|
}[];
|
|
503
688
|
}>;
|
|
689
|
+
export declare const SvmAccountMetaValidator: z.ZodObject<{
|
|
690
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
691
|
+
isSigner: z.ZodBoolean;
|
|
692
|
+
isWritable: z.ZodBoolean;
|
|
693
|
+
}, "strip", z.ZodTypeAny, {
|
|
694
|
+
pubkey: string;
|
|
695
|
+
isSigner: boolean;
|
|
696
|
+
isWritable: boolean;
|
|
697
|
+
}, {
|
|
698
|
+
pubkey: string;
|
|
699
|
+
isSigner: boolean;
|
|
700
|
+
isWritable: boolean;
|
|
701
|
+
}>;
|
|
702
|
+
export declare const SvmCallIntentInstructionValidator: z.ZodObject<{
|
|
703
|
+
programId: z.ZodEffects<z.ZodString, string, string>;
|
|
704
|
+
accountsMeta: z.ZodArray<z.ZodObject<{
|
|
705
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
706
|
+
isSigner: z.ZodBoolean;
|
|
707
|
+
isWritable: z.ZodBoolean;
|
|
708
|
+
}, "strip", z.ZodTypeAny, {
|
|
709
|
+
pubkey: string;
|
|
710
|
+
isSigner: boolean;
|
|
711
|
+
isWritable: boolean;
|
|
712
|
+
}, {
|
|
713
|
+
pubkey: string;
|
|
714
|
+
isSigner: boolean;
|
|
715
|
+
isWritable: boolean;
|
|
716
|
+
}>, "many">;
|
|
717
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
718
|
+
}, "strip", z.ZodTypeAny, {
|
|
719
|
+
data: string;
|
|
720
|
+
programId: string;
|
|
721
|
+
accountsMeta: {
|
|
722
|
+
pubkey: string;
|
|
723
|
+
isSigner: boolean;
|
|
724
|
+
isWritable: boolean;
|
|
725
|
+
}[];
|
|
726
|
+
}, {
|
|
727
|
+
data: string;
|
|
728
|
+
programId: string;
|
|
729
|
+
accountsMeta: {
|
|
730
|
+
pubkey: string;
|
|
731
|
+
isSigner: boolean;
|
|
732
|
+
isWritable: boolean;
|
|
733
|
+
}[];
|
|
734
|
+
}>;
|
|
735
|
+
export declare const SvmCallIntentDataValidator: z.ZodObject<{
|
|
736
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
737
|
+
programId: z.ZodEffects<z.ZodString, string, string>;
|
|
738
|
+
accountsMeta: z.ZodArray<z.ZodObject<{
|
|
739
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
740
|
+
isSigner: z.ZodBoolean;
|
|
741
|
+
isWritable: z.ZodBoolean;
|
|
742
|
+
}, "strip", z.ZodTypeAny, {
|
|
743
|
+
pubkey: string;
|
|
744
|
+
isSigner: boolean;
|
|
745
|
+
isWritable: boolean;
|
|
746
|
+
}, {
|
|
747
|
+
pubkey: string;
|
|
748
|
+
isSigner: boolean;
|
|
749
|
+
isWritable: boolean;
|
|
750
|
+
}>, "many">;
|
|
751
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
data: string;
|
|
754
|
+
programId: string;
|
|
755
|
+
accountsMeta: {
|
|
756
|
+
pubkey: string;
|
|
757
|
+
isSigner: boolean;
|
|
758
|
+
isWritable: boolean;
|
|
759
|
+
}[];
|
|
760
|
+
}, {
|
|
761
|
+
data: string;
|
|
762
|
+
programId: string;
|
|
763
|
+
accountsMeta: {
|
|
764
|
+
pubkey: string;
|
|
765
|
+
isSigner: boolean;
|
|
766
|
+
isWritable: boolean;
|
|
767
|
+
}[];
|
|
768
|
+
}>, "many">;
|
|
769
|
+
}, "strip", z.ZodTypeAny, {
|
|
770
|
+
instructions: {
|
|
771
|
+
data: string;
|
|
772
|
+
programId: string;
|
|
773
|
+
accountsMeta: {
|
|
774
|
+
pubkey: string;
|
|
775
|
+
isSigner: boolean;
|
|
776
|
+
isWritable: boolean;
|
|
777
|
+
}[];
|
|
778
|
+
}[];
|
|
779
|
+
}, {
|
|
780
|
+
instructions: {
|
|
781
|
+
data: string;
|
|
782
|
+
programId: string;
|
|
783
|
+
accountsMeta: {
|
|
784
|
+
pubkey: string;
|
|
785
|
+
isSigner: boolean;
|
|
786
|
+
isWritable: boolean;
|
|
787
|
+
}[];
|
|
788
|
+
}[];
|
|
789
|
+
}>;
|
|
790
|
+
export declare const SvmCallIntentValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
791
|
+
op: z.ZodNativeEnum<typeof OpType>;
|
|
792
|
+
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
793
|
+
settler: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
794
|
+
nonce: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
795
|
+
deadline: z.ZodEffects<z.ZodString, string, string>;
|
|
796
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
797
|
+
maxFees: z.ZodArray<z.ZodObject<{
|
|
798
|
+
token: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
799
|
+
amount: z.ZodEffects<z.ZodString, string, string>;
|
|
800
|
+
}, "strip", z.ZodTypeAny, {
|
|
801
|
+
token: string;
|
|
802
|
+
amount: string;
|
|
803
|
+
}, {
|
|
804
|
+
token: string;
|
|
805
|
+
amount: string;
|
|
806
|
+
}>, "many">;
|
|
807
|
+
events: z.ZodArray<z.ZodObject<{
|
|
808
|
+
topic: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
809
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
810
|
+
}, "strip", z.ZodTypeAny, {
|
|
811
|
+
data: string;
|
|
812
|
+
topic: string;
|
|
813
|
+
}, {
|
|
814
|
+
data: string;
|
|
815
|
+
topic: string;
|
|
816
|
+
}>, "many">;
|
|
817
|
+
configSig: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
818
|
+
minValidations: z.ZodNumber;
|
|
819
|
+
}, {
|
|
820
|
+
instructions: z.ZodArray<z.ZodObject<{
|
|
821
|
+
programId: z.ZodEffects<z.ZodString, string, string>;
|
|
822
|
+
accountsMeta: z.ZodArray<z.ZodObject<{
|
|
823
|
+
pubkey: z.ZodEffects<z.ZodString, string, string>;
|
|
824
|
+
isSigner: z.ZodBoolean;
|
|
825
|
+
isWritable: z.ZodBoolean;
|
|
826
|
+
}, "strip", z.ZodTypeAny, {
|
|
827
|
+
pubkey: string;
|
|
828
|
+
isSigner: boolean;
|
|
829
|
+
isWritable: boolean;
|
|
830
|
+
}, {
|
|
831
|
+
pubkey: string;
|
|
832
|
+
isSigner: boolean;
|
|
833
|
+
isWritable: boolean;
|
|
834
|
+
}>, "many">;
|
|
835
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
836
|
+
}, "strip", z.ZodTypeAny, {
|
|
837
|
+
data: string;
|
|
838
|
+
programId: string;
|
|
839
|
+
accountsMeta: {
|
|
840
|
+
pubkey: string;
|
|
841
|
+
isSigner: boolean;
|
|
842
|
+
isWritable: boolean;
|
|
843
|
+
}[];
|
|
844
|
+
}, {
|
|
845
|
+
data: string;
|
|
846
|
+
programId: string;
|
|
847
|
+
accountsMeta: {
|
|
848
|
+
pubkey: string;
|
|
849
|
+
isSigner: boolean;
|
|
850
|
+
isWritable: boolean;
|
|
851
|
+
}[];
|
|
852
|
+
}>, "many">;
|
|
853
|
+
}>, "strip", z.ZodTypeAny, {
|
|
854
|
+
data: string;
|
|
855
|
+
configSig: string;
|
|
856
|
+
op: OpType;
|
|
857
|
+
user: string;
|
|
858
|
+
settler: string;
|
|
859
|
+
nonce: string;
|
|
860
|
+
deadline: string;
|
|
861
|
+
maxFees: {
|
|
862
|
+
token: string;
|
|
863
|
+
amount: string;
|
|
864
|
+
}[];
|
|
865
|
+
events: {
|
|
866
|
+
data: string;
|
|
867
|
+
topic: string;
|
|
868
|
+
}[];
|
|
869
|
+
minValidations: number;
|
|
870
|
+
instructions: {
|
|
871
|
+
data: string;
|
|
872
|
+
programId: string;
|
|
873
|
+
accountsMeta: {
|
|
874
|
+
pubkey: string;
|
|
875
|
+
isSigner: boolean;
|
|
876
|
+
isWritable: boolean;
|
|
877
|
+
}[];
|
|
878
|
+
}[];
|
|
879
|
+
}, {
|
|
880
|
+
data: string;
|
|
881
|
+
configSig: string;
|
|
882
|
+
op: OpType;
|
|
883
|
+
user: string;
|
|
884
|
+
settler: string;
|
|
885
|
+
nonce: string;
|
|
886
|
+
deadline: string;
|
|
887
|
+
maxFees: {
|
|
888
|
+
token: string;
|
|
889
|
+
amount: string;
|
|
890
|
+
}[];
|
|
891
|
+
events: {
|
|
892
|
+
data: string;
|
|
893
|
+
topic: string;
|
|
894
|
+
}[];
|
|
895
|
+
minValidations: number;
|
|
896
|
+
instructions: {
|
|
897
|
+
data: string;
|
|
898
|
+
programId: string;
|
|
899
|
+
accountsMeta: {
|
|
900
|
+
pubkey: string;
|
|
901
|
+
isSigner: boolean;
|
|
902
|
+
isWritable: boolean;
|
|
903
|
+
}[];
|
|
904
|
+
}[];
|
|
905
|
+
}>;
|
|
504
906
|
//# sourceMappingURL=intents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../../src/shared/validators/intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../../src/shared/validators/intents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAavB,oBAAY,MAAM;IAChB,IAAI,IAAA;IACJ,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,OAAO,IAAA;CACR;AAED,eAAO,MAAM,eAAe;;;;;;;;;EAG1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;WAA2B,CAAA;AAExD,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;WAAgC,CAAA;AAElE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEnC,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAA;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;EAGrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAItC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKlC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiD,CAAA;AAEjF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;EAAqD,CAAA;AAIvF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;EAI1C,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqD,CAAA;AAIzF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGrC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAA;AAIvF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI5C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAA"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SvmCallIntentValidator = exports.SvmCallIntentDataValidator = exports.SvmCallIntentInstructionValidator = exports.SvmAccountMetaValidator = exports.EvmCallIntentValidator = exports.EvmCallIntentDataValidator = exports.EvmCallIntentCallValidator = exports.TransferIntentValidator = exports.TransferIntentDataValidator = exports.TransferIntentTransferValidator = exports.SwapProposalValidator = exports.SwapProposalDataValidator = exports.SwapIntentValidator = exports.SwapIntentDataValidator = exports.SwapIntentTokenOutValidator = exports.SwapIntentTokenInValidator = exports.ProposalValidator = exports.ValidatedIntentValidator = exports.IntentValidator = exports.IntentEventsValidator = exports.IntentEventValidator = exports.MaxFeesValidator = exports.MaxFeeValidator = exports.OpType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const primitives_1 = require("./primitives");
|
|
6
6
|
var OpType;
|
|
7
7
|
(function (OpType) {
|
|
8
8
|
OpType[OpType["Swap"] = 0] = "Swap";
|
|
9
9
|
OpType[OpType["Transfer"] = 1] = "Transfer";
|
|
10
|
-
OpType[OpType["
|
|
10
|
+
OpType[OpType["EvmCall"] = 2] = "EvmCall";
|
|
11
|
+
OpType[OpType["SvmCall"] = 3] = "SvmCall";
|
|
11
12
|
})(OpType || (exports.OpType = OpType = {}));
|
|
12
13
|
exports.MaxFeeValidator = zod_1.z.object({
|
|
13
14
|
token: primitives_1.AddressValidator,
|
|
14
15
|
amount: primitives_1.BigIntegerValidator,
|
|
15
16
|
});
|
|
16
17
|
exports.MaxFeesValidator = zod_1.z.array(exports.MaxFeeValidator);
|
|
18
|
+
exports.IntentEventValidator = zod_1.z.object({
|
|
19
|
+
topic: primitives_1.HexValidator,
|
|
20
|
+
data: primitives_1.HexValidator,
|
|
21
|
+
});
|
|
22
|
+
exports.IntentEventsValidator = zod_1.z.array(exports.IntentEventValidator);
|
|
17
23
|
exports.IntentValidator = zod_1.z.object({
|
|
18
24
|
op: zod_1.z.nativeEnum(OpType),
|
|
19
25
|
user: primitives_1.AddressValidator,
|
|
@@ -22,6 +28,12 @@ exports.IntentValidator = zod_1.z.object({
|
|
|
22
28
|
deadline: primitives_1.BigIntegerValidator,
|
|
23
29
|
data: primitives_1.HexValidator,
|
|
24
30
|
maxFees: exports.MaxFeesValidator,
|
|
31
|
+
events: exports.IntentEventsValidator,
|
|
32
|
+
configSig: primitives_1.SignatureValidator,
|
|
33
|
+
minValidations: primitives_1.PositiveNumberValidator,
|
|
34
|
+
});
|
|
35
|
+
exports.ValidatedIntentValidator = exports.IntentValidator.extend({
|
|
36
|
+
validations: zod_1.z.array(zod_1.z.array(primitives_1.SignatureValidator)).length(2),
|
|
25
37
|
});
|
|
26
38
|
exports.ProposalValidator = zod_1.z.object({
|
|
27
39
|
solver: primitives_1.AddressValidator,
|
|
@@ -63,15 +75,30 @@ exports.TransferIntentDataValidator = zod_1.z.object({
|
|
|
63
75
|
transfers: zod_1.z.array(exports.TransferIntentTransferValidator),
|
|
64
76
|
});
|
|
65
77
|
exports.TransferIntentValidator = exports.IntentValidator.merge(exports.TransferIntentDataValidator);
|
|
66
|
-
// === CALL ===
|
|
67
|
-
exports.
|
|
68
|
-
target: primitives_1.
|
|
78
|
+
// === EVM CALL ===
|
|
79
|
+
exports.EvmCallIntentCallValidator = zod_1.z.object({
|
|
80
|
+
target: primitives_1.EvmAddressValidator,
|
|
69
81
|
data: primitives_1.HexValidator,
|
|
70
82
|
value: primitives_1.BigIntegerValidator,
|
|
71
83
|
});
|
|
72
|
-
exports.
|
|
84
|
+
exports.EvmCallIntentDataValidator = zod_1.z.object({
|
|
73
85
|
chainId: primitives_1.ChainIdValidator,
|
|
74
|
-
calls: zod_1.z.array(exports.
|
|
86
|
+
calls: zod_1.z.array(exports.EvmCallIntentCallValidator),
|
|
87
|
+
});
|
|
88
|
+
exports.EvmCallIntentValidator = exports.IntentValidator.merge(exports.EvmCallIntentDataValidator);
|
|
89
|
+
// === SVM CALL ===
|
|
90
|
+
exports.SvmAccountMetaValidator = zod_1.z.object({
|
|
91
|
+
pubkey: primitives_1.SvmAddressValidator,
|
|
92
|
+
isSigner: zod_1.z.boolean(),
|
|
93
|
+
isWritable: zod_1.z.boolean(),
|
|
94
|
+
});
|
|
95
|
+
exports.SvmCallIntentInstructionValidator = zod_1.z.object({
|
|
96
|
+
programId: primitives_1.SvmAddressValidator,
|
|
97
|
+
accountsMeta: zod_1.z.array(exports.SvmAccountMetaValidator),
|
|
98
|
+
data: primitives_1.HexValidator,
|
|
99
|
+
});
|
|
100
|
+
exports.SvmCallIntentDataValidator = zod_1.z.object({
|
|
101
|
+
instructions: zod_1.z.array(exports.SvmCallIntentInstructionValidator),
|
|
75
102
|
});
|
|
76
|
-
exports.
|
|
103
|
+
exports.SvmCallIntentValidator = exports.IntentValidator.merge(exports.SvmCallIntentDataValidator);
|
|
77
104
|
//# sourceMappingURL=intents.js.map
|