@argent/x-shared 1.61.0 → 1.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +38 -37
- package/dist/paymaster.cjs +1 -0
- package/dist/paymaster.d.ts +2 -0
- package/dist/paymaster.js +8 -0
- package/dist/src/chains/starknet/getAddressFromArgentName.cjs +1 -1
- package/dist/src/chains/starknet/getAddressFromArgentName.js +7 -7
- package/dist/src/chains/starknet/services/address/StarknetAddressService.cjs +1 -1
- package/dist/src/chains/starknet/services/address/StarknetAddressService.js +9 -9
- package/dist/src/features/paymaster/IPaymasterService.d.ts +6 -0
- package/dist/src/features/paymaster/PaymasterService.cjs +1 -0
- package/dist/src/features/paymaster/PaymasterService.d.ts +12 -0
- package/dist/src/features/paymaster/PaymasterService.js +60 -0
- package/dist/src/features/paymaster/index.d.ts +3 -0
- package/dist/src/features/paymaster/types.cjs +1 -0
- package/dist/src/features/paymaster/types.d.ts +151 -0
- package/dist/src/features/paymaster/types.js +25 -0
- package/dist/src/transactions/txv3.cjs +1 -1
- package/dist/src/transactions/txv3.js +4 -4
- package/dist/src/utils/starknet/starknet.cjs +1 -1
- package/dist/src/utils/starknet/starknet.d.ts +71 -0
- package/dist/src/utils/starknet/starknet.js +45 -24
- package/package.json +6 -1
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"),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;
|
|
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"),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"),B=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"),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"),De=require("./src/tokens/convertCurrencyValueToTokenAmount.cjs"),Ee=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=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=B.fetchData;exports.fetcherError=B.fetcherError;exports.postData=B.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=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=De.convertCurrencyValueToTokenAmount;exports.convertTokenAmountToCurrencyValue=Ee.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.typedDataSchema=t.typedDataSchema;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
|
@@ -101,13 +101,13 @@ import { getUint256CalldataFromBN as Lm, parseAmountValue as Mm } from "./src/ut
|
|
|
101
101
|
import { pluralise as Um } from "./src/utils/pluralise.js";
|
|
102
102
|
import { readFileAsString as Gm } from "./src/utils/readFileAsString.js";
|
|
103
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,
|
|
105
|
-
import { abiEntrySchema as
|
|
106
|
-
import { entryPointToHumanReadable as
|
|
107
|
-
import { urlWithQuery as
|
|
108
|
-
import { voidify as
|
|
109
|
-
import { bipsToPercent as
|
|
110
|
-
import { retryUntilInitialised as
|
|
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, typedDataSchema as Ai, uint256Schema as gi } from "./src/utils/starknet/starknet.js";
|
|
105
|
+
import { abiEntrySchema as Ti, abiSchema as ki, builtinsSchema as Ci, byteCodeSchema as yi, cairo1EventSchema as Ei, cairoAssemblySchema as Di, compiledContractClassSchema as Fi, compiledSierraCasmSchema as vi, compiledSierraSchema as Ri, compressedProgramSchema as Ni, contractEntryPointFieldsSchema as Pi, entryPointsByTypeSchema as bi, eventAbiSchema as Ii, eventEntrySchema as Bi, functionAbiSchema as wi, functionAbiTypeSchema as _i, legacyContractClassSchema as Vi, legacyEventSchema as Hi, programSchema as Oi, pythonicHintsSchema as Li, sierraContractEntryPointFieldsSchema as Mi, sierraEntryPointsByTypeSchema as Wi, sierraProgramDebugInfoSchema as Ui, structAbiSchema as qi } from "./src/utils/starknet/starknetSchemas.js";
|
|
106
|
+
import { entryPointToHumanReadable as zi } from "./src/utils/transactions.js";
|
|
107
|
+
import { urlWithQuery as ji } from "./src/utils/url/urlWithQuery.js";
|
|
108
|
+
import { voidify as Yi } from "./src/utils/voidify.js";
|
|
109
|
+
import { bipsToPercent as Qi } from "./src/utils/bips.js";
|
|
110
|
+
import { retryUntilInitialised as $i } 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,
|
|
@@ -149,8 +149,8 @@ export {
|
|
|
149
149
|
dt as TokenServiceWeb,
|
|
150
150
|
Hn as TransactionReviewServiceWeb,
|
|
151
151
|
Hm as abbreviateNumber,
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
Ti as abiEntrySchema,
|
|
153
|
+
ki as abiSchema,
|
|
154
154
|
Ja as activeOnchainRecoverySchema,
|
|
155
155
|
Qm as addOwnersCalldataSchema,
|
|
156
156
|
Jm as addPluginCalldataSchema,
|
|
@@ -202,15 +202,15 @@ export {
|
|
|
202
202
|
e as bigDecimal,
|
|
203
203
|
cm as bigNumberSchema,
|
|
204
204
|
$m as bigNumberishSchema,
|
|
205
|
-
|
|
205
|
+
Qi as bipsToPercent,
|
|
206
206
|
Km as booleanToStringSchema,
|
|
207
207
|
We as buildConstructorCalldata,
|
|
208
208
|
Ko as buildDummyTx,
|
|
209
209
|
yr as buildSellOptsSchema,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
Ci as builtinsSchema,
|
|
211
|
+
yi as byteCodeSchema,
|
|
212
|
+
Ei as cairo1EventSchema,
|
|
213
|
+
Di as cairoAssemblySchema,
|
|
214
214
|
de as cairoVersionSchema,
|
|
215
215
|
jo as calculateCubeRootAdjustment,
|
|
216
216
|
Xo as calculateNonLinearAdjustment,
|
|
@@ -225,16 +225,16 @@ export {
|
|
|
225
225
|
Wt as collateralizedDebtGroupSchema,
|
|
226
226
|
Ut as collateralizedDebtPositionSchema,
|
|
227
227
|
qt as collateralizedDebtPositionsSchema,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
Fi as compiledContractClassSchema,
|
|
229
|
+
vi as compiledSierraCasmSchema,
|
|
230
|
+
Ri as compiledSierraSchema,
|
|
231
|
+
Ni 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
|
-
|
|
237
|
+
Pi as contractEntryPointFieldsSchema,
|
|
238
238
|
Xr as convertCurrencyValueToTokenAmount,
|
|
239
239
|
Zr as convertTokenAmountToCurrencyValue,
|
|
240
240
|
Jr as convertTokenUnitAmountWithDecimals,
|
|
@@ -256,8 +256,8 @@ export {
|
|
|
256
256
|
im as encodeBase58Array,
|
|
257
257
|
Qn as ensureArray,
|
|
258
258
|
et as ensureDecimals,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
zi as entryPointToHumanReadable,
|
|
260
|
+
bi as entryPointsByTypeSchema,
|
|
261
261
|
za as equalNft,
|
|
262
262
|
Po as erc20TransferTransaction,
|
|
263
263
|
bo as erc721SafeTransferFromTransaction,
|
|
@@ -270,8 +270,8 @@ export {
|
|
|
270
270
|
hn as estimatedFeesToMaxFeeTotalV2,
|
|
271
271
|
an as estimatedFeesToTotal,
|
|
272
272
|
fn as estimatedFeesToTotalV2,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
Ii as eventAbiSchema,
|
|
274
|
+
Bi as eventEntrySchema,
|
|
275
275
|
mi as executeOnPluginCalldataSchema,
|
|
276
276
|
jn as feeTokenNeedsTxV3Support,
|
|
277
277
|
ii as feltSchema,
|
|
@@ -285,8 +285,8 @@ export {
|
|
|
285
285
|
H as formatTruncatedAddress,
|
|
286
286
|
O as formatTruncatedSignerKey,
|
|
287
287
|
L as formatTruncatedString,
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
wi as functionAbiSchema,
|
|
289
|
+
_i as functionAbiTypeSchema,
|
|
290
290
|
$n as generateAvatarImage,
|
|
291
291
|
qe as getAccountContractAddress,
|
|
292
292
|
Ge as getAccountDeploymentPayload,
|
|
@@ -385,8 +385,8 @@ export {
|
|
|
385
385
|
z as isZeroAddress,
|
|
386
386
|
Ra as knownDappSchema,
|
|
387
387
|
Na as knownDappsSchema,
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
Vi as legacyContractClassSchema,
|
|
389
|
+
Hi as legacyEventSchema,
|
|
390
390
|
vr as lendingInvestmentSchema,
|
|
391
391
|
Rr as liquidStakingInvestmentSchema,
|
|
392
392
|
si as looseCalldataSchema,
|
|
@@ -420,9 +420,9 @@ export {
|
|
|
420
420
|
it as prettifyTokenAmount,
|
|
421
421
|
_m as prettifyTokenNumber,
|
|
422
422
|
Jt as productGroupsSchema,
|
|
423
|
-
|
|
423
|
+
Oi as programSchema,
|
|
424
424
|
Wa as providersNamesSchema,
|
|
425
|
-
|
|
425
|
+
Li as pythonicHintsSchema,
|
|
426
426
|
Si as rawArgsArraySchema,
|
|
427
427
|
di as rawArgsObjectSchema,
|
|
428
428
|
pi as rawArgsSchema,
|
|
@@ -434,12 +434,12 @@ export {
|
|
|
434
434
|
hi as removePluginCalldataSchema,
|
|
435
435
|
fi as replaceSignerCalldataSchema,
|
|
436
436
|
Vr as replaceValueRecursively,
|
|
437
|
-
|
|
437
|
+
$i as retryUntilInitialised,
|
|
438
438
|
Xm as safeParseAndWarn,
|
|
439
439
|
ur as seedphraseSchema,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
Mi as sierraContractEntryPointFieldsSchema,
|
|
441
|
+
Wi as sierraEntryPointsByTypeSchema,
|
|
442
|
+
Ui as sierraProgramDebugInfoSchema,
|
|
443
443
|
Nr as stakerInfoSchema,
|
|
444
444
|
Pr as stakingActionSchema,
|
|
445
445
|
$t as stakingPositionSchema,
|
|
@@ -457,7 +457,7 @@ export {
|
|
|
457
457
|
ro as strkDelegatedStakingPositionSchema,
|
|
458
458
|
Ir as strkStakingCalldataResponseSchema,
|
|
459
459
|
Br as strkStakingCalldataSchema,
|
|
460
|
-
|
|
460
|
+
qi as structAbiSchema,
|
|
461
461
|
Sn as toMax,
|
|
462
462
|
dn as tokensRequireTxV3Support,
|
|
463
463
|
Go as transactionReviewTransactionsSchema,
|
|
@@ -465,14 +465,15 @@ export {
|
|
|
465
465
|
ui as transferCalldataSchema,
|
|
466
466
|
_o as trpcErrorSchema,
|
|
467
467
|
Gn as txVersionSchema,
|
|
468
|
-
Ai as
|
|
468
|
+
Ai as typedDataSchema,
|
|
469
|
+
gi as uint256Schema,
|
|
469
470
|
io as unclaimedRewardsSchema,
|
|
470
471
|
pn as unitToFeeTokenAddress,
|
|
471
|
-
|
|
472
|
+
ji as urlWithQuery,
|
|
472
473
|
Gr as useToken,
|
|
473
474
|
j as validChecksumAddressSchema,
|
|
474
475
|
X as validateAddressRangeSchema,
|
|
475
|
-
|
|
476
|
+
Yi as voidify,
|
|
476
477
|
co as webBaseTokenSchema,
|
|
477
478
|
So as webBaseTokenWithBalanceSchema,
|
|
478
479
|
po as webTokenInfoDetailsSchema,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./src/features/paymaster/PaymasterService.cjs"),e=require("./src/features/paymaster/types.cjs");exports.PaymasterService=a.PaymasterService;exports.paymasterExecuteParams=e.paymasterExecuteParams;exports.paymasterExecuteResponse=e.paymasterExecuteResponse;exports.paymasterExecutionDataParams=e.paymasterExecutionDataParams;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PaymasterService as r } from "./src/features/paymaster/PaymasterService.js";
|
|
2
|
+
import { paymasterExecuteParams as m, paymasterExecuteResponse as s, paymasterExecutionDataParams as o } from "./src/features/paymaster/types.js";
|
|
3
|
+
export {
|
|
4
|
+
r as PaymasterService,
|
|
5
|
+
m as paymasterExecuteParams,
|
|
6
|
+
s as paymasterExecuteResponse,
|
|
7
|
+
o as paymasterExecutionDataParams
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),s=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),s=require("zod"),d=require("./address.cjs"),m=require("./argentName.cjs"),o=require("../../errors/address.cjs"),w=require("../../http/HttpError.cjs"),E=s.z.object({walletAddress:d.addressSchemaArgentBackend,ens:m.argentNameSchema,chain:s.z.enum(["ethereum","starknet"]),deleted:s.z.boolean(),walletDeployed:s.z.boolean()}).or(s.z.object({status:s.z.string()}));async function N(t,n,a,c="starknet"){const i={ens:t,chain:c},l=new URLSearchParams(i),A=u(a,"wallet",`?${l}`);try{const e=await n.get(A),r=e&&"walletAddress"in e?e.walletAddress:void 0;if(!r)throw new o.AddressError({code:"NO_ADDRESS_FROM_ARGENT_NAME"});if(d.isZeroAddress(r))throw new o.AddressError({code:"ARGENT_NAME_NOT_FOUND",message:`${t} not found`});if(!d.isValidAddress(r))throw new o.AddressError({code:"ARGENT_NAME_INVALID_ADDRESS",message:`${t} resolved to an invalid address (${r})`});return d.normalizeAddress(r)}catch(e){throw e instanceof w.HttpError&&e.status===404?new o.AddressError({code:"ARGENT_NAME_NOT_FOUND",message:`${t} not found`}):e}}exports.apiWalletResponseSchema=E;exports.getAddressFromArgentName=N;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import m from "url-join";
|
|
2
2
|
import { z as s } from "zod";
|
|
3
|
+
import { addressSchemaArgentBackend as A, isZeroAddress as w, isValidAddress as f, normalizeAddress as N } from "./address.js";
|
|
4
|
+
import { argentNameSchema as h } from "./argentName.js";
|
|
3
5
|
import { AddressError as t } from "../../errors/address.js";
|
|
4
|
-
import { argentNameSchema as A } from "./argentName.js";
|
|
5
|
-
import { addressSchemaArgentBackend as w, isZeroAddress as f, isValidAddress as N, normalizeAddress as h } from "./address.js";
|
|
6
6
|
import { HttpError as _ } from "../../http/HttpError.js";
|
|
7
7
|
const O = s.object({
|
|
8
|
-
walletAddress:
|
|
9
|
-
ens:
|
|
8
|
+
walletAddress: A,
|
|
9
|
+
ens: h,
|
|
10
10
|
chain: s.enum(["ethereum", "starknet"]),
|
|
11
11
|
deleted: s.boolean(),
|
|
12
12
|
walletDeployed: s.boolean()
|
|
@@ -24,17 +24,17 @@ async function T(o, n, a, d = "starknet") {
|
|
|
24
24
|
throw new t({
|
|
25
25
|
code: "NO_ADDRESS_FROM_ARGENT_NAME"
|
|
26
26
|
});
|
|
27
|
-
if (
|
|
27
|
+
if (w(r))
|
|
28
28
|
throw new t({
|
|
29
29
|
code: "ARGENT_NAME_NOT_FOUND",
|
|
30
30
|
message: `${o} not found`
|
|
31
31
|
});
|
|
32
|
-
if (!
|
|
32
|
+
if (!f(r))
|
|
33
33
|
throw new t({
|
|
34
34
|
code: "ARGENT_NAME_INVALID_ADDRESS",
|
|
35
35
|
message: `${o} resolved to an invalid address (${r})`
|
|
36
36
|
});
|
|
37
|
-
return
|
|
37
|
+
return N(r);
|
|
38
38
|
} catch (e) {
|
|
39
39
|
throw e instanceof _ && e.status === 404 ? new t({
|
|
40
40
|
code: "ARGENT_NAME_NOT_FOUND",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../address.cjs"),a=require("../../argentName.cjs"),o=require("../../getAddressFromArgentName.cjs"),n=require("../../getAddressFromStarkName.cjs"),i=require("../../starknetId.cjs"),s=require("../../../../errors/address.cjs");class A{constructor(e,r,t){this.httpService=e,this.baseUrl=r,this.allowedArgentNameNetworkId=t}async parseAddressOrDomain(e,r,t){if(d.isAddress(e))return d.normalizeAddress(e);try{return await this.getAddressFromDomainName(e,r,t)}catch{throw new s.AddressError({code:"NOT_VALID"})}}async getAddressFromDomainName(e,r,t){if(i.isStarknetId(e))return n.getAddressFromStarkName(e,r,t);if(a.isArgentName(e)){if(r!==this.allowedArgentNameNetworkId)throw new s.AddressError({code:"ARGENT_NAME_INVALID_NETWORK",message:`Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`});return o.getAddressFromArgentName(e,this.httpService,this.baseUrl)}throw new s.AddressError({code:"NO_ADDRESS_FROM_DOMAIN"})}}exports.StarknetAddressService=A;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AddressError as s } from "../../../../errors/address.js";
|
|
2
1
|
import { isAddress as o, normalizeAddress as i } from "../../address.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { isArgentName as m } from "../../argentName.js";
|
|
3
|
+
import { getAddressFromArgentName as a } from "../../getAddressFromArgentName.js";
|
|
4
|
+
import { getAddressFromStarkName as d } from "../../getAddressFromStarkName.js";
|
|
5
|
+
import { isStarknetId as n } from "../../starknetId.js";
|
|
6
|
+
import { AddressError as s } from "../../../../errors/address.js";
|
|
7
7
|
class p {
|
|
8
8
|
constructor(e, r, t) {
|
|
9
9
|
this.httpService = e, this.baseUrl = r, this.allowedArgentNameNetworkId = t;
|
|
@@ -18,15 +18,15 @@ class p {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
async getAddressFromDomainName(e, r, t) {
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
23
|
-
if (
|
|
21
|
+
if (n(e))
|
|
22
|
+
return d(e, r, t);
|
|
23
|
+
if (m(e)) {
|
|
24
24
|
if (r !== this.allowedArgentNameNetworkId)
|
|
25
25
|
throw new s({
|
|
26
26
|
code: "ARGENT_NAME_INVALID_NETWORK",
|
|
27
27
|
message: `Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`
|
|
28
28
|
});
|
|
29
|
-
return
|
|
29
|
+
return a(e, this.httpService, this.baseUrl);
|
|
30
30
|
}
|
|
31
31
|
throw new s({
|
|
32
32
|
code: "NO_ADDRESS_FROM_DOMAIN"
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TypedData } from 'starknet';
|
|
2
|
+
import { PaymasterExecutionDataParams, PaymasterExecuteParams } from './types';
|
|
3
|
+
export interface IPaymasterService {
|
|
4
|
+
getExecutionData(params: PaymasterExecutionDataParams, useAvnu?: boolean): Promise<TypedData>;
|
|
5
|
+
execute(params: PaymasterExecuteParams, useAvnu?: boolean): Promise<string>;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("starknet"),l=require("url-join"),u=require("./types.cjs"),p=require("../../utils/starknet/starknet.cjs");class y{constructor(e="",t){this.argentRelayerUrl=e,this.httpService=t}async getExecutionData(e,t=!1){const r=l(t?this.getAvnuUrl(e.networkId):this.argentRelayerUrl,"/build-typed-data"),n={calls:t?e.calls.map(o=>({contractAddress:s.num.toHex(o.contractAddress),calldata:s.CallData.toCalldata(o.calldata).map(d=>s.num.toHex(d)),entrypoint:o.entrypoint})):e.calls,userAddress:e.accountAddress,gasTokenAddress:s.num.toHex(e.feeTokenAddress),maxGasTokenAmount:s.num.toHex(e.maxFee),accountClassHash:e.accountClassHash},a=await this.httpService.post(r,{body:s.json.stringify(n),headers:{"Content-Type":"application/json"}}),c=p.typedDataSchema.safeParse(a);if(!c.success)throw new Error("Invalid response from paymaster");return c.data}getAvnuUrl(e){if(!e)throw new Error("Network id is required for Avnu paymaster");let t="";if(e==="mainnet"||e==="mainnet-alpha")t="starknet";else if(e==="sepolia"||e==="sepolia-alpha")t="sepolia";else throw new Error("Invalid network id");return`https://${t}.api.avnu.fi/paymaster/v1`}async execute(e,t=!1){const r=l(t?this.getAvnuUrl(e.networkId):this.argentRelayerUrl,"/execute"),i={signature:e.signature,userAddress:e.accountAddress,typedData:t?s.json.stringify(e.typedData):e.typedData},n=await this.httpService.post(r,{body:s.json.stringify(i),headers:{"Content-Type":"application/json"}}),a=u.paymasterExecuteResponse.safeParse(n);if(!a.success)throw new Error("Invalid response from paymaster");return a.data.transactionHash}}exports.PaymasterService=y;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TypedData } from '@starknet-io/types-js';
|
|
2
|
+
import { IHttpService } from '../../http';
|
|
3
|
+
import { IPaymasterService } from './IPaymasterService';
|
|
4
|
+
import { PaymasterExecuteParams, PaymasterExecutionDataParams } from './types';
|
|
5
|
+
export declare class PaymasterService implements IPaymasterService {
|
|
6
|
+
private readonly argentRelayerUrl;
|
|
7
|
+
private readonly httpService;
|
|
8
|
+
constructor(argentRelayerUrl: string | undefined, httpService: IHttpService);
|
|
9
|
+
getExecutionData(params: PaymasterExecutionDataParams, useAvnu?: boolean): Promise<TypedData>;
|
|
10
|
+
getAvnuUrl(networkId?: string): string;
|
|
11
|
+
execute(params: PaymasterExecuteParams, useAvnu?: boolean): Promise<string>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { CallData as y, num as a, json as i } from "starknet";
|
|
2
|
+
import d from "url-join";
|
|
3
|
+
import { paymasterExecuteResponse as u } from "./types.js";
|
|
4
|
+
import { typedDataSchema as h } from "../../utils/starknet/starknet.js";
|
|
5
|
+
class A {
|
|
6
|
+
constructor(e = "", t) {
|
|
7
|
+
this.argentRelayerUrl = e, this.httpService = t;
|
|
8
|
+
}
|
|
9
|
+
async getExecutionData(e, t = !1) {
|
|
10
|
+
const r = d(t ? this.getAvnuUrl(e.networkId) : this.argentRelayerUrl, "/build-typed-data"), o = {
|
|
11
|
+
calls: t ? e.calls.map((n) => ({
|
|
12
|
+
contractAddress: a.toHex(n.contractAddress),
|
|
13
|
+
calldata: y.toCalldata(n.calldata).map((p) => a.toHex(p)),
|
|
14
|
+
entrypoint: n.entrypoint
|
|
15
|
+
})) : e.calls,
|
|
16
|
+
userAddress: e.accountAddress,
|
|
17
|
+
gasTokenAddress: a.toHex(e.feeTokenAddress),
|
|
18
|
+
maxGasTokenAmount: a.toHex(e.maxFee),
|
|
19
|
+
accountClassHash: e.accountClassHash
|
|
20
|
+
}, s = await this.httpService.post(r, {
|
|
21
|
+
body: i.stringify(o),
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json"
|
|
24
|
+
}
|
|
25
|
+
}), l = h.safeParse(s);
|
|
26
|
+
if (!l.success)
|
|
27
|
+
throw new Error("Invalid response from paymaster");
|
|
28
|
+
return l.data;
|
|
29
|
+
}
|
|
30
|
+
getAvnuUrl(e) {
|
|
31
|
+
if (!e)
|
|
32
|
+
throw new Error("Network id is required for Avnu paymaster");
|
|
33
|
+
let t = "";
|
|
34
|
+
if (e === "mainnet" || e === "mainnet-alpha")
|
|
35
|
+
t = "starknet";
|
|
36
|
+
else if (e === "sepolia" || e === "sepolia-alpha")
|
|
37
|
+
t = "sepolia";
|
|
38
|
+
else
|
|
39
|
+
throw new Error("Invalid network id");
|
|
40
|
+
return `https://${t}.api.avnu.fi/paymaster/v1`;
|
|
41
|
+
}
|
|
42
|
+
async execute(e, t = !1) {
|
|
43
|
+
const r = d(t ? this.getAvnuUrl(e.networkId) : this.argentRelayerUrl, "/execute"), c = {
|
|
44
|
+
signature: e.signature,
|
|
45
|
+
userAddress: e.accountAddress,
|
|
46
|
+
typedData: t ? i.stringify(e.typedData) : e.typedData
|
|
47
|
+
}, o = await this.httpService.post(r, {
|
|
48
|
+
body: i.stringify(c),
|
|
49
|
+
headers: {
|
|
50
|
+
"Content-Type": "application/json"
|
|
51
|
+
}
|
|
52
|
+
}), s = u.safeParse(o);
|
|
53
|
+
if (!s.success)
|
|
54
|
+
throw new Error("Invalid response from paymaster");
|
|
55
|
+
return s.data.transactionHash;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
A as PaymasterService
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("zod"),a=require("../../chains/starknet/address.cjs"),t=require("../../utils/starknet/starknet.cjs"),s=require("../../backend/schema.cjs"),r=e.z.object({calls:e.z.array(t.callSchema),accountAddress:a.addressSchema,networkId:s.argentNetworkIdSchema.or(s.argentBackendNetworkIdSchema).optional(),feeTokenAddress:a.addressSchema,maxFee:t.bigNumberishSchema,accountClassHash:e.z.string().optional()}),c=e.z.object({signature:e.z.string().array(),accountAddress:a.addressSchema,typedData:t.typedDataSchema,networkId:s.argentNetworkIdSchema.optional()}),o=e.z.object({transactionHash:e.z.string()});exports.paymasterExecuteParams=c;exports.paymasterExecuteResponse=o;exports.paymasterExecutionDataParams=r;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paymasterExecutionDataParams: z.ZodObject<{
|
|
3
|
+
calls: z.ZodArray<z.ZodType<import('starknet').Call, z.ZodTypeDef, import('starknet').Call>, "many">;
|
|
4
|
+
accountAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
5
|
+
networkId: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["mainnet-alpha", "sepolia-alpha"]>, z.ZodEnum<["mainnet", "sepolia"]>]>>;
|
|
6
|
+
feeTokenAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
7
|
+
maxFee: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBigInt]>;
|
|
8
|
+
accountClassHash: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
accountAddress: `0x${string}`;
|
|
11
|
+
calls: import('starknet').Call[];
|
|
12
|
+
maxFee: string | number | bigint;
|
|
13
|
+
feeTokenAddress: `0x${string}`;
|
|
14
|
+
accountClassHash?: string | undefined;
|
|
15
|
+
networkId?: "mainnet-alpha" | "sepolia-alpha" | "mainnet" | "sepolia" | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
accountAddress: string;
|
|
18
|
+
calls: import('starknet').Call[];
|
|
19
|
+
maxFee: string | number | bigint;
|
|
20
|
+
feeTokenAddress: string;
|
|
21
|
+
accountClassHash?: string | undefined;
|
|
22
|
+
networkId?: "mainnet-alpha" | "sepolia-alpha" | "mainnet" | "sepolia" | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type PaymasterExecutionDataParams = z.infer<typeof paymasterExecutionDataParams>;
|
|
25
|
+
export declare const paymasterExecuteParams: z.ZodObject<{
|
|
26
|
+
signature: z.ZodArray<z.ZodString, "many">;
|
|
27
|
+
accountAddress: z.ZodEffects<z.ZodPipeline<z.ZodString, z.ZodEffects<z.ZodString, string, string>>, `0x${string}`, string>;
|
|
28
|
+
typedData: z.ZodObject<{
|
|
29
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
type: z.ZodLiteral<"merkletree">;
|
|
32
|
+
contains: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
name: string;
|
|
35
|
+
type: "merkletree";
|
|
36
|
+
contains: string;
|
|
37
|
+
}, {
|
|
38
|
+
name: string;
|
|
39
|
+
type: "merkletree";
|
|
40
|
+
contains: string;
|
|
41
|
+
}>, z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
type: z.ZodLiteral<"enum">;
|
|
44
|
+
contains: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
name: string;
|
|
47
|
+
type: "enum";
|
|
48
|
+
contains: string;
|
|
49
|
+
}, {
|
|
50
|
+
name: string;
|
|
51
|
+
type: "enum";
|
|
52
|
+
contains: string;
|
|
53
|
+
}>, z.ZodObject<{
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
type: z.ZodString;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
name: string;
|
|
58
|
+
type: string;
|
|
59
|
+
}, {
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
}>]>, "many">>;
|
|
63
|
+
primaryType: z.ZodString;
|
|
64
|
+
domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
65
|
+
message: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
message: Record<string, any> | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
|
|
68
|
+
types: Record<string, ({
|
|
69
|
+
name: string;
|
|
70
|
+
type: "merkletree";
|
|
71
|
+
contains: string;
|
|
72
|
+
} | {
|
|
73
|
+
name: string;
|
|
74
|
+
type: "enum";
|
|
75
|
+
contains: string;
|
|
76
|
+
} | {
|
|
77
|
+
name: string;
|
|
78
|
+
type: string;
|
|
79
|
+
})[]>;
|
|
80
|
+
primaryType: string;
|
|
81
|
+
domain: Record<string, unknown>;
|
|
82
|
+
}, {
|
|
83
|
+
message: Record<string, any> | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
|
|
84
|
+
types: Record<string, ({
|
|
85
|
+
name: string;
|
|
86
|
+
type: "merkletree";
|
|
87
|
+
contains: string;
|
|
88
|
+
} | {
|
|
89
|
+
name: string;
|
|
90
|
+
type: "enum";
|
|
91
|
+
contains: string;
|
|
92
|
+
} | {
|
|
93
|
+
name: string;
|
|
94
|
+
type: string;
|
|
95
|
+
})[]>;
|
|
96
|
+
primaryType: string;
|
|
97
|
+
domain: Record<string, unknown>;
|
|
98
|
+
}>;
|
|
99
|
+
networkId: z.ZodOptional<z.ZodEnum<["mainnet-alpha", "sepolia-alpha"]>>;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
signature: string[];
|
|
102
|
+
accountAddress: `0x${string}`;
|
|
103
|
+
typedData: {
|
|
104
|
+
message: Record<string, any> | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
|
|
105
|
+
types: Record<string, ({
|
|
106
|
+
name: string;
|
|
107
|
+
type: "merkletree";
|
|
108
|
+
contains: string;
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
type: "enum";
|
|
112
|
+
contains: string;
|
|
113
|
+
} | {
|
|
114
|
+
name: string;
|
|
115
|
+
type: string;
|
|
116
|
+
})[]>;
|
|
117
|
+
primaryType: string;
|
|
118
|
+
domain: Record<string, unknown>;
|
|
119
|
+
};
|
|
120
|
+
networkId?: "mainnet-alpha" | "sepolia-alpha" | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
signature: string[];
|
|
123
|
+
accountAddress: string;
|
|
124
|
+
typedData: {
|
|
125
|
+
message: Record<string, any> | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
|
|
126
|
+
types: Record<string, ({
|
|
127
|
+
name: string;
|
|
128
|
+
type: "merkletree";
|
|
129
|
+
contains: string;
|
|
130
|
+
} | {
|
|
131
|
+
name: string;
|
|
132
|
+
type: "enum";
|
|
133
|
+
contains: string;
|
|
134
|
+
} | {
|
|
135
|
+
name: string;
|
|
136
|
+
type: string;
|
|
137
|
+
})[]>;
|
|
138
|
+
primaryType: string;
|
|
139
|
+
domain: Record<string, unknown>;
|
|
140
|
+
};
|
|
141
|
+
networkId?: "mainnet-alpha" | "sepolia-alpha" | undefined;
|
|
142
|
+
}>;
|
|
143
|
+
export type PaymasterExecuteParams = z.infer<typeof paymasterExecuteParams>;
|
|
144
|
+
export declare const paymasterExecuteResponse: z.ZodObject<{
|
|
145
|
+
transactionHash: z.ZodString;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
transactionHash: string;
|
|
148
|
+
}, {
|
|
149
|
+
transactionHash: string;
|
|
150
|
+
}>;
|
|
151
|
+
export type PaymasterExecuteResponse = z.infer<typeof paymasterExecuteResponse>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z as a } from "zod";
|
|
2
|
+
import { addressSchema as e } from "../../chains/starknet/address.js";
|
|
3
|
+
import { bigNumberishSchema as r, callSchema as o, typedDataSchema as s } from "../../utils/starknet/starknet.js";
|
|
4
|
+
import { argentNetworkIdSchema as t, argentBackendNetworkIdSchema as c } from "../../backend/schema.js";
|
|
5
|
+
const p = a.object({
|
|
6
|
+
calls: a.array(o),
|
|
7
|
+
accountAddress: e,
|
|
8
|
+
networkId: t.or(c).optional(),
|
|
9
|
+
feeTokenAddress: e,
|
|
10
|
+
maxFee: r,
|
|
11
|
+
accountClassHash: a.string().optional()
|
|
12
|
+
}), h = a.object({
|
|
13
|
+
signature: a.string().array(),
|
|
14
|
+
accountAddress: e,
|
|
15
|
+
typedData: s,
|
|
16
|
+
networkId: t.optional()
|
|
17
|
+
// deploymentData: z.object() // TODO: Implement account deployment
|
|
18
|
+
}), l = a.object({
|
|
19
|
+
transactionHash: a.string()
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
h as paymasterExecuteParams,
|
|
23
|
+
l as paymasterExecuteResponse,
|
|
24
|
+
p as paymasterExecutionDataParams
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../chains/starknet/address.cjs"),r=require("../chains/starknet/constants.cjs"),o=require("../chains/starknet/services/deploymentData/getAccountClassHash.cjs"),u=[r.STRK_TOKEN_ADDRESS];function n({address:e}){return u.some(s=>t.isEqualAddress(e,s))}function a(e){return e?o.getArgentAccountClassHashesWithTxV3Support().some(s=>t.isEqualAddress(s,e)):!1}exports.classHashSupportsTxV3=a;exports.feeTokenNeedsTxV3Support=n;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getArgentAccountClassHashesWithTxV3Support as t } from "../chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
2
|
-
import { STRK_TOKEN_ADDRESS as s } from "../chains/starknet/constants.js";
|
|
3
1
|
import { isEqualAddress as o } from "../chains/starknet/address.js";
|
|
4
|
-
|
|
2
|
+
import { STRK_TOKEN_ADDRESS as t } from "../chains/starknet/constants.js";
|
|
3
|
+
import { getArgentAccountClassHashesWithTxV3Support as s } from "../chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
4
|
+
const n = [t];
|
|
5
5
|
function f({ address: r }) {
|
|
6
6
|
return n.some((e) => o(r, e));
|
|
7
7
|
}
|
|
8
8
|
function m(r) {
|
|
9
|
-
return r ?
|
|
9
|
+
return r ? s().some((e) => o(e, r)) : !1;
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
12
|
m as classHashSupportsTxV3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("zod"),h=require("../../chains/starknet/address.cjs"),t=a.z.union([a.z.string(),a.z.number(),a.z.bigint()]),l=a.z.object({low:t,high:t}),o=a.z.array(a.z.string()).and(a.z.object({__compiled__:a.z.boolean().optional()}).optional()),s=a.z.lazy(()=>a.z.array(a.z.union([r,a.z.array(r),c]))),r=a.z.union([t,l,a.z.any(),a.z.boolean()]),i=a.z.lazy(()=>a.z.record(a.z.union([r,a.z.array(r),c]))),c=a.z.lazy(()=>a.z.union([i,s])),z=a.z.union([c,o]).optional(),m=a.z.lazy(()=>a.z.object({contractAddress:a.z.string(),calldata:z,entrypoint:a.z.string().optional()})),d=a.z.lazy(()=>m.and(a.z.object({entrypoint:a.z.string()}))),e=a.z.string().refine(n=>typeof parseInt(n)=="number"),S=a.z.tuple([e]),g=a.z.tuple([e]),u=a.z.object({new_threshold:a.z.string().refine(n=>typeof parseInt(n)=="number"),signers_to_add:a.z.array(e)}),p=a.z.object({new_threshold:a.z.string().refine(n=>typeof parseInt(n)=="number"),signers_to_remove:a.z.array(e)}),y=a.z.object({signer_to_remove:e,signer_to_add:e}),b=a.z.tuple([e]),C=a.z.tuple([e]),j=a.z.tuple([e]),w=a.z.tuple([e]).rest(e),_=a.z.object({recipient:h.addressSchema,amount:a.z.object({low:t,high:t})}),f=a.z.object({types:a.z.record(a.z.array(a.z.union([a.z.object({name:a.z.string(),type:a.z.literal("merkletree"),contains:a.z.string()}),a.z.object({name:a.z.string(),type:a.z.literal("enum"),contains:a.z.string()}),a.z.object({name:a.z.string(),type:a.z.string()})]))),primaryType:a.z.string(),domain:a.z.record(a.z.unknown()),message:a.z.record(a.z.string(),a.z.any()).or(a.z.object({}).passthrough())});exports.addOwnersCalldataSchema=u;exports.addPluginCalldataSchema=C;exports.bigNumberishSchema=t;exports.callDetailsSchema=m;exports.callSchema=d;exports.calldataSchema=o;exports.changeGuardianCalldataSchema=S;exports.changeThresholdCalldataSchema=b;exports.escapeGuardianCalldataSchema=g;exports.executeOnPluginCalldataSchema=w;exports.feltSchema=e;exports.looseCalldataSchema=z;exports.multiTypeSchema=r;exports.rawArgsArraySchema=s;exports.rawArgsObjectSchema=i;exports.rawArgsSchema=c;exports.removeOwnersCalldataSchema=p;exports.removePluginCalldataSchema=j;exports.replaceSignerCalldataSchema=y;exports.transferCalldataSchema=_;exports.typedDataSchema=f;exports.uint256Schema=l;
|
|
@@ -102,3 +102,74 @@ export declare const transferCalldataSchema: z.ZodObject<{
|
|
|
102
102
|
low: string | number | bigint;
|
|
103
103
|
};
|
|
104
104
|
}>;
|
|
105
|
+
export declare const typedDataSchema: z.ZodObject<{
|
|
106
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
type: z.ZodLiteral<"merkletree">;
|
|
109
|
+
contains: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
name: string;
|
|
112
|
+
type: "merkletree";
|
|
113
|
+
contains: string;
|
|
114
|
+
}, {
|
|
115
|
+
name: string;
|
|
116
|
+
type: "merkletree";
|
|
117
|
+
contains: string;
|
|
118
|
+
}>, z.ZodObject<{
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
type: z.ZodLiteral<"enum">;
|
|
121
|
+
contains: z.ZodString;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
name: string;
|
|
124
|
+
type: "enum";
|
|
125
|
+
contains: string;
|
|
126
|
+
}, {
|
|
127
|
+
name: string;
|
|
128
|
+
type: "enum";
|
|
129
|
+
contains: string;
|
|
130
|
+
}>, z.ZodObject<{
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
type: z.ZodString;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
name: string;
|
|
135
|
+
type: string;
|
|
136
|
+
}, {
|
|
137
|
+
name: string;
|
|
138
|
+
type: string;
|
|
139
|
+
}>]>, "many">>;
|
|
140
|
+
primaryType: z.ZodString;
|
|
141
|
+
domain: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
142
|
+
message: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
message: Record<string, any> | z.objectOutputType<{}, z.ZodTypeAny, "passthrough">;
|
|
145
|
+
types: Record<string, ({
|
|
146
|
+
name: string;
|
|
147
|
+
type: "merkletree";
|
|
148
|
+
contains: string;
|
|
149
|
+
} | {
|
|
150
|
+
name: string;
|
|
151
|
+
type: "enum";
|
|
152
|
+
contains: string;
|
|
153
|
+
} | {
|
|
154
|
+
name: string;
|
|
155
|
+
type: string;
|
|
156
|
+
})[]>;
|
|
157
|
+
primaryType: string;
|
|
158
|
+
domain: Record<string, unknown>;
|
|
159
|
+
}, {
|
|
160
|
+
message: Record<string, any> | z.objectInputType<{}, z.ZodTypeAny, "passthrough">;
|
|
161
|
+
types: Record<string, ({
|
|
162
|
+
name: string;
|
|
163
|
+
type: "merkletree";
|
|
164
|
+
contains: string;
|
|
165
|
+
} | {
|
|
166
|
+
name: string;
|
|
167
|
+
type: "enum";
|
|
168
|
+
contains: string;
|
|
169
|
+
} | {
|
|
170
|
+
name: string;
|
|
171
|
+
type: string;
|
|
172
|
+
})[]>;
|
|
173
|
+
primaryType: string;
|
|
174
|
+
domain: Record<string, unknown>;
|
|
175
|
+
}>;
|
|
@@ -1,57 +1,78 @@
|
|
|
1
1
|
import { z as a } from "zod";
|
|
2
2
|
import { addressSchema as c } from "../../chains/starknet/address.js";
|
|
3
|
-
const n = a.union([a.string(), a.number(), a.bigint()]),
|
|
3
|
+
const n = a.union([a.string(), a.number(), a.bigint()]), s = a.object({
|
|
4
4
|
low: n,
|
|
5
5
|
high: n
|
|
6
|
-
}),
|
|
6
|
+
}), l = a.array(a.string()).and(a.object({
|
|
7
7
|
__compiled__: a.boolean().optional()
|
|
8
|
-
}).optional()), i = a.lazy(() => a.array(a.union([
|
|
8
|
+
}).optional()), i = a.lazy(() => a.array(a.union([r, a.array(r), o]))), r = a.union([
|
|
9
9
|
n,
|
|
10
|
-
|
|
10
|
+
s,
|
|
11
11
|
a.any(),
|
|
12
12
|
a.boolean()
|
|
13
|
-
]), m = a.lazy(() => a.record(a.union([
|
|
13
|
+
]), m = a.lazy(() => a.record(a.union([r, a.array(r), o]))), o = a.lazy(() => a.union([m, i])), d = a.union([o, l]).optional(), h = a.lazy(() => a.object({
|
|
14
14
|
contractAddress: a.string(),
|
|
15
|
-
calldata:
|
|
15
|
+
calldata: d,
|
|
16
16
|
entrypoint: a.string().optional()
|
|
17
|
-
})),
|
|
17
|
+
})), u = a.lazy(() => h.and(a.object({
|
|
18
18
|
entrypoint: a.string()
|
|
19
|
-
}))), e = a.string().refine((t) => typeof parseInt(t) == "number"),
|
|
19
|
+
}))), e = a.string().refine((t) => typeof parseInt(t) == "number"), y = a.tuple([e]), b = a.tuple([e]), S = a.object({
|
|
20
20
|
new_threshold: a.string().refine((t) => typeof parseInt(t) == "number"),
|
|
21
21
|
signers_to_add: a.array(e)
|
|
22
|
-
}),
|
|
22
|
+
}), j = a.object({
|
|
23
23
|
new_threshold: a.string().refine((t) => typeof parseInt(t) == "number"),
|
|
24
24
|
signers_to_remove: a.array(e)
|
|
25
|
-
}),
|
|
25
|
+
}), _ = a.object({
|
|
26
26
|
signer_to_remove: e,
|
|
27
27
|
signer_to_add: e
|
|
28
|
-
}),
|
|
28
|
+
}), C = a.tuple([e]), f = a.tuple([e]), w = a.tuple([e]), z = a.tuple([e]).rest(e), A = a.object({
|
|
29
29
|
recipient: c,
|
|
30
30
|
amount: a.object({
|
|
31
31
|
low: n,
|
|
32
32
|
high: n
|
|
33
33
|
})
|
|
34
|
+
}), v = a.object({
|
|
35
|
+
types: a.record(a.array(a.union([
|
|
36
|
+
a.object({
|
|
37
|
+
name: a.string(),
|
|
38
|
+
type: a.literal("merkletree"),
|
|
39
|
+
contains: a.string()
|
|
40
|
+
}),
|
|
41
|
+
a.object({
|
|
42
|
+
name: a.string(),
|
|
43
|
+
type: a.literal("enum"),
|
|
44
|
+
contains: a.string()
|
|
45
|
+
}),
|
|
46
|
+
a.object({
|
|
47
|
+
name: a.string(),
|
|
48
|
+
type: a.string()
|
|
49
|
+
})
|
|
50
|
+
]))),
|
|
51
|
+
primaryType: a.string(),
|
|
52
|
+
domain: a.record(a.unknown()),
|
|
53
|
+
message: a.record(a.string(), a.any()).or(a.object({}).passthrough())
|
|
34
54
|
});
|
|
35
55
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
S as addOwnersCalldataSchema,
|
|
57
|
+
f as addPluginCalldataSchema,
|
|
38
58
|
n as bigNumberishSchema,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
h as callDetailsSchema,
|
|
60
|
+
u as callSchema,
|
|
61
|
+
l as calldataSchema,
|
|
62
|
+
y as changeGuardianCalldataSchema,
|
|
63
|
+
C as changeThresholdCalldataSchema,
|
|
44
64
|
b as escapeGuardianCalldataSchema,
|
|
45
65
|
z as executeOnPluginCalldataSchema,
|
|
46
66
|
e as feltSchema,
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
d as looseCalldataSchema,
|
|
68
|
+
r as multiTypeSchema,
|
|
49
69
|
i as rawArgsArraySchema,
|
|
50
70
|
m as rawArgsObjectSchema,
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
o as rawArgsSchema,
|
|
72
|
+
j as removeOwnersCalldataSchema,
|
|
53
73
|
w as removePluginCalldataSchema,
|
|
54
|
-
|
|
74
|
+
_ as replaceSignerCalldataSchema,
|
|
55
75
|
A as transferCalldataSchema,
|
|
56
|
-
|
|
76
|
+
v as typedDataSchema,
|
|
77
|
+
s as uint256Schema
|
|
57
78
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argent/x-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.62.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/argentlabs/x-shared.git"
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"types": "./dist/swap.d.ts",
|
|
31
31
|
"import": "./dist/swap.js",
|
|
32
32
|
"default": "./dist/swap.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./paymaster": {
|
|
35
|
+
"types": "./dist/paymaster.d.ts",
|
|
36
|
+
"import": "./dist/paymaster.js",
|
|
37
|
+
"default": "./dist/paymaster.cjs"
|
|
33
38
|
}
|
|
34
39
|
},
|
|
35
40
|
"scripts": {
|