@argent/x-shared 1.60.0 → 1.61.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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("./src/bigdecimal/index.cjs"),re=require("./src/errors/baseErrors.cjs"),ne=require("./src/accountNameGenerator/index.cjs"),F=require("./src/account/account.model.cjs"),P=require("./src/account/accountv4.cjs"),O=require("./src/account/preferences.model.cjs"),T=require("./src/backend/schema.cjs"),k=require("./src/backend/sessionKeys/schema.cjs"),ie=require("./src/cache/CacheService.cjs"),n=require("./src/chains/starknet/address.cjs"),l=require("./src/chains/starknet/addressDomain.cjs"),H=require("./src/chains/starknet/addressInput.cjs"),y=require("./src/chains/starknet/argentName.cjs"),se=require("./src/chains/starknet/cairoVersionSchema.cjs"),S=require("./src/chains/starknet/constants.cjs"),L=require("./src/chains/starknet/getAddressFromArgentName.cjs"),C=require("./src/chains/starknet/getAddressFromStarkName.cjs"),oe=require("./src/chains/starknet/network.cjs"),ce=require("./src/chains/starknet/services/address/StarknetAddressService.cjs"),N=require("./src/chains/starknet/services/deploymentData/constants.cjs"),I=require("./src/chains/starknet/services/deploymentData/deploymentData.schema.cjs"),A=require("./src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs"),m=require("./src/chains/starknet/services/deploymentData/getAccountClassHash.cjs"),D=require("./src/chains/starknet/starknetId.cjs"),me=require("./src/http/DateService.cjs"),Se=require("./src/http/HttpError.cjs"),de=require("./src/http/HttpService.cjs"),le=require("./src/http/IHttpService.cjs"),ue=require("./src/http/SWRService.cjs"),w=require("./src/http/fetcher.cjs"),x=require("./src/http/time.cjs"),he=require("./src/knownDapps/KnownDappsBackendService.cjs"),E=require("./src/knownDapps/schema.cjs"),M=require("./src/knownDapps/utils/getDapplandUrl.cjs"),Ae=require("./src/nameResolution/ResolveNameService.cjs"),u=require("./src/nameResolution/schema.cjs"),ge=require("./src/nfts/BackendNftService.cjs"),W=require("./src/nfts/utils.cjs"),pe=require("./src/onchainRecovery/OnchainRecoveryService.cjs"),o=require("./src/onchainRecovery/schema.cjs"),Te=require("./src/platform/isBraveBrowser.cjs"),h=require("./src/platform/isBrowser.cjs"),ke=require("./src/signer/seedphrase.cjs"),U=require("./src/signer/multisigner.cjs"),ye=require("./src/signer/mergeOwnerGuardianSignatures.cjs"),s=require("./src/staking/schema.cjs"),G=require("./src/storage/utils.cjs"),z=require("./src/storage/base.cjs"),v=require("./src/tokens/balances.cjs"),Ce=require("./src/tokens/constants.cjs"),De=require("./src/tokens/convertCurrencyValueToTokenAmount.cjs"),Ee=require("./src/tokens/convertTokenAmountToCurrencyValue.cjs"),ve=require("./src/tokens/convertTokenUnitAmountWithDecimals.cjs"),qe=require("./src/tokens/ensureDecimals.cjs"),be=require("./src/tokens/isUnlimitedAmount.cjs"),fe=require("./src/tokens/prettifyCurrencyValue.cjs"),j=require("./src/tokens/prettifyTokenAmount.cjs"),Re=require("./src/tokens/getCurrencySymbol.cjs"),Fe=require("./src/tokens/service/implementation.cjs"),K=require("./src/tokens/service/tokenError.cjs"),e=require("./src/tokens/service/types/backend.model.cjs"),i=require("./src/tokens/service/types/defiPosition.model.cjs"),Pe=require("./src/tokens/service/types/defiPositionType.model.cjs"),$=require("./src/tokens/service/types/unclaimedRewards.model.cjs"),c=require("./src/tokens/service/types/webToken.model.cjs"),g=require("./src/tokens/utils.cjs"),B=require("./src/transactions/amount.cjs"),_=require("./src/transactions/buildTransactions.cjs"),X=require("./src/transactions/errors.cjs"),V=require("./src/transactions/estimate/argentMaxFee.cjs"),Y=require("./src/transactions/estimate/error.cjs"),Ne=require("./src/transactions/estimate/model.cjs"),r=require("./src/transactions/estimate/utils.cjs"),d=require("./src/transactions/estimate/utilsV2.cjs"),Z=require("./src/transactions/findTransfersAndApprovals.cjs"),Ie=require("./src/transactions/getPrettyRcpError.cjs"),p=require("./src/transactions/getTransactionVersion.cjs"),we=require("./src/transactions/service/implementation.cjs"),Be=require("./src/transactions/service/types.cjs"),_e=require("./src/transactions/transactionReviewTypes.cjs"),Q=require("./src/transactions/transactionVersion.cjs"),J=require("./src/transactions/txv3.cjs"),Ve=require("./src/utils/address.cjs"),Oe=require("./src/utils/arrays.cjs"),q=require("./src/utils/avatarImage.cjs"),b=require("./src/utils/base58.cjs"),He=require("./src/utils/bigNumber.cjs"),Le=require("./src/utils/daysBetween.cjs"),xe=require("./src/utils/env.cjs"),ee=require("./src/utils/hex.cjs"),Me=require("./src/utils/id.cjs"),We=require("./src/utils/initials.cjs"),Ue=require("./src/utils/isContractDeployed.cjs"),Ge=require("./src/utils/nonNullable.cjs"),ze=require("./src/utils/number/isAllowedAddressHexInputValue.cjs"),je=require("./src/utils/number/isAllowedNumericInputValue.cjs"),Ke=require("./src/utils/number/isNumeric.cjs"),f=require("./src/utils/number/prettifyNumber.cjs"),$e=require("./src/utils/number/abbreviateNumber.cjs"),ae=require("./src/utils/parseAmount.cjs"),Xe=require("./src/utils/pluralise.cjs"),Ye=require("./src/utils/readFileAsString.cjs"),R=require("./src/utils/schemas.cjs"),t=require("./src/utils/starknet/starknet.cjs"),a=require("./src/utils/starknet/starknetSchemas.cjs"),Ze=require("./src/utils/transactions.cjs"),Qe=require("./src/utils/url/urlWithQuery.cjs"),Je=require("./src/utils/voidify.cjs"),ea=require("./src/utils/bips.cjs"),aa=require("./src/utils/retryUntilInitialised.cjs");exports.bigDecimal=te;exports.BaseError=re.BaseError;exports.AccountNameGenerator=ne.AccountNameGenerator;exports.AddSmartAccountResponseSchema=F.AddSmartAccountResponseSchema;exports.AddSmartAcountRequestSchema=F.AddSmartAcountRequestSchema;exports.BackendAccountSchema=F.BackendAccountSchema;exports.isAccountV4=P.isAccountV4;exports.isAccountV5=P.isAccountV5;exports.isAccountV6=P.isAccountV6;exports.preferencesEndpointPayload=O.preferencesEndpointPayload;exports.preferencesSchema=O.preferencesSchema;exports.argentBackendNetworkIdSchema=T.argentBackendNetworkIdSchema;exports.argentNetworkIdSchema=T.argentNetworkIdSchema;exports.isArgentBackendNetworkId=T.isArgentBackendNetworkId;exports.isArgentNetworkId=T.isArgentNetworkId;exports.backendSessionAllowedMethodSchema=k.backendSessionAllowedMethodSchema;exports.backendSessionMetadataSchema=k.backendSessionMetadataSchema;exports.backendSessionSchema=k.backendSessionSchema;exports.backendSessionTxFeeSchema=k.backendSessionTxFeeSchema;exports.CacheService=ie.CacheService;exports.addressOrEmptyUndefinedSchema=n.addressOrEmptyUndefinedSchema;exports.addressSchema=n.addressSchema;exports.addressSchemaArgentBackend=n.addressSchemaArgentBackend;exports.addressSchemaBase=n.addressSchemaBase;exports.addressSchemaLooseLength=n.addressSchemaLooseLength;exports.addressSchemaStrictLength=n.addressSchemaStrictLength;exports.formatFullAddress=n.formatFullAddress;exports.formatTruncatedAddress=n.formatTruncatedAddress;exports.formatTruncatedSignerKey=n.formatTruncatedSignerKey;exports.formatTruncatedString=n.formatTruncatedString;exports.includesAddress=n.includesAddress;exports.isAddress=n.isAddress;exports.isBase58Address=n.isBase58Address;exports.isEqualAddress=n.isEqualAddress;exports.isValidAddress=n.isValidAddress;exports.isZeroAddress=n.isZeroAddress;exports.normalizeAddress=n.normalizeAddress;exports.validChecksumAddressSchema=n.validChecksumAddressSchema;exports.validateAddressRangeSchema=n.validateAddressRangeSchema;exports.addressOrDomainInputSchema=l.addressOrDomainInputSchema;exports.addressOrDomainSchema=l.addressOrDomainSchema;exports.isEqualStarknetDomainName=l.isEqualStarknetDomainName;exports.isStarknetDomainName=l.isStarknetDomainName;exports.normalizeAddressOrDomain=l.normalizeAddressOrDomain;exports.starknetDomainNameSchema=l.starknetDomainNameSchema;exports.addressInputCharactersAndLengthSchema=H.addressInputCharactersAndLengthSchema;exports.addressInputSchema=H.addressInputSchema;exports.argentNameSchema=y.argentNameSchema;exports.isArgentName=y.isArgentName;exports.isEqualArgentName=y.isEqualArgentName;exports.normalizeArgentName=y.normalizeArgentName;exports.cairoVersionSchema=se.cairoVersionSchema;exports.ETH_TOKEN_ADDRESS=S.ETH_TOKEN_ADDRESS;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=S.STANDARD_DEVNET_ACCOUNT_CLASS_HASH;exports.STRK_TOKEN_ADDRESS=S.STRK_TOKEN_ADDRESS;exports.TXV1_ACCOUNT_CLASS_HASH=S.TXV1_ACCOUNT_CLASS_HASH;exports.TXV1_MULTISIG_CLASS_HASH=S.TXV1_MULTISIG_CLASS_HASH;exports.TXV3_ACCOUNT_CLASS_HASH=S.TXV3_ACCOUNT_CLASS_HASH;exports.TXV3_MULTISIG_CLASS_HASH=S.TXV3_MULTISIG_CLASS_HASH;exports.apiWalletResponseSchema=L.apiWalletResponseSchema;exports.getAddressFromArgentName=L.getAddressFromArgentName;exports.getAddressFromStarkName=C.getAddressFromStarkName;exports.getCallFromStarkName=C.getCallFromStarkName;exports.getStarknetIdContractAddressFromNetworkId=C.getStarknetIdContractAddressFromNetworkId;exports.starkNameToCallDataDomain=C.starkNameToCallDataDomain;exports.getChainIdFromNetworkId=oe.getChainIdFromNetworkId;exports.StarknetAddressService=ce.StarknetAddressService;exports.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES=N.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES;exports.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES=N.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES;exports.C0_PROXY_CONTRACT_CLASS_HASHES=N.C0_PROXY_CONTRACT_CLASS_HASHES;exports.constructorCallDataSchemaC0=I.constructorCallDataSchemaC0;exports.constructorCallDataSchemaC1V1=I.constructorCallDataSchemaC1V1;exports.implementationSchema=I.implementationSchema;exports.buildConstructorCalldata=A.buildConstructorCalldata;exports.findImplementationForAccount=A.findImplementationForAccount;exports.getAccountContractAddress=A.getAccountContractAddress;exports.getAccountDeploymentPayload=A.getAccountDeploymentPayload;exports.isEqualImplementation=A.isEqualImplementation;exports.getArgentAccountClassHashes=m.getArgentAccountClassHashes;exports.getArgentAccountClassHashesWithTxV3Support=m.getArgentAccountClassHashesWithTxV3Support;exports.getArgentAccountWithMultiSignerClassHashes=m.getArgentAccountWithMultiSignerClassHashes;exports.getLastCairo0ArgentAccountClassHash=m.getLastCairo0ArgentAccountClassHash;exports.getLatestArgentAccountClassHash=m.getLatestArgentAccountClassHash;exports.getLatestArgentMultisigClassHash=m.getLatestArgentMultisigClassHash;exports.getLatestLedgerAccountClassHash=m.getLatestLedgerAccountClassHash;exports.getLedgerAccountClassHashes=m.getLedgerAccountClassHashes;exports.isEqualStarknetId=D.isEqualStarknetId;exports.isStarknetId=D.isStarknetId;exports.normalizeStarknetId=D.normalizeStarknetId;exports.starknetIdSchema=D.starknetIdSchema;exports.DateService=me.DateService;exports.HttpError=Se.HttpError;exports.HTTPService=de.HTTPService;Object.defineProperty(exports,"HTTP_ERROR_MESSAGE",{enumerable:!0,get:()=>le.HTTP_ERROR_MESSAGE});exports.SWRService=ue.SWRService;exports.fetchData=w.fetchData;exports.fetcherError=w.fetcherError;exports.postData=w.postData;exports.getBackendTimeNowSeconds=x.getBackendTimeNowSeconds;exports.getBackendTimeSeconds=x.getBackendTimeSeconds;exports.KnownDappsBackendService=he.KnownDappsBackendService;exports.dappContractSchema=E.dappContractSchema;exports.dappLinkSchema=E.dappLinkSchema;exports.knownDappSchema=E.knownDappSchema;exports.knownDappsSchema=E.knownDappsSchema;exports.getDapplandLinkForDapp=M.getDapplandLinkForDapp;exports.getDapplandUrlForDapp=M.getDapplandUrlForDapp;exports.ResolveNameService=Ae.ResolveNameService;exports.nameProviderResolutionSchema=u.nameProviderResolutionSchema;exports.nameResolutionAddressSchema=u.nameResolutionAddressSchema;exports.nameResolutionAddressesSchema=u.nameResolutionAddressesSchema;exports.nameResolutionStarknetIdSchema=u.nameResolutionStarknetIdSchema;exports.nameResolutionStarknetIdsSchema=u.nameResolutionStarknetIdsSchema;exports.providersNamesSchema=u.providersNamesSchema;exports.BackendNftService=ge.BackendNftService;exports.equalNft=W.equalNft;exports.getNftPicture=W.getNftPicture;exports.OnchainRecoveryService=pe.OnchainRecoveryService;Object.defineProperty(exports,"RecoveryStatusEnum",{enumerable:!0,get:()=>o.RecoveryStatusEnum});Object.defineProperty(exports,"StartOnchainRecoveryErrorStatusEnum",{enumerable:!0,get:()=>o.StartOnchainRecoveryErrorStatusEnum});exports.activeOnchainRecoverySchema=o.activeOnchainRecoverySchema;exports.onchainRecoverySchema=o.onchainRecoverySchema;exports.recoveryBaseSchema=o.recoveryBaseSchema;exports.recoveryBodySchema=o.recoveryBodySchema;exports.recoveryStatusSchema=o.recoveryStatusSchema;exports.startOnchainRecoveryErrorSchema=o.startOnchainRecoveryErrorSchema;exports.startOnchainRecoveryErrorStatusSchema=o.startOnchainRecoveryErrorStatusSchema;exports.startOnchainRecoverySchema=o.startOnchainRecoverySchema;exports.isBraveBrowser=Te.isBraveBrowser;exports.getUAParserResult=h.getUAParserResult;exports.isBrowser=h.isBrowser;exports.isChromeBrowser=h.isChromeBrowser;exports.isEdgeBrowser=h.isEdgeBrowser;exports.isFirefoxBrowser=h.isFirefoxBrowser;exports.isSafariBrowser=h.isSafariBrowser;exports.seedphraseSchema=ke.seedphraseSchema;Object.defineProperty(exports,"MultiSigner",{enumerable:!0,get:()=>U.MultiSigner});exports.getSignerForMultiSigner=U.getSignerForMultiSigner;exports.mergeOwnerGuardianSignatures=ye.mergeOwnerGuardianSignatures;exports.buildSellOptsSchema=s.buildSellOptsSchema;exports.investmentMetaSchema=s.investmentMetaSchema;exports.investmentSchema=s.investmentSchema;exports.investmentsResponseSchema=s.investmentsResponseSchema;exports.lendingInvestmentSchema=s.lendingInvestmentSchema;exports.liquidStakingInvestmentSchema=s.liquidStakingInvestmentSchema;exports.stakerInfoSchema=s.stakerInfoSchema;exports.stakingActionSchema=s.stakingActionSchema;exports.strkDelegatedStakingInvestmentSchema=s.strkDelegatedStakingInvestmentSchema;exports.strkStakingCalldataResponseSchema=s.strkStakingCalldataResponseSchema;exports.strkStakingCalldataSchema=s.strkStakingCalldataSchema;exports.containsValue=G.containsValue;exports.replaceValueRecursively=G.replaceValueRecursively;exports.mergeArrayStableWith=z.mergeArrayStableWith;exports.optionsWithDefaults=z.optionsWithDefaults;exports.getTokenBalance=v.getTokenBalance;exports.getTokens=v.getTokens;exports.getTokensBalances=v.getTokensBalances;exports.useToken=v.useToken;exports.DEFAULT_TOKEN_DECIMALS=Ce.DEFAULT_TOKEN_DECIMALS;exports.convertCurrencyValueToTokenAmount=De.convertCurrencyValueToTokenAmount;exports.convertTokenAmountToCurrencyValue=Ee.convertTokenAmountToCurrencyValue;exports.convertTokenUnitAmountWithDecimals=ve.convertTokenUnitAmountWithDecimals;exports.ensureDecimals=qe.ensureDecimals;exports.isUnlimitedAmount=be.isUnlimitedAmount;exports.prettifyCurrencyValue=fe.prettifyCurrencyValue;exports.PRETTY_UNLIMITED=j.PRETTY_UNLIMITED;exports.prettifyTokenAmount=j.prettifyTokenAmount;exports.getCurrencySymbol=Re.getCurrencySymbol;exports.TokenServiceWeb=Fe.TokenServiceWeb;Object.defineProperty(exports,"TOKEN_ERROR_MESSAGES",{enumerable:!0,get:()=>K.TOKEN_ERROR_MESSAGES});exports.TokenError=K.TokenError;exports.apiAccountTokenBalancesSchema=e.apiAccountTokenBalancesSchema;exports.apiAirdropSchema=e.apiAirdropSchema;exports.apiCollateralizedDebtPositionSchema=e.apiCollateralizedDebtPositionSchema;exports.apiCollateralizedDebtPositionsSchema=e.apiCollateralizedDebtPositionsSchema;exports.apiConcentratedLiquidityPositionSchema=e.apiConcentratedLiquidityPositionSchema;exports.apiConcentratedLiquidityPositionsSchema=e.apiConcentratedLiquidityPositionsSchema;exports.apiDefiDecompositionProduct=e.apiDefiDecompositionProduct;exports.apiDefiDecompositionProducts=e.apiDefiDecompositionProducts;exports.apiDefiDecompositionSchema=e.apiDefiDecompositionSchema;exports.apiDefiDecompositionToken=e.apiDefiDecompositionToken;exports.apiDefiPositionSchema=e.apiDefiPositionSchema;exports.apiDefiPositionsSchema=e.apiDefiPositionsSchema;exports.apiDelegatedTokensArraySchema=e.apiDelegatedTokensArraySchema;exports.apiDelegatedTokensSchema=e.apiDelegatedTokensSchema;exports.apiPriceDataResponseSchema=e.apiPriceDataResponseSchema;exports.apiPriceDetailsSchema=e.apiPriceDetailsSchema;exports.apiStakingPositionSchema=e.apiStakingPositionSchema;exports.apiStakingPositionsSchema=e.apiStakingPositionsSchema;exports.apiStrkDelegatedStakingPositionsSchema=e.apiStrkDelegatedStakingPositionsSchema;exports.apiStrkDelegatedStakingSchema=e.apiStrkDelegatedStakingSchema;exports.apiTokenInfoResponseSchema=e.apiTokenInfoResponseSchema;exports.apiTokenInfoSchema=e.apiTokenInfoSchema;exports.apiTokensInfoResponseSchema=e.apiTokensInfoResponseSchema;exports.apiUnclaimedRewardsSchema=e.apiUnclaimedRewardsSchema;exports.collateralizedDebtGroupSchema=i.collateralizedDebtGroupSchema;exports.collateralizedDebtPositionSchema=i.collateralizedDebtPositionSchema;exports.collateralizedDebtPositionsSchema=i.collateralizedDebtPositionsSchema;exports.concentratedLiquidityPositionSchema=i.concentratedLiquidityPositionSchema;exports.concentratedLiquidityPositionsSchema=i.concentratedLiquidityPositionsSchema;exports.defiDappsProductsSchema=i.defiDappsProductsSchema;exports.defiPositionSchema=i.defiPositionSchema;exports.defiProductSchema=i.defiProductSchema;exports.defiProductsSchema=i.defiProductsSchema;exports.delegatedTokensArraySchema=i.delegatedTokensArraySchema;exports.delegatedTokensSchema=i.delegatedTokensSchema;exports.productGroupsSchema=i.productGroupsSchema;exports.stakingPositionSchema=i.stakingPositionSchema;exports.stakingPositionsSchema=i.stakingPositionsSchema;exports.strkDelegatedStakingPositionArraySchema=i.strkDelegatedStakingPositionArraySchema;exports.strkDelegatedStakingPositionSchema=i.strkDelegatedStakingPositionSchema;exports.defiPositionTypeSchema=Pe.defiPositionTypeSchema;exports.airdropSchema=$.airdropSchema;exports.unclaimedRewardsSchema=$.unclaimedRewardsSchema;exports.webBaseTokenSchema=c.webBaseTokenSchema;exports.webBaseTokenWithBalanceSchema=c.webBaseTokenWithBalanceSchema;exports.webTokenInfoDetailsSchema=c.webTokenInfoDetailsSchema;exports.webTokenPriceDetailsSchema=c.webTokenPriceDetailsSchema;exports.webTokenSchema=c.webTokenSchema;exports.webTokenWithBalanceAndPriceSchema=c.webTokenWithBalanceAndPriceSchema;exports.webTokenWithBalanceSchema=c.webTokenWithBalanceSchema;exports.webTokenWithPriceSchema=c.webTokenWithPriceSchema;exports.webTokensWithBalanceAndPriceSchema=c.webTokensWithBalanceAndPriceSchema;exports.isCollateralizedDebtPosition=g.isCollateralizedDebtPosition;exports.isConcentratedLiquidityPosition=g.isConcentratedLiquidityPosition;exports.isDelegatedTokens=g.isDelegatedTokens;exports.isStaking=g.isStaking;exports.isStrkDelegatedStaking=g.isStrkDelegatedStaking;exports.inputAmountSchema=B.inputAmountSchema;exports.isValidInputAmount=B.isValidInputAmount;exports.parseAmount=B.parseAmount;exports.erc20TransferTransaction=_.erc20TransferTransaction;exports.erc721SafeTransferFromTransaction=_.erc721SafeTransferFromTransaction;exports.erc721TransferFromTransaction=_.erc721TransferFromTransaction;exports.getMessageFromTrpcError=X.getMessageFromTrpcError;exports.trpcErrorSchema=X.trpcErrorSchema;exports.FEE_OVERHEAD=V.FEE_OVERHEAD;exports.argentMaxFee=V.argentMaxFee;exports.modifySnjsFeeOverhead=V.modifySnjsFeeOverhead;Object.defineProperty(exports,"ESTIMATE_ERROR_MESSAGES",{enumerable:!0,get:()=>Y.ESTIMATE_ERROR_MESSAGES});exports.EstimateError=Y.EstimateError;exports.transactionReviewTransactionsSchema=Ne.transactionReviewTransactionsSchema;exports.buildDummyTx=r.buildDummyTx;exports.calculateCubeRootAdjustment=r.calculateCubeRootAdjustment;exports.calculateNonLinearAdjustment=r.calculateNonLinearAdjustment;exports.calculateSqrtAdjustment=r.calculateSqrtAdjustment;exports.castFeeEstimation=r.castFeeEstimation;exports.estimatedFeeToMaxFeeTotal=r.estimatedFeeToMaxFeeTotal;exports.estimatedFeeToMaxResourceBounds=r.estimatedFeeToMaxResourceBounds;exports.estimatedFeeToTotal=r.estimatedFeeToTotal;exports.estimatedFeesToMaxFeeTotal=r.estimatedFeesToMaxFeeTotal;exports.estimatedFeesToTotal=r.estimatedFeesToTotal;exports.getEstimatedFeeFromBulkSimulation=r.getEstimatedFeeFromBulkSimulation;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFee=r.getEstimatedFeeFromSimulationAndRespectWatermarkFee;exports.getPayloadFromTransaction=r.getPayloadFromTransaction;exports.getWatermarkedMaxFeeTotal=r.getWatermarkedMaxFeeTotal;exports.isFRI=r.isFRI;exports.isWEI=r.isWEI;exports.multiplyBigIntByFloat=r.multiplyBigIntByFloat;exports.toMax=r.toMax;exports.tokensRequireTxV3Support=r.tokensRequireTxV3Support;exports.unitToFeeTokenAddress=r.unitToFeeTokenAddress;exports.estimatedFeesToMaxFeeTotalV2=d.estimatedFeesToMaxFeeTotalV2;exports.estimatedFeesToTotalV2=d.estimatedFeesToTotalV2;exports.filterPaymasterEstimatedFees=d.filterPaymasterEstimatedFees;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=d.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2;exports.getNativeEstimatedFees=d.getNativeEstimatedFees;exports.getNativeFeeTokenAddress=d.getNativeFeeTokenAddress;exports.getPaymasterFeeFromSimulation=d.getPaymasterFeeFromSimulation;exports.EventsBySelector=Z.EventsBySelector;exports.findTransfersAndApprovals=Z.findTransfersAndApprovals;exports.getPrettyRpcError=Ie.getPrettyRpcError;exports.getAccountTxVersion=p.getAccountTxVersion;exports.getSimulationTxVersionFromFeeToken=p.getSimulationTxVersionFromFeeToken;exports.getTxVersionForDeclareContract=p.getTxVersionForDeclareContract;exports.getTxVersionFromFeeToken=p.getTxVersionFromFeeToken;exports.getTxVersionFromFeeTokenForDeclareContract=p.getTxVersionFromFeeTokenForDeclareContract;exports.TransactionReviewServiceWeb=we.TransactionReviewServiceWeb;exports.transactionReviewWarningSchema=Be.transactionReviewWarningSchema;exports.apiTransactionReviewActivityType=_e.apiTransactionReviewActivityType;exports.denyTxV3=Q.denyTxV3;exports.txVersionSchema=Q.txVersionSchema;exports.classHashSupportsTxV3=J.classHashSupportsTxV3;exports.feeTokenNeedsTxV3Support=J.feeTokenNeedsTxV3Support;exports.formatAddress=Ve.formatAddress;exports.ensureArray=Oe.ensureArray;exports.generateAvatarImage=q.generateAvatarImage;exports.getColor=q.getColor;exports.getNetworkAccountImageUrl=q.getNetworkAccountImageUrl;exports.stripAddressZeroPadding=q.stripAddressZeroPadding;exports.decodeBase58=b.decodeBase58;exports.decodeBase58Array=b.decodeBase58Array;exports.encodeBase58=b.encodeBase58;exports.encodeBase58Array=b.encodeBase58Array;exports.bigNumberSchema=He.bigNumberSchema;exports.daysBetween=Le.daysBetween;exports.isFeatureEnabled=xe.isFeatureEnabled;exports.hexSchema=ee.hexSchema;exports.hexSchemaBase=ee.hexSchemaBase;exports.id=Me.id;exports.getInitials=We.getInitials;exports.isContractDeployed=Ue.isContractDeployed;exports.nonNullable=Ge.nonNullable;exports.isAllowedAddressHexInputValue=ze.isAllowedAddressHexInputValue;exports.isAllowedNumericInputValue=je.isAllowedNumericInputValue;exports.isNumeric=Ke.isNumeric;exports.prettifyCurrencyNumber=f.prettifyCurrencyNumber;exports.prettifyNumber=f.prettifyNumber;exports.prettifyNumberConfig=f.prettifyNumberConfig;exports.prettifyTokenNumber=f.prettifyTokenNumber;exports.abbreviateNumber=$e.abbreviateNumber;exports.getUint256CalldataFromBN=ae.getUint256CalldataFromBN;exports.parseAmountValue=ae.parseAmountValue;exports.pluralise=Xe.pluralise;exports.readFileAsString=Ye.readFileAsString;exports.booleanToStringSchema=R.booleanToStringSchema;exports.createSchemaWithWarnings=R.createSchemaWithWarnings;exports.safeParseAndWarn=R.safeParseAndWarn;exports.stringToBooleanSchema=R.stringToBooleanSchema;exports.addOwnersCalldataSchema=t.addOwnersCalldataSchema;exports.addPluginCalldataSchema=t.addPluginCalldataSchema;exports.bigNumberishSchema=t.bigNumberishSchema;exports.callDetailsSchema=t.callDetailsSchema;exports.callSchema=t.callSchema;exports.calldataSchema=t.calldataSchema;exports.changeGuardianCalldataSchema=t.changeGuardianCalldataSchema;exports.changeThresholdCalldataSchema=t.changeThresholdCalldataSchema;exports.escapeGuardianCalldataSchema=t.escapeGuardianCalldataSchema;exports.executeOnPluginCalldataSchema=t.executeOnPluginCalldataSchema;exports.feltSchema=t.feltSchema;exports.looseCalldataSchema=t.looseCalldataSchema;exports.multiTypeSchema=t.multiTypeSchema;exports.rawArgsArraySchema=t.rawArgsArraySchema;exports.rawArgsObjectSchema=t.rawArgsObjectSchema;exports.rawArgsSchema=t.rawArgsSchema;exports.removeOwnersCalldataSchema=t.removeOwnersCalldataSchema;exports.removePluginCalldataSchema=t.removePluginCalldataSchema;exports.replaceSignerCalldataSchema=t.replaceSignerCalldataSchema;exports.transferCalldataSchema=t.transferCalldataSchema;exports.uint256Schema=t.uint256Schema;exports.abiEntrySchema=a.abiEntrySchema;exports.abiSchema=a.abiSchema;exports.builtinsSchema=a.builtinsSchema;exports.byteCodeSchema=a.byteCodeSchema;exports.cairo1EventSchema=a.cairo1EventSchema;exports.cairoAssemblySchema=a.cairoAssemblySchema;exports.compiledContractClassSchema=a.compiledContractClassSchema;exports.compiledSierraCasmSchema=a.compiledSierraCasmSchema;exports.compiledSierraSchema=a.compiledSierraSchema;exports.compressedProgramSchema=a.compressedProgramSchema;exports.contractEntryPointFieldsSchema=a.contractEntryPointFieldsSchema;exports.entryPointsByTypeSchema=a.entryPointsByTypeSchema;exports.eventAbiSchema=a.eventAbiSchema;exports.eventEntrySchema=a.eventEntrySchema;exports.functionAbiSchema=a.functionAbiSchema;exports.functionAbiTypeSchema=a.functionAbiTypeSchema;exports.legacyContractClassSchema=a.legacyContractClassSchema;exports.legacyEventSchema=a.legacyEventSchema;exports.programSchema=a.programSchema;exports.pythonicHintsSchema=a.pythonicHintsSchema;exports.sierraContractEntryPointFieldsSchema=a.sierraContractEntryPointFieldsSchema;exports.sierraEntryPointsByTypeSchema=a.sierraEntryPointsByTypeSchema;exports.sierraProgramDebugInfoSchema=a.sierraProgramDebugInfoSchema;exports.structAbiSchema=a.structAbiSchema;exports.entryPointToHumanReadable=Ze.entryPointToHumanReadable;exports.urlWithQuery=Qe.urlWithQuery;exports.voidify=Je.voidify;exports.bipsToPercent=ea.bipsToPercent;exports.retryUntilInitialised=aa.retryUntilInitialised;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const te=require("./src/bigdecimal/index.cjs"),re=require("./src/errors/baseErrors.cjs"),ne=require("./src/accountNameGenerator/index.cjs"),N=require("./src/account/account.model.cjs"),R=require("./src/account/accountv4.cjs"),O=require("./src/account/preferences.model.cjs"),T=require("./src/backend/schema.cjs"),k=require("./src/backend/sessionKeys/schema.cjs"),ie=require("./src/cache/CacheService.cjs"),n=require("./src/chains/starknet/address.cjs"),l=require("./src/chains/starknet/addressDomain.cjs"),H=require("./src/chains/starknet/addressInput.cjs"),y=require("./src/chains/starknet/argentName.cjs"),se=require("./src/chains/starknet/cairoVersionSchema.cjs"),d=require("./src/chains/starknet/constants.cjs"),L=require("./src/chains/starknet/getAddressFromArgentName.cjs"),C=require("./src/chains/starknet/getAddressFromStarkName.cjs"),oe=require("./src/chains/starknet/network.cjs"),ce=require("./src/chains/starknet/services/address/StarknetAddressService.cjs"),P=require("./src/chains/starknet/services/deploymentData/constants.cjs"),I=require("./src/chains/starknet/services/deploymentData/deploymentData.schema.cjs"),g=require("./src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs"),S=require("./src/chains/starknet/services/deploymentData/getAccountClassHash.cjs"),E=require("./src/chains/starknet/starknetId.cjs"),me=require("./src/http/DateService.cjs"),Se=require("./src/http/HttpError.cjs"),de=require("./src/http/HttpService.cjs"),le=require("./src/http/IHttpService.cjs"),ue=require("./src/http/SWRService.cjs"),B=require("./src/http/fetcher.cjs"),x=require("./src/http/time.cjs"),he=require("./src/knownDapps/KnownDappsBackendService.cjs"),D=require("./src/knownDapps/schema.cjs"),M=require("./src/knownDapps/utils/getDapplandUrl.cjs"),ge=require("./src/nameResolution/ResolveNameService.cjs"),u=require("./src/nameResolution/schema.cjs"),Ae=require("./src/nfts/BackendNftService.cjs"),W=require("./src/nfts/utils.cjs"),pe=require("./src/onchainRecovery/OnchainRecoveryService.cjs"),c=require("./src/onchainRecovery/schema.cjs"),Te=require("./src/platform/isBraveBrowser.cjs"),h=require("./src/platform/isBrowser.cjs"),ke=require("./src/signer/seedphrase.cjs"),U=require("./src/signer/multisigner.cjs"),ye=require("./src/signer/mergeOwnerGuardianSignatures.cjs"),s=require("./src/staking/schema.cjs"),G=require("./src/storage/utils.cjs"),z=require("./src/storage/base.cjs"),v=require("./src/tokens/balances.cjs"),Ce=require("./src/tokens/constants.cjs"),Ee=require("./src/tokens/convertCurrencyValueToTokenAmount.cjs"),De=require("./src/tokens/convertTokenAmountToCurrencyValue.cjs"),ve=require("./src/tokens/convertTokenUnitAmountWithDecimals.cjs"),Fe=require("./src/tokens/ensureDecimals.cjs"),qe=require("./src/tokens/isUnlimitedAmount.cjs"),be=require("./src/tokens/prettifyCurrencyValue.cjs"),j=require("./src/tokens/prettifyTokenAmount.cjs"),fe=require("./src/tokens/getCurrencySymbol.cjs"),Ne=require("./src/tokens/service/implementation.cjs"),K=require("./src/tokens/service/tokenError.cjs"),e=require("./src/tokens/service/types/backend.model.cjs"),i=require("./src/tokens/service/types/defiPosition.model.cjs"),Re=require("./src/tokens/service/types/defiPositionType.model.cjs"),$=require("./src/tokens/service/types/unclaimedRewards.model.cjs"),m=require("./src/tokens/service/types/webToken.model.cjs"),A=require("./src/tokens/utils.cjs"),w=require("./src/transactions/amount.cjs"),_=require("./src/transactions/buildTransactions.cjs"),X=require("./src/transactions/errors.cjs"),V=require("./src/transactions/estimate/argentMaxFee.cjs"),Y=require("./src/transactions/estimate/error.cjs"),Pe=require("./src/transactions/estimate/model.cjs"),r=require("./src/transactions/estimate/utils.cjs"),o=require("./src/transactions/estimate/utilsV2.cjs"),Z=require("./src/transactions/findTransfersAndApprovals.cjs"),Ie=require("./src/transactions/getPrettyRcpError.cjs"),p=require("./src/transactions/getTransactionVersion.cjs"),Be=require("./src/transactions/service/implementation.cjs"),we=require("./src/transactions/service/types.cjs"),_e=require("./src/transactions/transactionReviewTypes.cjs"),Q=require("./src/transactions/transactionVersion.cjs"),J=require("./src/transactions/txv3.cjs"),Ve=require("./src/utils/address.cjs"),Oe=require("./src/utils/arrays.cjs"),F=require("./src/utils/avatarImage.cjs"),q=require("./src/utils/base58.cjs"),He=require("./src/utils/bigNumber.cjs"),Le=require("./src/utils/daysBetween.cjs"),xe=require("./src/utils/env.cjs"),ee=require("./src/utils/hex.cjs"),Me=require("./src/utils/id.cjs"),We=require("./src/utils/initials.cjs"),Ue=require("./src/utils/isContractDeployed.cjs"),Ge=require("./src/utils/nonNullable.cjs"),ze=require("./src/utils/number/isAllowedAddressHexInputValue.cjs"),je=require("./src/utils/number/isAllowedNumericInputValue.cjs"),Ke=require("./src/utils/number/isNumeric.cjs"),b=require("./src/utils/number/prettifyNumber.cjs"),$e=require("./src/utils/number/abbreviateNumber.cjs"),ae=require("./src/utils/parseAmount.cjs"),Xe=require("./src/utils/pluralise.cjs"),Ye=require("./src/utils/readFileAsString.cjs"),f=require("./src/utils/schemas.cjs"),t=require("./src/utils/starknet/starknet.cjs"),a=require("./src/utils/starknet/starknetSchemas.cjs"),Ze=require("./src/utils/transactions.cjs"),Qe=require("./src/utils/url/urlWithQuery.cjs"),Je=require("./src/utils/voidify.cjs"),ea=require("./src/utils/bips.cjs"),aa=require("./src/utils/retryUntilInitialised.cjs");exports.bigDecimal=te;exports.BaseError=re.BaseError;exports.AccountNameGenerator=ne.AccountNameGenerator;exports.AddSmartAccountResponseSchema=N.AddSmartAccountResponseSchema;exports.AddSmartAcountRequestSchema=N.AddSmartAcountRequestSchema;exports.BackendAccountSchema=N.BackendAccountSchema;exports.isAccountV4=R.isAccountV4;exports.isAccountV5=R.isAccountV5;exports.isAccountV6=R.isAccountV6;exports.preferencesEndpointPayload=O.preferencesEndpointPayload;exports.preferencesSchema=O.preferencesSchema;exports.argentBackendNetworkIdSchema=T.argentBackendNetworkIdSchema;exports.argentNetworkIdSchema=T.argentNetworkIdSchema;exports.isArgentBackendNetworkId=T.isArgentBackendNetworkId;exports.isArgentNetworkId=T.isArgentNetworkId;exports.backendSessionAllowedMethodSchema=k.backendSessionAllowedMethodSchema;exports.backendSessionMetadataSchema=k.backendSessionMetadataSchema;exports.backendSessionSchema=k.backendSessionSchema;exports.backendSessionTxFeeSchema=k.backendSessionTxFeeSchema;exports.CacheService=ie.CacheService;exports.addressOrEmptyUndefinedSchema=n.addressOrEmptyUndefinedSchema;exports.addressSchema=n.addressSchema;exports.addressSchemaArgentBackend=n.addressSchemaArgentBackend;exports.addressSchemaBase=n.addressSchemaBase;exports.addressSchemaLooseLength=n.addressSchemaLooseLength;exports.addressSchemaStrictLength=n.addressSchemaStrictLength;exports.formatFullAddress=n.formatFullAddress;exports.formatTruncatedAddress=n.formatTruncatedAddress;exports.formatTruncatedSignerKey=n.formatTruncatedSignerKey;exports.formatTruncatedString=n.formatTruncatedString;exports.includesAddress=n.includesAddress;exports.isAddress=n.isAddress;exports.isBase58Address=n.isBase58Address;exports.isEqualAddress=n.isEqualAddress;exports.isValidAddress=n.isValidAddress;exports.isZeroAddress=n.isZeroAddress;exports.normalizeAddress=n.normalizeAddress;exports.validChecksumAddressSchema=n.validChecksumAddressSchema;exports.validateAddressRangeSchema=n.validateAddressRangeSchema;exports.addressOrDomainInputSchema=l.addressOrDomainInputSchema;exports.addressOrDomainSchema=l.addressOrDomainSchema;exports.isEqualStarknetDomainName=l.isEqualStarknetDomainName;exports.isStarknetDomainName=l.isStarknetDomainName;exports.normalizeAddressOrDomain=l.normalizeAddressOrDomain;exports.starknetDomainNameSchema=l.starknetDomainNameSchema;exports.addressInputCharactersAndLengthSchema=H.addressInputCharactersAndLengthSchema;exports.addressInputSchema=H.addressInputSchema;exports.argentNameSchema=y.argentNameSchema;exports.isArgentName=y.isArgentName;exports.isEqualArgentName=y.isEqualArgentName;exports.normalizeArgentName=y.normalizeArgentName;exports.cairoVersionSchema=se.cairoVersionSchema;exports.ETH_TOKEN_ADDRESS=d.ETH_TOKEN_ADDRESS;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=d.STANDARD_DEVNET_ACCOUNT_CLASS_HASH;exports.STRK_TOKEN_ADDRESS=d.STRK_TOKEN_ADDRESS;exports.TXV1_ACCOUNT_CLASS_HASH=d.TXV1_ACCOUNT_CLASS_HASH;exports.TXV1_MULTISIG_CLASS_HASH=d.TXV1_MULTISIG_CLASS_HASH;exports.TXV3_ACCOUNT_CLASS_HASH=d.TXV3_ACCOUNT_CLASS_HASH;exports.TXV3_MULTISIG_CLASS_HASH=d.TXV3_MULTISIG_CLASS_HASH;exports.apiWalletResponseSchema=L.apiWalletResponseSchema;exports.getAddressFromArgentName=L.getAddressFromArgentName;exports.getAddressFromStarkName=C.getAddressFromStarkName;exports.getCallFromStarkName=C.getCallFromStarkName;exports.getStarknetIdContractAddressFromNetworkId=C.getStarknetIdContractAddressFromNetworkId;exports.starkNameToCallDataDomain=C.starkNameToCallDataDomain;exports.getChainIdFromNetworkId=oe.getChainIdFromNetworkId;exports.StarknetAddressService=ce.StarknetAddressService;exports.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES=P.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES;exports.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES=P.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES;exports.C0_PROXY_CONTRACT_CLASS_HASHES=P.C0_PROXY_CONTRACT_CLASS_HASHES;exports.constructorCallDataSchemaC0=I.constructorCallDataSchemaC0;exports.constructorCallDataSchemaC1V1=I.constructorCallDataSchemaC1V1;exports.implementationSchema=I.implementationSchema;exports.buildConstructorCalldata=g.buildConstructorCalldata;exports.findImplementationForAccount=g.findImplementationForAccount;exports.getAccountContractAddress=g.getAccountContractAddress;exports.getAccountDeploymentPayload=g.getAccountDeploymentPayload;exports.isEqualImplementation=g.isEqualImplementation;exports.getArgentAccountClassHashes=S.getArgentAccountClassHashes;exports.getArgentAccountClassHashesWithTxV3Support=S.getArgentAccountClassHashesWithTxV3Support;exports.getArgentAccountWithMultiSignerClassHashes=S.getArgentAccountWithMultiSignerClassHashes;exports.getLastCairo0ArgentAccountClassHash=S.getLastCairo0ArgentAccountClassHash;exports.getLatestArgentAccountClassHash=S.getLatestArgentAccountClassHash;exports.getLatestArgentMultisigClassHash=S.getLatestArgentMultisigClassHash;exports.getLatestLedgerAccountClassHash=S.getLatestLedgerAccountClassHash;exports.getLedgerAccountClassHashes=S.getLedgerAccountClassHashes;exports.isEqualStarknetId=E.isEqualStarknetId;exports.isStarknetId=E.isStarknetId;exports.normalizeStarknetId=E.normalizeStarknetId;exports.starknetIdSchema=E.starknetIdSchema;exports.DateService=me.DateService;exports.HttpError=Se.HttpError;exports.HTTPService=de.HTTPService;Object.defineProperty(exports,"HTTP_ERROR_MESSAGE",{enumerable:!0,get:()=>le.HTTP_ERROR_MESSAGE});exports.SWRService=ue.SWRService;exports.fetchData=B.fetchData;exports.fetcherError=B.fetcherError;exports.postData=B.postData;exports.getBackendTimeNowSeconds=x.getBackendTimeNowSeconds;exports.getBackendTimeSeconds=x.getBackendTimeSeconds;exports.KnownDappsBackendService=he.KnownDappsBackendService;exports.dappContractSchema=D.dappContractSchema;exports.dappLinkSchema=D.dappLinkSchema;exports.knownDappSchema=D.knownDappSchema;exports.knownDappsSchema=D.knownDappsSchema;exports.getDapplandLinkForDapp=M.getDapplandLinkForDapp;exports.getDapplandUrlForDapp=M.getDapplandUrlForDapp;exports.ResolveNameService=ge.ResolveNameService;exports.nameProviderResolutionSchema=u.nameProviderResolutionSchema;exports.nameResolutionAddressSchema=u.nameResolutionAddressSchema;exports.nameResolutionAddressesSchema=u.nameResolutionAddressesSchema;exports.nameResolutionStarknetIdSchema=u.nameResolutionStarknetIdSchema;exports.nameResolutionStarknetIdsSchema=u.nameResolutionStarknetIdsSchema;exports.providersNamesSchema=u.providersNamesSchema;exports.BackendNftService=Ae.BackendNftService;exports.equalNft=W.equalNft;exports.getNftPicture=W.getNftPicture;exports.OnchainRecoveryService=pe.OnchainRecoveryService;Object.defineProperty(exports,"RecoveryStatusEnum",{enumerable:!0,get:()=>c.RecoveryStatusEnum});Object.defineProperty(exports,"StartOnchainRecoveryErrorStatusEnum",{enumerable:!0,get:()=>c.StartOnchainRecoveryErrorStatusEnum});exports.activeOnchainRecoverySchema=c.activeOnchainRecoverySchema;exports.onchainRecoverySchema=c.onchainRecoverySchema;exports.recoveryBaseSchema=c.recoveryBaseSchema;exports.recoveryBodySchema=c.recoveryBodySchema;exports.recoveryStatusSchema=c.recoveryStatusSchema;exports.startOnchainRecoveryErrorSchema=c.startOnchainRecoveryErrorSchema;exports.startOnchainRecoveryErrorStatusSchema=c.startOnchainRecoveryErrorStatusSchema;exports.startOnchainRecoverySchema=c.startOnchainRecoverySchema;exports.isBraveBrowser=Te.isBraveBrowser;exports.getUAParserResult=h.getUAParserResult;exports.isBrowser=h.isBrowser;exports.isChromeBrowser=h.isChromeBrowser;exports.isEdgeBrowser=h.isEdgeBrowser;exports.isFirefoxBrowser=h.isFirefoxBrowser;exports.isSafariBrowser=h.isSafariBrowser;exports.seedphraseSchema=ke.seedphraseSchema;Object.defineProperty(exports,"MultiSigner",{enumerable:!0,get:()=>U.MultiSigner});exports.getSignerForMultiSigner=U.getSignerForMultiSigner;exports.mergeOwnerGuardianSignatures=ye.mergeOwnerGuardianSignatures;exports.buildSellOptsSchema=s.buildSellOptsSchema;exports.investmentMetaSchema=s.investmentMetaSchema;exports.investmentSchema=s.investmentSchema;exports.investmentsResponseSchema=s.investmentsResponseSchema;exports.lendingInvestmentSchema=s.lendingInvestmentSchema;exports.liquidStakingInvestmentSchema=s.liquidStakingInvestmentSchema;exports.stakerInfoSchema=s.stakerInfoSchema;exports.stakingActionSchema=s.stakingActionSchema;exports.strkDelegatedStakingInvestmentSchema=s.strkDelegatedStakingInvestmentSchema;exports.strkStakingCalldataResponseSchema=s.strkStakingCalldataResponseSchema;exports.strkStakingCalldataSchema=s.strkStakingCalldataSchema;exports.containsValue=G.containsValue;exports.replaceValueRecursively=G.replaceValueRecursively;exports.mergeArrayStableWith=z.mergeArrayStableWith;exports.optionsWithDefaults=z.optionsWithDefaults;exports.getTokenBalance=v.getTokenBalance;exports.getTokens=v.getTokens;exports.getTokensBalances=v.getTokensBalances;exports.useToken=v.useToken;exports.DEFAULT_TOKEN_DECIMALS=Ce.DEFAULT_TOKEN_DECIMALS;exports.convertCurrencyValueToTokenAmount=Ee.convertCurrencyValueToTokenAmount;exports.convertTokenAmountToCurrencyValue=De.convertTokenAmountToCurrencyValue;exports.convertTokenUnitAmountWithDecimals=ve.convertTokenUnitAmountWithDecimals;exports.ensureDecimals=Fe.ensureDecimals;exports.isUnlimitedAmount=qe.isUnlimitedAmount;exports.prettifyCurrencyValue=be.prettifyCurrencyValue;exports.PRETTY_UNLIMITED=j.PRETTY_UNLIMITED;exports.prettifyTokenAmount=j.prettifyTokenAmount;exports.getCurrencySymbol=fe.getCurrencySymbol;exports.TokenServiceWeb=Ne.TokenServiceWeb;Object.defineProperty(exports,"TOKEN_ERROR_MESSAGES",{enumerable:!0,get:()=>K.TOKEN_ERROR_MESSAGES});exports.TokenError=K.TokenError;exports.apiAccountTokenBalancesSchema=e.apiAccountTokenBalancesSchema;exports.apiAirdropSchema=e.apiAirdropSchema;exports.apiCollateralizedDebtPositionSchema=e.apiCollateralizedDebtPositionSchema;exports.apiCollateralizedDebtPositionsSchema=e.apiCollateralizedDebtPositionsSchema;exports.apiConcentratedLiquidityPositionSchema=e.apiConcentratedLiquidityPositionSchema;exports.apiConcentratedLiquidityPositionsSchema=e.apiConcentratedLiquidityPositionsSchema;exports.apiDefiDecompositionProduct=e.apiDefiDecompositionProduct;exports.apiDefiDecompositionProducts=e.apiDefiDecompositionProducts;exports.apiDefiDecompositionSchema=e.apiDefiDecompositionSchema;exports.apiDefiDecompositionToken=e.apiDefiDecompositionToken;exports.apiDefiPositionSchema=e.apiDefiPositionSchema;exports.apiDefiPositionsSchema=e.apiDefiPositionsSchema;exports.apiDelegatedTokensArraySchema=e.apiDelegatedTokensArraySchema;exports.apiDelegatedTokensSchema=e.apiDelegatedTokensSchema;exports.apiPriceDataResponseSchema=e.apiPriceDataResponseSchema;exports.apiPriceDetailsSchema=e.apiPriceDetailsSchema;exports.apiStakingPositionSchema=e.apiStakingPositionSchema;exports.apiStakingPositionsSchema=e.apiStakingPositionsSchema;exports.apiStrkDelegatedStakingPositionsSchema=e.apiStrkDelegatedStakingPositionsSchema;exports.apiStrkDelegatedStakingSchema=e.apiStrkDelegatedStakingSchema;exports.apiTokenInfoResponseSchema=e.apiTokenInfoResponseSchema;exports.apiTokenInfoSchema=e.apiTokenInfoSchema;exports.apiTokensInfoResponseSchema=e.apiTokensInfoResponseSchema;exports.apiUnclaimedRewardsSchema=e.apiUnclaimedRewardsSchema;exports.collateralizedDebtGroupSchema=i.collateralizedDebtGroupSchema;exports.collateralizedDebtPositionSchema=i.collateralizedDebtPositionSchema;exports.collateralizedDebtPositionsSchema=i.collateralizedDebtPositionsSchema;exports.concentratedLiquidityPositionSchema=i.concentratedLiquidityPositionSchema;exports.concentratedLiquidityPositionsSchema=i.concentratedLiquidityPositionsSchema;exports.defiDappsProductsSchema=i.defiDappsProductsSchema;exports.defiPositionSchema=i.defiPositionSchema;exports.defiProductSchema=i.defiProductSchema;exports.defiProductsSchema=i.defiProductsSchema;exports.delegatedTokensArraySchema=i.delegatedTokensArraySchema;exports.delegatedTokensSchema=i.delegatedTokensSchema;exports.productGroupsSchema=i.productGroupsSchema;exports.stakingPositionSchema=i.stakingPositionSchema;exports.stakingPositionsSchema=i.stakingPositionsSchema;exports.strkDelegatedStakingPositionArraySchema=i.strkDelegatedStakingPositionArraySchema;exports.strkDelegatedStakingPositionSchema=i.strkDelegatedStakingPositionSchema;exports.defiPositionTypeSchema=Re.defiPositionTypeSchema;exports.airdropSchema=$.airdropSchema;exports.unclaimedRewardsSchema=$.unclaimedRewardsSchema;exports.webBaseTokenSchema=m.webBaseTokenSchema;exports.webBaseTokenWithBalanceSchema=m.webBaseTokenWithBalanceSchema;exports.webTokenInfoDetailsSchema=m.webTokenInfoDetailsSchema;exports.webTokenPriceDetailsSchema=m.webTokenPriceDetailsSchema;exports.webTokenSchema=m.webTokenSchema;exports.webTokenWithBalanceAndPriceSchema=m.webTokenWithBalanceAndPriceSchema;exports.webTokenWithBalanceSchema=m.webTokenWithBalanceSchema;exports.webTokenWithPriceSchema=m.webTokenWithPriceSchema;exports.webTokensWithBalanceAndPriceSchema=m.webTokensWithBalanceAndPriceSchema;exports.isCollateralizedDebtPosition=A.isCollateralizedDebtPosition;exports.isConcentratedLiquidityPosition=A.isConcentratedLiquidityPosition;exports.isDelegatedTokens=A.isDelegatedTokens;exports.isStaking=A.isStaking;exports.isStrkDelegatedStaking=A.isStrkDelegatedStaking;exports.inputAmountSchema=w.inputAmountSchema;exports.isValidInputAmount=w.isValidInputAmount;exports.parseAmount=w.parseAmount;exports.erc20TransferTransaction=_.erc20TransferTransaction;exports.erc721SafeTransferFromTransaction=_.erc721SafeTransferFromTransaction;exports.erc721TransferFromTransaction=_.erc721TransferFromTransaction;exports.getMessageFromTrpcError=X.getMessageFromTrpcError;exports.trpcErrorSchema=X.trpcErrorSchema;exports.FEE_OVERHEAD=V.FEE_OVERHEAD;exports.argentMaxFee=V.argentMaxFee;exports.modifySnjsFeeOverhead=V.modifySnjsFeeOverhead;Object.defineProperty(exports,"ESTIMATE_ERROR_MESSAGES",{enumerable:!0,get:()=>Y.ESTIMATE_ERROR_MESSAGES});exports.EstimateError=Y.EstimateError;exports.transactionReviewTransactionsSchema=Pe.transactionReviewTransactionsSchema;exports.buildDummyTx=r.buildDummyTx;exports.calculateCubeRootAdjustment=r.calculateCubeRootAdjustment;exports.calculateNonLinearAdjustment=r.calculateNonLinearAdjustment;exports.calculateSqrtAdjustment=r.calculateSqrtAdjustment;exports.castFeeEstimation=r.castFeeEstimation;exports.estimatedFeeToMaxFeeTotal=r.estimatedFeeToMaxFeeTotal;exports.estimatedFeeToMaxResourceBounds=r.estimatedFeeToMaxResourceBounds;exports.estimatedFeeToTotal=r.estimatedFeeToTotal;exports.estimatedFeesToMaxFeeTotal=r.estimatedFeesToMaxFeeTotal;exports.estimatedFeesToTotal=r.estimatedFeesToTotal;exports.getEstimatedFeeFromBulkSimulation=r.getEstimatedFeeFromBulkSimulation;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFee=r.getEstimatedFeeFromSimulationAndRespectWatermarkFee;exports.getPayloadFromTransaction=r.getPayloadFromTransaction;exports.getWatermarkedMaxFeeTotal=r.getWatermarkedMaxFeeTotal;exports.isFRI=r.isFRI;exports.isWEI=r.isWEI;exports.multiplyBigIntByFloat=r.multiplyBigIntByFloat;exports.toMax=r.toMax;exports.tokensRequireTxV3Support=r.tokensRequireTxV3Support;exports.unitToFeeTokenAddress=r.unitToFeeTokenAddress;exports.estimatedFeesToMaxFeeTotalV2=o.estimatedFeesToMaxFeeTotalV2;exports.estimatedFeesToTotalV2=o.estimatedFeesToTotalV2;exports.filterPaymasterEstimatedFees=o.filterPaymasterEstimatedFees;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=o.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2;exports.getNativeEstimatedFeeByFeeToken=o.getNativeEstimatedFeeByFeeToken;exports.getNativeEstimatedFeeByTxVersion=o.getNativeEstimatedFeeByTxVersion;exports.getNativeEstimatedFeeForAccount=o.getNativeEstimatedFeeForAccount;exports.getNativeEstimatedFees=o.getNativeEstimatedFees;exports.getNativeFeeFromSimulation=o.getNativeFeeFromSimulation;exports.getNativeFeeTokenAddress=o.getNativeFeeTokenAddress;exports.getPaymasterFeeFromSimulation=o.getPaymasterFeeFromSimulation;exports.EventsBySelector=Z.EventsBySelector;exports.findTransfersAndApprovals=Z.findTransfersAndApprovals;exports.getPrettyRpcError=Ie.getPrettyRpcError;exports.getAccountTxVersion=p.getAccountTxVersion;exports.getSimulationTxVersionFromFeeToken=p.getSimulationTxVersionFromFeeToken;exports.getTxVersionForDeclareContract=p.getTxVersionForDeclareContract;exports.getTxVersionFromFeeToken=p.getTxVersionFromFeeToken;exports.getTxVersionFromFeeTokenForDeclareContract=p.getTxVersionFromFeeTokenForDeclareContract;exports.TransactionReviewServiceWeb=Be.TransactionReviewServiceWeb;exports.transactionReviewWarningSchema=we.transactionReviewWarningSchema;exports.apiTransactionReviewActivityType=_e.apiTransactionReviewActivityType;exports.denyTxV3=Q.denyTxV3;exports.txVersionSchema=Q.txVersionSchema;exports.classHashSupportsTxV3=J.classHashSupportsTxV3;exports.feeTokenNeedsTxV3Support=J.feeTokenNeedsTxV3Support;exports.formatAddress=Ve.formatAddress;exports.ensureArray=Oe.ensureArray;exports.generateAvatarImage=F.generateAvatarImage;exports.getColor=F.getColor;exports.getNetworkAccountImageUrl=F.getNetworkAccountImageUrl;exports.stripAddressZeroPadding=F.stripAddressZeroPadding;exports.decodeBase58=q.decodeBase58;exports.decodeBase58Array=q.decodeBase58Array;exports.encodeBase58=q.encodeBase58;exports.encodeBase58Array=q.encodeBase58Array;exports.bigNumberSchema=He.bigNumberSchema;exports.daysBetween=Le.daysBetween;exports.isFeatureEnabled=xe.isFeatureEnabled;exports.hexSchema=ee.hexSchema;exports.hexSchemaBase=ee.hexSchemaBase;exports.id=Me.id;exports.getInitials=We.getInitials;exports.isContractDeployed=Ue.isContractDeployed;exports.nonNullable=Ge.nonNullable;exports.isAllowedAddressHexInputValue=ze.isAllowedAddressHexInputValue;exports.isAllowedNumericInputValue=je.isAllowedNumericInputValue;exports.isNumeric=Ke.isNumeric;exports.prettifyCurrencyNumber=b.prettifyCurrencyNumber;exports.prettifyNumber=b.prettifyNumber;exports.prettifyNumberConfig=b.prettifyNumberConfig;exports.prettifyTokenNumber=b.prettifyTokenNumber;exports.abbreviateNumber=$e.abbreviateNumber;exports.getUint256CalldataFromBN=ae.getUint256CalldataFromBN;exports.parseAmountValue=ae.parseAmountValue;exports.pluralise=Xe.pluralise;exports.readFileAsString=Ye.readFileAsString;exports.booleanToStringSchema=f.booleanToStringSchema;exports.createSchemaWithWarnings=f.createSchemaWithWarnings;exports.safeParseAndWarn=f.safeParseAndWarn;exports.stringToBooleanSchema=f.stringToBooleanSchema;exports.addOwnersCalldataSchema=t.addOwnersCalldataSchema;exports.addPluginCalldataSchema=t.addPluginCalldataSchema;exports.bigNumberishSchema=t.bigNumberishSchema;exports.callDetailsSchema=t.callDetailsSchema;exports.callSchema=t.callSchema;exports.calldataSchema=t.calldataSchema;exports.changeGuardianCalldataSchema=t.changeGuardianCalldataSchema;exports.changeThresholdCalldataSchema=t.changeThresholdCalldataSchema;exports.escapeGuardianCalldataSchema=t.escapeGuardianCalldataSchema;exports.executeOnPluginCalldataSchema=t.executeOnPluginCalldataSchema;exports.feltSchema=t.feltSchema;exports.looseCalldataSchema=t.looseCalldataSchema;exports.multiTypeSchema=t.multiTypeSchema;exports.rawArgsArraySchema=t.rawArgsArraySchema;exports.rawArgsObjectSchema=t.rawArgsObjectSchema;exports.rawArgsSchema=t.rawArgsSchema;exports.removeOwnersCalldataSchema=t.removeOwnersCalldataSchema;exports.removePluginCalldataSchema=t.removePluginCalldataSchema;exports.replaceSignerCalldataSchema=t.replaceSignerCalldataSchema;exports.transferCalldataSchema=t.transferCalldataSchema;exports.uint256Schema=t.uint256Schema;exports.abiEntrySchema=a.abiEntrySchema;exports.abiSchema=a.abiSchema;exports.builtinsSchema=a.builtinsSchema;exports.byteCodeSchema=a.byteCodeSchema;exports.cairo1EventSchema=a.cairo1EventSchema;exports.cairoAssemblySchema=a.cairoAssemblySchema;exports.compiledContractClassSchema=a.compiledContractClassSchema;exports.compiledSierraCasmSchema=a.compiledSierraCasmSchema;exports.compiledSierraSchema=a.compiledSierraSchema;exports.compressedProgramSchema=a.compressedProgramSchema;exports.contractEntryPointFieldsSchema=a.contractEntryPointFieldsSchema;exports.entryPointsByTypeSchema=a.entryPointsByTypeSchema;exports.eventAbiSchema=a.eventAbiSchema;exports.eventEntrySchema=a.eventEntrySchema;exports.functionAbiSchema=a.functionAbiSchema;exports.functionAbiTypeSchema=a.functionAbiTypeSchema;exports.legacyContractClassSchema=a.legacyContractClassSchema;exports.legacyEventSchema=a.legacyEventSchema;exports.programSchema=a.programSchema;exports.pythonicHintsSchema=a.pythonicHintsSchema;exports.sierraContractEntryPointFieldsSchema=a.sierraContractEntryPointFieldsSchema;exports.sierraEntryPointsByTypeSchema=a.sierraEntryPointsByTypeSchema;exports.sierraProgramDebugInfoSchema=a.sierraProgramDebugInfoSchema;exports.structAbiSchema=a.structAbiSchema;exports.entryPointToHumanReadable=Ze.entryPointToHumanReadable;exports.urlWithQuery=Qe.urlWithQuery;exports.voidify=Je.voidify;exports.bipsToPercent=ea.bipsToPercent;exports.retryUntilInitialised=aa.retryUntilInitialised;
package/dist/index.js CHANGED
@@ -5,17 +5,17 @@ import { AddSmartAccountResponseSchema as i, AddSmartAcountRequestSchema as s, B
5
5
  import { isAccountV4 as d, isAccountV5 as p, isAccountV6 as l } from "./src/account/accountv4.js";
6
6
  import { preferencesEndpointPayload as f, preferencesSchema as u } from "./src/account/preferences.model.js";
7
7
  import { argentBackendNetworkIdSchema as g, argentNetworkIdSchema as x, isArgentBackendNetworkId as T, isArgentNetworkId as k } from "./src/backend/schema.js";
8
- import { backendSessionAllowedMethodSchema as y, backendSessionMetadataSchema as D, backendSessionSchema as E, backendSessionTxFeeSchema as F } from "./src/backend/sessionKeys/schema.js";
9
- import { CacheService as v } from "./src/cache/CacheService.js";
10
- import { addressOrEmptyUndefinedSchema as N, addressSchema as b, addressSchemaArgentBackend as I, addressSchemaBase as B, addressSchemaLooseLength as w, addressSchemaStrictLength as _, formatFullAddress as V, formatTruncatedAddress as H, formatTruncatedSignerKey as O, formatTruncatedString as L, includesAddress as M, isAddress as W, isBase58Address as U, isEqualAddress as q, isValidAddress as G, isZeroAddress as z, normalizeAddress as K, validChecksumAddressSchema as j, validateAddressRangeSchema as X } from "./src/chains/starknet/address.js";
8
+ import { backendSessionAllowedMethodSchema as y, backendSessionMetadataSchema as E, backendSessionSchema as D, backendSessionTxFeeSchema as F } from "./src/backend/sessionKeys/schema.js";
9
+ import { CacheService as R } from "./src/cache/CacheService.js";
10
+ import { addressOrEmptyUndefinedSchema as P, addressSchema as b, addressSchemaArgentBackend as I, addressSchemaBase as B, addressSchemaLooseLength as w, addressSchemaStrictLength as _, formatFullAddress as V, formatTruncatedAddress as H, formatTruncatedSignerKey as O, formatTruncatedString as L, includesAddress as M, isAddress as W, isBase58Address as U, isEqualAddress as q, isValidAddress as G, isZeroAddress as z, normalizeAddress as K, validChecksumAddressSchema as j, validateAddressRangeSchema as X } from "./src/chains/starknet/address.js";
11
11
  import { addressOrDomainInputSchema as Z, addressOrDomainSchema as Q, isEqualStarknetDomainName as J, isStarknetDomainName as $, normalizeAddressOrDomain as ee, starknetDomainNameSchema as ae } from "./src/chains/starknet/addressDomain.js";
12
12
  import { addressInputCharactersAndLengthSchema as te, addressInputSchema as oe } from "./src/chains/starknet/addressInput.js";
13
13
  import { argentNameSchema as me, isArgentName as ie, isEqualArgentName as se, normalizeArgentName as ce } from "./src/chains/starknet/argentName.js";
14
14
  import { cairoVersionSchema as de } from "./src/chains/starknet/cairoVersionSchema.js";
15
15
  import { ETH_TOKEN_ADDRESS as le, STANDARD_DEVNET_ACCOUNT_CLASS_HASH as he, STRK_TOKEN_ADDRESS as fe, TXV1_ACCOUNT_CLASS_HASH as ue, TXV1_MULTISIG_CLASS_HASH as Ae, TXV3_ACCOUNT_CLASS_HASH as ge, TXV3_MULTISIG_CLASS_HASH as xe } from "./src/chains/starknet/constants.js";
16
16
  import { apiWalletResponseSchema as ke, getAddressFromArgentName as Ce } from "./src/chains/starknet/getAddressFromArgentName.js";
17
- import { getAddressFromStarkName as De, getCallFromStarkName as Ee, getStarknetIdContractAddressFromNetworkId as Fe, starkNameToCallDataDomain as Re } from "./src/chains/starknet/getAddressFromStarkName.js";
18
- import { getChainIdFromNetworkId as Pe } from "./src/chains/starknet/network.js";
17
+ import { getAddressFromStarkName as Ee, getCallFromStarkName as De, getStarknetIdContractAddressFromNetworkId as Fe, starkNameToCallDataDomain as ve } from "./src/chains/starknet/getAddressFromStarkName.js";
18
+ import { getChainIdFromNetworkId as Ne } from "./src/chains/starknet/network.js";
19
19
  import { StarknetAddressService as be } from "./src/chains/starknet/services/address/StarknetAddressService.js";
20
20
  import { ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES as Be, ARGENT_MULTISIG_CONTRACT_CLASS_HASHES as we, C0_PROXY_CONTRACT_CLASS_HASHES as _e } from "./src/chains/starknet/services/deploymentData/constants.js";
21
21
  import { constructorCallDataSchemaC0 as He, constructorCallDataSchemaC1V1 as Oe, implementationSchema as Le } from "./src/chains/starknet/services/deploymentData/deploymentData.schema.js";
@@ -29,8 +29,8 @@ import { HTTP_ERROR_MESSAGE as la } from "./src/http/IHttpService.js";
29
29
  import { SWRService as fa } from "./src/http/SWRService.js";
30
30
  import { fetchData as Aa, fetcherError as ga, postData as xa } from "./src/http/fetcher.js";
31
31
  import { getBackendTimeNowSeconds as ka, getBackendTimeSeconds as Ca } from "./src/http/time.js";
32
- import { KnownDappsBackendService as Da } from "./src/knownDapps/KnownDappsBackendService.js";
33
- import { dappContractSchema as Fa, dappLinkSchema as Ra, knownDappSchema as va, knownDappsSchema as Pa } from "./src/knownDapps/schema.js";
32
+ import { KnownDappsBackendService as Ea } from "./src/knownDapps/KnownDappsBackendService.js";
33
+ import { dappContractSchema as Fa, dappLinkSchema as va, knownDappSchema as Ra, knownDappsSchema as Na } from "./src/knownDapps/schema.js";
34
34
  import { getDapplandLinkForDapp as ba, getDapplandUrlForDapp as Ia } from "./src/knownDapps/utils/getDapplandUrl.js";
35
35
  import { ResolveNameService as wa } from "./src/nameResolution/ResolveNameService.js";
36
36
  import { nameProviderResolutionSchema as Va, nameResolutionAddressSchema as Ha, nameResolutionAddressesSchema as Oa, nameResolutionStarknetIdSchema as La, nameResolutionStarknetIdsSchema as Ma, providersNamesSchema as Wa } from "./src/nameResolution/schema.js";
@@ -43,7 +43,7 @@ import { getUAParserResult as cr, isBrowser as Sr, isChromeBrowser as dr, isEdge
43
43
  import { seedphraseSchema as ur } from "./src/signer/seedphrase.js";
44
44
  import { MultiSigner as gr, getSignerForMultiSigner as xr } from "./src/signer/multisigner.js";
45
45
  import { mergeOwnerGuardianSignatures as kr } from "./src/signer/mergeOwnerGuardianSignatures.js";
46
- import { buildSellOptsSchema as yr, investmentMetaSchema as Dr, investmentSchema as Er, investmentsResponseSchema as Fr, lendingInvestmentSchema as Rr, liquidStakingInvestmentSchema as vr, stakerInfoSchema as Pr, stakingActionSchema as Nr, strkDelegatedStakingInvestmentSchema as br, strkStakingCalldataResponseSchema as Ir, strkStakingCalldataSchema as Br } from "./src/staking/schema.js";
46
+ import { buildSellOptsSchema as yr, investmentMetaSchema as Er, investmentSchema as Dr, investmentsResponseSchema as Fr, lendingInvestmentSchema as vr, liquidStakingInvestmentSchema as Rr, stakerInfoSchema as Nr, stakingActionSchema as Pr, strkDelegatedStakingInvestmentSchema as br, strkStakingCalldataResponseSchema as Ir, strkStakingCalldataSchema as Br } from "./src/staking/schema.js";
47
47
  import { containsValue as _r, replaceValueRecursively as Vr } from "./src/storage/utils.js";
48
48
  import { mergeArrayStableWith as Or, optionsWithDefaults as Lr } from "./src/storage/base.js";
49
49
  import { getTokenBalance as Wr, getTokens as Ur, getTokensBalances as qr, useToken as Gr } from "./src/tokens/balances.js";
@@ -58,56 +58,56 @@ import { PRETTY_UNLIMITED as mt, prettifyTokenAmount as it } from "./src/tokens/
58
58
  import { getCurrencySymbol as ct } from "./src/tokens/getCurrencySymbol.js";
59
59
  import { TokenServiceWeb as dt } from "./src/tokens/service/implementation.js";
60
60
  import { TOKEN_ERROR_MESSAGES as lt, TokenError as ht } from "./src/tokens/service/tokenError.js";
61
- import { apiAccountTokenBalancesSchema as ut, apiAirdropSchema as At, apiCollateralizedDebtPositionSchema as gt, apiCollateralizedDebtPositionsSchema as xt, apiConcentratedLiquidityPositionSchema as Tt, apiConcentratedLiquidityPositionsSchema as kt, apiDefiDecompositionProduct as Ct, apiDefiDecompositionProducts as yt, apiDefiDecompositionSchema as Dt, apiDefiDecompositionToken as Et, apiDefiPositionSchema as Ft, apiDefiPositionsSchema as Rt, apiDelegatedTokensArraySchema as vt, apiDelegatedTokensSchema as Pt, apiPriceDataResponseSchema as Nt, apiPriceDetailsSchema as bt, apiStakingPositionSchema as It, apiStakingPositionsSchema as Bt, apiStrkDelegatedStakingPositionsSchema as wt, apiStrkDelegatedStakingSchema as _t, apiTokenInfoResponseSchema as Vt, apiTokenInfoSchema as Ht, apiTokensInfoResponseSchema as Ot, apiUnclaimedRewardsSchema as Lt } from "./src/tokens/service/types/backend.model.js";
61
+ import { apiAccountTokenBalancesSchema as ut, apiAirdropSchema as At, apiCollateralizedDebtPositionSchema as gt, apiCollateralizedDebtPositionsSchema as xt, apiConcentratedLiquidityPositionSchema as Tt, apiConcentratedLiquidityPositionsSchema as kt, apiDefiDecompositionProduct as Ct, apiDefiDecompositionProducts as yt, apiDefiDecompositionSchema as Et, apiDefiDecompositionToken as Dt, apiDefiPositionSchema as Ft, apiDefiPositionsSchema as vt, apiDelegatedTokensArraySchema as Rt, apiDelegatedTokensSchema as Nt, apiPriceDataResponseSchema as Pt, apiPriceDetailsSchema as bt, apiStakingPositionSchema as It, apiStakingPositionsSchema as Bt, apiStrkDelegatedStakingPositionsSchema as wt, apiStrkDelegatedStakingSchema as _t, apiTokenInfoResponseSchema as Vt, apiTokenInfoSchema as Ht, apiTokensInfoResponseSchema as Ot, apiUnclaimedRewardsSchema as Lt } from "./src/tokens/service/types/backend.model.js";
62
62
  import { collateralizedDebtGroupSchema as Wt, collateralizedDebtPositionSchema as Ut, collateralizedDebtPositionsSchema as qt, concentratedLiquidityPositionSchema as Gt, concentratedLiquidityPositionsSchema as zt, defiDappsProductsSchema as Kt, defiPositionSchema as jt, defiProductSchema as Xt, defiProductsSchema as Yt, delegatedTokensArraySchema as Zt, delegatedTokensSchema as Qt, productGroupsSchema as Jt, stakingPositionSchema as $t, stakingPositionsSchema as eo, strkDelegatedStakingPositionArraySchema as ao, strkDelegatedStakingPositionSchema as ro } from "./src/tokens/service/types/defiPosition.model.js";
63
63
  import { defiPositionTypeSchema as oo } from "./src/tokens/service/types/defiPositionType.model.js";
64
64
  import { airdropSchema as mo, unclaimedRewardsSchema as io } from "./src/tokens/service/types/unclaimedRewards.model.js";
65
65
  import { webBaseTokenSchema as co, webBaseTokenWithBalanceSchema as So, webTokenInfoDetailsSchema as po, webTokenPriceDetailsSchema as lo, webTokenSchema as ho, webTokenWithBalanceAndPriceSchema as fo, webTokenWithBalanceSchema as uo, webTokenWithPriceSchema as Ao, webTokensWithBalanceAndPriceSchema as go } from "./src/tokens/service/types/webToken.model.js";
66
- import { isCollateralizedDebtPosition as To, isConcentratedLiquidityPosition as ko, isDelegatedTokens as Co, isStaking as yo, isStrkDelegatedStaking as Do } from "./src/tokens/utils.js";
67
- import { inputAmountSchema as Fo, isValidInputAmount as Ro, parseAmount as vo } from "./src/transactions/amount.js";
68
- import { erc20TransferTransaction as No, erc721SafeTransferFromTransaction as bo, erc721TransferFromTransaction as Io } from "./src/transactions/buildTransactions.js";
66
+ import { isCollateralizedDebtPosition as To, isConcentratedLiquidityPosition as ko, isDelegatedTokens as Co, isStaking as yo, isStrkDelegatedStaking as Eo } from "./src/tokens/utils.js";
67
+ import { inputAmountSchema as Fo, isValidInputAmount as vo, parseAmount as Ro } from "./src/transactions/amount.js";
68
+ import { erc20TransferTransaction as Po, erc721SafeTransferFromTransaction as bo, erc721TransferFromTransaction as Io } from "./src/transactions/buildTransactions.js";
69
69
  import { getMessageFromTrpcError as wo, trpcErrorSchema as _o } from "./src/transactions/errors.js";
70
70
  import { FEE_OVERHEAD as Ho, argentMaxFee as Oo, modifySnjsFeeOverhead as Lo } from "./src/transactions/estimate/argentMaxFee.js";
71
71
  import { ESTIMATE_ERROR_MESSAGES as Wo, EstimateError as Uo } from "./src/transactions/estimate/error.js";
72
72
  import { transactionReviewTransactionsSchema as Go } from "./src/transactions/estimate/model.js";
73
73
  import { buildDummyTx as Ko, calculateCubeRootAdjustment as jo, calculateNonLinearAdjustment as Xo, calculateSqrtAdjustment as Yo, castFeeEstimation as Zo, estimatedFeeToMaxFeeTotal as Qo, estimatedFeeToMaxResourceBounds as Jo, estimatedFeeToTotal as $o, estimatedFeesToMaxFeeTotal as en, estimatedFeesToTotal as an, getEstimatedFeeFromBulkSimulation as rn, getEstimatedFeeFromSimulationAndRespectWatermarkFee as tn, getPayloadFromTransaction as on, getWatermarkedMaxFeeTotal as nn, isFRI as mn, isWEI as sn, multiplyBigIntByFloat as cn, toMax as Sn, tokensRequireTxV3Support as dn, unitToFeeTokenAddress as pn } from "./src/transactions/estimate/utils.js";
74
- import { estimatedFeesToMaxFeeTotalV2 as hn, estimatedFeesToTotalV2 as fn, filterPaymasterEstimatedFees as un, getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2 as An, getNativeEstimatedFees as gn, getNativeFeeTokenAddress as xn, getPaymasterFeeFromSimulation as Tn } from "./src/transactions/estimate/utilsV2.js";
75
- import { EventsBySelector as Cn, findTransfersAndApprovals as yn } from "./src/transactions/findTransfersAndApprovals.js";
76
- import { getPrettyRpcError as En } from "./src/transactions/getPrettyRcpError.js";
77
- import { getAccountTxVersion as Rn, getSimulationTxVersionFromFeeToken as vn, getTxVersionForDeclareContract as Pn, getTxVersionFromFeeToken as Nn, getTxVersionFromFeeTokenForDeclareContract as bn } from "./src/transactions/getTransactionVersion.js";
78
- import { TransactionReviewServiceWeb as Bn } from "./src/transactions/service/implementation.js";
79
- import { transactionReviewWarningSchema as _n } from "./src/transactions/service/types.js";
80
- import { apiTransactionReviewActivityType as Hn } from "./src/transactions/transactionReviewTypes.js";
81
- import { denyTxV3 as Ln, txVersionSchema as Mn } from "./src/transactions/transactionVersion.js";
82
- import { classHashSupportsTxV3 as Un, feeTokenNeedsTxV3Support as qn } from "./src/transactions/txv3.js";
83
- import { formatAddress as zn } from "./src/utils/address.js";
84
- import { ensureArray as jn } from "./src/utils/arrays.js";
85
- import { generateAvatarImage as Yn, getColor as Zn, getNetworkAccountImageUrl as Qn, stripAddressZeroPadding as Jn } from "./src/utils/avatarImage.js";
86
- import { decodeBase58 as em, decodeBase58Array as am, encodeBase58 as rm, encodeBase58Array as tm } from "./src/utils/base58.js";
87
- import { bigNumberSchema as nm } from "./src/utils/bigNumber.js";
88
- import { daysBetween as im } from "./src/utils/daysBetween.js";
89
- import { isFeatureEnabled as cm } from "./src/utils/env.js";
90
- import { hexSchema as dm, hexSchemaBase as pm } from "./src/utils/hex.js";
91
- import { id as hm } from "./src/utils/id.js";
92
- import { getInitials as um } from "./src/utils/initials.js";
93
- import { isContractDeployed as gm } from "./src/utils/isContractDeployed.js";
94
- import { nonNullable as Tm } from "./src/utils/nonNullable.js";
95
- import { isAllowedAddressHexInputValue as Cm } from "./src/utils/number/isAllowedAddressHexInputValue.js";
96
- import { isAllowedNumericInputValue as Dm } from "./src/utils/number/isAllowedNumericInputValue.js";
97
- import { isNumeric as Fm } from "./src/utils/number/isNumeric.js";
98
- import { prettifyCurrencyNumber as vm, prettifyNumber as Pm, prettifyNumberConfig as Nm, prettifyTokenNumber as bm } from "./src/utils/number/prettifyNumber.js";
99
- import { abbreviateNumber as Bm } from "./src/utils/number/abbreviateNumber.js";
100
- import { getUint256CalldataFromBN as _m, parseAmountValue as Vm } from "./src/utils/parseAmount.js";
101
- import { pluralise as Om } from "./src/utils/pluralise.js";
102
- import { readFileAsString as Mm } from "./src/utils/readFileAsString.js";
103
- import { booleanToStringSchema as Um, createSchemaWithWarnings as qm, safeParseAndWarn as Gm, stringToBooleanSchema as zm } from "./src/utils/schemas.js";
104
- import { addOwnersCalldataSchema as jm, addPluginCalldataSchema as Xm, bigNumberishSchema as Ym, callDetailsSchema as Zm, callSchema as Qm, calldataSchema as Jm, changeGuardianCalldataSchema as $m, changeThresholdCalldataSchema as ei, escapeGuardianCalldataSchema as ai, executeOnPluginCalldataSchema as ri, feltSchema as ti, looseCalldataSchema as oi, multiTypeSchema as ni, rawArgsArraySchema as mi, rawArgsObjectSchema as ii, rawArgsSchema as si, removeOwnersCalldataSchema as ci, removePluginCalldataSchema as Si, replaceSignerCalldataSchema as di, transferCalldataSchema as pi, uint256Schema as li } from "./src/utils/starknet/starknet.js";
105
- import { abiEntrySchema as fi, abiSchema as ui, builtinsSchema as Ai, byteCodeSchema as gi, cairo1EventSchema as xi, cairoAssemblySchema as Ti, compiledContractClassSchema as ki, compiledSierraCasmSchema as Ci, compiledSierraSchema as yi, compressedProgramSchema as Di, contractEntryPointFieldsSchema as Ei, entryPointsByTypeSchema as Fi, eventAbiSchema as Ri, eventEntrySchema as vi, functionAbiSchema as Pi, functionAbiTypeSchema as Ni, legacyContractClassSchema as bi, legacyEventSchema as Ii, programSchema as Bi, pythonicHintsSchema as wi, sierraContractEntryPointFieldsSchema as _i, sierraEntryPointsByTypeSchema as Vi, sierraProgramDebugInfoSchema as Hi, structAbiSchema as Oi } from "./src/utils/starknet/starknetSchemas.js";
106
- import { entryPointToHumanReadable as Mi } from "./src/utils/transactions.js";
107
- import { urlWithQuery as Ui } from "./src/utils/url/urlWithQuery.js";
108
- import { voidify as Gi } from "./src/utils/voidify.js";
109
- import { bipsToPercent as Ki } from "./src/utils/bips.js";
110
- import { retryUntilInitialised as Xi } from "./src/utils/retryUntilInitialised.js";
74
+ import { estimatedFeesToMaxFeeTotalV2 as hn, estimatedFeesToTotalV2 as fn, filterPaymasterEstimatedFees as un, getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2 as An, getNativeEstimatedFeeByFeeToken as gn, getNativeEstimatedFeeByTxVersion as xn, getNativeEstimatedFeeForAccount as Tn, getNativeEstimatedFees as kn, getNativeFeeFromSimulation as Cn, getNativeFeeTokenAddress as yn, getPaymasterFeeFromSimulation as En } from "./src/transactions/estimate/utilsV2.js";
75
+ import { EventsBySelector as Fn, findTransfersAndApprovals as vn } from "./src/transactions/findTransfersAndApprovals.js";
76
+ import { getPrettyRpcError as Nn } from "./src/transactions/getPrettyRcpError.js";
77
+ import { getAccountTxVersion as bn, getSimulationTxVersionFromFeeToken as In, getTxVersionForDeclareContract as Bn, getTxVersionFromFeeToken as wn, getTxVersionFromFeeTokenForDeclareContract as _n } from "./src/transactions/getTransactionVersion.js";
78
+ import { TransactionReviewServiceWeb as Hn } from "./src/transactions/service/implementation.js";
79
+ import { transactionReviewWarningSchema as Ln } from "./src/transactions/service/types.js";
80
+ import { apiTransactionReviewActivityType as Wn } from "./src/transactions/transactionReviewTypes.js";
81
+ import { denyTxV3 as qn, txVersionSchema as Gn } from "./src/transactions/transactionVersion.js";
82
+ import { classHashSupportsTxV3 as Kn, feeTokenNeedsTxV3Support as jn } from "./src/transactions/txv3.js";
83
+ import { formatAddress as Yn } from "./src/utils/address.js";
84
+ import { ensureArray as Qn } from "./src/utils/arrays.js";
85
+ import { generateAvatarImage as $n, getColor as em, getNetworkAccountImageUrl as am, stripAddressZeroPadding as rm } from "./src/utils/avatarImage.js";
86
+ import { decodeBase58 as om, decodeBase58Array as nm, encodeBase58 as mm, encodeBase58Array as im } from "./src/utils/base58.js";
87
+ import { bigNumberSchema as cm } from "./src/utils/bigNumber.js";
88
+ import { daysBetween as dm } from "./src/utils/daysBetween.js";
89
+ import { isFeatureEnabled as lm } from "./src/utils/env.js";
90
+ import { hexSchema as fm, hexSchemaBase as um } from "./src/utils/hex.js";
91
+ import { id as gm } from "./src/utils/id.js";
92
+ import { getInitials as Tm } from "./src/utils/initials.js";
93
+ import { isContractDeployed as Cm } from "./src/utils/isContractDeployed.js";
94
+ import { nonNullable as Em } from "./src/utils/nonNullable.js";
95
+ import { isAllowedAddressHexInputValue as Fm } from "./src/utils/number/isAllowedAddressHexInputValue.js";
96
+ import { isAllowedNumericInputValue as Rm } from "./src/utils/number/isAllowedNumericInputValue.js";
97
+ import { isNumeric as Pm } from "./src/utils/number/isNumeric.js";
98
+ import { prettifyCurrencyNumber as Im, prettifyNumber as Bm, prettifyNumberConfig as wm, prettifyTokenNumber as _m } from "./src/utils/number/prettifyNumber.js";
99
+ import { abbreviateNumber as Hm } from "./src/utils/number/abbreviateNumber.js";
100
+ import { getUint256CalldataFromBN as Lm, parseAmountValue as Mm } from "./src/utils/parseAmount.js";
101
+ import { pluralise as Um } from "./src/utils/pluralise.js";
102
+ import { readFileAsString as Gm } from "./src/utils/readFileAsString.js";
103
+ import { booleanToStringSchema as Km, createSchemaWithWarnings as jm, safeParseAndWarn as Xm, stringToBooleanSchema as Ym } from "./src/utils/schemas.js";
104
+ import { addOwnersCalldataSchema as Qm, addPluginCalldataSchema as Jm, bigNumberishSchema as $m, callDetailsSchema as ei, callSchema as ai, calldataSchema as ri, changeGuardianCalldataSchema as ti, changeThresholdCalldataSchema as oi, escapeGuardianCalldataSchema as ni, executeOnPluginCalldataSchema as mi, feltSchema as ii, looseCalldataSchema as si, multiTypeSchema as ci, rawArgsArraySchema as Si, rawArgsObjectSchema as di, rawArgsSchema as pi, removeOwnersCalldataSchema as li, removePluginCalldataSchema as hi, replaceSignerCalldataSchema as fi, transferCalldataSchema as ui, uint256Schema as Ai } from "./src/utils/starknet/starknet.js";
105
+ import { abiEntrySchema as xi, abiSchema as Ti, builtinsSchema as ki, byteCodeSchema as Ci, cairo1EventSchema as yi, cairoAssemblySchema as Ei, compiledContractClassSchema as Di, compiledSierraCasmSchema as Fi, compiledSierraSchema as vi, compressedProgramSchema as Ri, contractEntryPointFieldsSchema as Ni, entryPointsByTypeSchema as Pi, eventAbiSchema as bi, eventEntrySchema as Ii, functionAbiSchema as Bi, functionAbiTypeSchema as wi, legacyContractClassSchema as _i, legacyEventSchema as Vi, programSchema as Hi, pythonicHintsSchema as Oi, sierraContractEntryPointFieldsSchema as Li, sierraEntryPointsByTypeSchema as Mi, sierraProgramDebugInfoSchema as Wi, structAbiSchema as Ui } from "./src/utils/starknet/starknetSchemas.js";
106
+ import { entryPointToHumanReadable as Gi } from "./src/utils/transactions.js";
107
+ import { urlWithQuery as Ki } from "./src/utils/url/urlWithQuery.js";
108
+ import { voidify as Xi } from "./src/utils/voidify.js";
109
+ import { bipsToPercent as Zi } from "./src/utils/bips.js";
110
+ import { retryUntilInitialised as Ji } from "./src/utils/retryUntilInitialised.js";
111
111
  export {
112
112
  Be as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
113
113
  we as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
@@ -118,18 +118,18 @@ export {
118
118
  qa as BackendNftService,
119
119
  t as BaseError,
120
120
  _e as C0_PROXY_CONTRACT_CLASS_HASHES,
121
- v as CacheService,
121
+ R as CacheService,
122
122
  Kr as DEFAULT_TOKEN_DECIMALS,
123
123
  ia as DateService,
124
124
  Wo as ESTIMATE_ERROR_MESSAGES,
125
125
  le as ETH_TOKEN_ADDRESS,
126
126
  Uo as EstimateError,
127
- Cn as EventsBySelector,
127
+ Fn as EventsBySelector,
128
128
  Ho as FEE_OVERHEAD,
129
129
  da as HTTPService,
130
130
  la as HTTP_ERROR_MESSAGE,
131
131
  ca as HttpError,
132
- Da as KnownDappsBackendService,
132
+ Ea as KnownDappsBackendService,
133
133
  gr as MultiSigner,
134
134
  Xa as OnchainRecoveryService,
135
135
  mt as PRETTY_UNLIMITED,
@@ -147,18 +147,18 @@ export {
147
147
  xe as TXV3_MULTISIG_CLASS_HASH,
148
148
  ht as TokenError,
149
149
  dt as TokenServiceWeb,
150
- Bn as TransactionReviewServiceWeb,
151
- Bm as abbreviateNumber,
152
- fi as abiEntrySchema,
153
- ui as abiSchema,
150
+ Hn as TransactionReviewServiceWeb,
151
+ Hm as abbreviateNumber,
152
+ xi as abiEntrySchema,
153
+ Ti as abiSchema,
154
154
  Ja as activeOnchainRecoverySchema,
155
- jm as addOwnersCalldataSchema,
156
- Xm as addPluginCalldataSchema,
155
+ Qm as addOwnersCalldataSchema,
156
+ Jm as addPluginCalldataSchema,
157
157
  te as addressInputCharactersAndLengthSchema,
158
158
  oe as addressInputSchema,
159
159
  Z as addressOrDomainInputSchema,
160
160
  Q as addressOrDomainSchema,
161
- N as addressOrEmptyUndefinedSchema,
161
+ P as addressOrEmptyUndefinedSchema,
162
162
  b as addressSchema,
163
163
  I as addressSchemaArgentBackend,
164
164
  B as addressSchemaBase,
@@ -173,13 +173,13 @@ export {
173
173
  kt as apiConcentratedLiquidityPositionsSchema,
174
174
  Ct as apiDefiDecompositionProduct,
175
175
  yt as apiDefiDecompositionProducts,
176
- Dt as apiDefiDecompositionSchema,
177
- Et as apiDefiDecompositionToken,
176
+ Et as apiDefiDecompositionSchema,
177
+ Dt as apiDefiDecompositionToken,
178
178
  Ft as apiDefiPositionSchema,
179
- Rt as apiDefiPositionsSchema,
180
- vt as apiDelegatedTokensArraySchema,
181
- Pt as apiDelegatedTokensSchema,
182
- Nt as apiPriceDataResponseSchema,
179
+ vt as apiDefiPositionsSchema,
180
+ Rt as apiDelegatedTokensArraySchema,
181
+ Nt as apiDelegatedTokensSchema,
182
+ Pt as apiPriceDataResponseSchema,
183
183
  bt as apiPriceDetailsSchema,
184
184
  It as apiStakingPositionSchema,
185
185
  Bt as apiStakingPositionsSchema,
@@ -188,7 +188,7 @@ export {
188
188
  Vt as apiTokenInfoResponseSchema,
189
189
  Ht as apiTokenInfoSchema,
190
190
  Ot as apiTokensInfoResponseSchema,
191
- Hn as apiTransactionReviewActivityType,
191
+ Wn as apiTransactionReviewActivityType,
192
192
  Lt as apiUnclaimedRewardsSchema,
193
193
  ke as apiWalletResponseSchema,
194
194
  g as argentBackendNetworkIdSchema,
@@ -196,54 +196,54 @@ export {
196
196
  me as argentNameSchema,
197
197
  x as argentNetworkIdSchema,
198
198
  y as backendSessionAllowedMethodSchema,
199
- D as backendSessionMetadataSchema,
200
- E as backendSessionSchema,
199
+ E as backendSessionMetadataSchema,
200
+ D as backendSessionSchema,
201
201
  F as backendSessionTxFeeSchema,
202
202
  e as bigDecimal,
203
- nm as bigNumberSchema,
204
- Ym as bigNumberishSchema,
205
- Ki as bipsToPercent,
206
- Um as booleanToStringSchema,
203
+ cm as bigNumberSchema,
204
+ $m as bigNumberishSchema,
205
+ Zi as bipsToPercent,
206
+ Km as booleanToStringSchema,
207
207
  We as buildConstructorCalldata,
208
208
  Ko as buildDummyTx,
209
209
  yr as buildSellOptsSchema,
210
- Ai as builtinsSchema,
211
- gi as byteCodeSchema,
212
- xi as cairo1EventSchema,
213
- Ti as cairoAssemblySchema,
210
+ ki as builtinsSchema,
211
+ Ci as byteCodeSchema,
212
+ yi as cairo1EventSchema,
213
+ Ei as cairoAssemblySchema,
214
214
  de as cairoVersionSchema,
215
215
  jo as calculateCubeRootAdjustment,
216
216
  Xo as calculateNonLinearAdjustment,
217
217
  Yo as calculateSqrtAdjustment,
218
- Zm as callDetailsSchema,
219
- Qm as callSchema,
220
- Jm as calldataSchema,
218
+ ei as callDetailsSchema,
219
+ ai as callSchema,
220
+ ri as calldataSchema,
221
221
  Zo as castFeeEstimation,
222
- $m as changeGuardianCalldataSchema,
223
- ei as changeThresholdCalldataSchema,
224
- Un as classHashSupportsTxV3,
222
+ ti as changeGuardianCalldataSchema,
223
+ oi as changeThresholdCalldataSchema,
224
+ Kn as classHashSupportsTxV3,
225
225
  Wt as collateralizedDebtGroupSchema,
226
226
  Ut as collateralizedDebtPositionSchema,
227
227
  qt as collateralizedDebtPositionsSchema,
228
- ki as compiledContractClassSchema,
229
- Ci as compiledSierraCasmSchema,
230
- yi as compiledSierraSchema,
231
- Di as compressedProgramSchema,
228
+ Di as compiledContractClassSchema,
229
+ Fi as compiledSierraCasmSchema,
230
+ vi as compiledSierraSchema,
231
+ Ri as compressedProgramSchema,
232
232
  Gt as concentratedLiquidityPositionSchema,
233
233
  zt as concentratedLiquidityPositionsSchema,
234
234
  He as constructorCallDataSchemaC0,
235
235
  Oe as constructorCallDataSchemaC1V1,
236
236
  _r as containsValue,
237
- Ei as contractEntryPointFieldsSchema,
237
+ Ni as contractEntryPointFieldsSchema,
238
238
  Xr as convertCurrencyValueToTokenAmount,
239
239
  Zr as convertTokenAmountToCurrencyValue,
240
240
  Jr as convertTokenUnitAmountWithDecimals,
241
- qm as createSchemaWithWarnings,
241
+ jm as createSchemaWithWarnings,
242
242
  Fa as dappContractSchema,
243
- Ra as dappLinkSchema,
244
- im as daysBetween,
245
- em as decodeBase58,
246
- am as decodeBase58Array,
243
+ va as dappLinkSchema,
244
+ dm as daysBetween,
245
+ om as decodeBase58,
246
+ nm as decodeBase58Array,
247
247
  Kt as defiDappsProductsSchema,
248
248
  jt as defiPositionSchema,
249
249
  oo as defiPositionTypeSchema,
@@ -251,18 +251,18 @@ export {
251
251
  Yt as defiProductsSchema,
252
252
  Zt as delegatedTokensArraySchema,
253
253
  Qt as delegatedTokensSchema,
254
- Ln as denyTxV3,
255
- rm as encodeBase58,
256
- tm as encodeBase58Array,
257
- jn as ensureArray,
254
+ qn as denyTxV3,
255
+ mm as encodeBase58,
256
+ im as encodeBase58Array,
257
+ Qn as ensureArray,
258
258
  et as ensureDecimals,
259
- Mi as entryPointToHumanReadable,
260
- Fi as entryPointsByTypeSchema,
259
+ Gi as entryPointToHumanReadable,
260
+ Pi as entryPointsByTypeSchema,
261
261
  za as equalNft,
262
- No as erc20TransferTransaction,
262
+ Po as erc20TransferTransaction,
263
263
  bo as erc721SafeTransferFromTransaction,
264
264
  Io as erc721TransferFromTransaction,
265
- ai as escapeGuardianCalldataSchema,
265
+ ni as escapeGuardianCalldataSchema,
266
266
  Qo as estimatedFeeToMaxFeeTotal,
267
267
  Jo as estimatedFeeToMaxResourceBounds,
268
268
  $o as estimatedFeeToTotal,
@@ -270,84 +270,88 @@ export {
270
270
  hn as estimatedFeesToMaxFeeTotalV2,
271
271
  an as estimatedFeesToTotal,
272
272
  fn as estimatedFeesToTotalV2,
273
- Ri as eventAbiSchema,
274
- vi as eventEntrySchema,
275
- ri as executeOnPluginCalldataSchema,
276
- qn as feeTokenNeedsTxV3Support,
277
- ti as feltSchema,
273
+ bi as eventAbiSchema,
274
+ Ii as eventEntrySchema,
275
+ mi as executeOnPluginCalldataSchema,
276
+ jn as feeTokenNeedsTxV3Support,
277
+ ii as feltSchema,
278
278
  Aa as fetchData,
279
279
  ga as fetcherError,
280
280
  un as filterPaymasterEstimatedFees,
281
281
  Ue as findImplementationForAccount,
282
- yn as findTransfersAndApprovals,
283
- zn as formatAddress,
282
+ vn as findTransfersAndApprovals,
283
+ Yn as formatAddress,
284
284
  V as formatFullAddress,
285
285
  H as formatTruncatedAddress,
286
286
  O as formatTruncatedSignerKey,
287
287
  L as formatTruncatedString,
288
- Pi as functionAbiSchema,
289
- Ni as functionAbiTypeSchema,
290
- Yn as generateAvatarImage,
288
+ Bi as functionAbiSchema,
289
+ wi as functionAbiTypeSchema,
290
+ $n as generateAvatarImage,
291
291
  qe as getAccountContractAddress,
292
292
  Ge as getAccountDeploymentPayload,
293
- Rn as getAccountTxVersion,
293
+ bn as getAccountTxVersion,
294
294
  Ce as getAddressFromArgentName,
295
- De as getAddressFromStarkName,
295
+ Ee as getAddressFromStarkName,
296
296
  je as getArgentAccountClassHashes,
297
297
  Xe as getArgentAccountClassHashesWithTxV3Support,
298
298
  Ye as getArgentAccountWithMultiSignerClassHashes,
299
299
  ka as getBackendTimeNowSeconds,
300
300
  Ca as getBackendTimeSeconds,
301
- Ee as getCallFromStarkName,
302
- Pe as getChainIdFromNetworkId,
303
- Zn as getColor,
301
+ De as getCallFromStarkName,
302
+ Ne as getChainIdFromNetworkId,
303
+ em as getColor,
304
304
  ct as getCurrencySymbol,
305
305
  ba as getDapplandLinkForDapp,
306
306
  Ia as getDapplandUrlForDapp,
307
307
  rn as getEstimatedFeeFromBulkSimulation,
308
308
  tn as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
309
309
  An as getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2,
310
- um as getInitials,
310
+ Tm as getInitials,
311
311
  Ze as getLastCairo0ArgentAccountClassHash,
312
312
  Qe as getLatestArgentAccountClassHash,
313
313
  Je as getLatestArgentMultisigClassHash,
314
314
  $e as getLatestLedgerAccountClassHash,
315
315
  ea as getLedgerAccountClassHashes,
316
316
  wo as getMessageFromTrpcError,
317
- gn as getNativeEstimatedFees,
318
- xn as getNativeFeeTokenAddress,
319
- Qn as getNetworkAccountImageUrl,
317
+ gn as getNativeEstimatedFeeByFeeToken,
318
+ xn as getNativeEstimatedFeeByTxVersion,
319
+ Tn as getNativeEstimatedFeeForAccount,
320
+ kn as getNativeEstimatedFees,
321
+ Cn as getNativeFeeFromSimulation,
322
+ yn as getNativeFeeTokenAddress,
323
+ am as getNetworkAccountImageUrl,
320
324
  Ka as getNftPicture,
321
325
  on as getPayloadFromTransaction,
322
- Tn as getPaymasterFeeFromSimulation,
323
- En as getPrettyRpcError,
326
+ En as getPaymasterFeeFromSimulation,
327
+ Nn as getPrettyRpcError,
324
328
  xr as getSignerForMultiSigner,
325
- vn as getSimulationTxVersionFromFeeToken,
329
+ In as getSimulationTxVersionFromFeeToken,
326
330
  Fe as getStarknetIdContractAddressFromNetworkId,
327
331
  Wr as getTokenBalance,
328
332
  Ur as getTokens,
329
333
  qr as getTokensBalances,
330
- Pn as getTxVersionForDeclareContract,
331
- Nn as getTxVersionFromFeeToken,
332
- bn as getTxVersionFromFeeTokenForDeclareContract,
334
+ Bn as getTxVersionForDeclareContract,
335
+ wn as getTxVersionFromFeeToken,
336
+ _n as getTxVersionFromFeeTokenForDeclareContract,
333
337
  cr as getUAParserResult,
334
- _m as getUint256CalldataFromBN,
338
+ Lm as getUint256CalldataFromBN,
335
339
  nn as getWatermarkedMaxFeeTotal,
336
- dm as hexSchema,
337
- pm as hexSchemaBase,
338
- hm as id,
340
+ fm as hexSchema,
341
+ um as hexSchemaBase,
342
+ gm as id,
339
343
  Le as implementationSchema,
340
344
  M as includesAddress,
341
345
  Fo as inputAmountSchema,
342
- Dr as investmentMetaSchema,
343
- Er as investmentSchema,
346
+ Er as investmentMetaSchema,
347
+ Dr as investmentSchema,
344
348
  Fr as investmentsResponseSchema,
345
349
  d as isAccountV4,
346
350
  p as isAccountV5,
347
351
  l as isAccountV6,
348
352
  W as isAddress,
349
- Cm as isAllowedAddressHexInputValue,
350
- Dm as isAllowedNumericInputValue,
353
+ Fm as isAllowedAddressHexInputValue,
354
+ Rm as isAllowedNumericInputValue,
351
355
  T as isArgentBackendNetworkId,
352
356
  ie as isArgentName,
353
357
  k as isArgentNetworkId,
@@ -357,7 +361,7 @@ export {
357
361
  dr as isChromeBrowser,
358
362
  To as isCollateralizedDebtPosition,
359
363
  ko as isConcentratedLiquidityPosition,
360
- gm as isContractDeployed,
364
+ Cm as isContractDeployed,
361
365
  Co as isDelegatedTokens,
362
366
  pr as isEdgeBrowser,
363
367
  q as isEqualAddress,
@@ -366,109 +370,109 @@ export {
366
370
  J as isEqualStarknetDomainName,
367
371
  ra as isEqualStarknetId,
368
372
  mn as isFRI,
369
- cm as isFeatureEnabled,
373
+ lm as isFeatureEnabled,
370
374
  lr as isFirefoxBrowser,
371
- Fm as isNumeric,
375
+ Pm as isNumeric,
372
376
  hr as isSafariBrowser,
373
377
  yo as isStaking,
374
378
  $ as isStarknetDomainName,
375
379
  ta as isStarknetId,
376
- Do as isStrkDelegatedStaking,
380
+ Eo as isStrkDelegatedStaking,
377
381
  rt as isUnlimitedAmount,
378
382
  G as isValidAddress,
379
- Ro as isValidInputAmount,
383
+ vo as isValidInputAmount,
380
384
  sn as isWEI,
381
385
  z as isZeroAddress,
382
- va as knownDappSchema,
383
- Pa as knownDappsSchema,
384
- bi as legacyContractClassSchema,
385
- Ii as legacyEventSchema,
386
- Rr as lendingInvestmentSchema,
387
- vr as liquidStakingInvestmentSchema,
388
- oi as looseCalldataSchema,
386
+ Ra as knownDappSchema,
387
+ Na as knownDappsSchema,
388
+ _i as legacyContractClassSchema,
389
+ Vi as legacyEventSchema,
390
+ vr as lendingInvestmentSchema,
391
+ Rr as liquidStakingInvestmentSchema,
392
+ si as looseCalldataSchema,
389
393
  Or as mergeArrayStableWith,
390
394
  kr as mergeOwnerGuardianSignatures,
391
395
  Lo as modifySnjsFeeOverhead,
392
- ni as multiTypeSchema,
396
+ ci as multiTypeSchema,
393
397
  cn as multiplyBigIntByFloat,
394
398
  Va as nameProviderResolutionSchema,
395
399
  Ha as nameResolutionAddressSchema,
396
400
  Oa as nameResolutionAddressesSchema,
397
401
  La as nameResolutionStarknetIdSchema,
398
402
  Ma as nameResolutionStarknetIdsSchema,
399
- Tm as nonNullable,
403
+ Em as nonNullable,
400
404
  K as normalizeAddress,
401
405
  ee as normalizeAddressOrDomain,
402
406
  ce as normalizeArgentName,
403
407
  oa as normalizeStarknetId,
404
408
  $a as onchainRecoverySchema,
405
409
  Lr as optionsWithDefaults,
406
- vo as parseAmount,
407
- Vm as parseAmountValue,
408
- Om as pluralise,
410
+ Ro as parseAmount,
411
+ Mm as parseAmountValue,
412
+ Um as pluralise,
409
413
  xa as postData,
410
414
  f as preferencesEndpointPayload,
411
415
  u as preferencesSchema,
412
- vm as prettifyCurrencyNumber,
416
+ Im as prettifyCurrencyNumber,
413
417
  ot as prettifyCurrencyValue,
414
- Pm as prettifyNumber,
415
- Nm as prettifyNumberConfig,
418
+ Bm as prettifyNumber,
419
+ wm as prettifyNumberConfig,
416
420
  it as prettifyTokenAmount,
417
- bm as prettifyTokenNumber,
421
+ _m as prettifyTokenNumber,
418
422
  Jt as productGroupsSchema,
419
- Bi as programSchema,
423
+ Hi as programSchema,
420
424
  Wa as providersNamesSchema,
421
- wi as pythonicHintsSchema,
422
- mi as rawArgsArraySchema,
423
- ii as rawArgsObjectSchema,
424
- si as rawArgsSchema,
425
- Mm as readFileAsString,
425
+ Oi as pythonicHintsSchema,
426
+ Si as rawArgsArraySchema,
427
+ di as rawArgsObjectSchema,
428
+ pi as rawArgsSchema,
429
+ Gm as readFileAsString,
426
430
  er as recoveryBaseSchema,
427
431
  ar as recoveryBodySchema,
428
432
  rr as recoveryStatusSchema,
429
- ci as removeOwnersCalldataSchema,
430
- Si as removePluginCalldataSchema,
431
- di as replaceSignerCalldataSchema,
433
+ li as removeOwnersCalldataSchema,
434
+ hi as removePluginCalldataSchema,
435
+ fi as replaceSignerCalldataSchema,
432
436
  Vr as replaceValueRecursively,
433
- Xi as retryUntilInitialised,
434
- Gm as safeParseAndWarn,
437
+ Ji as retryUntilInitialised,
438
+ Xm as safeParseAndWarn,
435
439
  ur as seedphraseSchema,
436
- _i as sierraContractEntryPointFieldsSchema,
437
- Vi as sierraEntryPointsByTypeSchema,
438
- Hi as sierraProgramDebugInfoSchema,
439
- Pr as stakerInfoSchema,
440
- Nr as stakingActionSchema,
440
+ Li as sierraContractEntryPointFieldsSchema,
441
+ Mi as sierraEntryPointsByTypeSchema,
442
+ Wi as sierraProgramDebugInfoSchema,
443
+ Nr as stakerInfoSchema,
444
+ Pr as stakingActionSchema,
441
445
  $t as stakingPositionSchema,
442
446
  eo as stakingPositionsSchema,
443
- Re as starkNameToCallDataDomain,
447
+ ve as starkNameToCallDataDomain,
444
448
  ae as starknetDomainNameSchema,
445
449
  na as starknetIdSchema,
446
450
  tr as startOnchainRecoveryErrorSchema,
447
451
  or as startOnchainRecoveryErrorStatusSchema,
448
452
  nr as startOnchainRecoverySchema,
449
- zm as stringToBooleanSchema,
450
- Jn as stripAddressZeroPadding,
453
+ Ym as stringToBooleanSchema,
454
+ rm as stripAddressZeroPadding,
451
455
  br as strkDelegatedStakingInvestmentSchema,
452
456
  ao as strkDelegatedStakingPositionArraySchema,
453
457
  ro as strkDelegatedStakingPositionSchema,
454
458
  Ir as strkStakingCalldataResponseSchema,
455
459
  Br as strkStakingCalldataSchema,
456
- Oi as structAbiSchema,
460
+ Ui as structAbiSchema,
457
461
  Sn as toMax,
458
462
  dn as tokensRequireTxV3Support,
459
463
  Go as transactionReviewTransactionsSchema,
460
- _n as transactionReviewWarningSchema,
461
- pi as transferCalldataSchema,
464
+ Ln as transactionReviewWarningSchema,
465
+ ui as transferCalldataSchema,
462
466
  _o as trpcErrorSchema,
463
- Mn as txVersionSchema,
464
- li as uint256Schema,
467
+ Gn as txVersionSchema,
468
+ Ai as uint256Schema,
465
469
  io as unclaimedRewardsSchema,
466
470
  pn as unitToFeeTokenAddress,
467
- Ui as urlWithQuery,
471
+ Ki as urlWithQuery,
468
472
  Gr as useToken,
469
473
  j as validChecksumAddressSchema,
470
474
  X as validateAddressRangeSchema,
471
- Gi as voidify,
475
+ Xi as voidify,
472
476
  co as webBaseTokenSchema,
473
477
  So as webBaseTokenWithBalanceSchema,
474
478
  po as webTokenInfoDetailsSchema,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("lodash-es"),m=require("starknet"),l=require("./error.cjs"),o=require("./utils.cjs"),c=require("../../chains/starknet/constants.cjs"),A=require("../../chains/starknet/address.cjs"),v=e=>{const{transactions:t}=e;if(!t)throw new l.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});const n=t.map(s=>{if(!s.simulation)throw new l.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});const{nativeFeeEstimation:u,paymasterFeeEstimations:T}=g(s.simulation.feeEstimations);return{...s.simulation,feeEstimation:u,paymasterFeeEstimations:T}}),a=o.getEstimatedFeeFromBulkSimulation(n),[r,d]=n.length===1?[n[0],void 0]:[n[1],n[0]],y=E(a.transactions,r),F=a.deployment&&d?E(a.deployment,d):void 0;return[{type:"native",transactions:y,deployment:F},...p(n)]},E=(e,t)=>({...e,dataGasConsumed:e.dataGasConsumed??0n,dataGasPrice:e.dataGasPrice??0n,max:o.toMax(o.castFeeEstimation(t.feeEstimation,m.num.toBigInt))}),g=e=>{const[t,n]=f.partition(e,a=>"unit"in a&&(a.unit==="FRI"||a.unit==="WEI"));return{nativeFeeEstimation:t[0],paymasterFeeEstimations:n}},p=e=>{if(!e)return[];if(!Array.isArray(e))throw Error(`Unexpected simulation response. Expected array. Got ${typeof e}`);if(e.length===1)return e[0].paymasterFeeEstimations.map(t=>({type:"paymaster",transactions:i(t),deployment:void 0}));if(e.length===2){const t=e[0].paymasterFeeEstimations,n=e[1].paymasterFeeEstimations;if(t.length!==n.length)throw Error("Deployment and transaction fee estimations length mismatch");return n.map((a,r)=>({type:"paymaster",transactions:i(a),deployment:i(t[r])}))}throw Error("Unexpected simulation response length")},i=e=>({feeTokenAddress:e.token.address,maxFee:BigInt(e.maxFee),overallFee:BigInt(e.overallFee)}),S=e=>{var a;if(e.type==="paymaster")return e.transactions.maxFee+(((a=e.deployment)==null?void 0:a.maxFee)??0n);if(e.deployment&&!A.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=e.deployment?o.estimatedFeeToMaxFeeTotal(e.deployment):0n,n=o.estimatedFeeToMaxFeeTotal(e.transactions);return t+n},N=e=>{var t;return e.type==="paymaster"?e.transactions.overallFee+(((t=e.deployment)==null?void 0:t.overallFee)??0n):o.estimatedFeeToTotal(e.transactions)},h=e=>{const t=e==null?void 0:e.find(n=>n.type==="native");return t||{type:"native",transactions:{amount:0n,feeTokenAddress:c.STRK_TOKEN_ADDRESS,pricePerUnit:0n}}},I=e=>e.filter(t=>t.type==="paymaster"),_=e=>e===m.constants.TRANSACTION_VERSION.V1||e===m.constants.TRANSACTION_VERSION.F1?c.ETH_TOKEN_ADDRESS:c.STRK_TOKEN_ADDRESS;exports.estimatedFeesToMaxFeeTotalV2=S;exports.estimatedFeesToTotalV2=N;exports.filterPaymasterEstimatedFees=I;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=v;exports.getNativeEstimatedFees=h;exports.getNativeFeeTokenAddress=_;exports.getPaymasterFeeFromSimulation=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("lodash-es"),o=require("starknet"),N=require("../getTransactionVersion.cjs"),F=require("./error.cjs"),r=require("./utils.cjs"),u=require("../../chains/starknet/constants.cjs"),E=require("../../chains/starknet/address.cjs"),h=e=>{const{transactions:t}=e;if(!t)throw new F.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});if(!Array.isArray(t))throw Error(`Unexpected simulation response. Expected array. Got ${typeof t}`);if(l.isEmpty(t))return[];if(t.length>2)throw Error(`Unexpected simulation response length. Got ${t.length}`);const n=t.map(m=>{if(!m.simulation)throw new F.EstimateError({code:"SIMULATE_AND_REVIEW_FAILED"});return{...m.simulation,...I(m.simulation.feeEstimations)}}),[a,s]=n.length===1?[n[0],void 0]:[n[1],n[0]],i=y(a,s),f=p(a,s);return[...i,...f]},I=e=>{const[t,n]=l.partition(e,a=>"unit"in a&&(a.unit==="FRI"||a.unit==="WEI"));return{nativeFeeEstimations:t,paymasterFeeEstimations:n}},p=(e,t)=>{if(!e)return[];if(!t)return e.paymasterFeeEstimations.map(s=>({type:"paymaster",transactions:c(s),deployment:void 0}));const n=t.paymasterFeeEstimations,a=e.paymasterFeeEstimations;if(n.length!==a.length)throw Error("Deployment and transaction fee estimations length mismatch");return a.map((s,i)=>({type:"paymaster",transactions:c(s),deployment:c(n[i])}))},y=(e,t)=>{if(!e)return[];if(!t)return e.nativeFeeEstimations.map(s=>({type:"native",transactions:d(s),deployment:void 0}));const n=t.nativeFeeEstimations,a=e.nativeFeeEstimations;if(n.length!==a.length)throw Error("Deployment and transaction fee estimations length mismatch");return a.map((s,i)=>({type:"native",transactions:d(s),deployment:d(n[i])}))},c=e=>({feeTokenAddress:e.token.address,maxFee:BigInt(e.maxFee),overallFee:BigInt(e.overallFee)}),d=e=>({amount:o.num.toBigInt(e.gasUsage),feeTokenAddress:r.unitToFeeTokenAddress(e.unit),pricePerUnit:o.num.toBigInt(e.gasPrice),dataGasConsumed:o.num.toBigInt(e.dataGasConsumed??0),dataGasPrice:o.num.toBigInt(e.dataGasPrice??0),max:r.toMax(r.castFeeEstimation(e,o.num.toBigInt))}),S=e=>{var a;if(e.type==="paymaster")return e.transactions.maxFee+(((a=e.deployment)==null?void 0:a.maxFee)??0n);if(e.deployment&&!E.isEqualAddress(e.deployment.feeTokenAddress,e.transactions.feeTokenAddress))throw Error("Cannot calculate estimated fees for different tokens");const t=e.deployment?r.estimatedFeeToMaxFeeTotal(e.deployment):0n,n=r.estimatedFeeToMaxFeeTotal(e.transactions);return t+n},V=e=>{var t;return e.type==="paymaster"?e.transactions.overallFee+(((t=e.deployment)==null?void 0:t.overallFee)??0n):r.estimatedFeesToTotal(e)},g=(e=[])=>e.filter(n=>n.type==="native"),x=e=>e.filter(t=>t.type==="paymaster"),T=e=>e===o.constants.TRANSACTION_VERSION.V1||e===o.constants.TRANSACTION_VERSION.F1?u.ETH_TOKEN_ADDRESS:u.STRK_TOKEN_ADDRESS,v=(e=[],t)=>{const n=g(e).find(a=>E.isEqualAddress(a.transactions.feeTokenAddress,t));if(!n)throw Error(`No native estimated fee found for ${t}`);return n},A=(e=[],t)=>{const n=T(t);return v(e,n)},_=(e=[],t)=>A(e,N.getAccountTxVersion(t));exports.estimatedFeesToMaxFeeTotalV2=S;exports.estimatedFeesToTotalV2=V;exports.filterPaymasterEstimatedFees=x;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2=h;exports.getNativeEstimatedFeeByFeeToken=v;exports.getNativeEstimatedFeeByTxVersion=A;exports.getNativeEstimatedFeeForAccount=_;exports.getNativeEstimatedFees=g;exports.getNativeFeeFromSimulation=y;exports.getNativeFeeTokenAddress=T;exports.getPaymasterFeeFromSimulation=p;
@@ -1,14 +1,26 @@
1
1
  import { Address } from '../../chains';
2
- import { PaymasterFeeEstimation, SimulateAndReview } from '../../features/simulation';
2
+ import { PaymasterFeeEstimation, FeeEstimation, SimulateAndReview } from '../../features/simulation';
3
3
  import { EstimatedFeesV2, NativeEstimatedFees, PaymasterEstimatedFees } from '../../features/simulation/fees/schema';
4
4
  import { StrictOmit } from '../../utils/type.utils';
5
5
  import { TransactionVersion } from '../transactionVersion';
6
6
  export declare const getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2: (simulateAndReviewResult: Pick<SimulateAndReview, "transactions">) => EstimatedFeesV2[];
7
- export declare const getPaymasterFeeFromSimulation: (simulation: {
7
+ export declare const getPaymasterFeeFromSimulation: (invokeTransaction: {
8
8
  paymasterFeeEstimations: PaymasterFeeEstimation[];
9
- }[]) => EstimatedFeesV2[];
9
+ }, deployTransactionOrUndefined?: {
10
+ paymasterFeeEstimations: PaymasterFeeEstimation[];
11
+ } | undefined) => EstimatedFeesV2[];
12
+ export declare const getNativeFeeFromSimulation: (invokeTransaction: {
13
+ nativeFeeEstimations: FeeEstimation[];
14
+ }, deployTransactionOrUndefined?: {
15
+ nativeFeeEstimations: FeeEstimation[];
16
+ } | undefined) => EstimatedFeesV2[];
10
17
  export declare const estimatedFeesToMaxFeeTotalV2: (estimatedFees: EstimatedFeesV2) => bigint;
11
18
  export declare const estimatedFeesToTotalV2: (estimatedFees: EstimatedFeesV2) => bigint;
12
- export declare const getNativeEstimatedFees: (estimatedFees?: EstimatedFeesV2[]) => NativeEstimatedFees;
19
+ export declare const getNativeEstimatedFees: (estimatedFees?: EstimatedFeesV2[]) => NativeEstimatedFees[];
13
20
  export declare const filterPaymasterEstimatedFees: (estimatedFees: EstimatedFeesV2[]) => StrictOmit<PaymasterEstimatedFees, "type">[];
14
21
  export declare const getNativeFeeTokenAddress: (transactionVersion: TransactionVersion) => Address;
22
+ export declare const getNativeEstimatedFeeByFeeToken: (estimatedFees: EstimatedFeesV2[] | undefined, feeTokenAddress: string) => NativeEstimatedFees;
23
+ export declare const getNativeEstimatedFeeByTxVersion: (estimatedFees: EstimatedFeesV2[] | undefined, transactionVersion: TransactionVersion) => NativeEstimatedFees;
24
+ export declare const getNativeEstimatedFeeForAccount: (estimatedFees: EstimatedFeesV2[] | undefined, account: {
25
+ classHash: string;
26
+ }) => NativeEstimatedFees;
@@ -1,96 +1,107 @@
1
- import { partition as u } from "lodash-es";
2
- import { num as T, constants as m } from "starknet";
3
- import { EstimateError as c } from "./error.js";
4
- import { getEstimatedFeeFromBulkSimulation as A, toMax as v, castFeeEstimation as g, estimatedFeeToMaxFeeTotal as p, estimatedFeeToTotal as I } from "./utils.js";
5
- import { STRK_TOKEN_ADDRESS as E, ETH_TOKEN_ADDRESS as h } from "../../chains/starknet/constants.js";
6
- import { isEqualAddress as N } from "../../chains/starknet/address.js";
1
+ import { isEmpty as u, partition as y } from "lodash-es";
2
+ import { num as s, constants as p } from "starknet";
3
+ import { getAccountTxVersion as f } from "../getTransactionVersion.js";
4
+ import { EstimateError as d } from "./error.js";
5
+ import { toMax as g, castFeeEstimation as T, unitToFeeTokenAddress as A, estimatedFeeToMaxFeeTotal as E, estimatedFeesToTotal as v } from "./utils.js";
6
+ import { ETH_TOKEN_ADDRESS as h, STRK_TOKEN_ADDRESS as I } from "../../chains/starknet/constants.js";
7
+ import { isEqualAddress as l } from "../../chains/starknet/address.js";
7
8
  const O = (t) => {
8
9
  const { transactions: e } = t;
9
10
  if (!e)
10
- throw new c({ code: "SIMULATE_AND_REVIEW_FAILED" });
11
- const n = e.map((r) => {
12
- if (!r.simulation)
13
- throw new c({ code: "SIMULATE_AND_REVIEW_FAILED" });
14
- const { nativeFeeEstimation: F, paymasterFeeEstimations: f } = S(r.simulation.feeEstimations);
11
+ throw new d({ code: "SIMULATE_AND_REVIEW_FAILED" });
12
+ if (!Array.isArray(e))
13
+ throw Error(`Unexpected simulation response. Expected array. Got ${typeof e}`);
14
+ if (u(e))
15
+ return [];
16
+ if (e.length > 2)
17
+ throw Error(`Unexpected simulation response length. Got ${e.length}`);
18
+ const n = e.map((i) => {
19
+ if (!i.simulation)
20
+ throw new d({ code: "SIMULATE_AND_REVIEW_FAILED" });
15
21
  return {
16
- ...r.simulation,
17
- feeEstimation: F,
18
- paymasterFeeEstimations: f
22
+ ...i.simulation,
23
+ ...N(i.simulation.feeEstimations)
19
24
  };
20
- }), a = A(n), [o, i] = n.length === 1 ? [n[0], void 0] : [n[1], n[0]], l = d(a.transactions, o), y = a.deployment && i ? d(a.deployment, i) : void 0;
21
- return [
22
- {
23
- type: "native",
24
- transactions: l,
25
- deployment: y
26
- },
27
- ..._(n)
28
- ];
29
- }, d = (t, e) => ({
30
- ...t,
31
- dataGasConsumed: t.dataGasConsumed ?? 0n,
32
- dataGasPrice: t.dataGasPrice ?? 0n,
33
- max: v(g(e.feeEstimation, T.toBigInt))
34
- }), S = (t) => {
35
- const [e, n] = u(t, (a) => "unit" in a && (a.unit === "FRI" || a.unit === "WEI"));
36
- return {
37
- nativeFeeEstimation: e[0],
38
- paymasterFeeEstimations: n
39
- };
40
- }, _ = (t) => {
25
+ }), [o, a] = n.length === 1 ? [n[0], void 0] : [n[1], n[0]], r = _(o, a), F = S(o, a);
26
+ return [...r, ...F];
27
+ }, N = (t) => {
28
+ const [e, n] = y(t, (o) => "unit" in o && (o.unit === "FRI" || o.unit === "WEI"));
29
+ return { nativeFeeEstimations: e, paymasterFeeEstimations: n };
30
+ }, S = (t, e) => {
41
31
  if (!t)
42
32
  return [];
43
- if (!Array.isArray(t))
44
- throw Error(`Unexpected simulation response. Expected array. Got ${typeof t}`);
45
- if (t.length === 1)
46
- return t[0].paymasterFeeEstimations.map((e) => ({
33
+ if (!e)
34
+ return t.paymasterFeeEstimations.map((a) => ({
47
35
  type: "paymaster",
48
- transactions: s(e),
36
+ transactions: m(a),
49
37
  deployment: void 0
50
38
  }));
51
- if (t.length === 2) {
52
- const e = t[0].paymasterFeeEstimations, n = t[1].paymasterFeeEstimations;
53
- if (e.length !== n.length)
54
- throw Error("Deployment and transaction fee estimations length mismatch");
55
- return n.map((a, o) => ({
56
- type: "paymaster",
57
- transactions: s(a),
58
- deployment: s(e[o])
39
+ const n = e.paymasterFeeEstimations, o = t.paymasterFeeEstimations;
40
+ if (n.length !== o.length)
41
+ throw Error("Deployment and transaction fee estimations length mismatch");
42
+ return o.map((a, r) => ({
43
+ type: "paymaster",
44
+ transactions: m(a),
45
+ deployment: m(n[r])
46
+ }));
47
+ }, _ = (t, e) => {
48
+ if (!t)
49
+ return [];
50
+ if (!e)
51
+ return t.nativeFeeEstimations.map((a) => ({
52
+ type: "native",
53
+ transactions: c(a),
54
+ deployment: void 0
59
55
  }));
60
- }
61
- throw Error("Unexpected simulation response length");
62
- }, s = (t) => ({
56
+ const n = e.nativeFeeEstimations, o = t.nativeFeeEstimations;
57
+ if (n.length !== o.length)
58
+ throw Error("Deployment and transaction fee estimations length mismatch");
59
+ return o.map((a, r) => ({
60
+ type: "native",
61
+ transactions: c(a),
62
+ deployment: c(n[r])
63
+ }));
64
+ }, m = (t) => ({
63
65
  feeTokenAddress: t.token.address,
64
66
  maxFee: BigInt(t.maxFee),
65
67
  overallFee: BigInt(t.overallFee)
66
- }), P = (t) => {
67
- var a;
68
+ }), c = (t) => ({
69
+ amount: s.toBigInt(t.gasUsage),
70
+ feeTokenAddress: A(t.unit),
71
+ pricePerUnit: s.toBigInt(t.gasPrice),
72
+ dataGasConsumed: s.toBigInt(t.dataGasConsumed ?? 0),
73
+ dataGasPrice: s.toBigInt(t.dataGasPrice ?? 0),
74
+ max: g(T(t, s.toBigInt))
75
+ }), U = (t) => {
76
+ var o;
68
77
  if (t.type === "paymaster")
69
- return t.transactions.maxFee + (((a = t.deployment) == null ? void 0 : a.maxFee) ?? 0n);
70
- if (t.deployment && !N(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
78
+ return t.transactions.maxFee + (((o = t.deployment) == null ? void 0 : o.maxFee) ?? 0n);
79
+ if (t.deployment && !l(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
71
80
  throw Error("Cannot calculate estimated fees for different tokens");
72
- const e = t.deployment ? p(t.deployment) : 0n, n = p(t.transactions);
81
+ const e = t.deployment ? E(t.deployment) : 0n, n = E(t.transactions);
73
82
  return e + n;
74
- }, U = (t) => {
83
+ }, L = (t) => {
75
84
  var e;
76
- return t.type === "paymaster" ? t.transactions.overallFee + (((e = t.deployment) == null ? void 0 : e.overallFee) ?? 0n) : I(t.transactions);
77
- }, C = (t) => {
78
- const e = t == null ? void 0 : t.find((n) => n.type === "native");
79
- return e || {
80
- type: "native",
81
- transactions: {
82
- amount: 0n,
83
- feeTokenAddress: E,
84
- pricePerUnit: 0n
85
- }
86
- };
87
- }, G = (t) => t.filter((e) => e.type === "paymaster"), M = (t) => t === m.TRANSACTION_VERSION.V1 || t === m.TRANSACTION_VERSION.F1 ? h : E;
85
+ return t.type === "paymaster" ? t.transactions.overallFee + (((e = t.deployment) == null ? void 0 : e.overallFee) ?? 0n) : v(t);
86
+ }, x = (t = []) => t.filter((n) => n.type === "native"), W = (t) => t.filter((e) => e.type === "paymaster"), R = (t) => t === p.TRANSACTION_VERSION.V1 || t === p.TRANSACTION_VERSION.F1 ? h : I, V = (t = [], e) => {
87
+ const n = x(t).find((o) => l(o.transactions.feeTokenAddress, e));
88
+ if (!n)
89
+ throw Error(`No native estimated fee found for ${e}`);
90
+ return n;
91
+ }, w = (t = [], e) => {
92
+ const n = R(e);
93
+ return V(t, n);
94
+ }, K = (t = [], e) => w(t, f(e));
88
95
  export {
89
- P as estimatedFeesToMaxFeeTotalV2,
90
- U as estimatedFeesToTotalV2,
91
- G as filterPaymasterEstimatedFees,
96
+ U as estimatedFeesToMaxFeeTotalV2,
97
+ L as estimatedFeesToTotalV2,
98
+ W as filterPaymasterEstimatedFees,
92
99
  O as getEstimatedFeeFromSimulationAndRespectWatermarkFeeV2,
93
- C as getNativeEstimatedFees,
94
- M as getNativeFeeTokenAddress,
95
- _ as getPaymasterFeeFromSimulation
100
+ V as getNativeEstimatedFeeByFeeToken,
101
+ w as getNativeEstimatedFeeByTxVersion,
102
+ K as getNativeEstimatedFeeForAccount,
103
+ x as getNativeEstimatedFees,
104
+ _ as getNativeFeeFromSimulation,
105
+ R as getNativeFeeTokenAddress,
106
+ S as getPaymasterFeeFromSimulation
96
107
  };
@@ -1,5 +1,5 @@
1
1
  import { constants as r, isSierra as T } from "starknet";
2
- import { feeTokenNeedsTxV3Support as t, classHashSupportsTxV3 as n } from "./txv3.js";
2
+ import { classHashSupportsTxV3 as n, feeTokenNeedsTxV3Support as t } from "./txv3.js";
3
3
  function S(e) {
4
4
  return t({
5
5
  address: e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.60.0",
3
+ "version": "1.61.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"