@mimicprotocol/sdk 0.0.1-rc.1 → 0.0.1-rc.2
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 +1 -0
- package/dist/axia/constants.d.ts.map +1 -1
- package/dist/axia/constants.js +2 -1
- package/dist/axia/constants.js.map +1 -1
- package/dist/axia/types.d.ts +2 -1
- package/dist/axia/types.d.ts.map +1 -1
- package/dist/axia/validators.d.ts +44 -0
- package/dist/axia/validators.d.ts.map +1 -1
- package/dist/axia/validators.js +10 -1
- package/dist/axia/validators.js.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 +782 -0
- package/dist/relayer/validators.d.ts.map +1 -1
- package/dist/relayer/validators.js +12 -11
- package/dist/relayer/validators.js.map +1 -1
- package/dist/runner/validators.d.ts +453 -3
- package/dist/runner/validators.d.ts.map +1 -1
- package/dist/runner/validators.js +3 -1
- package/dist/runner/validators.js.map +1 -1
- package/dist/shared/codec/encoder.d.ts +18 -1
- package/dist/shared/codec/encoder.d.ts.map +1 -1
- package/dist/shared/codec/encoder.js +49 -5
- package/dist/shared/codec/encoder.js.map +1 -1
- package/dist/shared/utils/addresses.d.ts +0 -3
- package/dist/shared/utils/addresses.d.ts.map +1 -1
- package/dist/shared/utils/addresses.js +1 -7
- package/dist/shared/utils/addresses.js.map +1 -1
- package/dist/shared/utils/chains.d.ts +1 -1
- package/dist/shared/utils/chains.js +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/tokens.d.ts +7 -0
- package/dist/shared/utils/tokens.d.ts.map +1 -0
- package/dist/shared/utils/tokens.js +16 -0
- package/dist/shared/utils/tokens.js.map +1 -0
- package/dist/validator/ValidatorSigner.d.ts +10 -0
- package/dist/validator/ValidatorSigner.d.ts.map +1 -0
- package/dist/validator/ValidatorSigner.js +27 -0
- package/dist/validator/ValidatorSigner.js.map +1 -0
- package/dist/validator/eip712Types.d.ts +17 -0
- package/dist/validator/eip712Types.d.ts.map +1 -0
- package/dist/validator/eip712Types.js +14 -0
- package/dist/validator/eip712Types.js.map +1 -0
- package/dist/validator/index.d.ts +2 -0
- package/dist/validator/index.d.ts.map +1 -1
- package/dist/validator/index.js +2 -0
- package/dist/validator/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAA;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAcvB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAA;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO1C,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelayerExecutionResultValidator = exports.RunnerExecutionResultValidator = exports.QueueExecutionValidator = void 0;
|
|
3
|
+
exports.RelayerExecutionResultValidator = exports.RunnerExecutionResultValidator = exports.RunnerExecutionResultDataValidator = exports.QueueExecutionValidator = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const axia_1 = require("../axia");
|
|
6
6
|
const oracle_1 = require("../oracle");
|
|
@@ -11,19 +11,20 @@ exports.QueueExecutionValidator = zod_1.z.object({
|
|
|
11
11
|
logs: zod_1.z.array(validators_1.StringValidator).optional(),
|
|
12
12
|
errorLogs: zod_1.z.array(validators_1.StringValidator).optional(),
|
|
13
13
|
});
|
|
14
|
+
exports.RunnerExecutionResultDataValidator = zod_1.z.object({
|
|
15
|
+
timestamp: shared_1.TimestampValidator,
|
|
16
|
+
fuelUsed: validators_1.PositiveIntegerValidator,
|
|
17
|
+
inputs: zod_1.z.array(oracle_1.OracleResponseValidator),
|
|
18
|
+
outputs: zod_1.z.array(zod_1.z.union([
|
|
19
|
+
shared_1.SwapIntentValidator.omit({ data: true }),
|
|
20
|
+
shared_1.TransferIntentValidator.omit({ data: true }),
|
|
21
|
+
shared_1.CallIntentValidator.omit({ data: true }),
|
|
22
|
+
])),
|
|
23
|
+
});
|
|
14
24
|
const SuccessRunnerExecutionResultValidator = zod_1.z.object({
|
|
15
25
|
status: zod_1.z.literal('success'),
|
|
16
26
|
logs: zod_1.z.array(validators_1.LogValidator),
|
|
17
|
-
result:
|
|
18
|
-
timestamp: shared_1.TimestampValidator,
|
|
19
|
-
fuelUsed: validators_1.PositiveIntegerValidator,
|
|
20
|
-
inputs: zod_1.z.array(oracle_1.OracleResponseValidator),
|
|
21
|
-
outputs: zod_1.z.array(zod_1.z.union([
|
|
22
|
-
shared_1.SwapIntentValidator.omit({ data: true }),
|
|
23
|
-
shared_1.TransferIntentValidator.omit({ data: true }),
|
|
24
|
-
shared_1.CallIntentValidator.omit({ data: true }),
|
|
25
|
-
])),
|
|
26
|
-
}),
|
|
27
|
+
result: exports.RunnerExecutionResultDataValidator,
|
|
27
28
|
});
|
|
28
29
|
const ErrorRunnerExecutionResultValidator = zod_1.z.object({
|
|
29
30
|
status: zod_1.z.literal('error'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/relayer/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,kCAAkD;AAClD,sCAAmD;AACnD,sCAOkB;AAClB,qDAA8F;AAEjF,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,qBAAY;IAClB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,4BAAe,CAAC,C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CAAC;IACnD,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAC1B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAY,CAAC;CAC5B,CAAC,CAAA;AAEW,QAAA,8BAA8B,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC3E,qCAAqC;IACrC,mCAAmC;CACpC,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,qBAAY;IAClB,SAAS,EAAE,2BAAkB;IAC7B,QAAQ,EAAE,qCAAwB;IAClC,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAkB,CAAC;IACnC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAwB,CAAC;IAC1C,SAAS,EAAE,2BAAkB;CAC9B,CAAC,CAAA"}
|
|
@@ -6,23 +6,473 @@ export declare const RunExecutionRequestValidator: z.ZodObject<{
|
|
|
6
6
|
user: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
7
7
|
settlers: z.ZodString;
|
|
8
8
|
timestamp: z.ZodNumber;
|
|
9
|
-
|
|
9
|
+
oracleResponses: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
10
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
11
|
+
query: z.ZodObject<{
|
|
12
|
+
name: z.ZodLiteral<"EvmCallQuery">;
|
|
13
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
14
|
+
params: z.ZodObject<{
|
|
15
|
+
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
16
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
17
|
+
to: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
18
|
+
data: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
chainId: number;
|
|
21
|
+
to: string;
|
|
22
|
+
data: string;
|
|
23
|
+
timestamp: number;
|
|
24
|
+
}, {
|
|
25
|
+
chainId: number;
|
|
26
|
+
to: string;
|
|
27
|
+
data: string;
|
|
28
|
+
timestamp: number;
|
|
29
|
+
}>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
params: {
|
|
32
|
+
chainId: number;
|
|
33
|
+
to: string;
|
|
34
|
+
data: string;
|
|
35
|
+
timestamp: number;
|
|
36
|
+
};
|
|
37
|
+
name: "EvmCallQuery";
|
|
38
|
+
hash: string;
|
|
39
|
+
}, {
|
|
40
|
+
params: {
|
|
41
|
+
chainId: number;
|
|
42
|
+
to: string;
|
|
43
|
+
data: string;
|
|
44
|
+
timestamp: number;
|
|
45
|
+
};
|
|
46
|
+
name: "EvmCallQuery";
|
|
47
|
+
hash: string;
|
|
48
|
+
}>;
|
|
49
|
+
result: z.ZodObject<{
|
|
50
|
+
value: z.ZodString;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
value: string;
|
|
53
|
+
}, {
|
|
54
|
+
value: string;
|
|
55
|
+
}>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
result: {
|
|
58
|
+
value: string;
|
|
59
|
+
};
|
|
60
|
+
signature: string;
|
|
61
|
+
query: {
|
|
62
|
+
params: {
|
|
63
|
+
chainId: number;
|
|
64
|
+
to: string;
|
|
65
|
+
data: string;
|
|
66
|
+
timestamp: number;
|
|
67
|
+
};
|
|
68
|
+
name: "EvmCallQuery";
|
|
69
|
+
hash: string;
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
result: {
|
|
73
|
+
value: string;
|
|
74
|
+
};
|
|
75
|
+
signature: string;
|
|
76
|
+
query: {
|
|
77
|
+
params: {
|
|
78
|
+
chainId: number;
|
|
79
|
+
to: string;
|
|
80
|
+
data: string;
|
|
81
|
+
timestamp: number;
|
|
82
|
+
};
|
|
83
|
+
name: "EvmCallQuery";
|
|
84
|
+
hash: string;
|
|
85
|
+
};
|
|
86
|
+
}>, z.ZodObject<{
|
|
87
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
88
|
+
query: z.ZodObject<{
|
|
89
|
+
name: z.ZodLiteral<"TokenPriceQuery">;
|
|
90
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
91
|
+
params: z.ZodObject<{
|
|
92
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
93
|
+
token: z.ZodObject<{
|
|
94
|
+
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
95
|
+
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
chainId: number;
|
|
98
|
+
address: string;
|
|
99
|
+
}, {
|
|
100
|
+
chainId: number;
|
|
101
|
+
address: string;
|
|
102
|
+
}>;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
timestamp: number;
|
|
105
|
+
token: {
|
|
106
|
+
chainId: number;
|
|
107
|
+
address: string;
|
|
108
|
+
};
|
|
109
|
+
}, {
|
|
110
|
+
timestamp: number;
|
|
111
|
+
token: {
|
|
112
|
+
chainId: number;
|
|
113
|
+
address: string;
|
|
114
|
+
};
|
|
115
|
+
}>;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
params: {
|
|
118
|
+
timestamp: number;
|
|
119
|
+
token: {
|
|
120
|
+
chainId: number;
|
|
121
|
+
address: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
name: "TokenPriceQuery";
|
|
125
|
+
hash: string;
|
|
126
|
+
}, {
|
|
127
|
+
params: {
|
|
128
|
+
timestamp: number;
|
|
129
|
+
token: {
|
|
130
|
+
chainId: number;
|
|
131
|
+
address: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
name: "TokenPriceQuery";
|
|
135
|
+
hash: string;
|
|
136
|
+
}>;
|
|
137
|
+
result: z.ZodObject<{
|
|
138
|
+
value: z.ZodString;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
value: string;
|
|
141
|
+
}, {
|
|
142
|
+
value: string;
|
|
143
|
+
}>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
result: {
|
|
146
|
+
value: string;
|
|
147
|
+
};
|
|
148
|
+
signature: string;
|
|
149
|
+
query: {
|
|
150
|
+
params: {
|
|
151
|
+
timestamp: number;
|
|
152
|
+
token: {
|
|
153
|
+
chainId: number;
|
|
154
|
+
address: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
name: "TokenPriceQuery";
|
|
158
|
+
hash: string;
|
|
159
|
+
};
|
|
160
|
+
}, {
|
|
161
|
+
result: {
|
|
162
|
+
value: string;
|
|
163
|
+
};
|
|
164
|
+
signature: string;
|
|
165
|
+
query: {
|
|
166
|
+
params: {
|
|
167
|
+
timestamp: number;
|
|
168
|
+
token: {
|
|
169
|
+
chainId: number;
|
|
170
|
+
address: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
name: "TokenPriceQuery";
|
|
174
|
+
hash: string;
|
|
175
|
+
};
|
|
176
|
+
}>, z.ZodObject<{
|
|
177
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
178
|
+
query: z.ZodObject<{
|
|
179
|
+
name: z.ZodLiteral<"RelevantTokensQuery">;
|
|
180
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
181
|
+
params: z.ZodObject<{
|
|
182
|
+
chainIds: z.ZodArray<z.ZodEffects<z.ZodNumber, number, number>, "many">;
|
|
183
|
+
owner: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
184
|
+
usdMinAmount: z.ZodEffects<z.ZodString, string, string>;
|
|
185
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
186
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
187
|
+
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
188
|
+
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
chainId: number;
|
|
191
|
+
address: string;
|
|
192
|
+
}, {
|
|
193
|
+
chainId: number;
|
|
194
|
+
address: string;
|
|
195
|
+
}>, "many">;
|
|
196
|
+
tokenFilter: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
197
|
+
}, "strip", z.ZodTypeAny, {
|
|
198
|
+
timestamp: number;
|
|
199
|
+
tokens: {
|
|
200
|
+
chainId: number;
|
|
201
|
+
address: string;
|
|
202
|
+
}[];
|
|
203
|
+
owner: string;
|
|
204
|
+
usdMinAmount: string;
|
|
205
|
+
chainIds: number[];
|
|
206
|
+
tokenFilter: 0 | 1;
|
|
207
|
+
}, {
|
|
208
|
+
timestamp: number;
|
|
209
|
+
tokens: {
|
|
210
|
+
chainId: number;
|
|
211
|
+
address: string;
|
|
212
|
+
}[];
|
|
213
|
+
owner: string;
|
|
214
|
+
usdMinAmount: string;
|
|
215
|
+
chainIds: number[];
|
|
216
|
+
tokenFilter: 0 | 1;
|
|
217
|
+
}>;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
params: {
|
|
220
|
+
timestamp: number;
|
|
221
|
+
tokens: {
|
|
222
|
+
chainId: number;
|
|
223
|
+
address: string;
|
|
224
|
+
}[];
|
|
225
|
+
owner: string;
|
|
226
|
+
usdMinAmount: string;
|
|
227
|
+
chainIds: number[];
|
|
228
|
+
tokenFilter: 0 | 1;
|
|
229
|
+
};
|
|
230
|
+
name: "RelevantTokensQuery";
|
|
231
|
+
hash: string;
|
|
232
|
+
}, {
|
|
233
|
+
params: {
|
|
234
|
+
timestamp: number;
|
|
235
|
+
tokens: {
|
|
236
|
+
chainId: number;
|
|
237
|
+
address: string;
|
|
238
|
+
}[];
|
|
239
|
+
owner: string;
|
|
240
|
+
usdMinAmount: string;
|
|
241
|
+
chainIds: number[];
|
|
242
|
+
tokenFilter: 0 | 1;
|
|
243
|
+
};
|
|
244
|
+
name: "RelevantTokensQuery";
|
|
245
|
+
hash: string;
|
|
246
|
+
}>;
|
|
247
|
+
result: z.ZodObject<{
|
|
248
|
+
value: z.ZodArray<z.ZodObject<{
|
|
249
|
+
token: z.ZodObject<{
|
|
250
|
+
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
251
|
+
chainId: z.ZodEffects<z.ZodNumber, number, number>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
chainId: number;
|
|
254
|
+
address: string;
|
|
255
|
+
}, {
|
|
256
|
+
chainId: number;
|
|
257
|
+
address: string;
|
|
258
|
+
}>;
|
|
259
|
+
balance: z.ZodEffects<z.ZodString, string, string>;
|
|
260
|
+
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
token: {
|
|
262
|
+
chainId: number;
|
|
263
|
+
address: string;
|
|
264
|
+
};
|
|
265
|
+
balance: string;
|
|
266
|
+
}, {
|
|
267
|
+
token: {
|
|
268
|
+
chainId: number;
|
|
269
|
+
address: string;
|
|
270
|
+
};
|
|
271
|
+
balance: string;
|
|
272
|
+
}>, "many">;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
value: {
|
|
275
|
+
token: {
|
|
276
|
+
chainId: number;
|
|
277
|
+
address: string;
|
|
278
|
+
};
|
|
279
|
+
balance: string;
|
|
280
|
+
}[];
|
|
281
|
+
}, {
|
|
282
|
+
value: {
|
|
283
|
+
token: {
|
|
284
|
+
chainId: number;
|
|
285
|
+
address: string;
|
|
286
|
+
};
|
|
287
|
+
balance: string;
|
|
288
|
+
}[];
|
|
289
|
+
}>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
result: {
|
|
292
|
+
value: {
|
|
293
|
+
token: {
|
|
294
|
+
chainId: number;
|
|
295
|
+
address: string;
|
|
296
|
+
};
|
|
297
|
+
balance: string;
|
|
298
|
+
}[];
|
|
299
|
+
};
|
|
300
|
+
signature: string;
|
|
301
|
+
query: {
|
|
302
|
+
params: {
|
|
303
|
+
timestamp: number;
|
|
304
|
+
tokens: {
|
|
305
|
+
chainId: number;
|
|
306
|
+
address: string;
|
|
307
|
+
}[];
|
|
308
|
+
owner: string;
|
|
309
|
+
usdMinAmount: string;
|
|
310
|
+
chainIds: number[];
|
|
311
|
+
tokenFilter: 0 | 1;
|
|
312
|
+
};
|
|
313
|
+
name: "RelevantTokensQuery";
|
|
314
|
+
hash: string;
|
|
315
|
+
};
|
|
316
|
+
}, {
|
|
317
|
+
result: {
|
|
318
|
+
value: {
|
|
319
|
+
token: {
|
|
320
|
+
chainId: number;
|
|
321
|
+
address: string;
|
|
322
|
+
};
|
|
323
|
+
balance: string;
|
|
324
|
+
}[];
|
|
325
|
+
};
|
|
326
|
+
signature: string;
|
|
327
|
+
query: {
|
|
328
|
+
params: {
|
|
329
|
+
timestamp: number;
|
|
330
|
+
tokens: {
|
|
331
|
+
chainId: number;
|
|
332
|
+
address: string;
|
|
333
|
+
}[];
|
|
334
|
+
owner: string;
|
|
335
|
+
usdMinAmount: string;
|
|
336
|
+
chainIds: number[];
|
|
337
|
+
tokenFilter: 0 | 1;
|
|
338
|
+
};
|
|
339
|
+
name: "RelevantTokensQuery";
|
|
340
|
+
hash: string;
|
|
341
|
+
};
|
|
342
|
+
}>]>, "many">>;
|
|
343
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
10
344
|
}, "strip", z.ZodTypeAny, {
|
|
11
345
|
timestamp: number;
|
|
12
346
|
user: string;
|
|
13
347
|
configSig: string;
|
|
348
|
+
hash: string;
|
|
14
349
|
input: Record<string, unknown>;
|
|
15
350
|
callbackUrl: string;
|
|
16
351
|
settlers: string;
|
|
17
|
-
|
|
352
|
+
oracleResponses?: ({
|
|
353
|
+
result: {
|
|
354
|
+
value: string;
|
|
355
|
+
};
|
|
356
|
+
signature: string;
|
|
357
|
+
query: {
|
|
358
|
+
params: {
|
|
359
|
+
chainId: number;
|
|
360
|
+
to: string;
|
|
361
|
+
data: string;
|
|
362
|
+
timestamp: number;
|
|
363
|
+
};
|
|
364
|
+
name: "EvmCallQuery";
|
|
365
|
+
hash: string;
|
|
366
|
+
};
|
|
367
|
+
} | {
|
|
368
|
+
result: {
|
|
369
|
+
value: string;
|
|
370
|
+
};
|
|
371
|
+
signature: string;
|
|
372
|
+
query: {
|
|
373
|
+
params: {
|
|
374
|
+
timestamp: number;
|
|
375
|
+
token: {
|
|
376
|
+
chainId: number;
|
|
377
|
+
address: string;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
name: "TokenPriceQuery";
|
|
381
|
+
hash: string;
|
|
382
|
+
};
|
|
383
|
+
} | {
|
|
384
|
+
result: {
|
|
385
|
+
value: {
|
|
386
|
+
token: {
|
|
387
|
+
chainId: number;
|
|
388
|
+
address: string;
|
|
389
|
+
};
|
|
390
|
+
balance: string;
|
|
391
|
+
}[];
|
|
392
|
+
};
|
|
393
|
+
signature: string;
|
|
394
|
+
query: {
|
|
395
|
+
params: {
|
|
396
|
+
timestamp: number;
|
|
397
|
+
tokens: {
|
|
398
|
+
chainId: number;
|
|
399
|
+
address: string;
|
|
400
|
+
}[];
|
|
401
|
+
owner: string;
|
|
402
|
+
usdMinAmount: string;
|
|
403
|
+
chainIds: number[];
|
|
404
|
+
tokenFilter: 0 | 1;
|
|
405
|
+
};
|
|
406
|
+
name: "RelevantTokensQuery";
|
|
407
|
+
hash: string;
|
|
408
|
+
};
|
|
409
|
+
})[] | undefined;
|
|
18
410
|
}, {
|
|
19
411
|
timestamp: number;
|
|
20
412
|
user: string;
|
|
21
413
|
configSig: string;
|
|
414
|
+
hash: string;
|
|
22
415
|
input: Record<string, unknown>;
|
|
23
416
|
callbackUrl: string;
|
|
24
417
|
settlers: string;
|
|
25
|
-
|
|
418
|
+
oracleResponses?: ({
|
|
419
|
+
result: {
|
|
420
|
+
value: string;
|
|
421
|
+
};
|
|
422
|
+
signature: string;
|
|
423
|
+
query: {
|
|
424
|
+
params: {
|
|
425
|
+
chainId: number;
|
|
426
|
+
to: string;
|
|
427
|
+
data: string;
|
|
428
|
+
timestamp: number;
|
|
429
|
+
};
|
|
430
|
+
name: "EvmCallQuery";
|
|
431
|
+
hash: string;
|
|
432
|
+
};
|
|
433
|
+
} | {
|
|
434
|
+
result: {
|
|
435
|
+
value: string;
|
|
436
|
+
};
|
|
437
|
+
signature: string;
|
|
438
|
+
query: {
|
|
439
|
+
params: {
|
|
440
|
+
timestamp: number;
|
|
441
|
+
token: {
|
|
442
|
+
chainId: number;
|
|
443
|
+
address: string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
name: "TokenPriceQuery";
|
|
447
|
+
hash: string;
|
|
448
|
+
};
|
|
449
|
+
} | {
|
|
450
|
+
result: {
|
|
451
|
+
value: {
|
|
452
|
+
token: {
|
|
453
|
+
chainId: number;
|
|
454
|
+
address: string;
|
|
455
|
+
};
|
|
456
|
+
balance: string;
|
|
457
|
+
}[];
|
|
458
|
+
};
|
|
459
|
+
signature: string;
|
|
460
|
+
query: {
|
|
461
|
+
params: {
|
|
462
|
+
timestamp: number;
|
|
463
|
+
tokens: {
|
|
464
|
+
chainId: number;
|
|
465
|
+
address: string;
|
|
466
|
+
}[];
|
|
467
|
+
owner: string;
|
|
468
|
+
usdMinAmount: string;
|
|
469
|
+
chainIds: number[];
|
|
470
|
+
tokenFilter: 0 | 1;
|
|
471
|
+
};
|
|
472
|
+
name: "RelevantTokensQuery";
|
|
473
|
+
hash: string;
|
|
474
|
+
};
|
|
475
|
+
})[] | undefined;
|
|
26
476
|
}>;
|
|
27
477
|
export declare const RunExecutionResultValidator: z.ZodObject<{
|
|
28
478
|
stdout: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/runner/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/runner/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASvC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAA"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RunExecutionResultValidator = exports.RunExecutionRequestValidator = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const oracle_1 = require("../oracle");
|
|
5
6
|
const shared_1 = require("../shared");
|
|
6
7
|
exports.RunExecutionRequestValidator = zod_1.z.object({
|
|
7
8
|
input: zod_1.z.record(shared_1.StringValidator, zod_1.z.unknown()),
|
|
@@ -10,7 +11,8 @@ exports.RunExecutionRequestValidator = zod_1.z.object({
|
|
|
10
11
|
user: shared_1.AddressValidator,
|
|
11
12
|
settlers: shared_1.StringValidator,
|
|
12
13
|
timestamp: shared_1.TimestampValidator,
|
|
13
|
-
|
|
14
|
+
oracleResponses: zod_1.z.array(oracle_1.OracleResponseValidator).optional(),
|
|
15
|
+
hash: shared_1.HexValidator,
|
|
14
16
|
});
|
|
15
17
|
exports.RunExecutionResultValidator = zod_1.z.object({
|
|
16
18
|
stdout: shared_1.EmptyStringValidator,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/runner/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,sCAOkB;AAEL,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,wBAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;IAC7C,WAAW,EAAE,qBAAY;IACzB,SAAS,EAAE,wBAAe;IAC1B,IAAI,EAAE,yBAAgB;IACtB,QAAQ,EAAE,wBAAe;IACzB,SAAS,EAAE,2BAAkB;IAC7B,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/runner/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,sCAAmD;AACnD,sCAOkB;AAEL,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,wBAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC;IAC7C,WAAW,EAAE,qBAAY;IACzB,SAAS,EAAE,wBAAe;IAC1B,IAAI,EAAE,yBAAgB;IACtB,QAAQ,EAAE,wBAAe;IACzB,SAAS,EAAE,2BAAkB;IAC7B,eAAe,EAAE,OAAC,CAAC,KAAK,CAAC,gCAAuB,CAAC,CAAC,QAAQ,EAAE;IAC5D,IAAI,EAAE,qBAAY;CACnB,CAAC,CAAA;AAEW,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,6BAAoB;IAC5B,MAAM,EAAE,6BAAoB;CAC7B,CAAC,CAAA"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import { CallIntentData, CronExecutionData, EventExecutionData, Execution, Intent, Proposal, SwapIntentData, SwapProposalData, TransferIntentData } from '../types';
|
|
1
|
+
import { CallIntent, CallIntentData, CronExecutionData, EventExecutionData, Execution, Intent, Proposal, SwapIntent, SwapIntentData, SwapProposalData, TransferIntent, TransferIntentData } from '../types';
|
|
2
|
+
import { OpType } from '../validators';
|
|
3
|
+
export declare function hashIntent(intent: Intent): string;
|
|
2
4
|
export declare function encodeIntent(intent: Intent): string;
|
|
5
|
+
export declare function hashProposal(proposal: Proposal, intentOrHash: string | Intent): string;
|
|
3
6
|
export declare function encodeProposal(proposal: Proposal, intentOrHash: string | Intent): string;
|
|
4
7
|
export declare function encodeSwapIntent(intent: SwapIntentData): string;
|
|
5
8
|
export declare function encodeSwapProposal(proposal: SwapProposalData): string;
|
|
6
9
|
export declare function encodeTransferIntent(intent: TransferIntentData): string;
|
|
7
10
|
export declare function encodeCallIntent(intent: CallIntentData): string;
|
|
11
|
+
export declare function hashExecution(execution: Execution): string;
|
|
8
12
|
export declare function encodeExecution(execution: Execution): string;
|
|
9
13
|
export declare function encodeCronExecution(execution: CronExecutionData): string;
|
|
10
14
|
export declare function encodeEventExecution(execution: EventExecutionData): string;
|
|
15
|
+
export declare function toRawIntent(output: Omit<SwapIntent, 'data'> | Omit<TransferIntent, 'data'> | Omit<CallIntent, 'data'>): {
|
|
16
|
+
settler: string;
|
|
17
|
+
user: string;
|
|
18
|
+
nonce: string;
|
|
19
|
+
deadline: string;
|
|
20
|
+
op: OpType;
|
|
21
|
+
data: string;
|
|
22
|
+
maxFees: {
|
|
23
|
+
token: string;
|
|
24
|
+
amount: string;
|
|
25
|
+
}[];
|
|
26
|
+
hash: string;
|
|
27
|
+
};
|
|
11
28
|
//# sourceMappingURL=encoder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/shared/codec/encoder.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EAEN,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"encoder.d.ts","sourceRoot":"","sources":["../../../src/shared/codec/encoder.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EAEN,QAAQ,EACR,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBnD;AAcD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAoBxF;AAMD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAY/D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAKrE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAUvE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE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