@argent/x-shared 1.54.0 → 1.55.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 +224 -222
- package/dist/src/tokens/service/types/backend.model.d.ts +2 -0
- package/dist/src/tokens/service/types/defiPosition.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPosition.model.d.ts +4120 -1476
- package/dist/src/tokens/service/types/defiPosition.model.js +89 -72
- package/package.json +1 -1
|
@@ -1,82 +1,99 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { addressSchema as
|
|
3
|
-
import { apiTokenInfoSchema as
|
|
4
|
-
import { defiPositionTypeSchema as
|
|
1
|
+
import { z as t } from "zod";
|
|
2
|
+
import { addressSchema as o } from "../../../chains/starknet/address.js";
|
|
3
|
+
import { apiTokenInfoSchema as p, apiStrkDelegatedStakingSchema as g } from "./backend.model.js";
|
|
4
|
+
import { defiPositionTypeSchema as m } from "./defiPositionType.model.js";
|
|
5
5
|
import { webTokenWithBalanceAndPriceSchema as e } from "./webToken.model.js";
|
|
6
6
|
const i = e.extend({
|
|
7
|
-
accruedFees:
|
|
8
|
-
currentPrice:
|
|
9
|
-
maxPrice:
|
|
10
|
-
minPrice:
|
|
11
|
-
principal:
|
|
12
|
-
}), n =
|
|
13
|
-
address:
|
|
14
|
-
currencyValue:
|
|
15
|
-
}),
|
|
16
|
-
poolFeePercentage:
|
|
17
|
-
tickSpacingPercentage:
|
|
18
|
-
tokenId:
|
|
19
|
-
unitCurrencyValueToken0:
|
|
20
|
-
unitCurrencyValueToken1:
|
|
7
|
+
accruedFees: t.string(),
|
|
8
|
+
currentPrice: t.string(),
|
|
9
|
+
maxPrice: t.string(),
|
|
10
|
+
minPrice: t.string(),
|
|
11
|
+
principal: t.string()
|
|
12
|
+
}), n = t.object({
|
|
13
|
+
address: o.optional(),
|
|
14
|
+
currencyValue: t.string().default("0")
|
|
15
|
+
}), r = n.extend({
|
|
16
|
+
poolFeePercentage: t.string(),
|
|
17
|
+
tickSpacingPercentage: t.string().optional(),
|
|
18
|
+
tokenId: t.string().optional(),
|
|
19
|
+
unitCurrencyValueToken0: t.string().optional(),
|
|
20
|
+
unitCurrencyValueToken1: t.string().optional(),
|
|
21
21
|
token0: i,
|
|
22
22
|
token1: i
|
|
23
|
-
}),
|
|
24
|
-
name:
|
|
25
|
-
healthRatio:
|
|
26
|
-
accountAddress:
|
|
27
|
-
}),
|
|
28
|
-
totalBalances:
|
|
29
|
-
collateral:
|
|
30
|
-
debt:
|
|
31
|
-
lending:
|
|
32
|
-
apy:
|
|
33
|
-
totalApy:
|
|
34
|
-
group:
|
|
35
|
-
unitCurrencyValue:
|
|
36
|
-
positionToken:
|
|
23
|
+
}), T = t.array(r), x = t.object({
|
|
24
|
+
name: t.string().optional(),
|
|
25
|
+
healthRatio: t.string().optional(),
|
|
26
|
+
accountAddress: o.optional()
|
|
27
|
+
}), s = n.extend({
|
|
28
|
+
totalBalances: t.record(t.string()),
|
|
29
|
+
collateral: t.boolean(),
|
|
30
|
+
debt: t.boolean(),
|
|
31
|
+
lending: t.boolean(),
|
|
32
|
+
apy: t.string().optional(),
|
|
33
|
+
totalApy: t.string().optional(),
|
|
34
|
+
group: t.string().optional(),
|
|
35
|
+
unitCurrencyValue: t.string().optional(),
|
|
36
|
+
positionToken: p.or(t.undefined()),
|
|
37
37
|
token: e.optional(),
|
|
38
|
-
accountAddress:
|
|
39
|
-
accountAddressGroup:
|
|
40
|
-
}),
|
|
41
|
-
delegatingTo:
|
|
38
|
+
accountAddress: o.optional(),
|
|
39
|
+
accountAddressGroup: t.string().optional()
|
|
40
|
+
}), D = t.array(s), c = n.extend({
|
|
41
|
+
delegatingTo: o,
|
|
42
42
|
token: e.optional(),
|
|
43
|
-
balance:
|
|
44
|
-
unitCurrencyValue:
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
balance: t.string(),
|
|
44
|
+
unitCurrencyValue: t.string().optional().default("0")
|
|
45
|
+
}), j = t.array(c), a = t.object({
|
|
46
|
+
wei: t.string(),
|
|
47
|
+
eth: t.string(),
|
|
48
|
+
currency: t.string()
|
|
49
|
+
}), l = n.extend({
|
|
50
|
+
id: t.string(),
|
|
51
|
+
total: a,
|
|
52
|
+
apy: t.number(),
|
|
53
|
+
totalApy: t.number(),
|
|
54
|
+
token: e
|
|
55
|
+
}), V = t.array(l), d = n.extend({
|
|
56
|
+
id: t.string(),
|
|
57
|
+
accruedRewards: a,
|
|
58
|
+
stakedAmount: a,
|
|
59
|
+
total: a,
|
|
60
|
+
apy: t.number(),
|
|
61
|
+
totalApy: t.number(),
|
|
62
|
+
stakerInfo: g.shape.data.shape.stakerInfo,
|
|
63
|
+
token: e
|
|
64
|
+
}), C = t.array(d), u = r.or(s).or(c).or(d).or(l), h = t.record(t.object({
|
|
65
|
+
name: t.string().optional(),
|
|
66
|
+
healthRatio: t.string().optional(),
|
|
67
|
+
accountAddress: o.optional()
|
|
68
|
+
})), S = t.object({
|
|
69
|
+
type: m,
|
|
70
|
+
manageUrl: t.string().url().optional(),
|
|
71
|
+
name: t.string(),
|
|
72
|
+
positions: t.array(u),
|
|
58
73
|
// other types will be added when available from be
|
|
59
|
-
positionsTotalValue:
|
|
60
|
-
brandColor:
|
|
61
|
-
groups:
|
|
62
|
-
accountAddress:
|
|
63
|
-
}),
|
|
64
|
-
dappId:
|
|
65
|
-
products:
|
|
74
|
+
positionsTotalValue: t.string(),
|
|
75
|
+
brandColor: t.string().optional(),
|
|
76
|
+
groups: h.optional(),
|
|
77
|
+
accountAddress: o
|
|
78
|
+
}), k = t.array(S), I = t.object({
|
|
79
|
+
dappId: t.string(),
|
|
80
|
+
products: k
|
|
66
81
|
});
|
|
67
82
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
x as collateralizedDebtGroupSchema,
|
|
84
|
+
s as collateralizedDebtPositionSchema,
|
|
85
|
+
D as collateralizedDebtPositionsSchema,
|
|
86
|
+
r as concentratedLiquidityPositionSchema,
|
|
87
|
+
T as concentratedLiquidityPositionsSchema,
|
|
88
|
+
I as defiDappsProductsSchema,
|
|
89
|
+
u as defiPositionSchema,
|
|
90
|
+
S as defiProductSchema,
|
|
91
|
+
k as defiProductsSchema,
|
|
92
|
+
j as delegatedTokensArraySchema,
|
|
93
|
+
c as delegatedTokensSchema,
|
|
94
|
+
h as productGroupsSchema,
|
|
95
|
+
l as stakingPositionSchema,
|
|
96
|
+
V as stakingPositionsSchema,
|
|
97
|
+
C as strkDelegatedStakingPositionArraySchema,
|
|
98
|
+
d as strkDelegatedStakingPositionSchema
|
|
82
99
|
};
|