@argent/x-shared 1.42.0 → 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 +21 -2
- 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 +840 -80
- package/dist/src/tokens/service/types/backend.model.js +117 -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,6 +1,6 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { stakingActionSchema as m, stakerInfoSchema as d, investmentMetaSchema as g } from "../../../staking/schema.js";
|
|
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({
|
|
6
6
|
network: t.string(),
|
|
@@ -16,20 +16,20 @@ const r = t.object({
|
|
|
16
16
|
currency: t.string(),
|
|
17
17
|
currencyAmount: t.number()
|
|
18
18
|
}).optional().nullable()
|
|
19
|
-
}), i = t.enum(["ethereum", "starknet", "zksync", "zksync2"]),
|
|
19
|
+
}), i = t.enum(["ethereum", "starknet", "zksync", "zksync2"]), S = t.object({
|
|
20
20
|
type: t.enum(["payment", "gasFee"]),
|
|
21
21
|
leg: t.enum(["credit", "debit"]),
|
|
22
22
|
asset: a,
|
|
23
23
|
counterParty: e.optional(),
|
|
24
24
|
counterPartyNetwork: i.optional()
|
|
25
|
-
}),
|
|
25
|
+
}), h = t.object({
|
|
26
26
|
address: e,
|
|
27
27
|
network: i,
|
|
28
28
|
type: t.enum(["wallet", "token"])
|
|
29
|
-
}),
|
|
29
|
+
}), v = t.object({
|
|
30
30
|
chainId: t.enum(["TESTNET", "MAINNET", "SEPOLIA"]),
|
|
31
31
|
ethereumNetwork: t.enum(["mainnet", "sepolia"])
|
|
32
|
-
}),
|
|
32
|
+
}), k = t.enum([
|
|
33
33
|
"approval",
|
|
34
34
|
"changePubKey",
|
|
35
35
|
"dappInteraction",
|
|
@@ -51,7 +51,7 @@ const r = t.object({
|
|
|
51
51
|
"cancelEscape",
|
|
52
52
|
"accountUpgraded",
|
|
53
53
|
"multisigConfigurationUpdated"
|
|
54
|
-
]),
|
|
54
|
+
]), A = t.object({
|
|
55
55
|
name: t.string(),
|
|
56
56
|
parameters: t.array(t.unknown()).optional()
|
|
57
57
|
}), f = t.object({
|
|
@@ -68,15 +68,6 @@ const r = t.object({
|
|
|
68
68
|
newVersion: t.string().optional(),
|
|
69
69
|
signerGuid: t.string().optional(),
|
|
70
70
|
signers: t.array(f).optional()
|
|
71
|
-
}), k = t.enum([
|
|
72
|
-
"deposit",
|
|
73
|
-
"withdraw",
|
|
74
|
-
"finalizeWithdraw",
|
|
75
|
-
"claim"
|
|
76
|
-
]), A = t.object({
|
|
77
|
-
name: t.string(),
|
|
78
|
-
iconUrl: t.string(),
|
|
79
|
-
address: e
|
|
80
71
|
}), o = t.discriminatedUnion("type", [
|
|
81
72
|
t.object({
|
|
82
73
|
type: t.literal("deploy"),
|
|
@@ -109,15 +100,15 @@ const r = t.object({
|
|
|
109
100
|
t.object({
|
|
110
101
|
type: t.literal("dappInteraction"),
|
|
111
102
|
dappAddress: e,
|
|
112
|
-
function:
|
|
103
|
+
function: A.optional().nullable()
|
|
113
104
|
// This object is often null. It happens when we were unable to get the ABI or failed decoding the function call
|
|
114
105
|
}),
|
|
115
106
|
t.object({
|
|
116
107
|
type: t.literal("staking"),
|
|
117
|
-
stakingAction:
|
|
108
|
+
stakingAction: m,
|
|
118
109
|
counterparty: e,
|
|
119
110
|
asset: a,
|
|
120
|
-
stakerInfo:
|
|
111
|
+
stakerInfo: d
|
|
121
112
|
})
|
|
122
113
|
]), w = t.union([
|
|
123
114
|
o,
|
|
@@ -173,21 +164,21 @@ const r = t.object({
|
|
|
173
164
|
wallet: e,
|
|
174
165
|
txSender: e,
|
|
175
166
|
source: t.string(),
|
|
176
|
-
type:
|
|
167
|
+
type: k,
|
|
177
168
|
group: t.enum(["finance", "security"]),
|
|
178
169
|
submitted: t.number(),
|
|
179
170
|
lastModified: t.number(),
|
|
180
171
|
transaction: r,
|
|
181
|
-
transfers: t.array(
|
|
172
|
+
transfers: t.array(S),
|
|
182
173
|
// to be clarified
|
|
183
174
|
fees: t.array(I).optional(),
|
|
184
|
-
relatedAddresses: t.array(
|
|
175
|
+
relatedAddresses: t.array(h).nullable(),
|
|
185
176
|
network: t.string(),
|
|
186
|
-
networkDetails:
|
|
177
|
+
networkDetails: v.optional(),
|
|
187
178
|
details: w,
|
|
188
179
|
transferSummary: t.array(c).optional(),
|
|
189
180
|
dapp: N.optional(),
|
|
190
|
-
actions: t.array(
|
|
181
|
+
actions: t.array(y).optional(),
|
|
191
182
|
title: t.string().optional(),
|
|
192
183
|
multisigDetails: t.object({
|
|
193
184
|
signers: t.array(e)
|
|
@@ -220,7 +211,7 @@ const r = t.object({
|
|
|
220
211
|
transaction: r.pick({
|
|
221
212
|
hash: !0
|
|
222
213
|
}),
|
|
223
|
-
dapp:
|
|
214
|
+
dapp: b.optional(),
|
|
224
215
|
meta: T.optional()
|
|
225
216
|
}), M = t.array(p), F = t.object({
|
|
226
217
|
activities: M,
|
|
@@ -244,7 +235,7 @@ export {
|
|
|
244
235
|
F as activityResponseSchema,
|
|
245
236
|
p as activitySchema,
|
|
246
237
|
c as activitySummarySchema,
|
|
247
|
-
|
|
238
|
+
S as activityTransferSchema,
|
|
248
239
|
I as feeSchema,
|
|
249
240
|
K as isActivityDetailsAction,
|
|
250
241
|
u as isActivitySummary,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './implementation';
|
|
2
|
-
export * from './interface';
|
|
2
|
+
export type * from './interface';
|
package/dist/src/http/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from './DateService';
|
|
2
2
|
export * from './HttpError';
|
|
3
3
|
export * from './HttpService';
|
|
4
|
-
export * from './IDateService';
|
|
4
|
+
export type * from './IDateService';
|
|
5
5
|
export * from './IHttpService';
|
|
6
6
|
export * from './SWRService';
|
|
7
|
-
export * from './apiData';
|
|
7
|
+
export type * from './apiData';
|
|
8
8
|
export * from './fetcher';
|
|
9
9
|
export * from './time';
|
package/dist/src/nfts/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),c=require("../utils/starknet/starknet.cjs"),t=require("../chains/starknet/address.cjs"),a=e.z.object({id:e.z.string(),dappId:e.z.string(),productId:e.z.string(),productName:e.z.string(),chain:e.z.string(),name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url().optional(),riskFactor:e.z.enum(["low"]),metrics:e.z.object({baseApy:e.z.string(),totalApy:e.z.string(),tvl:e.z.string().optional()}),incentives:e.z.array(e.z.object({name:e.z.string(),description:e.z.string(),iconUrl:e.z.string().url(),learnMoreUrl:e.z.string().url(),metric:e.z.object({apy:e.z.string()})})),buyEnabled:e.z.boolean(),sellEnabled:e.z.boolean()}),s=a.extend({category:e.z.literal("staking"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({protocolFee:e.z.string().nullable().optional(),totalFee:e.z.string()})})}),o=a.extend({category:e.z.literal("lending"),investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"])}),fees:e.z.object({depositFees:e.z.object({totalFee:e.z.string()}),withdrawalFees:e.z.object({totalFee:e.z.string()})})}),n=e.z.object({name:e.z.string().optional(),iconUrl:e.z.string().url().optional(),address:e.z.string()}),r=a.extend({category:e.z.literal("strkDelegatedStaking"),stakerInfo:n,investableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional()}),withdrawableAssets:e.z.object({tokenAddresses:e.z.array(t.addressSchemaArgentBackend),tokensRequirement:e.z.enum(["any"]),useDecomposedBalances:e.z.boolean().optional(),amountsRequirement:e.z.enum(["fullBalance"]).optional(),timelockDuration:e.z.number().optional()}),fees:e.z.object({depositFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),withdrawalFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}),performanceFees:e.z.object({argentFee:e.z.string().nullable().optional(),protocolFee:e.z.string().nullable().optional(),providerFee:e.z.string().nullable().optional(),totalFee:e.z.string()}).optional()}),claimEnabled:e.z.boolean().optional()}),i=e.z.discriminatedUnion("category",[s,o,r]),z=e.z.object({investments:e.z.array(i)}),d=e.z.object({calls:e.z.array(c.callSchema)}),m=e.z.object({investmentId:e.z.string(),stakerInfo:n,accountAddress:t.addressSchemaArgentBackend,tokenAddress:t.addressSchemaArgentBackend,amount:e.z.string()}),l=e.z.enum(["stake","initiateWithdraw","withdraw","claim"]),g=e.z.object({stakingAction:l,stakerInfo:n,tokenAddress:t.addressSchema,amount:e.z.string()});exports.investmentMetaSchema=g;exports.investmentSchema=i;exports.investmentsResponseSchema=z;exports.lendingInvestmentSchema=o;exports.stakerInfoSchema=n;exports.stakingActionSchema=l;exports.stakingInvestmentSchema=s;exports.strkDelegatedStakingInvestmentSchema=r;exports.strkStakingCalldataResponseSchema=d;exports.strkStakingCalldataSchema=m;
|