@argent/x-shared 1.78.3 → 1.78.5
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/.ts-temp/tsconfig.tsbuildinfo +1 -0
- package/dist/simulation.cjs +1 -1
- package/dist/simulation.js +15 -14
- package/dist/src/chains/starknet/services/deploymentData/findImplementationForAccount.d.ts +3 -3
- package/dist/src/features/simulation/transactionReview/schema.cjs +1 -1
- package/dist/src/features/simulation/transactionReview/schema.d.ts +3 -2
- package/dist/src/features/simulation/transactionReview/schema.js +7 -6
- package/package.json +9 -9
- package/dist/src/storage/__test__/mockFunctionImplementation.d.ts +0 -14
package/dist/simulation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./src/features/simulation/activity/normalize.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./src/features/simulation/activity/normalize.cjs"),i=require("./src/features/simulation/activity/schema.cjs"),c=require("./src/features/simulation/activity/utils/createNativeActivity.cjs"),s=require("./src/features/simulation/activity/utils/getAnyActivityTitle.cjs"),m=require("./src/features/simulation/activity/utils/getOverallLastModified.cjs"),n=require("./src/features/simulation/activity/utils/hasDelegationActivity.cjs"),o=require("./src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.cjs"),S=require("./src/features/simulation/activity/utils/isRejectOnChainActivity.cjs"),v=require("./src/features/simulation/activity/utils/isSwapActivity.cjs"),y=require("./src/features/simulation/activity/utils/isUpgradeActivity.cjs"),h=require("./src/features/simulation/activity/utils/parseAccountActivities.cjs"),u=require("./src/features/simulation/activity/utils/parseFinanceActivities.cjs"),l=require("./src/features/simulation/activity/utils/isAddMultisigSignersActivity.cjs"),A=require("./src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.cjs"),g=require("./src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.cjs"),t=require("./src/features/simulation/fees/schema.cjs"),d=require("./src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.cjs"),p=require("./src/features/simulation/transactionReview/getMessageFromSimulationError.cjs"),e=require("./src/features/simulation/transactionReview/schema.cjs"),r=require("./src/features/simulation/warning/schema.cjs"),E=require("./src/features/simulation/warning/helper.cjs");exports.normalizeActivitySummary=a.normalizeActivitySummary;exports.normalizeActivitySummaryCollection=a.normalizeActivitySummaryCollection;exports.NativeActivityStatusCancelled=i.NativeActivityStatusCancelled;exports.NativeActivityStatusQueued=i.NativeActivityStatusQueued;exports.NativeActivityStatusRejected=i.NativeActivityStatusRejected;exports.NativeActivityTypeNative=i.NativeActivityTypeNative;exports.activitiesSchema=i.activitiesSchema;exports.activityDappSchema=i.activityDappSchema;exports.activityDetailsSchema=i.activityDetailsSchema;exports.activityResponseSchema=i.activityResponseSchema;exports.activitySchema=i.activitySchema;exports.activitySummarySchema=i.activitySummarySchema;exports.activityTransferSchema=i.activityTransferSchema;exports.feeSchema=i.feeSchema;exports.isActivityDetailsAction=i.isActivityDetailsAction;exports.isActivitySummary=i.isActivitySummary;exports.isNftActivitySummary=i.isNftActivitySummary;exports.isTokenActivitySummary=i.isTokenActivitySummary;exports.nativeActivityMetaSchema=i.nativeActivityMetaSchema;exports.nativeActivitySchema=i.nativeActivitySchema;exports.createNativeActivity=c.createNativeActivity;exports.normalizeActions=c.normalizeActions;exports.getAnyActivityShortTitle=s.getAnyActivityShortTitle;exports.getAnyActivityTitle=s.getAnyActivityTitle;exports.getOverallLastModified=m.getOverallLastModified;exports.hasDelegationActivity=n.hasDelegationActivity;exports.isMulticallWithDeploymentActivity=o.isMulticallWithDeploymentActivity;exports.isRejectOnChainActivity=S.isRejectOnChainActivity;exports.isSwapActivity=v.isSwapActivity;exports.isUpgradeActivity=y.isUpgradeActivity;exports.parseAccountActivities=h.parseAccountActivities;exports.parseFinanceActivities=u.parseFinanceActivities;exports.isAddMultisigSignersActivity=l.isAddMultisigSignersActivity;exports.isChangeMultisigThresholdActivity=A.isChangeMultisigThresholdActivity;exports.isRemoveMultisigSignersActivity=g.isRemoveMultisigSignersActivity;exports.estimatedFeeSchema=t.estimatedFeeSchema;exports.estimatedFeesSchema=t.estimatedFeesSchema;exports.feeEstimationResultSchema=t.feeEstimationResultSchema;exports.nativeEstimatedFeeSchema=t.nativeEstimatedFeeSchema;exports.nativeEstimatedFeesSchema=t.nativeEstimatedFeesSchema;exports.paymasterEstimatedFeeSchema=t.paymasterEstimatedFeeSchema;exports.paymasterEstimatedFeesSchema=t.paymasterEstimatedFeesSchema;exports.resourceBoundsSchema=t.resourceBoundsSchema;exports.getErrorMessageAndLabelFromSimulation=d.getErrorMessageAndLabelFromSimulation;exports.getMessageFromSimulationError=p.getMessageFromSimulationError;exports.actionSchema=e.actionSchema;exports.assessmentSchema=e.assessmentSchema;exports.enrichedSimulateAndReviewSchema=e.enrichedSimulateAndReviewSchema;exports.feeEstimationGasSchema=e.feeEstimationGasSchema;exports.feeEstimationNativeOrPaymasterSchema=e.feeEstimationNativeOrPaymasterSchema;exports.feeEstimationResourceBoundSchema=e.feeEstimationResourceBoundSchema;exports.feeEstimationSchema=e.feeEstimationSchema;exports.isNotTransactionSimulationError=e.isNotTransactionSimulationError;exports.isTransactionSimulationError=e.isTransactionSimulationError;exports.paymasterFeeEstimationSchema=e.paymasterFeeEstimationSchema;exports.paymasterFeeTokenSchema=e.paymasterFeeTokenSchema;exports.propertySchema=e.propertySchema;exports.reviewSchema=e.reviewSchema;exports.simulateAndReviewSchema=e.simulateAndReviewSchema;exports.subsidyStatusSchema=e.subsidyStatusSchema;exports.targetedDappSchema=e.targetedDappSchema;exports.transactionSimulationOrErrorSchema=e.transactionSimulationOrErrorSchema;exports.warningDetailsSchema=e.warningDetailsSchema;exports.warningSchema=e.warningSchema;exports.reasonsSchema=r.reasonsSchema;exports.severitySchema=r.severitySchema;exports.getHighestSeverity=E.getHighestSeverity;
|
package/dist/simulation.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeActivitySummary as i, normalizeActivitySummaryCollection as a } from "./src/features/simulation/activity/normalize.js";
|
|
2
|
-
import { NativeActivityStatusCancelled as r, NativeActivityStatusQueued as
|
|
2
|
+
import { NativeActivityStatusCancelled as r, NativeActivityStatusQueued as o, NativeActivityStatusRejected as c, NativeActivityTypeNative as s, activitiesSchema as S, activityDappSchema as n, activityDetailsSchema as v, activityResponseSchema as y, activitySchema as h, activitySummarySchema as p, activityTransferSchema as A, feeSchema as l, isActivityDetailsAction as f, isActivitySummary as u, isNftActivitySummary as d, isTokenActivitySummary as x, nativeActivityMetaSchema as g, nativeActivitySchema as E } from "./src/features/simulation/activity/schema.js";
|
|
3
3
|
import { createNativeActivity as N, normalizeActions as T } from "./src/features/simulation/activity/utils/createNativeActivity.js";
|
|
4
4
|
import { getAnyActivityShortTitle as R, getAnyActivityTitle as D } from "./src/features/simulation/activity/utils/getAnyActivityTitle.js";
|
|
5
5
|
import { getOverallLastModified as C } from "./src/features/simulation/activity/utils/getOverallLastModified.js";
|
|
6
|
-
import { hasDelegationActivity as
|
|
6
|
+
import { hasDelegationActivity as z } from "./src/features/simulation/activity/utils/hasDelegationActivity.js";
|
|
7
7
|
import { isMulticallWithDeploymentActivity as j } from "./src/features/simulation/activity/utils/isMulticallWithDeploymentActivity.js";
|
|
8
8
|
import { isRejectOnChainActivity as B } from "./src/features/simulation/activity/utils/isRejectOnChainActivity.js";
|
|
9
9
|
import { isSwapActivity as G } from "./src/features/simulation/activity/utils/isSwapActivity.js";
|
|
@@ -14,15 +14,15 @@ import { isAddMultisigSignersActivity as J } from "./src/features/simulation/act
|
|
|
14
14
|
import { isChangeMultisigThresholdActivity as V } from "./src/features/simulation/activity/utils/isChangeMultisigThresholdActivity.js";
|
|
15
15
|
import { isRemoveMultisigSignersActivity as Y } from "./src/features/simulation/activity/utils/isRemoveMultisigSignersActivity.js";
|
|
16
16
|
import { estimatedFeeSchema as _, estimatedFeesSchema as $, feeEstimationResultSchema as ee, nativeEstimatedFeeSchema as te, nativeEstimatedFeesSchema as ie, paymasterEstimatedFeeSchema as ae, paymasterEstimatedFeesSchema as me, resourceBoundsSchema as re } from "./src/features/simulation/fees/schema.js";
|
|
17
|
-
import { getErrorMessageAndLabelFromSimulation as
|
|
17
|
+
import { getErrorMessageAndLabelFromSimulation as ce } from "./src/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.js";
|
|
18
18
|
import { getMessageFromSimulationError as Se } from "./src/features/simulation/transactionReview/getMessageFromSimulationError.js";
|
|
19
|
-
import { actionSchema as ve, assessmentSchema as ye, enrichedSimulateAndReviewSchema as he, feeEstimationGasSchema as pe, feeEstimationNativeOrPaymasterSchema as Ae, feeEstimationResourceBoundSchema as le, feeEstimationSchema as fe, isNotTransactionSimulationError as ue, isTransactionSimulationError as de, paymasterFeeEstimationSchema as xe, paymasterFeeTokenSchema as ge, propertySchema as Ee, reviewSchema as Fe, simulateAndReviewSchema as Ne, subsidyStatusSchema as Te, targetedDappSchema as Me,
|
|
20
|
-
import { reasonsSchema as
|
|
21
|
-
import { getHighestSeverity as
|
|
19
|
+
import { actionSchema as ve, assessmentSchema as ye, enrichedSimulateAndReviewSchema as he, feeEstimationGasSchema as pe, feeEstimationNativeOrPaymasterSchema as Ae, feeEstimationResourceBoundSchema as le, feeEstimationSchema as fe, isNotTransactionSimulationError as ue, isTransactionSimulationError as de, paymasterFeeEstimationSchema as xe, paymasterFeeTokenSchema as ge, propertySchema as Ee, reviewSchema as Fe, simulateAndReviewSchema as Ne, subsidyStatusSchema as Te, targetedDappSchema as Me, transactionSimulationOrErrorSchema as Re, warningDetailsSchema as De, warningSchema as we } from "./src/features/simulation/transactionReview/schema.js";
|
|
20
|
+
import { reasonsSchema as Oe, severitySchema as ze } from "./src/features/simulation/warning/schema.js";
|
|
21
|
+
import { getHighestSeverity as je } from "./src/features/simulation/warning/helper.js";
|
|
22
22
|
export {
|
|
23
23
|
r as NativeActivityStatusCancelled,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
o as NativeActivityStatusQueued,
|
|
25
|
+
c as NativeActivityStatusRejected,
|
|
26
26
|
s as NativeActivityTypeNative,
|
|
27
27
|
ve as actionSchema,
|
|
28
28
|
S as activitiesSchema,
|
|
@@ -45,11 +45,11 @@ export {
|
|
|
45
45
|
l as feeSchema,
|
|
46
46
|
R as getAnyActivityShortTitle,
|
|
47
47
|
D as getAnyActivityTitle,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
ce as getErrorMessageAndLabelFromSimulation,
|
|
49
|
+
je as getHighestSeverity,
|
|
50
50
|
Se as getMessageFromSimulationError,
|
|
51
51
|
C as getOverallLastModified,
|
|
52
|
-
|
|
52
|
+
z as hasDelegationActivity,
|
|
53
53
|
f as isActivityDetailsAction,
|
|
54
54
|
u as isActivitySummary,
|
|
55
55
|
J as isAddMultisigSignersActivity,
|
|
@@ -77,13 +77,14 @@ export {
|
|
|
77
77
|
xe as paymasterFeeEstimationSchema,
|
|
78
78
|
ge as paymasterFeeTokenSchema,
|
|
79
79
|
Ee as propertySchema,
|
|
80
|
-
|
|
80
|
+
Oe as reasonsSchema,
|
|
81
81
|
re as resourceBoundsSchema,
|
|
82
82
|
Fe as reviewSchema,
|
|
83
83
|
ze as severitySchema,
|
|
84
84
|
Ne as simulateAndReviewSchema,
|
|
85
85
|
Te as subsidyStatusSchema,
|
|
86
86
|
Me as targetedDappSchema,
|
|
87
|
-
Re as
|
|
88
|
-
De as
|
|
87
|
+
Re as transactionSimulationOrErrorSchema,
|
|
88
|
+
De as warningDetailsSchema,
|
|
89
|
+
we as warningSchema
|
|
89
90
|
};
|
|
@@ -8,10 +8,10 @@ export type WalletAccount = {
|
|
|
8
8
|
cairoVersion?: string;
|
|
9
9
|
type: "standard" | "plugin" | "multisig" | "betterMulticall" | "argent5MinuteEscapeTestingAccount" | "standardCairo0" | "smart" | "imported";
|
|
10
10
|
guardian?: string;
|
|
11
|
-
salt?: Hex;
|
|
11
|
+
salt?: Hex | undefined | null;
|
|
12
12
|
};
|
|
13
13
|
export declare function findImplementationForAccount(owner: string, account: WalletAccount, additionalImplementations?: Implementation[]): Implementation;
|
|
14
|
-
export declare function getAccountDeploymentPayload(cairoVersion: string, accountClassHash: string, owner: string, guardian?: string, salt?: string,
|
|
14
|
+
export declare function getAccountDeploymentPayload(cairoVersion: string, accountClassHash: string, owner: string, guardian?: string, salt?: string | undefined | null,
|
|
15
15
|
/** @deprecated This is only used for backwards compatibility with the old proxy contract, should not be used */
|
|
16
16
|
c0ProxyClassHash?: string): {
|
|
17
17
|
classHash: string;
|
|
@@ -29,4 +29,4 @@ export declare function buildConstructorCalldata(cairoVersion: string, accountCl
|
|
|
29
29
|
ownerSigner: import('starknet').CairoCustomEnum;
|
|
30
30
|
guardianAsOption: CairoOption<import('starknet').CairoCustomEnum> | CairoOption<null>;
|
|
31
31
|
};
|
|
32
|
-
export declare function getAccountContractAddress(cairoVersion: string, accountClassHash: string, signer: string, guardian?: string, salt?: string): string;
|
|
32
|
+
export declare function getAccountContractAddress(cairoVersion: string, accountClassHash: string, signer: string, guardian?: string, salt?: string | undefined | null): string;
|
|
@@ -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"),d=require("../warning/schema.cjs"),A=require("../fees/schema.cjs"),a=require("../../../chains/starknet/address.cjs"),T=e.z.object({name:e.z.string(),url:e.z.string(),position:e.z.number()}),i=e.z.object({address:e.z.string(),name:e.z.string(),symbol:e.z.string().optional(),decimals:e.z.number().optional(),unknown:e.z.boolean(),iconUrl:e.z.string().optional(),type:e.z.string()}),s=e.z.discriminatedUnion("type",[e.z.object({type:e.z.literal("amount"),label:e.z.string(),token:i,amount:e.z.string(),usd:e.z.string(),editable:e.z.boolean()}),e.z.object({type:e.z.literal("address"),label:e.z.string(),address:e.z.string(),addressName:e.z.string().optional(),verified:e.z.boolean().optional()}),e.z.object({type:e.z.literal("timestamp"),label:e.z.string(),value:e.z.string()}),e.z.object({type:e.z.literal("token_address"),label:e.z.string(),token:i}),e.z.object({type:e.z.literal("calldata"),label:e.z.string(),entrypoint:e.z.string(),calldata:e.z.array(e.z.string())}),e.z.object({type:e.z.literal("class_hash"),label:e.z.string(),classHash:e.z.string()}),e.z.object({type:e.z.literal("text"),label:e.z.string(),text:e.z.string()}),e.z.object({type:e.z.literal("nft"),label:e.z.string(),token:i})]),u=e.z.object({name:e.z.string(),properties:e.z.array(s),defaultProperties:e.z.array(s).optional()}),g=e.z.union([e.z.literal("verified"),e.z.literal("neutral"),e.z.literal("partial"),e.z.literal("warn")]),b=e.z.object({unknown_token:e.z.unknown().optional(),date_of_addition:e.z.string().optional(),contract_address:a.addressSchema.optional(),reason:e.z.string().optional(),value:e.z.any().optional()}),r=e.z.object({reason:d.reasonsSchema,details:b.optional(),severity:d.severitySchema}),S=e.z.object({assessment:g,warnings:e.z.array(r).optional(),assessmentReasons:e.z.array(e.z.string()).optional(),assessmentDetails:e.z.object({contract_address:e.z.string()}).optional(),action:u}),h=e.z.object({name:e.z.string(),description:e.z.string(),logoUrl:e.z.string().optional(),iconUrl:e.z.string().optional(),argentVerified:e.z.boolean(),links:e.z.array(T)}),y=e.z.object({assessment:e.z.union([e.z.literal("verified"),e.z.literal("neutral"),e.z.literal("partial"),e.z.literal("warn")]),warnings:e.z.array(r).optional(),assessmentDetails:e.z.object({contract_address:e.z.string()}).optional(),targetedDapp:h.optional(),reviews:e.z.array(S)}).optional(),j=e.z.object({banner:e.z.string().nullable().optional(),preview:e.z.string().nullable().optional(),full:e.z.string().nullable().optional(),original:e.z.string().nullable().optional()}),B=e.z.object({twitter:e.z.string().optional(),external:e.z.string().optional(),discord:e.z.string().optional()}),l=e.z.object({address:a.addressSchemaArgentBackend,decimals:e.z.number().optional(),symbol:e.z.string().optional(),name:e.z.string(),description:e.z.string().optional(),type:e.z.string().optional(),usdValue:e.z.string().optional(),iconUrl:e.z.string().optional(),unknown:e.z.boolean().optional(),imageUrls:j.optional(),links:B.optional()}),D=e.z.object({tokenAddress:a.addressSchemaArgentBackend,owner:a.addressSchemaArgentBackend,spender:a.addressSchemaArgentBackend,value:e.z.string().optional(),approvalForAll:e.z.boolean(),details:l.optional()}),F=e.z.object({tokenAddress:a.addressSchemaArgentBackend,from:a.addressSchemaArgentBackend,to:a.addressSchemaArgentBackend,tokenId:e.z.string().optional(),value:e.z.string().optional(),details:l.optional()}),n=e.z.union([e.z.string(),e.z.number(),e.z.bigint()]).transform(t=>parseInt(t.toString(),10)),c=e.z.object({address:a.addressSchemaArgentBackend,unknown:e.z.boolean(),type:e.z.literal("ERC20")}),o=e.z.object({maxAmount:n,maxPricePerUnit:n}),f=e.z.object({l1Gas:o,l1DataGas:o,l2Gas:o}),k=e.z.object({token:c,overallFee:n,maxFee:n,defaultTip:n.optional()}),z=e.z.object({overallFee:n,resourceBounds:f,unit:e.z.string().transform(t=>t.toUpperCase()).pipe(e.z.literal("FRI")),token:c,defaultTip:n.optional()}),v=z.or(k),U=e.z.object({type:e.z.string(),label:e.z.string(),tokenId:e.z.string().optional(),value:e.z.string().optional(),token:l,sent:e.z.boolean().optional(),ccyValue:e.z.string().optional(),currency:e.z.string().optional(),tokenIdDetails:e.z.object({name:e.z.string().optional(),description:e.z.string().optional(),imageUrls:j.optional()}).optional()}),O=e.z.object({approvals:e.z.array(D).optional(),transfers:e.z.array(F).optional(),calculatedNonce:e.z.string().optional(),feeEstimation:z,feeEstimations:e.z.array(v),summary:e.z.array(U).optional()}),R=e.z.object({label:e.z.string().optional(),code:e.z.number().optional(),message:e.z.string().optional(),error:e.z.string().optional()}),w=e.z.object({reviewOfTransaction:y,simulation:O,simulationError:e.z.undefined().optional()}),E=e.z.object({reviewOfTransaction:y,simulation:e.z.undefined().optional(),simulationError:R}),m=w.or(E),p=e.z.object({subsidiseDeployment:e.z.boolean(),subsidiseTransaction:e.z.boolean()}),N=e.z.object({transactions:e.z.array(m).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:p.optional()}),P=e.z.object({transactions:e.z.array(m).optional(),canSubsidise:e.z.boolean().optional(),subsidyStatus:p.optional(),enrichedFeeEstimation:e.z.array(A.estimatedFeesSchema).optional(),isBackendDown:e.z.boolean().default(!1).optional()});function _(t){return w.safeParse(t).success}function x(t){return E.safeParse(t).success}exports.actionSchema=u;exports.assessmentSchema=g;exports.enrichedSimulateAndReviewSchema=P;exports.feeEstimationGasSchema=o;exports.feeEstimationNativeOrPaymasterSchema=v;exports.feeEstimationResourceBoundSchema=f;exports.feeEstimationSchema=z;exports.isNotTransactionSimulationError=_;exports.isTransactionSimulationError=x;exports.paymasterFeeEstimationSchema=k;exports.paymasterFeeTokenSchema=c;exports.propertySchema=s;exports.reviewSchema=S;exports.simulateAndReviewSchema=N;exports.subsidyStatusSchema=p;exports.targetedDappSchema=h;exports.transactionSimulationOrErrorSchema=m;exports.warningDetailsSchema=b;exports.warningSchema=r;
|
|
@@ -1364,7 +1364,7 @@ declare const transactionSimulationErrorSchema: z.ZodObject<{
|
|
|
1364
1364
|
error: z.ZodOptional<z.ZodString>;
|
|
1365
1365
|
}, z.core.$strip>;
|
|
1366
1366
|
}, z.core.$strip>;
|
|
1367
|
-
declare const
|
|
1367
|
+
export declare const transactionSimulationOrErrorSchema: z.ZodUnion<[z.ZodObject<{
|
|
1368
1368
|
reviewOfTransaction: z.ZodOptional<z.ZodObject<{
|
|
1369
1369
|
assessment: z.ZodUnion<readonly [z.ZodLiteral<"verified">, z.ZodLiteral<"neutral">, z.ZodLiteral<"partial">, z.ZodLiteral<"warn">]>;
|
|
1370
1370
|
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -3011,7 +3011,8 @@ export type Property = z.infer<typeof propertySchema>;
|
|
|
3011
3011
|
export type Simulation = z.infer<typeof simulationSchema>;
|
|
3012
3012
|
export type SimulationError = z.infer<typeof simulationErrorSchema>;
|
|
3013
3013
|
export type SimulationSummary = z.infer<typeof summarySchema>;
|
|
3014
|
-
export type TransactionReviewTransaction = z.infer<typeof
|
|
3014
|
+
export type TransactionReviewTransaction = z.infer<typeof transactionSimulationOrErrorSchema>;
|
|
3015
|
+
export type TransactionSimulationOrError = z.infer<typeof transactionSimulationOrErrorSchema>;
|
|
3015
3016
|
export type TransactionSimulation = z.infer<typeof transactionSimulationSchema>;
|
|
3016
3017
|
type TransactionSimulationError = z.infer<typeof transactionSimulationErrorSchema>;
|
|
3017
3018
|
export declare function isNotTransactionSimulationError(transaction: TransactionReviewTransaction): transaction is TransactionSimulation;
|
|
@@ -166,7 +166,7 @@ const k = t.object({
|
|
|
166
166
|
unit: t.string().transform((o) => o.toUpperCase()).pipe(t.literal("FRI")),
|
|
167
167
|
token: m,
|
|
168
168
|
defaultTip: n.optional()
|
|
169
|
-
}), N = d.or(x),
|
|
169
|
+
}), N = d.or(x), O = t.object({
|
|
170
170
|
type: t.string(),
|
|
171
171
|
label: t.string(),
|
|
172
172
|
tokenId: t.string().optional(),
|
|
@@ -182,26 +182,26 @@ const k = t.object({
|
|
|
182
182
|
description: t.string().optional(),
|
|
183
183
|
imageUrls: p.optional()
|
|
184
184
|
}).optional()
|
|
185
|
-
}),
|
|
185
|
+
}), P = t.object({
|
|
186
186
|
approvals: t.array(T).optional(),
|
|
187
187
|
transfers: t.array(A).optional(),
|
|
188
188
|
calculatedNonce: t.string().optional(),
|
|
189
189
|
feeEstimation: d,
|
|
190
190
|
feeEstimations: t.array(N),
|
|
191
|
-
summary: t.array(
|
|
192
|
-
}),
|
|
191
|
+
summary: t.array(O).optional()
|
|
192
|
+
}), R = t.object({
|
|
193
193
|
label: t.string().optional(),
|
|
194
194
|
code: t.number().optional(),
|
|
195
195
|
message: t.string().optional(),
|
|
196
196
|
error: t.string().optional()
|
|
197
197
|
}), b = t.object({
|
|
198
198
|
reviewOfTransaction: c,
|
|
199
|
-
simulation:
|
|
199
|
+
simulation: P,
|
|
200
200
|
simulationError: t.undefined().optional()
|
|
201
201
|
}), g = t.object({
|
|
202
202
|
reviewOfTransaction: c,
|
|
203
203
|
simulation: t.undefined().optional(),
|
|
204
|
-
simulationError:
|
|
204
|
+
simulationError: R
|
|
205
205
|
}), u = b.or(g), S = t.object({
|
|
206
206
|
subsidiseDeployment: t.boolean(),
|
|
207
207
|
subsidiseTransaction: t.boolean()
|
|
@@ -239,6 +239,7 @@ export {
|
|
|
239
239
|
C as simulateAndReviewSchema,
|
|
240
240
|
S as subsidyStatusSchema,
|
|
241
241
|
U as targetedDappSchema,
|
|
242
|
+
u as transactionSimulationOrErrorSchema,
|
|
242
243
|
E as warningDetailsSchema,
|
|
243
244
|
l as warningSchema
|
|
244
245
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.78.
|
|
3
|
+
"version": "1.78.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -55,24 +55,24 @@
|
|
|
55
55
|
"i18n:upload": "node --loader ts-node/esm --experimental-specifier-resolution=node --no-warnings src/scripts/upload-translation.ts"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@amplitude/analytics-types": "2.
|
|
58
|
+
"@amplitude/analytics-types": "2.11.0",
|
|
59
59
|
"@commitlint/cli": "20.1.0",
|
|
60
60
|
"@commitlint/config-conventional": "20.0.0",
|
|
61
|
-
"@rollup/plugin-typescript": "12.
|
|
61
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
62
62
|
"@semantic-release/git": "10.0.1",
|
|
63
63
|
"@types/async-retry": "1.4.9",
|
|
64
64
|
"@types/lodash-es": "4.17.12",
|
|
65
65
|
"@types/numeral": "2.0.5",
|
|
66
66
|
"@types/ua-parser-js": "0.7.39",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "8.46.
|
|
68
|
-
"@typescript-eslint/parser": "8.46.
|
|
69
|
-
"esbuild": "0.25.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "8.46.3",
|
|
68
|
+
"@typescript-eslint/parser": "8.46.3",
|
|
69
|
+
"esbuild": "0.25.12",
|
|
70
70
|
"esbuild-register": "3.6.0",
|
|
71
71
|
"eslint": "8.57.1",
|
|
72
72
|
"eslint-config-prettier": "10.1.8",
|
|
73
73
|
"eslint-plugin-import": "2.32.0",
|
|
74
74
|
"husky": "9.1.7",
|
|
75
|
-
"lint-staged": "16.2.
|
|
75
|
+
"lint-staged": "16.2.6",
|
|
76
76
|
"msw": "2.11.6",
|
|
77
77
|
"prettier": "3.6.2",
|
|
78
78
|
"semantic-release": "25.0.1",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"ts-to-zod": "5.0.1",
|
|
81
81
|
"tsx": "4.20.6",
|
|
82
82
|
"typescript": "5.9.3",
|
|
83
|
-
"vite": "7.1.
|
|
83
|
+
"vite": "7.1.12",
|
|
84
84
|
"vite-plugin-dts": "4.5.4",
|
|
85
|
-
"vitest": "
|
|
85
|
+
"vitest": "4.0.6"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"@argent/x-multicall": "^7.1.0",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IObjectStore, IRepository } from '../interface';
|
|
2
|
-
export declare class MockFnObjectStore<T> implements IObjectStore<T> {
|
|
3
|
-
namespace: string;
|
|
4
|
-
get: import('vitest').Mock<(...args: any[]) => any>;
|
|
5
|
-
set: import('vitest').Mock<(...args: any[]) => any>;
|
|
6
|
-
subscribe: import('vitest').Mock<(...args: any[]) => any>;
|
|
7
|
-
}
|
|
8
|
-
export declare class MockFnRepository<T> implements IRepository<T> {
|
|
9
|
-
namespace: string;
|
|
10
|
-
get: import('vitest').Mock<(...args: any[]) => any>;
|
|
11
|
-
upsert: import('vitest').Mock<(...args: any[]) => any>;
|
|
12
|
-
subscribe: import('vitest').Mock<(...args: any[]) => any>;
|
|
13
|
-
remove: import('vitest').Mock<(...args: any[]) => any>;
|
|
14
|
-
}
|