@eco-foundation/api-schemas 0.1.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 +160 -0
- package/dist/build-digest.d.ts +2 -0
- package/dist/build-digest.js +10 -0
- package/dist/build-digest.js.map +1 -0
- package/dist/fixtures/index.d.ts +14 -0
- package/dist/fixtures/index.js +71 -0
- package/dist/fixtures/index.js.map +1 -0
- package/dist/fixtures/v1/chains-list.response.default.json +37 -0
- package/dist/fixtures/v1/deposit-addresses-create.request.gateway-erc20.json +16 -0
- package/dist/fixtures/v1/deposit-addresses-create.response.gateway-erc20.json +20 -0
- package/dist/fixtures/v1/deposit-addresses-lookup.response.default.json +24 -0
- package/dist/fixtures/v1/deposit-addresses-submit-erc-2612.request.deposit-address-target.json +23 -0
- package/dist/fixtures/v1/deposit-addresses-submit-erc-3009.request.deposit-address-target.json +24 -0
- package/dist/fixtures/v1/intents-status.response.gasless-handoff.json +30 -0
- package/dist/fixtures/v1/intents-status.response.intent-filled.json +21 -0
- package/dist/fixtures/v1/intents-status.response.unknown.json +20 -0
- package/dist/fixtures/v1/intents-status.response.wallet-page.json +27 -0
- package/dist/fixtures/v1/intents-submit-erc-3009.response.job.json +25 -0
- package/dist/fixtures/v1/intents-submit-permit2.request.quote-target.json +25 -0
- package/dist/fixtures/v1/intents-submit-permit3.request.quote-target.json +27 -0
- package/dist/fixtures/v1/quotes-create.request.public-swap.json +25 -0
- package/dist/fixtures/v1/quotes-create.response.all-quotes.json +455 -0
- package/dist/fixtures/v1/quotes-create.response.private-swap.json +152 -0
- package/dist/fixtures/v1/quotes-create.response.public-swap.json +158 -0
- package/dist/fixtures/v1/routes-list.response.default.json +26 -0
- package/dist/fixtures/v1/tokens-list.response.default.json +24 -0
- package/dist/generated/build-digest.json +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +81 -0
- package/dist/openapi.js.map +1 -0
- package/dist/scripts/generate-build-digest.d.ts +1 -0
- package/dist/scripts/generate-build-digest.js +25 -0
- package/dist/scripts/generate-build-digest.js.map +1 -0
- package/dist/scripts/generate-openapi.d.ts +1 -0
- package/dist/scripts/generate-openapi.js +21 -0
- package/dist/scripts/generate-openapi.js.map +1 -0
- package/dist/testing/index.d.ts +7 -0
- package/dist/testing/index.js +27 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/v1/endpoints/chains.d.ts +52 -0
- package/dist/v1/endpoints/chains.js +23 -0
- package/dist/v1/endpoints/chains.js.map +1 -0
- package/dist/v1/endpoints/deposit-addresses.d.ts +100 -0
- package/dist/v1/endpoints/deposit-addresses.js +61 -0
- package/dist/v1/endpoints/deposit-addresses.js.map +1 -0
- package/dist/v1/endpoints/quotes.d.ts +861 -0
- package/dist/v1/endpoints/quotes.js +297 -0
- package/dist/v1/endpoints/quotes.js.map +1 -0
- package/dist/v1/endpoints/registry.d.ts +641 -0
- package/dist/v1/endpoints/registry.js +108 -0
- package/dist/v1/endpoints/registry.js.map +1 -0
- package/dist/v1/endpoints/routes.d.ts +35 -0
- package/dist/v1/endpoints/routes.js +21 -0
- package/dist/v1/endpoints/routes.js.map +1 -0
- package/dist/v1/endpoints/status.d.ts +149 -0
- package/dist/v1/endpoints/status.js +110 -0
- package/dist/v1/endpoints/status.js.map +1 -0
- package/dist/v1/endpoints/submit.d.ts +271 -0
- package/dist/v1/endpoints/submit.js +127 -0
- package/dist/v1/endpoints/submit.js.map +1 -0
- package/dist/v1/endpoints/tokens.d.ts +59 -0
- package/dist/v1/endpoints/tokens.js +22 -0
- package/dist/v1/endpoints/tokens.js.map +1 -0
- package/dist/v1/enums.d.ts +133 -0
- package/dist/v1/enums.js +62 -0
- package/dist/v1/enums.js.map +1 -0
- package/dist/v1/errors/catalog.d.ts +247 -0
- package/dist/v1/errors/catalog.js +124 -0
- package/dist/v1/errors/catalog.js.map +1 -0
- package/dist/v1/errors/lock.d.ts +10 -0
- package/dist/v1/errors/lock.js +45 -0
- package/dist/v1/errors/lock.js.map +1 -0
- package/dist/v1/errors/problem.d.ts +50 -0
- package/dist/v1/errors/problem.js +82 -0
- package/dist/v1/errors/problem.js.map +1 -0
- package/dist/v1/index.d.ts +14 -0
- package/dist/v1/index.js +32 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/primitives.d.ts +33 -0
- package/dist/v1/primitives.js +63 -0
- package/dist/v1/primitives.js.map +1 -0
- package/dist/v1/signature.d.ts +10 -0
- package/dist/v1/signature.js +72 -0
- package/dist/v1/signature.js.map +1 -0
- package/dist/v1/tolerant.d.ts +4 -0
- package/dist/v1/tolerant.js +11 -0
- package/dist/v1/tolerant.js.map +1 -0
- package/dist/v1/types.d.ts +277 -0
- package/dist/v1/types.js +3 -0
- package/dist/v1/types.js.map +1 -0
- package/errors/catalog.lock.json +232 -0
- package/fixtures/quote-signature/vector-1.json +9 -0
- package/fixtures/quote-signature/vector-2.json +13 -0
- package/fixtures/quote-signature/vector-3.json +9 -0
- package/fixtures/signature-hash/vectors.json +58 -0
- package/openapi/v1.json +5225 -0
- package/package.json +71 -0
- package/v1/types.d.ts +7 -0
- package/v1/types.js +5 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SubmitStandard } from '../enums';
|
|
3
|
+
export declare const SubmitSignature: z.ZodString;
|
|
4
|
+
export declare const SubmitTargetSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
quoteId: z.ZodString;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7
|
+
depositAddress: z.ZodString;
|
|
8
|
+
}, z.core.$strict>]>;
|
|
9
|
+
export type SubmitTarget = z.infer<typeof SubmitTargetSchema>;
|
|
10
|
+
export declare const Permit3AllowanceSchema: z.ZodObject<{
|
|
11
|
+
chainId: z.ZodNumber;
|
|
12
|
+
token: z.ZodString;
|
|
13
|
+
amount: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const Permit3PayloadSchema: z.ZodObject<{
|
|
16
|
+
owner: z.ZodString;
|
|
17
|
+
salt: z.ZodString;
|
|
18
|
+
deadline: z.ZodNumber;
|
|
19
|
+
permits: z.ZodArray<z.ZodObject<{
|
|
20
|
+
chainId: z.ZodNumber;
|
|
21
|
+
token: z.ZodString;
|
|
22
|
+
amount: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const Permit3SubmitSchema: z.ZodObject<{
|
|
26
|
+
target: z.ZodObject<{
|
|
27
|
+
quoteId: z.ZodString;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
permit3: z.ZodObject<{
|
|
30
|
+
owner: z.ZodString;
|
|
31
|
+
salt: z.ZodString;
|
|
32
|
+
deadline: z.ZodNumber;
|
|
33
|
+
permits: z.ZodArray<z.ZodObject<{
|
|
34
|
+
chainId: z.ZodNumber;
|
|
35
|
+
token: z.ZodString;
|
|
36
|
+
amount: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
signature: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare const Permit2PermitSingleSchema: z.ZodObject<{
|
|
42
|
+
details: z.ZodObject<{
|
|
43
|
+
token: z.ZodString;
|
|
44
|
+
amount: z.ZodString;
|
|
45
|
+
expiration: z.ZodNumber;
|
|
46
|
+
nonce: z.ZodNumber;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
spender: z.ZodString;
|
|
49
|
+
sigDeadline: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare const Permit2SubmitSchema: z.ZodObject<{
|
|
52
|
+
target: z.ZodObject<{
|
|
53
|
+
quoteId: z.ZodString;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
permit2: z.ZodObject<{
|
|
56
|
+
details: z.ZodObject<{
|
|
57
|
+
token: z.ZodString;
|
|
58
|
+
amount: z.ZodString;
|
|
59
|
+
expiration: z.ZodNumber;
|
|
60
|
+
nonce: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
spender: z.ZodString;
|
|
63
|
+
sigDeadline: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
signature: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
export declare const Erc3009AuthorizationSchema: z.ZodObject<{
|
|
68
|
+
from: z.ZodString;
|
|
69
|
+
to: z.ZodString;
|
|
70
|
+
value: z.ZodString;
|
|
71
|
+
validAfter: z.ZodString;
|
|
72
|
+
validBefore: z.ZodString;
|
|
73
|
+
nonce: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export declare const Erc3009SubmitSchema: z.ZodObject<{
|
|
76
|
+
target: z.ZodUnion<readonly [z.ZodObject<{
|
|
77
|
+
quoteId: z.ZodString;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
depositAddress: z.ZodString;
|
|
80
|
+
}, z.core.$strict>]>;
|
|
81
|
+
chainId: z.ZodNumber;
|
|
82
|
+
authorization: z.ZodObject<{
|
|
83
|
+
from: z.ZodString;
|
|
84
|
+
to: z.ZodString;
|
|
85
|
+
value: z.ZodString;
|
|
86
|
+
validAfter: z.ZodString;
|
|
87
|
+
validBefore: z.ZodString;
|
|
88
|
+
nonce: z.ZodString;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
signature: z.ZodString;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export declare const Erc3009IntentsSubmitSchema: z.ZodObject<{
|
|
93
|
+
target: z.ZodObject<{
|
|
94
|
+
quoteId: z.ZodString;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
chainId: z.ZodNumber;
|
|
97
|
+
authorization: z.ZodObject<{
|
|
98
|
+
from: z.ZodString;
|
|
99
|
+
to: z.ZodString;
|
|
100
|
+
value: z.ZodString;
|
|
101
|
+
validAfter: z.ZodString;
|
|
102
|
+
validBefore: z.ZodString;
|
|
103
|
+
nonce: z.ZodString;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
signature: z.ZodString;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export declare const Erc3009DepositAddressSubmitSchema: z.ZodObject<{
|
|
108
|
+
target: z.ZodObject<{
|
|
109
|
+
depositAddress: z.ZodString;
|
|
110
|
+
}, z.core.$strict>;
|
|
111
|
+
chainId: z.ZodNumber;
|
|
112
|
+
authorization: z.ZodObject<{
|
|
113
|
+
from: z.ZodString;
|
|
114
|
+
to: z.ZodString;
|
|
115
|
+
value: z.ZodString;
|
|
116
|
+
validAfter: z.ZodString;
|
|
117
|
+
validBefore: z.ZodString;
|
|
118
|
+
nonce: z.ZodString;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
signature: z.ZodString;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export declare const Erc2612PermitSchema: z.ZodObject<{
|
|
123
|
+
owner: z.ZodString;
|
|
124
|
+
spender: z.ZodString;
|
|
125
|
+
value: z.ZodString;
|
|
126
|
+
nonce: z.ZodString;
|
|
127
|
+
deadline: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const Erc2612SubmitSchema: z.ZodObject<{
|
|
130
|
+
chainId: z.ZodNumber;
|
|
131
|
+
target: z.ZodObject<{
|
|
132
|
+
depositAddress: z.ZodString;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
permit: z.ZodObject<{
|
|
135
|
+
owner: z.ZodString;
|
|
136
|
+
spender: z.ZodString;
|
|
137
|
+
value: z.ZodString;
|
|
138
|
+
nonce: z.ZodString;
|
|
139
|
+
deadline: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
signature: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export declare const V1_SUBMIT_SCHEMAS: Record<SubmitStandard, z.ZodType>;
|
|
144
|
+
export declare const SUBMIT_SERVICES: readonly ["intents", "deposit-addresses"];
|
|
145
|
+
export type SubmitService = (typeof SUBMIT_SERVICES)[number];
|
|
146
|
+
export declare const SUBMIT_TARGET_KIND_BY_SERVICE: {
|
|
147
|
+
readonly intents: "quote";
|
|
148
|
+
readonly 'deposit-addresses': "depositAddress";
|
|
149
|
+
};
|
|
150
|
+
export declare const V1_SUBMIT_SCHEMAS_BY_SERVICE: {
|
|
151
|
+
readonly intents: {
|
|
152
|
+
readonly permit3: z.ZodObject<{
|
|
153
|
+
target: z.ZodObject<{
|
|
154
|
+
quoteId: z.ZodString;
|
|
155
|
+
}, z.core.$strict>;
|
|
156
|
+
permit3: z.ZodObject<{
|
|
157
|
+
owner: z.ZodString;
|
|
158
|
+
salt: z.ZodString;
|
|
159
|
+
deadline: z.ZodNumber;
|
|
160
|
+
permits: z.ZodArray<z.ZodObject<{
|
|
161
|
+
chainId: z.ZodNumber;
|
|
162
|
+
token: z.ZodString;
|
|
163
|
+
amount: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>;
|
|
165
|
+
}, z.core.$strip>;
|
|
166
|
+
signature: z.ZodString;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
readonly permit2: z.ZodObject<{
|
|
169
|
+
target: z.ZodObject<{
|
|
170
|
+
quoteId: z.ZodString;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
permit2: z.ZodObject<{
|
|
173
|
+
details: z.ZodObject<{
|
|
174
|
+
token: z.ZodString;
|
|
175
|
+
amount: z.ZodString;
|
|
176
|
+
expiration: z.ZodNumber;
|
|
177
|
+
nonce: z.ZodNumber;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
spender: z.ZodString;
|
|
180
|
+
sigDeadline: z.ZodNumber;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
signature: z.ZodString;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
readonly 'erc-3009': z.ZodObject<{
|
|
185
|
+
target: z.ZodObject<{
|
|
186
|
+
quoteId: z.ZodString;
|
|
187
|
+
}, z.core.$strict>;
|
|
188
|
+
chainId: z.ZodNumber;
|
|
189
|
+
authorization: z.ZodObject<{
|
|
190
|
+
from: z.ZodString;
|
|
191
|
+
to: z.ZodString;
|
|
192
|
+
value: z.ZodString;
|
|
193
|
+
validAfter: z.ZodString;
|
|
194
|
+
validBefore: z.ZodString;
|
|
195
|
+
nonce: z.ZodString;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
signature: z.ZodString;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
};
|
|
200
|
+
readonly 'deposit-addresses': {
|
|
201
|
+
readonly 'erc-3009': z.ZodObject<{
|
|
202
|
+
target: z.ZodObject<{
|
|
203
|
+
depositAddress: z.ZodString;
|
|
204
|
+
}, z.core.$strict>;
|
|
205
|
+
chainId: z.ZodNumber;
|
|
206
|
+
authorization: z.ZodObject<{
|
|
207
|
+
from: z.ZodString;
|
|
208
|
+
to: z.ZodString;
|
|
209
|
+
value: z.ZodString;
|
|
210
|
+
validAfter: z.ZodString;
|
|
211
|
+
validBefore: z.ZodString;
|
|
212
|
+
nonce: z.ZodString;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
signature: z.ZodString;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
readonly 'erc-2612': z.ZodObject<{
|
|
217
|
+
chainId: z.ZodNumber;
|
|
218
|
+
target: z.ZodObject<{
|
|
219
|
+
depositAddress: z.ZodString;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
permit: z.ZodObject<{
|
|
222
|
+
owner: z.ZodString;
|
|
223
|
+
spender: z.ZodString;
|
|
224
|
+
value: z.ZodString;
|
|
225
|
+
nonce: z.ZodString;
|
|
226
|
+
deadline: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
signature: z.ZodString;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
export declare const GaslessSubStatusSchema: z.ZodObject<{
|
|
233
|
+
chainId: z.ZodNumber;
|
|
234
|
+
quoteIds: z.ZodArray<z.ZodString>;
|
|
235
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
236
|
+
intentHashes: z.ZodArray<z.ZodString>;
|
|
237
|
+
state: z.ZodEnum<{
|
|
238
|
+
pending: "pending";
|
|
239
|
+
published: "published";
|
|
240
|
+
failed: "failed";
|
|
241
|
+
submitted: "submitted";
|
|
242
|
+
}>;
|
|
243
|
+
}, z.core.$loose>;
|
|
244
|
+
export type GaslessSubStatus = z.input<typeof GaslessSubStatusSchema>;
|
|
245
|
+
export declare const GaslessJobSchema: z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
status: z.ZodEnum<{
|
|
248
|
+
unknown: "unknown";
|
|
249
|
+
pending: "pending";
|
|
250
|
+
processing: "processing";
|
|
251
|
+
published: "published";
|
|
252
|
+
partial: "partial";
|
|
253
|
+
failed: "failed";
|
|
254
|
+
}>;
|
|
255
|
+
signatureHash: z.ZodString;
|
|
256
|
+
subStatuses: z.ZodArray<z.ZodObject<{
|
|
257
|
+
chainId: z.ZodNumber;
|
|
258
|
+
quoteIds: z.ZodArray<z.ZodString>;
|
|
259
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
260
|
+
intentHashes: z.ZodArray<z.ZodString>;
|
|
261
|
+
state: z.ZodEnum<{
|
|
262
|
+
pending: "pending";
|
|
263
|
+
published: "published";
|
|
264
|
+
failed: "failed";
|
|
265
|
+
submitted: "submitted";
|
|
266
|
+
}>;
|
|
267
|
+
}, z.core.$loose>>;
|
|
268
|
+
createdAt: z.ZodNumber;
|
|
269
|
+
updatedAt: z.ZodNumber;
|
|
270
|
+
}, z.core.$loose>;
|
|
271
|
+
export type GaslessJob = z.input<typeof GaslessJobSchema>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GaslessJobSchema = exports.GaslessSubStatusSchema = exports.V1_SUBMIT_SCHEMAS_BY_SERVICE = exports.SUBMIT_TARGET_KIND_BY_SERVICE = exports.SUBMIT_SERVICES = exports.V1_SUBMIT_SCHEMAS = exports.Erc2612SubmitSchema = exports.Erc2612PermitSchema = exports.Erc3009DepositAddressSubmitSchema = exports.Erc3009IntentsSubmitSchema = exports.Erc3009SubmitSchema = exports.Erc3009AuthorizationSchema = exports.Permit2SubmitSchema = exports.Permit2PermitSingleSchema = exports.Permit3SubmitSchema = exports.Permit3PayloadSchema = exports.Permit3AllowanceSchema = exports.SubmitTargetSchema = exports.SubmitSignature = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const primitives_1 = require("../primitives");
|
|
7
|
+
const UINT48_MAX = 281474976710655;
|
|
8
|
+
const SIGNATURE_MESSAGE = 'signature must be 64 bytes (EIP-2098 compact) or 65 bytes (r||s||v)';
|
|
9
|
+
exports.SubmitSignature = primitives_1.HexBytes.min(2 + 64 * 2, SIGNATURE_MESSAGE).max(2 + 65 * 2, SIGNATURE_MESSAGE);
|
|
10
|
+
const QuoteTargetSchema = zod_1.z.strictObject({ quoteId: primitives_1.QuoteId });
|
|
11
|
+
const DepositAddressTargetSchema = zod_1.z.strictObject({ depositAddress: primitives_1.EvmAddress });
|
|
12
|
+
exports.SubmitTargetSchema = zod_1.z.union([QuoteTargetSchema, DepositAddressTargetSchema]);
|
|
13
|
+
exports.Permit3AllowanceSchema = zod_1.z.object({
|
|
14
|
+
chainId: primitives_1.ChainId,
|
|
15
|
+
token: primitives_1.EvmAddress,
|
|
16
|
+
amount: primitives_1.UintString,
|
|
17
|
+
});
|
|
18
|
+
exports.Permit3PayloadSchema = zod_1.z.object({
|
|
19
|
+
owner: primitives_1.EvmAddress,
|
|
20
|
+
salt: primitives_1.Bytes32,
|
|
21
|
+
deadline: primitives_1.UnixSeconds,
|
|
22
|
+
permits: zod_1.z.array(exports.Permit3AllowanceSchema).min(1),
|
|
23
|
+
});
|
|
24
|
+
exports.Permit3SubmitSchema = zod_1.z.object({
|
|
25
|
+
target: QuoteTargetSchema,
|
|
26
|
+
permit3: exports.Permit3PayloadSchema,
|
|
27
|
+
signature: exports.SubmitSignature,
|
|
28
|
+
});
|
|
29
|
+
exports.Permit2PermitSingleSchema = zod_1.z.object({
|
|
30
|
+
details: zod_1.z.object({
|
|
31
|
+
token: primitives_1.EvmAddress,
|
|
32
|
+
amount: primitives_1.UintString,
|
|
33
|
+
expiration: primitives_1.UnixSeconds,
|
|
34
|
+
nonce: zod_1.z.number().int().min(0).max(UINT48_MAX),
|
|
35
|
+
}),
|
|
36
|
+
spender: primitives_1.EvmAddress,
|
|
37
|
+
sigDeadline: primitives_1.UnixSeconds,
|
|
38
|
+
});
|
|
39
|
+
exports.Permit2SubmitSchema = zod_1.z.object({
|
|
40
|
+
target: QuoteTargetSchema,
|
|
41
|
+
permit2: exports.Permit2PermitSingleSchema,
|
|
42
|
+
signature: exports.SubmitSignature,
|
|
43
|
+
});
|
|
44
|
+
exports.Erc3009AuthorizationSchema = zod_1.z.object({
|
|
45
|
+
from: primitives_1.EvmAddress,
|
|
46
|
+
to: primitives_1.EvmAddress,
|
|
47
|
+
value: primitives_1.UintString,
|
|
48
|
+
validAfter: primitives_1.UintString,
|
|
49
|
+
validBefore: primitives_1.UintString,
|
|
50
|
+
nonce: primitives_1.Bytes32,
|
|
51
|
+
});
|
|
52
|
+
function refineErc3009ToBinding(body, ctx) {
|
|
53
|
+
if ('depositAddress' in body.target &&
|
|
54
|
+
!(0, primitives_1.isSameEvmAddress)(body.authorization.to, body.target.depositAddress)) {
|
|
55
|
+
ctx.addIssue({
|
|
56
|
+
code: 'custom',
|
|
57
|
+
path: ['authorization', 'to'],
|
|
58
|
+
message: 'signed `to` must equal target.depositAddress ' +
|
|
59
|
+
'(D10 #4; error code: deposit-address-mismatch)',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const erc3009Fields = {
|
|
64
|
+
chainId: primitives_1.ChainId,
|
|
65
|
+
authorization: exports.Erc3009AuthorizationSchema,
|
|
66
|
+
signature: exports.SubmitSignature,
|
|
67
|
+
};
|
|
68
|
+
exports.Erc3009SubmitSchema = zod_1.z
|
|
69
|
+
.object({ ...erc3009Fields, target: exports.SubmitTargetSchema })
|
|
70
|
+
.superRefine(refineErc3009ToBinding);
|
|
71
|
+
exports.Erc3009IntentsSubmitSchema = zod_1.z
|
|
72
|
+
.object({ ...erc3009Fields, target: QuoteTargetSchema })
|
|
73
|
+
.superRefine(refineErc3009ToBinding);
|
|
74
|
+
exports.Erc3009DepositAddressSubmitSchema = zod_1.z
|
|
75
|
+
.object({ ...erc3009Fields, target: DepositAddressTargetSchema })
|
|
76
|
+
.superRefine(refineErc3009ToBinding);
|
|
77
|
+
exports.Erc2612PermitSchema = zod_1.z.object({
|
|
78
|
+
owner: primitives_1.EvmAddress,
|
|
79
|
+
spender: primitives_1.EvmAddress,
|
|
80
|
+
value: primitives_1.UintString,
|
|
81
|
+
nonce: primitives_1.UintString,
|
|
82
|
+
deadline: primitives_1.UnixSeconds,
|
|
83
|
+
});
|
|
84
|
+
exports.Erc2612SubmitSchema = zod_1.z.object({
|
|
85
|
+
chainId: primitives_1.ChainId,
|
|
86
|
+
target: DepositAddressTargetSchema,
|
|
87
|
+
permit: exports.Erc2612PermitSchema,
|
|
88
|
+
signature: exports.SubmitSignature,
|
|
89
|
+
});
|
|
90
|
+
exports.V1_SUBMIT_SCHEMAS = {
|
|
91
|
+
permit3: exports.Permit3SubmitSchema,
|
|
92
|
+
permit2: exports.Permit2SubmitSchema,
|
|
93
|
+
'erc-3009': exports.Erc3009SubmitSchema,
|
|
94
|
+
'erc-2612': exports.Erc2612SubmitSchema,
|
|
95
|
+
};
|
|
96
|
+
exports.SUBMIT_SERVICES = ['intents', 'deposit-addresses'];
|
|
97
|
+
exports.SUBMIT_TARGET_KIND_BY_SERVICE = {
|
|
98
|
+
intents: 'quote',
|
|
99
|
+
'deposit-addresses': 'depositAddress',
|
|
100
|
+
};
|
|
101
|
+
exports.V1_SUBMIT_SCHEMAS_BY_SERVICE = {
|
|
102
|
+
intents: {
|
|
103
|
+
permit3: exports.Permit3SubmitSchema,
|
|
104
|
+
permit2: exports.Permit2SubmitSchema,
|
|
105
|
+
'erc-3009': exports.Erc3009IntentsSubmitSchema,
|
|
106
|
+
},
|
|
107
|
+
'deposit-addresses': {
|
|
108
|
+
'erc-3009': exports.Erc3009DepositAddressSubmitSchema,
|
|
109
|
+
'erc-2612': exports.Erc2612SubmitSchema,
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
exports.GaslessSubStatusSchema = zod_1.z.looseObject({
|
|
113
|
+
chainId: primitives_1.ChainId,
|
|
114
|
+
quoteIds: zod_1.z.array(primitives_1.QuoteId),
|
|
115
|
+
txHash: zod_1.z.string().nullable(),
|
|
116
|
+
intentHashes: zod_1.z.array(primitives_1.Bytes32),
|
|
117
|
+
state: enums_1.GaslessSubState,
|
|
118
|
+
});
|
|
119
|
+
exports.GaslessJobSchema = zod_1.z.looseObject({
|
|
120
|
+
id: primitives_1.GaslessId,
|
|
121
|
+
status: zod_1.z.enum(enums_1.GASLESS_JOB_STATUSES),
|
|
122
|
+
signatureHash: primitives_1.Bytes32,
|
|
123
|
+
subStatuses: zod_1.z.array(exports.GaslessSubStatusSchema),
|
|
124
|
+
createdAt: primitives_1.UnixSeconds,
|
|
125
|
+
updatedAt: primitives_1.UnixSeconds,
|
|
126
|
+
});
|
|
127
|
+
//# sourceMappingURL=submit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../src/v1/endpoints/submit.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,oCAKkB;AAClB,8CAUuB;AAEvB,MAAM,UAAU,GAAG,eAAe,CAAC;AAmBn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IAChB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAO,CAAC;IAE1B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,oBAAO,CAAC;IAC9B,KAAK,EAAE,uBAAe;CACvB,CAAC,CAAC;AAQU,QAAA,gBAAgB,GAAG,OAAC,CAAC,WAAW,CAAC;IAC5C,EAAE,EAAE,sBAAS;IACb,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,4BAAoB,CAAC;IACpC,aAAa,EAAE,oBAAO;IACtB,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,8BAAsB,CAAC;IAC5C,SAAS,EAAE,wBAAW;IACtB,SAAS,EAAE,wBAAW;CACvB,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SupportsSchema: z.ZodObject<{
|
|
3
|
+
quote: z.ZodArray<z.ZodEnum<{
|
|
4
|
+
permit3: "permit3";
|
|
5
|
+
permit2: "permit2";
|
|
6
|
+
"erc-3009": "erc-3009";
|
|
7
|
+
"erc-2612": "erc-2612";
|
|
8
|
+
}>>;
|
|
9
|
+
depositAddress: z.ZodArray<z.ZodEnum<{
|
|
10
|
+
permit3: "permit3";
|
|
11
|
+
permit2: "permit2";
|
|
12
|
+
"erc-3009": "erc-3009";
|
|
13
|
+
"erc-2612": "erc-2612";
|
|
14
|
+
}>>;
|
|
15
|
+
}, z.core.$loose>;
|
|
16
|
+
export declare const TokenEntrySchema: z.ZodObject<{
|
|
17
|
+
chainId: z.ZodNumber;
|
|
18
|
+
address: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
|
|
19
|
+
symbol: z.ZodNullable<z.ZodString>;
|
|
20
|
+
decimals: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
supports: z.ZodObject<{
|
|
22
|
+
quote: z.ZodArray<z.ZodEnum<{
|
|
23
|
+
permit3: "permit3";
|
|
24
|
+
permit2: "permit2";
|
|
25
|
+
"erc-3009": "erc-3009";
|
|
26
|
+
"erc-2612": "erc-2612";
|
|
27
|
+
}>>;
|
|
28
|
+
depositAddress: z.ZodArray<z.ZodEnum<{
|
|
29
|
+
permit3: "permit3";
|
|
30
|
+
permit2: "permit2";
|
|
31
|
+
"erc-3009": "erc-3009";
|
|
32
|
+
"erc-2612": "erc-2612";
|
|
33
|
+
}>>;
|
|
34
|
+
}, z.core.$loose>;
|
|
35
|
+
}, z.core.$loose>;
|
|
36
|
+
export type TokenEntry = z.input<typeof TokenEntrySchema>;
|
|
37
|
+
export declare const TokensResponseSchema: z.ZodObject<{
|
|
38
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
39
|
+
chainId: z.ZodNumber;
|
|
40
|
+
address: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
|
|
41
|
+
symbol: z.ZodNullable<z.ZodString>;
|
|
42
|
+
decimals: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
supports: z.ZodObject<{
|
|
44
|
+
quote: z.ZodArray<z.ZodEnum<{
|
|
45
|
+
permit3: "permit3";
|
|
46
|
+
permit2: "permit2";
|
|
47
|
+
"erc-3009": "erc-3009";
|
|
48
|
+
"erc-2612": "erc-2612";
|
|
49
|
+
}>>;
|
|
50
|
+
depositAddress: z.ZodArray<z.ZodEnum<{
|
|
51
|
+
permit3: "permit3";
|
|
52
|
+
permit2: "permit2";
|
|
53
|
+
"erc-3009": "erc-3009";
|
|
54
|
+
"erc-2612": "erc-2612";
|
|
55
|
+
}>>;
|
|
56
|
+
}, z.core.$loose>;
|
|
57
|
+
}, z.core.$loose>>;
|
|
58
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
59
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokensResponseSchema = exports.TokenEntrySchema = exports.SupportsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const primitives_1 = require("../primitives");
|
|
7
|
+
exports.SupportsSchema = zod_1.z.looseObject({
|
|
8
|
+
quote: zod_1.z.array(enums_1.SubmitStandard),
|
|
9
|
+
depositAddress: zod_1.z.array(enums_1.SubmitStandard),
|
|
10
|
+
});
|
|
11
|
+
exports.TokenEntrySchema = zod_1.z.looseObject({
|
|
12
|
+
chainId: primitives_1.ChainId,
|
|
13
|
+
address: primitives_1.AnyAddress,
|
|
14
|
+
symbol: zod_1.z.string().nullable(),
|
|
15
|
+
decimals: zod_1.z.number().int().nullable(),
|
|
16
|
+
supports: exports.SupportsSchema,
|
|
17
|
+
});
|
|
18
|
+
exports.TokensResponseSchema = zod_1.z.looseObject({
|
|
19
|
+
tokens: zod_1.z.array(exports.TokenEntrySchema),
|
|
20
|
+
nextCursor: zod_1.z.string().nullable(),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/v1/endpoints/tokens.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,oCAA0C;AAC1C,8CAAoD;AAavC,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"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SWAP_TYPES: readonly ["exact-in", "exact-out", "custom"];
|
|
3
|
+
export declare const SwapType: z.ZodEnum<{
|
|
4
|
+
custom: "custom";
|
|
5
|
+
"exact-in": "exact-in";
|
|
6
|
+
"exact-out": "exact-out";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const SwapTypeTolerant: z.ZodUnion<readonly [z.ZodEnum<{
|
|
9
|
+
custom: "custom";
|
|
10
|
+
"exact-in": "exact-in";
|
|
11
|
+
"exact-out": "exact-out";
|
|
12
|
+
}>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
13
|
+
unknown: string;
|
|
14
|
+
}, string>>]>;
|
|
15
|
+
export type SwapType = z.infer<typeof SwapType>;
|
|
16
|
+
export declare const GUARANTEES: readonly ["atomic-or-refund", "calls-execute-or-refund"];
|
|
17
|
+
export declare const Guarantee: z.ZodEnum<{
|
|
18
|
+
"atomic-or-refund": "atomic-or-refund";
|
|
19
|
+
"calls-execute-or-refund": "calls-execute-or-refund";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const GuaranteeTolerant: z.ZodUnion<readonly [z.ZodEnum<{
|
|
22
|
+
"atomic-or-refund": "atomic-or-refund";
|
|
23
|
+
"calls-execute-or-refund": "calls-execute-or-refund";
|
|
24
|
+
}>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
25
|
+
unknown: string;
|
|
26
|
+
}, string>>]>;
|
|
27
|
+
export type Guarantee = z.infer<typeof Guarantee>;
|
|
28
|
+
export declare const FEE_KINDS: readonly ["gas", "proving", "protocol", "gateway"];
|
|
29
|
+
export declare const FeeKind: z.ZodEnum<{
|
|
30
|
+
gas: "gas";
|
|
31
|
+
proving: "proving";
|
|
32
|
+
protocol: "protocol";
|
|
33
|
+
gateway: "gateway";
|
|
34
|
+
}>;
|
|
35
|
+
export declare const FeeKindTolerant: z.ZodUnion<readonly [z.ZodEnum<{
|
|
36
|
+
gas: "gas";
|
|
37
|
+
proving: "proving";
|
|
38
|
+
protocol: "protocol";
|
|
39
|
+
gateway: "gateway";
|
|
40
|
+
}>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
41
|
+
unknown: string;
|
|
42
|
+
}, string>>]>;
|
|
43
|
+
export type FeeKind = z.infer<typeof FeeKind>;
|
|
44
|
+
export declare const VISIBILITIES: readonly ["public", "private"];
|
|
45
|
+
export declare const Visibility: z.ZodEnum<{
|
|
46
|
+
public: "public";
|
|
47
|
+
private: "private";
|
|
48
|
+
}>;
|
|
49
|
+
export type Visibility = z.infer<typeof Visibility>;
|
|
50
|
+
export declare const CHAIN_TYPES: readonly ["evm", "svm", "tvm"];
|
|
51
|
+
export declare const ChainType: z.ZodEnum<{
|
|
52
|
+
evm: "evm";
|
|
53
|
+
svm: "svm";
|
|
54
|
+
tvm: "tvm";
|
|
55
|
+
}>;
|
|
56
|
+
export type ChainType = z.infer<typeof ChainType>;
|
|
57
|
+
export declare const CHAIN_ENCODINGS: readonly ["abi", "borsh"];
|
|
58
|
+
export declare const ChainEncoding: z.ZodEnum<{
|
|
59
|
+
abi: "abi";
|
|
60
|
+
borsh: "borsh";
|
|
61
|
+
}>;
|
|
62
|
+
export type ChainEncoding = z.infer<typeof ChainEncoding>;
|
|
63
|
+
export declare const CHAIN_STATUSES: readonly ["live", "paused"];
|
|
64
|
+
export declare const ChainStatus: z.ZodEnum<{
|
|
65
|
+
live: "live";
|
|
66
|
+
paused: "paused";
|
|
67
|
+
}>;
|
|
68
|
+
export type ChainStatus = z.infer<typeof ChainStatus>;
|
|
69
|
+
export declare const RELATED_INTENT_ROLES: readonly ["local", "bucket-candidate", "stitched-destination"];
|
|
70
|
+
export declare const RelatedIntentRole: z.ZodEnum<{
|
|
71
|
+
local: "local";
|
|
72
|
+
"bucket-candidate": "bucket-candidate";
|
|
73
|
+
"stitched-destination": "stitched-destination";
|
|
74
|
+
}>;
|
|
75
|
+
export declare const RelatedIntentRoleTolerant: z.ZodUnion<readonly [z.ZodEnum<{
|
|
76
|
+
local: "local";
|
|
77
|
+
"bucket-candidate": "bucket-candidate";
|
|
78
|
+
"stitched-destination": "stitched-destination";
|
|
79
|
+
}>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
80
|
+
unknown: string;
|
|
81
|
+
}, string>>]>;
|
|
82
|
+
export type RelatedIntentRole = z.infer<typeof RelatedIntentRole>;
|
|
83
|
+
export declare const STEP_KINDS: readonly ["swap", "bridge", "deposit", "transfer"];
|
|
84
|
+
export declare const StepKind: z.ZodEnum<{
|
|
85
|
+
swap: "swap";
|
|
86
|
+
bridge: "bridge";
|
|
87
|
+
deposit: "deposit";
|
|
88
|
+
transfer: "transfer";
|
|
89
|
+
}>;
|
|
90
|
+
export declare const StepKindTolerant: z.ZodUnion<readonly [z.ZodEnum<{
|
|
91
|
+
swap: "swap";
|
|
92
|
+
bridge: "bridge";
|
|
93
|
+
deposit: "deposit";
|
|
94
|
+
transfer: "transfer";
|
|
95
|
+
}>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
96
|
+
unknown: string;
|
|
97
|
+
}, string>>]>;
|
|
98
|
+
export type StepKind = z.infer<typeof StepKind>;
|
|
99
|
+
export declare const SUBMIT_STANDARDS: readonly ["permit3", "permit2", "erc-3009", "erc-2612"];
|
|
100
|
+
export declare const SubmitStandard: z.ZodEnum<{
|
|
101
|
+
permit3: "permit3";
|
|
102
|
+
permit2: "permit2";
|
|
103
|
+
"erc-3009": "erc-3009";
|
|
104
|
+
"erc-2612": "erc-2612";
|
|
105
|
+
}>;
|
|
106
|
+
export type SubmitStandard = z.infer<typeof SubmitStandard>;
|
|
107
|
+
export declare const STANDARDS_BY_TARGET: {
|
|
108
|
+
readonly quote: readonly ["permit3", "permit2", "erc-3009"];
|
|
109
|
+
readonly depositAddress: readonly ["erc-2612", "erc-3009"];
|
|
110
|
+
};
|
|
111
|
+
export declare const STATUS_TYPES: readonly ["intent", "quote", "gasless", "deposit-address"];
|
|
112
|
+
export declare const StatusType: z.ZodEnum<{
|
|
113
|
+
quote: "quote";
|
|
114
|
+
intent: "intent";
|
|
115
|
+
gasless: "gasless";
|
|
116
|
+
"deposit-address": "deposit-address";
|
|
117
|
+
}>;
|
|
118
|
+
export type StatusType = z.infer<typeof StatusType>;
|
|
119
|
+
export declare const GASLESS_JOB_STATUSES: readonly ["pending", "processing", "published", "partial", "failed", "unknown"];
|
|
120
|
+
export declare const GASLESS_SUB_STATES: readonly ["pending", "submitted", "published", "failed"];
|
|
121
|
+
export declare const GaslessSubState: z.ZodEnum<{
|
|
122
|
+
pending: "pending";
|
|
123
|
+
published: "published";
|
|
124
|
+
failed: "failed";
|
|
125
|
+
submitted: "submitted";
|
|
126
|
+
}>;
|
|
127
|
+
export type GaslessSubState = z.infer<typeof GaslessSubState>;
|
|
128
|
+
export declare const STATUS_VOCABULARY: {
|
|
129
|
+
readonly intent: readonly ["pending", "filled", "settled", "refunded", "refundable", "expired", "failed", "unknown"];
|
|
130
|
+
readonly quote: readonly ["active", "submitted", "expired", "unknown"];
|
|
131
|
+
readonly gasless: readonly ["pending", "processing", "published", "partial", "failed", "unknown"];
|
|
132
|
+
readonly 'deposit-address': readonly ["active", "expired", "unknown"];
|
|
133
|
+
};
|