@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.
Files changed (47) hide show
  1. package/README.md +393 -10
  2. package/dist/fixtures/index.js +2 -2
  3. package/dist/fixtures/index.js.map +1 -1
  4. package/dist/fixtures/v1/intents-submit-permit2.request.quote-target.json +4 -3
  5. package/dist/fixtures/v1/intents-submit-permit3.request.quote-target.json +8 -3
  6. package/dist/fixtures/v1/quotes-create.response.all-quotes.json +6 -3
  7. package/dist/fixtures/v1/quotes-create.response.private-swap.json +2 -1
  8. package/dist/fixtures/v1/quotes-create.response.public-swap.json +2 -1
  9. package/dist/fixtures/v1/tokens-list.response.default.json +1 -1
  10. package/dist/generated/build-digest.json +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/v1/endpoints/chains.d.ts +7 -0
  13. package/dist/v1/endpoints/chains.js +5 -1
  14. package/dist/v1/endpoints/chains.js.map +1 -1
  15. package/dist/v1/endpoints/deposit-addresses.js +1 -1
  16. package/dist/v1/endpoints/deposit-addresses.js.map +1 -1
  17. package/dist/v1/endpoints/quotes.d.ts +7 -1
  18. package/dist/v1/endpoints/quotes.js +42 -6
  19. package/dist/v1/endpoints/quotes.js.map +1 -1
  20. package/dist/v1/endpoints/registry.d.ts +114 -21
  21. package/dist/v1/endpoints/registry.js +4 -2
  22. package/dist/v1/endpoints/registry.js.map +1 -1
  23. package/dist/v1/endpoints/status.d.ts +211 -26
  24. package/dist/v1/endpoints/status.js +39 -7
  25. package/dist/v1/endpoints/status.js.map +1 -1
  26. package/dist/v1/endpoints/submit.d.ts +43 -24
  27. package/dist/v1/endpoints/submit.js +16 -9
  28. package/dist/v1/endpoints/submit.js.map +1 -1
  29. package/dist/v1/endpoints/tokens.d.ts +7 -0
  30. package/dist/v1/endpoints/tokens.js +5 -1
  31. package/dist/v1/endpoints/tokens.js.map +1 -1
  32. package/dist/v1/enums.d.ts +2 -1
  33. package/dist/v1/enums.js +1 -1
  34. package/dist/v1/enums.js.map +1 -1
  35. package/dist/v1/errors/catalog.d.ts +14 -0
  36. package/dist/v1/errors/catalog.js +3 -1
  37. package/dist/v1/errors/catalog.js.map +1 -1
  38. package/dist/v1/errors/problem.d.ts +10 -0
  39. package/dist/v1/errors/problem.js +20 -10
  40. package/dist/v1/errors/problem.js.map +1 -1
  41. package/dist/v1/primitives.d.ts +10 -1
  42. package/dist/v1/primitives.js +16 -1
  43. package/dist/v1/primitives.js.map +1 -1
  44. package/dist/v1/types.d.ts +36 -1
  45. package/errors/catalog.lock.json +10 -0
  46. package/openapi/v1.json +672 -127
  47. package/package.json +19 -16
package/openapi/v1.json CHANGED
@@ -85,7 +85,8 @@
85
85
  "amount": {
86
86
  "type": "string",
87
87
  "maxLength": 78,
88
- "pattern": "^(0|[1-9]\\d*)$"
88
+ "pattern": "^(0|[1-9]\\d*)$",
89
+ "description": "Base-10 unsigned integer string in smallest units; must be greater than 0"
89
90
  }
90
91
  },
91
92
  "required": [
@@ -129,7 +130,8 @@
129
130
  "amount": {
130
131
  "type": "string",
131
132
  "maxLength": 78,
132
- "pattern": "^(0|[1-9]\\d*)$"
133
+ "pattern": "^(0|[1-9]\\d*)$",
134
+ "description": "Base-10 unsigned integer string in smallest units; must be greater than 0"
133
135
  },
134
136
  "recipient": {
135
137
  "anyOf": [
@@ -288,7 +290,8 @@
288
290
  },
289
291
  "slippage": {
290
292
  "type": "number",
291
- "minimum": 0,
293
+ "description": "Decimal fraction of the destination amount: 0.005 = 0.5%. Range 0.0001-1; a percent-style 0.5 would mean 50%.",
294
+ "minimum": 0.0001,
292
295
  "maximum": 1
293
296
  },
294
297
  "dappId": {
@@ -311,11 +314,6 @@
311
314
  "private"
312
315
  ]
313
316
  },
314
- "maxCallDataSize": {
315
- "type": "integer",
316
- "exclusiveMinimum": 0,
317
- "maximum": 9007199254740991
318
- },
319
317
  "allQuotes": {
320
318
  "type": "boolean"
321
319
  }
@@ -546,7 +544,8 @@
546
544
  },
