@eco-foundation/api-schemas 0.8.0 → 0.10.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 (36) hide show
  1. package/README.md +152 -15
  2. package/dist/fixtures/index.js +10 -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.gateway-deposit.json +25 -0
  9. package/dist/fixtures/v1/{quotes-create.request.public-swap.json → quotes-create.request.swap.json} +4 -4
  10. package/dist/fixtures/v1/quotes-create.response.all-quotes.json +288 -81
  11. package/dist/fixtures/v1/quotes-create.response.gateway-deposit.json +206 -0
  12. package/dist/fixtures/v1/quotes-create.response.swap.json +228 -0
  13. package/dist/generated/build-digest.json +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/openapi.js +18 -0
  16. package/dist/openapi.js.map +1 -1
  17. package/dist/v1/endpoints/deposit-addresses.d.ts +12 -12
  18. package/dist/v1/endpoints/deposit-addresses.js +9 -9
  19. package/dist/v1/endpoints/quotes.d.ts +348 -193
  20. package/dist/v1/endpoints/quotes.js +74 -62
  21. package/dist/v1/endpoints/quotes.js.map +1 -1
  22. package/dist/v1/endpoints/registry.d.ts +118 -76
  23. package/dist/v1/endpoints/routes.d.ts +2 -0
  24. package/dist/v1/endpoints/routes.js +1 -1
  25. package/dist/v1/endpoints/routes.js.map +1 -1
  26. package/dist/v1/endpoints/status.d.ts +4 -0
  27. package/dist/v1/endpoints/status.js +1 -0
  28. package/dist/v1/endpoints/status.js.map +1 -1
  29. package/dist/v1/enums.d.ts +14 -30
  30. package/dist/v1/enums.js +10 -15
  31. package/dist/v1/enums.js.map +1 -1
  32. package/dist/v1/types.d.ts +42 -42
  33. package/openapi/v1.json +1084 -676
  34. package/package.json +1 -1
  35. package/dist/fixtures/v1/quotes-create.response.private-swap.json +0 -153
  36. package/dist/fixtures/v1/quotes-create.response.public-swap.json +0 -159
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eco-foundation/api-schemas",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Zod-first schemas, error catalog, golden fixtures, and generated OpenAPI 3.1 for the Eco /v1 API",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
@@ -1,153 +0,0 @@
1
- {
2
- "endpointId": "quotes.create",
3
- "direction": "response",
4
- "variant": "private-swap",
5
- "method": "POST",
6
- "path": "/v1/quotes",
7
- "expectedStatus": 200,
8
- "sideEffect": true,
9
- "payload": {
10
- "id": "quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f",
11
- "swapType": "exact-in",
12
- "visibility": "private",
13
- "guarantee": "atomic-or-refund",
14
- "source": {
15
- "chainId": 8453,
16
- "token": "0x1111111111111111111111111111111111111111",
17
- "amount": "1043221",
18
- "symbol": "USDC",
19
- "decimals": 6
20
- },
21
- "destination": {
22
- "chainId": 10,
23
- "token": "0x2222222222222222222222222222222222222222",
24
- "amount": "1043221",
25
- "minAmountOut": "1038005",
26
- "recipient": "0x3333333333333333333333333333333333333333",
27
- "symbol": "USDC",
28
- "decimals": 6
29
- },
30
- "slippage": 0.005,
31
- "fees": [
32
- {
33
- "kind": "gas",
34
- "amount": "1200",
35
- "token": {
36
- "chainId": 8453,
37
- "address": "0x1111111111111111111111111111111111111111",
38
- "symbol": "USDC",
39
- "decimals": 6
40
- },
41
- "estimate": true
42
- }
43
- ],
44
- "steps": [
45
- {
46
- "kind": "swap",
47
- "tool": "uniswap-v3",
48
- "aggregator": "ecoswap",
49
- "from": {
50
- "chainId": 8453,
51
- "token": "0x1111111111111111111111111111111111111111",
52
- "amount": "1043221"
53
- },
54
- "to": {
55
- "chainId": 8453,
56
- "token": "0x2222222222222222222222222222222222222222",
57
- "amount": "1043000"
58
- },
59
- "fees": [
60
- {
61
- "kind": "protocol",
62
- "amount": "221",
63
- "token": {
64
- "chainId": 8453,
65
- "address": "0x1111111111111111111111111111111111111111",
66
- "symbol": null,
67
- "decimals": null
68
- },
69
- "estimate": false
70
- }
71
- ],
72
- "estimatedDurationSec": 3
73
- },
74
- {
75
- "kind": "bridge",
76
- "tool": "eco",
77
- "from": {
78
- "chainId": 8453,
79
- "token": "0x1111111111111111111111111111111111111111",
80
- "amount": "1043221"
81
- },
82
- "to": {
83
- "chainId": 10,
84
- "token": "0x2222222222222222222222222222222222222222",
85
- "amount": "1038005"
86
- },
87
- "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
101
- }
102
- ],
103
- "solver": {
104
- "id": "0x3333333333333333333333333333333333333333",
105
- "name": "eco"
106
- },
107
- "intentHash": "0xabababababababababababababababababababababababababababababababab",
108
- "execution": {
109
- "transaction": {
110
- "kind": "evm",
111
- "chainId": 8453,
112
- "to": "0x1111111111111111111111111111111111111111",
113
- "data": "0xdeadbeef",
114
- "value": "0"
115
- },
116
- "intent": {
117
- "route": {
118
- "salt": "0xabababababababababababababababababababababababababababababababab",
119
- "deadline": 1767226200,
120
- "source": 8453,
121
- "destination": 10,
122
- "portal": "0x2222222222222222222222222222222222222222",
123
- "nativeAmount": "0",
124
- "tokens": [
125
- {
126
- "token": "0x2222222222222222222222222222222222222222",
127
- "amount": "1038005"
128
- }
129
- ],
130
- "calls": null
131
- },
132
- "reward": {
133
- "deadline": 1767229800,
134
- "creator": "0x3333333333333333333333333333333333333333",
135
- "prover": "0x1111111111111111111111111111111111111111",
136
- "nativeAmount": "0",
137
- "tokens": [
138
- {
139
- "token": "0x1111111111111111111111111111111111111111",
140
- "amount": "1043221"
141
- }
142
- ]
143
- }
144
- },
145
- "encodedRoute": null,
146
- "encodedReward": null,
147
- "vault": "0x5555555555555555555555555555555555555555"
148
- },
149
- "expiresAt": 1767225600,
150
- "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
151
- "quotes": null
152
- }
153
- }
@@ -1,159 +0,0 @@
1
- {
2
- "endpointId": "quotes.create",
3
- "direction": "response",
4
- "variant": "public-swap",
5
- "method": "POST",
6
- "path": "/v1/quotes",
7
- "expectedStatus": 200,
8
- "sideEffect": true,
9
- "payload": {
10
- "id": "quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f",
11
- "swapType": "exact-in",
12
- "visibility": "public",
13
- "guarantee": "atomic-or-refund",
14
- "source": {
15
- "chainId": 8453,
16
- "token": "0x1111111111111111111111111111111111111111",
17
- "amount": "1043221",
18
- "symbol": "USDC",
19
- "decimals": 6
20
- },
21
- "destination": {
22
- "chainId": 10,
23
- "token": "0x2222222222222222222222222222222222222222",
24
- "amount": "1043221",
25
- "minAmountOut": "1038005",
26
- "recipient": "0x3333333333333333333333333333333333333333",
27
- "symbol": "USDC",
28
- "decimals": 6
29
- },
30
- "slippage": 0.005,
31
- "fees": [
32
- {
33
- "kind": "gas",
34
- "amount": "1200",
35
- "token": {
36
- "chainId": 8453,
37
- "address": "0x1111111111111111111111111111111111111111",
38
- "symbol": "USDC",
39
- "decimals": 6
40
- },
41
- "estimate": true
42
- }
43
- ],
44
- "steps": [
45
- {
46
- "kind": "swap",
47
- "tool": "uniswap-v3",
48
- "aggregator": "ecoswap",
49
- "from": {
50
- "chainId": 8453,
51
- "token": "0x1111111111111111111111111111111111111111",
52
- "amount": "1043221"
53
- },
54
- "to": {
55
- "chainId": 8453,
56
- "token": "0x2222222222222222222222222222222222222222",
57
- "amount": "1043000"
58
- },
59
- "fees": [
60
- {
61
- "kind": "protocol",
62
- "amount": "221",
63
- "token": {
64
- "chainId": 8453,
65
- "address": "0x1111111111111111111111111111111111111111",
66
- "symbol": null,
67
- "decimals": null
68
- },
69
- "estimate": false
70
- }
71
- ],
72
- "estimatedDurationSec": 3
73
- },
74
- {
75
- "kind": "bridge",
76
- "tool": "eco",
77
- "from": {
78
- "chainId": 8453,
79
- "token": "0x1111111111111111111111111111111111111111",
80
- "amount": "1043221"
81
- },
82
- "to": {
83
- "chainId": 10,
84
- "token": "0x2222222222222222222222222222222222222222",
85
- "amount": "1038005"
86
- },
87
- "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
101
- }
102
- ],
103
- "solver": {
104
- "id": "0x3333333333333333333333333333333333333333",
105
- "name": "eco"
106
- },
107
- "intentHash": "0xabababababababababababababababababababababababababababababababab",
108
- "execution": {
109
- "transaction": {
110
- "kind": "evm",
111
- "chainId": 8453,
112
- "to": "0x1111111111111111111111111111111111111111",
113
- "data": "0xdeadbeef",
114
- "value": "0"
115
- },
116
- "intent": {
117
- "route": {
118
- "salt": "0xabababababababababababababababababababababababababababababababab",
119
- "deadline": 1767226200,
120
- "source": 8453,
121
- "destination": 10,
122
- "portal": "0x2222222222222222222222222222222222222222",
123
- "nativeAmount": "0",
124
- "tokens": [
125
- {
126
- "token": "0x2222222222222222222222222222222222222222",
127
- "amount": "1038005"
128
- }
129
- ],
130
- "calls": [
131
- {
132
- "target": "0x2222222222222222222222222222222222222222",
133
- "data": "0xbeef",
134
- "value": "0"
135
- }
136
- ]
137
- },
138
- "reward": {
139
- "deadline": 1767229800,
140
- "creator": "0x3333333333333333333333333333333333333333",
141
- "prover": "0x1111111111111111111111111111111111111111",
142
- "nativeAmount": "0",
143
- "tokens": [
144
- {
145
- "token": "0x1111111111111111111111111111111111111111",
146
- "amount": "1043221"
147
- }
148
- ]
149
- }
150
- },
151
- "encodedRoute": "0xdead",
152
- "encodedReward": "0xbeef",
153
- "vault": "0x5555555555555555555555555555555555555555"
154
- },
155
- "expiresAt": 1767225600,
156
- "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
157
- "quotes": null
158
- }
159
- }