@eco-foundation/api-schemas 0.4.1 → 0.6.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 (44) hide show
  1. package/README.md +241 -12
  2. package/dist/fixtures/index.js +0 -4
  3. package/dist/fixtures/index.js.map +1 -1
  4. package/dist/fixtures/v1/tokens-list.response.default.json +1 -1
  5. package/dist/generated/build-digest.json +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/v1/endpoints/chains.d.ts +7 -0
  8. package/dist/v1/endpoints/chains.js +5 -1
  9. package/dist/v1/endpoints/chains.js.map +1 -1
  10. package/dist/v1/endpoints/deposit-addresses.js +1 -1
  11. package/dist/v1/endpoints/deposit-addresses.js.map +1 -1
  12. package/dist/v1/endpoints/quotes.d.ts +2 -1
  13. package/dist/v1/endpoints/quotes.js +33 -6
  14. package/dist/v1/endpoints/quotes.js.map +1 -1
  15. package/dist/v1/endpoints/registry.d.ts +110 -21
  16. package/dist/v1/endpoints/registry.js +2 -2
  17. package/dist/v1/endpoints/registry.js.map +1 -1
  18. package/dist/v1/endpoints/status.d.ts +211 -26
  19. package/dist/v1/endpoints/status.js +39 -7
  20. package/dist/v1/endpoints/status.js.map +1 -1
  21. package/dist/v1/endpoints/submit.d.ts +2 -91
  22. package/dist/v1/endpoints/submit.js +1 -37
  23. package/dist/v1/endpoints/submit.js.map +1 -1
  24. package/dist/v1/endpoints/tokens.d.ts +7 -0
  25. package/dist/v1/endpoints/tokens.js +5 -1
  26. package/dist/v1/endpoints/tokens.js.map +1 -1
  27. package/dist/v1/enums.d.ts +2 -1
  28. package/dist/v1/enums.js +1 -1
  29. package/dist/v1/enums.js.map +1 -1
  30. package/dist/v1/errors/catalog.d.ts +7 -0
  31. package/dist/v1/errors/catalog.js +2 -1
  32. package/dist/v1/errors/catalog.js.map +1 -1
  33. package/dist/v1/errors/problem.d.ts +10 -0
  34. package/dist/v1/errors/problem.js +20 -10
  35. package/dist/v1/errors/problem.js.map +1 -1
  36. package/dist/v1/primitives.d.ts +7 -1
  37. package/dist/v1/primitives.js +14 -1
  38. package/dist/v1/primitives.js.map +1 -1
  39. package/dist/v1/types.d.ts +35 -1
  40. package/errors/catalog.lock.json +5 -0
  41. package/openapi/v1.json +601 -594
  42. package/package.json +19 -16
  43. package/dist/fixtures/v1/intents-submit-permit2.request.quote-target.json +0 -25
  44. package/dist/fixtures/v1/intents-submit-permit3.request.quote-target.json +0 -27
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",
@@ -1606,7 +1605,8 @@
1606
1605
  },
1607
1606
  "slippage": {
1608
1607
  "type": "number",
1609
- "minimum": 0
1608
+ "minimum": 0,
1609
+ "description": "Tolerance actually bound into destination.minAmountOut, as a decimal fraction"
1610
1610
  },
1611
1611
  "fees": {
1612
1612
  "type": "array",
@@ -2517,10 +2517,10 @@
2517
2517
  }
2518
2518
  }
2519
2519
  },
