@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
@@ -0,0 +1,206 @@
1
+ {
2
+ "endpointId": "quotes.create",
3
+ "direction": "response",
4
+ "variant": "gateway-deposit",
5
+ "method": "POST",
6
+ "path": "/v1/quotes",
7
+ "expectedStatus": 200,
8
+ "sideEffect": true,
9
+ "payload": {
10
+ "id": "quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f",
11
+ "type": "gateway-deposit",
12
+ "source": {
13
+ "chainId": 8453,
14
+ "token": "0x1111111111111111111111111111111111111111",
15
+ "amount": "1043221",
16
+ "funder": "0x3333333333333333333333333333333333333333",
17
+ "symbol": "USDC",
18
+ "decimals": 6
19
+ },
20
+ "destination": {
21
+ "chainId": 10,
22
+ "token": "0x2222222222222222222222222222222222222222",
23
+ "amountOut": "1013221",
24
+ "minAmountOut": "1013221",
25
+ "recipient": "0x3333333333333333333333333333333333333333",
26
+ "symbol": "USDC",
27
+ "decimals": 6
28
+ },
29
+ "slippage": 0,
30
+ "fees": [
31
+ {
32
+ "type": "protocol",
33
+ "amount": "30000",
34
+ "token": {
35
+ "chainId": 8453,
36
+ "address": "0x1111111111111111111111111111111111111111",
37
+ "symbol": "USDC",
38
+ "decimals": 6
39
+ },
40
+ "estimate": false
41
+ },
42
+ {
43
+ "type": "gateway",
44
+ "amount": "0",
45
+ "token": {
46
+ "chainId": 10,
47
+ "address": "0x2222222222222222222222222222222222222222",
48
+ "symbol": "USDC",
49
+ "decimals": 6
50
+ },
51
+ "estimate": true
52
+ }
53
+ ],
54
+ "steps": [
55
+ {
56
+ "type": "bridge",
57
+ "provider": "eco",
58
+ "from": {
59
+ "chainId": 8453,
60
+ "token": "0x1111111111111111111111111111111111111111",
61
+ "amount": "1043221"
62
+ },
63
+ "to": {
64
+ "chainId": 10,
65
+ "token": "0x2222222222222222222222222222222222222222",
66
+ "amount": "1013221"
67
+ },
68
+ "fees": [],
69
+ "estimatedDurationSec": 60,
70
+ "intents": [
71
+ {
72
+ "role": "local",
73
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
74
+ "intent": {
75
+ "route": {
76
+ "salt": "0xabababababababababababababababababababababababababababababababab",
77
+ "deadline": 1767830400,
78
+ "source": 8453,
79
+ "destination": 8453,
80
+ "portal": "0x2222222222222222222222222222222222222222",
81
+ "nativeAmount": "0",
82
+ "tokens": [
83
+ {
84
+ "token": "0x1111111111111111111111111111111111111111",
85
+ "amount": "1043221"
86
+ }
87
+ ],
88
+ "calls": [
89
+ {
90
+ "target": "0x1111111111111111111111111111111111111111",
91
+ "data": "0xbeef",
92
+ "value": "0"
93
+ }
94
+ ]
95
+ },
96
+ "reward": {
97
+ "deadline": 1767229200,
98
+ "creator": "0x3333333333333333333333333333333333333333",
99
+ "prover": "0x1111111111111111111111111111111111111111",
100
+ "nativeAmount": "0",
101
+ "tokens": [
102
+ {
103
+ "token": "0x1111111111111111111111111111111111111111",
104
+ "amount": "1043221"
105
+ }
106
+ ]
107
+ }
108
+ }
109
+ },
110
+ {
111
+ "role": "stitched-destination",
112
+ "intentHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
113
+ "intent": {
114
+ "route": {
115
+ "salt": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
116
+ "deadline": 1767830400,
117
+ "source": 10,
118
+ "destination": 10,
119
+ "portal": "0x4444444444444444444444444444444444444444",
120
+ "nativeAmount": "0",
121
+ "tokens": [
122
+ {
123
+ "token": "0x2222222222222222222222222222222222222222",
124
+ "amount": "1013221"
125
+ }
126
+ ],
127
+ "calls": [
128
+ {
129
+ "target": "0x2222222222222222222222222222222222222222",
130
+ "data": "0xbeef",
131
+ "value": "0"
132
+ }
133
+ ]
134
+ },
135
+ "reward": {
136
+ "deadline": 1767229200,
137
+ "creator": "0x1111111111111111111111111111111111111111",
138
+ "prover": "0x1111111111111111111111111111111111111111",
139
+ "nativeAmount": "0",
140
+ "tokens": [
141
+ {
142
+ "token": "0x2222222222222222222222222222222222222222",
143
+ "amount": "1013221"
144
+ }
145
+ ]
146
+ }
147
+ }
148
+ }
149
+ ]
150
+ }
151
+ ],
152
+ "solver": {
153
+ "id": "0x3333333333333333333333333333333333333333",
154
+ "name": "eco"
155
+ },
156
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
157
+ "execution": {
158
+ "transaction": {
159
+ "type": "evm",
160
+ "chainId": 8453,
161
+ "to": "0x2222222222222222222222222222222222222222",
162
+ "data": "0xdeadbeef",
163
+ "value": "0"
164
+ },
165
+ "intent": {
166
+ "route": {
167
+ "salt": "0xabababababababababababababababababababababababababababababababab",
168
+ "deadline": 1767830400,
169
+ "source": 8453,
170
+ "destination": 8453,
171
+ "portal": "0x2222222222222222222222222222222222222222",
172
+ "nativeAmount": "0",
173
+ "tokens": [
174
+ {
175
+ "token": "0x1111111111111111111111111111111111111111",
176
+ "amount": "1043221"
177
+ }
178
+ ],
179
+ "calls": [
180
+ {
181
+ "target": "0x1111111111111111111111111111111111111111",
182
+ "data": "0xbeef",
183
+ "value": "0"
184
+ }
185
+ ]
186
+ },
187
+ "reward": {
188
+ "deadline": 1767229200,
189
+ "creator": "0x3333333333333333333333333333333333333333",
190
+ "prover": "0x1111111111111111111111111111111111111111",
191
+ "nativeAmount": "0",
192
+ "tokens": [
193
+ {
194
+ "token": "0x1111111111111111111111111111111111111111",
195
+ "amount": "1043221"
196
+ }
197
+ ]
198
+ }
199
+ },
200
+ "vault": "0x5555555555555555555555555555555555555555"
201
+ },
202
+ "expiresAt": 1767225600,
203
+ "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
204
+ "quotes": null
205
+ }
206
+ }
@@ -0,0 +1,228 @@
1
+ {
2
+ "endpointId": "quotes.create",
3
+ "direction": "response",
4
+ "variant": "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
+ "type": "exact-in",
12
+ "source": {
13
+ "chainId": 8453,
14
+ "token": "0x1111111111111111111111111111111111111111",
15
+ "amount": "1043221",
16
+ "funder": "0x3333333333333333333333333333333333333333",
17
+ "symbol": "USDC",
18
+ "decimals": 6
19
+ },
20
+ "destination": {
21
+ "chainId": 10,
22
+ "token": "0x2222222222222222222222222222222222222222",
23
+ "amountOut": "1043221",
24
+ "minAmountOut": "1038005",
25
+ "recipient": "0x3333333333333333333333333333333333333333",
26
+ "symbol": "USDC",
27
+ "decimals": 6
28
+ },
29
+ "slippage": 0.005,
30
+ "fees": [
31
+ {
32
+ "type": "gas",
33
+ "amount": "1200",
34
+ "token": {
35
+ "chainId": 8453,
36
+ "address": "0x1111111111111111111111111111111111111111",
37
+ "symbol": "USDC",
38
+ "decimals": 6
39
+ },
40
+ "estimate": true
41
+ }
42
+ ],
43
+ "steps": [
44
+ {
45
+ "type": "swap",
46
+ "provider": "uniswap-v3",
47
+ "aggregator": "ecoswap",
48
+ "from": {
49
+ "chainId": 8453,
50
+ "token": "0x1111111111111111111111111111111111111111",
51
+ "amount": "1043221"
52
+ },
53
+ "to": {
54
+ "chainId": 8453,
55
+ "token": "0x2222222222222222222222222222222222222222",
56
+ "amount": "1043000"
57
+ },
58
+ "fees": [
59
+ {
60
+ "type": "protocol",
61
+ "amount": "221",
62
+ "token": {
63
+ "chainId": 8453,
64
+ "address": "0x1111111111111111111111111111111111111111",
65
+ "symbol": null,
66
+ "decimals": null
67
+ },
68
+ "estimate": false
69
+ }
70
+ ],
71
+ "estimatedDurationSec": 3,
72
+ "intents": [
73
+ {
74
+ "role": "local",
75
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
76
+ "intent": {
77
+ "route": {
78
+ "salt": "0xabababababababababababababababababababababababababababababababab",
79
+ "deadline": 1767226200,
80
+ "source": 8453,
81
+ "destination": 10,
82
+ "portal": "0x2222222222222222222222222222222222222222",
83
+ "nativeAmount": "0",
84
+ "tokens": [
85
+ {
86
+ "token": "0x2222222222222222222222222222222222222222",
87
+ "amount": "1038005"
88
+ }
89
+ ],
90
+ "calls": [
91
+ {
92
+ "target": "0x2222222222222222222222222222222222222222",
93
+ "data": "0xbeef",
94
+ "value": "0"
95
+ }
96
+ ]
97
+ },
98
+ "reward": {
99
+ "deadline": 1767229800,
100
+ "creator": "0x3333333333333333333333333333333333333333",
101
+ "prover": "0x1111111111111111111111111111111111111111",
102
+ "nativeAmount": "0",
103
+ "tokens": [
104
+ {
105
+ "token": "0x1111111111111111111111111111111111111111",
106
+ "amount": "1043221"
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "type": "bridge",
116
+ "provider": "eco",
117
+ "from": {
118
+ "chainId": 8453,
119
+ "token": "0x1111111111111111111111111111111111111111",
120
+ "amount": "1043221"
121
+ },
122
+ "to": {
123
+ "chainId": 10,
124
+ "token": "0x2222222222222222222222222222222222222222",
125
+ "amount": "1038005"
126
+ },
127
+ "fees": [],
128
+ "estimatedDurationSec": 20,
129
+ "intents": [
130
+ {
131
+ "role": "bucket-candidate",
132
+ "intentHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
133
+ "routeHash": "0x1212121212121212121212121212121212121212121212121212121212121212",
134
+ "bucketIndex": 0,
135
+ "intent": {
136
+ "route": {
137
+ "salt": "0xabababababababababababababababababababababababababababababababab",
138
+ "deadline": 1767226200,
139
+ "source": 8453,
140
+ "destination": 10,
141
+ "portal": "0x2222222222222222222222222222222222222222",
142
+ "nativeAmount": "0",
143
+ "tokens": [
144
+ {
145
+ "token": "0x2222222222222222222222222222222222222222",
146
+ "amount": "1038005"
147
+ }
148
+ ],
149
+ "calls": [
150
+ {
151
+ "target": "0x2222222222222222222222222222222222222222",
152
+ "data": "0xbeef",
153
+ "value": "0"
154
+ }
155
+ ]
156
+ },
157
+ "reward": {
158
+ "deadline": 1767229800,
159
+ "creator": "0x3333333333333333333333333333333333333333",
160
+ "prover": "0x1111111111111111111111111111111111111111",
161
+ "nativeAmount": "0",
162
+ "tokens": [
163
+ {
164
+ "token": "0x1111111111111111111111111111111111111111",
165
+ "amount": "1043221"
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ }
171
+ ]
172
+ }
173
+ ],
174
+ "solver": {
175
+ "id": "0x3333333333333333333333333333333333333333",
176
+ "name": "eco"
177
+ },
178
+ "intentHash": "0xabababababababababababababababababababababababababababababababab",
179
+ "execution": {
180
+ "transaction": {
181
+ "type": "evm",
182
+ "chainId": 8453,
183
+ "to": "0x1111111111111111111111111111111111111111",
184
+ "data": "0xdeadbeef",
185
+ "value": "0"
186
+ },
187
+ "intent": {
188
+ "route": {
189
+ "salt": "0xabababababababababababababababababababababababababababababababab",
190
+ "deadline": 1767226200,
191
+ "source": 8453,
192
+ "destination": 10,
193
+ "portal": "0x2222222222222222222222222222222222222222",
194
+ "nativeAmount": "0",
195
+ "tokens": [
196
+ {
197
+ "token": "0x2222222222222222222222222222222222222222",
198
+ "amount": "1038005"
199
+ }
200
+ ],
201
+ "calls": [
202
+ {
203
+ "target": "0x2222222222222222222222222222222222222222",
204
+ "data": "0xbeef",
205
+ "value": "0"
206
+ }
207
+ ]
208
+ },
209
+ "reward": {
210
+ "deadline": 1767229800,
211
+ "creator": "0x3333333333333333333333333333333333333333",
212
+ "prover": "0x1111111111111111111111111111111111111111",
213
+ "nativeAmount": "0",
214
+ "tokens": [
215
+ {
216
+ "token": "0x1111111111111111111111111111111111111111",
217
+ "amount": "1043221"
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ "vault": "0x5555555555555555555555555555555555555555"
223
+ },
224
+ "expiresAt": 1767225600,
225
+ "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
226
+ "quotes": null
227
+ }
228
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "digest": "a61dfe727b15162f9097b421ca2f7660750e8cfad85ccf2d1c8dd8340207852a",
2
+ "digest": "fa55e655ef48bbc69a551e263c1bf80cc91e8b920f9f98c29cf9b62b01a53be9",
3
3
  "inputs": [
4
4
  "errors/catalog.lock.json",
5
5
  "openapi/v1.json"
package/dist/index.d.ts CHANGED
@@ -3,4 +3,4 @@ export { generateOpenApiDocument, STABLE_TAG } from './openapi';
3
3
  export type { V1Fixture } from './testing';
4
4
  export { assertMatchesV1Schema, loadV1Fixtures } from './testing';
5
5
  export * as v1 from './v1';
6
- export type { LegacyCodeRef, V1Chain, V1ChainType, V1DepositAddress, V1DepositAddressChainStatus, V1DepositAddressCreateRequest, V1DepositAddressCreateResponse, V1DepositAddressKind, V1DestinationCall, V1ErrorCode, V1ErrorDefinition, V1Execution, V1Fee, V1FeeKind, V1FeeToken, V1FundingTransaction, V1GaslessJob, V1GaslessJobStatus, V1GaslessSubState, V1GaslessSubStatus, V1Guarantee, V1IntentCall, V1IntentReward, V1IntentRoute, V1IntentTokenAmount, V1ProblemBody, V1QuoteCore, V1QuoteRequest, V1QuoteResponse, V1RankedQuoteEntry, V1RelatedIntent, V1RelatedIntentRole, V1SolverIdentity, V1StatusEntry, V1StatusStep, V1StatusStepType, V1StatusTokenAmount, V1StatusTxDetail, V1StatusTxRef, V1StatusType, V1Step, V1StepKind, V1StepLeg, V1SvmAccountMeta, V1SvmInstruction, V1SwapType, V1TokenEntry, V1Visibility, } from './v1/types';
6
+ export type { LegacyCodeRef, V1Chain, V1ChainType, V1DepositAddress, V1DepositAddressChainStatus, V1DepositAddressCreateRequest, V1DepositAddressCreateResponse, V1DepositAddressType, V1DestinationCall, V1ErrorCode, V1ErrorDefinition, V1Execution, V1Fee, V1FeeToken, V1FeeType, V1FundingTransaction, V1GaslessJob, V1GaslessJobStatus, V1GaslessSubState, V1GaslessSubStatus, V1IntentCall, V1IntentReward, V1IntentRoute, V1IntentTokenAmount, V1ProblemBody, V1QuoteCore, V1QuoteRequest, V1QuoteResponse, V1QuoteType, V1RankedQuoteEntry, V1RelatedIntentRole, V1SolverIdentity, V1StatusEntry, V1StatusStep, V1StatusStepType, V1StatusTokenAmount, V1StatusTxDetail, V1StatusTxRef, V1StatusType, V1Step, V1StepIntent, V1StepLeg, V1StepType, V1SvmAccountMeta, V1SvmInstruction, V1TokenEntry, } from './v1/types';
package/dist/openapi.js CHANGED
@@ -8,9 +8,27 @@ const catalog_1 = require("./v1/errors/catalog");
8
8
  const problem_1 = require("./v1/errors/problem");
9
9
  const PROBLEM_REF = '#/components/schemas/Problem';
10
10
  exports.STABLE_TAG = 'stable';
11
+ function stripPermissiveAdditionalProperties(node) {
12
+ if (Array.isArray(node)) {
13
+ for (const item of node)
14
+ stripPermissiveAdditionalProperties(item);
15
+ return;
16
+ }
17
+ if (!node || typeof node !== 'object')
18
+ return;
19
+ const record = node;
20
+ const ap = record.additionalProperties;
21
+ if (ap === true || (ap && typeof ap === 'object' && Object.keys(ap).length === 0)) {
22
+ delete record.additionalProperties;
23
+ }
24
+ for (const value of Object.values(record))
25
+ stripPermissiveAdditionalProperties(value);
26
+ }
11
27
  function toSchema(schema, io) {
12
28
  const json = zod_1.z.toJSONSchema(schema, { target: 'draft-2020-12', io });
13
29
  delete json.$schema;
30
+ if (io === 'output')
31
+ stripPermissiveAdditionalProperties(json);
14
32
  return json;
15
33
  }
16
34
  function parameters(def) {
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":";;;AAwDA,0DAyDC;AAjHD,6BAAwB;AAExB,sDAA2F;AAC3F,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- export declare const DEPOSIT_ADDRESS_KINDS: readonly ["solana", "gateway", "gateway-erc20"];
3
- export declare const DepositAddressKind: z.ZodEnum<{
2
+ export declare const DEPOSIT_ADDRESS_TYPES: readonly ["solana", "gateway", "gateway-erc20"];
3
+ export declare const DepositAddressType: z.ZodEnum<{
4
4
  gateway: "gateway";
5
5
  solana: "solana";
6
6
  "gateway-erc20": "gateway-erc20";
7
7
  }>;
8
- export type DepositAddressKind = z.infer<typeof DepositAddressKind>;
8
+ export type DepositAddressType = z.infer<typeof DepositAddressType>;
9
9
  export declare const DepositAddressCreateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
10
10
  chainId: z.ZodNumber;
11
11
  depositor: z.ZodString;
12
- kind: z.ZodLiteral<"solana">;
12
+ type: z.ZodLiteral<"solana">;
13
13
  destinationAddress: z.ZodString;
14
14
  }, z.core.$strict>, z.ZodObject<{
15
15
  chainId: z.ZodNumber;
16
16
  depositor: z.ZodString;
17
- kind: z.ZodLiteral<"gateway">;
17
+ type: z.ZodLiteral<"gateway">;
18
18
  destinationAddress: z.ZodString;
19
19
  }, z.core.$strict>, z.ZodObject<{
20
20
  chainId: z.ZodNumber;
21
21
  depositor: z.ZodString;
22
- kind: z.ZodLiteral<"gateway-erc20">;
22
+ type: z.ZodLiteral<"gateway-erc20">;
23
23
  destinationAddress: z.ZodString;
24
24
  destinationChainId: z.ZodNumber;
25
- }, z.core.$strict>], "kind">;
25
+ }, z.core.$strict>], "type">;
26
26
  export type DepositAddressCreateRequest = z.infer<typeof DepositAddressCreateRequestSchema>;
27
27
  export declare const DepositAddressSchema: z.ZodObject<{
28
28
  id: z.ZodString;
29
29
  depositAddress: z.ZodString;
30
30
  chainId: z.ZodNumber;
31
31
  depositor: z.ZodString;
32
- kind: z.ZodEnum<{
32
+ type: z.ZodEnum<{
33
33
  gateway: "gateway";
34
34
  solana: "solana";
35
35
  "gateway-erc20": "gateway-erc20";
@@ -59,7 +59,7 @@ export declare const DepositAddressCreateResponseSchema: z.ZodObject<{
59
59
  depositAddress: z.ZodString;
60
60
  chainId: z.ZodNumber;
61
61
  depositor: z.ZodString;
62
- kind: z.ZodEnum<{
62
+ type: z.ZodEnum<{
63
63
  gateway: "gateway";
64
64
  solana: "solana";
65
65
  "gateway-erc20": "gateway-erc20";
@@ -85,7 +85,7 @@ export declare const DEPOSIT_ADDRESS_LOOKUP_QUERY_SHAPE: {
85
85
  depositor: z.ZodOptional<z.ZodString>;
86
86
  destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
87
87
  chainId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
88
- kind: z.ZodOptional<z.ZodEnum<{
88
+ type: z.ZodOptional<z.ZodEnum<{
89
89
  gateway: "gateway";
90
90
  solana: "solana";
91
91
  "gateway-erc20": "gateway-erc20";
@@ -98,7 +98,7 @@ export declare const DepositAddressLookupQuerySchema: z.ZodObject<{
98
98
  depositor: z.ZodOptional<z.ZodString>;
99
99
  destinationAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>>;
100
100
  chainId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
101
- kind: z.ZodOptional<z.ZodEnum<{
101
+ type: z.ZodOptional<z.ZodEnum<{
102
102
  gateway: "gateway";
103
103
  solana: "solana";
104
104
  "gateway-erc20": "gateway-erc20";
@@ -110,7 +110,7 @@ export declare const DepositAddressLookupResponseSchema: z.ZodObject<{
110
110
  depositAddress: z.ZodString;
111
111
  chainId: z.ZodNumber;
112
112
  depositor: z.ZodString;
113
- kind: z.ZodEnum<{
113
+ type: z.ZodEnum<{
114
114
  gateway: "gateway";
115
115
  solana: "solana";
116
116
  "gateway-erc20": "gateway-erc20";
@@ -1,28 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DepositAddressLookupResponseSchema = exports.DepositAddressLookupQuerySchema = exports.DEPOSIT_ADDRESS_LOOKUP_QUERY_SHAPE = exports.DepositAddressCreateResponseSchema = exports.DepositAddressChainStatusSchema = exports.DepositAddressChainRegistrationSchema = exports.DepositAddressSchema = exports.DepositAddressCreateRequestSchema = exports.DepositAddressKind = exports.DEPOSIT_ADDRESS_KINDS = void 0;
3
+ exports.DepositAddressLookupResponseSchema = exports.DepositAddressLookupQuerySchema = exports.DEPOSIT_ADDRESS_LOOKUP_QUERY_SHAPE = exports.DepositAddressCreateResponseSchema = exports.DepositAddressChainStatusSchema = exports.DepositAddressChainRegistrationSchema = exports.DepositAddressSchema = exports.DepositAddressCreateRequestSchema = exports.DepositAddressType = exports.DEPOSIT_ADDRESS_TYPES = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const primitives_1 = require("../primitives");
6
6
  const status_1 = require("./status");
7
- exports.DEPOSIT_ADDRESS_KINDS = ['solana', 'gateway', 'gateway-erc20'];
8
- exports.DepositAddressKind = zod_1.z.enum(exports.DEPOSIT_ADDRESS_KINDS);
9
- exports.DepositAddressCreateRequestSchema = zod_1.z.discriminatedUnion('kind', [
7
+ exports.DEPOSIT_ADDRESS_TYPES = ['solana', 'gateway', 'gateway-erc20'];
8
+ exports.DepositAddressType = zod_1.z.enum(exports.DEPOSIT_ADDRESS_TYPES);
9
+ exports.DepositAddressCreateRequestSchema = zod_1.z.discriminatedUnion('type', [
10
10
  zod_1.z.strictObject({
11
11
  chainId: primitives_1.ChainId,
12
12
  depositor: primitives_1.EvmAddress,
13
- kind: zod_1.z.literal('solana'),
13
+ type: zod_1.z.literal('solana'),
14
14
  destinationAddress: primitives_1.SvmAddress,
15
15
  }),
16
16
  zod_1.z.strictObject({
17
17
  chainId: primitives_1.ChainId,
18
18
  depositor: primitives_1.EvmAddress,
19
- kind: zod_1.z.literal('gateway'),
19
+ type: zod_1.z.literal('gateway'),
20
20
  destinationAddress: primitives_1.EvmAddress,
21
21
  }),
22
22
  zod_1.z.strictObject({
23
23
  chainId: primitives_1.ChainId,
24
24
  depositor: primitives_1.EvmAddress,
25
- kind: zod_1.z.literal('gateway-erc20'),
25
+ type: zod_1.z.literal('gateway-erc20'),
26
26
  destinationAddress: primitives_1.EvmAddress,
27
27
  destinationChainId: primitives_1.ChainId,
28
28
  }),
@@ -32,7 +32,7 @@ exports.DepositAddressSchema = zod_1.z.looseObject({
32
32
  depositAddress: primitives_1.EvmAddress,
33
33
  chainId: primitives_1.ChainId,
34
34
  depositor: primitives_1.EvmAddress,
35
- kind: exports.DepositAddressKind,
35
+ type: exports.DepositAddressType,
36
36
  destinationAddress: primitives_1.AnyAddress,
37
37
  destinationChainId: primitives_1.ChainId.optional(),
38
38
  expiresAt: primitives_1.UnixSeconds.nullable(),
@@ -81,7 +81,7 @@ exports.DEPOSIT_ADDRESS_LOOKUP_QUERY_SHAPE = {
81
81
  depositor: primitives_1.EvmAddress.optional(),
82
82
  destinationAddress: primitives_1.AnyAddress.optional(),
83
83
  chainId: primitives_1.ChainIdParam.optional(),
84
- kind: exports.DepositAddressKind.optional(),
84
+ type: exports.DepositAddressType.optional(),
85
85
  ...status_1.PagingFields,
86
86
  };
87
87
  exports.DepositAddressLookupQuerySchema = zod_1.z