@eco-foundation/api-schemas 0.7.0 → 0.9.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.
Files changed (33) hide show
  1. package/README.md +104 -13
  2. package/dist/fixtures/index.js +6 -6
  3. package/dist/fixtures/index.js.map +1 -1
  4. package/dist/fixtures/v1/deposit-addresses-create.request.gateway-erc20.json +1 -1
  5. package/dist/fixtures/v1/deposit-addresses-create.response.gateway-erc20.json +1 -1
  6. package/dist/fixtures/v1/deposit-addresses-lookup.response.default.json +1 -1
  7. package/dist/fixtures/v1/intents-status.response.quote-filled-detail.json +60 -0
  8. package/dist/fixtures/v1/{quotes-create.request.public-swap.json → quotes-create.request.swap.json} +4 -4
  9. package/dist/fixtures/v1/quotes-create.response.all-quotes.json +288 -81
  10. package/dist/fixtures/v1/quotes-create.response.swap.json +228 -0
  11. package/dist/generated/build-digest.json +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/openapi.js +18 -0
  14. package/dist/openapi.js.map +1 -1
  15. package/dist/v1/endpoints/deposit-addresses.d.ts +12 -12
  16. package/dist/v1/endpoints/deposit-addresses.js +9 -9
  17. package/dist/v1/endpoints/quotes.d.ts +344 -194
  18. package/dist/v1/endpoints/quotes.js +51 -61
  19. package/dist/v1/endpoints/quotes.js.map +1 -1
  20. package/dist/v1/endpoints/registry.d.ts +115 -77
  21. package/dist/v1/endpoints/routes.js +1 -1
  22. package/dist/v1/endpoints/routes.js.map +1 -1
  23. package/dist/v1/endpoints/status.d.ts +4 -0
  24. package/dist/v1/endpoints/status.js +1 -0
  25. package/dist/v1/endpoints/status.js.map +1 -1
  26. package/dist/v1/enums.d.ts +12 -30
  27. package/dist/v1/enums.js +10 -15
  28. package/dist/v1/enums.js.map +1 -1
  29. package/dist/v1/types.d.ts +43 -43
  30. package/openapi/v1.json +1079 -675
  31. package/package.json +1 -1
  32. package/dist/fixtures/v1/quotes-create.response.private-swap.json +0 -153
  33. package/dist/fixtures/v1/quotes-create.response.public-swap.json +0 -159
@@ -8,20 +8,19 @@
8
8
  "sideEffect": true,
