@eco-foundation/api-schemas 0.1.0 → 0.2.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 +75 -10
- package/dist/generated/build-digest.json +1 -1
- package/dist/v1/endpoints/chains.d.ts +8 -8
- package/dist/v1/endpoints/deposit-addresses.d.ts +8 -8
- package/dist/v1/endpoints/deposit-addresses.js +3 -3
- package/dist/v1/endpoints/deposit-addresses.js.map +1 -1
- package/dist/v1/endpoints/quotes.d.ts +86 -86
- package/dist/v1/endpoints/registry.d.ts +48 -48
- package/dist/v1/endpoints/routes.d.ts +4 -4
- package/dist/v1/endpoints/submit.js +16 -8
- package/dist/v1/endpoints/submit.js.map +1 -1
- package/dist/v1/endpoints/tokens.d.ts +2 -2
- package/dist/v1/errors/catalog.js +1 -1
- package/dist/v1/errors/catalog.js.map +1 -1
- package/dist/v1/errors/problem.d.ts +8 -2
- package/dist/v1/errors/problem.js +34 -1
- package/dist/v1/errors/problem.js.map +1 -1
- package/dist/v1/primitives.d.ts +2 -1
- package/dist/v1/primitives.js +12 -3
- package/dist/v1/primitives.js.map +1 -1
- package/openapi/v1.json +227 -184
- package/package.json +11 -4
- package/v1/signature.d.ts +9 -0
- package/v1/signature.js +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eco-foundation/api-schemas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"types": "./dist/v1/types.d.ts",
|
|
15
15
|
"default": "./dist/v1/types.js"
|
|
16
16
|
},
|
|
17
|
+
"./v1/signature": {
|
|
18
|
+
"types": "./dist/v1/signature.d.ts",
|
|
19
|
+
"default": "./dist/v1/signature.js"
|
|
20
|
+
},
|
|
17
21
|
"./testing": {
|
|
18
22
|
"types": "./dist/testing/index.d.ts",
|
|
19
23
|
"default": "./dist/testing/index.js"
|
|
@@ -36,8 +40,10 @@
|
|
|
36
40
|
"node": ">=22.11 <23"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@noble/hashes": "^1.8.0"
|
|
40
|
-
|
|
43
|
+
"@noble/hashes": "^1.8.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"zod": "^4.3.0"
|
|
41
47
|
},
|
|
42
48
|
"devDependencies": {
|
|
43
49
|
"@types/jest": "^29.5.12",
|
|
@@ -53,7 +59,8 @@
|
|
|
53
59
|
"ts-jest": "^29.1.2",
|
|
54
60
|
"ts-node": "^10.9.2",
|
|
55
61
|
"typescript": "^5.9.3",
|
|
56
|
-
"viem": "^2.40.1"
|
|
62
|
+
"viem": "^2.40.1",
|
|
63
|
+
"zod": "4.4.3"
|
|
57
64
|
},
|
|
58
65
|
"scripts": {
|
|
59
66
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// node10 resolution shim, same contract as v1/types.d.ts: TypeScript ignores the
|
|
2
|
+
// package `exports` map under `moduleResolution: node10` (the default for
|
|
3
|
+
// `module: commonjs`), which is what solver-v2 compiles with — and solver-v2 is
|
|
4
|
+
// precisely the consumer this zod-free subpath exists for, since it is on zod 3
|
|
5
|
+
// and keeps a LOCAL copy of canonicalizeSignature because it cannot import the
|
|
6
|
+
// zod-bearing root. Without this file that specifier fails with TS2307 there and
|
|
7
|
+
// the subpath is unreachable by the one repo it would unblock. `export *`, not
|
|
8
|
+
// `export type *`: this module has runtime exports.
|
|
9
|
+
export * from '../dist/v1/signature';
|
package/v1/signature.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Companion to signature.d.ts for resolvers that ignore the `exports` map. Node
|
|
2
|
+
// itself always honours `exports` and loads dist/v1/signature.js directly; this
|
|
3
|
+
// forwarder exists so the two resolution routes cannot diverge. Unlike
|
|
4
|
+
// v1/types.js this module has REAL runtime exports (canonicalizeSignature,
|
|
5
|
+
// signatureHash), so the re-export is load-bearing at runtime too.
|
|
6
|
+
module.exports = require('../dist/v1/signature.js');
|