@argent/x-shared 1.39.1 → 1.41.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/dist/index.cjs +1 -1
- package/dist/index.js +342 -337
- package/dist/src/tokens/service/implementation.cjs +1 -1
- package/dist/src/tokens/service/implementation.d.ts +101 -3
- package/dist/src/tokens/service/implementation.js +19 -19
- package/dist/src/tokens/service/interface.d.ts +1 -1
- package/dist/src/tokens/service/types/backend.model.cjs +1 -1
- package/dist/src/tokens/service/types/backend.model.d.ts +4252 -61
- package/dist/src/tokens/service/types/backend.model.js +59 -41
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPosition.model.d.ts +142 -4
- package/dist/src/tokens/service/types/defiPosition.model.js +35 -30
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z as a } from "zod";
|
|
2
2
|
import { addressSchemaArgentBackend as n, addressSchema as e } from "../../../chains/starknet/address.js";
|
|
3
|
-
import { defiPositionTypeSchema as
|
|
4
|
-
import { createSchemaWithWarnings as
|
|
5
|
-
const
|
|
3
|
+
import { defiPositionTypeSchema as d } from "./defiPositionType.model.js";
|
|
4
|
+
import { createSchemaWithWarnings as m } from "../../../utils/schemas.js";
|
|
5
|
+
const f = a.object({
|
|
6
6
|
status: a.literal("initialising")
|
|
7
7
|
}).or(a.object({
|
|
8
8
|
status: a.literal("initialised"),
|
|
@@ -37,40 +37,41 @@ const D = a.object({
|
|
|
37
37
|
rank: a.number()
|
|
38
38
|
}).optional(),
|
|
39
39
|
tags: a.array(a.string()).optional()
|
|
40
|
-
}),
|
|
40
|
+
}), A = a.object({
|
|
41
41
|
tokens: a.array(i)
|
|
42
|
-
}),
|
|
42
|
+
}), C = i, g = a.object({
|
|
43
43
|
pricingId: a.number(),
|
|
44
44
|
ethValue: a.string(),
|
|
45
45
|
ccyValue: a.string(),
|
|
46
46
|
ethDayChange: a.string(),
|
|
47
47
|
ccyDayChange: a.string()
|
|
48
|
-
}),
|
|
49
|
-
prices: a.array(
|
|
50
|
-
}),
|
|
48
|
+
}), I = a.object({
|
|
49
|
+
prices: a.array(g)
|
|
50
|
+
}), o = a.object({
|
|
51
51
|
tokenAddress: n,
|
|
52
52
|
principal: a.string(),
|
|
53
53
|
accruedFees: a.string(),
|
|
54
54
|
minPrice: a.string(),
|
|
55
55
|
maxPrice: a.string(),
|
|
56
56
|
currentPrice: a.string()
|
|
57
|
-
}),
|
|
57
|
+
}), t = a.object({
|
|
58
|
+
id: a.string(),
|
|
58
59
|
tokenAddress: e.optional(),
|
|
59
60
|
totalBalances: a.record(a.string())
|
|
60
|
-
}), r =
|
|
61
|
+
}), r = t.extend({
|
|
61
62
|
tokenId: a.string(),
|
|
62
63
|
data: a.object({
|
|
63
64
|
poolFeePercentage: a.string(),
|
|
64
65
|
tickSpacingPercentage: a.string().optional(),
|
|
65
|
-
token0:
|
|
66
|
-
token1:
|
|
66
|
+
token0: o,
|
|
67
|
+
token1: o
|
|
67
68
|
})
|
|
68
|
-
}),
|
|
69
|
+
}), T = a.array(r), s = t.extend({
|
|
69
70
|
data: a.object({
|
|
70
71
|
apy: a.string()
|
|
71
72
|
}),
|
|
72
73
|
investmentId: a.string().optional()
|
|
73
|
-
}),
|
|
74
|
+
}), x = a.array(s), c = t.extend({
|
|
74
75
|
data: a.object({
|
|
75
76
|
apy: a.string().optional(),
|
|
76
77
|
group: a.number().optional(),
|
|
@@ -78,57 +79,74 @@ const D = a.object({
|
|
|
78
79
|
debt: a.boolean(),
|
|
79
80
|
lending: a.boolean()
|
|
80
81
|
})
|
|
81
|
-
}),
|
|
82
|
+
}), B = a.array(c), l = a.object({
|
|
82
83
|
data: a.object({
|
|
83
84
|
delegatingTo: e
|
|
84
85
|
}),
|
|
85
86
|
totalBalances: a.record(a.string())
|
|
86
|
-
}),
|
|
87
|
+
}), R = a.array(l), p = t.extend({
|
|
88
|
+
data: a.object({
|
|
89
|
+
stakerInfo: a.object({
|
|
90
|
+
name: a.string().optional(),
|
|
91
|
+
iconUrl: a.string().optional(),
|
|
92
|
+
address: e
|
|
93
|
+
}),
|
|
94
|
+
accruedReward: a.string(),
|
|
95
|
+
pendingWithdrawal: a.object({
|
|
96
|
+
amount: a.string(),
|
|
97
|
+
withdrawableAfter: a.number()
|
|
98
|
+
}).optional(),
|
|
99
|
+
apy: a.string().optional()
|
|
100
|
+
})
|
|
101
|
+
}), w = a.array(p), b = r.or(c).or(l).or(s).or(p), h = a.array(b), u = m({
|
|
87
102
|
name: a.string(),
|
|
88
103
|
manageUrl: a.string(),
|
|
89
|
-
type:
|
|
104
|
+
type: d,
|
|
90
105
|
groups: a.record(a.object({
|
|
91
106
|
name: a.string().optional(),
|
|
92
107
|
healthRatio: a.string().optional()
|
|
93
108
|
})).optional(),
|
|
94
|
-
positions:
|
|
95
|
-
}),
|
|
109
|
+
positions: h
|
|
110
|
+
}), S = a.object({
|
|
96
111
|
dappId: a.string(),
|
|
97
|
-
products: a.array(
|
|
98
|
-
}),
|
|
99
|
-
dapps: a.array(
|
|
100
|
-
}),
|
|
112
|
+
products: a.array(u)
|
|
113
|
+
}), U = a.object({
|
|
114
|
+
dapps: a.array(S)
|
|
115
|
+
}), k = a.object({
|
|
101
116
|
name: a.string().optional(),
|
|
102
117
|
tokenAddress: e,
|
|
103
118
|
amount: a.string().optional(),
|
|
104
119
|
claimUrl: a.string().optional(),
|
|
105
120
|
claimStart: a.number(),
|
|
106
121
|
claimEnd: a.number().optional()
|
|
107
|
-
}),
|
|
122
|
+
}), z = a.object({
|
|
108
123
|
accountAddress: e,
|
|
109
124
|
chain: a.string(),
|
|
110
|
-
airdrops: a.array(
|
|
125
|
+
airdrops: a.array(k)
|
|
111
126
|
});
|
|
112
127
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
128
|
+
f as apiAccountTokenBalancesSchema,
|
|
129
|
+
k as apiAirdropSchema,
|
|
115
130
|
c as apiCollateralizedDebtPositionSchema,
|
|
116
|
-
|
|
131
|
+
B as apiCollateralizedDebtPositionsSchema,
|
|
117
132
|
r as apiConcentratedLiquidityPositionSchema,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
T as apiConcentratedLiquidityPositionsSchema,
|
|
134
|
+
u as apiDefiDecompositionProduct,
|
|
135
|
+
h as apiDefiDecompositionProducts,
|
|
136
|
+
S as apiDefiDecompositionSchema,
|
|
137
|
+
o as apiDefiDecompositionToken,
|
|
138
|
+
b as apiDefiPositionSchema,
|
|
139
|
+
U as apiDefiPositionsSchema,
|
|
140
|
+
R as apiDelegatedTokensArraySchema,
|
|
125
141
|
l as apiDelegatedTokensSchema,
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
I as apiPriceDataResponseSchema,
|
|
143
|
+
g as apiPriceDetailsSchema,
|
|
128
144
|
s as apiStakingPositionSchema,
|
|
129
|
-
|
|
130
|
-
|
|
145
|
+
x as apiStakingPositionsSchema,
|
|
146
|
+
w as apiStrkDelegatedStakingPositionsSchema,
|
|
147
|
+
p as apiStrkDelegatedStakingSchema,
|
|
148
|
+
C as apiTokenInfoResponseSchema,
|
|
131
149
|
i as apiTokenInfoSchema,
|
|
132
|
-
|
|
133
|
-
|
|
150
|
+
A as apiTokensInfoResponseSchema,
|
|
151
|
+
z as apiUnclaimedRewardsSchema
|
|
134
152
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),o=require("../../../chains/starknet/address.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),o=require("../../../chains/starknet/address.cjs"),z=require("./backend.model.cjs"),m=require("./defiPositionType.model.cjs"),n=require("./webToken.model.cjs"),s=n.webTokenWithBalanceAndPriceSchema.extend({accruedFees:e.z.string(),currentPrice:e.z.string(),maxPrice:e.z.string(),minPrice:e.z.string(),principal:e.z.string()}),t=e.z.object({address:o.addressSchema.optional(),currencyValue:e.z.string().default("0")}),a=t.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:s,token1:s}),g=e.z.array(a),h=e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:o.addressSchema.optional()}),i=t.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(),group:e.z.string().optional(),unitCurrencyValue:e.z.string().optional(),positionToken:z.apiTokenInfoSchema.or(e.z.undefined()),token:n.webTokenWithBalanceAndPriceSchema.optional(),accountAddress:o.addressSchema.optional(),accountAddressGroup:e.z.string().optional()}),S=e.z.array(i),r=t.extend({delegatingTo:o.addressSchema,token:n.webTokenWithBalanceAndPriceSchema.optional(),balance:e.z.string(),unitCurrencyValue:e.z.string().optional().default("0")}),P=e.z.array(r),c=t.extend({apy:e.z.string().optional(),unitCurrencyValue:e.z.string().optional()}),y=e.z.array(c),d=a.or(i).or(r).or(c),l=e.z.record(e.z.object({name:e.z.string().optional(),healthRatio:e.z.string().optional(),accountAddress:o.addressSchema.optional()})),u=e.z.object({type:m.defiPositionTypeSchema,manageUrl:e.z.string().url().optional(),name:e.z.string(),positions:e.z.array(d),positionsTotalValue:e.z.string(),brandColor:e.z.string().optional(),groups:l.optional(),accountAddress:o.addressSchema}),p=e.z.array(u),b=e.z.object({dappId:e.z.string(),products:p});exports.collateralizedDebtGroupSchema=h;exports.collateralizedDebtPositionSchema=i;exports.collateralizedDebtPositionsSchema=S;exports.concentratedLiquidityPositionSchema=a;exports.concentratedLiquidityPositionsSchema=g;exports.defiDappsProductsSchema=b;exports.defiPositionSchema=d;exports.defiProductSchema=u;exports.defiProductsSchema=p;exports.delegatedTokensArraySchema=P;exports.delegatedTokensSchema=r;exports.productGroupsSchema=l;exports.stakingPositionSchema=c;exports.stakingPositionsSchema=y;
|
|
@@ -1481,7 +1481,41 @@ export declare const delegatedTokensArraySchema: z.ZodArray<z.ZodObject<z.object
|
|
|
1481
1481
|
currencySymbol?: string | undefined;
|
|
1482
1482
|
} | undefined;
|
|
1483
1483
|
}>, "many">;
|
|
1484
|
-
export declare const
|
|
1484
|
+
export declare const stakingPositionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
1485
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
1486
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
1487
|
+
}, {
|
|
1488
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
1489
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
1490
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1491
|
+
currencyValue: string;
|
|
1492
|
+
address?: `0x${string}` | undefined;
|
|
1493
|
+
apy?: string | undefined;
|
|
1494
|
+
unitCurrencyValue?: string | undefined;
|
|
1495
|
+
}, {
|
|
1496
|
+
address?: string | undefined;
|
|
1497
|
+
apy?: string | undefined;
|
|
1498
|
+
unitCurrencyValue?: string | undefined;
|
|
1499
|
+
currencyValue?: string | undefined;
|
|
1500
|
+
}>;
|
|
1501
|
+
export declare const stakingPositionsSchema: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
1502
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
1503
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
1504
|
+
}, {
|
|
1505
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1508
|
+
currencyValue: string;
|
|
1509
|
+
address?: `0x${string}` | undefined;
|
|
1510
|
+
apy?: string | undefined;
|
|
1511
|
+
unitCurrencyValue?: string | undefined;
|
|
1512
|
+
}, {
|
|
1513
|
+
address?: string | undefined;
|
|
1514
|
+
apy?: string | undefined;
|
|
1515
|
+
unitCurrencyValue?: string | undefined;
|
|
1516
|
+
currencyValue?: string | undefined;
|
|
1517
|
+
}>, "many">;
|
|
1518
|
+
export declare const defiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
1485
1519
|
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
1486
1520
|
currencyValue: z.ZodDefault<z.ZodString>;
|
|
1487
1521
|
}, {
|
|
@@ -2170,6 +2204,22 @@ export declare const defiPositionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.o
|
|
|
2170
2204
|
ccyDayChange?: string | undefined;
|
|
2171
2205
|
currencySymbol?: string | undefined;
|
|
2172
2206
|
} | undefined;
|
|
2207
|
+
}>]>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2208
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
2209
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
2210
|
+
}, {
|
|
2211
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
2212
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
2213
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2214
|
+
currencyValue: string;
|
|
2215
|
+
address?: `0x${string}` | undefined;
|
|
2216
|
+
apy?: string | undefined;
|
|
2217
|
+
unitCurrencyValue?: string | undefined;
|
|
2218
|
+
}, {
|
|
2219
|
+
address?: string | undefined;
|
|
2220
|
+
apy?: string | undefined;
|
|
2221
|
+
unitCurrencyValue?: string | undefined;
|
|
2222
|
+
currencyValue?: string | undefined;
|
|
2173
2223
|
}>]>;
|
|
2174
2224
|
export declare const productGroupsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2175
2225
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -2188,7 +2238,7 @@ export declare const defiProductSchema: z.ZodObject<{
|
|
|
2188
2238
|
type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"staking">]>;
|
|
2189
2239
|
manageUrl: z.ZodOptional<z.ZodString>;
|
|
2190
2240
|
name: z.ZodString;
|
|
2191
|
-
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
2241
|
+
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
2192
2242
|
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
2193
2243
|
currencyValue: z.ZodDefault<z.ZodString>;
|
|
2194
2244
|
}, {
|
|
@@ -2877,6 +2927,22 @@ export declare const defiProductSchema: z.ZodObject<{
|
|
|
2877
2927
|
ccyDayChange?: string | undefined;
|
|
2878
2928
|
currencySymbol?: string | undefined;
|
|
2879
2929
|
} | undefined;
|
|
2930
|
+
}>]>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2931
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
2932
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
2933
|
+
}, {
|
|
2934
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
2935
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
2936
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2937
|
+
currencyValue: string;
|
|
2938
|
+
address?: `0x${string}` | undefined;
|
|
2939
|
+
apy?: string | undefined;
|
|
2940
|
+
unitCurrencyValue?: string | undefined;
|
|
2941
|
+
}, {
|
|
2942
|
+
address?: string | undefined;
|
|
2943
|
+
apy?: string | undefined;
|
|
2944
|
+
unitCurrencyValue?: string | undefined;
|
|
2945
|
+
currencyValue?: string | undefined;
|
|
2880
2946
|
}>]>, "many">;
|
|
2881
2947
|
positionsTotalValue: z.ZodString;
|
|
2882
2948
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
@@ -3034,6 +3100,11 @@ export declare const defiProductSchema: z.ZodObject<{
|
|
|
3034
3100
|
ccyDayChange?: string | undefined;
|
|
3035
3101
|
currencySymbol?: string | undefined;
|
|
3036
3102
|
} | undefined;
|
|
3103
|
+
} | {
|
|
3104
|
+
currencyValue: string;
|
|
3105
|
+
address?: `0x${string}` | undefined;
|
|
3106
|
+
apy?: string | undefined;
|
|
3107
|
+
unitCurrencyValue?: string | undefined;
|
|
3037
3108
|
})[];
|
|
3038
3109
|
positionsTotalValue: string;
|
|
3039
3110
|
brandColor?: string | undefined;
|
|
@@ -3183,6 +3254,11 @@ export declare const defiProductSchema: z.ZodObject<{
|
|
|
3183
3254
|
ccyDayChange?: string | undefined;
|
|
3184
3255
|
currencySymbol?: string | undefined;
|
|
3185
3256
|
} | undefined;
|
|
3257
|
+
} | {
|
|
3258
|
+
address?: string | undefined;
|
|
3259
|
+
apy?: string | undefined;
|
|
3260
|
+
unitCurrencyValue?: string | undefined;
|
|
3261
|
+
currencyValue?: string | undefined;
|
|
3186
3262
|
})[];
|
|
3187
3263
|
positionsTotalValue: string;
|
|
3188
3264
|
brandColor?: string | undefined;
|
|
@@ -3197,7 +3273,7 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
|
|
|
3197
3273
|
type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"staking">]>;
|
|
3198
3274
|
manageUrl: z.ZodOptional<z.ZodString>;
|
|
3199
3275
|
name: z.ZodString;
|
|
3200
|
-
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
3276
|
+
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
3201
3277
|
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
3202
3278
|
currencyValue: z.ZodDefault<z.ZodString>;
|
|
3203
3279
|
}, {
|
|
@@ -3886,6 +3962,22 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
|
|
|
3886
3962
|
ccyDayChange?: string | undefined;
|
|
3887
3963
|
currencySymbol?: string | undefined;
|
|
3888
3964
|
} | undefined;
|
|
3965
|
+
}>]>, z.ZodObject<z.objectUtil.extendShape<{
|
|
3966
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
3967
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
3968
|
+
}, {
|
|
3969
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
3970
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
3971
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3972
|
+
currencyValue: string;
|
|
3973
|
+
address?: `0x${string}` | undefined;
|
|
3974
|
+
apy?: string | undefined;
|
|
3975
|
+
unitCurrencyValue?: string | undefined;
|
|
3976
|
+
}, {
|
|
3977
|
+
address?: string | undefined;
|
|
3978
|
+
apy?: string | undefined;
|
|
3979
|
+
unitCurrencyValue?: string | undefined;
|
|
3980
|
+
currencyValue?: string | undefined;
|
|
3889
3981
|
}>]>, "many">;
|
|
3890
3982
|
positionsTotalValue: z.ZodString;
|
|
3891
3983
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
@@ -4043,6 +4135,11 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
|
|
|
4043
4135
|
ccyDayChange?: string | undefined;
|
|
4044
4136
|
currencySymbol?: string | undefined;
|
|
4045
4137
|
} | undefined;
|
|
4138
|
+
} | {
|
|
4139
|
+
currencyValue: string;
|
|
4140
|
+
address?: `0x${string}` | undefined;
|
|
4141
|
+
apy?: string | undefined;
|
|
4142
|
+
unitCurrencyValue?: string | undefined;
|
|
4046
4143
|
})[];
|
|
4047
4144
|
positionsTotalValue: string;
|
|
4048
4145
|
brandColor?: string | undefined;
|
|
@@ -4192,6 +4289,11 @@ export declare const defiProductsSchema: z.ZodArray<z.ZodObject<{
|
|
|
4192
4289
|
ccyDayChange?: string | undefined;
|
|
4193
4290
|
currencySymbol?: string | undefined;
|
|
4194
4291
|
} | undefined;
|
|
4292
|
+
} | {
|
|
4293
|
+
address?: string | undefined;
|
|
4294
|
+
apy?: string | undefined;
|
|
4295
|
+
unitCurrencyValue?: string | undefined;
|
|
4296
|
+
currencyValue?: string | undefined;
|
|
4195
4297
|
})[];
|
|
4196
4298
|
positionsTotalValue: string;
|
|
4197
4299
|
brandColor?: string | undefined;
|
|
@@ -4208,7 +4310,7 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
4208
4310
|
type: z.ZodUnion<[z.ZodLiteral<"concentratedLiquidityPosition">, z.ZodLiteral<"collateralizedDebtPosition">, z.ZodLiteral<"delegatedTokens">, z.ZodLiteral<"staking">]>;
|
|
4209
4311
|
manageUrl: z.ZodOptional<z.ZodString>;
|
|
4210
4312
|
name: z.ZodString;
|
|
4211
|
-
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
4313
|
+
positions: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
4212
4314
|
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
4213
4315
|
currencyValue: z.ZodDefault<z.ZodString>;
|
|
4214
4316
|
}, {
|
|
@@ -4897,6 +4999,22 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
4897
4999
|
ccyDayChange?: string | undefined;
|
|
4898
5000
|
currencySymbol?: string | undefined;
|
|
4899
5001
|
} | undefined;
|
|
5002
|
+
}>]>, z.ZodObject<z.objectUtil.extendShape<{
|
|
5003
|
+
address: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>>;
|
|
5004
|
+
currencyValue: z.ZodDefault<z.ZodString>;
|
|
5005
|
+
}, {
|
|
5006
|
+
apy: z.ZodOptional<z.ZodString>;
|
|
5007
|
+
unitCurrencyValue: z.ZodOptional<z.ZodString>;
|
|
5008
|
+
}>, "strip", z.ZodTypeAny, {
|
|
5009
|
+
currencyValue: string;
|
|
5010
|
+
address?: `0x${string}` | undefined;
|
|
5011
|
+
apy?: string | undefined;
|
|
5012
|
+
unitCurrencyValue?: string | undefined;
|
|
5013
|
+
}, {
|
|
5014
|
+
address?: string | undefined;
|
|
5015
|
+
apy?: string | undefined;
|
|
5016
|
+
unitCurrencyValue?: string | undefined;
|
|
5017
|
+
currencyValue?: string | undefined;
|
|
4900
5018
|
}>]>, "many">;
|
|
4901
5019
|
positionsTotalValue: z.ZodString;
|
|
4902
5020
|
brandColor: z.ZodOptional<z.ZodString>;
|
|
@@ -5054,6 +5172,11 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
5054
5172
|
ccyDayChange?: string | undefined;
|
|
5055
5173
|
currencySymbol?: string | undefined;
|
|
5056
5174
|
} | undefined;
|
|
5175
|
+
} | {
|
|
5176
|
+
currencyValue: string;
|
|
5177
|
+
address?: `0x${string}` | undefined;
|
|
5178
|
+
apy?: string | undefined;
|
|
5179
|
+
unitCurrencyValue?: string | undefined;
|
|
5057
5180
|
})[];
|
|
5058
5181
|
positionsTotalValue: string;
|
|
5059
5182
|
brandColor?: string | undefined;
|
|
@@ -5203,6 +5326,11 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
5203
5326
|
ccyDayChange?: string | undefined;
|
|
5204
5327
|
currencySymbol?: string | undefined;
|
|
5205
5328
|
} | undefined;
|
|
5329
|
+
} | {
|
|
5330
|
+
address?: string | undefined;
|
|
5331
|
+
apy?: string | undefined;
|
|
5332
|
+
unitCurrencyValue?: string | undefined;
|
|
5333
|
+
currencyValue?: string | undefined;
|
|
5206
5334
|
})[];
|
|
5207
5335
|
positionsTotalValue: string;
|
|
5208
5336
|
brandColor?: string | undefined;
|
|
@@ -5355,6 +5483,11 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
5355
5483
|
ccyDayChange?: string | undefined;
|
|
5356
5484
|
currencySymbol?: string | undefined;
|
|
5357
5485
|
} | undefined;
|
|
5486
|
+
} | {
|
|
5487
|
+
currencyValue: string;
|
|
5488
|
+
address?: `0x${string}` | undefined;
|
|
5489
|
+
apy?: string | undefined;
|
|
5490
|
+
unitCurrencyValue?: string | undefined;
|
|
5358
5491
|
})[];
|
|
5359
5492
|
positionsTotalValue: string;
|
|
5360
5493
|
brandColor?: string | undefined;
|
|
@@ -5507,6 +5640,11 @@ export declare const defiDappsProductsSchema: z.ZodObject<{
|
|
|
5507
5640
|
ccyDayChange?: string | undefined;
|
|
5508
5641
|
currencySymbol?: string | undefined;
|
|
5509
5642
|
} | undefined;
|
|
5643
|
+
} | {
|
|
5644
|
+
address?: string | undefined;
|
|
5645
|
+
apy?: string | undefined;
|
|
5646
|
+
unitCurrencyValue?: string | undefined;
|
|
5647
|
+
currencyValue?: string | undefined;
|
|
5510
5648
|
})[];
|
|
5511
5649
|
positionsTotalValue: string;
|
|
5512
5650
|
brandColor?: string | undefined;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { z as o } from "zod";
|
|
2
2
|
import { addressSchema as t } from "../../../chains/starknet/address.js";
|
|
3
|
-
import { apiTokenInfoSchema as
|
|
4
|
-
import { defiPositionTypeSchema as
|
|
5
|
-
import { webTokenWithBalanceAndPriceSchema as
|
|
6
|
-
const
|
|
3
|
+
import { apiTokenInfoSchema as l } from "./backend.model.js";
|
|
4
|
+
import { defiPositionTypeSchema as d } from "./defiPositionType.model.js";
|
|
5
|
+
import { webTokenWithBalanceAndPriceSchema as e } from "./webToken.model.js";
|
|
6
|
+
const i = e.extend({
|
|
7
7
|
accruedFees: o.string(),
|
|
8
8
|
currentPrice: o.string(),
|
|
9
9
|
maxPrice: o.string(),
|
|
10
10
|
minPrice: o.string(),
|
|
11
11
|
principal: o.string()
|
|
12
|
-
}),
|
|
12
|
+
}), n = o.object({
|
|
13
13
|
address: t.optional(),
|
|
14
14
|
currencyValue: o.string().default("0")
|
|
15
|
-
}),
|
|
15
|
+
}), a = n.extend({
|
|
16
16
|
poolFeePercentage: o.string(),
|
|
17
17
|
tickSpacingPercentage: o.string().optional(),
|
|
18
18
|
tokenId: o.string().optional(),
|
|
19
19
|
unitCurrencyValueToken0: o.string().optional(),
|
|
20
20
|
unitCurrencyValueToken1: o.string().optional(),
|
|
21
|
-
token0:
|
|
22
|
-
token1:
|
|
23
|
-
}), b = o.array(
|
|
21
|
+
token0: i,
|
|
22
|
+
token1: i
|
|
23
|
+
}), b = o.array(a), f = o.object({
|
|
24
24
|
name: o.string().optional(),
|
|
25
25
|
healthRatio: o.string().optional(),
|
|
26
26
|
accountAddress: t.optional()
|
|
27
|
-
}), r =
|
|
27
|
+
}), r = n.extend({
|
|
28
28
|
totalBalances: o.record(o.string()),
|
|
29
29
|
collateral: o.boolean(),
|
|
30
30
|
debt: o.boolean(),
|
|
@@ -32,44 +32,49 @@ const a = n.extend({
|
|
|
32
32
|
apy: o.string().optional(),
|
|
33
33
|
group: o.string().optional(),
|
|
34
34
|
unitCurrencyValue: o.string().optional(),
|
|
35
|
-
positionToken:
|
|
36
|
-
token:
|
|
35
|
+
positionToken: l.or(o.undefined()),
|
|
36
|
+
token: e.optional(),
|
|
37
37
|
accountAddress: t.optional(),
|
|
38
38
|
accountAddressGroup: o.string().optional()
|
|
39
|
-
}),
|
|
39
|
+
}), T = o.array(r), s = n.extend({
|
|
40
40
|
delegatingTo: t,
|
|
41
|
-
token:
|
|
41
|
+
token: e.optional(),
|
|
42
42
|
balance: o.string(),
|
|
43
43
|
unitCurrencyValue: o.string().optional().default("0")
|
|
44
|
-
}),
|
|
44
|
+
}), x = o.array(s), c = n.extend({
|
|
45
|
+
apy: o.string().optional(),
|
|
46
|
+
unitCurrencyValue: o.string().optional()
|
|
47
|
+
}), A = o.array(c), p = a.or(r).or(s).or(c), g = o.record(o.object({
|
|
45
48
|
name: o.string().optional(),
|
|
46
49
|
healthRatio: o.string().optional(),
|
|
47
50
|
accountAddress: t.optional()
|
|
48
|
-
})),
|
|
49
|
-
type:
|
|
51
|
+
})), u = o.object({
|
|
52
|
+
type: d,
|
|
50
53
|
manageUrl: o.string().url().optional(),
|
|
51
54
|
name: o.string(),
|
|
52
|
-
positions: o.array(
|
|
55
|
+
positions: o.array(p),
|
|
53
56
|
// other types will be added when available from be
|
|
54
57
|
positionsTotalValue: o.string(),
|
|
55
58
|
brandColor: o.string().optional(),
|
|
56
|
-
groups:
|
|
59
|
+
groups: g.optional(),
|
|
57
60
|
accountAddress: t
|
|
58
|
-
}),
|
|
61
|
+
}), m = o.array(u), V = o.object({
|
|
59
62
|
dappId: o.string(),
|
|
60
|
-
products:
|
|
63
|
+
products: m
|
|
61
64
|
});
|
|
62
65
|
export {
|
|
63
66
|
f as collateralizedDebtGroupSchema,
|
|
64
67
|
r as collateralizedDebtPositionSchema,
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
T as collateralizedDebtPositionsSchema,
|
|
69
|
+
a as concentratedLiquidityPositionSchema,
|
|
67
70
|
b as concentratedLiquidityPositionsSchema,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
V as defiDappsProductsSchema,
|
|
72
|
+
p as defiPositionSchema,
|
|
73
|
+
u as defiProductSchema,
|
|
74
|
+
m as defiProductsSchema,
|
|
75
|
+
x as delegatedTokensArraySchema,
|
|
76
|
+
s as delegatedTokensSchema,
|
|
77
|
+
g as productGroupsSchema,
|
|
78
|
+
c as stakingPositionSchema,
|
|
79
|
+
A as stakingPositionsSchema
|
|
75
80
|
};
|