@argent/x-shared 1.33.3 → 1.34.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/account/account.model.d.ts +0 -1
- package/dist/account/accountv4.d.ts +0 -1
- package/dist/account/preferences.model.d.ts +0 -1
- package/dist/backend/schema.d.ts +0 -1
- package/dist/bigdecimal/constants.d.ts +0 -1
- package/dist/bigdecimal/createUnitsSchema.d.ts +0 -1
- package/dist/bigdecimal/formatUnits.d.ts +0 -1
- package/dist/bigdecimal/lib.d.ts +0 -1
- package/dist/bigdecimal/parseUnits.d.ts +0 -1
- package/dist/bigdecimal/utils.d.ts +0 -1
- package/dist/cache/CacheService.d.ts +0 -1
- package/dist/chains/starknet/address.d.ts +0 -1
- package/dist/chains/starknet/addressDomain.d.ts +0 -1
- package/dist/chains/starknet/addressInput.d.ts +0 -1
- package/dist/chains/starknet/argentName.d.ts +0 -1
- package/dist/chains/starknet/cairoVersionSchema.d.ts +0 -1
- package/dist/chains/starknet/getAddressFromArgentName.d.ts +0 -1
- package/dist/chains/starknet/getAddressFromStarkName.d.ts +0 -1
- package/dist/chains/starknet/network.d.ts +0 -1
- package/dist/chains/starknet/services/address/IStarknetAddressService.d.ts +0 -1
- package/dist/chains/starknet/services/address/StarknetAddressService.d.ts +0 -1
- package/dist/chains/starknet/services/deploymentData/deploymentData.schema.d.ts +0 -1
- package/dist/chains/starknet/services/deploymentData/findImplementationForAccount.d.ts +1 -2
- package/dist/chains/starknet/starknetId.d.ts +0 -1
- package/dist/errors/account.d.ts +0 -1
- package/dist/errors/address.d.ts +0 -1
- package/dist/errors/baseErrors.d.ts +0 -1
- package/dist/errors/call.d.ts +0 -1
- package/dist/errors/network.d.ts +0 -1
- package/dist/errors/review.d.ts +0 -1
- package/dist/features/simulation/activity/normalize.d.ts +0 -1
- package/dist/features/simulation/activity/schema.d.ts +0 -1
- package/dist/features/simulation/activity/utils/createNativeActivity.d.ts +0 -1
- package/dist/features/simulation/activity/utils/getAnyActivityTitle.d.ts +0 -1
- package/dist/features/simulation/activity/utils/getOverallLastModified.d.ts +0 -1
- package/dist/features/simulation/activity/utils/hasDelegationActivity.d.ts +0 -1
- package/dist/features/simulation/activity/utils/isMulticallWithDeploymentActivity.d.ts +0 -1
- package/dist/features/simulation/activity/utils/isRejectOnChainActivity.d.ts +0 -1
- package/dist/features/simulation/activity/utils/isUpgradeActivity.d.ts +0 -1
- package/dist/features/simulation/activity/utils/parseAccountActivities.d.ts +0 -1
- package/dist/features/simulation/activity/utils/parseFinanceActivities.d.ts +0 -1
- package/dist/features/simulation/fees/schema.d.ts +0 -1
- package/dist/features/simulation/transactionReview/getErrorMessageAndLabelFromSimulation.d.ts +0 -1
- package/dist/features/simulation/transactionReview/getMessageFromSimulationError.d.ts +0 -1
- package/dist/features/simulation/transactionReview/schema.d.ts +0 -1
- package/dist/features/simulation/warning/helper.d.ts +0 -1
- package/dist/features/simulation/warning/schema.d.ts +0 -1
- package/dist/http/DateService.d.ts +0 -1
- package/dist/http/HttpError.d.ts +0 -1
- package/dist/http/HttpService.d.ts +0 -1
- package/dist/http/IHttpService.d.ts +0 -1
- package/dist/http/SWRService.d.ts +0 -1
- package/dist/http/swr.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -0
- package/dist/knownDapps/IKnownDappsBackendService.d.ts +0 -1
- package/dist/knownDapps/KnownDappsBackendService.d.ts +0 -1
- package/dist/knownDapps/schema.d.ts +0 -1
- package/dist/knownDapps/utils/getDapplandUrl.d.ts +0 -1
- package/dist/nameResolution/IResolveNameService.d.ts +0 -1
- package/dist/nameResolution/ResolveNameService.d.ts +0 -1
- package/dist/nameResolution/schema.d.ts +0 -1
- package/dist/nfts/BackendNftService.d.ts +0 -1
- package/dist/nfts/INFTService.d.ts +0 -1
- package/dist/nfts/useNfts.d.ts +0 -1
- package/dist/nfts/utils.d.ts +0 -1
- package/dist/onchainRecovery/IOnchainRecoveryService.d.ts +0 -1
- package/dist/onchainRecovery/OnchainRecoveryService.d.ts +0 -1
- package/dist/onchainRecovery/schema.d.ts +0 -1
- package/dist/platform/isBrowser.d.ts +0 -1
- package/dist/providers/WebAmplitude/WebAmplitudeProvider.d.ts +0 -1
- package/dist/providers/WebAmplitude/service.d.ts +0 -1
- package/dist/providers/WebAmplitude/types.d.ts +0 -1
- package/dist/providers/WebAmplitude/utils.d.ts +0 -1
- package/dist/signer/multisigner.d.ts +0 -1
- package/dist/signer/seedphrase.d.ts +0 -1
- package/dist/simulation.d.ts +1 -0
- package/dist/tokens/balances.d.ts +0 -1
- package/dist/tokens/convertTokenAmountToCurrencyValue.d.ts +0 -1
- package/dist/tokens/convertTokenUnitAmountWithDecimals.d.ts +0 -1
- package/dist/tokens/isUnlimitedAmount.d.ts +0 -1
- package/dist/tokens/prettifyCurrencyValue.d.ts +0 -1
- package/dist/tokens/prettifyTokenAmount.d.ts +0 -1
- package/dist/tokens/service/implementation.d.ts +0 -1
- package/dist/tokens/service/interface.d.ts +0 -1
- package/dist/tokens/service/tokenError.d.ts +0 -1
- package/dist/tokens/service/types/backend.model.d.ts +0 -1
- package/dist/tokens/service/types/defiPosition.model.d.ts +0 -1
- package/dist/tokens/service/types/defiPositionType.model.d.ts +0 -1
- package/dist/tokens/service/types/token.model.d.ts +0 -1
- package/dist/tokens/service/types/unclaimedRewards.model.d.ts +0 -1
- package/dist/tokens/token.d.ts +0 -1
- package/dist/transactions/aggregatedSimDataTypes.d.ts +0 -1
- package/dist/transactions/amount.d.ts +0 -1
- package/dist/transactions/deployAccountTypes.d.ts +0 -1
- package/dist/transactions/errors.d.ts +0 -1
- package/dist/transactions/estimate/argentMaxFee.d.ts +0 -1
- package/dist/transactions/estimate/error.d.ts +0 -1
- package/dist/transactions/estimate/model.d.ts +0 -1
- package/dist/transactions/estimate/utils.d.ts +0 -1
- package/dist/transactions/findTransfersAndApprovals.d.ts +0 -1
- package/dist/transactions/getTransactionVersion.d.ts +0 -1
- package/dist/transactions/service/implementation.d.ts +0 -1
- package/dist/transactions/service/interface.d.ts +0 -1
- package/dist/transactions/service/types.d.ts +0 -1
- package/dist/transactions/transactionAction.d.ts +0 -1
- package/dist/transactions/transactionReviewTypes.d.ts +0 -1
- package/dist/transactions/transactionSimulationTypes.d.ts +0 -1
- package/dist/transactions/transactionVersion.d.ts +0 -1
- package/dist/transactions/txv3.d.ts +0 -1
- package/dist/transactions/types.d.ts +0 -1
- package/dist/transactions/useBalanceChange.d.ts +0 -1
- package/dist/transactions/useErc20Transactions.d.ts +0 -1
- package/dist/transactions/useErc721Transactions.d.ts +0 -1
- package/dist/transactions/useErc721Transfers.d.ts +0 -1
- package/dist/transactions/useMaxAmountTransaction.d.ts +0 -1
- package/dist/transactions/useTransactionReview.d.ts +0 -1
- package/dist/transactions/useTransactionReviewV2web.d.ts +0 -1
- package/dist/utils/base58.d.ts +0 -1
- package/dist/utils/bigNumber.d.ts +0 -1
- package/dist/utils/hex.d.ts +0 -1
- package/dist/utils/isContractDeployed.d.ts +0 -1
- package/dist/utils/number/prettifyNumber.d.ts +0 -1
- package/dist/utils/parseAmount.d.ts +0 -1
- package/dist/utils/schemas.d.ts +0 -1
- package/dist/utils/starknet/starknet.d.ts +0 -1
- package/dist/utils/starknet/starknetSchemas.d.ts +0 -1
- package/dist/utils/useEventEmitter.d.ts +0 -1
- package/package.json +5 -5
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
2
|
declare const defiPositionTokenSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
4
3
|
address: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
5
4
|
networkId: z.ZodString;
|
package/dist/tokens/token.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Account } from 'starknet';
|
|
2
2
|
import { Token } from '../tokens/token';
|
|
3
3
|
import { ApiTransactionSimulationResponse, TransactionSimulationApproval, TransactionSimulationTransfer } from './transactionSimulationTypes';
|
|
4
|
-
|
|
5
4
|
export type IUseAggregatedSimData = {
|
|
6
5
|
networkId: string;
|
|
7
6
|
account: Account;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { num } from 'starknet';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
3
|
export declare const parseAmount: (amount: string, decimals?: num.BigNumberish) => import('..').BigDecimal;
|
|
5
4
|
export declare const inputAmountSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
6
5
|
export declare const isValidInputAmount: (amount: string) => boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CairoVersion, Call, Calldata, TransactionType } from 'starknet';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
3
|
export declare const transactionReviewTransactionsSchema: z.ZodObject<{
|
|
5
4
|
type: z.ZodDefault<z.ZodEnum<["DECLARE", "DEPLOY", "DEPLOY_ACCOUNT", "INVOKE"]>>;
|
|
6
5
|
calls: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodType<Call, z.ZodTypeDef, Call>, "many">, z.ZodType<Call, z.ZodTypeDef, Call>]>>;
|
|
@@ -3,7 +3,6 @@ import { Address } from '../../chains/starknet/address';
|
|
|
3
3
|
import { EstimatedFee, EstimatedFees, SimulateAndReview } from '../../features/simulation';
|
|
4
4
|
import { ApiTransactionSimulationResponse } from '../transactionSimulationTypes';
|
|
5
5
|
import { CastFeeEstimation, FRI, FeeEstimationV1, FeeEstimationV3, TransactionReviewTransactions, WEI } from './model';
|
|
6
|
-
|
|
7
6
|
export declare function isWEI<T>(value: Pick<CastFeeEstimation<T>, "unit">): value is FeeEstimationV1<T>;
|
|
8
7
|
export declare function isFRI<T>(value: Pick<CastFeeEstimation<T>, "unit">): value is FeeEstimationV3<T>;
|
|
9
8
|
export declare function castFeeEstimation<S, T extends CastFeeEstimation<S>, C>(feeEstimation: T, cast: (value: S) => C): CastFeeEstimation<C>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FunctionInvocation as FunctionInvocationV5 } from 'starknet5';
|
|
2
2
|
import { TransactionSimulationApproval, TransactionSimulationTransfer } from './transactionSimulationTypes';
|
|
3
|
-
|
|
4
3
|
export type EventsToTrack = "Transfer" | "Approval";
|
|
5
4
|
export type TransferEvent = Omit<TransactionSimulationTransfer, "details">;
|
|
6
5
|
export type ApprovalEvent = Omit<TransactionSimulationApproval, "details">;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DeclareContractPayload } from 'starknet';
|
|
2
2
|
import { Address } from '../chains/starknet';
|
|
3
3
|
import { TransactionInvokeVersion, TransactionSimulationVersion } from './transactionVersion';
|
|
4
|
-
|
|
5
4
|
export declare function getTxVersionFromFeeToken(feeTokenAddress: Address): TransactionInvokeVersion;
|
|
6
5
|
export declare function getSimulationTxVersionFromFeeToken(feeTokenAddress: Address): TransactionSimulationVersion;
|
|
7
6
|
export declare function getTxVersionFromFeeTokenForDeclareContract(feeTokenAddress: Address, payload: DeclareContractPayload): TransactionInvokeVersion;
|
|
@@ -6,7 +6,6 @@ import { TransactionReviewTransactions } from '../estimate';
|
|
|
6
6
|
import { AccountDeployTransaction } from '../types';
|
|
7
7
|
import { ITransactionReviewServiceWeb } from './interface';
|
|
8
8
|
import { ITransactionReviewLabel, ITransactionReviewWarning } from './types';
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* TransactionReviewService class implements ITransactionReviewService interface.
|
|
12
11
|
*/
|
|
@@ -4,7 +4,6 @@ import { EnrichedSimulateAndReview } from '../../features/simulation';
|
|
|
4
4
|
import { TransactionReviewTransactions } from '../estimate';
|
|
5
5
|
import { AccountDeployTransaction } from '../types';
|
|
6
6
|
import { ITransactionReviewLabel, ITransactionReviewWarning } from './types';
|
|
7
|
-
|
|
8
7
|
export interface ITransactionReviewBase {
|
|
9
8
|
getLabels(): Promise<ITransactionReviewLabel[] | undefined>;
|
|
10
9
|
getWarnings(): Promise<ITransactionReviewWarning[] | undefined>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AllowArray, Call, DeclareContractPayload, DeployAccountContractPayload, TransactionType, UniversalDeployerContractPayload } from 'starknet';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* TransactionAction is a union type that represents different types of transactions
|
|
5
4
|
* Each type of transaction has an associated payload that provides the necessary information to execute the transaction.
|
|
@@ -2,7 +2,6 @@ import { Call } from 'starknet';
|
|
|
2
2
|
import { ArgentBackendNetworkId } from '../backend';
|
|
3
3
|
import { Address } from '../chains';
|
|
4
4
|
import { ApiData } from '../http/apiData';
|
|
5
|
-
|
|
6
5
|
export interface ApiTransactionReview {
|
|
7
6
|
assessment: ApiTransactionReviewAssessment;
|
|
8
7
|
assessmentReason?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ETransactionVersion } from '@starknet-io/types-js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
3
|
export type TRANSACTION_VERSION = ETransactionVersion;
|
|
5
4
|
export type TransactionInvokeVersion = typeof ETransactionVersion.V0 | typeof ETransactionVersion.V1 | typeof ETransactionVersion.V2 | typeof ETransactionVersion.V3;
|
|
6
5
|
export type TransactionSimulationVersion = typeof ETransactionVersion.F0 | typeof ETransactionVersion.F1 | typeof ETransactionVersion.F2 | typeof ETransactionVersion.F3;
|
|
@@ -2,7 +2,6 @@ import { AccountDeploymentData } from '@starknet-io/types-js';
|
|
|
2
2
|
import { Account, Call, ProviderInterface } from 'starknet';
|
|
3
3
|
import { Address } from '../chains/starknet';
|
|
4
4
|
import { ITransactionReviewServiceWeb } from './service/interface';
|
|
5
|
-
|
|
6
5
|
export interface IuseTransactionReviewV2web {
|
|
7
6
|
selectedAccount: Account | undefined;
|
|
8
7
|
feeTokenAddress?: Address;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AggregatedSimData } from './aggregatedSimDataTypes';
|
|
2
|
-
|
|
3
2
|
export declare const getERC20Transactions: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
4
3
|
export declare const useERC20Transactions: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
5
4
|
export declare const hasERC20Transactions: (aggregatedData?: AggregatedSimData[]) => boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AggregatedSimData } from './aggregatedSimDataTypes';
|
|
2
|
-
|
|
3
2
|
export declare const getERC721Transactions: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
4
3
|
export declare const useERC721Transactions: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
5
4
|
export declare const hasERC721Transactions: (aggregatedData?: AggregatedSimData[]) => boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AggregatedSimData } from './aggregatedSimDataTypes';
|
|
2
|
-
|
|
3
2
|
export declare const getERC721Transfers: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
4
3
|
export declare const useERC721Transfers: (aggregatedData?: AggregatedSimData[]) => AggregatedSimData[];
|
|
5
4
|
export declare const hasERC721Transfer: (aggregatedData?: AggregatedSimData[]) => boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ApiTransactionReview, ApiTransactionReviewActivity, ApiTransactionReviewActivityType, ApiTransactionReviewResponse, IUseTransactionReview, TransactionReviewWithType } from './transactionReviewTypes';
|
|
2
|
-
|
|
3
2
|
export declare const useTransactionReview: ({ apiData: { apiBaseUrl, apiHeaders }, address, network, transactionReviewEnabled, transactions, }: IUseTransactionReview) => import('swr').SWRResponse<ApiTransactionReviewResponse, any>;
|
|
4
3
|
export declare const getDisplayWarnAndReasonForTransactionReview: (transactionReview?: Pick<ApiTransactionReviewResponse, "assessment" | "reason">) => {
|
|
5
4
|
warn?: undefined;
|
|
@@ -3,7 +3,6 @@ import { ProviderInterface } from 'starknet';
|
|
|
3
3
|
import { Address } from '../chains/starknet';
|
|
4
4
|
import { EnrichedSimulateAndReview } from '../features/simulation';
|
|
5
5
|
import { AccountDeployTransaction, IGetReviewForTransactions, IuseTransactionReviewV2web } from './types';
|
|
6
|
-
|
|
7
6
|
export declare const getReviewForTransactions: ({ feeTokenAddress, calls, selectedAccount, transactionReviewService, appDomain, accountDeployTransaction, isDelayedTransaction, }: IGetReviewForTransactions) => Promise<{
|
|
8
7
|
result: {
|
|
9
8
|
transactions: ({
|
package/dist/utils/base58.d.ts
CHANGED
package/dist/utils/hex.d.ts
CHANGED
package/dist/utils/schemas.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Call, CallDetails, RawArgs, RawArgsArray, RawArgsObject } from 'starknet';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
|
|
4
3
|
export declare const bigNumberishSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>;
|
|
5
4
|
export declare const uint256Schema: z.ZodObject<{
|
|
6
5
|
low: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
55
55
|
"@typescript-eslint/parser": "^7.0.0",
|
|
56
56
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
57
|
-
"@vitest/browser": "
|
|
58
|
-
"@vitest/ui": "
|
|
57
|
+
"@vitest/browser": "2.0.5",
|
|
58
|
+
"@vitest/ui": "2.0.5",
|
|
59
59
|
"eslint": "^8.7.0",
|
|
60
60
|
"eslint-config-prettier": "^9.1.0",
|
|
61
61
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"ts-to-zod": "^3.2.0",
|
|
70
70
|
"typescript": "^5.0.4",
|
|
71
71
|
"vite": "^5.0.0",
|
|
72
|
-
"vite-plugin-dts": "^
|
|
73
|
-
"vitest": "
|
|
72
|
+
"vite-plugin-dts": "^4.0.0",
|
|
73
|
+
"vitest": "2.0.5"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@argent/x-multicall": "^7.1.0",
|