@eco-foundation/api-schemas 0.1.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 CHANGED
@@ -14,35 +14,144 @@ 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.1.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.1.0` or the exact `0.1.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.1.0` — a registry copy and a `file:` tarball, say — can carry different schemas.
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.
78
+
79
+ ## Migrating 0.1.0 -> 0.2.0
80
+
81
+ `0.2.0` is a BREAKING release under 0.x semver (breaking bumps the minor while the major
82
+ is 0). Three tightenings reject request bodies `0.1.0` accepted, and one packaging change
83
+ alters how `zod` is resolved. Nothing here is a silent behavior change — every item below
84
+ turns something that used to succeed into a named 400 or a failed install.
85
+
86
+ **Install-time — `zod` is now a `peerDependency` (`^4.3.0`), not a dependency.** A consumer
87
+ that relied on the transitive copy must now declare `zod` itself. This is the fix for the
88
+ two-zod-instance failure: the old exact `4.4.3` pin materialised a second nested zod for any
89
+ consumer not on that exact version, producing `TS2345` on `_zod.version.minor` and `tsc`
90
+ OOMing at 4 GB with no message.
91
+
92
+ **Newly rejected — an amount at or above 2^256.** Every field typed `UintString` (quote
93
+ `source.amount`, `destination.amount`, fee/step amounts, `permit.value`, `permit.nonce`,
94
+ erc-3009 `value`/`validAfter`/`validBefore`, `gasLimit`, ...) is now bounded at `2^256-1`.
95
+ `0.1.0` validated a 200-digit value cleanly and let it revert or truncate on-chain. The
96
+ published OpenAPI carries the coarse `maxLength: 78`; the exact ceiling is enforced on every
97
+ parse.
98
+
99
+ **Newly rejected — an unknown key on `POST /v1/deposit-addresses`.** All three
100
+ `kind` variants of `DepositAddressCreateRequestSchema` are `strictObject`. In `0.1.0` a
101
+ misspelled field, or a field belonging to a different `kind` (`destinationChainId` on the
102
+ same-chain `gateway` variant), was silently STRIPPED and answered with a `201` — a
103
+ funds-receiving address created with semantics the caller did not request. It is now a 400
104
+ naming the offending key. Read paths and the lookup query are unchanged.
105
+
106
+ **Newly rejected — a redirected `permit.spender` on
107
+ `POST /v1/deposit-addresses/submit/erc-2612`.** `permit.spender` must equal
108
+ `target.depositAddress`, the same binding all three erc-3009 variants already enforced on
109
+ `authorization.to`. A redirected spender was previously accepted here and then silently
110
+ RE-ADDRESSED by the permit-transfer path.
111
+
112
+ **Changed error rendering (not a rejection).** Both binding refinements now carry the
113
+ `deposit-address-mismatch` catalog code as issue data, so a consumer rendering through the
114
+ new `problemFromZodError` gets that code and its 400 instead of the generic
115
+ `invalid-request` — on the erc-3009 lane that is a code CHANGE for an already-rejected body.
116
+ The code's catalog `title` generalizes to "The signed counterparty does not equal
117
+ target.depositAddress" (it named erc-3009 only); code, status and legacy refs are untouched.
118
+
119
+ **No validation change, but worth knowing.** `AnyAddress` now tries `TvmAddress` before
120
+ `SvmAddress`, so the `anyOf` branch ORDER in the published document differs. Every branch is
121
+ a plain string, so accepted values and parsed output are identical — and `AnyAddress` must
122
+ never be used to infer a VM either way (see its docblock). `V1_SCHEMA_DIGEST` changes, as it
123
+ must: it is the artifact identity, not the version string.
124
+
125
+ **New, additive:** the zod-free `./v1/signature` subpath; `MAX_UINT256`; and
126
+ `problemFromZodError` / `v1ErrorCodeFromIssues` / `v1IssueParams` / `V1_ISSUE_CODE_PARAM`.
28
127
 
29
128
  ## Consumers
30
129
 
31
130
  | Consumer | Import | Zod requirement |
32
131
  | ------------------------------------ | ---------------------------------------------------------------------------------------- | -------------------------------------- |
33
- | eco-router (serves /v1) | `import { v1 } from '@eco-foundation/api-schemas'` | none extra — zod ships as a dependency |
34
- | deposit-addresses (native endpoints) | same, plus `assertMatchesV1Schema` from `./testing` in CI | none extra |
132
+ | eco-router (serves /v1) | `import { v1 } from '@eco-foundation/api-schemas'` | own zod satisfying the peer range |
133
+ | deposit-addresses (native endpoints) | same, plus `assertMatchesV1Schema` from `./testing` in CI | own zod satisfying the peer range |
35
134
  | solver-v2 (Zod 3 — must not upgrade) | `import type { V1QuoteResponse } from '@eco-foundation/api-schemas/v1/types'` + fixtures | ZERO zod at runtime and in the `.d.ts` |
135
+ | any consumer needing `signatureHash` | `import { signatureHash } from '@eco-foundation/api-schemas/v1/signature'` | NONE — that subpath is zod-free |
36
136
 
37
137
  Zod-major compatibility is the reason there are two interfaces, not one:
38
138
 
39
139
  - **Zod-4 consumers** (eco-router `^4.4.3`, deposit-addresses `^4.3.5`) import the schemas
40
- directly. `zod` is a regular dependency of this package pinned **exact `4.4.3`** — nobody has
41
- to install Zod 4 themselves, and the exact pin is what keeps the generated OpenAPI byte-stable
42
- across zod patches. pnpm dedupes it against a consumer's own Zod 4.
140
+ directly. Since `0.2.0`, `zod` is a **`peerDependency` with a range (`^4.3.0`)**, not a
141
+ hard-pinned dependency: the consumer's own single copy satisfies it. The previous exact
142
+ `dependencies` pin at `4.4.3` materialised a SECOND nested zod for every consumer not on that
143
+ exact version, and two zod instances in one type graph is the documented failure — `TS2345` on
144
+ `_zod.version.minor` when a package schema is passed to a local `z.ZodType<T>`, and `tsc`
145
+ OOMing at 4 GB with no message. A consumer therefore installs zod itself (any `4.3.x`+ `4.x`);
146
+ the package keeps an exact `4.4.3` **devDependency** so its own build and its generated
147
+ OpenAPI stay byte-stable.
43
148
  - **solver-v2 is on Zod 3 and must never be forced to Zod 4.** It consumes the zod-free
44
149
  `./v1/types` subpath (plain `type` aliases, no zod in the emitted `.d.ts`) plus the golden
45
- fixtures. Root-level type re-exports from the bare package name exist as a convenience for
150
+ fixtures. Since `0.2.0` it can ALSO import `./v1/signature` — runtime code, zod-free — which
151
+ is the subpath that could replace its vendored local `canonicalizeSignature`. Both zod-free
152
+ subpaths carry a physical `v1/<name>.{js,d.ts}` forwarder, because TypeScript under
153
+ `moduleResolution: node10` (the default for `module: commonjs`, which is what solver-v2
154
+ compiles with) IGNORES the `exports` map and the specifier otherwise fails with TS2307. Root-level type re-exports from the bare package name exist as a convenience for
46
155
  Zod-4 consumers, but their `.d.ts` reaches zod through the `v1` namespace — solver-v2 must use
47
156
  the subpath.
48
157
  - `viem` is a **dev-only** dependency (the reference implementation the signature and
@@ -55,6 +164,7 @@ Zod-major compatibility is the reason there are two interfaces, not one:
55
164
  | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
56
165
  | `.` | `v1` namespace, `V1_SCHEMA_DIGEST`, `assertMatchesV1Schema`, `loadV1Fixtures`, `generateOpenApiDocument`, root type re-exports |
57
166
  | `./v1/types` | zod-free `type` aliases (the solver-v2 interface) |
167
+ | `./v1/signature` | `signatureHash` + `canonicalizeSignature` alone — **zod-free**, loads no schema module |
58
168
  | `./testing` | `assertMatchesV1Schema`, `loadV1Fixtures`, `V1Fixture` |
59
169
  | `./openapi/v1.json` | the generated OpenAPI 3.1 document |
60
170
  | `./fixtures/signature-hash/vectors.json` | cross-repo `signatureHash` vectors |
@@ -101,6 +211,11 @@ which needs no server.
101
211
  - `fixtures/signature-hash/vectors.json` is the cross-repo `signatureHash` contract: eco-router
102
212
  and deposit-addresses import the util and assert these vectors; solver-v2 keeps a local copy
103
213
  of the util ONLY with this file copied into its fixtures and asserted byte-for-byte.
214
+ Those copies are held in sync by `scripts/check-vendored-signature-vectors.sh` at the repo
215
+ root (`pnpm run canon:check`): it diffs every vendored copy against this file where the
216
+ sibling checkout is present, and pins this file's sha256 so a vector revision fails in the
217
+ same PR that makes it — a consuming repo cannot notice on its own, because each one asserts
218
+ only its own copy.
104
219
  - `fixtures/quote-signature/vector-*.json` are the F3 quote-signature golden vectors (EIP-712
105
220
  `EcoQuoteV1` domain); eco-router's signing path must reproduce every `digest`/`signature`.
106
221
  - `V1_SCHEMA_DIGEST` is sha256 over `errors/catalog.lock.json` then `openapi/v1.json`,
@@ -154,7 +269,7 @@ workflow verifies and publishes. It fails with `::error::tag version <x> != pack
154
269
  if the two drift, so a stale tag can never publish a mismatched artifact.
