@eco-foundation/api-schemas 0.2.0 → 0.3.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 +54 -4
- package/dist/generated/build-digest.json +1 -1
- package/dist/v1/endpoints/quotes.d.ts +6 -6
- package/dist/v1/endpoints/quotes.js +9 -5
- package/dist/v1/endpoints/quotes.js.map +1 -1
- package/dist/v1/endpoints/registry.d.ts +5 -5
- package/openapi/v1.json +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,17 +14,67 @@ While the package is 0.x, pin the patch range or the exact version:
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@eco-foundation/api-schemas": "~0.
|
|
17
|
+
"@eco-foundation/api-schemas": "~0.3.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
**Never write `^0`.** npm resolves `^0.x` as `>=0.0.0 <1.0.0`, so it silently accepts every
|
|
23
|
-
future breaking `0.y` — it is not a pin at all. Use `~0.
|
|
23
|
+
future breaking `0.y` — it is not a pin at all. Use `~0.3.0` or the exact `0.3.0`.
|
|
24
24
|
|
|
25
25
|
A matching version string is not evidence of a matching artifact: also compare
|
|
26
26
|
`V1_SCHEMA_DIGEST` (see [Invariants](#invariants-enforced-in-ci)). Two builds both called
|
|
27
|
-
`0.
|
|
27
|
+
`0.3.0` — a registry copy and a `file:` tarball, say — can carry different schemas.
|
|
28
|
+
|
|
29
|
+
## Migrating 0.2.0 -> 0.3.0
|
|
30
|
+
|
|
31
|
+
`0.3.0` is a BREAKING release under 0.x semver (breaking bumps the minor while the major
|
|
32
|
+
is 0). It contains exactly ONE change, and it rejects request bodies `0.2.0` accepted.
|
|
33
|
+
|
|
34
|
+
**Newly rejected — an unknown or misplaced key ANYWHERE in a quote request.**
|
|
35
|
+
`QuoteRequestSchema` and every object nested inside it are now `strictObject`: the root,
|
|
36
|
+
`source`, `destination`, each entry of `destination.calls[]`, and `options`. In `0.2.0` any
|
|
37
|
+
key the schema did not declare was silently STRIPPED and the request answered `200`. It is
|
|
38
|
+
now a 400 whose `unrecognized_keys` issue names the offending key and the path of the object
|
|
39
|
+
it appeared in.
|
|
40
|
+
|
|
41
|
+
**The break you are most likely to hit: a field you have been sending at the wrong nesting
|
|
42
|
+
level.** It has been silently ignored the whole time, so nothing looked wrong, and on upgrade
|
|
43
|
+
it starts returning 400. The known shapes of that mistake:
|
|
44
|
+
|
|
45
|
+
| Sent as | Belongs at | What `0.2.0` did |
|
|
46
|
+
| --------------------------- | -------------------------- | ---------------------------------------------------- |
|
|
47
|
+
| `source.funder` | `funder` | dropped it; the request had no funder |
|
|
48
|
+
| `destination.slippage` | `slippage` | dropped it; priced at the default tolerance |
|
|
49
|
+
| `visibility` | `options.visibility` | dropped it; a route you wanted private was published |
|
|
50
|
+
| `options.dappId` | `dappId` | dropped it; you lost attribution |
|
|
51
|
+
| `options.allowHighSlippage` | nowhere (deleted in 0.2.0) | dropped it silently |
|
|
52
|
+
|
|
53
|
+
`source.funder` is not a hypothetical: spelling `funder` there is how a funder-vs-signer check
|
|
54
|
+
on the money path became a permanent no-op once before, and how two guards were later found
|
|
55
|
+
reporting protection they did not provide — they read the nested path, the key was never
|
|
56
|
+
there, and `undefined === undefined` passes for every input. A strict root turns that into a
|
|
57
|
+
named 400 at the edge instead.
|
|
58
|
+
|
|
59
|
+
**Before you upgrade,** log the request bodies your client actually sends and diff their key
|
|
60
|
+
sets against the schema. A field the server was ignoring is a field your integration was
|
|
61
|
+
already not getting; the 400 is the first time you find out.
|
|
62
|
+
|
|
63
|
+
**Two behaviors worth knowing:**
|
|
64
|
+
|
|
65
|
+
- An unrecognized key ABORTS the parse, so the cross-field diagnostics (the D7
|
|
66
|
+
`destination.calls` rules, the exact-out `amount` rules) do NOT also report on the same
|
|
67
|
+
response. Fix the key, re-send, and the rest appears. Pinned in a test.
|
|
68
|
+
- RESPONSE schemas are untouched and stay `looseObject` at every level. Forward compatibility
|
|
69
|
+
runs the other way: a consumer must keep parsing fields a newer server adds. Also untouched:
|
|
70
|
+
the four submit BODY schemas and their signed value objects (`Permit3Payload` relies on
|
|
71
|
+
stripping a misplaced `permit3.signature`, so a reader has exactly one place to find the
|
|
72
|
+
signature), and the three querystring schemas (proxies and clients add query params, a
|
|
73
|
+
different risk profile from a JSON body).
|
|
74
|
+
|
|
75
|
+
The error catalog gained NO new codes — `invalid-parameter` and `invalid-request` already
|
|
76
|
+
cover this. `V1_SCHEMA_DIGEST` changes, as it must: the published `openapi/v1.json` gains
|
|
77
|
+
`additionalProperties: false` on all five request objects.
|
|
28
78
|
|
|
29
79
|
## Migrating 0.1.0 -> 0.2.0
|
|
30
80
|
|
|
@@ -219,7 +269,7 @@ workflow verifies and publishes. It fails with `::error::tag version <x> != pack
|
|
|
219
269
|
if the two drift, so a stale tag can never publish a mismatched artifact.
|
|
220
270
|
|
|
221
271
|
Semver: breaking schema change = major, additive = minor; consumers pin minor. **While the
|
|
222
|
-
package is 0.x, "pin minor" means `~0.
|
|
272
|
+
package is 0.x, "pin minor" means `~0.3.0` or the exact `0.3.0` — never `^0`** (see
|
|
223
273
|
[Install](#install)). Consumers additionally compare `V1_SCHEMA_DIGEST`: a matching version
|
|
224
274
|
string is not evidence of a matching artifact. `/v1/routes` is draft-tagged and exempt until its
|
|
225
275
|
stability flips.
|
|
@@ -5,7 +5,7 @@ export declare const DestinationCallSchema: z.ZodObject<{
|
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
tokenOut: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
|
|
7
7
|
gasLimit: z.ZodOptional<z.ZodString>;
|
|
8
|
-
}, z.core.$
|
|
8
|
+
}, z.core.$strict>;
|
|
9
9
|
export declare const QuoteRequestSchema: z.ZodObject<{
|
|
10
10
|
swapType: z.ZodEnum<{
|
|
11
11
|
custom: "custom";
|
|
@@ -16,7 +16,7 @@ export declare const QuoteRequestSchema: z.ZodObject<{
|
|
|
16
16
|
chainId: z.ZodNumber;
|
|
17
17
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
18
18
|
amount: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, z.core.$
|
|
19
|
+
}, z.core.$strict>;
|
|
20
20
|
destination: z.ZodObject<{
|
|
21
21
|
chainId: z.ZodNumber;
|
|
22
22
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
@@ -28,8 +28,8 @@ export declare const QuoteRequestSchema: z.ZodObject<{
|
|
|
28
28
|
value: z.ZodString;
|
|
29
29
|
tokenOut: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
|
|
30
30
|
gasLimit: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$
|
|
32
|
-
}, z.core.$
|
|
31
|
+
}, z.core.$strict>>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
33
|
funder: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
34
34
|
refundRecipient: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
|
|
35
35
|
slippage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -42,8 +42,8 @@ export declare const QuoteRequestSchema: z.ZodObject<{
|
|
|
42
42
|
}>>;
|
|
43
43
|
maxCallDataSize: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
allQuotes: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
}, z.core.$
|
|
46
|
-
}, z.core.$
|
|
45
|
+
}, z.core.$strict>>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
47
|
export type QuoteRequest = z.input<typeof QuoteRequestSchema>;
|
|
48
48
|
export declare const FeeTokenSchema: z.ZodObject<{
|
|
49
49
|
chainId: z.ZodNumber;
|
|
@@ -6,14 +6,14 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const enums_1 = require("../enums");
|
|
7
7
|
const catalog_1 = require("../errors/catalog");
|
|
8
8
|
const primitives_1 = require("../primitives");
|
|
9
|
-
exports.DestinationCallSchema = zod_1.z.
|
|
9
|
+
exports.DestinationCallSchema = zod_1.z.strictObject({
|
|
10
10
|
target: primitives_1.AnyAddress,
|
|
11
11
|
data: primitives_1.HexBytes,
|
|
12
12
|
value: primitives_1.UintString,
|
|
13
13
|
tokenOut: primitives_1.AnyAddress.optional(),
|
|
14
14
|
gasLimit: primitives_1.UintString.optional(),
|
|
15
15
|
});
|
|
16
|
-
const QuoteRequestOptionsSchema = zod_1.z.
|
|
16
|
+
const QuoteRequestOptionsSchema = zod_1.z.strictObject({
|
|
17
17
|
deadlineSec: zod_1.z.number().int().positive().optional(),
|
|
18
18
|
visibility: enums_1.Visibility.optional(),
|
|
19
19
|
maxCallDataSize: zod_1.z.number().int().positive().optional(),
|
|
@@ -21,10 +21,14 @@ const QuoteRequestOptionsSchema = zod_1.z.object({
|
|
|
21
21
|
});
|
|
22
22
|
const SLIPPAGE_RANGE_MESSAGE = `${(0, catalog_1.getErrorDefinition)('slippage-out-of-bounds').title} (error code: slippage-out-of-bounds)`;
|
|
23
23
|
exports.QuoteRequestSchema = zod_1.z
|
|
24
|
-
.
|
|
24
|
+
.strictObject({
|
|
25
25
|
swapType: enums_1.SwapType,
|
|
26
|
-
source: zod_1.z.
|
|
27
|
-
|
|
26
|
+
source: zod_1.z.strictObject({
|
|
27
|
+
chainId: primitives_1.ChainId,
|
|
28
|
+
token: primitives_1.AnyAddress,
|
|
29
|
+
amount: primitives_1.UintString.optional(),
|
|
30
|
+
}),
|
|
31
|
+
destination: zod_1.z.strictObject({
|
|
28
32
|
chainId: primitives_1.ChainId,
|
|
29
33
|
token: primitives_1.AnyAddress,
|
|
30
34
|
amount: primitives_1.UintString.optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../../src/v1/endpoints/quotes.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../../src/v1/endpoints/quotes.ts"],"names":[],"mappings":";;;AAqdA,sDA4CC;AAjgBD,6BAAwB;AAExB,oCAAiG;AACjG,+CAAuD;AACvD,8CAWuB;AAYV,QAAA,qBAAqB,GAAG,OAAC,CAAC,YAAY,CAAC;IAClD,MAAM,EAAE,uBAAU;IAClB,IAAI,EAAE,qBAAQ;IACd,KAAK,EAAE,uBAAU;IACjB,QAAQ,EAAE,uBAAU,CAAC,QAAQ,EAAE;IAC/B,QAAQ,EAAE,uBAAU,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAUH,MAAM,yBAAyB,GAAG,OAAC,CAAC,YAAY,CAAC;IAC/C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACnD,UAAU,EAAE,kBAAU,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAOvD,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAaH,MAAM,sBAAsB,GAAG,GAC7B,IAAA,4BAAkB,EAAC,wBAAwB,CAAC,CAAC,KAC/C,uCAAuC,CAAC;AAqB3B,QAAA,kBAAkB,GAAG,OAAC;KAChC,YAAY,CAAC;IACZ,QAAQ,EAAE,gBAAQ;IAClB,MAAM,EAAE,OAAC,CAAC,YAAY,CAAC;QACrB,OAAO,EAAE,oBAAO;QAChB,KAAK,EAAE,uBAAU;QACjB,MAA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UAAU,CAAC;YAAE,SAAS;QACnC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACrB,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAGD,YAAY,CAAC,IAAI,EAAE,CAAC;IAEpB,OAAO;QACL,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,aAAa,EAAE;QAC1E,KAAK,EAAE,6BAAqB;QAC5B,WAAW,EAAE,OAAgB;QAC7B,OAAO,EAAE;YACP,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,YAAY;YACZ,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -29,7 +29,7 @@ export declare const V1_ENDPOINTS: {
|
|
|
29
29
|
chainId: z.ZodNumber;
|
|
30
30
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
31
31
|
amount: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$
|
|
32
|
+
}, z.core.$strict>;
|
|
33
33
|
destination: z.ZodObject<{
|
|
34
34
|
chainId: z.ZodNumber;
|
|
35
35
|
token: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
@@ -41,8 +41,8 @@ export declare const V1_ENDPOINTS: {
|
|
|
41
41
|
value: z.ZodString;
|
|
42
42
|
tokenOut: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
|
|
43
43
|
gasLimit: z.ZodOptional<z.ZodString>;
|
|
44
|
-
}, z.core.$
|
|
45
|
-
}, z.core.$
|
|
44
|
+
}, z.core.$strict>>>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
46
|
funder: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
47
47
|
refundRecipient: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
|
|
48
48
|
slippage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -55,8 +55,8 @@ export declare const V1_ENDPOINTS: {
|
|
|
55
55
|
}>>;
|
|
56
56
|
maxCallDataSize: z.ZodOptional<z.ZodNumber>;
|
|
57
57
|
allQuotes: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
-
}, z.core.$
|
|
59
|
-
}, z.core.$
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
60
|
readonly response: z.ZodObject<{
|
|
61
61
|
id: z.ZodString;
|
|
62
62
|
swapType: z.ZodEnum<{
|
package/openapi/v1.json
CHANGED
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
"required": [
|
|
92
92
|
"chainId",
|
|
93
93
|
"token"
|
|
94
|
-
]
|
|
94
|
+
],
|
|
95
|
+
"additionalProperties": false
|
|
95
96
|
},
|
|
96
97
|
"destination": {
|
|
97
98
|
"type": "object",
|
|
@@ -226,14 +227,16 @@
|
|
|
226
227
|
"target",
|
|
227
228
|
"data",
|
|
228
229
|
"value"
|
|
229
|
-
]
|
|
230
|
+
],
|
|
231
|
+
"additionalProperties": false
|
|
230
232
|
}
|
|
231
233
|
}
|
|
232
234
|
},
|
|
233
235
|
"required": [
|
|
234
236
|
"chainId",
|
|
235
237
|
"token"
|
|
236
|
-
]
|
|
238
|
+
],
|
|
239
|
+
"additionalProperties": false
|
|
237
240
|
},
|
|
238
241
|
"funder": {
|
|
239
242
|
"anyOf": [
|
|
@@ -316,7 +319,8 @@
|
|
|
316
319
|
"allQuotes": {
|
|
317
320
|
"type": "boolean"
|
|
318
321
|
}
|
|
319
|
-
}
|
|
322
|
+
},
|
|
323
|
+
"additionalProperties": false
|
|
320
324
|
}
|
|
321
325
|
},
|
|
322
326
|
"required": [
|
|
@@ -324,7 +328,8 @@
|
|
|
324
328
|
"source",
|
|
325
329
|
"destination",
|
|
326
330
|
"funder"
|
|
327
|
-
]
|
|
331
|
+
],
|
|
332
|
+
"additionalProperties": false
|
|
328
333
|
}
|
|
329
334
|
}
|
|
330
335
|
}
|
package/package.json
CHANGED