2520
- "/v1/intents/submit/permit3": {
2520
+ "/v1/intents/submit/erc-3009": {
2521
2521
  "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.",
2522
+ "operationId": "intents.submit.erc-3009",
2523
+ "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
2524
  "tags": [
2525
2525
  "intents",
2526
2526
  "stable"
@@ -2532,69 +2532,49 @@
2532
2532
  "schema": {
2533
2533
  "type": "object",
2534
2534
  "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
2535
+ "chainId": {
2536
+ "type": "integer",
2537
+ "exclusiveMinimum": 0,
2538
+ "maximum": 9007199254740991
2547
2539
  },
2548
- "permit3": {
2540
+ "authorization": {
2549
2541
  "type": "object",
2550
2542
  "properties": {
2551
- "owner": {
2543
+ "from": {
2552
2544
  "type": "string",
2553
2545
  "pattern": "^0x[0-9a-fA-F]{40}$"
2554
2546
  },
2555
- "salt": {
2547
+ "to": {
2556
2548
  "type": "string",
2557
- "pattern": "^0x[0-9a-fA-F]{64}$"
2549
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2558
2550
  },
2559
- "deadline": {
2560
- "type": "integer",
2561
- "minimum": 0,
2562
- "maximum": 4102444800
2551
+ "value": {
2552
+ "type": "string",
2553
+ "maxLength": 78,
2554
+ "pattern": "^(0|[1-9]\\d*)$"
2563
2555
  },
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
- }
2556
+ "validAfter": {
2557
+ "type": "string",
2558
+ "maxLength": 78,
2559
+ "pattern": "^(0|[1-9]\\d*)$"
2560
+ },
2561
+ "validBefore": {
2562
+ "type": "string",
2563
+ "maxLength": 78,
2564
+ "pattern": "^(0|[1-9]\\d*)$"
2565
+ },
2566
+ "nonce": {
2567
+ "type": "string",
2568
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2591
2569
  }
2592
2570
  },
2593
2571
  "required": [
2594
- "owner",
2595
- "salt",
2596
- "deadline",
2597
- "permits"
2572
+ "from",
2573
+ "to",
2574
+ "value",
2575
+ "validAfter",
2576
+ "validBefore",
2577
+ "nonce"
2598
2578
  ]
2599
2579
  },
2600
2580
  "signature": {
@@ -2602,12 +2582,26 @@
2602
2582
  "minLength": 130,
2603
2583
  "maxLength": 132,
2604
2584
  "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
2585
+ },
2586
+ "target": {
2587
+ "type": "object",
2588
+ "properties": {
2589
+ "quoteId": {
2590
+ "type": "string",
2591
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
2592
+ }
2593
+ },
2594
+ "required": [
2595
+ "quoteId"
2596
+ ],
2597
+ "additionalProperties": false
2605
2598
  }
2606
2599
  },
2607
2600
  "required": [
2608
- "target",
2609
- "permit3",
2610
- "signature"
2601
+ "chainId",
2602
+ "authorization",
2603
+ "signature",
2604
+ "target"
2611
2605
  ]
2612
2606
  }
2613
2607
  }
@@ -2731,12 +2725,12 @@
2731
2725
  }
2732
2726
  }
2733
2727
  },
2734
- "/v1/intents/submit/permit2": {
2728
+ "/v1/deposit-addresses/submit/erc-3009": {
2735
2729
  "post": {
2736
- "operationId": "intents.submit.permit2",
2737
- "summary": "Submit a signed permit2 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
2730
+ "operationId": "deposit-addresses.submit.erc-3009",
2731
+ "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.",
2738
2732
  "tags": [
2739
- "intents",
2733
+ "deposit-addresses",
2740
2734
  "stable"
2741
2735
  ],
2742
2736
  "requestBody": {
@@ -2746,66 +2740,49 @@
2746
2740
  "schema": {
2747
2741
  "type": "object",
2748
2742
  "properties": {
2749
- "target": {
2750
- "type": "object",
2751
- "properties": {
2752
- "quoteId": {
2753
- "type": "string",
2754
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
2755
- }
2756
- },
2757
- "required": [
2758
- "quoteId"
2759
- ],
2760
- "additionalProperties": false
2743
+ "chainId": {
2744
+ "type": "integer",
2745
+ "exclusiveMinimum": 0,
2746
+ "maximum": 9007199254740991
2761
2747
  },
2762
- "permit2": {
2748
+ "authorization": {
2763
2749
  "type": "object",
2764
2750
  "properties": {
2765
- "details": {
2766
- "type": "object",
2767
- "properties": {
2768
- "token": {
2769
- "type": "string",
2770
- "pattern": "^0x[0-9a-fA-F]{40}$"
2771
- },
2772
- "amount": {
2773
- "type": "string",
2774
- "maxLength": 78,
2775
- "pattern": "^(0|[1-9]\\d*)$"
2776
- },
2777
- "expiration": {
2778
- "type": "integer",
2779
- "minimum": 0,
2780
- "maximum": 4102444800
2781
- },
2782
- "nonce": {
2783
- "type": "integer",
2784
- "minimum": 0,
2785
- "maximum": 281474976710655
2786
- }
2787
- },
2788
- "required": [
2789
- "token",
2790
- "amount",
2791
- "expiration",
2792
- "nonce"
2793
- ]
2751
+ "from": {
2752
+ "type": "string",
2753
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2794
2754
  },
2795
- "spender": {
2755
+ "to": {
2796
2756
  "type": "string",
2797
2757
  "pattern": "^0x[0-9a-fA-F]{40}$"
2798
2758
  },
2799
- "sigDeadline": {
2800
- "type": "integer",
2801
- "minimum": 0,
2802
- "maximum": 4102444800
2759
+ "value": {
2760
+ "type": "string",
2761
+ "maxLength": 78,
2762
+ "pattern": "^(0|[1-9]\\d*)$"
2763
+ },
2764
+ "validAfter": {
2765
+ "type": "string",
2766
+ "maxLength": 78,
2767
+ "pattern": "^(0|[1-9]\\d*)$"
2768
+ },
2769
+ "validBefore": {
2770
+ "type": "string",
2771
+ "maxLength": 78,
2772
+ "pattern": "^(0|[1-9]\\d*)$"
2773
+ },
2774
+ "nonce": {
2775
+ "type": "string",
2776
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2803
2777
  }
2804
2778
  },
2805
2779
  "required": [
2806
- "details",
2807
- "spender",
2808
- "sigDeadline"
2780
+ "from",
2781
+ "to",
2782
+ "value",
2783
+ "validAfter",
2784
+ "validBefore",
2785
+ "nonce"
2809
2786
  ]
2810
2787
  },
2811
2788
  "signature": {
@@ -2813,12 +2790,26 @@
2813
2790
  "minLength": 130,
2814
2791
  "maxLength": 132,
2815
2792
  "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
2793
+ },
2794
+ "target": {
2795
+ "type": "object",
2796
+ "properties": {
2797
+ "depositAddress": {
2798
+ "type": "string",
2799
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2800
+ }
2801
+ },
2802
+ "required": [
2803
+ "depositAddress"
2804
+ ],
2805
+ "additionalProperties": false
2816
2806
  }
2817
2807
  },
2818
2808
  "required": [
2819
- "target",
2820
- "permit2",
2821
- "signature"
2809
+ "chainId",
2810
+ "authorization",
2811
+ "signature",
2812
+ "target"
2822
2813
  ]
2823
2814
  }
2824
2815
  }
@@ -2942,12 +2933,12 @@
2942
2933
  }
2943
2934
  }
2944
2935
  },
2945
- "/v1/intents/submit/erc-3009": {
2936
+ "/v1/deposit-addresses/submit/erc-2612": {
2946
2937
  "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.",
2938
+ "operationId": "deposit-addresses.submit.erc-2612",
2939
+ "summary": "Submit a signed erc-2612 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
2949
2940
  "tags": [
2950
- "intents",
2941
+ "deposit-addresses",
2951
2942
  "stable"
2952
2943
  ],
2953
2944
  "requestBody": {
@@ -2962,468 +2953,52 @@
2962
2953
  "exclusiveMinimum": 0,
2963
2954
  "maximum": 9007199254740991
2964
2955
  },
2965
- "authorization": {
2956
+ "target": {
2966
2957
  "type": "object",
2967
2958
  "properties": {
2968
- "from": {
2959
+ "depositAddress": {
2969
2960
  "type": "string",
2970
2961
  "pattern": "^0x[0-9a-fA-F]{40}$"
2971
- },
2972
- "to": {
2962
+ }
2963
+ },
2964
+ "required": [
2965
+ "depositAddress"
2966
+ ],
2967
+ "additionalProperties": false
2968
+ },
2969
+ "permit": {
2970
+ "type": "object",
2971
+ "properties": {
2972
+ "owner": {
2973
2973
  "type": "string",
2974
2974
  "pattern": "^0x[0-9a-fA-F]{40}$"
2975
2975
  },
2976
- "value": {
2976
+ "spender": {
2977
2977
  "type": "string",
2978
- "maxLength": 78,
2979
- "pattern": "^(0|[1-9]\\d*)$"
2978
+ "pattern": "^0x[0-9a-fA-F]{40}$"
2980
2979
  },
2981
- "validAfter": {
2980
+ "value": {
2982
2981
  "type": "string",
2983
2982
  "maxLength": 78,
2984
2983
  "pattern": "^(0|[1-9]\\d*)$"
2985
2984
  },
2986
- "validBefore": {
2985
+ "nonce": {
2987
2986
  "type": "string",
2988
2987
  "maxLength": 78,
2989
2988
  "pattern": "^(0|[1-9]\\d*)$"
2990
2989
  },
2991
- "nonce": {
2992
- "type": "string",
2993
- "pattern": "^0x[0-9a-fA-F]{64}$"
2990
+ "deadline": {
2991
+ "type": "integer",
2992
+ "minimum": 0,
2993
+ "maximum": 4102444800
2994
2994
  }
2995
2995
  },
2996
2996
  "required": [
2997
- "from",
2998
- "to",
2997
+ "owner",
2998
+ "spender",
2999
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}$"
3017
- }
3018
- },
3019
- "required": [
3020
- "quoteId"
3021
- ],
3022
- "additionalProperties": false
3023
- }
3024
- },
3025
- "required": [
3026
- "chainId",
3027
- "authorization",
3028
- "signature",
3029
- "target"
3030
- ]
3031
- }
3032
- }
3033
- }
3034
- },
3035
- "responses": {
3036
- "202": {
3037
- "description": "Success",
3038
- "content": {
3039
- "application/json": {
3040
- "schema": {
3041
- "type": "object",
3042
- "properties": {
3043
- "id": {
3044
- "type": "string",
3045
- "pattern": "^gasless:([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{24})$"
3046
- },
3047
- "status": {
3048
- "type": "string",
3049
- "enum": [
3050
- "pending",
3051
- "processing",
3052
- "published",
3053
- "partial",
3054
- "failed",
3055
- "unknown"
3056
- ]
3057
- },
3058
- "signatureHash": {
3059
- "type": "string",
3060
- "pattern": "^0x[0-9a-fA-F]{64}$"
3061
- },
3062
- "subStatuses": {
3063
- "type": "array",
3064
- "items": {
3065
- "type": "object",
3066
- "properties": {
3067
- "chainId": {
3068
- "type": "integer",
3069
- "exclusiveMinimum": 0,
3070
- "maximum": 9007199254740991
3071
- },
3072
- "quoteIds": {
3073
- "type": "array",
3074
- "items": {
3075
- "type": "string",
3076
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
3077
- }
3078
- },
3079
- "txHash": {
3080
- "anyOf": [
3081
- {
3082
- "type": "string"
3083
- },
3084
- {
3085
- "type": "null"
3086
- }
3087
- ]
3088
- },
3089
- "intentHashes": {
3090
- "type": "array",
3091
- "items": {
3092
- "type": "string",
3093
- "pattern": "^0x[0-9a-fA-F]{64}$"
3094
- }
3095
- },
3096
- "state": {
3097
- "type": "string",
3098
- "enum": [
3099
- "pending",
3100
- "submitted",
3101
- "published",
3102
- "failed"
3103
- ]
3104
- }
3105
- },
3106
- "required": [
3107
- "chainId",
3108
- "quoteIds",
3109
- "txHash",
3110
- "intentHashes",
3111
- "state"
3112
- ],
3113
- "additionalProperties": {}
3114
- }
3115
- },
3116
- "createdAt": {
3117
- "type": "integer",
3118
- "minimum": 0,
3119
- "maximum": 4102444800
3120
- },
3121
- "updatedAt": {
3122
- "type": "integer",
3123
- "minimum": 0,
3124
- "maximum": 4102444800
3125
- }
3126
- },
3127
- "required": [
3128
- "id",
3129
- "status",
3130
- "signatureHash",
3131
- "subStatuses",
3132
- "createdAt",
3133
- "updatedAt"
3134
- ],
3135
- "additionalProperties": {}
3136
- }
3137
- }
3138
- }
3139
- },
3140
- "default": {
3141
- "description": "Error (RFC 9457 problem+json; see x-error-catalog)",
3142
- "content": {
3143
- "application/problem+json": {
3144
- "schema": {
3145
- "$ref": "#/components/schemas/Problem"
3146
- }
3147
- }
3148
- }
3149
- }
3150
- }
3151
- }
3152
- },
3153
- "/v1/deposit-addresses/submit/erc-3009": {
3154
- "post": {
3155
- "operationId": "deposit-addresses.submit.erc-3009",
3156
- "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.",
3157
- "tags": [
3158
- "deposit-addresses",
3159
- "stable"
3160
- ],
3161
- "requestBody": {
3162
- "required": true,
3163
- "content": {
3164
- "application/json": {
3165
- "schema": {
3166
- "type": "object",
3167
- "properties": {
3168
- "chainId": {
3169
- "type": "integer",
3170
- "exclusiveMinimum": 0,
3171
- "maximum": 9007199254740991
3172
- },
3173
- "authorization": {
3174
- "type": "object",
3175
- "properties": {
3176
- "from": {
3177
- "type": "string",
3178
- "pattern": "^0x[0-9a-fA-F]{40}$"
3179
- },
3180
- "to": {
3181
- "type": "string",
3182
- "pattern": "^0x[0-9a-fA-F]{40}$"
3183
- },
3184
- "value": {
3185
- "type": "string",
3186
- "maxLength": 78,
3187
- "pattern": "^(0|[1-9]\\d*)$"
3188
- },
3189
- "validAfter": {
3190
- "type": "string",
3191
- "maxLength": 78,
3192
- "pattern": "^(0|[1-9]\\d*)$"
3193
- },
3194
- "validBefore": {
3195
- "type": "string",
3196
- "maxLength": 78,
3197
- "pattern": "^(0|[1-9]\\d*)$"
3198
- },
3199
- "nonce": {
3200
- "type": "string",
3201
- "pattern": "^0x[0-9a-fA-F]{64}$"
3202
- }
3203
- },
3204
- "required": [
3205
- "from",
3206
- "to",
3207
- "value",
3208
- "validAfter",
3209
- "validBefore",
3210
- "nonce"
3211
- ]
3212
- },
3213
- "signature": {
3214
- "type": "string",
3215
- "minLength": 130,
3216
- "maxLength": 132,
3217
- "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
3218
- },
3219
- "target": {
3220
- "type": "object",
3221
- "properties": {
3222
- "depositAddress": {
3223
- "type": "string",
3224
- "pattern": "^0x[0-9a-fA-F]{40}$"
3225
- }
3226
- },
3227
- "required": [
3228
- "depositAddress"
3229
- ],
3230
- "additionalProperties": false
3231
- }
3232
- },
3233
- "required": [
3234
- "chainId",
3235
- "authorization",
3236
- "signature",
3237
- "target"
3238
- ]
3239
- }
3240
- }
3241
- }
3242
- },
3243
- "responses": {
3244
- "202": {
3245
- "description": "Success",
3246
- "content": {
3247
- "application/json": {
3248
- "schema": {
3249
- "type": "object",
3250
- "properties": {
3251
- "id": {
3252
- "type": "string",
3253
- "pattern": "^gasless:([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{24})$"
3254
- },
3255
- "status": {
3256
- "type": "string",
3257
- "enum": [
3258
- "pending",
3259
- "processing",
3260
- "published",
3261
- "partial",
3262
- "failed",
3263
- "unknown"
3264
- ]
3265
- },
3266
- "signatureHash": {
3267
- "type": "string",
3268
- "pattern": "^0x[0-9a-fA-F]{64}$"
3269
- },
3270
- "subStatuses": {
3271
- "type": "array",
3272
- "items": {
3273
- "type": "object",
3274
- "properties": {
3275
- "chainId": {
3276
- "type": "integer",
3277
- "exclusiveMinimum": 0,
3278
- "maximum": 9007199254740991
3279
- },
3280
- "quoteIds": {
3281
- "type": "array",
3282
- "items": {
3283
- "type": "string",
3284
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
3285
- }
3286
- },
3287
- "txHash": {
3288
- "anyOf": [
3289
- {
3290
- "type": "string"
3291
- },
3292
- {
3293
- "type": "null"
3294
- }
3295
- ]
3296
- },
3297
- "intentHashes": {
3298
- "type": "array",
3299
- "items": {
3300
- "type": "string",
3301
- "pattern": "^0x[0-9a-fA-F]{64}$"
3302
- }
3303
- },
3304
- "state": {
3305
- "type": "string",
3306
- "enum": [
3307
- "pending",
3308
- "submitted",
3309
- "published",
3310
- "failed"
3311
- ]
3312
- }
3313
- },
3314
- "required": [
3315
- "chainId",
3316
- "quoteIds",
3317
- "txHash",
3318
- "intentHashes",
3319
- "state"
3320
- ],
3321
- "additionalProperties": {}
3322
- }
3323
- },
3324
- "createdAt": {
3325
- "type": "integer",
3326
- "minimum": 0,
3327
- "maximum": 4102444800
3328
- },
3329
- "updatedAt": {
3330
- "type": "integer",
3331
- "minimum": 0,
3332
- "maximum": 4102444800
3333
- }
3334
- },
3335
- "required": [
3336
- "id",
3337
- "status",
3338
- "signatureHash",
3339
- "subStatuses",
3340
- "createdAt",
3341
- "updatedAt"
3342
- ],
3343
- "additionalProperties": {}
3344
- }
3345
- }
3346
- }
3347
- },
3348
- "default": {
3349
- "description": "Error (RFC 9457 problem+json; see x-error-catalog)",
3350
- "content": {
3351
- "application/problem+json": {
3352
- "schema": {
3353
- "$ref": "#/components/schemas/Problem"
3354
- }
3355
- }
3356
- }
3357
- }
3358
- }
3359
- }
3360
- },
3361
- "/v1/deposit-addresses/submit/erc-2612": {
3362
- "post": {
3363
- "operationId": "deposit-addresses.submit.erc-2612",
3364
- "summary": "Submit a signed erc-2612 funding authorization. 202 with a gasless job on first sight; a duplicate signature returns the existing job with 200.",
3365
- "tags": [
3366
- "deposit-addresses",
3367
- "stable"
3368
- ],
3369
- "requestBody": {
3370
- "required": true,
3371
- "content": {
3372
- "application/json": {
3373
- "schema": {
3374
- "type": "object",
3375
- "properties": {
3376
- "chainId": {
3377
- "type": "integer",
3378
- "exclusiveMinimum": 0,
3379
- "maximum": 9007199254740991
3380
- },
3381
- "target": {
3382
- "type": "object",
3383
- "properties": {
3384
- "depositAddress": {
3385
- "type": "string",
3386
- "pattern": "^0x[0-9a-fA-F]{40}$"
3387
- }
3388
- },
3389
- "required": [
3390
- "depositAddress"
3391
- ],
3392
- "additionalProperties": false
3393
- },
3394
- "permit": {
3395
- "type": "object",
3396
- "properties": {
3397
- "owner": {
3398
- "type": "string",
3399
- "pattern": "^0x[0-9a-fA-F]{40}$"
3400
- },
3401
- "spender": {
3402
- "type": "string",
3403
- "pattern": "^0x[0-9a-fA-F]{40}$"
3404
- },
3405
- "value": {
3406
- "type": "string",
3407
- "maxLength": 78,
3408
- "pattern": "^(0|[1-9]\\d*)$"
3409
- },
3410
- "nonce": {
3411
- "type": "string",
3412
- "maxLength": 78,
3413
- "pattern": "^(0|[1-9]\\d*)$"
3414
- },
3415
- "deadline": {
3416
- "type": "integer",
3417
- "minimum": 0,
3418
- "maximum": 4102444800
3419
- }
3420
- },
3421
- "required": [
3422
- "owner",
3423
- "spender",
3424
- "value",
3425
- "nonce",
3426
- "deadline"
3000
+ "nonce",
3001
+ "deadline"
3427
3002
  ]
3428
3003
  },
3429
3004
  "signature": {
@@ -3747,34 +3322,234 @@
3747
3322
  {
3748
3323
  "type": "string"
3749
3324
  },
3750
- {
3751
- "type": "null"
3325
+ {
3326
+ "type": "null"
3327
+ }
3328
+ ]
3329
+ },
3330
+ "intentHashes": {
3331
+ "type": "array",
3332
+ "items": {
3333
+ "type": "string",
3334
+ "pattern": "^0x[0-9a-fA-F]{64}$"
3335
+ }
3336
+ },
3337
+ "state": {
3338
+ "type": "string",
3339
+ "enum": [
3340
+ "pending",
3341
+ "submitted",
3342
+ "published",
3343
+ "failed"
3344
+ ]
3345
+ }
3346
+ },
3347
+ "required": [
3348
+ "chainId",
3349
+ "quoteIds",
3350
+ "txHash",
3351
+ "intentHashes",
3352
+ "state"
3353
+ ],
3354
+ "additionalProperties": {}
3355
+ }
3356
+ },
3357
+ "sourceTx": {
3358
+ "type": "object",
3359
+ "properties": {
3360
+ "chainId": {
3361
+ "type": "integer",
3362
+ "exclusiveMinimum": 0,
3363
+ "maximum": 9007199254740991
3364
+ },
3365
+ "txHash": {
3366
+ "type": "string",
3367
+ "minLength": 1
3368
+ },
3369
+ "token": {
3370
+ "type": "string",
3371
+ "minLength": 1
3372
+ },
3373
+ "amount": {
3374
+ "type": "string",
3375
+ "maxLength": 78,
3376
+ "pattern": "^(0|[1-9]\\d*)$"
3377
+ }
3378
+ },
3379
+ "required": [
3380
+ "chainId",
3381
+ "txHash",
3382
+ "token",
3383
+ "amount"
3384
+ ],
3385
+ "additionalProperties": {}
3386
+ },
3387
+ "destinationTx": {
3388
+ "type": "object",
3389
+ "properties": {
3390
+ "chainId": {
3391
+ "type": "integer",
3392
+ "exclusiveMinimum": 0,
3393
+ "maximum": 9007199254740991
3394
+ },
3395
+ "txHash": {
3396
+ "type": "string",
3397
+ "minLength": 1
3398
+ },
3399
+ "token": {
3400
+ "type": "string",
3401
+ "minLength": 1
3402
+ },
3403
+ "amount": {
3404
+ "type": "string",
3405
+ "maxLength": 78,
3406
+ "pattern": "^(0|[1-9]\\d*)$"
3407
+ }
3408
+ },
3409
+ "required": [
3410
+ "chainId",
3411
+ "txHash",
3412
+ "token",
3413
+ "amount"
3414
+ ],
3415
+ "additionalProperties": {}
3416
+ },
3417
+ "steps": {
3418
+ "type": "array",
3419
+ "items": {
3420
+ "type": "object",
3421
+ "properties": {
3422
+ "type": {
3423
+ "type": "string",
3424
+ "enum": [
3425
+ "SWAP",
3426
+ "BRIDGE"
3427
+ ]
3428
+ },
3429
+ "status": {
3430
+ "type": "string",
3431
+ "minLength": 1
3432
+ },
3433
+ "from": {
3434
+ "type": "object",
3435
+ "properties": {
3436
+ "token": {
3437
+ "type": "string",
3438
+ "minLength": 1
3439
+ },
3440
+ "amount": {
3441
+ "type": "string",
3442
+ "maxLength": 78,
3443
+ "pattern": "^(0|[1-9]\\d*)$"
3444
+ },
3445
+ "chainId": {
3446
+ "type": "integer",
3447
+ "exclusiveMinimum": 0,
3448
+ "maximum": 9007199254740991
3449
+ }
3450
+ },
3451
+ "required": [
3452
+ "token",
3453
+ "amount",
3454
+ "chainId"
3455
+ ],
3456
+ "additionalProperties": {}
3457
+ },
3458
+ "to": {
3459
+ "type": "object",
3460
+ "properties": {
3461
+ "token": {
3462
+ "type": "string",
3463
+ "minLength": 1
3464
+ },
3465
+ "amount": {
3466
+ "type": "string",
3467
+ "maxLength": 78,
3468
+ "pattern": "^(0|[1-9]\\d*)$"
3469
+ },
3470
+ "chainId": {
3471
+ "type": "integer",
3472
+ "exclusiveMinimum": 0,
3473
+ "maximum": 9007199254740991
3474
+ }
3475
+ },
3476
+ "required": [
3477
+ "token",
3478
+ "amount",
3479
+ "chainId"
3480
+ ],
3481
+ "additionalProperties": {}
3482
+ },
3483
+ "transactions": {
3484
+ "type": "object",
3485
+ "properties": {
3486
+ "created": {
3487
+ "type": "object",
3488
+ "properties": {
3489
+ "chainId": {
3490
+ "type": "integer",
3491
+ "exclusiveMinimum": 0,
3492
+ "maximum": 9007199254740991
3493
+ },
3494
+ "txHash": {
3495
+ "type": "string",
3496
+ "minLength": 1
3497
+ }
3498
+ },
3499
+ "required": [
3500
+ "chainId",
3501
+ "txHash"
3502
+ ],
3503
+ "additionalProperties": {}
3504
+ },
3505
+ "fulfilled": {
3506
+ "type": "object",
3507
+ "properties": {
3508
+ "chainId": {
3509
+ "type": "integer",
3510
+ "exclusiveMinimum": 0,
3511
+ "maximum": 9007199254740991
3512
+ },
3513
+ "txHash": {
3514
+ "type": "string",
3515
+ "minLength": 1
3516
+ }
3517
+ },
3518
+ "required": [
3519
+ "chainId",
3520
+ "txHash"
3521
+ ],
3522
+ "additionalProperties": {}
3523
+ },
3524
+ "refunded": {
3525
+ "type": "object",
3526
+ "properties": {
3527
+ "chainId": {
3528
+ "type": "integer",
3529
+ "exclusiveMinimum": 0,
3530
+ "maximum": 9007199254740991
3531
+ },
3532
+ "txHash": {
3533
+ "type": "string",
3534
+ "minLength": 1
3535
+ }
3536
+ },
3537
+ "required": [
3538
+ "chainId",
3539
+ "txHash"
3540
+ ],
3541
+ "additionalProperties": {}
3752
3542
  }
3753
- ]
3754
- },
3755
- "intentHashes": {
3756
- "type": "array",
3757
- "items": {
3758
- "type": "string",
3759
- "pattern": "^0x[0-9a-fA-F]{64}$"
3760
- }
3761
- },
3762
- "state": {
3763
- "type": "string",
3764
- "enum": [
3765
- "pending",
3766
- "submitted",
3767
- "published",
3768
- "failed"
3769
- ]
3543
+ },
3544
+ "additionalProperties": {}
3770
3545
  }
3771
3546
  },
3772
3547
  "required": [
3773
- "chainId",
3774
- "quoteIds",
3775
- "txHash",
3776
- "intentHashes",
3777
- "state"
3548
+ "type",
3549
+ "status",
3550
+ "from",
3551
+ "to",
3552
+ "transactions"
3778
3553
  ],
3779
3554
  "additionalProperties": {}
3780
3555
  }
@@ -3984,6 +3759,206 @@
3984
3759
  ],
3985
3760
  "additionalProperties": {}
3986
3761
  }
3762
+ },
3763
+ "sourceTx": {
3764
+ "type": "object",
3765
+ "properties": {
3766
+ "chainId": {
3767
+ "type": "integer",
3768
+ "exclusiveMinimum": 0,
3769
+ "maximum": 9007199254740991
3770
+ },
3771
+ "txHash": {
3772
+ "type": "string",
3773
+ "minLength": 1
3774
+ },
3775
+ "token": {
3776
+ "type": "string",
3777
+ "minLength": 1
3778
+ },
3779
+ "amount": {
3780
+ "type": "string",
3781
+ "maxLength": 78,
3782
+ "pattern": "^(0|[1-9]\\d*)$"
3783
+ }
3784
+ },
3785
+ "required": [
3786
+ "chainId",
3787
+ "txHash",
3788
+ "token",
3789
+ "amount"
3790
+ ],
3791
+ "additionalProperties": {}
3792
+ },
3793
+ "destinationTx": {
3794
+ "type": "object",
3795
+ "properties": {
3796
+ "chainId": {
3797
+ "type": "integer",
3798
+ "exclusiveMinimum": 0,
3799
+ "maximum": 9007199254740991
3800
+ },
3801
+ "txHash": {
3802
+ "type": "string",
3803
+ "minLength": 1
3804
+ },
3805
+ "token": {
3806
+ "type": "string",
3807
+ "minLength": 1
3808
+ },
3809
+ "amount": {
3810
+ "type": "string",
3811
+ "maxLength": 78,
3812
+ "pattern": "^(0|[1-9]\\d*)$"
3813
+ }
3814
+ },
3815
+ "required": [
3816
+ "chainId",
3817
+ "txHash",
3818
+ "token",
3819
+ "amount"
3820
+ ],
3821
+ "additionalProperties": {}
3822
+ },
3823
+ "steps": {
3824
+ "type": "array",
3825
+ "items": {
3826
+ "type": "object",
3827
+ "properties": {
3828
+ "type": {
3829
+ "type": "string",
3830
+ "enum": [
3831
+ "SWAP",
3832
+ "BRIDGE"
3833
+ ]
3834
+ },
3835
+ "status": {
3836
+ "type": "string",
3837
+ "minLength": 1
3838
+ },
3839
+ "from": {
3840
+ "type": "object",
3841
+ "properties": {
3842
+ "token": {
3843
+ "type": "string",
3844
+ "minLength": 1
3845
+ },
3846
+ "amount": {
3847
+ "type": "string",
3848
+ "maxLength": 78,
3849
+ "pattern": "^(0|[1-9]\\d*)$"
3850
+ },
3851
+ "chainId": {
3852
+ "type": "integer",
3853
+ "exclusiveMinimum": 0,
3854
+ "maximum": 9007199254740991
3855
+ }
3856
+ },
3857
+ "required": [
3858
+ "token",
3859
+ "amount",
3860
+ "chainId"
3861
+ ],
3862
+ "additionalProperties": {}
3863
+ },
3864
+ "to": {
3865
+ "type": "object",
3866
+ "properties": {
3867
+ "token": {
3868
+ "type": "string",
3869
+ "minLength": 1
3870
+ },
3871
+ "amount": {
3872
+ "type": "string",
3873
+ "maxLength": 78,
3874
+ "pattern": "^(0|[1-9]\\d*)$"
3875
+ },
3876
+ "chainId": {
3877
+ "type": "integer",
3878
+ "exclusiveMinimum": 0,
3879
+ "maximum": 9007199254740991
3880
+ }
3881
+ },
3882
+ "required": [
3883
+ "token",
3884
+ "amount",
3885
+ "chainId"
3886
+ ],
3887
+ "additionalProperties": {}
3888
+ },
3889
+ "transactions": {
3890
+ "type": "object",
3891
+ "properties": {
3892
+ "created": {
3893
+ "type": "object",
3894
+ "properties": {
3895
+ "chainId": {
3896
+ "type": "integer",
3897
+ "exclusiveMinimum": 0,
3898
+ "maximum": 9007199254740991
3899
+ },
3900
+ "txHash": {
3901
+ "type": "string",
3902
+ "minLength": 1
3903
+ }
3904
+ },
3905
+ "required": [
3906
+ "chainId",
3907
+ "txHash"
3908
+ ],
3909
+ "additionalProperties": {}
3910
+ },
3911
+ "fulfilled": {
3912
+ "type": "object",
3913
+ "properties": {
3914
+ "chainId": {
3915
+ "type": "integer",
3916
+ "exclusiveMinimum": 0,
3917
+ "maximum": 9007199254740991
3918
+ },
3919
+ "txHash": {
3920
+ "type": "string",
3921
+ "minLength": 1
3922
+ }
3923
+ },
3924
+ "required": [
3925
+ "chainId",
3926
+ "txHash"
3927
+ ],
3928
+ "additionalProperties": {}
3929
+ },
3930
+ "refunded": {
3931
+ "type": "object",
3932
+ "properties": {
3933
+ "chainId": {
3934
+ "type": "integer",
3935
+ "exclusiveMinimum": 0,
3936
+ "maximum": 9007199254740991
3937
+ },
3938
+ "txHash": {
3939
+ "type": "string",
3940
+ "minLength": 1
3941
+ }
3942
+ },
3943
+ "required": [
3944
+ "chainId",
3945
+ "txHash"
3946
+ ],
3947
+ "additionalProperties": {}
3948
+ }
3949
+ },
3950
+ "additionalProperties": {}
3951
+ }
3952
+ },
3953
+ "required": [
3954
+ "type",
3955
+ "status",
3956
+ "from",
3957
+ "to",
3958
+ "transactions"
3959
+ ],
3960
+ "additionalProperties": {}
3961
+ }
3987
3962
  }
3988
3963
  },
3989
3964
  "required": [
@@ -4037,6 +4012,18 @@
4037
4012
  "discovery",
4038
4013
  "stable"
4039
4014
  ],
4015
+ "parameters": [
4016
+ {
4017
+ "name": "chainId",
4018
+ "in": "query",
4019
+ "required": false,
4020
+ "schema": {
4021
+ "type": "integer",
4022
+ "exclusiveMinimum": 0,
4023
+ "maximum": 9007199254740991
4024
+ }
4025
+ }
4026
+ ],
4040
4027
  "responses": {
4041
4028
  "200": {
4042
4029
  "description": "Success",
@@ -4242,6 +4229,18 @@
4242
4229
  "discovery",
4243
4230
  "stable"
4244
4231
  ],
4232
+ "parameters": [
4233
+ {
4234
+ "name": "chainId",
4235
+ "in": "query",
4236
+ "required": false,
4237
+ "schema": {
4238
+ "type": "integer",
4239
+ "exclusiveMinimum": 0,
4240
+ "maximum": 9007199254740991
4241
+ }
4242
+ }
4243
+ ],
4245
4244
  "responses": {
4246
4245
  "200": {
4247
4246
  "description": "Success",
@@ -5155,7 +5154,7 @@
5155
5154
  {
5156
5155
  "code": "slippage-out-of-bounds",
5157
5156
  "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%)",
5157
+ "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
5158
  "type": "https://api.eco.com/v1/errors/slippage-out-of-bounds",
5160
5159
  "audience": "all",
5161
5160
  "legacyCodes": []
@@ -5472,6 +5471,14 @@
5472
5471
  "eco-quotes:1025"
5473
5472
  ]
5474
5473
  },
5474
+ {
5475
+ "code": "solver-error",
5476
+ "status": 502,
5477
+ "title": "An upstream solver rejected or failed the quote request",
5478
+ "type": "https://api.eco.com/v1/errors/solver-error",
5479
+ "audience": "all",
5480
+ "legacyCodes": []
5481
+ },
5475
5482
  {
5476
5483
  "code": "service-unavailable",
5477
5484
  "status": 503,