@argent/x-shared 1.42.1 → 1.43.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/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/simulation/activity/utils/createNativeActivity.cjs +1 -1
- package/dist/src/features/simulation/activity/utils/createNativeActivity.js +23 -23
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js +10 -9
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +12 -12
- package/dist/src/features/simulation/transactionReview/schema.js +2 -2
- 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/estimate/utils.cjs +1 -1
- package/dist/src/transactions/estimate/utils.js +30 -27
- package/dist/src/transactions/index.d.ts +5 -5
- package/dist/src/transactions/service/implementation.cjs +1 -1
- package/dist/src/transactions/service/implementation.js +66 -65
- 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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("lodash-es"),p=require("../normalize.cjs"),y=require("../schema.cjs");function u(t){var n,e;const c=(e=(n=t.transactions)==null?void 0:n[0].reviewOfTransaction)==null?void 0:e.reviews;return c?c.map(a=>a.action):void 0}function S({simulateAndReview:t,...c}){var n,e,a;const r={type:y.NativeActivityTypeNative,...c};if(t&&!f.isEmpty(t.transactions)){const i=(n=t.transactions)==null?void 0:n[t.transactions.length-1],o=(e=i==null?void 0:i.simulation)==null?void 0:e.summary;if(o){const v=p.normalizeActivitySummaryCollection(o);r.transferSummary=v}const s=(a=i==null?void 0:i.reviewOfTransaction)==null?void 0:a.targetedDapp;s&&(r.dapp=s);const m=u(t);m&&(r.actions=m)}return y.nativeActivitySchema.parse(r)}exports.createNativeActivity=S;exports.normalizeActions=u;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { isEmpty as
|
|
2
|
-
import { normalizeActivitySummaryCollection as
|
|
3
|
-
import { NativeActivityTypeNative as
|
|
4
|
-
function
|
|
5
|
-
var
|
|
6
|
-
const a = (
|
|
7
|
-
return a ? a.map((
|
|
1
|
+
import { isEmpty as f } from "lodash-es";
|
|
2
|
+
import { normalizeActivitySummaryCollection as y } from "../normalize.js";
|
|
3
|
+
import { NativeActivityTypeNative as v, nativeActivitySchema as u } from "../schema.js";
|
|
4
|
+
function S(t) {
|
|
5
|
+
var n, o;
|
|
6
|
+
const a = (o = (n = t.transactions) == null ? void 0 : n[0].reviewOfTransaction) == null ? void 0 : o.reviews;
|
|
7
|
+
return a ? a.map((c) => c.action) : void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
type:
|
|
9
|
+
function z({ simulateAndReview: t, ...a }) {
|
|
10
|
+
var n, o, c;
|
|
11
|
+
const r = {
|
|
12
|
+
type: v,
|
|
13
13
|
...a
|
|
14
14
|
};
|
|
15
|
-
if (t && !
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
|
|
15
|
+
if (t && !f(t.transactions)) {
|
|
16
|
+
const i = (n = t.transactions) == null ? void 0 : n[t.transactions.length - 1], s = (o = i == null ? void 0 : i.simulation) == null ? void 0 : o.summary;
|
|
17
|
+
if (s) {
|
|
18
|
+
const p = y(s);
|
|
19
|
+
r.transferSummary = p;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
21
|
+
const e = (c = i == null ? void 0 : i.reviewOfTransaction) == null ? void 0 : c.targetedDapp;
|
|
22
|
+
e && (r.dapp = e);
|
|
23
|
+
const m = S(t);
|
|
24
|
+
m && (r.actions = m);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return u.parse(r);
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
z as createNativeActivity,
|
|
30
|
+
S as normalizeActions
|
|
31
31
|
};
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./getMessageFromSimulationError.cjs"),g=require("./schema.cjs"),u=require("../../../transactions/getPrettyRcpError.cjs");function m(o){var a;if(!o)return;const e=(a=o.transactions)==null?void 0:a.flatMap(n=>g.isTransactionSimulationError(n)?n.simulationError:!1),r=e==null?void 0:e[e.length-1];if(!r)return;const i=c.getMessageFromSimulationError(r),s=r.message||r.error,t=u.getPrettyRpcError(s),l=t||r.label;return{message:t?s:i,label:l}}exports.getErrorMessageAndLabelFromSimulation=m;
|
package/dist/src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { getMessageFromSimulationError as
|
|
2
|
-
import { isTransactionSimulationError as
|
|
3
|
-
import { getPrettyRpcError as
|
|
4
|
-
function
|
|
1
|
+
import { getMessageFromSimulationError as l } from "./getMessageFromSimulationError.js";
|
|
2
|
+
import { isTransactionSimulationError as c } from "./schema.js";
|
|
3
|
+
import { getPrettyRpcError as g } from "../../../transactions/getPrettyRcpError.js";
|
|
4
|
+
function M(e) {
|
|
5
|
+
var a;
|
|
5
6
|
if (!e)
|
|
6
7
|
return;
|
|
7
|
-
const o = e.transactions.flatMap((
|
|
8
|
+
const o = (a = e.transactions) == null ? void 0 : a.flatMap((n) => c(n) ? n.simulationError : !1), r = o == null ? void 0 : o[o.length - 1];
|
|
8
9
|
if (!r)
|
|
9
10
|
return;
|
|
10
|
-
const
|
|
11
|
+
const i = l(r), s = r.message || r.error, t = g(s), m = t || r.label;
|
|
11
12
|
return {
|
|
12
|
-
message: t ? s :
|
|
13
|
-
label:
|
|
13
|
+
message: t ? s : i,
|
|
14
|
+
label: m
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
M as getErrorMessageAndLabelFromSimulation
|
|
18
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("zod"),f=require("../fees/schema.cjs"),l=require("../warning/schema.cjs"),n=require("../../../chains/starknet/address.cjs"),k=t.z.object({name:t.z.string(),url:t.z.string(),position:t.z.number()}),o=t.z.object({address:t.z.string(),name:t.z.string(),symbol:t.z.string().optional(),decimals:t.z.number().optional(),unknown:t.z.boolean(),iconUrl:t.z.string().optional(),type:t.z.string()}),i=t.z.discriminatedUnion("type",[t.z.object({type:t.z.literal("amount"),label:t.z.string(),token:o,amount:t.z.string(),usd:t.z.string(),editable:t.z.boolean()}),t.z.object({type:t.z.literal("address"),label:t.z.string(),address:t.z.string(),addressName:t.z.string().optional(),verified:t.z.boolean().optional()}),t.z.object({type:t.z.literal("timestamp"),label:t.z.string(),value:t.z.string()}),t.z.object({type:t.z.literal("token_address"),label:t.z.string(),token:o}),t.z.object({type:t.z.literal("calldata"),label:t.z.string(),entrypoint:t.z.string(),calldata:t.z.array(t.z.string())}),t.z.object({type:t.z.literal("text"),label:t.z.string(),text:t.z.string()}),t.z.object({type:t.z.literal("nft"),label:t.z.string(),token:o})]),z=t.z.object({name:t.z.string(),properties:t.z.array(i),defaultProperties:t.z.array(i).optional()}),m=t.z.union([t.z.literal("verified"),t.z.literal("neutral"),t.z.literal("partial"),t.z.literal("warn")]),p=t.z.object({unknown_token:t.z.unknown().optional(),date_of_addition:t.z.string().optional(),contract_address:n.addressSchema.optional(),reason:t.z.string().optional(),value:t.z.string().or(t.z.number()).optional()}),r=t.z.object({reason:l.reasonsSchema,details:p.optional(),severity:l.severitySchema}),d=t.z.object({assessment:m,warnings:t.z.array(r).optional(),assessmentReasons:t.z.array(t.z.string()).optional(),assessmentDetails:t.z.object({contract_address:t.z.string()}).optional(),action:z}),g=t.z.object({name:t.z.string(),description:t.z.string(),logoUrl:t.z.string(),iconUrl:t.z.string(),argentVerified:t.z.boolean(),links:t.z.array(k)}),u=t.z.object({assessment:t.z.union([t.z.literal("verified"),t.z.literal("neutral"),t.z.literal("partial"),t.z.literal("warn")]),warnings:t.z.array(r).optional(),assessmentDetails:t.z.object({contract_address:t.z.string()}).optional(),targetedDapp:g.optional(),reviews:t.z.array(d)}).optional(),b=t.z.object({banner:t.z.string().nullable().optional(),preview:t.z.string().nullable().optional(),full:t.z.string().nullable().optional(),original:t.z.string().nullable().optional()}),v=t.z.object({twitter:t.z.string().optional(),external:t.z.string().optional(),discord:t.z.string().optional()}),s=t.z.object({address:n.addressSchemaArgentBackend,decimals:t.z.number().optional(),symbol:t.z.string().optional(),name:t.z.string(),description:t.z.string().optional(),type:t.z.string().optional(),usdValue:t.z.string().optional(),iconUrl:t.z.string().optional(),unknown:t.z.boolean().optional(),imageUrls:b.optional(),links:v.optional()}),w=t.z.object({tokenAddress:n.addressSchemaArgentBackend,owner:n.addressSchemaArgentBackend,spender:n.addressSchemaArgentBackend,value:t.z.string().optional(),approvalForAll:t.z.boolean(),details:s.optional()}),A=t.z.object({tokenAddress:n.addressSchemaArgentBackend,from:n.addressSchemaArgentBackend,to:n.addressSchemaArgentBackend,tokenId:t.z.string().optional(),value:t.z.string().optional(),details:s.optional()}),a=t.z.union([t.z.string(),t.z.number(),t.z.bigint()]).transform(e=>parseInt(e.toString(),10)),c={overallFee:a,gasPrice:a,gasUsage:a,dataGasPrice:a.optional(),dataGasConsumed:a.optional()},S=t.z.object({...c,unit:t.z.string().transform(e=>e.toUpperCase()).pipe(t.z.literal("WEI")),maxFee:a}).or(t.z.object({...c,unit:t.z.string().transform(e=>e.toUpperCase()).pipe(t.z.literal("FRI")),maxAmount:a,maxPricePerUnit:a})),E=t.z.object({type:t.z.string(),label:t.z.string(),tokenId:t.z.string().optional(),value:t.z.string().optional(),usdValue:t.z.string().optional(),token:s,sent:t.z.boolean().optional(),tokenIdDetails:t.z.object({name:t.z.string().optional(),description:t.z.string().optional(),imageUrls:b.optional()}).optional()}),U=t.z.object({approvals:t.z.array(w).optional(),transfers:t.z.array(A).optional(),calculatedNonce:t.z.string().optional(),feeEstimation:S,summary:t.z.array(E).optional()}),D=t.z.object({label:t.z.string().optional(),code:t.z.number().optional(),message:t.z.string().optional(),error:t.z.string().optional()}),h=t.z.object({reviewOfTransaction:u,simulation:U,simulationError:t.z.undefined()}),y=t.z.object({reviewOfTransaction:u,simulation:t.z.undefined(),simulationError:D}),j=h.or(y),B=t.z.object({transactions:t.z.array(j).optional()}),P=t.z.object({transactions:t.z.array(j).optional(),enrichedFeeEstimation:f.estimatedFeesSchema.optional(),isBackendDown:t.z.boolean().default(!1).optional()});function T(e){return h.safeParse(e).success}function F(e){return y.safeParse(e).success}exports.actionSchema=z;exports.assessmentSchema=m;exports.enrichedSimulateAndReviewSchema=P;exports.feeEstimationSchema=S;exports.isNotTransactionSimulationError=T;exports.isTransactionSimulationError=F;exports.propertySchema=i;exports.reviewSchema=d;exports.simulateAndReviewSchema=B;exports.targetedDappSchema=g;exports.warningDetailsSchema=p;exports.warningSchema=r;
|
|
@@ -13814,7 +13814,7 @@ declare const transactionSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
13814
13814
|
simulation?: undefined;
|
|
13815
13815
|
}>]>;
|
|
13816
13816
|
export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
13817
|
-
transactions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
13817
|
+
transactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
13818
13818
|
reviewOfTransaction: z.ZodOptional<z.ZodObject<{
|
|
13819
13819
|
assessment: z.ZodUnion<[z.ZodLiteral<"verified">, z.ZodLiteral<"neutral">, z.ZodLiteral<"partial">, z.ZodLiteral<"warn">]>;
|
|
13820
13820
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -18447,9 +18447,9 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
|
18447
18447
|
} | undefined;
|
|
18448
18448
|
} | undefined;
|
|
18449
18449
|
simulation?: undefined;
|
|
18450
|
-
}>]>, "many"
|
|
18450
|
+
}>]>, "many">>;
|
|
18451
18451
|
}, "strip", z.ZodTypeAny, {
|
|
18452
|
-
transactions
|
|
18452
|
+
transactions?: ({
|
|
18453
18453
|
simulation: {
|
|
18454
18454
|
feeEstimation: {
|
|
18455
18455
|
maxFee: number;
|
|
@@ -18914,9 +18914,9 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
|
18914
18914
|
} | undefined;
|
|
18915
18915
|
} | undefined;
|
|
18916
18916
|
simulation?: undefined;
|
|
18917
|
-
})[];
|
|
18917
|
+
})[] | undefined;
|
|
18918
18918
|
}, {
|
|
18919
|
-
transactions
|
|
18919
|
+
transactions?: ({
|
|
18920
18920
|
simulation: {
|
|
18921
18921
|
feeEstimation: {
|
|
18922
18922
|
maxFee: string | number | bigint;
|
|
@@ -19381,10 +19381,10 @@ export declare const simulateAndReviewSchema: z.ZodObject<{
|
|
|
19381
19381
|
} | undefined;
|
|
19382
19382
|
} | undefined;
|
|
19383
19383
|
simulation?: undefined;
|
|
19384
|
-
})[];
|
|
19384
|
+
})[] | undefined;
|
|
19385
19385
|
}>;
|
|
19386
19386
|
export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
19387
|
-
transactions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
19387
|
+
transactions: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
19388
19388
|
reviewOfTransaction: z.ZodOptional<z.ZodObject<{
|
|
19389
19389
|
assessment: z.ZodUnion<[z.ZodLiteral<"verified">, z.ZodLiteral<"neutral">, z.ZodLiteral<"partial">, z.ZodLiteral<"warn">]>;
|
|
19390
19390
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -24017,7 +24017,7 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
24017
24017
|
} | undefined;
|
|
24018
24018
|
} | undefined;
|
|
24019
24019
|
simulation?: undefined;
|
|
24020
|
-
}>]>, "many"
|
|
24020
|
+
}>]>, "many">>;
|
|
24021
24021
|
enrichedFeeEstimation: z.ZodOptional<z.ZodObject<{
|
|
24022
24022
|
deployment: z.ZodOptional<z.ZodObject<{
|
|
24023
24023
|
feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
@@ -24170,7 +24170,7 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
24170
24170
|
}>>;
|
|
24171
24171
|
isBackendDown: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
24172
24172
|
}, "strip", z.ZodTypeAny, {
|
|
24173
|
-
transactions
|
|
24173
|
+
transactions?: ({
|
|
24174
24174
|
simulation: {
|
|
24175
24175
|
feeEstimation: {
|
|
24176
24176
|
maxFee: number;
|
|
@@ -24635,7 +24635,7 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
24635
24635
|
} | undefined;
|
|
24636
24636
|
} | undefined;
|
|
24637
24637
|
simulation?: undefined;
|
|
24638
|
-
})[];
|
|
24638
|
+
})[] | undefined;
|
|
24639
24639
|
enrichedFeeEstimation?: {
|
|
24640
24640
|
transactions: {
|
|
24641
24641
|
amount: bigint;
|
|
@@ -24666,7 +24666,7 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
24666
24666
|
} | undefined;
|
|
24667
24667
|
isBackendDown?: boolean | undefined;
|
|
24668
24668
|
}, {
|
|
24669
|
-
transactions
|
|
24669
|
+
transactions?: ({
|
|
24670
24670
|
simulation: {
|
|
24671
24671
|
feeEstimation: {
|
|
24672
24672
|
maxFee: string | number | bigint;
|
|
@@ -25131,7 +25131,7 @@ export declare const enrichedSimulateAndReviewSchema: z.ZodObject<{
|
|
|
25131
25131
|
} | undefined;
|
|
25132
25132
|
} | undefined;
|
|
25133
25133
|
simulation?: undefined;
|
|
25134
|
-
})[];
|
|
25134
|
+
})[] | undefined;
|
|
25135
25135
|
enrichedFeeEstimation?: {
|
|
25136
25136
|
transactions: {
|
|
25137
25137
|
amount: bigint;
|
|
@@ -187,9 +187,9 @@ const h = t.object({
|
|
|
187
187
|
simulation: t.undefined(),
|
|
188
188
|
simulationError: P
|
|
189
189
|
}), d = m.or(g), C = t.object({
|
|
190
|
-
transactions: t.array(d)
|
|
190
|
+
transactions: t.array(d).optional()
|
|
191
191
|
}), O = t.object({
|
|
192
|
-
transactions: t.array(d),
|
|
192
|
+
transactions: t.array(d).optional(),
|
|
193
193
|
enrichedFeeEstimation: b.optional(),
|
|
194
194
|
isBackendDown: t.boolean().default(!1).optional()
|
|
195
195
|
});
|
|
@@ -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;
|