547
545
  "slippage": {
548
546
  "type": "number",
549
- "minimum": 0
547
+ "minimum": 0,
548
+ "description": "Tolerance actually bound into destination.minAmountOut, as a decimal fraction"
550
549
  },
551
550
  "fees": {
552
551
  "type": "array",
@@ -1370,6 +1369,38 @@
1370
1369
  "type": "null"
1371
1370
  }
1372
1371
  ]
1372
+ },
1373
+ "vault": {
1374
+ "description": "This quote's intent vault: the CREATE2 address the source-chain Portal funds the intent through, derived from the quoted intent (route.salt included) — it changes whenever the salt does. It is the value to sign as erc-3009 authorization.to, permit2 spender and every permit3 leg account; a submit whose signed counterparty differs is rejected with vault-mismatch. Not case-normalized: compare it case-insensitively (isSameEvmAddress), never with ===, since a producer may publish EIP-55 checksummed while a signer sends lowercase. EVM source chains only: null or absent where the producer does not derive it (an SVM source, where the vault is a PDA).",
1375
+ "anyOf": [
1376
+ {
1377
+ "anyOf": [
1378
+ {
1379
+ "type": "string",
1380
+ "pattern": "^0x[0-9a-fA-F]{40}$"
1381
+ },
1382
+ {
1383
+ "anyOf": [
1384
+ {
1385
+ "type": "string",
1386
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
1387
+ },
1388
+ {
1389
+ "type": "string",
1390
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
1391
+ }
1392
+ ]
1393
+ },
1394
+ {
1395
+ "type": "string",
1396
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
1397
+ }
1398
+ ]
1399
+ },
1400
+ {
1401
+ "type": "null"
1402
+ }
1403
+ ]
1373
1404
  }
1374
1405
  },
1375
1406
  "required": [
@@ -1606,7 +1637,8 @@
1606
1637
  },
1607
1638
  "slippage": {
1608
1639
  "type": "number",
1609
- "minimum": 0
1640
+ "minimum": 0,
1641
+ "description": "Tolerance actually bound into destination.minAmountOut, as a decimal fraction"
1610
1642
  },
1611
1643
  "fees": {
1612
1644
  "type": "array",
@@ -2430,6 +2462,38 @@
2430
2462
  "type": "null"
2431
2463
  }
2432
2464
  ]
2465
+ },
2466
+ "vault": {
2467
+ "description": "This quote's intent vault: the CREATE2 address the source-chain Portal funds the intent through, derived from the quoted intent (route.salt included) — it changes whenever the salt does. It is the value to sign as erc-3009 authorization.to, permit2 spender and every permit3 leg account; a submit whose signed counterparty differs is rejected with vault-mismatch. Not case-normalized: compare it case-insensitively (isSameEvmAddress), never with ===, since a producer may publish EIP-55 checksummed while a signer sends lowercase. EVM source chains only: null or absent where the producer does not derive it (an SVM source, where the vault is a PDA).",
2468
+ "anyOf": [
2469
+ {
2470
+ "anyOf": [
2471
+ {
2472
+ "type": "string",
2473
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2474
+ },
2475
+ {
2476
+ "anyOf": [
2477
+ {
2478
+ "type": "string",
2479
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
2480
+ },
2481
+ {
2482
+ "type": "string",
2483
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
2484
+ }
2485
+ ]
2486
+ },
2487
+ {
2488
+ "type": "string",
2489
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
2490
+ }
2491
+ ]
2492
+ },
2493
+ {
2494
+ "type": "null"
2495
+ }
2496
+ ]
2433
2497
  }
2434
2498
  },
2435
2499
  "required": [
@@ -2517,10 +2581,10 @@
2517
2581
  }
2518
2582
  }
2519
2583
  },
