@argent/x-shared 1.42.1 → 1.43.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/README.md +1 -1
- package/dist/.eslintrc.d.cts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +297 -295
- package/dist/src/backend/index.d.ts +1 -1
- package/dist/src/bigdecimal/index.d.ts +1 -1
- package/dist/src/cache/index.d.ts +1 -1
- package/dist/src/chains/starknet/services/address/index.d.ts +1 -1
- package/dist/src/errors/account.d.ts +1 -1
- package/dist/src/errors/address.d.ts +1 -1
- package/dist/src/errors/call.d.ts +1 -1
- package/dist/src/errors/network.d.ts +1 -1
- package/dist/src/errors/review.d.ts +1 -1
- package/dist/src/errors/swap.d.ts +1 -1
- package/dist/src/features/simulation/activity/schema.cjs +1 -1
- package/dist/src/features/simulation/activity/schema.d.ts +346 -334
- package/dist/src/features/simulation/activity/schema.js +17 -26
- package/dist/src/features/swap/services/index.d.ts +1 -1
- package/dist/src/http/index.d.ts +2 -2
- package/dist/src/knownDapps/index.d.ts +1 -1
- package/dist/src/nameResolution/index.d.ts +1 -1
- package/dist/src/nfts/index.d.ts +1 -1
- package/dist/src/onchainRecovery/index.d.ts +1 -1
- package/dist/src/staking/schema.cjs +1 -1
- package/dist/src/staking/schema.d.ts +88 -505
- package/dist/src/staking/schema.js +27 -19
- package/dist/src/tokens/index.d.ts +1 -1
- package/dist/src/tokens/service/implementation.d.ts +16 -10
- package/dist/src/tokens/service/index.d.ts +1 -1
- package/dist/src/tokens/service/tokenError.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 +640 -400
- package/dist/src/tokens/service/types/backend.model.js +116 -114
- package/dist/src/transactions/estimate/error.d.ts +1 -1
- package/dist/src/transactions/index.d.ts +5 -5
- package/dist/src/transactions/service/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,132 +1,134 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { addressSchemaArgentBackend as
|
|
1
|
+
import { z as t } from "zod";
|
|
2
|
+
import { addressSchemaArgentBackend as o, addressSchema as a } from "../../../chains/starknet/address.js";
|
|
3
3
|
import { defiPositionTypeSchema as d } from "./defiPositionType.model.js";
|
|
4
4
|
import { createSchemaWithWarnings as g } from "../../../utils/schemas.js";
|
|
5
|
-
const f =
|
|
6
|
-
status:
|
|
7
|
-
}).or(
|
|
8
|
-
status:
|
|
9
|
-
balances:
|
|
10
|
-
tokenAddress:
|
|
11
|
-
tokenBalance:
|
|
5
|
+
const f = t.object({
|
|
6
|
+
status: t.literal("initialising")
|
|
7
|
+
}).or(t.object({
|
|
8
|
+
status: t.literal("initialised"),
|
|
9
|
+
balances: t.array(t.object({
|
|
10
|
+
tokenAddress: o,
|
|
11
|
+
tokenBalance: t.string()
|
|
12
12
|
}))
|
|
13
|
-
})), i =
|
|
14
|
-
id:
|
|
15
|
-
address:
|
|
16
|
-
brandColor:
|
|
17
|
-
name:
|
|
18
|
-
symbol:
|
|
19
|
-
decimals:
|
|
20
|
-
iconUrl:
|
|
21
|
-
sendable:
|
|
22
|
-
popular:
|
|
23
|
-
refundable:
|
|
24
|
-
listed:
|
|
25
|
-
tradable:
|
|
26
|
-
category:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
})), i = t.object({
|
|
14
|
+
id: t.number(),
|
|
15
|
+
address: a,
|
|
16
|
+
brandColor: t.string().optional(),
|
|
17
|
+
name: t.string(),
|
|
18
|
+
symbol: t.string(),
|
|
19
|
+
decimals: t.number(),
|
|
20
|
+
iconUrl: t.string().optional(),
|
|
21
|
+
sendable: t.boolean(),
|
|
22
|
+
popular: t.boolean(),
|
|
23
|
+
refundable: t.boolean(),
|
|
24
|
+
listed: t.boolean(),
|
|
25
|
+
tradable: t.boolean(),
|
|
26
|
+
category: t.union([
|
|
27
|
+
t.literal("tokens"),
|
|
28
|
+
t.literal("currencies"),
|
|
29
|
+
t.literal("savings")
|
|
30
30
|
]),
|
|
31
|
-
pricingId:
|
|
32
|
-
dappId:
|
|
33
|
-
marketData:
|
|
34
|
-
marketCap:
|
|
35
|
-
marketCap24hChange:
|
|
36
|
-
dailyVolume:
|
|
37
|
-
rank:
|
|
31
|
+
pricingId: t.number().optional(),
|
|
32
|
+
dappId: t.string().optional(),
|
|
33
|
+
marketData: t.object({
|
|
34
|
+
marketCap: t.number(),
|
|
35
|
+
marketCap24hChange: t.number(),
|
|
36
|
+
dailyVolume: t.number(),
|
|
37
|
+
rank: t.number()
|
|
38
38
|
}).optional(),
|
|
39
|
-
tags:
|
|
40
|
-
}), I =
|
|
41
|
-
tokens:
|
|
42
|
-
}), A = i, m =
|
|
43
|
-
pricingId:
|
|
44
|
-
ethValue:
|
|
45
|
-
ccyValue:
|
|
46
|
-
ethDayChange:
|
|
47
|
-
ccyDayChange:
|
|
48
|
-
}), C =
|
|
49
|
-
prices:
|
|
50
|
-
}),
|
|
51
|
-
tokenAddress:
|
|
52
|
-
principal:
|
|
53
|
-
accruedFees:
|
|
54
|
-
minPrice:
|
|
55
|
-
maxPrice:
|
|
56
|
-
currentPrice:
|
|
57
|
-
}), e =
|
|
58
|
-
id:
|
|
59
|
-
investmentId:
|
|
60
|
-
tokenAddress:
|
|
61
|
-
totalBalances:
|
|
39
|
+
tags: t.array(t.string()).optional()
|
|
40
|
+
}), I = t.object({
|
|
41
|
+
tokens: t.array(i)
|
|
42
|
+
}), A = i, m = t.object({
|
|
43
|
+
pricingId: t.number(),
|
|
44
|
+
ethValue: t.string(),
|
|
45
|
+
ccyValue: t.string(),
|
|
46
|
+
ethDayChange: t.string(),
|
|
47
|
+
ccyDayChange: t.string()
|
|
48
|
+
}), C = t.object({
|
|
49
|
+
prices: t.array(m)
|
|
50
|
+
}), n = t.object({
|
|
51
|
+
tokenAddress: o,
|
|
52
|
+
principal: t.string(),
|
|
53
|
+
accruedFees: t.string(),
|
|
54
|
+
minPrice: t.string(),
|
|
55
|
+
maxPrice: t.string(),
|
|
56
|
+
currentPrice: t.string()
|
|
57
|
+
}), e = t.object({
|
|
58
|
+
id: t.string(),
|
|
59
|
+
investmentId: t.string().optional(),
|
|
60
|
+
tokenAddress: a.optional(),
|
|
61
|
+
totalBalances: t.record(t.string())
|
|
62
62
|
}), r = e.extend({
|
|
63
|
-
tokenId:
|
|
64
|
-
data:
|
|
65
|
-
poolFeePercentage:
|
|
66
|
-
tickSpacingPercentage:
|
|
67
|
-
token0:
|
|
68
|
-
token1:
|
|
63
|
+
tokenId: t.string(),
|
|
64
|
+
data: t.object({
|
|
65
|
+
poolFeePercentage: t.string(),
|
|
66
|
+
tickSpacingPercentage: t.string().optional(),
|
|
67
|
+
token0: n,
|
|
68
|
+
token1: n
|
|
69
69
|
})
|
|
70
|
-
}), T =
|
|
71
|
-
data:
|
|
72
|
-
apy:
|
|
70
|
+
}), T = t.array(r), s = e.extend({
|
|
71
|
+
data: t.object({
|
|
72
|
+
apy: t.string()
|
|
73
73
|
}),
|
|
74
|
-
investmentId:
|
|
75
|
-
totalBalances:
|
|
76
|
-
}), x =
|
|
77
|
-
data:
|
|
78
|
-
apy:
|
|
79
|
-
group:
|
|
80
|
-
collateral:
|
|
81
|
-
debt:
|
|
82
|
-
lending:
|
|
74
|
+
investmentId: t.string().optional(),
|
|
75
|
+
totalBalances: t.record(t.string())
|
|
76
|
+
}), x = t.array(s), c = e.extend({
|
|
77
|
+
data: t.object({
|
|
78
|
+
apy: t.string().optional(),
|
|
79
|
+
group: t.number().optional(),
|
|
80
|
+
collateral: t.boolean(),
|
|
81
|
+
debt: t.boolean(),
|
|
82
|
+
lending: t.boolean()
|
|
83
83
|
})
|
|
84
|
-
}), B =
|
|
85
|
-
id:
|
|
86
|
-
data:
|
|
87
|
-
delegatingTo:
|
|
84
|
+
}), B = t.array(c), l = e.extend({
|
|
85
|
+
id: t.string(),
|
|
86
|
+
data: t.object({
|
|
87
|
+
delegatingTo: a
|
|
88
88
|
}),
|
|
89
|
-
totalBalances:
|
|
90
|
-
}), R =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
totalBalances: t.record(t.string())
|
|
90
|
+
}), R = t.array(l), p = e.extend({
|
|
91
|
+
investmentId: t.string(),
|
|
92
|
+
data: t.object({
|
|
93
|
+
stakerInfo: t.object({
|
|
94
|
+
name: t.string().optional(),
|
|
95
|
+
iconUrl: t.string().optional(),
|
|
96
|
+
address: a
|
|
96
97
|
}),
|
|
97
|
-
accruedRewards:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
accruedRewards: t.string(),
|
|
99
|
+
stakedAmount: t.string(),
|
|
100
|
+
pendingWithdrawal: t.object({
|
|
101
|
+
amount: t.string(),
|
|
102
|
+
withdrawableAfter: t.number()
|
|
101
103
|
}).optional(),
|
|
102
|
-
apy:
|
|
104
|
+
apy: t.string().optional()
|
|
103
105
|
})
|
|
104
|
-
}), w =
|
|
105
|
-
productId:
|
|
106
|
-
name:
|
|
107
|
-
manageUrl:
|
|
106
|
+
}), w = t.array(p), b = r.or(c).or(l).or(s).or(p), h = t.array(b), u = g({
|
|
107
|
+
productId: t.string().optional(),
|
|
108
|
+
name: t.string(),
|
|
109
|
+
manageUrl: t.string(),
|
|
108
110
|
type: d,
|
|
109
|
-
groups:
|
|
110
|
-
name:
|
|
111
|
-
healthRatio:
|
|
111
|
+
groups: t.record(t.object({
|
|
112
|
+
name: t.string().optional(),
|
|
113
|
+
healthRatio: t.string().optional()
|
|
112
114
|
})).optional(),
|
|
113
115
|
positions: h
|
|
114
|
-
}), S =
|
|
115
|
-
dappId:
|
|
116
|
-
products:
|
|
117
|
-
}), U =
|
|
118
|
-
dapps:
|
|
119
|
-
}), k =
|
|
120
|
-
name:
|
|
121
|
-
tokenAddress:
|
|
122
|
-
amount:
|
|
123
|
-
claimUrl:
|
|
124
|
-
claimStart:
|
|
125
|
-
claimEnd:
|
|
126
|
-
}), v =
|
|
127
|
-
accountAddress:
|
|
128
|
-
chain:
|
|
129
|
-
airdrops:
|
|
116
|
+
}), S = t.object({
|
|
117
|
+
dappId: t.string(),
|
|
118
|
+
products: t.array(u)
|
|
119
|
+
}), U = t.object({
|
|
120
|
+
dapps: t.array(S)
|
|
121
|
+
}), k = t.object({
|
|
122
|
+
name: t.string().optional(),
|
|
123
|
+
tokenAddress: a,
|
|
124
|
+
amount: t.string().optional(),
|
|
125
|
+
claimUrl: t.string().optional(),
|
|
126
|
+
claimStart: t.number(),
|
|
127
|
+
claimEnd: t.number().optional()
|
|
128
|
+
}), v = t.object({
|
|
129
|
+
accountAddress: a,
|
|
130
|
+
chain: t.string(),
|
|
131
|
+
airdrops: t.array(k)
|
|
130
132
|
});
|
|
131
133
|
export {
|
|
132
134
|
f as apiAccountTokenBalancesSchema,
|
|
@@ -138,7 +140,7 @@ export {
|
|
|
138
140
|
u as apiDefiDecompositionProduct,
|
|
139
141
|
h as apiDefiDecompositionProducts,
|
|
140
142
|
S as apiDefiDecompositionSchema,
|
|
141
|
-
|
|
143
|
+
n as apiDefiDecompositionToken,
|
|
142
144
|
b as apiDefiPositionSchema,
|
|
143
145
|
U as apiDefiPositionsSchema,
|
|
144
146
|
R as apiDelegatedTokensArraySchema,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from './aggregatedSimDataTypes';
|
|
1
|
+
export type * from './aggregatedSimDataTypes';
|
|
2
2
|
export * from './amount';
|
|
3
3
|
export * from './buildTransactions';
|
|
4
|
-
export * from './deployAccountTypes';
|
|
4
|
+
export type * from './deployAccountTypes';
|
|
5
5
|
export * from './errors';
|
|
6
6
|
export * from './estimate';
|
|
7
7
|
export * from './findTransfersAndApprovals';
|
|
8
8
|
export * from './getPrettyRcpError';
|
|
9
9
|
export * from './getTransactionVersion';
|
|
10
10
|
export * from './service';
|
|
11
|
-
export * from './transactionAction';
|
|
11
|
+
export type * from './transactionAction';
|
|
12
12
|
export * from './transactionReviewTypes';
|
|
13
|
-
export * from './transactionSimulationTypes';
|
|
13
|
+
export type * from './transactionSimulationTypes';
|
|
14
14
|
export * from './transactionVersion';
|
|
15
15
|
export * from './txv3';
|
|
16
|
-
export * from './types';
|
|
16
|
+
export type * from './types';
|