@eco-foundation/api-schemas 0.4.1 → 0.7.0
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/README.md +393 -10
- package/dist/fixtures/index.js +2 -2
- package/dist/fixtures/index.js.map +1 -1
- package/dist/fixtures/v1/intents-submit-permit2.request.quote-target.json +4 -3
- package/dist/fixtures/v1/intents-submit-permit3.request.quote-target.json +8 -3
- package/dist/fixtures/v1/quotes-create.response.all-quotes.json +6 -3
- package/dist/fixtures/v1/quotes-create.response.private-swap.json +2 -1
- package/dist/fixtures/v1/quotes-create.response.public-swap.json +2 -1
- package/dist/fixtures/v1/tokens-list.response.default.json +1 -1
- package/dist/generated/build-digest.json +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/v1/endpoints/chains.d.ts +7 -0
- package/dist/v1/endpoints/chains.js +5 -1
- package/dist/v1/endpoints/chains.js.map +1 -1
- package/dist/v1/endpoints/deposit-addresses.js +1 -1
- package/dist/v1/endpoints/deposit-addresses.js.map +1 -1
- package/dist/v1/endpoints/quotes.d.ts +7 -1
- package/dist/v1/endpoints/quotes.js +42 -6
- package/dist/v1/endpoints/quotes.js.map +1 -1
- package/dist/v1/endpoints/registry.d.ts +114 -21
- package/dist/v1/endpoints/registry.js +4 -2
- package/dist/v1/endpoints/registry.js.map +1 -1
- package/dist/v1/endpoints/status.d.ts +211 -26
- package/dist/v1/endpoints/status.js +39 -7
- package/dist/v1/endpoints/status.js.map +1 -1
- package/dist/v1/endpoints/submit.d.ts +43 -24
- package/dist/v1/endpoints/submit.js +16 -9
- package/dist/v1/endpoints/submit.js.map +1 -1
- package/dist/v1/endpoints/tokens.d.ts +7 -0
- package/dist/v1/endpoints/tokens.js +5 -1
- package/dist/v1/endpoints/tokens.js.map +1 -1
- package/dist/v1/enums.d.ts +2 -1
- package/dist/v1/enums.js +1 -1
- package/dist/v1/enums.js.map +1 -1
- package/dist/v1/errors/catalog.d.ts +14 -0
- package/dist/v1/errors/catalog.js +3 -1
- package/dist/v1/errors/catalog.js.map +1 -1
- package/dist/v1/errors/problem.d.ts +10 -0
- package/dist/v1/errors/problem.js +20 -10
- package/dist/v1/errors/problem.js.map +1 -1
- package/dist/v1/primitives.d.ts +10 -1
- package/dist/v1/primitives.js +16 -1
- package/dist/v1/primitives.js.map +1 -1
- package/dist/v1/types.d.ts +36 -1
- package/errors/catalog.lock.json +10 -0
- package/openapi/v1.json +672 -127
- package/package.json +19 -16
|
@@ -2,7 +2,120 @@ import { z } from 'zod';
|
|
|
2
2
|
import { StatusType } from '../enums';
|
|
3
3
|
export declare const STATUS_PAGE_MAX_LIMIT = 50;
|
|
4
4
|
export declare const STATUS_PAGE_DEFAULT_LIMIT = 20;
|
|
5
|
+
export declare const StatusTxRefSchema: z.ZodObject<{
|
|
6
|
+
chainId: z.ZodNumber;
|
|
7
|
+
txHash: z.ZodString;
|
|
8
|
+
}, z.core.$loose>;
|
|
9
|
+
export type StatusTxRef = z.input<typeof StatusTxRefSchema>;
|
|
10
|
+
export declare const StatusTokenAmountSchema: z.ZodObject<{
|
|
11
|
+
token: z.ZodString;
|
|
12
|
+
amount: z.ZodString;
|
|
13
|
+
chainId: z.ZodNumber;
|
|
14
|
+
}, z.core.$loose>;
|
|
15
|
+
export type StatusTokenAmount = z.input<typeof StatusTokenAmountSchema>;
|
|
16
|
+
export declare const StatusTxDetailSchema: z.ZodObject<{
|
|
17
|
+
chainId: z.ZodNumber;
|
|
18
|
+
txHash: z.ZodString;
|
|
19
|
+
token: z.ZodString;
|
|
20
|
+
amount: z.ZodString;
|
|
21
|
+
}, z.core.$loose>;
|
|
22
|
+
export type StatusTxDetail = z.input<typeof StatusTxDetailSchema>;
|
|
23
|
+
export declare const STATUS_STEP_TYPES: readonly ["SWAP", "BRIDGE"];
|
|
24
|
+
export declare const StatusStepType: z.ZodEnum<{
|
|
25
|
+
SWAP: "SWAP";
|
|
26
|
+
BRIDGE: "BRIDGE";
|
|
27
|
+
}>;
|
|
28
|
+
export type StatusStepType = z.infer<typeof StatusStepType>;
|
|
29
|
+
export declare const StatusStepSchema: z.ZodObject<{
|
|
30
|
+
type: z.ZodEnum<{
|
|
31
|
+
SWAP: "SWAP";
|
|
32
|
+
BRIDGE: "BRIDGE";
|
|
33
|
+
}>;
|
|
34
|
+
status: z.ZodString;
|
|
35
|
+
from: z.ZodObject<{
|
|
36
|
+
token: z.ZodString;
|
|
37
|
+
amount: z.ZodString;
|
|
38
|
+
chainId: z.ZodNumber;
|
|
39
|
+
}, z.core.$loose>;
|
|
40
|
+
to: z.ZodObject<{
|
|
41
|
+
token: z.ZodString;
|
|
42
|
+
amount: z.ZodString;
|
|
43
|
+
chainId: z.ZodNumber;
|
|
44
|
+
}, z.core.$loose>;
|
|
45
|
+
transactions: z.ZodObject<{
|
|
46
|
+
created: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
chainId: z.ZodNumber;
|
|
48
|
+
txHash: z.ZodString;
|
|
49
|
+
}, z.core.$loose>>;
|
|
50
|
+
fulfilled: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
chainId: z.ZodNumber;
|
|
52
|
+
txHash: z.ZodString;
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
|
+
refunded: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
chainId: z.ZodNumber;
|
|
56
|
+
txHash: z.ZodString;
|
|
57
|
+
}, z.core.$loose>>;
|
|
58
|
+
}, z.core.$loose>;
|
|
59
|
+
}, z.core.$loose>;
|
|
60
|
+
export type StatusStep = z.input<typeof StatusStepSchema>;
|
|
5
61
|
export declare const StatusEntrySchema: z.ZodObject<{
|
|
62
|
+
intentHashes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
txHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
+
subStatuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
+
chainId: z.ZodNumber;
|
|
66
|
+
quoteIds: z.ZodArray<z.ZodString>;
|
|
67
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
68
|
+
intentHashes: z.ZodArray<z.ZodString>;
|
|
69
|
+
state: z.ZodEnum<{
|
|
70
|
+
pending: "pending";
|
|
71
|
+
published: "published";
|
|
72
|
+
failed: "failed";
|
|
73
|
+
submitted: "submitted";
|
|
74
|
+
}>;
|
|
75
|
+
}, z.core.$loose>>>;
|
|
76
|
+
sourceTx: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
chainId: z.ZodNumber;
|
|
78
|
+
txHash: z.ZodString;
|
|
79
|
+
token: z.ZodString;
|
|
80
|
+
amount: z.ZodString;
|
|
81
|
+
}, z.core.$loose>>;
|
|
82
|
+
destinationTx: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
chainId: z.ZodNumber;
|
|
84
|
+
txHash: z.ZodString;
|
|
85
|
+
token: z.ZodString;
|
|
86
|
+
amount: z.ZodString;
|
|
87
|
+
}, z.core.$loose>>;
|
|
88
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
|
+
type: z.ZodEnum<{
|
|
90
|
+
SWAP: "SWAP";
|
|
91
|
+
BRIDGE: "BRIDGE";
|
|
92
|
+
}>;
|
|
93
|
+
status: z.ZodString;
|
|
94
|
+
from: z.ZodObject<{
|
|
95
|
+
token: z.ZodString;
|
|
96
|
+
amount: z.ZodString;
|
|
97
|
+
chainId: z.ZodNumber;
|
|
98
|
+
}, z.core.$loose>;
|
|
99
|
+
to: z.ZodObject<{
|
|
100
|
+
token: z.ZodString;
|
|
101
|
+
amount: z.ZodString;
|
|
102
|
+
chainId: z.ZodNumber;
|
|
103
|
+
}, z.core.$loose>;
|
|
104
|
+
transactions: z.ZodObject<{
|
|
105
|
+
created: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
chainId: z.ZodNumber;
|
|
107
|
+
txHash: z.ZodString;
|
|
108
|
+
}, z.core.$loose>>;
|
|
109
|
+
fulfilled: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
chainId: z.ZodNumber;
|
|
111
|
+
txHash: z.ZodString;
|
|
112
|
+
}, z.core.$loose>>;
|
|
113
|
+
refunded: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
chainId: z.ZodNumber;
|
|
115
|
+
txHash: z.ZodString;
|
|
116
|
+
}, z.core.$loose>>;
|
|
117
|
+
}, z.core.$loose>;
|
|
118
|
+
}, z.core.$loose>>>;
|
|
6
119
|
id: z.ZodString;
|
|
7
120
|
type: z.ZodEnum<{
|
|
8
121
|
quote: "quote";
|
|
@@ -12,6 +125,9 @@ export declare const StatusEntrySchema: z.ZodObject<{
|
|
|
12
125
|
}>;
|
|
13
126
|
status: z.ZodString;
|
|
14
127
|
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
128
|
+
}, z.core.$loose>;
|
|
129
|
+
export type StatusEntry = z.input<typeof StatusEntrySchema>;
|
|
130
|
+
export declare function statusEntrySchemaFor(type: StatusType): z.ZodObject<{
|
|
15
131
|
intentHashes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
132
|
txHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
133
|
subStatuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -26,9 +142,49 @@ export declare const StatusEntrySchema: z.ZodObject<{
|
|
|
26
142
|
submitted: "submitted";
|
|
27
143
|
}>;
|
|
28
144
|
}, z.core.$loose>>>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
145
|
+
sourceTx: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
chainId: z.ZodNumber;
|
|
147
|
+
txHash: z.ZodString;
|
|
148
|
+
token: z.ZodString;
|
|
149
|
+
amount: z.ZodString;
|
|
150
|
+
}, z.core.$loose>>;
|
|
151
|
+
destinationTx: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
chainId: z.ZodNumber;
|
|
153
|
+
txHash: z.ZodString;
|
|
154
|
+
token: z.ZodString;
|
|
155
|
+
amount: z.ZodString;
|
|
156
|
+
}, z.core.$loose>>;
|
|
157
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
158
|
+
type: z.ZodEnum<{
|
|
159
|
+
SWAP: "SWAP";
|
|
160
|
+
BRIDGE: "BRIDGE";
|
|
161
|
+
}>;
|
|
162
|
+
status: z.ZodString;
|
|
163
|
+
from: z.ZodObject<{
|
|
164
|
+
token: z.ZodString;
|
|
165
|
+
amount: z.ZodString;
|
|
166
|
+
chainId: z.ZodNumber;
|
|
167
|
+
}, z.core.$loose>;
|
|
168
|
+
to: z.ZodObject<{
|
|
169
|
+
token: z.ZodString;
|
|
170
|
+
amount: z.ZodString;
|
|
171
|
+
chainId: z.ZodNumber;
|
|
172
|
+
}, z.core.$loose>;
|
|
173
|
+
transactions: z.ZodObject<{
|
|
174
|
+
created: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
chainId: z.ZodNumber;
|
|
176
|
+
txHash: z.ZodString;
|
|
177
|
+
}, z.core.$loose>>;
|
|
178
|
+
fulfilled: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
chainId: z.ZodNumber;
|
|
180
|
+
txHash: z.ZodString;
|
|
181
|
+
}, z.core.$loose>>;
|
|
182
|
+
refunded: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
chainId: z.ZodNumber;
|
|
184
|
+
txHash: z.ZodString;
|
|
185
|
+
}, z.core.$loose>>;
|
|
186
|
+
}, z.core.$loose>;
|
|
187
|
+
}, z.core.$loose>>>;
|
|
32
188
|
id: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
|
|
33
189
|
type: z.ZodLiteral<"quote" | "intent" | "gasless" | "deposit-address">;
|
|
34
190
|
status: z.ZodEnum<{
|
|
@@ -47,20 +203,6 @@ export declare function statusEntrySchemaFor(type: StatusType): z.ZodObject<{
|
|
|
47
203
|
active: "active";
|
|
48
204
|
}>;
|
|
49
205
|
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
50
|
-
intentHashes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
-
txHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
-
subStatuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
-
chainId: z.ZodNumber;
|
|
54
|
-
quoteIds: z.ZodArray<z.ZodString>;
|
|
55
|
-
txHash: z.ZodNullable<z.ZodString>;
|
|
56
|
-
intentHashes: z.ZodArray<z.ZodString>;
|
|
57
|
-
state: z.ZodEnum<{
|
|
58
|
-
pending: "pending";
|
|
59
|
-
published: "published";
|
|
60
|
-
failed: "failed";
|
|
61
|
-
submitted: "submitted";
|
|
62
|
-
}>;
|
|
63
|
-
}, z.core.$loose>>>;
|
|
64
206
|
}, z.core.$loose>;
|
|
65
207
|
export declare const PagingFields: {
|
|
66
208
|
cursor: z.ZodOptional<z.ZodString>;
|
|
@@ -126,15 +268,6 @@ export declare const DepositAddressStatusQuerySchema: z.ZodObject<{
|
|
|
126
268
|
}, z.core.$strip>;
|
|
127
269
|
export declare const StatusListResponseSchema: z.ZodObject<{
|
|
128
270
|
results: z.ZodArray<z.ZodObject<{
|
|
129
|
-
id: z.ZodString;
|
|
130
|
-
type: z.ZodEnum<{
|
|
131
|
-
quote: "quote";
|
|
132
|
-
intent: "intent";
|
|
133
|
-
gasless: "gasless";
|
|
134
|
-
"deposit-address": "deposit-address";
|
|
135
|
-
}>;
|
|
136
|
-
status: z.ZodString;
|
|
137
|
-
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
138
271
|
intentHashes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
272
|
txHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
273
|
subStatuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -149,6 +282,58 @@ export declare const StatusListResponseSchema: z.ZodObject<{
|
|
|
149
282
|
submitted: "submitted";
|
|
150
283
|
}>;
|
|
151
284
|
}, z.core.$loose>>>;
|
|
285
|
+
sourceTx: z.ZodOptional<z.ZodObject<{
|
|
286
|
+
chainId: z.ZodNumber;
|
|
287
|
+
txHash: z.ZodString;
|
|
288
|
+
token: z.ZodString;
|
|
289
|
+
amount: z.ZodString;
|
|
290
|
+
}, z.core.$loose>>;
|
|
291
|
+
destinationTx: z.ZodOptional<z.ZodObject<{
|
|
292
|
+
chainId: z.ZodNumber;
|
|
293
|
+
txHash: z.ZodString;
|
|
294
|
+
token: z.ZodString;
|
|
295
|
+
amount: z.ZodString;
|
|
296
|
+
}, z.core.$loose>>;
|
|
297
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
298
|
+
type: z.ZodEnum<{
|
|
299
|
+
SWAP: "SWAP";
|
|
300
|
+
BRIDGE: "BRIDGE";
|
|
301
|
+
}>;
|
|
302
|
+
status: z.ZodString;
|
|
303
|
+
from: z.ZodObject<{
|
|
304
|
+
token: z.ZodString;
|
|
305
|
+
amount: z.ZodString;
|
|
306
|
+
chainId: z.ZodNumber;
|
|
307
|
+
}, z.core.$loose>;
|
|
308
|
+
to: z.ZodObject<{
|
|
309
|
+
token: z.ZodString;
|
|
310
|
+
amount: z.ZodString;
|
|
311
|
+
chainId: z.ZodNumber;
|
|
312
|
+
}, z.core.$loose>;
|
|
313
|
+
transactions: z.ZodObject<{
|
|
314
|
+
created: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
chainId: z.ZodNumber;
|
|
316
|
+
txHash: z.ZodString;
|
|
317
|
+
}, z.core.$loose>>;
|
|
318
|
+
fulfilled: z.ZodOptional<z.ZodObject<{
|
|
319
|
+
chainId: z.ZodNumber;
|
|
320
|
+
txHash: z.ZodString;
|
|
321
|
+
}, z.core.$loose>>;
|
|
322
|
+
refunded: z.ZodOptional<z.ZodObject<{
|
|
323
|
+
chainId: z.ZodNumber;
|
|
324
|
+
txHash: z.ZodString;
|
|
325
|
+
}, z.core.$loose>>;
|
|
326
|
+
}, z.core.$loose>;
|
|
327
|
+
}, z.core.$loose>>>;
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
type: z.ZodEnum<{
|
|
330
|
+
quote: "quote";
|
|
331
|
+
intent: "intent";
|
|
332
|
+
gasless: "gasless";
|
|
333
|
+
"deposit-address": "deposit-address";
|
|
334
|
+
}>;
|
|
335
|
+
status: z.ZodString;
|
|
336
|
+
updatedAt: z.ZodNullable<z.ZodNumber>;
|
|
152
337
|
}, z.core.$loose>>;
|
|
153
338
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
154
339
|
}, z.core.$loose>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StatusListResponseSchema = exports.DepositAddressStatusQuerySchema = exports.DEPOSIT_ADDRESS_STATUS_QUERY_SHAPE = exports.IntentStatusQuerySchema = exports.INTENT_STATUS_QUERY_SHAPE = exports.PagingBoundsSchema = exports.PagingFields = exports.StatusEntrySchema = exports.STATUS_PAGE_DEFAULT_LIMIT = exports.STATUS_PAGE_MAX_LIMIT = void 0;
|
|
3
|
+
exports.StatusListResponseSchema = exports.DepositAddressStatusQuerySchema = exports.DEPOSIT_ADDRESS_STATUS_QUERY_SHAPE = exports.IntentStatusQuerySchema = exports.INTENT_STATUS_QUERY_SHAPE = exports.PagingBoundsSchema = exports.PagingFields = exports.StatusEntrySchema = exports.StatusStepSchema = exports.StatusStepType = exports.STATUS_STEP_TYPES = exports.StatusTxDetailSchema = exports.StatusTokenAmountSchema = exports.StatusTxRefSchema = exports.STATUS_PAGE_DEFAULT_LIMIT = exports.STATUS_PAGE_MAX_LIMIT = void 0;
|
|
4
4
|
exports.statusEntrySchemaFor = statusEntrySchemaFor;
|
|
5
5
|
exports.requireAtLeastOneFilter = requireAtLeastOneFilter;
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -15,15 +15,49 @@ const ID_SCHEMA_BY_TYPE = {
|
|
|
15
15
|
gasless: primitives_1.GaslessId,
|
|
16
16
|
'deposit-address': primitives_1.DepositAddressId,
|
|
17
17
|
};
|
|
18
|
+
exports.StatusTxRefSchema = zod_1.z.looseObject({
|
|
19
|
+
chainId: primitives_1.ChainId,
|
|
20
|
+
txHash: zod_1.z.string().min(1),
|
|
21
|
+
});
|
|
22
|
+
exports.StatusTokenAmountSchema = zod_1.z.looseObject({
|
|
23
|
+
token: zod_1.z.string().min(1),
|
|
24
|
+
amount: primitives_1.UintString,
|
|
25
|
+
chainId: primitives_1.ChainId,
|
|
26
|
+
});
|
|
27
|
+
exports.StatusTxDetailSchema = zod_1.z.looseObject({
|
|
28
|
+
chainId: primitives_1.ChainId,
|
|
29
|
+
txHash: zod_1.z.string().min(1),
|
|
30
|
+
token: zod_1.z.string().min(1),
|
|
31
|
+
amount: primitives_1.UintString,
|
|
32
|
+
});
|
|
33
|
+
exports.STATUS_STEP_TYPES = ['SWAP', 'BRIDGE'];
|
|
34
|
+
exports.StatusStepType = zod_1.z.enum(exports.STATUS_STEP_TYPES);
|
|
35
|
+
exports.StatusStepSchema = zod_1.z.looseObject({
|
|
36
|
+
type: exports.StatusStepType,
|
|
37
|
+
status: zod_1.z.string().min(1),
|
|
38
|
+
from: exports.StatusTokenAmountSchema,
|
|
39
|
+
to: exports.StatusTokenAmountSchema,
|
|
40
|
+
transactions: zod_1.z.looseObject({
|
|
41
|
+
created: exports.StatusTxRefSchema.optional(),
|
|
42
|
+
fulfilled: exports.StatusTxRefSchema.optional(),
|
|
43
|
+
refunded: exports.StatusTxRefSchema.optional(),
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
const STATUS_ENTRY_OPTIONAL_FIELDS = {
|
|
47
|
+
intentHashes: zod_1.z.array(primitives_1.Bytes32).optional(),
|
|
48
|
+
txHash: zod_1.z.string().nullable().optional(),
|
|
49
|
+
subStatuses: zod_1.z.array(submit_1.GaslessSubStatusSchema).optional(),
|
|
50
|
+
sourceTx: exports.StatusTxDetailSchema.optional(),
|
|
51
|
+
destinationTx: exports.StatusTxDetailSchema.optional(),
|
|
52
|
+
steps: zod_1.z.array(exports.StatusStepSchema).optional(),
|
|
53
|
+
};
|
|
18
54
|
exports.StatusEntrySchema = zod_1.z
|
|
19
55
|
.looseObject({
|
|
20
56
|
id: zod_1.z.string().min(1),
|
|
21
57
|
type: zod_1.z.enum(enums_1.STATUS_TYPES),
|
|
22
58
|
status: zod_1.z.string().min(1),
|
|
23
59
|
updatedAt: primitives_1.UnixSeconds.nullable(),
|
|
24
|
-
|
|
25
|
-
txHash: zod_1.z.string().nullable().optional(),
|
|
26
|
-
subStatuses: zod_1.z.array(submit_1.GaslessSubStatusSchema).optional(),
|
|
60
|
+
...STATUS_ENTRY_OPTIONAL_FIELDS,
|
|
27
61
|
})
|
|
28
62
|
.superRefine((entry, ctx) => {
|
|
29
63
|
const vocab = enums_1.STATUS_VOCABULARY[entry.type];
|
|
@@ -48,9 +82,7 @@ function statusEntrySchemaFor(type) {
|
|
|
48
82
|
type: zod_1.z.literal(type),
|
|
49
83
|
status: zod_1.z.enum(enums_1.STATUS_VOCABULARY[type]),
|
|
50
84
|
updatedAt: primitives_1.UnixSeconds.nullable(),
|
|
51
|
-
|
|
52
|
-
txHash: zod_1.z.string().nullable().optional(),
|
|
53
|
-
subStatuses: zod_1.z.array(submit_1.GaslessSubStatusSchema).optional(),
|
|
85
|
+
...STATUS_ENTRY_OPTIONAL_FIELDS,
|
|
54
86
|
});
|
|
55
87
|
}
|
|
56
88
|
exports.PagingFields = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/v1/endpoints/status.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/v1/endpoints/status.ts"],"names":[],"mappings":";;;AA4JA,oDAQC;AAyFD,0DAWC;AAxQD,6BAAwB;AAExB,oCAAuE;AACvE,8CAWuB;AACvB,qCAAkD;AAErC,QAAA,qBAAqB,GAAG,EAAE,CAAC;AAC3B,QAAA,yBAAyB,GAAG,EAAE,CAAC;AAG5C,MAAM,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CAAC,QAAQ,EAAE;IAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,yBAAiB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IACnD,GAAG,oBAAY;CAChB,CAAC;AAEW,QAAA,uBAAuB,GAAG,OAAC;KACrC,MAAM,CAAC,iCAAyB,CAAC;KACjC,WAAW,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAE/D,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,OAAO,CAAU,CAAC;AAgCxD,QAAA,kCAAkC,GAAG;IAChD,OAAO,EAAE,uBAAU,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,0BAAa,CAAC,QAAQ,EAAE;IAC/B,GAAG,oBAAY;CAChB,CAAC;AAEW,QAAA,+BAA+B,GAAG,OAAC;KAC7C,MAAM,CAAC,0CAAkC,CAAC;KAC1C,WAAW,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAO3D,QAAA,wBAAwB,GAAG,OAAC,CAAC,WAAW,CAAC;IACpD,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC,GAAG,CAAC,6BAAqB,CAAC;IAC9D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { LaneStandard } from '../enums';
|
|
3
3
|
export declare const SubmitSignature: z.ZodString;
|
|
4
4
|
export declare const SubmitTargetSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
5
|
quoteId: z.ZodString;
|
|
@@ -11,15 +11,22 @@ export declare const Permit3AllowanceSchema: z.ZodObject<{
|
|
|
11
11
|
chainId: z.ZodNumber;
|
|
12
12
|
token: z.ZodString;
|
|
13
13
|
amount: z.ZodString;
|
|
14
|
+
account: z.ZodString;
|
|
15
|
+
modeOrExpiration: z.ZodNumber;
|
|
14
16
|
}, z.core.$strip>;
|
|
15
17
|
export declare const Permit3PayloadSchema: z.ZodObject<{
|
|
16
18
|
owner: z.ZodString;
|
|
19
|
+
permitContract: z.ZodString;
|
|
17
20
|
salt: z.ZodString;
|
|
18
21
|
deadline: z.ZodNumber;
|
|
22
|
+
timestamp: z.ZodNumber;
|
|
23
|
+
merkleRoot: z.ZodString;
|
|
19
24
|
permits: z.ZodArray<z.ZodObject<{
|
|
20
25
|
chainId: z.ZodNumber;
|
|
21
26
|
token: z.ZodString;
|
|
22
27
|
amount: z.ZodString;
|
|
28
|
+
account: z.ZodString;
|
|
29
|
+
modeOrExpiration: z.ZodNumber;
|
|
23
30
|
}, z.core.$strip>>;
|
|
24
31
|
}, z.core.$strip>;
|
|
25
32
|
export declare const Permit3SubmitSchema: z.ZodObject<{
|
|
@@ -28,12 +35,17 @@ export declare const Permit3SubmitSchema: z.ZodObject<{
|
|
|
28
35
|
}, z.core.$strict>;
|
|
29
36
|
permit3: z.ZodObject<{
|
|
30
37
|
owner: z.ZodString;
|
|
38
|
+
permitContract: z.ZodString;
|
|
31
39
|
salt: z.ZodString;
|
|
32
40
|
deadline: z.ZodNumber;
|
|
41
|
+
timestamp: z.ZodNumber;
|
|
42
|
+
merkleRoot: z.ZodString;
|
|
33
43
|
permits: z.ZodArray<z.ZodObject<{
|
|
34
44
|
chainId: z.ZodNumber;
|
|
35
45
|
token: z.ZodString;
|
|
36
46
|
amount: z.ZodString;
|
|
47
|
+
account: z.ZodString;
|
|
48
|
+
modeOrExpiration: z.ZodNumber;
|
|
37
49
|
}, z.core.$strip>>;
|
|
38
50
|
}, z.core.$strip>;
|
|
39
51
|
signature: z.ZodString;
|
|
@@ -46,9 +58,10 @@ export declare const Permit2PermitSingleSchema: z.ZodObject<{
|
|
|
46
58
|
nonce: z.ZodNumber;
|
|
47
59
|
}, z.core.$strip>;
|
|
48
60
|
spender: z.ZodString;
|
|
49
|
-
sigDeadline: z.
|
|
61
|
+
sigDeadline: z.ZodString;
|
|
50
62
|
}, z.core.$strip>;
|
|
51
63
|
export declare const Permit2SubmitSchema: z.ZodObject<{
|
|
64
|
+
chainId: z.ZodNumber;
|
|
52
65
|
target: z.ZodObject<{
|
|
53
66
|
quoteId: z.ZodString;
|
|
54
67
|
}, z.core.$strict>;
|
|
@@ -60,7 +73,7 @@ export declare const Permit2SubmitSchema: z.ZodObject<{
|
|
|
60
73
|
nonce: z.ZodNumber;
|
|
61
74
|
}, z.core.$strip>;
|
|
62
75
|
spender: z.ZodString;
|
|
63
|
-
sigDeadline: z.
|
|
76
|
+
sigDeadline: z.ZodString;
|
|
64
77
|
}, z.core.$strip>;
|
|
65
78
|
signature: z.ZodString;
|
|
66
79
|
}, z.core.$strip>;
|
|
@@ -140,7 +153,7 @@ export declare const Erc2612SubmitSchema: z.ZodObject<{
|
|
|
140
153
|
}, z.core.$strip>;
|
|
141
154
|
signature: z.ZodString;
|
|
142
155
|
}, z.core.$strip>;
|
|
143
|
-
export declare const V1_SUBMIT_SCHEMAS: Record<
|
|
156
|
+
export declare const V1_SUBMIT_SCHEMAS: Record<LaneStandard, z.ZodType>;
|
|
144
157
|
export declare const SUBMIT_SERVICES: readonly ["intents", "deposit-addresses"];
|
|
145
158
|
export type SubmitService = (typeof SUBMIT_SERVICES)[number];
|
|
146
159
|
export declare const SUBMIT_TARGET_KIND_BY_SERVICE: {
|
|
@@ -149,23 +162,23 @@ export declare const SUBMIT_TARGET_KIND_BY_SERVICE: {
|
|
|
149
162
|
};
|
|
150
163
|
export declare const V1_SUBMIT_SCHEMAS_BY_SERVICE: {
|
|
151
164
|
readonly intents: {
|
|
152
|
-
readonly
|
|
165
|
+
readonly 'erc-3009': z.ZodObject<{
|
|
153
166
|
target: z.ZodObject<{
|
|
154
167
|
quoteId: z.ZodString;
|
|
155
168
|
}, z.core.$strict>;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}, z.core.$strip>>;
|
|
169
|
+
chainId: z.ZodNumber;
|
|
170
|
+
authorization: z.ZodObject<{
|
|
171
|
+
from: z.ZodString;
|
|
172
|
+
to: z.ZodString;
|
|
173
|
+
value: z.ZodString;
|
|
174
|
+
validAfter: z.ZodString;
|
|
175
|
+
validBefore: z.ZodString;
|
|
176
|
+
nonce: z.ZodString;
|
|
165
177
|
}, z.core.$strip>;
|
|
166
178
|
signature: z.ZodString;
|
|
167
179
|
}, z.core.$strip>;
|
|
168
180
|
readonly permit2: z.ZodObject<{
|
|
181
|
+
chainId: z.ZodNumber;
|
|
169
182
|
target: z.ZodObject<{
|
|
170
183
|
quoteId: z.ZodString;
|
|
171
184
|
}, z.core.$strict>;
|
|
@@ -177,22 +190,28 @@ export declare const V1_SUBMIT_SCHEMAS_BY_SERVICE: {
|
|
|
177
190
|
nonce: z.ZodNumber;
|
|
178
191
|
}, z.core.$strip>;
|
|
179
192
|
spender: z.ZodString;
|
|
180
|
-
sigDeadline: z.
|
|
193
|
+
sigDeadline: z.ZodString;
|
|
181
194
|
}, z.core.$strip>;
|
|
182
195
|
signature: z.ZodString;
|
|
183
196
|
}, z.core.$strip>;
|
|
184
|
-
readonly
|
|
197
|
+
readonly permit3: z.ZodObject<{
|
|
185
198
|
target: z.ZodObject<{
|
|
186
199
|
quoteId: z.ZodString;
|
|
187
200
|
}, z.core.$strict>;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
permit3: z.ZodObject<{
|
|
202
|
+
owner: z.ZodString;
|
|
203
|
+
permitContract: z.ZodString;
|
|
204
|
+
salt: z.ZodString;
|
|
205
|
+
deadline: z.ZodNumber;
|
|
206
|
+
timestamp: z.ZodNumber;
|
|
207
|
+
merkleRoot: z.ZodString;
|
|
208
|
+
permits: z.ZodArray<z.ZodObject<{
|
|
209
|
+
chainId: z.ZodNumber;
|
|
210
|
+
token: z.ZodString;
|
|
211
|
+
amount: z.ZodString;
|
|
212
|
+
account: z.ZodString;
|
|
213
|
+
modeOrExpiration: z.ZodNumber;
|
|
214
|
+
}, z.core.$strip>>;
|
|
196
215
|
}, z.core.$strip>;
|
|
197
216
|
signature: z.ZodString;
|
|
198
217
|
}, z.core.$strip>;
|
|
@@ -5,7 +5,6 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
const problem_1 = require("../errors/problem");
|
|
7
7
|
const primitives_1 = require("../primitives");
|
|
8
|
-
const UINT48_MAX = 281474976710655;
|
|
9
8
|
const SIGNATURE_MESSAGE = 'signature must be 64 bytes (EIP-2098 compact) or 65 bytes (r||s||v)';
|
|
10
9
|
exports.SubmitSignature = primitives_1.HexBytes.min(2 + 64 * 2, SIGNATURE_MESSAGE).max(2 + 65 * 2, SIGNATURE_MESSAGE);
|
|
11
10
|
const QuoteTargetSchema = zod_1.z.strictObject({ quoteId: primitives_1.QuoteId });
|
|
@@ -15,11 +14,18 @@ exports.Permit3AllowanceSchema = zod_1.z.object({
|
|
|
15
14
|
chainId: primitives_1.ChainId,
|
|
16
15
|
token: primitives_1.EvmAddress,
|
|
17
16
|
amount: primitives_1.UintString,
|
|
17
|
+
account: primitives_1.EvmAddress.describe('Recipient (transfer mode) or spender (allowance mode) — on a quote target, the ' +
|
|
18
|
+
"quote's execution.vault"),
|
|
19
|
+
modeOrExpiration: primitives_1.Uint48.describe('0 = transfer mode (funds pushed to account); any other value = allowance mode with ' +
|
|
20
|
+
'this expiration, Unix seconds'),
|
|
18
21
|
});
|
|
19
22
|
exports.Permit3PayloadSchema = zod_1.z.object({
|
|
20
23
|
owner: primitives_1.EvmAddress,
|
|
24
|
+
permitContract: primitives_1.EvmAddress.describe('The Permit3 contract the legs were signed against (the EIP-712 verifyingContract)'),
|
|
21
25
|
salt: primitives_1.Bytes32,
|
|
22
26
|
deadline: primitives_1.UnixSeconds,
|
|
27
|
+
timestamp: primitives_1.Uint48.describe('Permit3 ordering timestamp (uint48, Unix seconds)'),
|
|
28
|
+
merkleRoot: primitives_1.Bytes32.describe('Merkle root over the legs, as signed'),
|
|
23
29
|
permits: zod_1.z.array(exports.Permit3AllowanceSchema).min(1),
|
|
24
30
|
});
|
|
25
31
|
exports.Permit3SubmitSchema = zod_1.z.object({
|
|
@@ -31,13 +37,14 @@ exports.Permit2PermitSingleSchema = zod_1.z.object({
|
|
|
31
37
|
details: zod_1.z.object({
|
|
32
38
|
token: primitives_1.EvmAddress,
|
|
33
39
|
amount: primitives_1.UintString,
|
|
34
|
-
expiration: primitives_1.
|
|
35
|
-
nonce:
|
|
40
|
+
expiration: primitives_1.Uint48.describe('Permit2 allowance expiration (uint48, Unix seconds)'),
|
|
41
|
+
nonce: primitives_1.Uint48,
|
|
36
42
|
}),
|
|
37
|
-
spender: primitives_1.EvmAddress,
|
|
38
|
-
sigDeadline: primitives_1.
|
|
43
|
+
spender: primitives_1.EvmAddress.describe("The Permit2 spender — on a quote target, the quote's execution.vault"),
|
|
44
|
+
sigDeadline: primitives_1.UintString.describe('Signature deadline (uint256 Unix seconds, decimal string; max-uint = no expiry)'),
|
|
39
45
|
});
|
|
40
46
|
exports.Permit2SubmitSchema = zod_1.z.object({
|
|
47
|
+
chainId: primitives_1.ChainId,
|
|
41
48
|
target: QuoteTargetSchema,
|
|
42
49
|
permit2: exports.Permit2PermitSingleSchema,
|
|
43
50
|
signature: exports.SubmitSignature,
|
|
@@ -96,9 +103,9 @@ exports.Erc2612SubmitSchema = zod_1.z
|
|
|
96
103
|
})
|
|
97
104
|
.superRefine(refineErc2612SpenderBinding);
|
|
98
105
|
exports.V1_SUBMIT_SCHEMAS = {
|
|
99
|
-
permit3: exports.Permit3SubmitSchema,
|
|
100
|
-
permit2: exports.Permit2SubmitSchema,
|
|
101
106
|
'erc-3009': exports.Erc3009SubmitSchema,
|
|
107
|
+
permit2: exports.Permit2SubmitSchema,
|
|
108
|
+
permit3: exports.Permit3SubmitSchema,
|
|
102
109
|
'erc-2612': exports.Erc2612SubmitSchema,
|
|
103
110
|
};
|
|
104
111
|
exports.SUBMIT_SERVICES = ['intents', 'deposit-addresses'];
|
|
@@ -108,9 +115,9 @@ exports.SUBMIT_TARGET_KIND_BY_SERVICE = {
|
|
|
108
115
|
};
|
|
109
116
|
exports.V1_SUBMIT_SCHEMAS_BY_SERVICE = {
|
|
110
117
|
intents: {
|
|
111
|
-
permit3: exports.Permit3SubmitSchema,
|
|
112
|
-
permit2: exports.Permit2SubmitSchema,
|
|
113
118
|
'erc-3009': exports.Erc3009IntentsSubmitSchema,
|
|
119
|
+
permit2: exports.Permit2SubmitSchema,
|
|
120
|
+
permit3: exports.Permit3SubmitSchema,
|
|
114
121
|
},
|
|
115
122
|
'deposit-addresses': {
|
|
116
123
|
'erc-3009': exports.Erc3009DepositAddressSubmitSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../src/v1/endpoints/submit.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,
|
|
1
|
+
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../src/v1/endpoints/submit.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,oCAAoG;AACpG,+CAAkD;AAClD,8CAWuB;AAmBvB,MAAM,iBAAiB,GAAG,qEAAqE,CAAC;AACnF,QAAA,eAAe,GAAG,qBAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,iBAAiB,CAAC,CAAC,GAAG,CAC5E,CAAC,GAAG,EAAE,GAAG,CAAC,EACV,iBAAiB,CAClB,CAAC;AAWF,MAAM,iBAAiB,GAAG,OAAC,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE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};
|
|
5
|
+
export declare const TokensListQuerySchema: z.ZodObject<{
|
|
6
|
+
chainId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type TokensListQuery = z.infer<typeof TokensListQuerySchema>;
|
|
2
9
|
export declare const SupportsSchema: z.ZodObject<{
|
|
3
10
|
quote: z.ZodArray<z.ZodEnum<{
|
|
4
11
|
permit3: "permit3";
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokensResponseSchema = exports.TokenEntrySchema = exports.SupportsSchema = void 0;
|
|
3
|
+
exports.TokensResponseSchema = exports.TokenEntrySchema = exports.SupportsSchema = exports.TokensListQuerySchema = exports.TOKENS_LIST_QUERY_SHAPE = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enums_1 = require("../enums");
|
|
6
6
|
const primitives_1 = require("../primitives");
|
|
7
|
+
exports.TOKENS_LIST_QUERY_SHAPE = {
|
|
8
|
+
chainId: primitives_1.ChainIdParam.optional(),
|
|
9
|
+
};
|
|
10
|
+
exports.TokensListQuerySchema = zod_1.z.object(exports.TOKENS_LIST_QUERY_SHAPE);
|
|
7
11
|
exports.SupportsSchema = zod_1.z.looseObject({
|
|
8
12
|
quote: zod_1.z.array(enums_1.SubmitStandard),
|
|
9
13
|
depositAddress: zod_1.z.array(enums_1.SubmitStandard),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/v1/endpoints/tokens.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,oCAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/v1/endpoints/tokens.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,oCAA0C;AAC1C,8CAAkE;AAarD,QAAA,uBAAuB,GAAG;IACrC,OAAO,EAAE,yBAAY,CAAC,QAAQ,EAAE;CACjC,CAAC;AAEW,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC,+BAAuB,CAAC,CAAC;AAc1D,QAAA,cAAc,GAAG,OAAC,CAAC,WAAW,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,sBAAc,CAAC;IAC9B,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,sBAAc,CAAC;CACxC,CAAC,CAAC;AAEU,QAAA,gBAAgB,GAAG,OAAC,CAAC,WAAW,CAAC;IAC5C,OAAO,EAAE,oBAAO;IAChB,OAAO,EAAE,uBAAU;IAEnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,sBAAc;CACzB,CAAC,CAAC;AAGU,QAAA,oBAAoB,GAAG,OAAC,CAAC,WAAW,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;IAEjC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
|
package/dist/v1/enums.d.ts
CHANGED
|
@@ -105,9 +105,10 @@ export declare const SubmitStandard: z.ZodEnum<{
|
|
|
105
105
|
}>;
|
|
106
106
|
export type SubmitStandard = z.infer<typeof SubmitStandard>;
|
|
107
107
|
export declare const STANDARDS_BY_TARGET: {
|
|
108
|
-
readonly quote: readonly ["
|
|
108
|
+
readonly quote: readonly ["erc-3009", "permit2", "permit3"];
|
|
109
109
|
readonly depositAddress: readonly ["erc-2612", "erc-3009"];
|
|
110
110
|
};
|
|
111
|
+
export type LaneStandard = (typeof STANDARDS_BY_TARGET)[keyof typeof STANDARDS_BY_TARGET][number];
|
|
111
112
|
export declare const STATUS_TYPES: readonly ["intent", "quote", "gasless", "deposit-address"];
|
|
112
113
|
export declare const StatusType: z.ZodEnum<{
|
|
113
114
|
quote: "quote";
|