@argent/x-shared 1.38.1 → 1.39.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.
@@ -0,0 +1,137 @@
1
+ import { z as e } from "zod";
2
+ import { callSchema as a } from "../utils/starknet/starknet.js";
3
+ import { addressSchemaArgentBackend as t, addressSchema as r } from "../chains/starknet/address.js";
4
+ const n = e.object({
5
+ id: e.string(),
6
+ dappId: e.string(),
7
+ productId: e.string(),
8
+ productName: e.string(),
9
+ chain: e.string(),
10
+ name: e.string(),
11
+ description: e.string(),
12
+ iconUrl: e.string().url(),
13
+ learnMoreUrl: e.string().url().optional(),
14
+ riskFactor: e.enum(["low"]),
15
+ metrics: e.object({
16
+ baseApy: e.string(),
17
+ totalApy: e.string(),
18
+ tvl: e.string().optional()
19
+ }),
20
+ incentives: e.array(e.object({
21
+ name: e.string(),
22
+ description: e.string(),
23
+ iconUrl: e.string().url(),
24
+ learnMoreUrl: e.string().url(),
25
+ metric: e.object({
26
+ apy: e.string()
27
+ })
28
+ })),
29
+ buyEnabled: e.boolean(),
30
+ sellEnabled: e.boolean()
31
+ }), l = n.extend({
32
+ category: e.literal("staking"),
33
+ investableAssets: e.object({
34
+ tokenAddresses: e.array(t),
35
+ tokensRequirement: e.enum(["any"])
36
+ }),
37
+ withdrawableAssets: e.object({
38
+ tokenAddresses: e.array(t),
39
+ tokensRequirement: e.enum(["any"])
40
+ }),
41
+ fees: e.object({
42
+ depositFees: e.object({
43
+ protocolFee: e.string().nullable().optional(),
44
+ totalFee: e.string()
45
+ }),
46
+ withdrawalFees: e.object({
47
+ protocolFee: e.string().nullable().optional(),
48
+ totalFee: e.string()
49
+ })
50
+ })
51
+ }), i = n.extend({
52
+ category: e.literal("lending"),
53
+ investableAssets: e.object({
54
+ tokenAddresses: e.array(t),
55
+ tokensRequirement: e.enum(["any"])
56
+ }),
57
+ withdrawableAssets: e.object({
58
+ tokenAddresses: e.array(t),
59
+ tokensRequirement: e.enum(["any"])
60
+ }),
61
+ fees: e.object({
62
+ depositFees: e.object({
63
+ totalFee: e.string()
64
+ }),
65
+ withdrawalFees: e.object({
66
+ totalFee: e.string()
67
+ })
68
+ })
69
+ }), o = e.object({
70
+ name: e.string(),
71
+ iconUrl: e.string().url(),
72
+ address: e.string()
73
+ }), s = n.extend({
74
+ category: e.literal("strkDelegatedStaking"),
75
+ stakerInfo: o,
76
+ investableAssets: e.object({
77
+ tokenAddresses: e.array(t),
78
+ tokensRequirement: e.enum(["any"]),
79
+ useDecomposedBalances: e.boolean().optional()
80
+ }),
81
+ withdrawableAssets: e.object({
82
+ tokenAddresses: e.array(t),
83
+ tokensRequirement: e.enum(["any"]),
84
+ useDecomposedBalances: e.boolean().optional(),
85
+ amountsRequirement: e.enum(["fullBalance"]).optional(),
86
+ timelockDuration: e.number().optional()
87
+ }),
88
+ fees: e.object({
89
+ depositFees: e.object({
90
+ argentFee: e.string().nullable().optional(),
91
+ protocolFee: e.string().nullable().optional(),
92
+ providerFee: e.string().nullable().optional(),
93
+ totalFee: e.string()
94
+ }),
95
+ withdrawalFees: e.object({
96
+ argentFee: e.string().nullable().optional(),
97
+ protocolFee: e.string().nullable().optional(),
98
+ providerFee: e.string().nullable().optional(),
99
+ totalFee: e.string()
100
+ }),
101
+ performanceFees: e.object({
102
+ argentFee: e.string().nullable().optional(),
103
+ protocolFee: e.string().nullable().optional(),
104
+ providerFee: e.string().nullable().optional(),
105
+ totalFee: e.string()
106
+ }).optional()
107
+ }),
108
+ claimEnabled: e.boolean().optional()
109
+ }), c = e.discriminatedUnion("category", [
110
+ l,
111
+ i,
112
+ s
113
+ ]), g = e.object({
114
+ investments: e.array(c)
115
+ }), u = e.object({
116
+ calls: e.array(a)
117
+ }), p = e.object({
118
+ investment: s,
119
+ accountAddress: t,
120
+ tokenAddress: t,
121
+ amount: e.string(),
122
+ useFullBalance: e.boolean()
123
+ }), F = e.object({
124
+ stakerInfo: o,
125
+ tokenAddress: r,
126
+ amount: e.string()
127
+ });
128
+ export {
129
+ u as buildBuyCalldataResponseSchema,
130
+ p as buildBuyCalldataSchema,
131
+ F as investmentMetaSchema,
132
+ c as investmentSchema,
133
+ g as investmentsResponseSchema,
134
+ i as lendingInvestmentSchema,
135
+ l as stakingInvestmentSchema,
136
+ s as strkDelegatedStakingInvestmentSchema
137
+ };
@@ -192,23 +192,23 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
192
192
  debt: import('zod').ZodBoolean;
193
193
  lending: import('zod').ZodBoolean;
194
194
  }, "strip", import('zod').ZodTypeAny, {
195
+ lending: boolean;
195
196
  collateral: boolean;
196
197
  debt: boolean;
197
- lending: boolean;
198
198
  apy?: string | undefined;
199
199
  group?: number | undefined;
200
200
  }, {
201
+ lending: boolean;
201
202
  collateral: boolean;
202
203
  debt: boolean;
203
- lending: boolean;
204
204
  apy?: string | undefined;
205
205
  group?: number | undefined;
206
206
  }>;
207
207
  }>, "strip", import('zod').ZodTypeAny, {
208
208
  data: {
209
+ lending: boolean;
209
210
  collateral: boolean;
210
211
  debt: boolean;
211
- lending: boolean;
212
212
  apy?: string | undefined;
213
213
  group?: number | undefined;
214
214
  };
@@ -216,9 +216,9 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
216
216
  tokenAddress?: `0x${string}` | undefined;
217
217
  }, {
218
218
  data: {
219
+ lending: boolean;
219
220
  collateral: boolean;
220
221
  debt: boolean;
221
- lending: boolean;
222
222
  apy?: string | undefined;
223
223
  group?: number | undefined;
224
224
  };