2520
- "/v1/intents/submit/permit3": {
2584
+ "/v1/intents/submit/erc-3009": {
2521
2585
  "post": {
2522
- "operationId": "intents.submit.permit3",
2523
- "summary": "Submit a signed permit3 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
2586
+ "operationId": "intents.submit.erc-3009",
2587
+ "summary": "Submit a signed erc-3009 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
2524
2588
  "tags": [
2525
2589
  "intents",
2526
2590
  "stable"
@@ -2532,69 +2596,49 @@
2532
2596
  "schema": {
2533
2597
  "type": "object",
2534
2598
  "properties": {
2535
- "target": {
2536
- "type": "object",
2537
- "properties": {
2538
- "quoteId": {
2539
- "type": "string",
2540
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
2541
- }
2542
- },
2543
- "required": [
2544
- "quoteId"
2545
- ],
2546
- "additionalProperties": false
2599
+ "chainId": {
2600
+ "type": "integer",
2601
+ "exclusiveMinimum": 0,
2602
+ "maximum": 9007199254740991
2547
2603
  },
2548
- "permit3": {
2604
+ "authorization": {
2549
2605
  "type": "object",
2550
2606
  "properties": {
2551
- "owner": {
2607
+ "from": {
2552
2608
  "type": "string",
2553
2609
  "pattern": "^0x[0-9a-fA-F]{40}$"
2554
2610
  },
2555
- "salt": {
2611
+ "to": {
2556
2612
  "type": "string",
2557
- "pattern": "^0x[0-9a-fA-F]{64}$"
2613
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2558
2614
  },
2559
- "deadline": {
2560
- "type": "integer",
2561
- "minimum": 0,
2562
- "maximum": 4102444800
2615
+ "value": {
2616
+ "type": "string",
2617
+ "maxLength": 78,
2618
+ "pattern": "^(0|[1-9]\\d*)$"
2563
2619
  },
2564
- "permits": {
2565
- "minItems": 1,
2566
- "type": "array",
2567
- "items": {
2568
- "type": "object",
2569
- "properties": {
2570
- "chainId": {
2571
- "type": "integer",
2572
- "exclusiveMinimum": 0,
2573
- "maximum": 9007199254740991
2574
- },
2575
- "token": {
2576
- "type": "string",
2577
- "pattern": "^0x[0-9a-fA-F]{40}$"
2578
- },
2579
- "amount": {
2580
- "type": "string",
2581
- "maxLength": 78,
2582
- "pattern": "^(0|[1-9]\\d*)$"
2583
- }
2584
- },
2585
- "required": [
2586
- "chainId",
2587
- "token",
2588
- "amount"
2589
- ]
2590
- }
2620
+ "validAfter": {
2621
+ "type": "string",
2622
+ "maxLength": 78,
2623
+ "pattern": "^(0|[1-9]\\d*)$"
2624
+ },
2625
+ "validBefore": {
2626
+ "type": "string",
2627
+ "maxLength": 78,
2628
+ "pattern": "^(0|[1-9]\\d*)$"
2629
+ },
2630
+ "nonce": {
2631
+ "type": "string",
2632
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2591
2633
  }
2592
2634
  },
2593
2635
  "required": [
2594
- "owner",
2595
- "salt",
2596
- "deadline",
2597
- "permits"
2636
+ "from",
2637
+ "to",
2638
+ "value",
2639
+ "validAfter",
2640
+ "validBefore",
2641
+ "nonce"
2598
2642
  ]
2599
2643
  },
2600
2644
  "signature": {
@@ -2602,12 +2646,26 @@
2602
2646
  "minLength": 130,
2603
2647
  "maxLength": 132,
2604
2648
  "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
2649
+ },
2650
+ "target": {
2651
+ "type": "object",
2652
+ "properties": {
2653
+ "quoteId": {
2654
+ "type": "string",
2655
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
2656
+ }
2657
+ },
2658
+ "required": [
2659
+ "quoteId"
2660
+ ],
2661
+ "additionalProperties": false
2605
2662
  }
2606
2663
  },
2607
2664
  "required": [
2608
- "target",
2609
- "permit3",
2610
- "signature"
2665
+ "chainId",
2666
+ "authorization",
2667
+ "signature",
2668
+ "target"
2611
2669
  ]
2612
2670
  }
2613
2671
  }
@@ -2746,6 +2804,11 @@
2746
2804
  "schema": {
2747
2805
  "type": "object",
2748
2806
  "properties": {
2807
+ "chainId": {
2808
+ "type": "integer",
2809
+ "exclusiveMinimum": 0,
2810
+ "maximum": 9007199254740991
2811
+ },
2749
2812
  "target": {
2750
2813
  "type": "object",
2751
2814
  "properties": {
@@ -2777,7 +2840,8 @@
2777
2840
  "expiration": {
2778
2841
  "type": "integer",
2779
2842
  "minimum": 0,
2780
- "maximum": 4102444800
2843
+ "maximum": 281474976710655,
2844
+ "description": "Permit2 allowance expiration (uint48, Unix seconds)"
2781
2845
  },
2782
2846
  "nonce": {
2783
2847
  "type": "integer",
@@ -2794,12 +2858,14 @@
2794
2858
  },
2795
2859
  "spender": {
2796
2860
  "type": "string",
2797
- "pattern": "^0x[0-9a-fA-F]{40}$"
2861
+ "pattern": "^0x[0-9a-fA-F]{40}$",
2862
+ "description": "The Permit2 spender — on a quote target, the quote's execution.vault"
2798
2863
  },
2799
2864
  "sigDeadline": {
2800
- "type": "integer",
2801
- "minimum": 0,
2802
- "maximum": 4102444800
2865
+ "type": "string",
2866
+ "maxLength": 78,
2867
+ "pattern": "^(0|[1-9]\\d*)$",
2868
+ "description": "Signature deadline (uint256 Unix seconds, decimal string; max-uint = no expiry)"
2803
2869
  }
2804
2870
  },
2805
2871
  "required": [
@@ -2816,6 +2882,7 @@
2816
2882
  }
2817
2883
  },
2818
2884
  "required": [
2885
+ "chainId",
2819
2886
  "target",
2820
2887
  "permit2",
2821
2888
  "signature"
@@ -2942,10 +3009,10 @@
2942
3009
  }
2943
3010
  }
2944
3011
  },
2945
- "/v1/intents/submit/erc-3009": {
3012
+ "/v1/intents/submit/permit3": {
2946
3013
  "post": {
2947
- "operationId": "intents.submit.erc-3009",
2948
- "summary": "Submit a signed erc-3009 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
3014
+ "operationId": "intents.submit.permit3",
3015
+ "summary": "Submit a signed permit3 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
2949
3016
  "tags": [
2950
3017
  "intents",
2951
3018
  "stable"
@@ -2957,76 +3024,114 @@
2957
3024
  "schema": {
2958
3025
  "type": "object",
2959
3026
  "properties": {
2960
- "chainId": {
2961
- "type": "integer",
2962
- "exclusiveMinimum": 0,
2963
- "maximum": 9007199254740991
3027
+ "target": {
3028
+ "type": "object",
3029
+ "properties": {
3030
+ "quoteId": {
3031
+ "type": "string",
3032
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
3033
+ }
3034
+ },
3035
+ "required": [
3036
+ "quoteId"
3037
+ ],
3038
+ "additionalProperties": false
2964
3039
  },
2965
- "authorization": {
3040
+ "permit3": {
2966
3041
  "type": "object",
2967
3042
  "properties": {
2968
- "from": {
3043
+ "owner": {
2969
3044
  "type": "string",
2970
3045
  "pattern": "^0x[0-9a-fA-F]{40}$"
2971
3046
  },
2972
- "to": {
3047
+ "permitContract": {
2973
3048
  "type": "string",
2974
- "pattern": "^0x[0-9a-fA-F]{40}$"
3049
+ "pattern": "^0x[0-9a-fA-F]{40}$",
3050
+ "description": "The Permit3 contract the legs were signed against (the EIP-712 verifyingContract)"
2975
3051
  },
2976
- "value": {
3052
+ "salt": {
2977
3053
  "type": "string",
2978
- "maxLength": 78,
2979
- "pattern": "^(0|[1-9]\\d*)$"
3054
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2980
3055
  },
2981
- "validAfter": {
2982
- "type": "string",
2983
- "maxLength": 78,
2984
- "pattern": "^(0|[1-9]\\d*)$"
3056
+ "deadline": {
3057
+ "type": "integer",
3058
+ "minimum": 0,
3059
+ "maximum": 4102444800
2985
3060
  },
2986
- "validBefore": {
2987
- "type": "string",
2988
- "maxLength": 78,
2989
- "pattern": "^(0|[1-9]\\d*)$"
3061
+ "timestamp": {
3062
+ "type": "integer",
3063
+ "minimum": 0,
3064
+ "maximum": 281474976710655,
3065
+ "description": "Permit3 ordering timestamp (uint48, Unix seconds)"
2990
3066
  },
2991
- "nonce": {
3067
+ "merkleRoot": {
2992
3068
  "type": "string",
2993
- "pattern": "^0x[0-9a-fA-F]{64}$"
2994
- }
2995
- },
2996
- "required": [
2997
- "from",
2998
- "to",
2999
- "value",
3000
- "validAfter",
3001
- "validBefore",
3002
- "nonce"
3003
- ]
3004
- },
3005
- "signature": {
3006
- "type": "string",
3007
- "minLength": 130,
3008
- "maxLength": 132,
3009
- "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
3010
- },
3011
- "target": {
3012
- "type": "object",
3013
- "properties": {
3014
- "quoteId": {
3015
- "type": "string",
3016
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
3069
+ "pattern": "^0x[0-9a-fA-F]{64}$",
3070
+ "description": "Merkle root over the legs, as signed"
3071
+ },
3072
+ "permits": {
3073
+ "minItems": 1,
3074
+ "type": "array",
3075
+ "items": {
3076
+ "type": "object",
3077
+ "properties": {
3078
+ "chainId": {
3079
+ "type": "integer",
3080
+ "exclusiveMinimum": 0,
3081
+ "maximum": 9007199254740991
3082
+ },
3083
+ "token": {
3084
+ "type": "string",
3085
+ "pattern": "^0x[0-9a-fA-F]{40}$"
3086
+ },
3087
+ "amount": {
3088
+ "type": "string",
3089
+ "maxLength": 78,
3090
+ "pattern": "^(0|[1-9]\\d*)$"
3091
+ },
3092
+ "account": {
3093
+ "type": "string",
3094
+ "pattern": "^0x[0-9a-fA-F]{40}$",
3095
+ "description": "Recipient (transfer mode) or spender (allowance mode) — on a quote target, the quote's execution.vault"
3096
+ },
3097
+ "modeOrExpiration": {
3098
+ "type": "integer",
3099
+ "minimum": 0,
3100
+ "maximum": 281474976710655,
3101
+ "description": "0 = transfer mode (funds pushed to account); any other value = allowance mode with this expiration, Unix seconds"
3102
+ }
3103
+ },
3104
+ "required": [
3105
+ "chainId",
3106
+ "token",
3107
+ "amount",
3108
+ "account",
3109
+ "modeOrExpiration"
3110
+ ]
3111
+ }
3017
3112
  }
3018
3113
  },
3019
3114
  "required": [
3020
- "quoteId"
3021
- ],
3022
- "additionalProperties": false
3115
+ "owner",
3116
+ "permitContract",
3117
+ "salt",
3118
+ "deadline",
3119
+ "timestamp",
3120
+ "merkleRoot",
3121
+ "permits"
3122
+ ]
3123
+ },
3124
+ "signature": {
3125
+ "type": "string",
3126
+ "minLength": 130,
3127
+ "maxLength": 132,
3128
+ "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
3023
3129
  }
3024
3130
  },
3025
3131
  "required": [
3026
- "chainId",
3027
- "authorization",
3028
- "signature",
3029
- "target"
3132
+ "target",
3133
+ "permit3",
3134
+ "signature"
3030
3135
  ]
3031
3136
  }
3032
3137
  }
@@ -3778,6 +3883,206 @@
3778
3883
  ],
3779
3884
  "additionalProperties": {}
3780
3885
  }
3886
+ },
3887
+ "sourceTx": {
3888
+ "type": "object",
3889
+ "properties": {
3890
+ "chainId": {
3891
+ "type": "integer",
3892
+ "exclusiveMinimum": 0,
3893
+ "maximum": 9007199254740991
3894
+ },
3895
+ "txHash": {
3896
+ "type": "string",
3897
+ "minLength": 1
3898
+ },
3899
+ "token": {
3900
+ "type": "string",
3901
+ "minLength": 1
3902
+ },
3903
+ "amount": {
3904
+ "type": "string",
3905
+ "maxLength": 78,
3906
+ "pattern": "^(0|[1-9]\\d*)$"
3907
+ }
3908
+ },
3909
+ "required": [
3910
+ "chainId",
3911
+ "txHash",
3912
+ "token",
3913
+ "amount"
3914
+ ],
3915
+ "additionalProperties": {}
3916
+ },
3917
+ "destinationTx": {
3918
+ "type": "object",
3919
+ "properties": {
3920
+ "chainId": {
3921
+ "type": "integer",
3922
+ "exclusiveMinimum": 0,
3923
+ "maximum": 9007199254740991
3924
+ },
3925
+ "txHash": {
3926
+ "type": "string",
3927
+ "minLength": 1
3928
+ },
3929
+ "token": {
3930
+ "type": "string",
3931
+ "minLength": 1
3932
+ },
3933
+ "amount": {
3934
+ "type": "string",
3935
+ "maxLength": 78,
3936
+ "pattern": "^(0|[1-9]\\d*)$"
3937
+ }
3938
+ },
3939
+ "required": [
3940
+ "chainId",
3941
+ "txHash",
3942
+ "token",
3943
+ "amount"
3944
+ ],
3945
+ "additionalProperties": {}
3946
+ },
3947
+ "steps": {
3948
+ "type": "array",
3949
+ "items": {
3950
+ "type": "object",
3951
+ "properties": {
3952
+ "type": {
3953
+ "type": "string",
3954
+ "enum": [
3955
+ "SWAP",
3956
+ "BRIDGE"
3957
+ ]
3958
+ },
3959
+ "status": {
3960
+ "type": "string",
3961
+ "minLength": 1
3962
+ },
3963
+ "from": {
3964
+ "type": "object",
3965
+ "properties": {
3966
+ "token": {
3967
+ "type": "string",
3968
+ "minLength": 1
3969
+ },
3970
+ "amount": {
3971
+ "type": "string",
3972
+ "maxLength": 78,
3973
+ "pattern": "^(0|[1-9]\\d*)$"
3974
+ },
3975
+ "chainId": {
3976
+ "type": "integer",
3977
+ "exclusiveMinimum": 0,
3978
+ "maximum": 9007199254740991
3979
+ }
3980
+ },
3981
+ "required": [
3982
+ "token",
3983
+ "amount",
3984
+ "chainId"
3985
+ ],
3986
+ "additionalProperties": {}
3987
+ },
3988
+ "to": {
3989
+ "type": "object",
3990
+ "properties": {
3991
+ "token": {
3992
+ "type": "string",
3993
+ "minLength": 1
3994
+ },
3995
+ "amount": {
3996
+ "type": "string",
3997
+ "maxLength": 78,
3998
+ "pattern": "^(0|[1-9]\\d*)$"
3999
+ },
4000
+ "chainId": {
4001
+ "type": "integer",
4002
+ "exclusiveMinimum": 0,
4003
+ "maximum": 9007199254740991
4004
+ }
4005
+ },
4006
+ "required": [
4007
+ "token",
4008
+ "amount",
4009
+ "chainId"
4010
+ ],
4011
+ "additionalProperties": {}
4012
+ },
4013
+ "transactions": {
4014
+ "type": "object",
4015
+ "properties": {
4016
+ "created": {
4017
+ "type": "object",
4018
+ "properties": {
4019
+ "chainId": {
4020
+ "type": "integer",
4021
+ "exclusiveMinimum": 0,
4022
+ "maximum": 9007199254740991
4023
+ },
4024
+ "txHash": {
4025
+ "type": "string",
4026
+ "minLength": 1
4027
+ }
4028
+ },
4029
+ "required": [
4030
+ "chainId",
4031
+ "txHash"
4032
+ ],
4033
+ "additionalProperties": {}
4034
+ },
4035
+ "fulfilled": {
4036
+ "type": "object",
4037
+ "properties": {
4038
+ "chainId": {
4039
+ "type": "integer",
4040
+ "exclusiveMinimum": 0,
4041
+ "maximum": 9007199254740991
4042
+ },
4043
+ "txHash": {
4044
+ "type": "string",
4045
+ "minLength": 1
4046
+ }
4047
+ },
4048
+ "required": [
4049
+ "chainId",
4050
+ "txHash"
4051
+ ],
4052
+ "additionalProperties": {}
4053
+ },
4054
+ "refunded": {
4055
+ "type": "object",
4056
+ "properties": {
4057
+ "chainId": {
4058
+ "type": "integer",
4059
+ "exclusiveMinimum": 0,
4060
+ "maximum": 9007199254740991
4061
+ },
4062
+ "txHash": {
4063
+ "type": "string",
4064
+ "minLength": 1
4065
+ }
4066
+ },
4067
+ "required": [
4068
+ "chainId",
4069
+ "txHash"
4070
+ ],
4071
+ "additionalProperties": {}
4072
+ }
4073
+ },
4074
+ "additionalProperties": {}
4075
+ }
4076
+ },
4077
+ "required": [
4078
+ "type",
4079
+ "status",
4080
+ "from",
4081
+ "to",
4082
+ "transactions"
4083
+ ],
4084
+ "additionalProperties": {}
4085
+ }
3781
4086
  }
3782
4087
  },
3783
4088
  "required": [
@@ -3984,6 +4289,206 @@
3984
4289
  ],
3985
4290
  "additionalProperties": {}
3986
4291
  }
4292
+ },
4293
+ "sourceTx": {
4294
+ "type": "object",
4295
+ "properties": {
4296
+ "chainId": {
4297
+ "type": "integer",
4298
+ "exclusiveMinimum": 0,
4299
+ "maximum": 9007199254740991
4300
+ },
4301
+ "txHash": {
4302
+ "type": "string",
4303
+ "minLength": 1
4304
+ },
4305
+ "token": {
4306
+ "type": "string",
4307
+ "minLength": 1
4308
+ },
4309
+ "amount": {
4310
+ "type": "string",
4311
+ "maxLength": 78,
4312
+ "pattern": "^(0|[1-9]\\d*)$"
4313
+ }
4314
+ },
4315
+ "required": [
4316
+ "chainId",
4317
+ "txHash",
4318
+ "token",
4319
+ "amount"
4320
+ ],
4321
+ "additionalProperties": {}
4322
+ },
4323
+ "destinationTx": {
4324
+ "type": "object",
4325
+ "properties": {
4326
+ "chainId": {
4327
+ "type": "integer",
4328
+ "exclusiveMinimum": 0,
4329
+ "maximum": 9007199254740991
4330
+ },
4331
+ "txHash": {
4332
+ "type": "string",
4333
+ "minLength": 1
4334
+ },
4335
+ "token": {
4336
+ "type": "string",
4337
+ "minLength": 1
4338
+ },
4339
+ "amount": {
4340
+ "type": "string",
4341
+ "maxLength": 78,
4342
+ "pattern": "^(0|[1-9]\\d*)$"
4343
+ }
4344
+ },
4345
+ "required": [
4346
+ "chainId",
4347
+ "txHash",
4348
+ "token",
4349
+ "amount"
4350
+ ],
4351
+ "additionalProperties": {}
4352
+ },
4353
+ "steps": {
4354
+ "type": "array",
4355
+ "items": {
4356
+ "type": "object",
4357
+ "properties": {
4358
+ "type": {
4359
+ "type": "string",
4360
+ "enum": [
4361
+ "SWAP",
4362
+ "BRIDGE"
4363
+ ]
4364
+ },
4365
+ "status": {
4366
+ "type": "string",
4367
+ "minLength": 1
4368
+ },
4369
+ "from": {
4370
+ "type": "object",
4371
+ "properties": {
4372
+ "token": {
4373
+ "type": "string",
4374
+ "minLength": 1
4375
+ },
4376
+ "amount": {
4377
+ "type": "string",
4378
+ "maxLength": 78,
4379
+ "pattern": "^(0|[1-9]\\d*)$"
4380
+ },
4381
+ "chainId": {
4382
+ "type": "integer",
4383
+ "exclusiveMinimum": 0,
4384
+ "maximum": 9007199254740991
4385
+ }
4386
+ },
4387
+ "required": [
4388
+ "token",
4389
+ "amount",
4390
+ "chainId"
4391
+ ],
4392
+ "additionalProperties": {}
4393
+ },
4394
+ "to": {
4395
+ "type": "object",
4396
+ "properties": {
4397
+ "token": {
4398
+ "type": "string",
4399
+ "minLength": 1
4400
+ },
4401
+ "amount": {
4402
+ "type": "string",
4403
+ "maxLength": 78,
4404
+ "pattern": "^(0|[1-9]\\d*)$"
4405
+ },
4406
+ "chainId": {
4407
+ "type": "integer",
4408
+ "exclusiveMinimum": 0,
4409
+ "maximum": 9007199254740991
4410
+ }
4411
+ },
4412
+ "required": [
4413
+ "token",
4414
+ "amount",
4415
+ "chainId"
4416
+ ],
4417
+ "additionalProperties": {}
4418
+ },
4419
+ "transactions": {
4420
+ "type": "object",
4421
+ "properties": {
4422
+ "created": {
4423
+ "type": "object",
4424
+ "properties": {
4425
+ "chainId": {
4426
+ "type": "integer",
4427
+ "exclusiveMinimum": 0,
4428
+ "maximum": 9007199254740991
4429
+ },
4430
+ "txHash": {
4431
+ "type": "string",
4432
+ "minLength": 1
4433
+ }
4434
+ },
4435
+ "required": [
4436
+ "chainId",
4437
+ "txHash"
4438
+ ],
4439
+ "additionalProperties": {}
4440
+ },
4441
+ "fulfilled": {
4442
+ "type": "object",
4443
+ "properties": {
4444
+ "chainId": {
4445
+ "type": "integer",
4446
+ "exclusiveMinimum": 0,
4447
+ "maximum": 9007199254740991
4448
+ },
4449
+ "txHash": {
4450
+ "type": "string",
4451
+ "minLength": 1
4452
+ }
4453
+ },
4454
+ "required": [
4455
+ "chainId",
4456
+ "txHash"
4457
+ ],
4458
+ "additionalProperties": {}
4459
+ },
4460
+ "refunded": {
4461
+ "type": "object",
4462
+ "properties": {
4463
+ "chainId": {
4464
+ "type": "integer",
4465
+ "exclusiveMinimum": 0,
4466
+ "maximum": 9007199254740991
4467
+ },
4468
+ "txHash": {
4469
+ "type": "string",
4470
+ "minLength": 1
4471
+ }
4472
+ },
4473
+ "required": [
4474
+ "chainId",
4475
+ "txHash"
4476
+ ],
4477
+ "additionalProperties": {}
4478
+ }
4479
+ },
4480
+ "additionalProperties": {}
4481
+ }
4482
+ },
4483
+ "required": [
4484
+ "type",
4485
+ "status",
4486
+ "from",
4487
+ "to",
4488
+ "transactions"
4489
+ ],
4490
+ "additionalProperties": {}
4491
+ }
3987
4492
  }
3988
4493
  },
3989
4494
  "required": [
@@ -4037,6 +4542,18 @@
4037
4542
  "discovery",
4038
4543
  "stable"
4039
4544
  ],
4545
+ "parameters": [
4546
+ {
4547
+ "name": "chainId",
4548
+ "in": "query",
4549
+ "required": false,
4550
+ "schema": {
4551
+ "type": "integer",
4552
+ "exclusiveMinimum": 0,
4553
+ "maximum": 9007199254740991
4554
+ }
4555
+ }
4556
+ ],
4040
4557
  "responses": {
4041
4558
  "200": {
4042
4559
  "description": "Success",
@@ -4242,6 +4759,18 @@
4242
4759
  "discovery",
4243
4760
  "stable"
4244
4761
  ],
4762
+ "parameters": [
4763
+ {
4764
+ "name": "chainId",
4765
+ "in": "query",
4766
+ "required": false,
4767
+ "schema": {
4768
+ "type": "integer",
4769
+ "exclusiveMinimum": 0,
4770
+ "maximum": 9007199254740991
4771
+ }
4772
+ }
4773
+ ],
4245
4774
  "responses": {
4246
4775
  "200": {
4247
4776
  "description": "Success",
@@ -5155,7 +5684,7 @@
5155
5684
  {
5156
5685
  "code": "slippage-out-of-bounds",
5157
5686
  "status": 400,
5158
- "title": "slippage is outside the valid 0-1 range; it is a decimal fraction (0.005 = 0.5%), not a percent (0.5 means 50%)",
5687
+ "title": "slippage is outside the valid 0.0001-1 range; it is a decimal fraction (0.005 = 0.5%), not a percent (0.5 means 50%)",
5159
5688
  "type": "https://api.eco.com/v1/errors/slippage-out-of-bounds",
5160
5689
  "audience": "all",
5161
5690
  "legacyCodes": []
@@ -5168,6 +5697,14 @@
5168
5697
  "audience": "write",
5169
5698
  "legacyCodes": []
5170
5699
  },
5700
+ {
5701
+ "code": "vault-mismatch",
5702
+ "status": 400,
5703
+ "title": "The signed counterparty does not equal the quote's intent vault (execution.vault)",
5704
+ "type": "https://api.eco.com/v1/errors/vault-mismatch",
5705
+ "audience": "write",
5706
+ "legacyCodes": []
5707
+ },
5171
5708
  {
5172
5709
  "code": "invalid-signature",
5173
5710
  "status": 401,
@@ -5472,6 +6009,14 @@
5472
6009
  "eco-quotes:1025"
5473
6010
  ]
5474
6011
  },
6012
+ {
6013
+ "code": "solver-error",
6014
+ "status": 502,
6015
+ "title": "An upstream solver rejected or failed the quote request",
6016
+ "type": "https://api.eco.com/v1/errors/solver-error",
6017
+ "audience": "all",
6018
+ "legacyCodes": []
6019
+ },
5475
6020
  {
5476
6021
  "code": "service-unavailable",
5477
6022
  "status": 503,