@argent/x-shared 1.41.1 → 1.41.2
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 +277 -271
- package/dist/src/features/swap/services/implementation.cjs +1 -1
- package/dist/src/features/swap/services/implementation.js +11 -11
- package/dist/src/tokens/index.d.ts +1 -0
- package/dist/src/tokens/utils.cjs +1 -0
- package/dist/src/tokens/utils.js +9 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("./src/bigdecimal/index.cjs"),Q=require("./src/errors/baseErrors.cjs"),q=require("./src/account/account.model.cjs"),f=require("./src/account/accountv4.cjs"),w=require("./src/account/preferences.model.cjs"),p=require("./src/backend/schema.cjs"),J=require("./src/cache/CacheService.cjs"),n=require("./src/chains/starknet/address.cjs"),d=require("./src/chains/starknet/addressDomain.cjs"),_=require("./src/chains/starknet/addressInput.cjs"),A=require("./src/chains/starknet/argentName.cjs"),ee=require("./src/chains/starknet/cairoVersionSchema.cjs"),S=require("./src/chains/starknet/constants.cjs"),O=require("./src/chains/starknet/getAddressFromArgentName.cjs"),g=require("./src/chains/starknet/getAddressFromStarkName.cjs"),ae=require("./src/chains/starknet/network.cjs"),re=require("./src/chains/starknet/services/address/StarknetAddressService.cjs"),R=require("./src/chains/starknet/services/deploymentData/constants.cjs"),b=require("./src/chains/starknet/services/deploymentData/deploymentData.schema.cjs"),h=require("./src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs"),o=require("./src/chains/starknet/services/deploymentData/getAccountClassHash.cjs"),T=require("./src/chains/starknet/starknetId.cjs"),te=require("./src/http/DateService.cjs"),ne=require("./src/http/HttpError.cjs"),se=require("./src/http/HttpService.cjs"),ie=require("./src/http/IHttpService.cjs"),ce=require("./src/http/SWRService.cjs"),N=require("./src/http/fetcher.cjs"),H=require("./src/http/time.cjs"),oe=require("./src/knownDapps/KnownDappsBackendService.cjs"),k=require("./src/knownDapps/schema.cjs"),L=require("./src/knownDapps/utils/getDapplandUrl.cjs"),me=require("./src/nameResolution/ResolveNameService.cjs"),l=require("./src/nameResolution/schema.cjs"),Se=require("./src/nfts/BackendNftService.cjs"),V=require("./src/nfts/utils.cjs"),de=require("./src/onchainRecovery/OnchainRecoveryService.cjs"),i=require("./src/onchainRecovery/schema.cjs"),le=require("./src/platform/isBraveBrowser.cjs"),u=require("./src/platform/isBrowser.cjs"),ue=require("./src/signer/seedphrase.cjs"),x=require("./src/signer/multisigner.cjs"),he=require("./src/signer/mergeOwnerGuardianSignatures.cjs"),m=require("./src/staking/schema.cjs"),y=require("./src/tokens/balances.cjs"),pe=require("./src/tokens/constants.cjs"),Ae=require("./src/tokens/convertTokenAmountToCurrencyValue.cjs"),ge=require("./src/tokens/convertTokenUnitAmountWithDecimals.cjs"),Te=require("./src/tokens/ensureDecimals.cjs"),ke=require("./src/tokens/isUnlimitedAmount.cjs"),ye=require("./src/tokens/prettifyCurrencyValue.cjs"),M=require("./src/tokens/prettifyTokenAmount.cjs"),Ce=require("./src/tokens/getCurrencySymbol.cjs"),Ee=require("./src/tokens/service/implementation.cjs"),W=require("./src/tokens/service/tokenError.cjs"),e=require("./src/tokens/service/types/backend.model.cjs"),s=require("./src/tokens/service/types/defiPosition.model.cjs"),De=require("./src/tokens/service/types/defiPositionType.model.cjs"),U=require("./src/tokens/service/types/unclaimedRewards.model.cjs"),c=require("./src/tokens/service/types/webToken.model.cjs"),P=require("./src/transactions/amount.cjs"),F=require("./src/transactions/buildTransactions.cjs"),G=require("./src/transactions/errors.cjs"),I=require("./src/transactions/estimate/argentMaxFee.cjs"),z=require("./src/transactions/estimate/error.cjs"),ve=require("./src/transactions/estimate/model.cjs"),t=require("./src/transactions/estimate/utils.cjs"),j=require("./src/transactions/findTransfersAndApprovals.cjs"),qe=require("./src/transactions/getPrettyRcpError.cjs"),B=require("./src/transactions/getTransactionVersion.cjs"),fe=require("./src/transactions/service/implementation.cjs"),Re=require("./src/transactions/service/types.cjs"),be=require("./src/transactions/transactionReviewTypes.cjs"),K=require("./src/transactions/transactionVersion.cjs"),X=require("./src/transactions/txv3.cjs"),Ne=require("./src/utils/address.cjs"),Pe=require("./src/utils/arrays.cjs"),C=require("./src/utils/avatarImage.cjs"),E=require("./src/utils/base58.cjs"),Fe=require("./src/utils/bigNumber.cjs"),Ie=require("./src/utils/daysBetween.cjs"),Be=require("./src/utils/env.cjs"),$=require("./src/utils/hex.cjs"),we=require("./src/utils/id.cjs"),_e=require("./src/utils/initials.cjs"),Oe=require("./src/utils/isContractDeployed.cjs"),He=require("./src/utils/nonNullable.cjs"),Le=require("./src/utils/number/isAllowedAddressHexInputValue.cjs"),Ve=require("./src/utils/number/isAllowedNumericInputValue.cjs"),xe=require("./src/utils/number/isNumeric.cjs"),D=require("./src/utils/number/prettifyNumber.cjs"),Y=require("./src/utils/parseAmount.cjs"),Me=require("./src/utils/pluralise.cjs"),We=require("./src/utils/readFileAsString.cjs"),v=require("./src/utils/schemas.cjs"),r=require("./src/utils/starknet/starknet.cjs"),a=require("./src/utils/starknet/starknetSchemas.cjs"),Ue=require("./src/utils/transactions.cjs"),Ge=require("./src/utils/url/urlWithQuery.cjs"),ze=require("./src/utils/voidify.cjs"),je=require("./src/utils/bips.cjs");exports.bigDecimal=Z;exports.BaseError=Q.BaseError;exports.AddSmartAccountResponseSchema=q.AddSmartAccountResponseSchema;exports.AddSmartAcountRequestSchema=q.AddSmartAcountRequestSchema;exports.BackendAccountSchema=q.BackendAccountSchema;exports.isAccountV4=f.isAccountV4;exports.isAccountV5=f.isAccountV5;exports.isAccountV6=f.isAccountV6;exports.preferencesEndpointPayload=w.preferencesEndpointPayload;exports.preferencesSchema=w.preferencesSchema;exports.argentBackendNetworkIdSchema=p.argentBackendNetworkIdSchema;exports.argentNetworkIdSchema=p.argentNetworkIdSchema;exports.isArgentBackendNetworkId=p.isArgentBackendNetworkId;exports.isArgentNetworkId=p.isArgentNetworkId;exports.CacheService=J.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.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=d.addressOrDomainInputSchema;exports.addressOrDomainSchema=d.addressOrDomainSchema;exports.isEqualStarknetDomainName=d.isEqualStarknetDomainName;exports.isStarknetDomainName=d.isStarknetDomainName;exports.normalizeAddressOrDomain=d.normalizeAddressOrDomain;exports.starknetDomainNameSchema=d.starknetDomainNameSchema;exports.addressInputCharactersAndLengthSchema=_.addressInputCharactersAndLengthSchema;exports.addressInputSchema=_.addressInputSchema;exports.argentNameSchema=A.argentNameSchema;exports.isArgentName=A.isArgentName;exports.isEqualArgentName=A.isEqualArgentName;exports.normalizeArgentName=A.normalizeArgentName;exports.cairoVersionSchema=ee.cairoVersionSchema;exports.ETH_TOKEN_ADDRESS=S.ETH_TOKEN_ADDRESS;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=S.STANDARD_DEVNET_ACCOUNT_CLASS_HASH;exports.STRK_TOKEN_ADDRESS=S.STRK_TOKEN_ADDRESS;exports.TXV1_ACCOUNT_CLASS_HASH=S.TXV1_ACCOUNT_CLASS_HASH;exports.TXV1_MULTISIG_CLASS_HASH=S.TXV1_MULTISIG_CLASS_HASH;exports.TXV3_ACCOUNT_CLASS_HASH=S.TXV3_ACCOUNT_CLASS_HASH;exports.TXV3_MULTISIG_CLASS_HASH=S.TXV3_MULTISIG_CLASS_HASH;exports.apiWalletResponseSchema=O.apiWalletResponseSchema;exports.getAddressFromArgentName=O.getAddressFromArgentName;exports.getAddressFromStarkName=g.getAddressFromStarkName;exports.getCallFromStarkName=g.getCallFromStarkName;exports.getStarknetIdContractAddressFromNetworkId=g.getStarknetIdContractAddressFromNetworkId;exports.starkNameToCallDataDomain=g.starkNameToCallDataDomain;exports.getChainIdFromNetworkId=ae.getChainIdFromNetworkId;exports.StarknetAddressService=re.StarknetAddressService;exports.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES=R.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES;exports.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES=R.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES;exports.C0_PROXY_CONTRACT_CLASS_HASHES=R.C0_PROXY_CONTRACT_CLASS_HASHES;exports.constructorCallDataSchemaC0=b.constructorCallDataSchemaC0;exports.constructorCallDataSchemaC1V1=b.constructorCallDataSchemaC1V1;exports.implementationSchema=b.implementationSchema;exports.buildConstructorCalldata=h.buildConstructorCalldata;exports.findImplementationForAccount=h.findImplementationForAccount;exports.getAccountContractAddress=h.getAccountContractAddress;exports.getAccountDeploymentPayload=h.getAccountDeploymentPayload;exports.isEqualImplementation=h.isEqualImplementation;exports.getArgentAccountClassHashes=o.getArgentAccountClassHashes;exports.getArgentAccountClassHashesWithTxV3Support=o.getArgentAccountClassHashesWithTxV3Support;exports.getArgentAccountWithMultiSignerClassHashes=o.getArgentAccountWithMultiSignerClassHashes;exports.getLastCairo0ArgentAccountClassHash=o.getLastCairo0ArgentAccountClassHash;exports.getLatestArgentAccountClassHash=o.getLatestArgentAccountClassHash;exports.getLatestArgentMultisigClassHash=o.getLatestArgentMultisigClassHash;exports.getLatestLedgerAccountClassHash=o.getLatestLedgerAccountClassHash;exports.getLedgerAccountClassHashes=o.getLedgerAccountClassHashes;exports.isEqualStarknetId=T.isEqualStarknetId;exports.isStarknetId=T.isStarknetId;exports.normalizeStarknetId=T.normalizeStarknetId;exports.starknetIdSchema=T.starknetIdSchema;exports.DateService=te.DateService;exports.HttpError=ne.HttpError;exports.HTTPService=se.HTTPService;Object.defineProperty(exports,"HTTP_ERROR_MESSAGE",{enumerable:!0,get:()=>ie.HTTP_ERROR_MESSAGE});exports.SWRService=ce.SWRService;exports.fetchData=N.fetchData;exports.fetcherError=N.fetcherError;exports.postData=N.postData;exports.getBackendTimeNowSeconds=H.getBackendTimeNowSeconds;exports.getBackendTimeSeconds=H.getBackendTimeSeconds;exports.KnownDappsBackendService=oe.KnownDappsBackendService;exports.dappContractSchema=k.dappContractSchema;exports.dappLinkSchema=k.dappLinkSchema;exports.knownDappSchema=k.knownDappSchema;exports.knownDappsSchema=k.knownDappsSchema;exports.getDapplandLinkForDapp=L.getDapplandLinkForDapp;exports.getDapplandUrlForDapp=L.getDapplandUrlForDapp;exports.ResolveNameService=me.ResolveNameService;exports.nameProviderResolutionSchema=l.nameProviderResolutionSchema;exports.nameResolutionAddressSchema=l.nameResolutionAddressSchema;exports.nameResolutionAddressesSchema=l.nameResolutionAddressesSchema;exports.nameResolutionStarknetIdSchema=l.nameResolutionStarknetIdSchema;exports.nameResolutionStarknetIdsSchema=l.nameResolutionStarknetIdsSchema;exports.providersNamesSchema=l.providersNamesSchema;exports.BackendNftService=Se.BackendNftService;exports.equalNft=V.equalNft;exports.getNftPicture=V.getNftPicture;exports.OnchainRecoveryService=de.OnchainRecoveryService;Object.defineProperty(exports,"RecoveryStatusEnum",{enumerable:!0,get:()=>i.RecoveryStatusEnum});Object.defineProperty(exports,"StartOnchainRecoveryErrorStatusEnum",{enumerable:!0,get:()=>i.StartOnchainRecoveryErrorStatusEnum});exports.activeOnchainRecoverySchema=i.activeOnchainRecoverySchema;exports.onchainRecoverySchema=i.onchainRecoverySchema;exports.recoveryBaseSchema=i.recoveryBaseSchema;exports.recoveryBodySchema=i.recoveryBodySchema;exports.recoveryStatusSchema=i.recoveryStatusSchema;exports.startOnchainRecoveryErrorSchema=i.startOnchainRecoveryErrorSchema;exports.startOnchainRecoveryErrorStatusSchema=i.startOnchainRecoveryErrorStatusSchema;exports.startOnchainRecoverySchema=i.startOnchainRecoverySchema;exports.isBraveBrowser=le.isBraveBrowser;exports.getUAParserResult=u.getUAParserResult;exports.isBrowser=u.isBrowser;exports.isChromeBrowser=u.isChromeBrowser;exports.isEdgeBrowser=u.isEdgeBrowser;exports.isFirefoxBrowser=u.isFirefoxBrowser;exports.isSafariBrowser=u.isSafariBrowser;exports.seedphraseSchema=ue.seedphraseSchema;Object.defineProperty(exports,"MultiSigner",{enumerable:!0,get:()=>x.MultiSigner});exports.getSignerForMultiSigner=x.getSignerForMultiSigner;exports.mergeOwnerGuardianSignatures=he.mergeOwnerGuardianSignatures;exports.buildBuyCalldataResponseSchema=m.buildBuyCalldataResponseSchema;exports.buildBuyCalldataSchema=m.buildBuyCalldataSchema;exports.investmentMetaSchema=m.investmentMetaSchema;exports.investmentSchema=m.investmentSchema;exports.investmentsResponseSchema=m.investmentsResponseSchema;exports.lendingInvestmentSchema=m.lendingInvestmentSchema;exports.stakingInvestmentSchema=m.stakingInvestmentSchema;exports.strkDelegatedStakingInvestmentSchema=m.strkDelegatedStakingInvestmentSchema;exports.getTokenBalance=y.getTokenBalance;exports.getTokens=y.getTokens;exports.getTokensBalances=y.getTokensBalances;exports.useToken=y.useToken;exports.DEFAULT_TOKEN_DECIMALS=pe.DEFAULT_TOKEN_DECIMALS;exports.convertTokenAmountToCurrencyValue=Ae.convertTokenAmountToCurrencyValue;exports.convertTokenUnitAmountWithDecimals=ge.convertTokenUnitAmountWithDecimals;exports.ensureDecimals=Te.ensureDecimals;exports.isUnlimitedAmount=ke.isUnlimitedAmount;exports.prettifyCurrencyValue=ye.prettifyCurrencyValue;exports.PRETTY_UNLIMITED=M.PRETTY_UNLIMITED;exports.prettifyTokenAmount=M.prettifyTokenAmount;exports.getCurrencySymbol=Ce.getCurrencySymbol;exports.TokenServiceWeb=Ee.TokenServiceWeb;Object.defineProperty(exports,"TOKEN_ERROR_MESSAGES",{enumerable:!0,get:()=>W.TOKEN_ERROR_MESSAGES});exports.TokenError=W.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=s.collateralizedDebtGroupSchema;exports.collateralizedDebtPositionSchema=s.collateralizedDebtPositionSchema;exports.collateralizedDebtPositionsSchema=s.collateralizedDebtPositionsSchema;exports.concentratedLiquidityPositionSchema=s.concentratedLiquidityPositionSchema;exports.concentratedLiquidityPositionsSchema=s.concentratedLiquidityPositionsSchema;exports.defiDappsProductsSchema=s.defiDappsProductsSchema;exports.defiPositionSchema=s.defiPositionSchema;exports.defiProductSchema=s.defiProductSchema;exports.defiProductsSchema=s.defiProductsSchema;exports.delegatedTokensArraySchema=s.delegatedTokensArraySchema;exports.delegatedTokensSchema=s.delegatedTokensSchema;exports.productGroupsSchema=s.productGroupsSchema;exports.stakingPositionSchema=s.stakingPositionSchema;exports.stakingPositionsSchema=s.stakingPositionsSchema;exports.defiPositionTypeSchema=De.defiPositionTypeSchema;exports.airdropSchema=U.airdropSchema;exports.unclaimedRewardsSchema=U.unclaimedRewardsSchema;exports.webBaseTokenSchema=c.webBaseTokenSchema;exports.webBaseTokenWithBalanceSchema=c.webBaseTokenWithBalanceSchema;exports.webTokenInfoDetailsSchema=c.webTokenInfoDetailsSchema;exports.webTokenPriceDetailsSchema=c.webTokenPriceDetailsSchema;exports.webTokenSchema=c.webTokenSchema;exports.webTokenWithBalanceAndPriceSchema=c.webTokenWithBalanceAndPriceSchema;exports.webTokenWithBalanceSchema=c.webTokenWithBalanceSchema;exports.webTokenWithPriceSchema=c.webTokenWithPriceSchema;exports.webTokensWithBalanceAndPriceSchema=c.webTokensWithBalanceAndPriceSchema;exports.inputAmountSchema=P.inputAmountSchema;exports.isValidInputAmount=P.isValidInputAmount;exports.parseAmount=P.parseAmount;exports.erc20TransferTransaction=F.erc20TransferTransaction;exports.erc721SafeTransferFromTransaction=F.erc721SafeTransferFromTransaction;exports.erc721TransferFromTransaction=F.erc721TransferFromTransaction;exports.getMessageFromTrpcError=G.getMessageFromTrpcError;exports.trpcErrorSchema=G.trpcErrorSchema;exports.FEE_OVERHEAD=I.FEE_OVERHEAD;exports.argentMaxFee=I.argentMaxFee;exports.modifySnjsFeeOverhead=I.modifySnjsFeeOverhead;Object.defineProperty(exports,"ESTIMATE_ERROR_MESSAGES",{enumerable:!0,get:()=>z.ESTIMATE_ERROR_MESSAGES});exports.EstimateError=z.EstimateError;exports.transactionReviewTransactionsSchema=ve.transactionReviewTransactionsSchema;exports.buildDummyTx=t.buildDummyTx;exports.calculateCubeRootAdjustment=t.calculateCubeRootAdjustment;exports.calculateNonLinearAdjustment=t.calculateNonLinearAdjustment;exports.calculateSqrtAdjustment=t.calculateSqrtAdjustment;exports.castFeeEstimation=t.castFeeEstimation;exports.estimatedFeeToMaxFeeTotal=t.estimatedFeeToMaxFeeTotal;exports.estimatedFeeToMaxResourceBounds=t.estimatedFeeToMaxResourceBounds;exports.estimatedFeeToTotal=t.estimatedFeeToTotal;exports.estimatedFeesToMaxFeeTotal=t.estimatedFeesToMaxFeeTotal;exports.estimatedFeesToTotal=t.estimatedFeesToTotal;exports.getEstimatedFeeFromBulkSimulation=t.getEstimatedFeeFromBulkSimulation;exports.getEstimatedFeeFromSimulationAndRespectWatermarkFee=t.getEstimatedFeeFromSimulationAndRespectWatermarkFee;exports.getPayloadFromTransaction=t.getPayloadFromTransaction;exports.getWatermarkedMaxFeeTotal=t.getWatermarkedMaxFeeTotal;exports.isFRI=t.isFRI;exports.isWEI=t.isWEI;exports.multiplyBigIntByFloat=t.multiplyBigIntByFloat;exports.toMax=t.toMax;exports.tokensRequireTxV3Support=t.tokensRequireTxV3Support;exports.unitToFeeTokenAddress=t.unitToFeeTokenAddress;exports.EventsBySelector=j.EventsBySelector;exports.findTransfersAndApprovals=j.findTransfersAndApprovals;exports.getPrettyRpcError=qe.getPrettyRpcError;exports.getSimulationTxVersionFromFeeToken=B.getSimulationTxVersionFromFeeToken;exports.getTxVersionFromFeeToken=B.getTxVersionFromFeeToken;exports.getTxVersionFromFeeTokenForDeclareContract=B.getTxVersionFromFeeTokenForDeclareContract;exports.TransactionReviewServiceWeb=fe.TransactionReviewServiceWeb;exports.transactionReviewWarningSchema=Re.transactionReviewWarningSchema;exports.apiTransactionReviewActivityType=be.apiTransactionReviewActivityType;exports.denyTxV3=K.denyTxV3;exports.txVersionSchema=K.txVersionSchema;exports.classHashSupportsTxV3=X.classHashSupportsTxV3;exports.feeTokenNeedsTxV3Support=X.feeTokenNeedsTxV3Support;exports.formatAddress=Ne.formatAddress;exports.ensureArray=Pe.ensureArray;exports.generateAvatarImage=C.generateAvatarImage;exports.getColor=C.getColor;exports.getNetworkAccountImageUrl=C.getNetworkAccountImageUrl;exports.stripAddressZeroPadding=C.stripAddressZeroPadding;exports.decodeBase58=E.decodeBase58;exports.decodeBase58Array=E.decodeBase58Array;exports.encodeBase58=E.encodeBase58;exports.encodeBase58Array=E.encodeBase58Array;exports.bigNumberSchema=Fe.bigNumberSchema;exports.daysBetween=Ie.daysBetween;exports.isFeatureEnabled=Be.isFeatureEnabled;exports.hexSchema=$.hexSchema;exports.hexSchemaBase=$.hexSchemaBase;exports.id=we.id;exports.getInitials=_e.getInitials;exports.isContractDeployed=Oe.isContractDeployed;exports.nonNullable=He.nonNullable;exports.isAllowedAddressHexInputValue=Le.isAllowedAddressHexInputValue;exports.isAllowedNumericInputValue=Ve.isAllowedNumericInputValue;exports.isNumeric=xe.isNumeric;exports.prettifyCurrencyNumber=D.prettifyCurrencyNumber;exports.prettifyNumber=D.prettifyNumber;exports.prettifyNumberConfig=D.prettifyNumberConfig;exports.prettifyTokenNumber=D.prettifyTokenNumber;exports.getUint256CalldataFromBN=Y.getUint256CalldataFromBN;exports.parseAmountValue=Y.parseAmountValue;exports.pluralise=Me.pluralise;exports.readFileAsString=We.readFileAsString;exports.booleanToStringSchema=v.booleanToStringSchema;exports.createSchemaWithWarnings=v.createSchemaWithWarnings;exports.safeParseAndWarn=v.safeParseAndWarn;exports.stringToBooleanSchema=v.stringToBooleanSchema;exports.addOwnersCalldataSchema=r.addOwnersCalldataSchema;exports.addPluginCalldataSchema=r.addPluginCalldataSchema;exports.bigNumberishSchema=r.bigNumberishSchema;exports.callDetailsSchema=r.callDetailsSchema;exports.callSchema=r.callSchema;exports.calldataSchema=r.calldataSchema;exports.changeGuardianCalldataSchema=r.changeGuardianCalldataSchema;exports.changeThresholdCalldataSchema=r.changeThresholdCalldataSchema;exports.escapeGuardianCalldataSchema=r.escapeGuardianCalldataSchema;exports.executeOnPluginCalldataSchema=r.executeOnPluginCalldataSchema;exports.feltSchema=r.feltSchema;exports.looseCalldataSchema=r.looseCalldataSchema;exports.multiTypeSchema=r.multiTypeSchema;exports.rawArgsArraySchema=r.rawArgsArraySchema;exports.rawArgsObjectSchema=r.rawArgsObjectSchema;exports.rawArgsSchema=r.rawArgsSchema;exports.removeOwnersCalldataSchema=r.removeOwnersCalldataSchema;exports.removePluginCalldataSchema=r.removePluginCalldataSchema;exports.replaceSignerCalldataSchema=r.replaceSignerCalldataSchema;exports.transferCalldataSchema=r.transferCalldataSchema;exports.uint256Schema=r.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=Ue.entryPointToHumanReadable;exports.urlWithQuery=Ge.urlWithQuery;exports.voidify=ze.voidify;exports.bipsToPercent=je.bipsToPercent;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("./src/bigdecimal/index.cjs"),J=require("./src/errors/baseErrors.cjs"),f=require("./src/account/account.model.cjs"),R=require("./src/account/accountv4.cjs"),_=require("./src/account/preferences.model.cjs"),A=require("./src/backend/schema.cjs"),ee=require("./src/cache/CacheService.cjs"),n=require("./src/chains/starknet/address.cjs"),d=require("./src/chains/starknet/addressDomain.cjs"),O=require("./src/chains/starknet/addressInput.cjs"),g=require("./src/chains/starknet/argentName.cjs"),ae=require("./src/chains/starknet/cairoVersionSchema.cjs"),S=require("./src/chains/starknet/constants.cjs"),H=require("./src/chains/starknet/getAddressFromArgentName.cjs"),T=require("./src/chains/starknet/getAddressFromStarkName.cjs"),te=require("./src/chains/starknet/network.cjs"),re=require("./src/chains/starknet/services/address/StarknetAddressService.cjs"),b=require("./src/chains/starknet/services/deploymentData/constants.cjs"),P=require("./src/chains/starknet/services/deploymentData/deploymentData.schema.cjs"),h=require("./src/chains/starknet/services/deploymentData/findImplementationForAccount.cjs"),c=require("./src/chains/starknet/services/deploymentData/getAccountClassHash.cjs"),k=require("./src/chains/starknet/starknetId.cjs"),ne=require("./src/http/DateService.cjs"),ie=require("./src/http/HttpError.cjs"),se=require("./src/http/HttpService.cjs"),oe=require("./src/http/IHttpService.cjs"),ce=require("./src/http/SWRService.cjs"),N=require("./src/http/fetcher.cjs"),L=require("./src/http/time.cjs"),me=require("./src/knownDapps/KnownDappsBackendService.cjs"),C=require("./src/knownDapps/schema.cjs"),V=require("./src/knownDapps/utils/getDapplandUrl.cjs"),Se=require("./src/nameResolution/ResolveNameService.cjs"),l=require("./src/nameResolution/schema.cjs"),de=require("./src/nfts/BackendNftService.cjs"),x=require("./src/nfts/utils.cjs"),le=require("./src/onchainRecovery/OnchainRecoveryService.cjs"),s=require("./src/onchainRecovery/schema.cjs"),ue=require("./src/platform/isBraveBrowser.cjs"),u=require("./src/platform/isBrowser.cjs"),he=require("./src/signer/seedphrase.cjs"),M=require("./src/signer/multisigner.cjs"),pe=require("./src/signer/mergeOwnerGuardianSignatures.cjs"),m=require("./src/staking/schema.cjs"),y=require("./src/tokens/balances.cjs"),Ae=require("./src/tokens/constants.cjs"),ge=require("./src/tokens/convertTokenAmountToCurrencyValue.cjs"),Te=require("./src/tokens/convertTokenUnitAmountWithDecimals.cjs"),ke=require("./src/tokens/ensureDecimals.cjs"),Ce=require("./src/tokens/isUnlimitedAmount.cjs"),ye=require("./src/tokens/prettifyCurrencyValue.cjs"),W=require("./src/tokens/prettifyTokenAmount.cjs"),De=require("./src/tokens/getCurrencySymbol.cjs"),Ee=require("./src/tokens/service/implementation.cjs"),U=require("./src/tokens/service/tokenError.cjs"),e=require("./src/tokens/service/types/backend.model.cjs"),i=require("./src/tokens/service/types/defiPosition.model.cjs"),qe=require("./src/tokens/service/types/defiPositionType.model.cjs"),G=require("./src/tokens/service/types/unclaimedRewards.model.cjs"),o=require("./src/tokens/service/types/webToken.model.cjs"),p=require("./src/tokens/utils.cjs"),F=require("./src/transactions/amount.cjs"),I=require("./src/transactions/buildTransactions.cjs"),z=require("./src/transactions/errors.cjs"),B=require("./src/transactions/estimate/argentMaxFee.cjs"),j=require("./src/transactions/estimate/error.cjs"),ve=require("./src/transactions/estimate/model.cjs"),r=require("./src/transactions/estimate/utils.cjs"),K=require("./src/transactions/findTransfersAndApprovals.cjs"),fe=require("./src/transactions/getPrettyRcpError.cjs"),w=require("./src/transactions/getTransactionVersion.cjs"),Re=require("./src/transactions/service/implementation.cjs"),be=require("./src/transactions/service/types.cjs"),Pe=require("./src/transactions/transactionReviewTypes.cjs"),X=require("./src/transactions/transactionVersion.cjs"),$=require("./src/transactions/txv3.cjs"),Ne=require("./src/utils/address.cjs"),Fe=require("./src/utils/arrays.cjs"),D=require("./src/utils/avatarImage.cjs"),E=require("./src/utils/base58.cjs"),Ie=require("./src/utils/bigNumber.cjs"),Be=require("./src/utils/daysBetween.cjs"),we=require("./src/utils/env.cjs"),Y=require("./src/utils/hex.cjs"),_e=require("./src/utils/id.cjs"),Oe=require("./src/utils/initials.cjs"),He=require("./src/utils/isContractDeployed.cjs"),Le=require("./src/utils/nonNullable.cjs"),Ve=require("./src/utils/number/isAllowedAddressHexInputValue.cjs"),xe=require("./src/utils/number/isAllowedNumericInputValue.cjs"),Me=require("./src/utils/number/isNumeric.cjs"),q=require("./src/utils/number/prettifyNumber.cjs"),Z=require("./src/utils/parseAmount.cjs"),We=require("./src/utils/pluralise.cjs"),Ue=require("./src/utils/readFileAsString.cjs"),v=require("./src/utils/schemas.cjs"),t=require("./src/utils/starknet/starknet.cjs"),a=require("./src/utils/starknet/starknetSchemas.cjs"),Ge=require("./src/utils/transactions.cjs"),ze=require("./src/utils/url/urlWithQuery.cjs"),je=require("./src/utils/voidify.cjs"),Ke=require("./src/utils/bips.cjs");exports.bigDecimal=Q;exports.BaseError=J.BaseError;exports.AddSmartAccountResponseSchema=f.AddSmartAccountResponseSchema;exports.AddSmartAcountRequestSchema=f.AddSmartAcountRequestSchema;exports.BackendAccountSchema=f.BackendAccountSchema;exports.isAccountV4=R.isAccountV4;exports.isAccountV5=R.isAccountV5;exports.isAccountV6=R.isAccountV6;exports.preferencesEndpointPayload=_.preferencesEndpointPayload;exports.preferencesSchema=_.preferencesSchema;exports.argentBackendNetworkIdSchema=A.argentBackendNetworkIdSchema;exports.argentNetworkIdSchema=A.argentNetworkIdSchema;exports.isArgentBackendNetworkId=A.isArgentBackendNetworkId;exports.isArgentNetworkId=A.isArgentNetworkId;exports.CacheService=ee.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.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=d.addressOrDomainInputSchema;exports.addressOrDomainSchema=d.addressOrDomainSchema;exports.isEqualStarknetDomainName=d.isEqualStarknetDomainName;exports.isStarknetDomainName=d.isStarknetDomainName;exports.normalizeAddressOrDomain=d.normalizeAddressOrDomain;exports.starknetDomainNameSchema=d.starknetDomainNameSchema;exports.addressInputCharactersAndLengthSchema=O.addressInputCharactersAndLengthSchema;exports.addressInputSchema=O.addressInputSchema;exports.argentNameSchema=g.argentNameSchema;exports.isArgentName=g.isArgentName;exports.isEqualArgentName=g.isEqualArgentName;exports.normalizeArgentName=g.normalizeArgentName;exports.cairoVersionSchema=ae.cairoVersionSchema;exports.ETH_TOKEN_ADDRESS=S.ETH_TOKEN_ADDRESS;exports.STANDARD_DEVNET_ACCOUNT_CLASS_HASH=S.STANDARD_DEVNET_ACCOUNT_CLASS_HASH;exports.STRK_TOKEN_ADDRESS=S.STRK_TOKEN_ADDRESS;exports.TXV1_ACCOUNT_CLASS_HASH=S.TXV1_ACCOUNT_CLASS_HASH;exports.TXV1_MULTISIG_CLASS_HASH=S.TXV1_MULTISIG_CLASS_HASH;exports.TXV3_ACCOUNT_CLASS_HASH=S.TXV3_ACCOUNT_CLASS_HASH;exports.TXV3_MULTISIG_CLASS_HASH=S.TXV3_MULTISIG_CLASS_HASH;exports.apiWalletResponseSchema=H.apiWalletResponseSchema;exports.getAddressFromArgentName=H.getAddressFromArgentName;exports.getAddressFromStarkName=T.getAddressFromStarkName;exports.getCallFromStarkName=T.getCallFromStarkName;exports.getStarknetIdContractAddressFromNetworkId=T.getStarknetIdContractAddressFromNetworkId;exports.starkNameToCallDataDomain=T.starkNameToCallDataDomain;exports.getChainIdFromNetworkId=te.getChainIdFromNetworkId;exports.StarknetAddressService=re.StarknetAddressService;exports.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES=b.ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES;exports.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES=b.ARGENT_MULTISIG_CONTRACT_CLASS_HASHES;exports.C0_PROXY_CONTRACT_CLASS_HASHES=b.C0_PROXY_CONTRACT_CLASS_HASHES;exports.constructorCallDataSchemaC0=P.constructorCallDataSchemaC0;exports.constructorCallDataSchemaC1V1=P.constructorCallDataSchemaC1V1;exports.implementationSchema=P.implementationSchema;exports.buildConstructorCalldata=h.buildConstructorCalldata;exports.findImplementationForAccount=h.findImplementationForAccount;exports.getAccountContractAddress=h.getAccountContractAddress;exports.getAccountDeploymentPayload=h.getAccountDeploymentPayload;exports.isEqualImplementation=h.isEqualImplementation;exports.getArgentAccountClassHashes=c.getArgentAccountClassHashes;exports.getArgentAccountClassHashesWithTxV3Support=c.getArgentAccountClassHashesWithTxV3Support;exports.getArgentAccountWithMultiSignerClassHashes=c.getArgentAccountWithMultiSignerClassHashes;exports.getLastCairo0ArgentAccountClassHash=c.getLastCairo0ArgentAccountClassHash;exports.getLatestArgentAccountClassHash=c.getLatestArgentAccountClassHash;exports.getLatestArgentMultisigClassHash=c.getLatestArgentMultisigClassHash;exports.getLatestLedgerAccountClassHash=c.getLatestLedgerAccountClassHash;exports.getLedgerAccountClassHashes=c.getLedgerAccountClassHashes;exports.isEqualStarknetId=k.isEqualStarknetId;exports.isStarknetId=k.isStarknetId;exports.normalizeStarknetId=k.normalizeStarknetId;exports.starknetIdSchema=k.starknetIdSchema;exports.DateService=ne.DateService;exports.HttpError=ie.HttpError;exports.HTTPService=se.HTTPService;Object.defineProperty(exports,"HTTP_ERROR_MESSAGE",{enumerable:!0,get:()=>oe.HTTP_ERROR_MESSAGE});exports.SWRService=ce.SWRService;exports.fetchData=N.fetchData;exports.fetcherError=N.fetcherError;exports.postData=N.postData;exports.getBackendTimeNowSeconds=L.getBackendTimeNowSeconds;exports.getBackendTimeSeconds=L.getBackendTimeSeconds;exports.KnownDappsBackendService=me.KnownDappsBackendService;exports.dappContractSchema=C.dappContractSchema;exports.dappLinkSchema=C.dappLinkSchema;exports.knownDappSchema=C.knownDappSchema;exports.knownDappsSchema=C.knownDappsSchema;exports.getDapplandLinkForDapp=V.getDapplandLinkForDapp;exports.getDapplandUrlForDapp=V.getDapplandUrlForDapp;exports.ResolveNameService=Se.ResolveNameService;exports.nameProviderResolutionSchema=l.nameProviderResolutionSchema;exports.nameResolutionAddressSchema=l.nameResolutionAddressSchema;exports.nameResolutionAddressesSchema=l.nameResolutionAddressesSchema;exports.nameResolutionStarknetIdSchema=l.nameResolutionStarknetIdSchema;exports.nameResolutionStarknetIdsSchema=l.nameResolutionStarknetIdsSchema;exports.providersNamesSchema=l.providersNamesSchema;exports.BackendNftService=de.BackendNftService;exports.equalNft=x.equalNft;exports.getNftPicture=x.getNftPicture;exports.OnchainRecoveryService=le.OnchainRecoveryService;Object.defineProperty(exports,"RecoveryStatusEnum",{enumerable:!0,get:()=>s.RecoveryStatusEnum});Object.defineProperty(exports,"StartOnchainRecoveryErrorStatusEnum",{enumerable:!0,get:()=>s.StartOnchainRecoveryErrorStatusEnum});exports.activeOnchainRecoverySchema=s.activeOnchainRecoverySchema;exports.onchainRecoverySchema=s.onchainRecoverySchema;exports.recoveryBaseSchema=s.recoveryBaseSchema;exports.recoveryBodySchema=s.recoveryBodySchema;exports.recoveryStatusSchema=s.recoveryStatusSchema;exports.startOnchainRecoveryErrorSchema=s.startOnchainRecoveryErrorSchema;exports.startOnchainRecoveryErrorStatusSchema=s.startOnchainRecoveryErrorStatusSchema;exports.startOnchainRecoverySchema=s.startOnchainRecoverySchema;exports.isBraveBrowser=ue.isBraveBrowser;exports.getUAParserResult=u.getUAParserResult;exports.isBrowser=u.isBrowser;exports.isChromeBrowser=u.isChromeBrowser;exports.isEdgeBrowser=u.isEdgeBrowser;exports.isFirefoxBrowser=u.isFirefoxBrowser;exports.isSafariBrowser=u.isSafariBrowser;exports.seedphraseSchema=he.seedphraseSchema;Object.defineProperty(exports,"MultiSigner",{enumerable:!0,get:()=>M.MultiSigner});exports.getSignerForMultiSigner=M.getSignerForMultiSigner;exports.mergeOwnerGuardianSignatures=pe.mergeOwnerGuardianSignatures;exports.buildBuyCalldataResponseSchema=m.buildBuyCalldataResponseSchema;exports.buildBuyCalldataSchema=m.buildBuyCalldataSchema;exports.investmentMetaSchema=m.investmentMetaSchema;exports.investmentSchema=m.investmentSchema;exports.investmentsResponseSchema=m.investmentsResponseSchema;exports.lendingInvestmentSchema=m.lendingInvestmentSchema;exports.stakingInvestmentSchema=m.stakingInvestmentSchema;exports.strkDelegatedStakingInvestmentSchema=m.strkDelegatedStakingInvestmentSchema;exports.getTokenBalance=y.getTokenBalance;exports.getTokens=y.getTokens;exports.getTokensBalances=y.getTokensBalances;exports.useToken=y.useToken;exports.DEFAULT_TOKEN_DECIMALS=Ae.DEFAULT_TOKEN_DECIMALS;exports.convertTokenAmountToCurrencyValue=ge.convertTokenAmountToCurrencyValue;exports.convertTokenUnitAmountWithDecimals=Te.convertTokenUnitAmountWithDecimals;exports.ensureDecimals=ke.ensureDecimals;exports.isUnlimitedAmount=Ce.isUnlimitedAmount;exports.prettifyCurrencyValue=ye.prettifyCurrencyValue;exports.PRETTY_UNLIMITED=W.PRETTY_UNLIMITED;exports.prettifyTokenAmount=W.prettifyTokenAmount;exports.getCurrencySymbol=De.getCurrencySymbol;exports.TokenServiceWeb=Ee.TokenServiceWeb;Object.defineProperty(exports,"TOKEN_ERROR_MESSAGES",{enumerable:!0,get:()=>U.TOKEN_ERROR_MESSAGES});exports.TokenError=U.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.defiPositionTypeSchema=qe.defiPositionTypeSchema;exports.airdropSchema=G.airdropSchema;exports.unclaimedRewardsSchema=G.unclaimedRewardsSchema;exports.webBaseTokenSchema=o.webBaseTokenSchema;exports.webBaseTokenWithBalanceSchema=o.webBaseTokenWithBalanceSchema;exports.webTokenInfoDetailsSchema=o.webTokenInfoDetailsSchema;exports.webTokenPriceDetailsSchema=o.webTokenPriceDetailsSchema;exports.webTokenSchema=o.webTokenSchema;exports.webTokenWithBalanceAndPriceSchema=o.webTokenWithBalanceAndPriceSchema;exports.webTokenWithBalanceSchema=o.webTokenWithBalanceSchema;exports.webTokenWithPriceSchema=o.webTokenWithPriceSchema;exports.webTokensWithBalanceAndPriceSchema=o.webTokensWithBalanceAndPriceSchema;exports.isCollateralizedDebtPosition=p.isCollateralizedDebtPosition;exports.isConcentratedLiquidityPosition=p.isConcentratedLiquidityPosition;exports.isDelegatedTokens=p.isDelegatedTokens;exports.isStaking=p.isStaking;exports.isStrkDelegatedStaking=p.isStrkDelegatedStaking;exports.inputAmountSchema=F.inputAmountSchema;exports.isValidInputAmount=F.isValidInputAmount;exports.parseAmount=F.parseAmount;exports.erc20TransferTransaction=I.erc20TransferTransaction;exports.erc721SafeTransferFromTransaction=I.erc721SafeTransferFromTransaction;exports.erc721TransferFromTransaction=I.erc721TransferFromTransaction;exports.getMessageFromTrpcError=z.getMessageFromTrpcError;exports.trpcErrorSchema=z.trpcErrorSchema;exports.FEE_OVERHEAD=B.FEE_OVERHEAD;exports.argentMaxFee=B.argentMaxFee;exports.modifySnjsFeeOverhead=B.modifySnjsFeeOverhead;Object.defineProperty(exports,"ESTIMATE_ERROR_MESSAGES",{enumerable:!0,get:()=>j.ESTIMATE_ERROR_MESSAGES});exports.EstimateError=j.EstimateError;exports.transactionReviewTransactionsSchema=ve.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.EventsBySelector=K.EventsBySelector;exports.findTransfersAndApprovals=K.findTransfersAndApprovals;exports.getPrettyRpcError=fe.getPrettyRpcError;exports.getSimulationTxVersionFromFeeToken=w.getSimulationTxVersionFromFeeToken;exports.getTxVersionFromFeeToken=w.getTxVersionFromFeeToken;exports.getTxVersionFromFeeTokenForDeclareContract=w.getTxVersionFromFeeTokenForDeclareContract;exports.TransactionReviewServiceWeb=Re.TransactionReviewServiceWeb;exports.transactionReviewWarningSchema=be.transactionReviewWarningSchema;exports.apiTransactionReviewActivityType=Pe.apiTransactionReviewActivityType;exports.denyTxV3=X.denyTxV3;exports.txVersionSchema=X.txVersionSchema;exports.classHashSupportsTxV3=$.classHashSupportsTxV3;exports.feeTokenNeedsTxV3Support=$.feeTokenNeedsTxV3Support;exports.formatAddress=Ne.formatAddress;exports.ensureArray=Fe.ensureArray;exports.generateAvatarImage=D.generateAvatarImage;exports.getColor=D.getColor;exports.getNetworkAccountImageUrl=D.getNetworkAccountImageUrl;exports.stripAddressZeroPadding=D.stripAddressZeroPadding;exports.decodeBase58=E.decodeBase58;exports.decodeBase58Array=E.decodeBase58Array;exports.encodeBase58=E.encodeBase58;exports.encodeBase58Array=E.encodeBase58Array;exports.bigNumberSchema=Ie.bigNumberSchema;exports.daysBetween=Be.daysBetween;exports.isFeatureEnabled=we.isFeatureEnabled;exports.hexSchema=Y.hexSchema;exports.hexSchemaBase=Y.hexSchemaBase;exports.id=_e.id;exports.getInitials=Oe.getInitials;exports.isContractDeployed=He.isContractDeployed;exports.nonNullable=Le.nonNullable;exports.isAllowedAddressHexInputValue=Ve.isAllowedAddressHexInputValue;exports.isAllowedNumericInputValue=xe.isAllowedNumericInputValue;exports.isNumeric=Me.isNumeric;exports.prettifyCurrencyNumber=q.prettifyCurrencyNumber;exports.prettifyNumber=q.prettifyNumber;exports.prettifyNumberConfig=q.prettifyNumberConfig;exports.prettifyTokenNumber=q.prettifyTokenNumber;exports.getUint256CalldataFromBN=Z.getUint256CalldataFromBN;exports.parseAmountValue=Z.parseAmountValue;exports.pluralise=We.pluralise;exports.readFileAsString=Ue.readFileAsString;exports.booleanToStringSchema=v.booleanToStringSchema;exports.createSchemaWithWarnings=v.createSchemaWithWarnings;exports.safeParseAndWarn=v.safeParseAndWarn;exports.stringToBooleanSchema=v.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=Ge.entryPointToHumanReadable;exports.urlWithQuery=ze.urlWithQuery;exports.voidify=je.voidify;exports.bipsToPercent=Ke.bipsToPercent;
|
package/dist/index.js
CHANGED
|
@@ -1,121 +1,122 @@
|
|
|
1
1
|
import * as e from "./src/bigdecimal/index.js";
|
|
2
2
|
import { BaseError as t } from "./src/errors/baseErrors.js";
|
|
3
|
-
import { AddSmartAccountResponseSchema as m, AddSmartAcountRequestSchema as n, BackendAccountSchema as
|
|
4
|
-
import { isAccountV4 as
|
|
5
|
-
import { preferencesEndpointPayload as
|
|
6
|
-
import { argentBackendNetworkIdSchema as u, argentNetworkIdSchema as A, isArgentBackendNetworkId as x, isArgentNetworkId as
|
|
7
|
-
import { CacheService as
|
|
8
|
-
import { addressOrEmptyUndefinedSchema as y, addressSchema as
|
|
3
|
+
import { AddSmartAccountResponseSchema as m, AddSmartAcountRequestSchema as n, BackendAccountSchema as i } from "./src/account/account.model.js";
|
|
4
|
+
import { isAccountV4 as c, isAccountV5 as S, isAccountV6 as d } from "./src/account/accountv4.js";
|
|
5
|
+
import { preferencesEndpointPayload as l, preferencesSchema as h } from "./src/account/preferences.model.js";
|
|
6
|
+
import { argentBackendNetworkIdSchema as u, argentNetworkIdSchema as A, isArgentBackendNetworkId as x, isArgentNetworkId as g } from "./src/backend/schema.js";
|
|
7
|
+
import { CacheService as k } from "./src/cache/CacheService.js";
|
|
8
|
+
import { addressOrEmptyUndefinedSchema as y, addressSchema as D, addressSchemaArgentBackend as E, addressSchemaBase as R, addressSchemaLooseLength as P, addressSchemaStrictLength as v, formatFullAddress as N, formatTruncatedAddress as b, formatTruncatedSignerKey as F, formatTruncatedString as I, includesAddress as B, isAddress as _, isEqualAddress as w, isValidAddress as H, isZeroAddress as L, normalizeAddress as O, validChecksumAddressSchema as V, validateAddressRangeSchema as M } from "./src/chains/starknet/address.js";
|
|
9
9
|
import { addressOrDomainInputSchema as U, addressOrDomainSchema as q, isEqualStarknetDomainName as G, isStarknetDomainName as z, normalizeAddressOrDomain as K, starknetDomainNameSchema as j } from "./src/chains/starknet/addressDomain.js";
|
|
10
10
|
import { addressInputCharactersAndLengthSchema as Y, addressInputSchema as Z } from "./src/chains/starknet/addressInput.js";
|
|
11
11
|
import { argentNameSchema as J, isArgentName as $, isEqualArgentName as ee, normalizeArgentName as ae } from "./src/chains/starknet/argentName.js";
|
|
12
12
|
import { cairoVersionSchema as te } from "./src/chains/starknet/cairoVersionSchema.js";
|
|
13
|
-
import { ETH_TOKEN_ADDRESS as me, STANDARD_DEVNET_ACCOUNT_CLASS_HASH as ne, STRK_TOKEN_ADDRESS as
|
|
14
|
-
import { apiWalletResponseSchema as
|
|
15
|
-
import { getAddressFromStarkName as ue, getCallFromStarkName as Ae, getStarknetIdContractAddressFromNetworkId as xe, starkNameToCallDataDomain as
|
|
16
|
-
import { getChainIdFromNetworkId as
|
|
13
|
+
import { ETH_TOKEN_ADDRESS as me, STANDARD_DEVNET_ACCOUNT_CLASS_HASH as ne, STRK_TOKEN_ADDRESS as ie, TXV1_ACCOUNT_CLASS_HASH as se, TXV1_MULTISIG_CLASS_HASH as ce, TXV3_ACCOUNT_CLASS_HASH as Se, TXV3_MULTISIG_CLASS_HASH as de } from "./src/chains/starknet/constants.js";
|
|
14
|
+
import { apiWalletResponseSchema as le, getAddressFromArgentName as he } from "./src/chains/starknet/getAddressFromArgentName.js";
|
|
15
|
+
import { getAddressFromStarkName as ue, getCallFromStarkName as Ae, getStarknetIdContractAddressFromNetworkId as xe, starkNameToCallDataDomain as ge } from "./src/chains/starknet/getAddressFromStarkName.js";
|
|
16
|
+
import { getChainIdFromNetworkId as ke } from "./src/chains/starknet/network.js";
|
|
17
17
|
import { StarknetAddressService as ye } from "./src/chains/starknet/services/address/StarknetAddressService.js";
|
|
18
|
-
import { ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES as
|
|
19
|
-
import { constructorCallDataSchemaC0 as
|
|
20
|
-
import { buildConstructorCalldata as Be, findImplementationForAccount as _e, getAccountContractAddress as we, getAccountDeploymentPayload as He, isEqualImplementation as
|
|
18
|
+
import { ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES as Ee, ARGENT_MULTISIG_CONTRACT_CLASS_HASHES as Re, C0_PROXY_CONTRACT_CLASS_HASHES as Pe } from "./src/chains/starknet/services/deploymentData/constants.js";
|
|
19
|
+
import { constructorCallDataSchemaC0 as Ne, constructorCallDataSchemaC1V1 as be, implementationSchema as Fe } from "./src/chains/starknet/services/deploymentData/deploymentData.schema.js";
|
|
20
|
+
import { buildConstructorCalldata as Be, findImplementationForAccount as _e, getAccountContractAddress as we, getAccountDeploymentPayload as He, isEqualImplementation as Le } from "./src/chains/starknet/services/deploymentData/findImplementationForAccount.js";
|
|
21
21
|
import { getArgentAccountClassHashes as Ve, getArgentAccountClassHashesWithTxV3Support as Me, getArgentAccountWithMultiSignerClassHashes as We, getLastCairo0ArgentAccountClassHash as Ue, getLatestArgentAccountClassHash as qe, getLatestArgentMultisigClassHash as Ge, getLatestLedgerAccountClassHash as ze, getLedgerAccountClassHashes as Ke } from "./src/chains/starknet/services/deploymentData/getAccountClassHash.js";
|
|
22
22
|
import { isEqualStarknetId as Xe, isStarknetId as Ye, normalizeStarknetId as Ze, starknetIdSchema as Qe } from "./src/chains/starknet/starknetId.js";
|
|
23
23
|
import { DateService as $e } from "./src/http/DateService.js";
|
|
24
24
|
import { HttpError as aa } from "./src/http/HttpError.js";
|
|
25
25
|
import { HTTPService as ta } from "./src/http/HttpService.js";
|
|
26
26
|
import { HTTP_ERROR_MESSAGE as ma } from "./src/http/IHttpService.js";
|
|
27
|
-
import { SWRService as
|
|
28
|
-
import { fetchData as
|
|
29
|
-
import { getBackendTimeNowSeconds as
|
|
27
|
+
import { SWRService as ia } from "./src/http/SWRService.js";
|
|
28
|
+
import { fetchData as ca, fetcherError as Sa, postData as da } from "./src/http/fetcher.js";
|
|
29
|
+
import { getBackendTimeNowSeconds as la, getBackendTimeSeconds as ha } from "./src/http/time.js";
|
|
30
30
|
import { KnownDappsBackendService as ua } from "./src/knownDapps/KnownDappsBackendService.js";
|
|
31
|
-
import { dappContractSchema as xa, dappLinkSchema as
|
|
32
|
-
import { getDapplandLinkForDapp as ya, getDapplandUrlForDapp as
|
|
31
|
+
import { dappContractSchema as xa, dappLinkSchema as ga, knownDappSchema as Ta, knownDappsSchema as ka } from "./src/knownDapps/schema.js";
|
|
32
|
+
import { getDapplandLinkForDapp as ya, getDapplandUrlForDapp as Da } from "./src/knownDapps/utils/getDapplandUrl.js";
|
|
33
33
|
import { ResolveNameService as Ra } from "./src/nameResolution/ResolveNameService.js";
|
|
34
|
-
import { nameProviderResolutionSchema as
|
|
34
|
+
import { nameProviderResolutionSchema as va, nameResolutionAddressSchema as Na, nameResolutionAddressesSchema as ba, nameResolutionStarknetIdSchema as Fa, nameResolutionStarknetIdsSchema as Ia, providersNamesSchema as Ba } from "./src/nameResolution/schema.js";
|
|
35
35
|
import { BackendNftService as wa } from "./src/nfts/BackendNftService.js";
|
|
36
|
-
import { equalNft as
|
|
36
|
+
import { equalNft as La, getNftPicture as Oa } from "./src/nfts/utils.js";
|
|
37
37
|
import { OnchainRecoveryService as Ma } from "./src/onchainRecovery/OnchainRecoveryService.js";
|
|
38
38
|
import { RecoveryStatusEnum as Ua, StartOnchainRecoveryErrorStatusEnum as qa, activeOnchainRecoverySchema as Ga, onchainRecoverySchema as za, recoveryBaseSchema as Ka, recoveryBodySchema as ja, recoveryStatusSchema as Xa, startOnchainRecoveryErrorSchema as Ya, startOnchainRecoveryErrorStatusSchema as Za, startOnchainRecoverySchema as Qa } from "./src/onchainRecovery/schema.js";
|
|
39
39
|
import { isBraveBrowser as $a } from "./src/platform/isBraveBrowser.js";
|
|
40
40
|
import { getUAParserResult as ar, isBrowser as rr, isChromeBrowser as tr, isEdgeBrowser as or, isFirefoxBrowser as mr, isSafariBrowser as nr } from "./src/platform/isBrowser.js";
|
|
41
|
-
import { seedphraseSchema as
|
|
41
|
+
import { seedphraseSchema as sr } from "./src/signer/seedphrase.js";
|
|
42
42
|
import { MultiSigner as Sr, getSignerForMultiSigner as dr } from "./src/signer/multisigner.js";
|
|
43
|
-
import { mergeOwnerGuardianSignatures as
|
|
44
|
-
import { buildBuyCalldataResponseSchema as fr, buildBuyCalldataSchema as ur, investmentMetaSchema as Ar, investmentSchema as xr, investmentsResponseSchema as
|
|
45
|
-
import { getTokenBalance as
|
|
46
|
-
import { DEFAULT_TOKEN_DECIMALS as
|
|
47
|
-
import { convertTokenAmountToCurrencyValue as
|
|
43
|
+
import { mergeOwnerGuardianSignatures as lr } from "./src/signer/mergeOwnerGuardianSignatures.js";
|
|
44
|
+
import { buildBuyCalldataResponseSchema as fr, buildBuyCalldataSchema as ur, investmentMetaSchema as Ar, investmentSchema as xr, investmentsResponseSchema as gr, lendingInvestmentSchema as Tr, stakingInvestmentSchema as kr, strkDelegatedStakingInvestmentSchema as Cr } from "./src/staking/schema.js";
|
|
45
|
+
import { getTokenBalance as Dr, getTokens as Er, getTokensBalances as Rr, useToken as Pr } from "./src/tokens/balances.js";
|
|
46
|
+
import { DEFAULT_TOKEN_DECIMALS as Nr } from "./src/tokens/constants.js";
|
|
47
|
+
import { convertTokenAmountToCurrencyValue as Fr } from "./src/tokens/convertTokenAmountToCurrencyValue.js";
|
|
48
48
|
import { convertTokenUnitAmountWithDecimals as Br } from "./src/tokens/convertTokenUnitAmountWithDecimals.js";
|
|
49
49
|
import { ensureDecimals as wr } from "./src/tokens/ensureDecimals.js";
|
|
50
|
-
import { isUnlimitedAmount as
|
|
50
|
+
import { isUnlimitedAmount as Lr } from "./src/tokens/isUnlimitedAmount.js";
|
|
51
51
|
import { prettifyCurrencyValue as Vr } from "./src/tokens/prettifyCurrencyValue.js";
|
|
52
52
|
import { PRETTY_UNLIMITED as Wr, prettifyTokenAmount as Ur } from "./src/tokens/prettifyTokenAmount.js";
|
|
53
53
|
import { getCurrencySymbol as Gr } from "./src/tokens/getCurrencySymbol.js";
|
|
54
54
|
import { TokenServiceWeb as Kr } from "./src/tokens/service/implementation.js";
|
|
55
55
|
import { TOKEN_ERROR_MESSAGES as Xr, TokenError as Yr } from "./src/tokens/service/tokenError.js";
|
|
56
|
-
import { apiAccountTokenBalancesSchema as Qr, apiAirdropSchema as Jr, apiCollateralizedDebtPositionSchema as $r, apiCollateralizedDebtPositionsSchema as et, apiConcentratedLiquidityPositionSchema as at, apiConcentratedLiquidityPositionsSchema as rt, apiDefiDecompositionProduct as tt, apiDefiDecompositionProducts as ot, apiDefiDecompositionSchema as mt, apiDefiDecompositionToken as nt, apiDefiPositionSchema as
|
|
57
|
-
import { collateralizedDebtGroupSchema as
|
|
58
|
-
import { defiPositionTypeSchema as
|
|
56
|
+
import { apiAccountTokenBalancesSchema as Qr, apiAirdropSchema as Jr, apiCollateralizedDebtPositionSchema as $r, apiCollateralizedDebtPositionsSchema as et, apiConcentratedLiquidityPositionSchema as at, apiConcentratedLiquidityPositionsSchema as rt, apiDefiDecompositionProduct as tt, apiDefiDecompositionProducts as ot, apiDefiDecompositionSchema as mt, apiDefiDecompositionToken as nt, apiDefiPositionSchema as it, apiDefiPositionsSchema as st, apiDelegatedTokensArraySchema as ct, apiDelegatedTokensSchema as St, apiPriceDataResponseSchema as dt, apiPriceDetailsSchema as pt, apiStakingPositionSchema as lt, apiStakingPositionsSchema as ht, apiStrkDelegatedStakingPositionsSchema as ft, apiStrkDelegatedStakingSchema as ut, apiTokenInfoResponseSchema as At, apiTokenInfoSchema as xt, apiTokensInfoResponseSchema as gt, apiUnclaimedRewardsSchema as Tt } from "./src/tokens/service/types/backend.model.js";
|
|
57
|
+
import { collateralizedDebtGroupSchema as Ct, collateralizedDebtPositionSchema as yt, collateralizedDebtPositionsSchema as Dt, concentratedLiquidityPositionSchema as Et, concentratedLiquidityPositionsSchema as Rt, defiDappsProductsSchema as Pt, defiPositionSchema as vt, defiProductSchema as Nt, defiProductsSchema as bt, delegatedTokensArraySchema as Ft, delegatedTokensSchema as It, productGroupsSchema as Bt, stakingPositionSchema as _t, stakingPositionsSchema as wt } from "./src/tokens/service/types/defiPosition.model.js";
|
|
58
|
+
import { defiPositionTypeSchema as Lt } from "./src/tokens/service/types/defiPositionType.model.js";
|
|
59
59
|
import { airdropSchema as Vt, unclaimedRewardsSchema as Mt } from "./src/tokens/service/types/unclaimedRewards.model.js";
|
|
60
60
|
import { webBaseTokenSchema as Ut, webBaseTokenWithBalanceSchema as qt, webTokenInfoDetailsSchema as Gt, webTokenPriceDetailsSchema as zt, webTokenSchema as Kt, webTokenWithBalanceAndPriceSchema as jt, webTokenWithBalanceSchema as Xt, webTokenWithPriceSchema as Yt, webTokensWithBalanceAndPriceSchema as Zt } from "./src/tokens/service/types/webToken.model.js";
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
61
|
+
import { isCollateralizedDebtPosition as Jt, isConcentratedLiquidityPosition as $t, isDelegatedTokens as eo, isStaking as ao, isStrkDelegatedStaking as ro } from "./src/tokens/utils.js";
|
|
62
|
+
import { inputAmountSchema as oo, isValidInputAmount as mo, parseAmount as no } from "./src/transactions/amount.js";
|
|
63
|
+
import { erc20TransferTransaction as so, erc721SafeTransferFromTransaction as co, erc721TransferFromTransaction as So } from "./src/transactions/buildTransactions.js";
|
|
64
|
+
import { getMessageFromTrpcError as lo, trpcErrorSchema as ho } from "./src/transactions/errors.js";
|
|
65
|
+
import { FEE_OVERHEAD as uo, argentMaxFee as Ao, modifySnjsFeeOverhead as xo } from "./src/transactions/estimate/argentMaxFee.js";
|
|
66
|
+
import { ESTIMATE_ERROR_MESSAGES as To, EstimateError as ko } from "./src/transactions/estimate/error.js";
|
|
67
|
+
import { transactionReviewTransactionsSchema as yo } from "./src/transactions/estimate/model.js";
|
|
68
|
+
import { buildDummyTx as Eo, calculateCubeRootAdjustment as Ro, calculateNonLinearAdjustment as Po, calculateSqrtAdjustment as vo, castFeeEstimation as No, estimatedFeeToMaxFeeTotal as bo, estimatedFeeToMaxResourceBounds as Fo, estimatedFeeToTotal as Io, estimatedFeesToMaxFeeTotal as Bo, estimatedFeesToTotal as _o, getEstimatedFeeFromBulkSimulation as wo, getEstimatedFeeFromSimulationAndRespectWatermarkFee as Ho, getPayloadFromTransaction as Lo, getWatermarkedMaxFeeTotal as Oo, isFRI as Vo, isWEI as Mo, multiplyBigIntByFloat as Wo, toMax as Uo, tokensRequireTxV3Support as qo, unitToFeeTokenAddress as Go } from "./src/transactions/estimate/utils.js";
|
|
69
|
+
import { EventsBySelector as Ko, findTransfersAndApprovals as jo } from "./src/transactions/findTransfersAndApprovals.js";
|
|
70
|
+
import { getPrettyRpcError as Yo } from "./src/transactions/getPrettyRcpError.js";
|
|
71
|
+
import { getSimulationTxVersionFromFeeToken as Qo, getTxVersionFromFeeToken as Jo, getTxVersionFromFeeTokenForDeclareContract as $o } from "./src/transactions/getTransactionVersion.js";
|
|
72
|
+
import { TransactionReviewServiceWeb as am } from "./src/transactions/service/implementation.js";
|
|
73
|
+
import { transactionReviewWarningSchema as tm } from "./src/transactions/service/types.js";
|
|
74
|
+
import { apiTransactionReviewActivityType as mm } from "./src/transactions/transactionReviewTypes.js";
|
|
75
|
+
import { denyTxV3 as im, txVersionSchema as sm } from "./src/transactions/transactionVersion.js";
|
|
76
|
+
import { classHashSupportsTxV3 as Sm, feeTokenNeedsTxV3Support as dm } from "./src/transactions/txv3.js";
|
|
77
|
+
import { formatAddress as lm } from "./src/utils/address.js";
|
|
78
|
+
import { ensureArray as fm } from "./src/utils/arrays.js";
|
|
79
|
+
import { generateAvatarImage as Am, getColor as xm, getNetworkAccountImageUrl as gm, stripAddressZeroPadding as Tm } from "./src/utils/avatarImage.js";
|
|
80
|
+
import { decodeBase58 as Cm, decodeBase58Array as ym, encodeBase58 as Dm, encodeBase58Array as Em } from "./src/utils/base58.js";
|
|
81
|
+
import { bigNumberSchema as Pm } from "./src/utils/bigNumber.js";
|
|
82
|
+
import { daysBetween as Nm } from "./src/utils/daysBetween.js";
|
|
83
|
+
import { isFeatureEnabled as Fm } from "./src/utils/env.js";
|
|
84
|
+
import { hexSchema as Bm, hexSchemaBase as _m } from "./src/utils/hex.js";
|
|
85
|
+
import { id as Hm } from "./src/utils/id.js";
|
|
86
|
+
import { getInitials as Om } from "./src/utils/initials.js";
|
|
87
|
+
import { isContractDeployed as Mm } from "./src/utils/isContractDeployed.js";
|
|
88
|
+
import { nonNullable as Um } from "./src/utils/nonNullable.js";
|
|
89
|
+
import { isAllowedAddressHexInputValue as Gm } from "./src/utils/number/isAllowedAddressHexInputValue.js";
|
|
90
|
+
import { isAllowedNumericInputValue as Km } from "./src/utils/number/isAllowedNumericInputValue.js";
|
|
91
|
+
import { isNumeric as Xm } from "./src/utils/number/isNumeric.js";
|
|
92
|
+
import { prettifyCurrencyNumber as Zm, prettifyNumber as Qm, prettifyNumberConfig as Jm, prettifyTokenNumber as $m } from "./src/utils/number/prettifyNumber.js";
|
|
93
|
+
import { getUint256CalldataFromBN as an, parseAmountValue as rn } from "./src/utils/parseAmount.js";
|
|
94
|
+
import { pluralise as on } from "./src/utils/pluralise.js";
|
|
95
|
+
import { readFileAsString as nn } from "./src/utils/readFileAsString.js";
|
|
96
|
+
import { booleanToStringSchema as cn, createSchemaWithWarnings as Sn, safeParseAndWarn as dn, stringToBooleanSchema as pn } from "./src/utils/schemas.js";
|
|
97
|
+
import { addOwnersCalldataSchema as hn, addPluginCalldataSchema as fn, bigNumberishSchema as un, callDetailsSchema as An, callSchema as xn, calldataSchema as gn, changeGuardianCalldataSchema as Tn, changeThresholdCalldataSchema as kn, escapeGuardianCalldataSchema as Cn, executeOnPluginCalldataSchema as yn, feltSchema as Dn, looseCalldataSchema as En, multiTypeSchema as Rn, rawArgsArraySchema as Pn, rawArgsObjectSchema as vn, rawArgsSchema as Nn, removeOwnersCalldataSchema as bn, removePluginCalldataSchema as Fn, replaceSignerCalldataSchema as In, transferCalldataSchema as Bn, uint256Schema as _n } from "./src/utils/starknet/starknet.js";
|
|
98
|
+
import { abiEntrySchema as Hn, abiSchema as Ln, builtinsSchema as On, byteCodeSchema as Vn, cairo1EventSchema as Mn, cairoAssemblySchema as Wn, compiledContractClassSchema as Un, compiledSierraCasmSchema as qn, compiledSierraSchema as Gn, compressedProgramSchema as zn, contractEntryPointFieldsSchema as Kn, entryPointsByTypeSchema as jn, eventAbiSchema as Xn, eventEntrySchema as Yn, functionAbiSchema as Zn, functionAbiTypeSchema as Qn, legacyContractClassSchema as Jn, legacyEventSchema as $n, programSchema as ei, pythonicHintsSchema as ai, sierraContractEntryPointFieldsSchema as ri, sierraEntryPointsByTypeSchema as ti, sierraProgramDebugInfoSchema as oi, structAbiSchema as mi } from "./src/utils/starknet/starknetSchemas.js";
|
|
99
|
+
import { entryPointToHumanReadable as ii } from "./src/utils/transactions.js";
|
|
100
|
+
import { urlWithQuery as ci } from "./src/utils/url/urlWithQuery.js";
|
|
101
|
+
import { voidify as di } from "./src/utils/voidify.js";
|
|
102
|
+
import { bipsToPercent as li } from "./src/utils/bips.js";
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
+
Ee as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
|
|
104
105
|
Re as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
|
|
105
106
|
m as AddSmartAccountResponseSchema,
|
|
106
107
|
n as AddSmartAcountRequestSchema,
|
|
107
|
-
|
|
108
|
+
i as BackendAccountSchema,
|
|
108
109
|
wa as BackendNftService,
|
|
109
110
|
t as BaseError,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
Pe as C0_PROXY_CONTRACT_CLASS_HASHES,
|
|
112
|
+
k as CacheService,
|
|
113
|
+
Nr as DEFAULT_TOKEN_DECIMALS,
|
|
113
114
|
$e as DateService,
|
|
114
|
-
|
|
115
|
+
To as ESTIMATE_ERROR_MESSAGES,
|
|
115
116
|
me as ETH_TOKEN_ADDRESS,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
ko as EstimateError,
|
|
118
|
+
Ko as EventsBySelector,
|
|
119
|
+
uo as FEE_OVERHEAD,
|
|
119
120
|
ta as HTTPService,
|
|
120
121
|
ma as HTTP_ERROR_MESSAGE,
|
|
121
122
|
aa as HttpError,
|
|
@@ -126,33 +127,33 @@ export {
|
|
|
126
127
|
Ua as RecoveryStatusEnum,
|
|
127
128
|
Ra as ResolveNameService,
|
|
128
129
|
ne as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
ie as STRK_TOKEN_ADDRESS,
|
|
131
|
+
ia as SWRService,
|
|
131
132
|
ye as StarknetAddressService,
|
|
132
133
|
qa as StartOnchainRecoveryErrorStatusEnum,
|
|
133
134
|
Xr as TOKEN_ERROR_MESSAGES,
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
se as TXV1_ACCOUNT_CLASS_HASH,
|
|
136
|
+
ce as TXV1_MULTISIG_CLASS_HASH,
|
|
136
137
|
Se as TXV3_ACCOUNT_CLASS_HASH,
|
|
137
138
|
de as TXV3_MULTISIG_CLASS_HASH,
|
|
138
139
|
Yr as TokenError,
|
|
139
140
|
Kr as TokenServiceWeb,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
am as TransactionReviewServiceWeb,
|
|
142
|
+
Hn as abiEntrySchema,
|
|
143
|
+
Ln as abiSchema,
|
|
143
144
|
Ga as activeOnchainRecoverySchema,
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
hn as addOwnersCalldataSchema,
|
|
146
|
+
fn as addPluginCalldataSchema,
|
|
146
147
|
Y as addressInputCharactersAndLengthSchema,
|
|
147
148
|
Z as addressInputSchema,
|
|
148
149
|
U as addressOrDomainInputSchema,
|
|
149
150
|
q as addressOrDomainSchema,
|
|
150
151
|
y as addressOrEmptyUndefinedSchema,
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
D as addressSchema,
|
|
153
|
+
E as addressSchemaArgentBackend,
|
|
153
154
|
R as addressSchemaBase,
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
P as addressSchemaLooseLength,
|
|
156
|
+
v as addressSchemaStrictLength,
|
|
156
157
|
Vt as airdropSchema,
|
|
157
158
|
Qr as apiAccountTokenBalancesSchema,
|
|
158
159
|
Jr as apiAirdropSchema,
|
|
@@ -164,270 +165,275 @@ export {
|
|
|
164
165
|
ot as apiDefiDecompositionProducts,
|
|
165
166
|
mt as apiDefiDecompositionSchema,
|
|
166
167
|
nt as apiDefiDecompositionToken,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
it as apiDefiPositionSchema,
|
|
169
|
+
st as apiDefiPositionsSchema,
|
|
170
|
+
ct as apiDelegatedTokensArraySchema,
|
|
170
171
|
St as apiDelegatedTokensSchema,
|
|
171
172
|
dt as apiPriceDataResponseSchema,
|
|
172
173
|
pt as apiPriceDetailsSchema,
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
lt as apiStakingPositionSchema,
|
|
175
|
+
ht as apiStakingPositionsSchema,
|
|
175
176
|
ft as apiStrkDelegatedStakingPositionsSchema,
|
|
176
177
|
ut as apiStrkDelegatedStakingSchema,
|
|
177
178
|
At as apiTokenInfoResponseSchema,
|
|
178
179
|
xt as apiTokenInfoSchema,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
gt as apiTokensInfoResponseSchema,
|
|
181
|
+
mm as apiTransactionReviewActivityType,
|
|
182
|
+
Tt as apiUnclaimedRewardsSchema,
|
|
183
|
+
le as apiWalletResponseSchema,
|
|
183
184
|
u as argentBackendNetworkIdSchema,
|
|
184
|
-
|
|
185
|
+
Ao as argentMaxFee,
|
|
185
186
|
J as argentNameSchema,
|
|
186
187
|
A as argentNetworkIdSchema,
|
|
187
188
|
e as bigDecimal,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
Pm as bigNumberSchema,
|
|
190
|
+
un as bigNumberishSchema,
|
|
191
|
+
li as bipsToPercent,
|
|
192
|
+
cn as booleanToStringSchema,
|
|
192
193
|
fr as buildBuyCalldataResponseSchema,
|
|
193
194
|
ur as buildBuyCalldataSchema,
|
|
194
195
|
Be as buildConstructorCalldata,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
196
|
+
Eo as buildDummyTx,
|
|
197
|
+
On as builtinsSchema,
|
|
198
|
+
Vn as byteCodeSchema,
|
|
199
|
+
Mn as cairo1EventSchema,
|
|
200
|
+
Wn as cairoAssemblySchema,
|
|
200
201
|
te as cairoVersionSchema,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
Ro as calculateCubeRootAdjustment,
|
|
203
|
+
Po as calculateNonLinearAdjustment,
|
|
204
|
+
vo as calculateSqrtAdjustment,
|
|
205
|
+
An as callDetailsSchema,
|
|
206
|
+
xn as callSchema,
|
|
207
|
+
gn as calldataSchema,
|
|
208
|
+
No as castFeeEstimation,
|
|
209
|
+
Tn as changeGuardianCalldataSchema,
|
|
210
|
+
kn as changeThresholdCalldataSchema,
|
|
211
|
+
Sm as classHashSupportsTxV3,
|
|
212
|
+
Ct as collateralizedDebtGroupSchema,
|
|
212
213
|
yt as collateralizedDebtPositionSchema,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
Dt as collateralizedDebtPositionsSchema,
|
|
215
|
+
Un as compiledContractClassSchema,
|
|
216
|
+
qn as compiledSierraCasmSchema,
|
|
217
|
+
Gn as compiledSierraSchema,
|
|
218
|
+
zn as compressedProgramSchema,
|
|
219
|
+
Et as concentratedLiquidityPositionSchema,
|
|
219
220
|
Rt as concentratedLiquidityPositionsSchema,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
Ne as constructorCallDataSchemaC0,
|
|
222
|
+
be as constructorCallDataSchemaC1V1,
|
|
223
|
+
Kn as contractEntryPointFieldsSchema,
|
|
224
|
+
Fr as convertTokenAmountToCurrencyValue,
|
|
224
225
|
Br as convertTokenUnitAmountWithDecimals,
|
|
225
|
-
|
|
226
|
+
Sn as createSchemaWithWarnings,
|
|
226
227
|
xa as dappContractSchema,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
ga as dappLinkSchema,
|
|
229
|
+
Nm as daysBetween,
|
|
230
|
+
Cm as decodeBase58,
|
|
231
|
+
ym as decodeBase58Array,
|
|
232
|
+
Pt as defiDappsProductsSchema,
|
|
233
|
+
vt as defiPositionSchema,
|
|
234
|
+
Lt as defiPositionTypeSchema,
|
|
235
|
+
Nt as defiProductSchema,
|
|
236
|
+
bt as defiProductsSchema,
|
|
237
|
+
Ft as delegatedTokensArraySchema,
|
|
237
238
|
It as delegatedTokensSchema,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
im as denyTxV3,
|
|
240
|
+
Dm as encodeBase58,
|
|
241
|
+
Em as encodeBase58Array,
|
|
242
|
+
fm as ensureArray,
|
|
242
243
|
wr as ensureDecimals,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
244
|
+
ii as entryPointToHumanReadable,
|
|
245
|
+
jn as entryPointsByTypeSchema,
|
|
246
|
+
La as equalNft,
|
|
247
|
+
so as erc20TransferTransaction,
|
|
248
|
+
co as erc721SafeTransferFromTransaction,
|
|
249
|
+
So as erc721TransferFromTransaction,
|
|
250
|
+
Cn as escapeGuardianCalldataSchema,
|
|
251
|
+
bo as estimatedFeeToMaxFeeTotal,
|
|
252
|
+
Fo as estimatedFeeToMaxResourceBounds,
|
|
253
|
+
Io as estimatedFeeToTotal,
|
|
254
|
+
Bo as estimatedFeesToMaxFeeTotal,
|
|
255
|
+
_o as estimatedFeesToTotal,
|
|
256
|
+
Xn as eventAbiSchema,
|
|
257
|
+
Yn as eventEntrySchema,
|
|
258
|
+
yn as executeOnPluginCalldataSchema,
|
|
259
|
+
dm as feeTokenNeedsTxV3Support,
|
|
260
|
+
Dn as feltSchema,
|
|
261
|
+
ca as fetchData,
|
|
261
262
|
Sa as fetcherError,
|
|
262
263
|
_e as findImplementationForAccount,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
jo as findTransfersAndApprovals,
|
|
265
|
+
lm as formatAddress,
|
|
266
|
+
N as formatFullAddress,
|
|
267
|
+
b as formatTruncatedAddress,
|
|
268
|
+
F as formatTruncatedSignerKey,
|
|
268
269
|
I as formatTruncatedString,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
Zn as functionAbiSchema,
|
|
271
|
+
Qn as functionAbiTypeSchema,
|
|
272
|
+
Am as generateAvatarImage,
|
|
272
273
|
we as getAccountContractAddress,
|
|
273
274
|
He as getAccountDeploymentPayload,
|
|
274
|
-
|
|
275
|
+
he as getAddressFromArgentName,
|
|
275
276
|
ue as getAddressFromStarkName,
|
|
276
277
|
Ve as getArgentAccountClassHashes,
|
|
277
278
|
Me as getArgentAccountClassHashesWithTxV3Support,
|
|
278
279
|
We as getArgentAccountWithMultiSignerClassHashes,
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
la as getBackendTimeNowSeconds,
|
|
281
|
+
ha as getBackendTimeSeconds,
|
|
281
282
|
Ae as getCallFromStarkName,
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
ke as getChainIdFromNetworkId,
|
|
284
|
+
xm as getColor,
|
|
284
285
|
Gr as getCurrencySymbol,
|
|
285
286
|
ya as getDapplandLinkForDapp,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
Da as getDapplandUrlForDapp,
|
|
288
|
+
wo as getEstimatedFeeFromBulkSimulation,
|
|
289
|
+
Ho as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
|
|
290
|
+
Om as getInitials,
|
|
290
291
|
Ue as getLastCairo0ArgentAccountClassHash,
|
|
291
292
|
qe as getLatestArgentAccountClassHash,
|
|
292
293
|
Ge as getLatestArgentMultisigClassHash,
|
|
293
294
|
ze as getLatestLedgerAccountClassHash,
|
|
294
295
|
Ke as getLedgerAccountClassHashes,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
lo as getMessageFromTrpcError,
|
|
297
|
+
gm as getNetworkAccountImageUrl,
|
|
298
|
+
Oa as getNftPicture,
|
|
299
|
+
Lo as getPayloadFromTransaction,
|
|
300
|
+
Yo as getPrettyRpcError,
|
|
300
301
|
dr as getSignerForMultiSigner,
|
|
301
|
-
|
|
302
|
+
Qo as getSimulationTxVersionFromFeeToken,
|
|
302
303
|
xe as getStarknetIdContractAddressFromNetworkId,
|
|
303
|
-
|
|
304
|
-
|
|
304
|
+
Dr as getTokenBalance,
|
|
305
|
+
Er as getTokens,
|
|
305
306
|
Rr as getTokensBalances,
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
Jo as getTxVersionFromFeeToken,
|
|
308
|
+
$o as getTxVersionFromFeeTokenForDeclareContract,
|
|
308
309
|
ar as getUAParserResult,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
310
|
+
an as getUint256CalldataFromBN,
|
|
311
|
+
Oo as getWatermarkedMaxFeeTotal,
|
|
312
|
+
Bm as hexSchema,
|
|
313
|
+
_m as hexSchemaBase,
|
|
314
|
+
Hm as id,
|
|
315
|
+
Fe as implementationSchema,
|
|
315
316
|
B as includesAddress,
|
|
316
|
-
|
|
317
|
+
oo as inputAmountSchema,
|
|
317
318
|
Ar as investmentMetaSchema,
|
|
318
319
|
xr as investmentSchema,
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
gr as investmentsResponseSchema,
|
|
321
|
+
c as isAccountV4,
|
|
321
322
|
S as isAccountV5,
|
|
322
323
|
d as isAccountV6,
|
|
323
324
|
_ as isAddress,
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
Gm as isAllowedAddressHexInputValue,
|
|
326
|
+
Km as isAllowedNumericInputValue,
|
|
326
327
|
x as isArgentBackendNetworkId,
|
|
327
328
|
$ as isArgentName,
|
|
328
|
-
|
|
329
|
+
g as isArgentNetworkId,
|
|
329
330
|
$a as isBraveBrowser,
|
|
330
331
|
rr as isBrowser,
|
|
331
332
|
tr as isChromeBrowser,
|
|
332
|
-
|
|
333
|
+
Jt as isCollateralizedDebtPosition,
|
|
334
|
+
$t as isConcentratedLiquidityPosition,
|
|
335
|
+
Mm as isContractDeployed,
|
|
336
|
+
eo as isDelegatedTokens,
|
|
333
337
|
or as isEdgeBrowser,
|
|
334
338
|
w as isEqualAddress,
|
|
335
339
|
ee as isEqualArgentName,
|
|
336
|
-
|
|
340
|
+
Le as isEqualImplementation,
|
|
337
341
|
G as isEqualStarknetDomainName,
|
|
338
342
|
Xe as isEqualStarknetId,
|
|
339
|
-
|
|
340
|
-
|
|
343
|
+
Vo as isFRI,
|
|
344
|
+
Fm as isFeatureEnabled,
|
|
341
345
|
mr as isFirefoxBrowser,
|
|
342
|
-
|
|
346
|
+
Xm as isNumeric,
|
|
343
347
|
nr as isSafariBrowser,
|
|
348
|
+
ao as isStaking,
|
|
344
349
|
z as isStarknetDomainName,
|
|
345
350
|
Ye as isStarknetId,
|
|
346
|
-
|
|
351
|
+
ro as isStrkDelegatedStaking,
|
|
352
|
+
Lr as isUnlimitedAmount,
|
|
347
353
|
H as isValidAddress,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
354
|
+
mo as isValidInputAmount,
|
|
355
|
+
Mo as isWEI,
|
|
356
|
+
L as isZeroAddress,
|
|
357
|
+
Ta as knownDappSchema,
|
|
358
|
+
ka as knownDappsSchema,
|
|
359
|
+
Jn as legacyContractClassSchema,
|
|
360
|
+
$n as legacyEventSchema,
|
|
361
|
+
Tr as lendingInvestmentSchema,
|
|
362
|
+
En as looseCalldataSchema,
|
|
363
|
+
lr as mergeOwnerGuardianSignatures,
|
|
364
|
+
xo as modifySnjsFeeOverhead,
|
|
365
|
+
Rn as multiTypeSchema,
|
|
366
|
+
Wo as multiplyBigIntByFloat,
|
|
367
|
+
va as nameProviderResolutionSchema,
|
|
368
|
+
Na as nameResolutionAddressSchema,
|
|
369
|
+
ba as nameResolutionAddressesSchema,
|
|
370
|
+
Fa as nameResolutionStarknetIdSchema,
|
|
365
371
|
Ia as nameResolutionStarknetIdsSchema,
|
|
366
|
-
|
|
367
|
-
|
|
372
|
+
Um as nonNullable,
|
|
373
|
+
O as normalizeAddress,
|
|
368
374
|
K as normalizeAddressOrDomain,
|
|
369
375
|
ae as normalizeArgentName,
|
|
370
376
|
Ze as normalizeStarknetId,
|
|
371
377
|
za as onchainRecoverySchema,
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
378
|
+
no as parseAmount,
|
|
379
|
+
rn as parseAmountValue,
|
|
380
|
+
on as pluralise,
|
|
375
381
|
da as postData,
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
382
|
+
l as preferencesEndpointPayload,
|
|
383
|
+
h as preferencesSchema,
|
|
384
|
+
Zm as prettifyCurrencyNumber,
|
|
379
385
|
Vr as prettifyCurrencyValue,
|
|
380
|
-
|
|
381
|
-
|
|
386
|
+
Qm as prettifyNumber,
|
|
387
|
+
Jm as prettifyNumberConfig,
|
|
382
388
|
Ur as prettifyTokenAmount,
|
|
383
|
-
|
|
389
|
+
$m as prettifyTokenNumber,
|
|
384
390
|
Bt as productGroupsSchema,
|
|
385
|
-
|
|
391
|
+
ei as programSchema,
|
|
386
392
|
Ba as providersNamesSchema,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
393
|
+
ai as pythonicHintsSchema,
|
|
394
|
+
Pn as rawArgsArraySchema,
|
|
395
|
+
vn as rawArgsObjectSchema,
|
|
396
|
+
Nn as rawArgsSchema,
|
|
397
|
+
nn as readFileAsString,
|
|
392
398
|
Ka as recoveryBaseSchema,
|
|
393
399
|
ja as recoveryBodySchema,
|
|
394
400
|
Xa as recoveryStatusSchema,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
bn as removeOwnersCalldataSchema,
|
|
402
|
+
Fn as removePluginCalldataSchema,
|
|
403
|
+
In as replaceSignerCalldataSchema,
|
|
404
|
+
dn as safeParseAndWarn,
|
|
405
|
+
sr as seedphraseSchema,
|
|
406
|
+
ri as sierraContractEntryPointFieldsSchema,
|
|
407
|
+
ti as sierraEntryPointsByTypeSchema,
|
|
408
|
+
oi as sierraProgramDebugInfoSchema,
|
|
409
|
+
kr as stakingInvestmentSchema,
|
|
404
410
|
_t as stakingPositionSchema,
|
|
405
411
|
wt as stakingPositionsSchema,
|
|
406
|
-
|
|
412
|
+
ge as starkNameToCallDataDomain,
|
|
407
413
|
j as starknetDomainNameSchema,
|
|
408
414
|
Qe as starknetIdSchema,
|
|
409
415
|
Ya as startOnchainRecoveryErrorSchema,
|
|
410
416
|
Za as startOnchainRecoveryErrorStatusSchema,
|
|
411
417
|
Qa as startOnchainRecoverySchema,
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
418
|
+
pn as stringToBooleanSchema,
|
|
419
|
+
Tm as stripAddressZeroPadding,
|
|
420
|
+
Cr as strkDelegatedStakingInvestmentSchema,
|
|
421
|
+
mi as structAbiSchema,
|
|
422
|
+
Uo as toMax,
|
|
423
|
+
qo as tokensRequireTxV3Support,
|
|
424
|
+
yo as transactionReviewTransactionsSchema,
|
|
425
|
+
tm as transactionReviewWarningSchema,
|
|
426
|
+
Bn as transferCalldataSchema,
|
|
427
|
+
ho as trpcErrorSchema,
|
|
428
|
+
sm as txVersionSchema,
|
|
429
|
+
_n as uint256Schema,
|
|
424
430
|
Mt as unclaimedRewardsSchema,
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
431
|
+
Go as unitToFeeTokenAddress,
|
|
432
|
+
ci as urlWithQuery,
|
|
433
|
+
Pr as useToken,
|
|
428
434
|
V as validChecksumAddressSchema,
|
|
429
435
|
M as validateAddressRangeSchema,
|
|
430
|
-
|
|
436
|
+
di as voidify,
|
|
431
437
|
Ut as webBaseTokenSchema,
|
|
432
438
|
qt as webBaseTokenWithBalanceSchema,
|
|
433
439
|
Gt as webTokenInfoDetailsSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),a=require("../../../errors/swap.cjs"),p=require("../models/quote.model.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("url-join"),a=require("../../../errors/swap.cjs"),p=require("../../../utils/url/urlWithQuery.cjs"),l=require("../models/quote.model.cjs"),S=require("../utils/totalFee.cjs"),d=require("../models/trade.model.cjs"),i=require("../models/order.model.cjs");class y{constructor(e,r){if(this.httpService=e,!r)throw new a.SwapError({code:"NO_SWAP_URL"});this.swapQuoteUrl=u(r,"/quote"),this.swapOrderUrl=u(r,"/order")}async getSwapQuoteForPay(e,r,o,n,t="USD"){const s=p.urlWithQuery(this.swapQuoteUrl,{accountAddress:n,currency:t,chain:"starknet",sellToken:e,buyToken:r,sellAmount:o});try{const c=await this.httpService.get(s);return await l.SwapQuoteResponseSchema.parseAsync(c)}catch(c){throw console.error(c),new a.SwapError({code:"INVALID_QUOTE_RESPONSE"})}}async getSwapTradeFromQuote(e,r,o){if(!r||!o)throw new a.SwapError({code:"INVALID_SWAP_TOKENS"});const{totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s}=S.calculateTotalFee(e);return d.TradeSchema.parse({payToken:r,receiveToken:o,payAmount:e.sellAmount,receiveAmount:e.buyAmount,payAmountInCurrency:e.sellAmountInCurrency,receiveAmountInCurrency:e.buyAmountInCurrency,totalFee:n,totalFeeInCurrency:t,totalFeePercentage:s,expiresAt:e.expiresAt,expiresIn:e.expiresIn,route:e.routes[0],data:e.data})}async getSwapOrderFromTrade(e,r,o){const n=i.SwapOrderRequestSchema.parse({chain:"starknet",sellToken:r.payToken.address,buyToken:r.receiveToken.address,sellAmount:r.payAmount,buyAmount:r.receiveAmount,accountAddress:e,slippage:o/1e4,data:r.data});try{const t=await this.httpService.post(this.swapOrderUrl,{body:JSON.stringify(n),headers:{"Content-Type":"application/json"}});return await i.SwapOrderResponseSchema.parseAsync(t)}catch(t){throw console.error(t),new a.SwapError({code:"INVALID_SWAP_ORDER_RESPONSE"})}}}exports.SharedSwapService=y;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import p from "url-join";
|
|
2
2
|
import { SwapError as a } from "../../../errors/swap.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { urlWithQuery as i } from "../../../utils/url/urlWithQuery.js";
|
|
4
|
+
import { SwapQuoteResponseSchema as u } from "../models/quote.model.js";
|
|
5
|
+
import { calculateTotalFee as m } from "../utils/totalFee.js";
|
|
6
|
+
import { TradeSchema as l } from "../models/trade.model.js";
|
|
7
|
+
import { SwapOrderRequestSchema as S, SwapOrderResponseSchema as y } from "../models/order.model.js";
|
|
8
8
|
class _ {
|
|
9
9
|
constructor(e, r) {
|
|
10
10
|
if (this.httpService = e, !r)
|
|
@@ -12,7 +12,7 @@ class _ {
|
|
|
12
12
|
this.swapQuoteUrl = p(r, "/quote"), this.swapOrderUrl = p(r, "/order");
|
|
13
13
|
}
|
|
14
14
|
async getSwapQuoteForPay(e, r, o, n, t = "USD") {
|
|
15
|
-
const s =
|
|
15
|
+
const s = i(this.swapQuoteUrl, {
|
|
16
16
|
accountAddress: n,
|
|
17
17
|
currency: t,
|
|
18
18
|
chain: "starknet",
|
|
@@ -22,7 +22,7 @@ class _ {
|
|
|
22
22
|
});
|
|
23
23
|
try {
|
|
24
24
|
const c = await this.httpService.get(s);
|
|
25
|
-
return await
|
|
25
|
+
return await u.parseAsync(c);
|
|
26
26
|
} catch (c) {
|
|
27
27
|
throw console.error(c), new a({ code: "INVALID_QUOTE_RESPONSE" });
|
|
28
28
|
}
|
|
@@ -30,8 +30,8 @@ class _ {
|
|
|
30
30
|
async getSwapTradeFromQuote(e, r, o) {
|
|
31
31
|
if (!r || !o)
|
|
32
32
|
throw new a({ code: "INVALID_SWAP_TOKENS" });
|
|
33
|
-
const { totalFee: n, totalFeeInCurrency: t, totalFeePercentage: s } =
|
|
34
|
-
return
|
|
33
|
+
const { totalFee: n, totalFeeInCurrency: t, totalFeePercentage: s } = m(e);
|
|
34
|
+
return l.parse({
|
|
35
35
|
payToken: r,
|
|
36
36
|
receiveToken: o,
|
|
37
37
|
payAmount: e.sellAmount,
|
|
@@ -48,7 +48,7 @@ class _ {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
async getSwapOrderFromTrade(e, r, o) {
|
|
51
|
-
const n =
|
|
51
|
+
const n = S.parse({
|
|
52
52
|
chain: "starknet",
|
|
53
53
|
sellToken: r.payToken.address,
|
|
54
54
|
buyToken: r.receiveToken.address,
|
|
@@ -65,7 +65,7 @@ class _ {
|
|
|
65
65
|
"Content-Type": "application/json"
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
|
-
return await
|
|
68
|
+
return await y.parseAsync(t);
|
|
69
69
|
} catch (t) {
|
|
70
70
|
throw console.error(t), new a({ code: "INVALID_SWAP_ORDER_RESPONSE" });
|
|
71
71
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./service/types/backend.model.cjs"),s=e=>t.apiConcentratedLiquidityPositionSchema.safeParse(e).success,i=e=>t.apiCollateralizedDebtPositionSchema.safeParse(e).success,a=e=>t.apiDelegatedTokensSchema.safeParse(e).success,n=e=>t.apiStakingPositionSchema.safeParse(e).success,o=e=>t.apiStrkDelegatedStakingSchema.safeParse(e).success;exports.isCollateralizedDebtPosition=i;exports.isConcentratedLiquidityPosition=s;exports.isDelegatedTokens=a;exports.isStaking=n;exports.isStrkDelegatedStaking=o;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { apiConcentratedLiquidityPositionSchema as s, apiCollateralizedDebtPositionSchema as t, apiDelegatedTokensSchema as a, apiStakingPositionSchema as i, apiStrkDelegatedStakingSchema as n } from "./service/types/backend.model.js";
|
|
2
|
+
const r = (e) => s.safeParse(e).success, c = (e) => t.safeParse(e).success, u = (e) => a.safeParse(e).success, S = (e) => i.safeParse(e).success, d = (e) => n.safeParse(e).success;
|
|
3
|
+
export {
|
|
4
|
+
c as isCollateralizedDebtPosition,
|
|
5
|
+
r as isConcentratedLiquidityPosition,
|
|
6
|
+
u as isDelegatedTokens,
|
|
7
|
+
S as isStaking,
|
|
8
|
+
d as isStrkDelegatedStaking
|
|
9
|
+
};
|