@argent/x-shared 1.40.0 → 1.41.1
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.d.ts +101 -2
- package/dist/src/tokens/service/types/backend.model.cjs +1 -1
- package/dist/src/tokens/service/types/backend.model.d.ts +4290 -97
- 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 +153 -93
- package/dist/src/tokens/service/types/defiPosition.model.js +31 -27
- package/dist/src/tokens/service/types/defiPositionType.model.cjs +1 -1
- package/dist/src/tokens/service/types/defiPositionType.model.d.ts +1 -1
- package/dist/src/tokens/service/types/defiPositionType.model.js +8 -7
- package/dist/src/tokens/utils.d.ts +6 -0
- 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;
|