155
270
 
156
271
  Semver: breaking schema change = major, additive = minor; consumers pin minor. **While the
157
- package is 0.x, "pin minor" means `~0.1.0` or the exact `0.1.0` — never `^0`** (see
272
+ package is 0.x, "pin minor" means `~0.3.0` or the exact `0.3.0` — never `^0`** (see
158
273
  [Install](#install)). Consumers additionally compare `V1_SCHEMA_DIGEST`: a matching version
159
274
  string is not evidence of a matching artifact. `/v1/routes` is draft-tagged and exempt until its
160
275
  stability flips.
@@ -1,5 +1,5 @@
1
1
  {
2
- "digest": "72dceef6f939c524c595a94c80bdf2b545478022511aa58009573c8cd69dc432",
2
+ "digest": "3d41b4893b54e77e9ea56c24af1d7a1e9de0685ee911e497834dcd746e72c1f6",
3
3
  "inputs": [
4
4
  "errors/catalog.lock.json",
5
5
  "openapi/v1.json"
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const ChainContractsSchema: z.ZodObject<{
3
- portal: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
4
- executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>>;
3
+ portal: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
4
+ executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
5
5
  }, z.core.$loose>;
6
6
  export declare const ChainSchema: z.ZodObject<{
7
7
  chainId: z.ZodNumber;
8
8
  name: z.ZodString;
9
- quoteSigner: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
9
+ quoteSigner: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
10
10
  type: z.ZodEnum<{
11
11
  evm: "evm";
12
12
  svm: "svm";
@@ -21,8 +21,8 @@ export declare const ChainSchema: z.ZodObject<{
21
21
  paused: "paused";
22
22
  }>;
23
23
  contracts: z.ZodObject<{
24
- portal: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
25
- executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>>;
24
+ portal: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
25
+ executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
26
26
  }, z.core.$loose>;
27
27
  }, z.core.$loose>;
28
28
  export type Chain = z.input<typeof ChainSchema>;
@@ -30,7 +30,7 @@ export declare const ChainsResponseSchema: z.ZodObject<{
30
30
  chains: z.ZodArray<z.ZodObject<{
31
31
  chainId: z.ZodNumber;
32
32
  name: z.ZodString;
33
- quoteSigner: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
33
+ quoteSigner: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
34
34
  type: z.ZodEnum<{
35
35
  evm: "evm";
36
36
  svm: "svm";
@@ -45,8 +45,8 @@ export declare const ChainsResponseSchema: z.ZodObject<{
45
45
  paused: "paused";
46
46
  }>;
47
47
  contracts: z.ZodObject<{
48
- portal: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
49
- executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>>;
48
+ portal: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
49
+ executor: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
50
50
  }, z.core.$loose>;
51
51
  }, z.core.$loose>>;
52
52
  }, z.core.$loose>;
@@ -11,18 +11,18 @@ export declare const DepositAddressCreateRequestSchema: z.ZodDiscriminatedUnion<
11
11
  depositor: z.ZodString;
12
12
  kind: z.ZodLiteral<"solana">;
13
13
  destinationAddress: z.ZodString;
14
- }, z.core.$strip>, z.ZodObject<{
14
+ }, z.core.$strict>, z.ZodObject<{
15
15
  chainId: z.ZodNumber;
16
16
  depositor: z.ZodString;
17
17
  kind: z.ZodLiteral<"gateway">;
18
18
  destinationAddress: z.ZodString;
19
- }, z.core.$strip>, z.ZodObject<{
19
+ }, z.core.$strict>, z.ZodObject<{
20
20
  chainId: z.ZodNumber;
21
21
  depositor: z.ZodString;
22
22
  kind: z.ZodLiteral<"gateway-erc20">;
23
23
  destinationAddress: z.ZodString;
24
24
  destinationChainId: z.ZodNumber;
25
- }, z.core.$strip>], "kind">;
25
+ }, z.core.$strict>], "kind">;
26
26
  export type DepositAddressCreateRequest = z.infer<typeof DepositAddressCreateRequestSchema>;
27
27
  export declare const DepositAddressSchema: z.ZodObject<{
28
28
  id: z.ZodString;
@@ -34,7 +34,7 @@ export declare const DepositAddressSchema: z.ZodObject<{
34
34
  solana: "solana";
35
35
  "gateway-erc20": "gateway-erc20";
36
36
  }>;
37
- destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
37
+ destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
38
38
  destinationChainId: z.ZodOptional<z.ZodNumber>;
39
39
  expiresAt: z.ZodNullable<z.ZodNumber>;
40
40
  createdAt: z.ZodNumber;
@@ -50,7 +50,7 @@ export declare const DepositAddressCreateResponseSchema: z.ZodObject<{
50
50
  solana: "solana";
51
51
  "gateway-erc20": "gateway-erc20";
52
52
  }>;
53
- destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
53
+ destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
54
54
  destinationChainId: z.ZodOptional<z.ZodNumber>;
55
55
  expiresAt: z.ZodNullable<z.ZodNumber>;
56
56
  createdAt: z.ZodNumber;
@@ -60,7 +60,7 @@ export declare const DEPOSIT_ADDRESS_LOOKUP_QUERY_SHAPE: {
60
60
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
61
61
  depositAddress: z.ZodOptional<z.ZodString>;
62
62
  depositor: z.ZodOptional<z.ZodString>;
63
- destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>>;
63
+ destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
64
64
  chainId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
65
65
  kind: z.ZodOptional<z.ZodEnum<{
66
66
  gateway: "gateway";
@@ -73,7 +73,7 @@ export declare const DepositAddressLookupQuerySchema: z.ZodObject<{
73
73
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
74
74
  depositAddress: z.ZodOptional<z.ZodString>;
75
75
  depositor: z.ZodOptional<z.ZodString>;
76
- destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>>;
76
+ destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
77
77
  chainId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
78
78
  kind: z.ZodOptional<z.ZodEnum<{
79
79
  gateway: "gateway";
@@ -92,7 +92,7 @@ export declare const DepositAddressLookupResponseSchema: z.ZodObject<{
92
92
  solana: "solana";
93
93
  "gateway-erc20": "gateway-erc20";
94
94
  }>;
95
- destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>]>;
95
+ destinationAddress: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
96
96
  destinationChainId: z.ZodOptional<z.ZodNumber>;
97
97
  expiresAt: z.ZodNullable<z.ZodNumber>;
98
98
  createdAt: z.ZodNumber;
@@ -7,19 +7,19 @@ const status_1 = require("./status");
7
7
  exports.DEPOSIT_ADDRESS_KINDS = ['solana', 'gateway', 'gateway-erc20'];
8
8
  exports.DepositAddressKind = zod_1.z.enum(exports.DEPOSIT_ADDRESS_KINDS);
9
9
  exports.DepositAddressCreateRequestSchema = zod_1.z.discriminatedUnion('kind', [
10
- zod_1.z.object({
10
+ zod_1.z.strictObject({
11
11
  chainId: primitives_1.ChainId,
12
12
  depositor: primitives_1.EvmAddress,
13
13
  kind: zod_1.z.literal('solana'),
14
14
  destinationAddress: primitives_1.SvmAddress,
15
15
  }),
16
- zod_1.z.object({
16
+ zod_1.z.strictObject({
17
17
  chainId: primitives_1.ChainId,
18
18
  depositor: primitives_1.EvmAddress,
19
19
  kind: zod_1.z.literal('gateway'),
20
20
  destinationAddress: primitives_1.EvmAddress,
21
21
  }),
22
- zod_1.z.object({
22
+ zod_1.z.strictObject({
23
23
  chainId: primitives_1.ChainId,
24
24
  depositor: primitives_1.EvmAddress,
25
25
  kind: zod_1.z.literal('gateway-erc20'),
@@ -1 +1 @@
1
- {"version":3,"file":"deposit-addresses.js","sourceRoot":"","sources":["../../../src/v1/endpoints/deposit-addresses.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,8CAOuB;AACvB,qCAAiE;AAepD,QAAA,qBAAqB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,eAAe,CAAU,CAAC;AACxE,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC,6BAAqB,CAAC,CAAC;AAGnD,QAAA,iCAAiC,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC5E,OAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,oBAAO;QAChB,SAAS,EAAE,uBAAU;QACrB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACzB,kBAAkB,EAAE,uBAAU;KAC/B,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,oBAAO;QAChB,SAAS,EAAE,uBAAU;QACrB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC1B,kBAAkB,EAAE,uBAAU;KAC/B,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,OAAO,EAAE,oBAAO;QAChB,SAAS,EAAE,uBAAU;QACrB,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;QAChC,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