@argent/x-shared 1.62.12 → 1.64.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/defiDecomposition.cjs +1 -0
- package/dist/defiDecomposition.d.ts +2 -0
- package/dist/defiDecomposition.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +476 -475
- package/dist/src/account/account.model.cjs +1 -1
- package/dist/src/account/account.model.d.ts +11 -0
- package/dist/src/account/account.model.js +8 -4
- package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.d.ts +6 -0
- package/dist/src/features/defiDecomposition/helpers/computeCollateralizedDebtPositionsUsdValue.js +62 -0
- package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/computeConcentratedLiquidityPositionsUsdValue.js +31 -0
- package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/computeDefiDecompositionUsdValue.js +55 -0
- package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/computeDelegatedTokensPositionsUsdValue.js +30 -0
- package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/computeStakingPositionsUsdValue.js +30 -0
- package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/computeStrkDelegatedStakingPositionsUsdValue.js +30 -0
- package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.d.ts +3 -0
- package/dist/src/features/defiDecomposition/helpers/computeUsdValueForPosition.js +17 -0
- package/dist/src/features/defiDecomposition/helpers/getDefiProductName.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/getDefiProductName.d.ts +1 -0
- package/dist/src/features/defiDecomposition/helpers/getDefiProductName.js +11 -0
- package/dist/src/features/defiDecomposition/helpers/index.d.ts +13 -0
- package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.d.ts +7 -0
- package/dist/src/features/defiDecomposition/helpers/parseCollateralizedDebtPositions.js +57 -0
- package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/parseConcentratedLiquidityPositions.js +42 -0
- package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/parseDefiDecomposition.js +63 -0
- package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/parseDelegatedTokensPositions.js +27 -0
- package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/parseStakingPositions.js +29 -0
- package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.d.ts +4 -0
- package/dist/src/features/defiDecomposition/helpers/parseStrkDelegatedStakingPositions.js +27 -0
- package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.cjs +1 -0
- package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.d.ts +9 -0
- package/dist/src/features/defiDecomposition/helpers/sortDescendingByUsdValue.js +9 -0
- package/dist/src/features/defiDecomposition/index.d.ts +2 -0
- package/dist/src/features/defiDecomposition/schema.cjs +1 -0
- package/dist/src/features/defiDecomposition/schema.d.ts +16935 -0
- package/dist/src/features/defiDecomposition/schema.js +153 -0
- package/dist/src/features/paymaster/types.d.ts +20 -20
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.d.ts +368 -356
- package/dist/src/features/simulation/activity/schema.js +20 -19
- package/dist/src/features/simulation/activity/utils/createNativeActivity.d.ts +8 -8
- package/dist/src/features/simulation/transactionReview/schema.d.ts +1484 -1484
- package/dist/src/features/swap/models/trade.model.d.ts +20 -0
- package/dist/src/staking/schema.d.ts +24 -24
- package/dist/src/tokens/service/types/backend.model.d.ts +8 -8
- package/dist/src/tokens/service/types/defiPosition.model.d.ts +576 -40
- package/dist/src/tokens/service/types/unclaimedRewards.model.d.ts +8 -8
- package/dist/src/tokens/service/types/webToken.model.cjs +1 -1
- package/dist/src/tokens/service/types/webToken.model.d.ts +36 -2
- package/dist/src/tokens/service/types/webToken.model.js +9 -7
- package/dist/src/transactions/equalTokens.cjs +1 -0
- package/dist/src/transactions/equalTokens.d.ts +2 -0
- package/dist/src/transactions/equalTokens.js +5 -0
- package/dist/src/transactions/errors.d.ts +4 -4
- package/dist/src/utils/starknet/starknet.d.ts +12 -12
- package/dist/src/utils/starknet/starknetSchemas.d.ts +212 -212
- package/package.json +6 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import { stakerInfoSchema as m, stakingActionSchema as
|
|
2
|
+
import { stakerInfoSchema as m, stakingActionSchema as d, investmentMetaSchema as g } from "../../../staking/schema.js";
|
|
3
3
|
import { actionSchema as y, targetedDappSchema as b } from "../transactionReview/schema.js";
|
|
4
4
|
import { addressSchemaArgentBackend as e } from "../../../chains/starknet/address.js";
|
|
5
5
|
const r = t.object({
|
|
@@ -105,7 +105,7 @@ const r = t.object({
|
|
|
105
105
|
}),
|
|
106
106
|
t.object({
|
|
107
107
|
type: t.literal("staking"),
|
|
108
|
-
stakingAction:
|
|
108
|
+
stakingAction: d,
|
|
109
109
|
counterparty: e,
|
|
110
110
|
asset: a,
|
|
111
111
|
stakerInfo: m
|
|
@@ -189,16 +189,17 @@ const r = t.object({
|
|
|
189
189
|
title: t.string().optional(),
|
|
190
190
|
multisigDetails: t.object({
|
|
191
191
|
signers: t.array(e)
|
|
192
|
-
}).optional()
|
|
193
|
-
|
|
192
|
+
}).optional(),
|
|
193
|
+
isLootboxReward: t.boolean().optional()
|
|
194
|
+
}), x = t.object({
|
|
194
195
|
title: t.string().optional(),
|
|
195
196
|
shortTitle: t.string().optional(),
|
|
196
197
|
subtitle: t.string().optional(),
|
|
197
198
|
/** let's not import the keys from x-ui here */
|
|
198
199
|
icon: t.string().optional(),
|
|
199
|
-
investment:
|
|
200
|
+
investment: g.optional(),
|
|
200
201
|
isExecuteFromOutside: t.boolean().optional()
|
|
201
|
-
}),
|
|
202
|
+
}), E = "native", T = "rejected", D = "cancelled", P = "queued", F = p.pick({
|
|
202
203
|
status: !0,
|
|
203
204
|
actions: !0,
|
|
204
205
|
submitted: !0,
|
|
@@ -210,45 +211,45 @@ const r = t.object({
|
|
|
210
211
|
status: t.union([
|
|
211
212
|
l,
|
|
212
213
|
t.enum([
|
|
213
|
-
|
|
214
|
+
T,
|
|
214
215
|
D,
|
|
215
216
|
P
|
|
216
217
|
])
|
|
217
218
|
]),
|
|
218
|
-
type: t.literal(
|
|
219
|
+
type: t.literal(E),
|
|
219
220
|
transaction: r.pick({
|
|
220
221
|
hash: !0
|
|
221
222
|
}),
|
|
222
223
|
dapp: b.optional(),
|
|
223
|
-
meta:
|
|
224
|
-
}), M = t.array(p),
|
|
224
|
+
meta: x.optional()
|
|
225
|
+
}), M = t.array(p), R = t.object({
|
|
225
226
|
activities: M,
|
|
226
227
|
page: t.number(),
|
|
227
228
|
pageSize: t.number(),
|
|
228
229
|
totalElements: t.number(),
|
|
229
230
|
totalPages: t.number()
|
|
230
231
|
});
|
|
231
|
-
function
|
|
232
|
+
function B(n) {
|
|
232
233
|
return s.safeParse(n).success;
|
|
233
234
|
}
|
|
234
|
-
const u = (n) => c.safeParse(n).success,
|
|
235
|
+
const u = (n) => c.safeParse(n).success, K = (n) => u(n) && n.asset.type === "token", L = (n) => u(n) && n.asset.type === "nft";
|
|
235
236
|
export {
|
|
236
237
|
D as NativeActivityStatusCancelled,
|
|
237
238
|
P as NativeActivityStatusQueued,
|
|
238
|
-
|
|
239
|
-
|
|
239
|
+
T as NativeActivityStatusRejected,
|
|
240
|
+
E as NativeActivityTypeNative,
|
|
240
241
|
M as activitiesSchema,
|
|
241
242
|
N as activityDappSchema,
|
|
242
243
|
w as activityDetailsSchema,
|
|
243
|
-
|
|
244
|
+
R as activityResponseSchema,
|
|
244
245
|
p as activitySchema,
|
|
245
246
|
c as activitySummarySchema,
|
|
246
247
|
S as activityTransferSchema,
|
|
247
248
|
I as feeSchema,
|
|
248
|
-
|
|
249
|
+
B as isActivityDetailsAction,
|
|
249
250
|
u as isActivitySummary,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
L as isNftActivitySummary,
|
|
252
|
+
K as isTokenActivitySummary,
|
|
253
|
+
x as nativeActivityMetaSchema,
|
|
253
254
|
F as nativeActivitySchema
|
|
254
255
|
};
|
|
@@ -9,9 +9,9 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
9
9
|
type: "amount";
|
|
10
10
|
amount: string;
|
|
11
11
|
token: {
|
|
12
|
-
name: string;
|
|
13
12
|
address: string;
|
|
14
13
|
type: string;
|
|
14
|
+
name: string;
|
|
15
15
|
unknown: boolean;
|
|
16
16
|
symbol?: string | undefined;
|
|
17
17
|
decimals?: number | undefined;
|
|
@@ -27,15 +27,15 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
27
27
|
verified?: boolean | undefined;
|
|
28
28
|
addressName?: string | undefined;
|
|
29
29
|
} | {
|
|
30
|
-
value: string;
|
|
31
30
|
type: "timestamp";
|
|
31
|
+
value: string;
|
|
32
32
|
label: string;
|
|
33
33
|
} | {
|
|
34
34
|
type: "token_address";
|
|
35
35
|
token: {
|
|
36
|
-
name: string;
|
|
37
36
|
address: string;
|
|
38
37
|
type: string;
|
|
38
|
+
name: string;
|
|
39
39
|
unknown: boolean;
|
|
40
40
|
symbol?: string | undefined;
|
|
41
41
|
decimals?: number | undefined;
|
|
@@ -58,9 +58,9 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
58
58
|
} | {
|
|
59
59
|
type: "nft";
|
|
60
60
|
token: {
|
|
61
|
-
name: string;
|
|
62
61
|
address: string;
|
|
63
62
|
type: string;
|
|
63
|
+
name: string;
|
|
64
64
|
unknown: boolean;
|
|
65
65
|
symbol?: string | undefined;
|
|
66
66
|
decimals?: number | undefined;
|
|
@@ -72,9 +72,9 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
72
72
|
type: "amount";
|
|
73
73
|
amount: string;
|
|
74
74
|
token: {
|
|
75
|
-
name: string;
|
|
76
75
|
address: string;
|
|
77
76
|
type: string;
|
|
77
|
+
name: string;
|
|
78
78
|
unknown: boolean;
|
|
79
79
|
symbol?: string | undefined;
|
|
80
80
|
decimals?: number | undefined;
|
|
@@ -90,15 +90,15 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
90
90
|
verified?: boolean | undefined;
|
|
91
91
|
addressName?: string | undefined;
|
|
92
92
|
} | {
|
|
93
|
-
value: string;
|
|
94
93
|
type: "timestamp";
|
|
94
|
+
value: string;
|
|
95
95
|
label: string;
|
|
96
96
|
} | {
|
|
97
97
|
type: "token_address";
|
|
98
98
|
token: {
|
|
99
|
-
name: string;
|
|
100
99
|
address: string;
|
|
101
100
|
type: string;
|
|
101
|
+
name: string;
|
|
102
102
|
unknown: boolean;
|
|
103
103
|
symbol?: string | undefined;
|
|
104
104
|
decimals?: number | undefined;
|
|
@@ -121,9 +121,9 @@ export declare function normalizeActions(simulateAndReview: SimulateAndReview):
|
|
|
121
121
|
} | {
|
|
122
122
|
type: "nft";
|
|
123
123
|
token: {
|
|
124
|
-
name: string;
|
|
125
124
|
address: string;
|
|
126
125
|
type: string;
|
|
126
|
+
name: string;
|
|
127
127
|
unknown: boolean;
|
|
128
128
|
symbol?: string | undefined;
|
|
129
129
|
decimals?: number | undefined;
|