9
9
  "payload": {
10
10
  "id": "quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f",
11
- "swapType": "exact-in",
12
- "visibility": "public",
13
- "guarantee": "atomic-or-refund",
11
+ "type": "exact-in",
14
12
  "source": {
15
13
  "chainId": 8453,
16
14
  "token": "0x1111111111111111111111111111111111111111",
17
15
  "amount": "1043221",
16
+ "funder": "0x3333333333333333333333333333333333333333",
18
17
  "symbol": "USDC",
19
18
  "decimals": 6
20
19
  },
21
20
  "destination": {
22
21
  "chainId": 10,
23
22
  "token": "0x2222222222222222222222222222222222222222",
24
- "amount": "1043221",
23
+ "amountOut": "1043221",
25
24
  "minAmountOut": "1038005",
26
25
  "recipient": "0x3333333333333333333333333333333333333333",
27
26
  "symbol": "USDC",
@@ -30,7 +29,7 @@
30
29
  "slippage": 0.005,
31
30
  "fees": [
32
31
  {
33
- "kind": "gas",
32
+ "type": "gas",
34
33
  "amount": "1200",
35
34
  "token": {
36
35
  "chainId": 8453,
@@ -43,8 +42,8 @@
43
42
  ],
44
43
  "steps": [
45
44
  {
46
- "kind": "swap",
47
- "tool": "uniswap-v3",
45
+ "type": "swap",
46
+ "provider": "uniswap-v3",
48
47
  "aggregator": "ecoswap",
49
48
  "from": {
50
49
  "chainId": 8453,
@@ -58,7 +57,7 @@
58
57
  },
59
58
  "fees": [
60
59
  {
61
- "kind": "protocol",
60
+ "type": "protocol",
62
61
  "amount": "221",
63
62
  "token": {
64
63
  "chainId": 8453,
@@ -69,11 +68,52 @@
69
68
  "estimate": false
70
69
  }
71
70
  ],
72
- "estimatedDurationSec": 3
71
+ "estimatedDurationSec": 3,
72
+ "intents": [
73
+ {
74
+ "role": "local",
75
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
76
+ "intent": {
77
+ "route": {
78
+ "salt": "0xabababababababababababababababababababababababababababababababab",
79
+ "deadline": 1767226200,
80
+ "source": 8453,
81
+ "destination": 10,
82
+ "portal": "0x2222222222222222222222222222222222222222",
83
+ "nativeAmount": "0",
84
+ "tokens": [
85
+ {
86
+ "token": "0x2222222222222222222222222222222222222222",
87
+ "amount": "1038005"
88
+ }
89
+ ],
90
+ "calls": [
91
+ {
92
+ "target": "0x2222222222222222222222222222222222222222",
93
+ "data": "0xbeef",
94
+ "value": "0"
95
+ }
96
+ ]
97
+ },
98
+ "reward": {
99
+ "deadline": 1767229800,
100
+ "creator": "0x3333333333333333333333333333333333333333",
101
+ "prover": "0x1111111111111111111111111111111111111111",
102
+ "nativeAmount": "0",
103
+ "tokens": [
104
+ {
105
+ "token": "0x1111111111111111111111111111111111111111",
106
+ "amount": "1043221"
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ }
112
+ ]
73
113
  },
74
114
  {
75
- "kind": "bridge",
76
- "tool": "eco",
115
+ "type": "bridge",
116
+ "provider": "eco",
77
117
  "from": {
78
118
  "chainId": 8453,
79
119
  "token": "0x1111111111111111111111111111111111111111",
@@ -85,19 +125,50 @@
85
125
  "amount": "1038005"
86
126
  },
87
127
  "fees": [],
88
- "estimatedDurationSec": 20
89
- }
90
- ],
91
- "relatedIntents": [
92
- {
93
- "role": "local",
94
- "intentHash": "0xabababababababababababababababababababababababababababababababab"
95
- },
96
- {
97
- "role": "bucket-candidate",
98
- "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
99
- "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
100
- "bucketIndex": 0
128
+ "estimatedDurationSec": 20,
129
+ "intents": [
130
+ {
131
+ "role": "bucket-candidate",
132
+ "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
133
+ "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
134
+ "bucketIndex": 0,
135
+ "intent": {
136
+ "route": {
137
+ "salt": "0xabababababababababababababababababababababababababababababababab",
138
+ "deadline": 1767226200,
139
+ "source": 8453,
140
+ "destination": 10,
141
+ "portal": "0x2222222222222222222222222222222222222222",
142
+ "nativeAmount": "0",
143
+ "tokens": [
144
+ {
145
+ "token": "0x2222222222222222222222222222222222222222",
146
+ "amount": "1038005"
147
+ }
148
+ ],
149
+ "calls": [
150
+ {
151
+ "target": "0x2222222222222222222222222222222222222222",
152
+ "data": "0xbeef",
153
+ "value": "0"
154
+ }
155
+ ]
156
+ },
157
+ "reward": {
158
+ "deadline": 1767229800,
159
+ "creator": "0x3333333333333333333333333333333333333333",
160
+ "prover": "0x1111111111111111111111111111111111111111",
161
+ "nativeAmount": "0",
162
+ "tokens": [
163
+ {
164
+ "token": "0x1111111111111111111111111111111111111111",
165
+ "amount": "1043221"
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ }
171
+ ]
101
172
  }
102
173
  ],
103
174
  "solver": {
@@ -107,7 +178,7 @@
107
178
  "intentHash": "0xabababababababababababababababababababababababababababababababab",
108
179
  "execution": {
109
180
  "transaction": {
110
- "kind": "evm",
181
+ "type": "evm",
111
182
  "chainId": 8453,
112
183
  "to": "0x1111111111111111111111111111111111111111",
113
184
  "data": "0xdeadbeef",
@@ -148,8 +219,6 @@
148
219
  ]
149
220
  }
150
221
  },
151
- "encodedRoute": "0xdead",
152
- "encodedReward": "0xbeef",
153
222
  "vault": "0x5555555555555555555555555555555555555555"
154
223
  },
155
224
  "expiresAt": 1767225600,
@@ -157,20 +226,19 @@
157
226
  "quotes": [
158
227
  {
159
228
  "id": "quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f",
160
- "swapType": "exact-in",
161
- "visibility": "public",
162
- "guarantee": "atomic-or-refund",
229
+ "type": "exact-in",
163
230
  "source": {
164
231
  "chainId": 8453,
165
232
  "token": "0x1111111111111111111111111111111111111111",
166
233
  "amount": "1043221",
234
+ "funder": "0x3333333333333333333333333333333333333333",
167
235
  "symbol": "USDC",
168
236
  "decimals": 6
169
237
  },
170
238
  "destination": {
171
239
  "chainId": 10,
172
240
  "token": "0x2222222222222222222222222222222222222222",
173
- "amount": "1043221",
241
+ "amountOut": "1043221",
174
242
  "minAmountOut": "1038005",
175
243
  "recipient": "0x3333333333333333333333333333333333333333",
176
244
  "symbol": "USDC",
@@ -179,7 +247,7 @@
179
247
  "slippage": 0.005,
180
248
  "fees": [
181
249
  {
182
- "kind": "gas",
250
+ "type": "gas",
183
251
  "amount": "1200",
184
252
  "token": {
185
253
  "chainId": 8453,
@@ -192,8 +260,8 @@
192
260
  ],
193
261
  "steps": [
194
262
  {
195
- "kind": "swap",
196
- "tool": "uniswap-v3",
263
+ "type": "swap",
264
+ "provider": "uniswap-v3",
197
265
  "aggregator": "ecoswap",
198
266
  "from": {
199
267
  "chainId": 8453,
@@ -207,7 +275,7 @@
207
275
  },
208
276
  "fees": [
209
277
  {
210
- "kind": "protocol",
278
+ "type": "protocol",
211
279
  "amount": "221",
212
280
  "token": {
213
281
  "chainId": 8453,
@@ -218,11 +286,52 @@
218
286
  "estimate": false
219
287
  }
220
288
  ],
221
- "estimatedDurationSec": 3
289
+ "estimatedDurationSec": 3,
290
+ "intents": [
291
+ {
292
+ "role": "local",
293
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
294
+ "intent": {
295
+ "route": {
296
+ "salt": "0xabababababababababababababababababababababababababababababababab",
297
+ "deadline": 1767226200,
298
+ "source": 8453,
299
+ "destination": 10,
300
+ "portal": "0x2222222222222222222222222222222222222222",
301
+ "nativeAmount": "0",
302
+ "tokens": [
303
+ {
304
+ "token": "0x2222222222222222222222222222222222222222",
305
+ "amount": "1038005"
306
+ }
307
+ ],
308
+ "calls": [
309
+ {
310
+ "target": "0x2222222222222222222222222222222222222222",
311
+ "data": "0xbeef",
312
+ "value": "0"
313
+ }
314
+ ]
315
+ },
316
+ "reward": {
317
+ "deadline": 1767229800,
318
+ "creator": "0x3333333333333333333333333333333333333333",
319
+ "prover": "0x1111111111111111111111111111111111111111",
320
+ "nativeAmount": "0",
321
+ "tokens": [
322
+ {
323
+ "token": "0x1111111111111111111111111111111111111111",
324
+ "amount": "1043221"
325
+ }
326
+ ]
327
+ }
328
+ }
329
+ }
330
+ ]
222
331
  },
223
332
  {
224
- "kind": "bridge",
225
- "tool": "eco",
333
+ "type": "bridge",
334
+ "provider": "eco",
226
335
  "from": {
227
336
  "chainId": 8453,
228
337
  "token": "0x1111111111111111111111111111111111111111",
@@ -234,19 +343,50 @@
234
343
  "amount": "1038005"
235
344
  },
236
345
  "fees": [],
237
- "estimatedDurationSec": 20
238
- }
239
- ],
240
- "relatedIntents": [
241
- {
242
- "role": "local",
243
- "intentHash": "0xabababababababababababababababababababababababababababababababab"
244
- },
245
- {
246
- "role": "bucket-candidate",
247
- "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
248
- "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
249
- "bucketIndex": 0
346
+ "estimatedDurationSec": 20,
347
+ "intents": [
348
+ {
349
+ "role": "bucket-candidate",
350
+ "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
351
+ "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
352
+ "bucketIndex": 0,
353
+ "intent": {
354
+ "route": {
355
+ "salt": "0xabababababababababababababababababababababababababababababababab",
356
+ "deadline": 1767226200,
357
+ "source": 8453,
358
+ "destination": 10,
359
+ "portal": "0x2222222222222222222222222222222222222222",
360
+ "nativeAmount": "0",
361
+ "tokens": [
362
+ {
363
+ "token": "0x2222222222222222222222222222222222222222",
364
+ "amount": "1038005"
365
+ }
366
+ ],
367
+ "calls": [
368
+ {
369
+ "target": "0x2222222222222222222222222222222222222222",
370
+ "data": "0xbeef",
371
+ "value": "0"
372
+ }
373
+ ]
374
+ },
375
+ "reward": {
376
+ "deadline": 1767229800,
377
+ "creator": "0x3333333333333333333333333333333333333333",
378
+ "prover": "0x1111111111111111111111111111111111111111",
379
+ "nativeAmount": "0",
380
+ "tokens": [
381
+ {
382
+ "token": "0x1111111111111111111111111111111111111111",
383
+ "amount": "1043221"
384
+ }
385
+ ]
386
+ }
387
+ }
388
+ }
389
+ ]
250
390
  }
251
391
  ],
252
392
  "solver": {
@@ -256,7 +396,7 @@
256
396
  "intentHash": "0xabababababababababababababababababababababababababababababababab",
257
397
  "execution": {
258
398
  "transaction": {
259
- "kind": "evm",
399
+ "type": "evm",
260
400
  "chainId": 8453,
261
401
  "to": "0x1111111111111111111111111111111111111111",
262
402
  "data": "0xdeadbeef",
@@ -297,8 +437,6 @@
297
437
  ]
298
438
  }
299
439
  },
300
- "encodedRoute": "0xdead",
301
- "encodedReward": "0xbeef",
302
440
  "vault": "0x5555555555555555555555555555555555555555"
303
441
  },
304
442
  "expiresAt": 1767225600,
@@ -306,20 +444,19 @@
306
444
  },
307
445
  {
308
446
  "id": "quote:1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
309
- "swapType": "exact-in",
310
- "visibility": "public",
311
- "guarantee": "atomic-or-refund",
447
+ "type": "exact-in",
312
448
  "source": {
313
449
  "chainId": 8453,
314
450
  "token": "0x1111111111111111111111111111111111111111",
315
451
  "amount": "1043221",
452
+ "funder": "0x3333333333333333333333333333333333333333",
316
453
  "symbol": "USDC",
317
454
  "decimals": 6
318
455
  },
319
456
  "destination": {
320
457
  "chainId": 10,
321
458
  "token": "0x2222222222222222222222222222222222222222",
322
- "amount": "1041000",
459
+ "amountOut": "1041000",
323
460
  "minAmountOut": "1035795",
324
461
  "recipient": "0x3333333333333333333333333333333333333333",
325
462
  "symbol": "USDC",
@@ -328,7 +465,7 @@
328
465
  "slippage": 0.005,
329
466
  "fees": [
330
467
  {
331
- "kind": "gas",
468
+ "type": "gas",
332
469
  "amount": "1200",
333
470
  "token": {
334
471
  "chainId": 8453,
@@ -341,8 +478,8 @@
341
478
  ],
342
479
  "steps": [
343
480
  {
344
- "kind": "swap",
345
- "tool": "uniswap-v3",
481
+ "type": "swap",
482
+ "provider": "uniswap-v3",
346
483
  "aggregator": "ecoswap",
347
484
  "from": {
348
485
  "chainId": 8453,
@@ -356,7 +493,7 @@
356
493
  },
357
494
  "fees": [
358
495
  {
359
- "kind": "protocol",
496
+ "type": "protocol",
360
497
  "amount": "221",
361
498
  "token": {
362
499
  "chainId": 8453,
@@ -367,11 +504,52 @@
367
504
  "estimate": false
368
505
  }
369
506
  ],
370
- "estimatedDurationSec": 3
507
+ "estimatedDurationSec": 3,
508
+ "intents": [
509
+ {
510
+ "role": "local",
511
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
512
+ "intent": {
513
+ "route": {
514
+ "salt": "0xabababababababababababababababababababababababababababababababab",
515
+ "deadline": 1767226200,
516
+ "source": 8453,
517
+ "destination": 10,
518
+ "portal": "0x2222222222222222222222222222222222222222",
519
+ "nativeAmount": "0",
520
+ "tokens": [
521
+ {
522
+ "token": "0x2222222222222222222222222222222222222222",
523
+ "amount": "1038005"
524
+ }
525
+ ],
526
+ "calls": [
527
+ {
528
+ "target": "0x2222222222222222222222222222222222222222",
529
+ "data": "0xbeef",
530
+ "value": "0"
531
+ }
532
+ ]
533
+ },
534
+ "reward": {
535
+ "deadline": 1767229800,
536
+ "creator": "0x3333333333333333333333333333333333333333",
537
+ "prover": "0x1111111111111111111111111111111111111111",
538
+ "nativeAmount": "0",
539
+ "tokens": [
540
+ {
541
+ "token": "0x1111111111111111111111111111111111111111",
542
+ "amount": "1043221"
543
+ }
544
+ ]
545
+ }
546
+ }
547
+ }
548
+ ]
371
549
  },
372
550
  {
373
- "kind": "bridge",
374
- "tool": "eco",
551
+ "type": "bridge",
552
+ "provider": "eco",
375
553
  "from": {
376
554
  "chainId": 8453,
377
555
  "token": "0x1111111111111111111111111111111111111111",
@@ -383,19 +561,50 @@
383
561
  "amount": "1038005"
384
562
  },
385
563
  "fees": [],
386
- "estimatedDurationSec": 20
387
- }
388
- ],
389
- "relatedIntents": [
390
- {
391
- "role": "local",
392
- "intentHash": "0xabababababababababababababababababababababababababababababababab"
393
- },
394
- {
395
- "role": "bucket-candidate",
396
- "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
397
- "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
398
- "bucketIndex": 0
564
+ "estimatedDurationSec": 20,
565
+ "intents": [
566
+ {
567
+ "role": "bucket-candidate",
568
+ "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
569
+ "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
570
+ "bucketIndex": 0,
571
+ "intent": {
572
+ "route": {
573
+ "salt": "0xabababababababababababababababababababababababababababababababab",
574
+ "deadline": 1767226200,
575
+ "source": 8453,
576
+ "destination": 10,
577
+ "portal": "0x2222222222222222222222222222222222222222",
578
+ "nativeAmount": "0",
579
+ "tokens": [
580
+ {
581
+ "token": "0x2222222222222222222222222222222222222222",
582
+ "amount": "1038005"
583
+ }
584
+ ],
585
+ "calls": [
586
+ {
587
+ "target": "0x2222222222222222222222222222222222222222",
588
+ "data": "0xbeef",
589
+ "value": "0"
590
+ }
591
+ ]
592
+ },
593
+ "reward": {
594
+ "deadline": 1767229800,
595
+ "creator": "0x3333333333333333333333333333333333333333",
596
+ "prover": "0x1111111111111111111111111111111111111111",
597
+ "nativeAmount": "0",
598
+ "tokens": [
599
+ {
600
+ "token": "0x1111111111111111111111111111111111111111",
601
+ "amount": "1043221"
602
+ }
603
+ ]
604
+ }
605
+ }
606
+ }
607
+ ]
399
608
  }
400
609
  ],
401
610
  "solver": {
@@ -405,7 +614,7 @@
405
614
  "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
406
615
  "execution": {
407
616
  "transaction": {
408
- "kind": "evm",
617
+ "type": "evm",
409
618
  "chainId": 8453,
410
619
  "to": "0x1111111111111111111111111111111111111111",
411
620
  "data": "0xdeadbeef",
@@ -446,8 +655,6 @@
446
655
  ]
447
656
  }
448
657
  },
449
- "encodedRoute": "0xdead",
450
- "encodedReward": "0xbeef",
451
658
  "vault": "0x7777777777777777777777777777777777777777"
452
659
  },
453
660
  "expiresAt": 1767225600,