@mimicprotocol/sdk 0.1.3 → 0.1.5
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 +341 -0
- package/dist/axia/validators.d.ts.map +1 -1
- package/dist/axia/validators.js +9 -9
- package/dist/axia/validators.js.map +1 -1
- package/dist/client/core/config.d.ts +5 -1
- package/dist/client/core/config.d.ts.map +1 -1
- package/dist/client/core/config.js +17 -7
- package/dist/client/core/config.js.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/oracle/eip712Types.d.ts +14 -0
- package/dist/oracle/eip712Types.d.ts.map +1 -1
- package/dist/oracle/eip712Types.js +9 -0
- package/dist/oracle/eip712Types.js.map +1 -1
- package/dist/oracle/types.d.ts +8 -1
- package/dist/oracle/types.d.ts.map +1 -1
- package/dist/oracle/validators.d.ts +139 -0
- package/dist/oracle/validators.d.ts.map +1 -1
- package/dist/oracle/validators.js +11 -2
- package/dist/oracle/validators.js.map +1 -1
- package/dist/registry/validators.d.ts +90 -1
- package/dist/registry/validators.d.ts.map +1 -1
- package/dist/registry/validators.js +6 -6
- package/dist/registry/validators.js.map +1 -1
- package/dist/relayer/validators.d.ts +204 -0
- package/dist/relayer/validators.d.ts.map +1 -1
- package/dist/relayer/validators.js +2 -2
- package/dist/relayer/validators.js.map +1 -1
- package/dist/runner/validators.d.ts +115 -0
- package/dist/runner/validators.d.ts.map +1 -1
- package/dist/runner/validators.js +1 -1
- package/dist/runner/validators.js.map +1 -1
- package/dist/shared/types/primitives.d.ts +3 -2
- package/dist/shared/types/primitives.d.ts.map +1 -1
- package/dist/shared/utils/constants.d.ts +2 -0
- package/dist/shared/utils/constants.d.ts.map +1 -1
- package/dist/shared/utils/constants.js +3 -1
- package/dist/shared/utils/constants.js.map +1 -1
- package/dist/shared/utils/random.d.ts +2 -0
- package/dist/shared/utils/random.d.ts.map +1 -1
- package/dist/shared/utils/random.js +8 -0
- package/dist/shared/utils/random.js.map +1 -1
- package/dist/shared/utils/validations.d.ts.map +1 -1
- package/dist/shared/utils/validations.js +1 -1
- package/dist/shared/utils/validations.js.map +1 -1
- package/dist/shared/validators/executions.d.ts.map +1 -1
- package/dist/shared/validators/executions.js +2 -2
- package/dist/shared/validators/executions.js.map +1 -1
- package/dist/shared/validators/intents.d.ts.map +1 -1
- package/dist/shared/validators/intents.js +2 -2
- package/dist/shared/validators/intents.js.map +1 -1
- package/dist/shared/validators/primitives.d.ts +2 -0
- package/dist/shared/validators/primitives.d.ts.map +1 -1
- package/dist/shared/validators/primitives.js +3 -1
- package/dist/shared/validators/primitives.js.map +1 -1
- package/dist/solver/validators.d.ts.map +1 -1
- package/dist/solver/validators.js +1 -1
- package/dist/solver/validators.js.map +1 -1
- package/package.json +1 -1
|
@@ -1516,6 +1516,69 @@ export declare const ExecutionInputValidator: z.ZodUnion<[z.ZodObject<{
|
|
|
1516
1516
|
hash: string;
|
|
1517
1517
|
};
|
|
1518
1518
|
signature: string;
|
|
1519
|
+
}>, z.ZodObject<{
|
|
1520
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1521
|
+
query: z.ZodObject<{
|
|
1522
|
+
name: z.ZodLiteral<"ApiQuery">;
|
|
1523
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
1524
|
+
params: z.ZodObject<{
|
|
1525
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
1526
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
1527
|
+
}, "strip", z.ZodTypeAny, {
|
|
1528
|
+
timestamp: number;
|
|
1529
|
+
url: string;
|
|
1530
|
+
}, {
|
|
1531
|
+
timestamp: number;
|
|
1532
|
+
url: string;
|
|
1533
|
+
}>;
|
|
1534
|
+
}, "strip", z.ZodTypeAny, {
|
|
1535
|
+
name: "ApiQuery";
|
|
1536
|
+
params: {
|
|
1537
|
+
timestamp: number;
|
|
1538
|
+
url: string;
|
|
1539
|
+
};
|
|
1540
|
+
hash: string;
|
|
1541
|
+
}, {
|
|
1542
|
+
name: "ApiQuery";
|
|
1543
|
+
params: {
|
|
1544
|
+
timestamp: number;
|
|
1545
|
+
url: string;
|
|
1546
|
+
};
|
|
1547
|
+
hash: string;
|
|
1548
|
+
}>;
|
|
1549
|
+
result: z.ZodObject<{
|
|
1550
|
+
value: z.ZodString;
|
|
1551
|
+
}, "strip", z.ZodTypeAny, {
|
|
1552
|
+
value: string;
|
|
1553
|
+
}, {
|
|
1554
|
+
value: string;
|
|
1555
|
+
}>;
|
|
1556
|
+
}, "strip", z.ZodTypeAny, {
|
|
1557
|
+
result: {
|
|
1558
|
+
value: string;
|
|
1559
|
+
};
|
|
1560
|
+
query: {
|
|
1561
|
+
name: "ApiQuery";
|
|
1562
|
+
params: {
|
|
1563
|
+
timestamp: number;
|
|
1564
|
+
url: string;
|
|
1565
|
+
};
|
|
1566
|
+
hash: string;
|
|
1567
|
+
};
|
|
1568
|
+
signature: string;
|
|
1569
|
+
}, {
|
|
1570
|
+
result: {
|
|
1571
|
+
value: string;
|
|
1572
|
+
};
|
|
1573
|
+
query: {
|
|
1574
|
+
name: "ApiQuery";
|
|
1575
|
+
params: {
|
|
1576
|
+
timestamp: number;
|
|
1577
|
+
url: string;
|
|
1578
|
+
};
|
|
1579
|
+
hash: string;
|
|
1580
|
+
};
|
|
1581
|
+
signature: string;
|
|
1519
1582
|
}>]>;
|
|
1520
1583
|
export declare const ExecutionInputsValidator: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1521
1584
|
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -2112,6 +2175,69 @@ export declare const ExecutionInputsValidator: z.ZodArray<z.ZodUnion<[z.ZodObjec
|
|
|
2112
2175
|
hash: string;
|
|
2113
2176
|
};
|
|
2114
2177
|
signature: string;
|
|
2178
|
+
}>, z.ZodObject<{
|
|
2179
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
2180
|
+
query: z.ZodObject<{
|
|
2181
|
+
name: z.ZodLiteral<"ApiQuery">;
|
|
2182
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
2183
|
+
params: z.ZodObject<{
|
|
2184
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
2185
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
2186
|
+
}, "strip", z.ZodTypeAny, {
|
|
2187
|
+
timestamp: number;
|
|
2188
|
+
url: string;
|
|
2189
|
+
}, {
|
|
2190
|
+
timestamp: number;
|
|
2191
|
+
url: string;
|
|
2192
|
+
}>;
|
|
2193
|
+
}, "strip", z.ZodTypeAny, {
|
|
2194
|
+
name: "ApiQuery";
|
|
2195
|
+
params: {
|
|
2196
|
+
timestamp: number;
|
|
2197
|
+
url: string;
|
|
2198
|
+
};
|
|
2199
|
+
hash: string;
|
|
2200
|
+
}, {
|
|
2201
|
+
name: "ApiQuery";
|
|
2202
|
+
params: {
|
|
2203
|
+
timestamp: number;
|
|
2204
|
+
url: string;
|
|
2205
|
+
};
|
|
2206
|
+
hash: string;
|
|
2207
|
+
}>;
|
|
2208
|
+
result: z.ZodObject<{
|
|
2209
|
+
value: z.ZodString;
|
|
2210
|
+
}, "strip", z.ZodTypeAny, {
|
|
2211
|
+
value: string;
|
|
2212
|
+
}, {
|
|
2213
|
+
value: string;
|
|
2214
|
+
}>;
|
|
2215
|
+
}, "strip", z.ZodTypeAny, {
|
|
2216
|
+
result: {
|
|
2217
|
+
value: string;
|
|
2218
|
+
};
|
|
2219
|
+
query: {
|
|
2220
|
+
name: "ApiQuery";
|
|
2221
|
+
params: {
|
|
2222
|
+
timestamp: number;
|
|
2223
|
+
url: string;
|
|
2224
|
+
};
|
|
2225
|
+
hash: string;
|
|
2226
|
+
};
|
|
2227
|
+
signature: string;
|
|
2228
|
+
}, {
|
|
2229
|
+
result: {
|
|
2230
|
+
value: string;
|
|
2231
|
+
};
|
|
2232
|
+
query: {
|
|
2233
|
+
name: "ApiQuery";
|
|
2234
|
+
params: {
|
|
2235
|
+
timestamp: number;
|
|
2236
|
+
url: string;
|
|
2237
|
+
};
|
|
2238
|
+
hash: string;
|
|
2239
|
+
};
|
|
2240
|
+
signature: string;
|
|
2115
2241
|
}>]>, "many">;
|
|
2116
2242
|
export declare const ExecutionOutputValidator: z.ZodObject<z.objectUtil.extendShape<{
|
|
2117
2243
|
feePayer: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -2921,6 +3047,69 @@ export declare const ExecutionCreateRequestValidator: z.ZodObject<z.objectUtil.e
|
|
|
2921
3047
|
hash: string;
|
|
2922
3048
|
};
|
|
2923
3049
|
signature: string;
|
|
3050
|
+
}>, z.ZodObject<{
|
|
3051
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
3052
|
+
query: z.ZodObject<{
|
|
3053
|
+
name: z.ZodLiteral<"ApiQuery">;
|
|
3054
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
3055
|
+
params: z.ZodObject<{
|
|
3056
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
3057
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
3058
|
+
}, "strip", z.ZodTypeAny, {
|
|
3059
|
+
timestamp: number;
|
|
3060
|
+
url: string;
|
|
3061
|
+
}, {
|
|
3062
|
+
timestamp: number;
|
|
3063
|
+
url: string;
|
|
3064
|
+
}>;
|
|
3065
|
+
}, "strip", z.ZodTypeAny, {
|
|
3066
|
+
name: "ApiQuery";
|
|
3067
|
+
params: {
|
|
3068
|
+
timestamp: number;
|
|
3069
|
+
url: string;
|
|
3070
|
+
};
|
|
3071
|
+
hash: string;
|
|
3072
|
+
}, {
|
|
3073
|
+
name: "ApiQuery";
|
|
3074
|
+
params: {
|
|
3075
|
+
timestamp: number;
|
|
3076
|
+
url: string;
|
|
3077
|
+
};
|
|
3078
|
+
hash: string;
|
|
3079
|
+
}>;
|
|
3080
|
+
result: z.ZodObject<{
|
|
3081
|
+
value: z.ZodString;
|
|
3082
|
+
}, "strip", z.ZodTypeAny, {
|
|
3083
|
+
value: string;
|
|
3084
|
+
}, {
|
|
3085
|
+
value: string;
|
|
3086
|
+
}>;
|
|
3087
|
+
}, "strip", z.ZodTypeAny, {
|
|
3088
|
+
result: {
|
|
3089
|
+
value: string;
|
|
3090
|
+
};
|
|
3091
|
+
query: {
|
|
3092
|
+
name: "ApiQuery";
|
|
3093
|
+
params: {
|
|
3094
|
+
timestamp: number;
|
|
3095
|
+
url: string;
|
|
3096
|
+
};
|
|
3097
|
+
hash: string;
|
|
3098
|
+
};
|
|
3099
|
+
signature: string;
|
|
3100
|
+
}, {
|
|
3101
|
+
result: {
|
|
3102
|
+
value: string;
|
|
3103
|
+
};
|
|
3104
|
+
query: {
|
|
3105
|
+
name: "ApiQuery";
|
|
3106
|
+
params: {
|
|
3107
|
+
timestamp: number;
|
|
3108
|
+
url: string;
|
|
3109
|
+
};
|
|
3110
|
+
hash: string;
|
|
3111
|
+
};
|
|
3112
|
+
signature: string;
|
|
2924
3113
|
}>]>, "many">;
|
|
2925
3114
|
outputs: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
2926
3115
|
feePayer: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -3073,6 +3262,19 @@ export declare const ExecutionCreateRequestValidator: z.ZodObject<z.objectUtil.e
|
|
|
3073
3262
|
hash: string;
|
|
3074
3263
|
};
|
|
3075
3264
|
signature: string;
|
|
3265
|
+
} | {
|
|
3266
|
+
result: {
|
|
3267
|
+
value: string;
|
|
3268
|
+
};
|
|
3269
|
+
query: {
|
|
3270
|
+
name: "ApiQuery";
|
|
3271
|
+
params: {
|
|
3272
|
+
timestamp: number;
|
|
3273
|
+
url: string;
|
|
3274
|
+
};
|
|
3275
|
+
hash: string;
|
|
3276
|
+
};
|
|
3277
|
+
signature: string;
|
|
3076
3278
|
} | {
|
|
3077
3279
|
result: {
|
|
3078
3280
|
value: string;
|
|
@@ -3205,6 +3407,19 @@ export declare const ExecutionCreateRequestValidator: z.ZodObject<z.objectUtil.e
|
|
|
3205
3407
|
hash: string;
|
|
3206
3408
|
};
|
|
3207
3409
|
signature: string;
|
|
3410
|
+
} | {
|
|
3411
|
+
result: {
|
|
3412
|
+
value: string;
|
|
3413
|
+
};
|
|
3414
|
+
query: {
|
|
3415
|
+
name: "ApiQuery";
|
|
3416
|
+
params: {
|
|
3417
|
+
timestamp: number;
|
|
3418
|
+
url: string;
|
|
3419
|
+
};
|
|
3420
|
+
hash: string;
|
|
3421
|
+
};
|
|
3422
|
+
signature: string;
|
|
3208
3423
|
} | {
|
|
3209
3424
|
result: {
|
|
3210
3425
|
value: string;
|
|
@@ -3938,6 +4153,69 @@ export declare const ExecutionResponseValidator: z.ZodObject<z.objectUtil.extend
|
|
|
3938
4153
|
hash: string;
|
|
3939
4154
|
};
|
|
3940
4155
|
signature: string;
|
|
4156
|
+
}>, z.ZodObject<{
|
|
4157
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
4158
|
+
query: z.ZodObject<{
|
|
4159
|
+
name: z.ZodLiteral<"ApiQuery">;
|
|
4160
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
4161
|
+
params: z.ZodObject<{
|
|
4162
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
4163
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
4164
|
+
}, "strip", z.ZodTypeAny, {
|
|
4165
|
+
timestamp: number;
|
|
4166
|
+
url: string;
|
|
4167
|
+
}, {
|
|
4168
|
+
timestamp: number;
|
|
4169
|
+
url: string;
|
|
4170
|
+
}>;
|
|
4171
|
+
}, "strip", z.ZodTypeAny, {
|
|
4172
|
+
name: "ApiQuery";
|
|
4173
|
+
params: {
|
|
4174
|
+
timestamp: number;
|
|
4175
|
+
url: string;
|
|
4176
|
+
};
|
|
4177
|
+
hash: string;
|
|
4178
|
+
}, {
|
|
4179
|
+
name: "ApiQuery";
|
|
4180
|
+
params: {
|
|
4181
|
+
timestamp: number;
|
|
4182
|
+
url: string;
|
|
4183
|
+
};
|
|
4184
|
+
hash: string;
|
|
4185
|
+
}>;
|
|
4186
|
+
result: z.ZodObject<{
|
|
4187
|
+
value: z.ZodString;
|
|
4188
|
+
}, "strip", z.ZodTypeAny, {
|
|
4189
|
+
value: string;
|
|
4190
|
+
}, {
|
|
4191
|
+
value: string;
|
|
4192
|
+
}>;
|
|
4193
|
+
}, "strip", z.ZodTypeAny, {
|
|
4194
|
+
result: {
|
|
4195
|
+
value: string;
|
|
4196
|
+
};
|
|
4197
|
+
query: {
|
|
4198
|
+
name: "ApiQuery";
|
|
4199
|
+
params: {
|
|
4200
|
+
timestamp: number;
|
|
4201
|
+
url: string;
|
|
4202
|
+
};
|
|
4203
|
+
hash: string;
|
|
4204
|
+
};
|
|
4205
|
+
signature: string;
|
|
4206
|
+
}, {
|
|
4207
|
+
result: {
|
|
4208
|
+
value: string;
|
|
4209
|
+
};
|
|
4210
|
+
query: {
|
|
4211
|
+
name: "ApiQuery";
|
|
4212
|
+
params: {
|
|
4213
|
+
timestamp: number;
|
|
4214
|
+
url: string;
|
|
4215
|
+
};
|
|
4216
|
+
hash: string;
|
|
4217
|
+
};
|
|
4218
|
+
signature: string;
|
|
3941
4219
|
}>]>, "many">;
|
|
3942
4220
|
outputs: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
3943
4221
|
feePayer: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -4772,6 +5050,69 @@ export declare const ExecutionsResponseValidator: z.ZodArray<z.ZodObject<z.objec
|
|
|
4772
5050
|
hash: string;
|
|
4773
5051
|
};
|
|
4774
5052
|
signature: string;
|
|
5053
|
+
}>, z.ZodObject<{
|
|
5054
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
5055
|
+
query: z.ZodObject<{
|
|
5056
|
+
name: z.ZodLiteral<"ApiQuery">;
|
|
5057
|
+
hash: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
5058
|
+
params: z.ZodObject<{
|
|
5059
|
+
url: z.ZodEffects<z.ZodString, string, string>;
|
|
5060
|
+
timestamp: z.ZodEffects<z.ZodNumber, number, number>;
|
|
5061
|
+
}, "strip", z.ZodTypeAny, {
|
|
5062
|
+
timestamp: number;
|
|
5063
|
+
url: string;
|
|
5064
|
+
}, {
|
|
5065
|
+
timestamp: number;
|
|
5066
|
+
url: string;
|
|
5067
|
+
}>;
|
|
5068
|
+
}, "strip", z.ZodTypeAny, {
|
|
5069
|
+
name: "ApiQuery";
|
|
5070
|
+
params: {
|
|
5071
|
+
timestamp: number;
|
|
5072
|
+
url: string;
|
|
5073
|
+
};
|
|
5074
|
+
hash: string;
|
|
5075
|
+
}, {
|
|
5076
|
+
name: "ApiQuery";
|
|
5077
|
+
params: {
|
|
5078
|
+
timestamp: number;
|
|
5079
|
+
url: string;
|
|
5080
|
+
};
|
|
5081
|
+
hash: string;
|
|
5082
|
+
}>;
|
|
5083
|
+
result: z.ZodObject<{
|
|
5084
|
+
value: z.ZodString;
|
|
5085
|
+
}, "strip", z.ZodTypeAny, {
|
|
5086
|
+
value: string;
|
|
5087
|
+
}, {
|
|
5088
|
+
value: string;
|
|
5089
|
+
}>;
|
|
5090
|
+
}, "strip", z.ZodTypeAny, {
|
|
5091
|
+
result: {
|
|
5092
|
+
value: string;
|
|
5093
|
+
};
|
|
5094
|
+
query: {
|
|
5095
|
+
name: "ApiQuery";
|
|
5096
|
+
params: {
|
|
5097
|
+
timestamp: number;
|
|
5098
|
+
url: string;
|
|
5099
|
+
};
|
|
5100
|
+
hash: string;
|
|
5101
|
+
};
|
|
5102
|
+
signature: string;
|
|
5103
|
+
}, {
|
|
5104
|
+
result: {
|
|
5105
|
+
value: string;
|
|
5106
|
+
};
|
|
5107
|
+
query: {
|
|
5108
|
+
name: "ApiQuery";
|
|
5109
|
+
params: {
|
|
5110
|
+
timestamp: number;
|
|
5111
|
+
url: string;
|
|
5112
|
+
};
|
|
5113
|
+
hash: string;
|
|
5114
|
+
};
|
|
5115
|
+
signature: string;
|
|
4775
5116
|
}>]>, "many">;
|
|
4776
5117
|
outputs: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
4777
5118
|
feePayer: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/axia/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/axia/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAyBvB,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;EAI7B,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM9B,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAsC,CAAA;AAE9E,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ9C,CAAA"}
|
package/dist/axia/validators.js
CHANGED
|
@@ -23,17 +23,17 @@ exports.AxiaProposalValidator = zod_1.z.object({
|
|
|
23
23
|
status: zod_1.z.nativeEnum(constants_1.ProposalStatus),
|
|
24
24
|
description: shared_1.EmptyString255Validator.optional(),
|
|
25
25
|
signatures: zod_1.z.array(shared_1.SignatureValidator),
|
|
26
|
-
transactionHash: shared_1.
|
|
27
|
-
destTransactionHash: shared_1.
|
|
26
|
+
transactionHash: shared_1.HashValidator.optional(),
|
|
27
|
+
destTransactionHash: shared_1.HashValidator.optional(),
|
|
28
28
|
});
|
|
29
29
|
exports.AxiaIntentValidator = shared_1.IntentValidator.extend({
|
|
30
|
-
hash: shared_1.
|
|
31
|
-
executionHash: shared_1.
|
|
30
|
+
hash: shared_1.HashValidator,
|
|
31
|
+
executionHash: shared_1.HashValidator,
|
|
32
32
|
status: zod_1.z.nativeEnum(constants_1.IntentStatus),
|
|
33
33
|
proposals: zod_1.z.array(exports.AxiaProposalValidator),
|
|
34
34
|
logs: zod_1.z.array(exports.IntentLogValidator),
|
|
35
35
|
});
|
|
36
|
-
exports.IntentQuoteRequestValidator = shared_1.ValidatedIntentValidator.extend({ hash: shared_1.
|
|
36
|
+
exports.IntentQuoteRequestValidator = shared_1.ValidatedIntentValidator.extend({ hash: shared_1.HashValidator })
|
|
37
37
|
.refine((intent) => BigInt(intent.deadline) > BigInt(Math.floor(Date.now() / 1000)), {
|
|
38
38
|
path: ['deadline'],
|
|
39
39
|
message: 'Must be a future epoch date',
|
|
@@ -45,7 +45,7 @@ exports.IntentQuoteRequestValidator = shared_1.ValidatedIntentValidator.extend({
|
|
|
45
45
|
});
|
|
46
46
|
exports.IntentQuoteValidator = zod_1.z.object({ datas: zod_1.z.array(shared_1.StringValidator), fees: zod_1.z.array(shared_1.BigIntegerValidator) });
|
|
47
47
|
exports.IntentSubmitRequestValidator = zod_1.z.object({
|
|
48
|
-
hash: shared_1.
|
|
48
|
+
hash: shared_1.HashValidator,
|
|
49
49
|
signatures: zod_1.z.array(shared_1.SignatureValidator).min(1).max(2),
|
|
50
50
|
deadline: shared_1.BigIntegerValidator.refine((value) => new Date(parseInt(value) * 1000) > new Date(), 'Must be a future epoch date'),
|
|
51
51
|
});
|
|
@@ -67,7 +67,7 @@ exports.SettlerValidator = zod_1.z.object({
|
|
|
67
67
|
createdAt: shared_1.DateValidator,
|
|
68
68
|
});
|
|
69
69
|
exports.SettlersValidator = zod_1.z.array(exports.SettlerValidator);
|
|
70
|
-
exports.ExecutionIntentValidator = shared_1.IntentValidator.extend({ hash: shared_1.
|
|
70
|
+
exports.ExecutionIntentValidator = shared_1.IntentValidator.extend({ hash: shared_1.HashValidator });
|
|
71
71
|
exports.ExecutionsGetRequestValidator = zod_1.z
|
|
72
72
|
.object({
|
|
73
73
|
createdAfter: shared_1.TimestampValidator,
|
|
@@ -85,7 +85,7 @@ exports.ExecutionOutputValidator = exports.ExecutionIntentValidator;
|
|
|
85
85
|
exports.ExecutionOutputsValidator = zod_1.z.array(exports.ExecutionOutputValidator);
|
|
86
86
|
exports.ExecutionLogsValidator = zod_1.z.array(shared_1.StringValidator);
|
|
87
87
|
exports.ExecutionCreateRequestValidator = shared_1.ExecutionValidator.extend({
|
|
88
|
-
hash: shared_1.
|
|
88
|
+
hash: shared_1.HashValidator,
|
|
89
89
|
timestamp: shared_1.TimestampValidator,
|
|
90
90
|
fuelUsed: shared_1.PositiveIntegerValidator,
|
|
91
91
|
inputs: exports.ExecutionInputsValidator,
|
|
@@ -125,7 +125,7 @@ exports.ExecutionsResponseValidator = zod_1.z.array(exports.ExecutionResponseVal
|
|
|
125
125
|
exports.ExecutionValidationRequestValidator = exports.ExecutionValidationValidator.extend({
|
|
126
126
|
intentsValidations: zod_1.z.array(zod_1.z.object({
|
|
127
127
|
chainId: shared_1.ChainIdValidator,
|
|
128
|
-
intent: shared_1.
|
|
128
|
+
intent: shared_1.HashValidator,
|
|
129
129
|
signature: shared_1.SignatureValidator,
|
|
130
130
|
})),
|
|
131
131
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/axia/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,sCAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/axia/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,sCAAmD;AACnD,sCAkBkB;AAElB,2CAA4G;AAE/F,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,yBAAgB;IACzB,MAAM,EAAE,4BAAmB;CAC5B,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,OAAC,CAAC,UAAU,CAAC,0BA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AC;IACrF,kBAAkB,EAAE,OAAC,CAAC,KAAK,CACzB,OAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,yBAAgB;QACzB,MAAM,EAAE,sBAAa;QACrB,SAAS,EAAE,2BAAkB;KAC9B,CAAC,CACH;CACF,CAAC,CAAA"}
|
|
@@ -6,6 +6,10 @@ export interface DomainConfig {
|
|
|
6
6
|
timeoutMs?: number;
|
|
7
7
|
defaultHeaders?: Record<string, string>;
|
|
8
8
|
}
|
|
9
|
+
export interface IntegrationConfig {
|
|
10
|
+
slug?: string;
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
}
|
|
9
13
|
export type CoreConfig = Record<DomainName, DomainConfig>;
|
|
10
|
-
export declare function resolveCoreConfig(initConfig?: Partial<CoreConfig>, baseUrl?: string, defaultAuth?: AuthStrategy): CoreConfig;
|
|
14
|
+
export declare function resolveCoreConfig(initConfig?: Partial<CoreConfig>, baseUrl?: string, defaultAuth?: AuthStrategy, integration?: IntegrationConfig): CoreConfig;
|
|
11
15
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/client/core/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/client/core/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAErC,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAInG,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,CAAA;AAEzD,wBAAgB,iBAAiB,CAC/B,UAAU,GAAE,OAAO,CAAC,UAAU,CAAM,EACpC,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,YAAY,EAC1B,WAAW,CAAC,EAAE,iBAAiB,GAC9B,UAAU,CAaZ"}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveCoreConfig = resolveCoreConfig;
|
|
4
|
+
const shared_1 = require("../../shared");
|
|
4
5
|
const DEFAULT_API_URL = 'https://api-protocol.mimic.fi';
|
|
5
|
-
function resolveCoreConfig(initConfig = {}, baseUrl, defaultAuth) {
|
|
6
|
+
function resolveCoreConfig(initConfig = {}, baseUrl, defaultAuth, integration) {
|
|
7
|
+
const defaultHeaders = getIntegrationHeaders(integration);
|
|
6
8
|
const coreConfig = {
|
|
7
|
-
balances: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
8
|
-
triggers: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
9
|
-
executions: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
10
|
-
intents: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
11
|
-
functions: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
12
|
-
users: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth },
|
|
9
|
+
balances: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
10
|
+
triggers: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
11
|
+
executions: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
12
|
+
intents: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
13
|
+
functions: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
14
|
+
users: { baseUrl: baseUrl ?? DEFAULT_API_URL, auth: defaultAuth, defaultHeaders },
|
|
13
15
|
...initConfig,
|
|
14
16
|
};
|
|
15
17
|
return coreConfig;
|
|
16
18
|
}
|
|
19
|
+
function getIntegrationHeaders(integration) {
|
|
20
|
+
const headers = {};
|
|
21
|
+
if (integration?.slug)
|
|
22
|
+
headers[shared_1.INTEGRATION_SLUG_HEADER] = integration.slug;
|
|
23
|
+
if (integration?.apiKey)
|
|
24
|
+
headers[shared_1.INTEGRATION_API_KEY_HEADER] = integration.apiKey;
|
|
25
|
+
return Object.keys(headers).length > 0 ? headers : undefined;
|
|
26
|
+
}
|
|
17
27
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/client/core/config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/client/core/config.ts"],"names":[],"mappings":";;AAsBA,8CAkBC;AAxCD,yCAAkF;AAMlF,MAAM,eAAe,GAAG,+BAA+B,CAAA;AAgBvD,SAAgB,iBAAiB,CAC/B,aAAkC,EAAE,EACpC,OAAgB,EAChB,WAA0B,EAC1B,WAA+B;IAE/B,MAAM,cAAc,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAA;IACzD,MAAM,UAAU,GAAe;QAC7B,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACpF,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACpF,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACtF,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACnF,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACrF,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE;QACjF,GAAG,UAAU;KACd,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC;AAED,SAAS,qBAAqB,CAAC,WAA+B;IAC5D,MAAM,OAAO,GAA2B,EAAE,CAAA;IAC1C,IAAI,WAAW,EAAE,IAAI;QAAE,OAAO,CAAC,gCAAuB,CAAC,GAAG,WAAW,CAAC,IAAI,CAAA;IAC1E,IAAI,WAAW,EAAE,MAAM;QAAE,OAAO,CAAC,mCAA0B,CAAC,GAAG,WAAW,CAAC,MAAM,CAAA;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;AAC9D,CAAC"}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Signer } from '../shared';
|
|
2
|
-
import { ApiKeyAuth, type AuthStrategy, BearerAuth, type CoreConfig } from './core';
|
|
2
|
+
import { ApiKeyAuth, type AuthStrategy, BearerAuth, type CoreConfig, type IntegrationConfig } from './core';
|
|
3
3
|
import { BalancesClient, ExecutionsClient, FunctionsClient, IntentsClient, TriggersClient, UsersClient } from './domains';
|
|
4
4
|
export * from './core/errors';
|
|
5
5
|
export interface InitOptions {
|
|
6
6
|
domains?: Partial<CoreConfig>;
|
|
7
7
|
baseUrl?: string;
|
|
8
8
|
auth?: AuthStrategy;
|
|
9
|
+
integration?: IntegrationConfig;
|
|
9
10
|
signer?: Signer;
|
|
10
11
|
}
|
|
11
12
|
export declare class Client {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EACL,UAAU,EACV,KAAK,YAAY,EACjB,UAAU,EACV,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEvB,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACZ,MAAM,WAAW,CAAA;AAElB,cAAc,eAAe,CAAA;AAE7B,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,MAAM;IACjB,SAAgB,QAAQ,EAAE,cAAc,CAAA;IACxC,SAAgB,QAAQ,EAAE,cAAc,CAAA;IACxC,SAAgB,UAAU,EAAE,gBAAgB,CAAA;IAC5C,SAAgB,OAAO,EAAE,aAAa,CAAA;IACtC,SAAgB,SAAS,EAAE,eAAe,CAAA;IAC1C,SAAgB,KAAK,EAAE,WAAW,CAAA;gBAEtB,OAAO,CAAC,EAAE,WAAW;CAelC;AAED,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/client/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const domains_1 = require("./domains");
|
|
|
22
22
|
__exportStar(require("./core/errors"), exports);
|
|
23
23
|
class Client {
|
|
24
24
|
constructor(options) {
|
|
25
|
-
const config = (0, core_1.resolveCoreConfig)(options?.domains, options?.baseUrl, options?.auth);
|
|
25
|
+
const config = (0, core_1.resolveCoreConfig)(options?.domains, options?.baseUrl, options?.auth, options?.integration);
|
|
26
26
|
this.balances = new domains_1.BalancesClient(config.balances, options?.signer);
|
|
27
27
|
this.triggers = new domains_1.TriggersClient(config.triggers, options?.signer);
|
|
28
28
|
this.executions = new domains_1.ExecutionsClient(config.executions, options?.signer);
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,iCAOe;AA6CN,2FAnDP,iBAAU,OAmDO;AAAE,2FAjDnB,iBAAU,OAiDmB;AA5C/B,uCAOkB;AAElB,gDAA6B;AAU7B,MAAa,MAAM;IAQjB,YAAY,OAAqB;QAC/B,MAAM,MAAM,GAAe,IAAA,wBAAiB,EAC1C,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,WAAW,CACrB,CAAA;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACpE,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACpE,IAAI,CAAC,UAAU,GAAG,IAAI,0BAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QAC1E,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAa,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACjE,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAe,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACvE,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAW,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;IAC7D,CAAC;CACF;AAvBD,wBAuBC"}
|
|
@@ -105,5 +105,19 @@ export declare const ORACLE_QUERY_712_TYPES: {
|
|
|
105
105
|
}[];
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
+
ApiQuery: {
|
|
109
|
+
params: {
|
|
110
|
+
Params: {
|
|
111
|
+
name: string;
|
|
112
|
+
type: string;
|
|
113
|
+
}[];
|
|
114
|
+
};
|
|
115
|
+
result: {
|
|
116
|
+
Result: {
|
|
117
|
+
name: string;
|
|
118
|
+
type: string;
|
|
119
|
+
}[];
|
|
120
|
+
};
|
|
121
|
+
};
|
|
108
122
|
};
|
|
109
123
|
//# sourceMappingURL=eip712Types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eip712Types.d.ts","sourceRoot":"","sources":["../../src/oracle/eip712Types.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;GAGpC,CAAA;AAED,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"eip712Types.d.ts","sourceRoot":"","sources":["../../src/oracle/eip712Types.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAA;AAED,eAAO,MAAM,wBAAwB;;;GAGpC,CAAA;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FlC,CAAA"}
|
|
@@ -95,5 +95,14 @@ exports.ORACLE_QUERY_712_TYPES = {
|
|
|
95
95
|
],
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
|
+
ApiQuery: {
|
|
99
|
+
params: {
|
|
100
|
+
Params: [
|
|
101
|
+
{ name: 'url', type: 'string' },
|
|
102
|
+
{ name: 'timestamp', type: 'uint256' },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
result: { Result: [{ name: 'value', type: 'string' }] },
|
|
106
|
+
},
|
|
98
107
|
};
|
|
99
108
|
//# sourceMappingURL=eip712Types.js.map
|