@argent/x-shared 1.58.0 → 1.60.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.
@@ -1,12 +1,12 @@
1
1
  import { z as t } from "zod";
2
- import { estimatedFeesSchema as b } from "../fees/schema.js";
3
- import { severitySchema as u, reasonsSchema as S } from "../warning/schema.js";
4
- import { addressSchemaArgentBackend as o, addressSchema as h } from "../../../chains/starknet/address.js";
5
- const j = t.object({
2
+ import { estimatedFeesSchema as h, estimatedFeesV2Schema as S } from "../fees/schema.js";
3
+ import { severitySchema as y, reasonsSchema as f } from "../warning/schema.js";
4
+ import { addressSchemaArgentBackend as n, addressSchema as j } from "../../../chains/starknet/address.js";
5
+ const k = t.object({
6
6
  name: t.string(),
7
7
  url: t.string(),
8
8
  position: t.number()
9
- }), e = t.object({
9
+ }), o = t.object({
10
10
  address: t.string(),
11
11
  name: t.string(),
12
12
  symbol: t.string().optional(),
@@ -14,11 +14,11 @@ const j = t.object({
14
14
  unknown: t.boolean(),
15
15
  iconUrl: t.string().optional(),
16
16
  type: t.string()
17
- }), r = t.discriminatedUnion("type", [
17
+ }), s = t.discriminatedUnion("type", [
18
18
  t.object({
19
19
  type: t.literal("amount"),
20
20
  label: t.string(),
21
- token: e,
21
+ token: o,
22
22
  amount: t.string(),
23
23
  usd: t.string(),
24
24
  editable: t.boolean()
@@ -39,7 +39,7 @@ const j = t.object({
39
39
  t.object({
40
40
  type: t.literal("token_address"),
41
41
  label: t.string(),
42
- token: e
42
+ token: o
43
43
  }),
44
44
  t.object({
45
45
  type: t.literal("calldata"),
@@ -60,42 +60,42 @@ const j = t.object({
60
60
  t.object({
61
61
  type: t.literal("nft"),
62
62
  label: t.string(),
63
- token: e
63
+ token: o
64
64
  })
65
- ]), y = t.object({
65
+ ]), v = t.object({
66
66
  name: t.string(),
67
- properties: t.array(r),
68
- defaultProperties: t.array(r).optional()
69
- }), f = t.union([
67
+ properties: t.array(s),
68
+ defaultProperties: t.array(s).optional()
69
+ }), w = t.union([
70
70
  t.literal("verified"),
71
71
  t.literal("neutral"),
72
72
  t.literal("partial"),
73
73
  t.literal("warn")
74
- ]), k = t.object({
74
+ ]), E = t.object({
75
75
  unknown_token: t.unknown().optional(),
76
76
  date_of_addition: t.string().optional(),
77
- contract_address: h.optional(),
77
+ contract_address: j.optional(),
78
78
  reason: t.string().optional(),
79
79
  value: t.string().or(t.number()).optional()
80
80
  }), l = t.object({
81
- reason: S,
82
- details: k.optional(),
83
- severity: u
84
- }), v = t.object({
85
- assessment: f,
81
+ reason: f,
82
+ details: E.optional(),
83
+ severity: y
84
+ }), F = t.object({
85
+ assessment: w,
86
86
  warnings: t.array(l).optional(),
87
87
  assessmentReasons: t.array(t.string()).optional(),
88
88
  assessmentDetails: t.object({
89
89
  contract_address: t.string()
90
90
  }).optional(),
91
- action: y
92
- }), w = t.object({
91
+ action: v
92
+ }), U = t.object({
93
93
  name: t.string(),
94
94
  description: t.string(),
95
95
  logoUrl: t.string(),
96
96
  iconUrl: t.string(),
97
97
  argentVerified: t.boolean(),
98
- links: t.array(j)
98
+ links: t.array(k)
99
99
  }), c = t.object({
100
100
  assessment: t.union([
101
101
  t.literal("verified"),
@@ -107,19 +107,19 @@ const j = t.object({
107
107
  assessmentDetails: t.object({
108
108
  contract_address: t.string()
109
109
  }).optional(),
110
- targetedDapp: w.optional(),
111
- reviews: t.array(v)
112
- }).optional(), p = t.object({
110
+ targetedDapp: U.optional(),
111
+ reviews: t.array(F)
112
+ }).optional(), m = t.object({
113
113
  banner: t.string().nullable().optional(),
114
114
  preview: t.string().nullable().optional(),
115
115
  full: t.string().nullable().optional(),
116
116
  original: t.string().nullable().optional()
117
- }), U = t.object({
117
+ }), x = t.object({
118
118
  twitter: t.string().optional(),
119
119
  external: t.string().optional(),
120
120
  discord: t.string().optional()
121
121
  }), i = t.object({
122
- address: o,
122
+ address: n,
123
123
  decimals: t.number().optional(),
124
124
  symbol: t.string().optional(),
125
125
  name: t.string(),
@@ -128,38 +128,47 @@ const j = t.object({
128
128
  usdValue: t.string().optional(),
129
129
  iconUrl: t.string().optional(),
130
130
  unknown: t.boolean().optional(),
131
- imageUrls: p.optional(),
132
- links: U.optional()
133
- }), E = t.object({
134
- tokenAddress: o,
135
- owner: o,
136
- spender: o,
131
+ imageUrls: m.optional(),
132
+ links: x.optional()
133
+ }), A = t.object({
134
+ tokenAddress: n,
135
+ owner: n,
136
+ spender: n,
137
137
  value: t.string().optional(),
138
138
  approvalForAll: t.boolean(),
139
139
  details: i.optional()
140
- }), A = t.object({
141
- tokenAddress: o,
142
- from: o,
143
- to: o,
140
+ }), D = t.object({
141
+ tokenAddress: n,
142
+ from: n,
143
+ to: n,
144
144
  tokenId: t.string().optional(),
145
145
  value: t.string().optional(),
146
146
  details: i.optional()
147
- }), a = t.union([t.string(), t.number(), t.bigint()]).transform((n) => parseInt(n.toString(), 10)), s = {
148
- overallFee: a,
149
- gasPrice: a,
150
- gasUsage: a,
151
- dataGasPrice: a.optional(),
152
- dataGasConsumed: a.optional()
153
- }, D = t.object({
154
- ...s,
155
- unit: t.string().transform((n) => n.toUpperCase()).pipe(t.literal("WEI")),
156
- maxFee: a
157
- }).or(t.object({
158
- ...s,
159
- unit: t.string().transform((n) => n.toUpperCase()).pipe(t.literal("FRI")),
160
- maxAmount: a,
161
- maxPricePerUnit: a
162
- })), _ = t.object({
147
+ }), e = t.union([t.string(), t.number(), t.bigint()]).transform((a) => parseInt(a.toString(), 10)), p = {
148
+ overallFee: e,
149
+ gasPrice: e,
150
+ gasUsage: e,
151
+ dataGasPrice: e.optional(),
152
+ dataGasConsumed: e.optional()
153
+ }, P = t.object({
154
+ ...p,
155
+ unit: t.string().transform((a) => a.toUpperCase()).pipe(t.literal("WEI")),
156
+ maxFee: e
157
+ }), g = t.object({
158
+ address: n,
159
+ unknown: t.boolean(),
160
+ type: t.literal("ERC20")
161
+ }), T = t.object({
162
+ ...p,
163
+ unit: t.string().transform((a) => a.toUpperCase()).pipe(t.literal("FRI")),
164
+ maxAmount: e,
165
+ maxPricePerUnit: e,
166
+ token: g
167
+ }), _ = t.object({
168
+ token: g,
169
+ overallFee: e,
170
+ maxFee: e
171
+ }), d = P.or(T), V = d.or(_), I = t.object({
163
172
  type: t.string(),
164
173
  label: t.string(),
165
174
  tokenId: t.string().optional(),
@@ -170,51 +179,62 @@ const j = t.object({
170
179
  tokenIdDetails: t.object({
171
180
  name: t.string().optional(),
172
181
  description: t.string().optional(),
173
- imageUrls: p.optional()
182
+ imageUrls: m.optional()
174
183
  }).optional()
175
- }), x = t.object({
176
- approvals: t.array(E).optional(),
177
- transfers: t.array(A).optional(),
184
+ }), N = t.object({
185
+ approvals: t.array(A).optional(),
186
+ transfers: t.array(D).optional(),
178
187
  calculatedNonce: t.string().optional(),
179
- feeEstimation: D,
180
- summary: t.array(_).optional()
181
- }), F = t.object({
188
+ feeEstimation: d,
189
+ feeEstimations: t.array(V),
190
+ summary: t.array(I).optional()
191
+ }), R = t.object({
182
192
  label: t.string().optional(),
183
193
  code: t.number().optional(),
184
194
  message: t.string().optional(),
185
195
  error: t.string().optional()
186
- }), m = t.object({
196
+ }), b = t.object({
187
197
  reviewOfTransaction: c,
188
- simulation: x,
198
+ simulation: N,
189
199
  simulationError: t.undefined()
190
- }), g = t.object({
200
+ }), u = t.object({
191
201
  reviewOfTransaction: c,
192
202
  simulation: t.undefined(),
193
- simulationError: F
194
- }), d = m.or(g), C = t.object({
195
- transactions: t.array(d).optional()
196
- }), O = t.object({
197
- transactions: t.array(d).optional(),
198
- enrichedFeeEstimation: b.optional(),
203
+ simulationError: R
204
+ }), r = b.or(u), z = t.object({
205
+ transactions: t.array(r).optional()
206
+ }), H = t.object({
207
+ transactions: t.array(r).optional(),
208
+ enrichedFeeEstimation: h.optional(),
209
+ isBackendDown: t.boolean().default(!1).optional()
210
+ }), W = t.object({
211
+ transactions: t.array(r).optional(),
212
+ enrichedFeeEstimation: t.array(S).optional(),
199
213
  isBackendDown: t.boolean().default(!1).optional()
200
214
  });
201
- function R(n) {
202
- return m.safeParse(n).success;
215
+ function q(a) {
216
+ return b.safeParse(a).success;
203
217
  }
204
- function V(n) {
205
- return g.safeParse(n).success;
218
+ function J(a) {
219
+ return u.safeParse(a).success;
206
220
  }
207
221
  export {
208
- y as actionSchema,
209
- f as assessmentSchema,
210
- O as enrichedSimulateAndReviewSchema,
211
- D as feeEstimationSchema,
212
- R as isNotTransactionSimulationError,
213
- V as isTransactionSimulationError,
214
- r as propertySchema,
215
- v as reviewSchema,
216
- C as simulateAndReviewSchema,
217
- w as targetedDappSchema,
218
- k as warningDetailsSchema,
222
+ v as actionSchema,
223
+ w as assessmentSchema,
224
+ H as enrichedSimulateAndReviewSchema,
225
+ W as enrichedSimulateAndReviewV2Schema,
226
+ V as feeEstimationNativeOrPaymasterSchema,
227
+ d as feeEstimationSchema,
228
+ P as feeEstimationTxV1Schema,
229
+ T as feeEstimationTxV3Schema,
230
+ q as isNotTransactionSimulationError,
231
+ J as isTransactionSimulationError,
232
+ _ as paymasterFeeEstimationSchema,
233
+ g as paymasterFeeTokenSchema,
234
+ s as propertySchema,
235
+ F as reviewSchema,
236
+ z as simulateAndReviewSchema,
237
+ U as targetedDappSchema,
238
+ E as warningDetailsSchema,
219
239
  l as warningSchema
220
240
  };
@@ -147,8 +147,8 @@ export declare const liquidStakingInvestmentSchema: z.ZodObject<z.objectUtil.ext
147
147
  }>, "strip", z.ZodTypeAny, {
148
148
  name: string;
149
149
  chain: string;
150
- dappId: string;
151
150
  description: string;
151
+ dappId: string;
152
152
  metrics: {
153
153
  baseApy: string;
154
154
  totalApy: string;
@@ -199,8 +199,8 @@ export declare const liquidStakingInvestmentSchema: z.ZodObject<z.objectUtil.ext
199
199
  }, {
200
200
  name: string;
201
201
  chain: string;
202
- dappId: string;
203
202
  description: string;
203
+ dappId: string;
204
204
  metrics: {
205
205
  baseApy: string;
206
206
  totalApy: string;
@@ -359,8 +359,8 @@ export declare const lendingInvestmentSchema: z.ZodObject<z.objectUtil.extendSha
359
359
  }>, "strip", z.ZodTypeAny, {
360
360
  name: string;
361
361
  chain: string;
362
- dappId: string;
363
362
  description: string;
363
+ dappId: string;
364
364
  metrics: {
365
365
  baseApy: string;
366
366
  totalApy: string;
@@ -403,8 +403,8 @@ export declare const lendingInvestmentSchema: z.ZodObject<z.objectUtil.extendSha
403
403
  }, {
404
404
  name: string;
405
405
  chain: string;
406
- dappId: string;
407
406
  description: string;
407
+ dappId: string;
408
408
  metrics: {
409
409
  baseApy: string;
410
410
  totalApy: string;
@@ -655,8 +655,8 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
655
655
  }>, "strip", z.ZodTypeAny, {
656
656
  name: string;
657
657
  chain: string;
658
- dappId: string;
659
658
  description: string;
659
+ dappId: string;
660
660
  metrics: {
661
661
  baseApy: string;
662
662
  totalApy: string;
@@ -721,8 +721,8 @@ export declare const strkDelegatedStakingInvestmentSchema: z.ZodObject<z.objectU
721
721
  }, {
722
722
  name: string;
723
723
  chain: string;
724
- dappId: string;
725
724
  description: string;
725
+ dappId: string;
726
726
  metrics: {
727
727
  baseApy: string;
728
728
  totalApy: string;
@@ -933,8 +933,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
933
933
  }>, "strip", z.ZodTypeAny, {
934
934
  name: string;
935
935
  chain: string;
936
- dappId: string;
937
936
  description: string;
937
+ dappId: string;
938
938
  metrics: {
939
939
  baseApy: string;
940
940
  totalApy: string;
@@ -985,8 +985,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
985
985
  }, {
986
986
  name: string;
987
987
  chain: string;
988
- dappId: string;
989
988
  description: string;
989
+ dappId: string;
990
990
  metrics: {
991
991
  baseApy: string;
992
992
  totalApy: string;
@@ -1144,8 +1144,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1144
1144
  }>, "strip", z.ZodTypeAny, {
1145
1145
  name: string;
1146
1146
  chain: string;
1147
- dappId: string;
1148
1147
  description: string;
1148
+ dappId: string;
1149
1149
  metrics: {
1150
1150
  baseApy: string;
1151
1151
  totalApy: string;
@@ -1188,8 +1188,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1188
1188
  }, {
1189
1189
  name: string;
1190
1190
  chain: string;
1191
- dappId: string;
1192
1191
  description: string;
1192
+ dappId: string;
1193
1193
  metrics: {
1194
1194
  baseApy: string;
1195
1195
  totalApy: string;
@@ -1425,8 +1425,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1425
1425
  }>, "strip", z.ZodTypeAny, {
1426
1426
  name: string;
1427
1427
  chain: string;
1428
- dappId: string;
1429
1428
  description: string;
1429
+ dappId: string;
1430
1430
  metrics: {
1431
1431
  baseApy: string;
1432
1432
  totalApy: string;
@@ -1491,8 +1491,8 @@ export declare const investmentSchema: z.ZodDiscriminatedUnion<"category", [z.Zo
1491
1491
  }, {
1492
1492
  name: string;
1493
1493
  chain: string;
1494
- dappId: string;
1495
1494
  description: string;
1495
+ dappId: string;
1496
1496
  metrics: {
1497
1497
  baseApy: string;
1498
1498
  totalApy: string;
@@ -1708,8 +1708,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
1708
1708
  }>, "strip", z.ZodTypeAny, {
1709
1709
  name: string;
1710
1710
  chain: string;
1711
- dappId: string;
1712
1711
  description: string;
1712
+ dappId: string;
1713
1713
  metrics: {
1714
1714
  baseApy: string;
1715
1715
  totalApy: string;
@@ -1760,8 +1760,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
1760
1760
  }, {
1761
1761
  name: string;
1762
1762
  chain: string;
1763
- dappId: string;
1764
1763
  description: string;
1764
+ dappId: string;
1765
1765
  metrics: {
1766
1766
  baseApy: string;
1767
1767
  totalApy: string;
@@ -1919,8 +1919,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
1919
1919
  }>, "strip", z.ZodTypeAny, {
1920
1920
  name: string;
1921
1921
  chain: string;
1922
- dappId: string;
1923
1922
  description: string;
1923
+ dappId: string;
1924
1924
  metrics: {
1925
1925
  baseApy: string;
1926
1926
  totalApy: string;
@@ -1963,8 +1963,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
1963
1963
  }, {
1964
1964
  name: string;
1965
1965
  chain: string;
1966
- dappId: string;
1967
1966
  description: string;
1967
+ dappId: string;
1968
1968
  metrics: {
1969
1969
  baseApy: string;
1970
1970
  totalApy: string;
@@ -2200,8 +2200,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2200
2200
  }>, "strip", z.ZodTypeAny, {
2201
2201
  name: string;
2202
2202
  chain: string;
2203
- dappId: string;
2204
2203
  description: string;
2204
+ dappId: string;
2205
2205
  metrics: {
2206
2206
  baseApy: string;
2207
2207
  totalApy: string;
@@ -2266,8 +2266,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2266
2266
  }, {
2267
2267
  name: string;
2268
2268
  chain: string;
2269
- dappId: string;
2270
2269
  description: string;
2270
+ dappId: string;
2271
2271
  metrics: {
2272
2272
  baseApy: string;
2273
2273
  totalApy: string;
@@ -2334,8 +2334,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2334
2334
  investments: ({
2335
2335
  name: string;
2336
2336
  chain: string;
2337
- dappId: string;
2338
2337
  description: string;
2338
+ dappId: string;
2339
2339
  metrics: {
2340
2340
  baseApy: string;
2341
2341
  totalApy: string;
@@ -2386,8 +2386,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2386
2386
  } | {
2387
2387
  name: string;
2388
2388
  chain: string;
2389
- dappId: string;
2390
2389
  description: string;
2390
+ dappId: string;
2391
2391
  metrics: {
2392
2392
  baseApy: string;
2393
2393
  totalApy: string;
@@ -2430,8 +2430,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2430
2430
  } | {
2431
2431
  name: string;
2432
2432
  chain: string;
2433
- dappId: string;
2434
2433
  description: string;
2434
+ dappId: string;
2435
2435
  metrics: {
2436
2436
  baseApy: string;
2437
2437
  totalApy: string;
@@ -2498,8 +2498,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2498
2498
  investments: ({
2499
2499
  name: string;
2500
2500
  chain: string;
2501
- dappId: string;
2502
2501
  description: string;
2502
+ dappId: string;
2503
2503
  metrics: {
2504
2504
  baseApy: string;
2505
2505
  totalApy: string;
@@ -2550,8 +2550,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2550
2550
  } | {
2551
2551
  name: string;
2552
2552
  chain: string;
2553
- dappId: string;
2554
2553
  description: string;
2554
+ dappId: string;
2555
2555
  metrics: {
2556
2556
  baseApy: string;
2557
2557
  totalApy: string;
@@ -2594,8 +2594,8 @@ export declare const investmentsResponseSchema: z.ZodObject<{
2594
2594
  } | {
2595
2595
  name: string;
2596
2596
  chain: string;
2597
- dappId: string;
2598
2597
  description: string;
2598
+ dappId: string;
2599
2599
  metrics: {
2600
2600
  baseApy: string;
2601
2601
  totalApy: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../chains/starknet/address.cjs"),m=require("./backend.model.cjs"),p=require("./defiPositionType.model.cjs"),o=require("./webToken.model.cjs"),l=o.webTokenWithBalanceAndPriceSchema.extend({accruedFees:e.z.string(),currentPrice:e.z.string(),maxPrice:e.z.string(),minPrice:e.z.string(),principal:e.z.string()}),a=e.z.object({address:t.addressSchema.optional(),currencyValue:e.z.string().default("0")}),i=a.extend({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),tokenId:e.z.string().optional(),unitCurrencyValueToken0:e.z.string().optional(),unitCurrencyValueToken1:e.z.string().optional(),token0:l,token1:l}),S=e.z.array(i),k=e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()}),r=a.extend({totalBalances:e.z.record(e.z.string()),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean(),apy:e.z.string().optional(),totalApy:e.z.string().optional(),group:e.z.string().optional(),unitCurrencyValue:e.z.string().optional(),positionToken:m.apiTokenInfoSchema.or(e.z.undefined()),token:o.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:t.addressSchema.optional(),accountAddressGroup:e.z.string().optional()}),P=e.z.array(r),c=a.extend({delegatingTo:t.addressSchema,token:o.webTokenWithBalanceAndPriceSchema.optional(),balance:e.z.string(),unitCurrencyValue:e.z.string().optional().default("0")}),y=e.z.array(c),n=e.z.object({wei:e.z.string(),eth:e.z.string(),currency:e.z.string()}),s=a.extend({id:e.z.string(),total:n,apy:e.z.number(),totalApy:e.z.number(),token:o.webTokenWithBalanceAndPriceSchema}),b=e.z.array(s),d=a.extend({id:e.z.string(),accruedRewards:n,stakedAmount:n,total:n,apy:e.z.number(),totalApy:e.z.number(),stakerInfo:m.apiStrkDelegatedStakingSchema.shape.data.shape.stakerInfo,token:o.webTokenWithBalanceAndPriceSchema}),T=e.z.array(d),z=i.or(r).or(c).or(d).or(s),g=e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()})),u=e.z.object({type:p.defiPositionTypeSchema,manageUrl:e.z.string().url().optional(),name:e.z.string(),positions:e.z.array(z),positionsTotalValue:e.z.string(),brandColor:e.z.string().optional(),groups:g.optional(),accountAddress:t.addressSchema}),h=e.z.array(u),A=e.z.object({dappId:e.z.string(),products:h});exports.collateralizedDebtGroupSchema=k;exports.collateralizedDebtPositionSchema=r;exports.collateralizedDebtPositionsSchema=P;exports.concentratedLiquidityPositionSchema=i;exports.concentratedLiquidityPositionsSchema=S;exports.defiDappsProductsSchema=A;exports.defiPositionSchema=z;exports.defiProductSchema=u;exports.defiProductsSchema=h;exports.delegatedTokensArraySchema=y;exports.delegatedTokensSchema=c;exports.productGroupsSchema=g;exports.stakingPositionSchema=s;exports.stakingPositionsSchema=b;exports.strkDelegatedStakingPositionArraySchema=T;exports.strkDelegatedStakingPositionSchema=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),t=require("../../../chains/starknet/address.cjs"),m=require("./backend.model.cjs"),p=require("./defiPositionType.model.cjs"),o=require("./webToken.model.cjs"),l=o.webTokenWithBalanceAndPriceSchema.extend({accruedFees:e.z.string(),currentPrice:e.z.string(),maxPrice:e.z.string(),minPrice:e.z.string(),principal:e.z.string()}),a=e.z.object({address:t.addressSchema.optional(),currencyValue:e.z.string().default("0")}),i=a.extend({poolFeePercentage:e.z.string(),tickSpacingPercentage:e.z.string().optional(),tokenId:e.z.string().optional(),unitCurrencyValueToken0:e.z.string().optional(),unitCurrencyValueToken1:e.z.string().optional(),token0:l,token1:l}),S=e.z.array(i),k=e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()}),r=a.extend({totalBalances:e.z.record(e.z.string()),collateral:e.z.boolean(),debt:e.z.boolean(),lending:e.z.boolean(),apy:e.z.string().optional(),totalApy:e.z.string().optional(),group:e.z.string().optional(),unitCurrencyValue:e.z.string().optional(),positionToken:m.apiTokenInfoSchema.or(e.z.undefined()),token:o.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:t.addressSchema.optional(),accountAddressGroup:e.z.string().optional()}),P=e.z.array(r),s=a.extend({delegatingTo:t.addressSchema,token:o.webTokenWithBalanceAndPriceSchema.optional(),balance:e.z.string(),unitCurrencyValue:e.z.string().optional().default("0")}),y=e.z.array(s),n=e.z.object({wei:e.z.string(),eth:e.z.string(),currency:e.z.string()}),c=a.extend({id:e.z.string(),total:n,apy:e.z.number(),totalApy:e.z.number(),token:o.webTokenWithBalanceAndPriceSchema,liquidTokenAddress:t.addressSchema}),b=e.z.array(c),d=a.extend({id:e.z.string(),accruedRewards:n,stakedAmount:n,total:n,apy:e.z.number(),totalApy:e.z.number(),stakerInfo:m.apiStrkDelegatedStakingSchema.shape.data.shape.stakerInfo,token:o.webTokenWithBalanceAndPriceSchema}),T=e.z.array(d),u=i.or(r).or(s).or(d).or(c),z=e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:t.addressSchema.optional()})),g=e.z.object({type:p.defiPositionTypeSchema,manageUrl:e.z.string().url().optional(),name:e.z.string(),positions:e.z.array(u),positionsTotalValue:e.z.string(),brandColor:e.z.string().optional(),groups:z.optional(),accountAddress:t.addressSchema}),h=e.z.array(g),A=e.z.object({dappId:e.z.string(),products:h});exports.collateralizedDebtGroupSchema=k;exports.collateralizedDebtPositionSchema=r;exports.collateralizedDebtPositionsSchema=P;exports.concentratedLiquidityPositionSchema=i;exports.concentratedLiquidityPositionsSchema=S;exports.defiDappsProductsSchema=A;exports.defiPositionSchema=u;exports.defiProductSchema=g;exports.defiProductsSchema=h;exports.delegatedTokensArraySchema=y;exports.delegatedTokensSchema=s;exports.productGroupsSchema=z;exports.stakingPositionSchema=c;exports.stakingPositionsSchema=b;exports.strkDelegatedStakingPositionArraySchema=T;exports.strkDelegatedStakingPositionSchema=d;