@hinkal/common 0.0.114 → 0.0.116
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/API/{API.js → API.mjs} +10 -10
- package/API/HinkalPointsCalls.mjs +38 -0
- package/API/callBeefyGraphAPI.mjs +37 -0
- package/API/{callCurveAPI.js → callCurveAPI.mjs} +9 -9
- package/API/callMonitor.mjs +30 -0
- package/API/callOdosAPI.mjs +44 -0
- package/API/{callOneInchAPI.js → callOneInchAPI.mjs} +22 -22
- package/API/callRelayer.mjs +32 -0
- package/API/checkRisk.mjs +30 -0
- package/API/dataServerCalls.mjs +32 -0
- package/API/fetchCommitmentsCache.mjs +31 -0
- package/API/fetchNullifiers.mjs +30 -0
- package/API/getAxelarGasEstimate.mjs +37 -0
- package/API/{getCoingeckoPrice.js → getCoingeckoPrice.mjs} +1 -1
- package/API/getConnextReceiveFee.mjs +30 -0
- package/API/getGasEstimates.mjs +38 -0
- package/API/getRelayerURL.mjs +32 -0
- package/API/{getServerURL.js → getServerURL.mjs} +21 -21
- package/API/getTokenPrice.mjs +41 -0
- package/API/{kycCalls.js → kycCalls.mjs} +2 -2
- package/API/passwordCalls.mjs +36 -0
- package/API/{referralProgramCalls.js → referralProgramCalls.mjs} +22 -22
- package/API/relayCalls.mjs +30 -0
- package/API/restoreSnapshots.mjs +32 -0
- package/API/rewardsPointsCalls.mjs +40 -0
- package/API/userVerifyTransactions.mjs +45 -0
- package/constants/{axelar.constants.js → axelar.constants.mjs} +9 -9
- package/constants/{beefy.registry.js → beefy.registry.mjs} +1 -1
- package/constants/{chains.constants.js → chains.constants.mjs} +12 -12
- package/constants/{coingecko.constants.js → coingecko.constants.mjs} +1 -1
- package/constants/{contracts.constants.js → contracts.constants.mjs} +30 -30
- package/constants/{crvCvx.registry.js → crvCvx.registry.mjs} +1 -1
- package/constants/{crvDynamic.registry.js → crvDynamic.registry.mjs} +1 -1
- package/constants/{fees.constants.js → fees.constants.mjs} +22 -22
- package/constants/{kyc.constants.js → kyc.constants.mjs} +3 -3
- package/constants/{pendle.registry.js → pendle.registry.mjs} +2 -2
- package/constants/{reorg-depths.constants.js → reorg-depths.constants.mjs} +1 -1
- package/constants/{rewards.constants.js → rewards.constants.mjs} +4 -4
- package/constants/token-data/{ERC20Registry.js → ERC20Registry.mjs} +18 -18
- package/constants/token-data/index.mjs +6 -0
- package/constants/{vite.constants.js → vite.constants.mjs} +2 -2
- package/crypto/{poseidon.js → poseidon.mjs} +1 -1
- package/crypto/{preProcessing.js → preProcessing.mjs} +2 -2
- package/data-structures/Hinkal/{Hinkal.js → Hinkal.mjs} +46 -46
- package/data-structures/Hinkal/{hinkalActionBeefy.js → hinkalActionBeefy.mjs} +29 -29
- package/data-structures/Hinkal/{hinkalActionConvex.js → hinkalActionConvex.mjs} +29 -29
- package/data-structures/Hinkal/{hinkalActionCurve.js → hinkalActionCurve.mjs} +32 -32
- package/data-structures/Hinkal/{hinkalActionLidoEth.js → hinkalActionLidoEth.mjs} +29 -29
- package/data-structures/Hinkal/{hinkalActionPendle.js → hinkalActionPendle.mjs} +33 -33
- package/data-structures/Hinkal/{hinkalActionPendleLP.js → hinkalActionPendleLP.mjs} +29 -29
- package/data-structures/Hinkal/{hinkalActionStake.js → hinkalActionStake.mjs} +31 -31
- package/data-structures/Hinkal/{hinkalActionVolatile.js → hinkalActionVolatile.mjs} +32 -32
- package/data-structures/Hinkal/{hinkalDeposit.js → hinkalDeposit.mjs} +27 -27
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +47 -0
- package/data-structures/Hinkal/{hinkalPrivateWallet.js → hinkalPrivateWallet.mjs} +27 -27
- package/data-structures/Hinkal/{hinkalSwap.js → hinkalSwap.mjs} +28 -28
- package/data-structures/Hinkal/{hinkalWithdraw.js → hinkalWithdraw.mjs} +31 -31
- package/data-structures/Hinkal/{resetMerkleTrees.js → resetMerkleTrees.mjs} +25 -25
- package/data-structures/MultiThreadedUtxoUtils/{MultiThreadedUtxoUtils.js → MultiThreadedUtxoUtils.mjs} +23 -23
- package/data-structures/crypto-keys/{decodeUTXO.js → decodeUTXO.mjs} +2 -2
- package/data-structures/crypto-keys/{encryptDecryptUtxo.js → encryptDecryptUtxo.mjs} +2 -2
- package/data-structures/crypto-keys/{keyUtils.js → keyUtils.mjs} +1 -1
- package/data-structures/crypto-keys/{keys.js → keys.mjs} +5 -5
- package/data-structures/event-service/{AbstractAccessTokenSnapshotService.js → AbstractAccessTokenSnapshotService.mjs} +25 -25
- package/data-structures/event-service/{AbstractCommitmentsSnapshotService.js → AbstractCommitmentsSnapshotService.mjs} +24 -24
- package/data-structures/event-service/{AbstractEventService.js → AbstractEventService.mjs} +21 -21
- package/data-structures/event-service/{AbstractNullifierSnapshotService.js → AbstractNullifierSnapshotService.mjs} +1 -1
- package/data-structures/event-service/{AbstractSnapshotService.js → AbstractSnapshotService.mjs} +1 -1
- package/data-structures/merkle-tree/{MerkleTree.js → MerkleTree.mjs} +22 -22
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +48 -0
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +47 -0
- package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +44 -0
- package/data-structures/token-price-fetcher/{TokenChecker.js → TokenChecker.mjs} +3 -3
- package/data-structures/token-price-fetcher/{TokenPriceFetcher.js → TokenPriceFetcher.mjs} +32 -32
- package/data-structures/transactions-manager/{TransactionsManager.js → TransactionsManager.mjs} +27 -27
- package/data-structures/transactions-manager/history/{getBeefyData.js → getBeefyData.mjs} +23 -23
- package/data-structures/transactions-manager/history/getConvexData.mjs +57 -0
- package/data-structures/transactions-manager/history/{getCurveData.js → getCurveData.mjs} +23 -23
- package/data-structures/transactions-manager/history/getDepositData.mjs +36 -0
- package/data-structures/transactions-manager/history/getLidoData.mjs +44 -0
- package/data-structures/transactions-manager/history/{getPendleData.js → getPendleData.mjs} +27 -27
- package/data-structures/transactions-manager/history/getSwapData.mjs +43 -0
- package/data-structures/transactions-manager/history/getTxDetails.mjs +74 -0
- package/data-structures/transactions-manager/history/{getVolatileData.js → getVolatileData.mjs} +25 -25
- package/data-structures/transactions-manager/history/{history.types.js → history.types.mjs} +21 -21
- package/data-structures/utxo/{Utxo.js → Utxo.mjs} +4 -4
- package/data-structures/volatile-helper/{VolatileHelper.js → VolatileHelper.mjs} +25 -25
- package/error-handling/customErrors/{FeeOverTransactionValueError.js → FeeOverTransactionValueError.mjs} +1 -1
- package/error-handling/customErrors/{customErrors.helpers.js → customErrors.helpers.mjs} +5 -5
- package/error-handling/{get-error.message.js → get-error.message.mjs} +5 -5
- package/error-handling/handleErrorRestore.mjs +35 -0
- package/error-handling/{logError.js → logError.mjs} +1 -1
- package/functions/kyc/authentoHelper.mjs +42 -0
- package/functions/kyc/passportHelper.mjs +39 -0
- package/functions/kyc/{zkMeHelper.js → zkMeHelper.mjs} +4 -4
- package/functions/pre-transaction/{getFlatFees.js → getFlatFees.mjs} +25 -25
- package/functions/pre-transaction/{interaction-to-action.js → interaction-to-action.mjs} +5 -5
- package/functions/pre-transaction/outputUtxoProcessing.mjs +45 -0
- package/functions/pre-transaction/process-gas-estimates.mjs +57 -0
- package/functions/pre-transaction/{processAmountChanges.js → processAmountChanges.mjs} +27 -27
- package/functions/private-wallet/{opProducer.js → opProducer.mjs} +3 -3
- package/functions/protocols/convex.protocols.mjs +41 -0
- package/functions/protocols/curve.protocols.mjs +45 -0
- package/functions/protocols/{pendle.helpers.js → pendle.helpers.mjs} +26 -26
- package/functions/snarkjs/{common.snarkjs.js → common.snarkjs.mjs} +5 -5
- package/functions/snarkjs/{constant.js → constant.mjs} +21 -21
- package/functions/snarkjs/{constructEmporiumProof.js → constructEmporiumProof.mjs} +13 -13
- package/functions/snarkjs/{constructGeneralZkProof.js → constructGeneralZkProof.mjs} +29 -29
- package/functions/snarkjs/{generateCircomData.js → generateCircomData.mjs} +24 -24
- package/functions/snarkjs/{generateZkProof.js → generateZkProof.mjs} +4 -4
- package/functions/snarkjs/getZKFiles.mjs +30 -0
- package/functions/staking/{index.js → index.mjs} +2 -2
- package/functions/utils/axelar.utils.mjs +38 -0
- package/functions/utils/{cacheFunctions.js → cacheFunctions.mjs} +22 -22
- package/functions/utils/{convertIntegrationProviderToExternalActionId.js → convertIntegrationProviderToExternalActionId.mjs} +5 -5
- package/functions/utils/{erc20tokenFunctions.js → erc20tokenFunctions.mjs} +2 -2
- package/functions/utils/evmNetworkFunctions.mjs +29 -0
- package/functions/utils/{external-action.utils.js → external-action.utils.mjs} +6 -6
- package/functions/utils/{getDataFromTransaction.js → getDataFromTransaction.mjs} +21 -21
- package/functions/utils/{memoize.utils.js → memoize.utils.mjs} +1 -1
- package/functions/utils/volatile-patcher.utils.mjs +40 -0
- package/functions/web3/{etherFunctions.js → etherFunctions.mjs} +1 -1
- package/functions/web3/events/balanceChangedHandler.mjs +10 -0
- package/functions/web3/events/{getInputUtxoAndBalance.js → getInputUtxoAndBalance.mjs} +6 -6
- package/functions/web3/events/{getShieldedBalance.js → getShieldedBalance.mjs} +27 -27
- package/functions/web3/functionCalls/{accessTokenCalls.js → accessTokenCalls.mjs} +22 -22
- package/functions/web3/functionCalls/{approveToken.js → approveToken.mjs} +23 -23
- package/functions/web3/functionCalls/{estimateGasRelayer.js → estimateGasRelayer.mjs} +4 -4
- package/functions/web3/functionCalls/{transactCallDirect.js → transactCallDirect.mjs} +24 -24
- package/functions/web3/functionCalls/transactCallRelayer.mjs +42 -0
- package/functions/web3/{odosAPI.js → odosAPI.mjs} +24 -24
- package/functions/web3/{oneInchAPI.js → oneInchAPI.mjs} +25 -25
- package/functions/web3/{runContractFunction.js → runContractFunction.mjs} +22 -22
- package/functions/web3/{uniswapAPI.js → uniswapAPI.mjs} +25 -25
- package/{index.js → index.mjs} +188 -188
- package/package.json +3 -3
- package/types/{curve.types.js → curve.types.mjs} +1 -1
- package/webworker/{performTaskWithWorker.js → performTaskWithWorker.mjs} +20 -20
- package/webworker/snarkjsWorker/{snarkjsWorkerLogic.js → snarkjsWorkerLogic.mjs} +1 -1
- package/webworker/utxoWorker/{utxoWorkerLogic.js → utxoWorkerLogic.mjs} +8 -8
- package/webworker/{workerFactory.js → workerFactory.mjs} +4 -4
- package/webworker/zkProofWorker/{zkProofWorkerLogic.js → zkProofWorkerLogic.mjs} +8 -8
- package/API/HinkalPointsCalls.js +0 -38
- package/API/callBeefyGraphAPI.js +0 -37
- package/API/callMonitor.js +0 -30
- package/API/callOdosAPI.js +0 -44
- package/API/callRelayer.js +0 -32
- package/API/checkRisk.js +0 -30
- package/API/dataServerCalls.js +0 -32
- package/API/fetchCommitmentsCache.js +0 -31
- package/API/fetchNullifiers.js +0 -30
- package/API/getAxelarGasEstimate.js +0 -37
- package/API/getConnextReceiveFee.js +0 -30
- package/API/getGasEstimates.js +0 -38
- package/API/getRelayerURL.js +0 -32
- package/API/getTokenPrice.js +0 -41
- package/API/passwordCalls.js +0 -36
- package/API/relayCalls.js +0 -30
- package/API/restoreSnapshots.js +0 -32
- package/API/rewardsPointsCalls.js +0 -40
- package/API/userVerifyTransactions.js +0 -45
- package/constants/token-data/index.js +0 -6
- package/data-structures/Hinkal/hinkalGetZkMeProvider.js +0 -47
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.js +0 -48
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.js +0 -47
- package/data-structures/snapshot/ClientNullifierSnapshotService.js +0 -44
- package/data-structures/transactions-manager/history/getConvexData.js +0 -57
- package/data-structures/transactions-manager/history/getDepositData.js +0 -36
- package/data-structures/transactions-manager/history/getLidoData.js +0 -44
- package/data-structures/transactions-manager/history/getSwapData.js +0 -43
- package/data-structures/transactions-manager/history/getTxDetails.js +0 -74
- package/error-handling/handleErrorRestore.js +0 -35
- package/functions/kyc/authentoHelper.js +0 -42
- package/functions/kyc/passportHelper.js +0 -39
- package/functions/pre-transaction/outputUtxoProcessing.js +0 -45
- package/functions/pre-transaction/process-gas-estimates.js +0 -57
- package/functions/protocols/convex.protocols.js +0 -41
- package/functions/protocols/curve.protocols.js +0 -45
- package/functions/snarkjs/getZKFiles.js +0 -30
- package/functions/utils/axelar.utils.js +0 -38
- package/functions/utils/evmNetworkFunctions.js +0 -29
- package/functions/utils/volatile-patcher.utils.js +0 -40
- package/functions/web3/events/balanceChangedHandler.js +0 -10
- package/functions/web3/functionCalls/transactCallRelayer.js +0 -42
- /package/constants/{assets.constants.js → assets.constants.mjs} +0 -0
- /package/constants/{backend.constants.js → backend.constants.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-arbMainnet.json.js → deploy-data-arbMainnet.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-avalanche.json.js → deploy-data-avalanche.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-axelar1.json.js → deploy-data-axelar1.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-axelar2.json.js → deploy-data-axelar2.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-base.json.js → deploy-data-base.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-blast.json.js → deploy-data-blast.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-bnbMainnet.json.js → deploy-data-bnbMainnet.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-ethMainnet.json.js → deploy-data-ethMainnet.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-localhost.json.js → deploy-data-localhost.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-optimism.json.js → deploy-data-optimism.json.mjs} +0 -0
- /package/constants/deploy-data/{deploy-data-polygon.json.js → deploy-data-polygon.json.mjs} +0 -0
- /package/constants/{lido.constants.js → lido.constants.mjs} +0 -0
- /package/constants/{protocol.constants.js → protocol.constants.mjs} +0 -0
- /package/constants/{server.constants.js → server.constants.mjs} +0 -0
- /package/constants/token-data/{arbMainnetRegistry.json.js → arbMainnetRegistry.json.mjs} +0 -0
- /package/constants/token-data/{arbMainnetRegistryFixed.json.js → arbMainnetRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{avalancheRegistry.json.js → avalancheRegistry.json.mjs} +0 -0
- /package/constants/token-data/{avalancheRegistryFixed.json.js → avalancheRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{baseRegistry.json.js → baseRegistry.json.mjs} +0 -0
- /package/constants/token-data/{baseRegistryFixed.json.js → baseRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{blastRegistry.json.js → blastRegistry.json.mjs} +0 -0
- /package/constants/token-data/{blastRegistryFixed.json.js → blastRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{bnbMainnetRegistry.json.js → bnbMainnetRegistry.json.mjs} +0 -0
- /package/constants/token-data/{bnbMainnetRegistryFixed.json.js → bnbMainnetRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{coingeckoRegistry.json.js → coingeckoRegistry.json.mjs} +0 -0
- /package/constants/token-data/{ethMainnetRegistry.json.js → ethMainnetRegistry.json.mjs} +0 -0
- /package/constants/token-data/{ethMainnetRegistryFixed.json.js → ethMainnetRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{localhostRegistry.json.js → localhostRegistry.json.mjs} +0 -0
- /package/constants/token-data/{optimismRegistry.json.js → optimismRegistry.json.mjs} +0 -0
- /package/constants/token-data/{optimismRegistryFixed.json.js → optimismRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{polygonRegistry.json.js → polygonRegistry.json.mjs} +0 -0
- /package/constants/token-data/{polygonRegistryFixed.json.js → polygonRegistryFixed.json.mjs} +0 -0
- /package/constants/token-data/{popularTokens.constants.js → popularTokens.constants.mjs} +0 -0
- /package/constants/token-data/{tokenPricing.consts.js → tokenPricing.consts.mjs} +0 -0
- /package/crypto/{babyJub.js → babyJub.mjs} +0 -0
- /package/data-structures/Hinkal/{hinkalTransfer.js → hinkalTransfer.mjs} +0 -0
- /package/data-structures/ValueCache/{ValueCache.js → ValueCache.mjs} +0 -0
- /package/data-structures/custom-token-registry/{CustomTokenRegistry.js → CustomTokenRegistry.mjs} +0 -0
- /package/data-structures/merkle-tree/{MerkleTreeIncompleteError.js → MerkleTreeIncompleteError.mjs} +0 -0
- /package/data-structures/transactions-manager/history/{history.utils.js → history.utils.mjs} +0 -0
- /package/error-handling/customErrors/{ErrorWithAmount.js → ErrorWithAmount.mjs} +0 -0
- /package/error-handling/{error-codes.constants.js → error-codes.constants.mjs} +0 -0
- /package/error-handling/{types.js → types.mjs} +0 -0
- /package/externalABIs/{BUSD.js → BUSD.mjs} +0 -0
- /package/externalABIs/{BabPassport.json.js → BabPassport.json.mjs} +0 -0
- /package/externalABIs/{BeefyRouterAbi.json.js → BeefyRouterAbi.json.mjs} +0 -0
- /package/externalABIs/{BeefyStrategyAbi.json.js → BeefyStrategyAbi.json.mjs} +0 -0
- /package/externalABIs/{BeefyVaultAbi.json.js → BeefyVaultAbi.json.mjs} +0 -0
- /package/externalABIs/{BeefyZapAbi.json.js → BeefyZapAbi.json.mjs} +0 -0
- /package/externalABIs/{BeefyZapOneInchAbi.json.js → BeefyZapOneInchAbi.json.mjs} +0 -0
- /package/externalABIs/{ConvexBoosterAbi.json.js → ConvexBoosterAbi.json.mjs} +0 -0
- /package/externalABIs/{ConvexBoosterAbiMainnet.json.js → ConvexBoosterAbiMainnet.json.mjs} +0 -0
- /package/externalABIs/{ConvexRewardPoolAbi.json.js → ConvexRewardPoolAbi.json.mjs} +0 -0
- /package/externalABIs/{CurveReadingWrapperAbi.json.js → CurveReadingWrapperAbi.json.mjs} +0 -0
- /package/externalABIs/{CurveWrappedMainPool.json.js → CurveWrappedMainPool.json.mjs} +0 -0
- /package/externalABIs/{CurveZap.json.js → CurveZap.json.mjs} +0 -0
- /package/externalABIs/{CvxCrvUtilities.json.js → CvxCrvUtilities.json.mjs} +0 -0
- /package/externalABIs/{DAI.js → DAI.mjs} +0 -0
- /package/externalABIs/{ERC20.json.js → ERC20.json.mjs} +0 -0
- /package/externalABIs/{GalxePassport.json.js → GalxePassport.json.mjs} +0 -0
- /package/externalABIs/{IQuoterV2.json.js → IQuoterV2.json.mjs} +0 -0
- /package/externalABIs/{ISwapRouter.json.js → ISwapRouter.json.mjs} +0 -0
- /package/externalABIs/{IUniswapV3Factory.json.js → IUniswapV3Factory.json.mjs} +0 -0
- /package/externalABIs/{IUniswapV3Pool.json.js → IUniswapV3Pool.json.mjs} +0 -0
- /package/externalABIs/{LidoStEthAbi.json.js → LidoStEthAbi.json.mjs} +0 -0
- /package/externalABIs/{LidoStMaticAbi.json.js → LidoStMaticAbi.json.mjs} +0 -0
- /package/externalABIs/{LidoStakeManagerAbi.json.js → LidoStakeManagerAbi.json.mjs} +0 -0
- /package/externalABIs/{LidoWithdrawalQueueERC721Abi.json.js → LidoWithdrawalQueueERC721Abi.json.mjs} +0 -0
- /package/externalABIs/{LidoWstEthAbi.json.js → LidoWstEthAbi.json.mjs} +0 -0
- /package/externalABIs/{OptimismGasPriceOracle.json.js → OptimismGasPriceOracle.json.mjs} +0 -0
- /package/externalABIs/{PendleRouterAbi.json.js → PendleRouterAbi.json.mjs} +0 -0
- /package/externalABIs/{PoLidoNftAbi.json.js → PoLidoNftAbi.json.mjs} +0 -0
- /package/externalABIs/{SanctionsList.js → SanctionsList.mjs} +0 -0
- /package/externalABIs/{USDC.js → USDC.mjs} +0 -0
- /package/externalABIs/{USDR.js → USDR.mjs} +0 -0
- /package/externalABIs/{USDR3CRV.js → USDR3CRV.mjs} +0 -0
- /package/externalABIs/{USDT.js → USDT.mjs} +0 -0
- /package/externalABIs/{UniswapV2PoolAbi.json.js → UniswapV2PoolAbi.json.mjs} +0 -0
- /package/externalABIs/{WETH.js → WETH.mjs} +0 -0
- /package/externalABIs/{amToken.js → amToken.mjs} +0 -0
- /package/externalABIs/{transactionsProver.json.js → transactionsProver.json.mjs} +0 -0
- /package/functions/private-wallet/{emporium.helpers.js → emporium.helpers.mjs} +0 -0
- /package/functions/utils/{amounts.utils.js → amounts.utils.mjs} +0 -0
- /package/functions/utils/{caseInsensitive.utils.js → caseInsensitive.utils.mjs} +0 -0
- /package/functions/utils/{create-provider.js → create-provider.mjs} +0 -0
- /package/functions/utils/{enum.utils.js → enum.utils.mjs} +0 -0
- /package/functions/utils/{nickname.utils.js → nickname.utils.mjs} +0 -0
- /package/functions/utils/{process.utils.js → process.utils.mjs} +0 -0
- /package/functions/utils/{reloadPage.js → reloadPage.mjs} +0 -0
- /package/functions/utils/{requireEnv.js → requireEnv.mjs} +0 -0
- /package/functions/utils/{resolve-sync.utils.js → resolve-sync.utils.mjs} +0 -0
- /package/functions/utils/{serialize.utils.js → serialize.utils.mjs} +0 -0
- /package/functions/utils/{string.utils.js → string.utils.mjs} +0 -0
- /package/functions/utils/{time.utils.js → time.utils.mjs} +0 -0
- /package/functions/utils/{userAgent.js → userAgent.mjs} +0 -0
- /package/functions/web3/events/{web3RetrieveEvents.js → web3RetrieveEvents.mjs} +0 -0
- /package/types/{beefy.types.js → beefy.types.mjs} +0 -0
- /package/types/{circom-data.types.js → circom-data.types.mjs} +0 -0
- /package/types/{ethereum-network.types.js → ethereum-network.types.mjs} +0 -0
- /package/types/{external-action.types.js → external-action.types.mjs} +0 -0
- /package/types/{hinkal.stake.types.js → hinkal.stake.types.mjs} +0 -0
- /package/types/{hinkal.types.js → hinkal.types.mjs} +0 -0
- /package/types/{kyc.types.js → kyc.types.mjs} +0 -0
- /package/types/{pendle.types.js → pendle.types.mjs} +0 -0
- /package/types/{rewards.types.js → rewards.types.mjs} +0 -0
- /package/types/{slippage.types.js → slippage.types.mjs} +0 -0
- /package/types/{time.types.js → time.types.mjs} +0 -0
- /package/types/{token.types.js → token.types.mjs} +0 -0
- /package/types/{transactions.types.js → transactions.types.mjs} +0 -0
- /package/webworker/snarkjsWorker/{snarkjsWorker.types.js → snarkjsWorker.types.mjs} +0 -0
- /package/webworker/utxoWorker/{utxoWorker.types.js → utxoWorker.types.mjs} +0 -0
- /package/webworker/{worker.registry.js → worker.registry.mjs} +0 -0
- /package/webworker/{workerProxy.js → workerProxy.mjs} +0 -0
- /package/webworker/zkProofWorker/{zkProofWorker.types.js → zkProofWorker.types.mjs} +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import i from "axios";
|
|
2
|
-
import { getServerURL as a } from "./getServerURL.js";
|
|
3
|
-
import "../constants/chains.constants.js";
|
|
4
|
-
import "../types/circom-data.types.js";
|
|
5
|
-
import "../types/transactions.types.js";
|
|
6
|
-
import "../types/curve.types.js";
|
|
7
|
-
import "ethers";
|
|
8
|
-
import "circomlibjs";
|
|
9
|
-
import "../data-structures/crypto-keys/keys.js";
|
|
10
|
-
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
-
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
-
import "../webworker/workerFactory.js";
|
|
13
|
-
import "../functions/utils/external-action.utils.js";
|
|
14
|
-
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
-
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
-
import "../constants/coingecko.constants.js";
|
|
17
|
-
import { API_CONFIG as m } from "../constants/server.constants.js";
|
|
18
|
-
import "../constants/vite.constants.js";
|
|
19
|
-
import "../functions/utils/userAgent.js";
|
|
20
|
-
import "../constants/reorg-depths.constants.js";
|
|
21
|
-
import "../constants/kyc.constants.js";
|
|
22
|
-
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
-
import "libsodium-wrappers";
|
|
24
|
-
import "../constants/contracts.constants.js";
|
|
25
|
-
import "../constants/axelar.constants.js";
|
|
26
|
-
import "../constants/rewards.constants.js";
|
|
27
|
-
const P = async (t, r) => {
|
|
28
|
-
const { data: o } = await i.get(
|
|
29
|
-
`${a(t)}${m.ROUTES.verificationStartDate(r)}`
|
|
30
|
-
);
|
|
31
|
-
return o;
|
|
32
|
-
}, _ = async (t, r, o) => (await i.get(
|
|
33
|
-
`${a(t)}${m.ROUTES.userGetTransactions(r, o)}`
|
|
34
|
-
)).data, b = async (t, r, o, s, p, n) => (await i.post(`${a(t)}${m.ROUTES.userVerifyTransactions}`, {
|
|
35
|
-
transactionHashes: r,
|
|
36
|
-
zkCallDataArray: o,
|
|
37
|
-
backendToken: s,
|
|
38
|
-
ethereumAddress: p,
|
|
39
|
-
week: n
|
|
40
|
-
})).data;
|
|
41
|
-
export {
|
|
42
|
-
_ as userGetTransactions,
|
|
43
|
-
b as userVerifyTransactions,
|
|
44
|
-
P as verificationStartDate
|
|
45
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import "../../constants/chains.constants.js";
|
|
2
|
-
import "../../types/circom-data.types.js";
|
|
3
|
-
import "../../types/transactions.types.js";
|
|
4
|
-
import "../../types/curve.types.js";
|
|
5
|
-
import "ethers";
|
|
6
|
-
import "circomlibjs";
|
|
7
|
-
import "../crypto-keys/keys.js";
|
|
8
|
-
import "axios";
|
|
9
|
-
import "../crypto-keys/encryptDecryptUtxo.js";
|
|
10
|
-
import "../../functions/web3/events/getShieldedBalance.js";
|
|
11
|
-
import "../../webworker/workerFactory.js";
|
|
12
|
-
import "../../functions/utils/external-action.utils.js";
|
|
13
|
-
import "../custom-token-registry/CustomTokenRegistry.js";
|
|
14
|
-
import "../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
15
|
-
import "../../functions/utils/userAgent.js";
|
|
16
|
-
import "../../constants/reorg-depths.constants.js";
|
|
17
|
-
import "../../constants/kyc.constants.js";
|
|
18
|
-
import "../../constants/coingecko.constants.js";
|
|
19
|
-
import "../../constants/vite.constants.js";
|
|
20
|
-
import "../volatile-helper/VolatileHelper.js";
|
|
21
|
-
import "libsodium-wrappers";
|
|
22
|
-
import "../../constants/contracts.constants.js";
|
|
23
|
-
import "../../constants/axelar.constants.js";
|
|
24
|
-
import "../../constants/rewards.constants.js";
|
|
25
|
-
import { API as i } from "../../API/API.js";
|
|
26
|
-
const q = (e) => ({
|
|
27
|
-
async getAccessToken() {
|
|
28
|
-
const r = e.getCurrentChainId();
|
|
29
|
-
return i.getZkMeAccessToken(r);
|
|
30
|
-
},
|
|
31
|
-
async getUserAccounts() {
|
|
32
|
-
return [await e.getEthereumAddress()];
|
|
33
|
-
},
|
|
34
|
-
async delegateTransaction(r) {
|
|
35
|
-
const t = await e.getProviderAdapter(), o = {
|
|
36
|
-
...r,
|
|
37
|
-
chainId: Number(r.chainId),
|
|
38
|
-
type: r.type ? r.type : void 0,
|
|
39
|
-
maxPriorityFeePerGas: r.maxPriorityFeePerGas ? r.maxPriorityFeePerGas : void 0,
|
|
40
|
-
maxFeePerGas: r.maxFeePerGas ? r.maxFeePerGas : void 0
|
|
41
|
-
};
|
|
42
|
-
return (await t.sendTransaction(o)).hash;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
export {
|
|
46
|
-
q as getHinkalZkMeProvider
|
|
47
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { AbstractAccessTokenSnapshotService as e } from "../event-service/AbstractAccessTokenSnapshotService.js";
|
|
2
|
-
import "circomlibjs";
|
|
3
|
-
import "ethers";
|
|
4
|
-
import "axios";
|
|
5
|
-
import "../../constants/chains.constants.js";
|
|
6
|
-
import "../../types/circom-data.types.js";
|
|
7
|
-
import "../../types/transactions.types.js";
|
|
8
|
-
import "../../types/curve.types.js";
|
|
9
|
-
import "../crypto-keys/keys.js";
|
|
10
|
-
import "../crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
-
import "../../functions/web3/events/getShieldedBalance.js";
|
|
12
|
-
import "../../webworker/workerFactory.js";
|
|
13
|
-
import "../../functions/utils/external-action.utils.js";
|
|
14
|
-
import "../custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
-
import "../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
-
import "../../constants/coingecko.constants.js";
|
|
17
|
-
import "../../constants/vite.constants.js";
|
|
18
|
-
import "../../functions/utils/userAgent.js";
|
|
19
|
-
import { fetchAccessTokenSnapshot as o } from "../../API/fetchCommitmentsCache.js";
|
|
20
|
-
import "../../constants/kyc.constants.js";
|
|
21
|
-
import "../volatile-helper/VolatileHelper.js";
|
|
22
|
-
import "libsodium-wrappers";
|
|
23
|
-
import "../../constants/contracts.constants.js";
|
|
24
|
-
import "../../constants/axelar.constants.js";
|
|
25
|
-
import "../../constants/rewards.constants.js";
|
|
26
|
-
import "../../constants/reorg-depths.constants.js";
|
|
27
|
-
class z extends e {
|
|
28
|
-
constructor(t, r) {
|
|
29
|
-
super(t, 0, !1, r);
|
|
30
|
-
}
|
|
31
|
-
async fetchSnapshot() {
|
|
32
|
-
const { chainId: t } = await this.contract.provider.getNetwork(), r = await o(t);
|
|
33
|
-
if (r.accessTokenContractAddress !== this.contract.address || r.chainId !== t)
|
|
34
|
-
throw Error("Commitment Snapshot: incorrect contract or chain id");
|
|
35
|
-
return {
|
|
36
|
-
latestBlockNumber: r.latestBlockNumber,
|
|
37
|
-
merkleTree: r.merkleTree,
|
|
38
|
-
senderAddresses: r.senderAddresses,
|
|
39
|
-
senderAddressIndexMap: r.senderAddressIndexMap
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
persistSnapshot(t) {
|
|
43
|
-
return Promise.resolve();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
z as ClientAccessTokenSnapshotService
|
|
48
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import "../../constants/chains.constants.js";
|
|
2
|
-
import "../../types/circom-data.types.js";
|
|
3
|
-
import "../../types/transactions.types.js";
|
|
4
|
-
import "../../types/curve.types.js";
|
|
5
|
-
import "ethers";
|
|
6
|
-
import "circomlibjs";
|
|
7
|
-
import "../crypto-keys/keys.js";
|
|
8
|
-
import "axios";
|
|
9
|
-
import "../crypto-keys/encryptDecryptUtxo.js";
|
|
10
|
-
import "../../functions/web3/events/getShieldedBalance.js";
|
|
11
|
-
import "../../webworker/workerFactory.js";
|
|
12
|
-
import "../../functions/utils/external-action.utils.js";
|
|
13
|
-
import "../custom-token-registry/CustomTokenRegistry.js";
|
|
14
|
-
import "../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
15
|
-
import "../../constants/coingecko.constants.js";
|
|
16
|
-
import "../../constants/vite.constants.js";
|
|
17
|
-
import "../../functions/utils/userAgent.js";
|
|
18
|
-
import { fetchCommitmentsSnapshot as o } from "../../API/fetchCommitmentsCache.js";
|
|
19
|
-
import "../../constants/kyc.constants.js";
|
|
20
|
-
import "../volatile-helper/VolatileHelper.js";
|
|
21
|
-
import "libsodium-wrappers";
|
|
22
|
-
import "../../constants/contracts.constants.js";
|
|
23
|
-
import "../../constants/axelar.constants.js";
|
|
24
|
-
import "../../constants/rewards.constants.js";
|
|
25
|
-
import "../../constants/reorg-depths.constants.js";
|
|
26
|
-
import { AbstractCommitmentsSnapshotService as i } from "../event-service/AbstractCommitmentsSnapshotService.js";
|
|
27
|
-
class z extends i {
|
|
28
|
-
constructor(r, t) {
|
|
29
|
-
super(r, 0, !1, t);
|
|
30
|
-
}
|
|
31
|
-
async fetchSnapshot() {
|
|
32
|
-
const { chainId: r } = await this.contract.provider.getNetwork(), t = await o(r);
|
|
33
|
-
if (t.hinkalAddress !== this.contract.address || t.chainId !== r)
|
|
34
|
-
throw Error("Commitment Snapshot: incorrect contract or chain id");
|
|
35
|
-
return {
|
|
36
|
-
latestBlockNumber: t.latestBlockNumber,
|
|
37
|
-
merkleTree: t.merkleTree,
|
|
38
|
-
encryptedOutputs: t.encryptedOutputs
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
persistSnapshot(r) {
|
|
42
|
-
return Promise.resolve();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
z as ClientCommitmentsSnapshotService
|
|
47
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "../../constants/chains.constants.js";
|
|
2
|
-
import "../../types/circom-data.types.js";
|
|
3
|
-
import "../../types/transactions.types.js";
|
|
4
|
-
import "../../types/curve.types.js";
|
|
5
|
-
import "ethers";
|
|
6
|
-
import "circomlibjs";
|
|
7
|
-
import "../crypto-keys/keys.js";
|
|
8
|
-
import "axios";
|
|
9
|
-
import "../crypto-keys/encryptDecryptUtxo.js";
|
|
10
|
-
import "../../functions/web3/events/getShieldedBalance.js";
|
|
11
|
-
import "../../webworker/workerFactory.js";
|
|
12
|
-
import "../../functions/utils/external-action.utils.js";
|
|
13
|
-
import "../custom-token-registry/CustomTokenRegistry.js";
|
|
14
|
-
import "../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
15
|
-
import "../../constants/coingecko.constants.js";
|
|
16
|
-
import "../../constants/vite.constants.js";
|
|
17
|
-
import "../../functions/utils/userAgent.js";
|
|
18
|
-
import { fetchNullifiers as i } from "../../API/fetchNullifiers.js";
|
|
19
|
-
import "../../constants/kyc.constants.js";
|
|
20
|
-
import "../volatile-helper/VolatileHelper.js";
|
|
21
|
-
import "libsodium-wrappers";
|
|
22
|
-
import "../../constants/contracts.constants.js";
|
|
23
|
-
import "../../constants/axelar.constants.js";
|
|
24
|
-
import "../../constants/rewards.constants.js";
|
|
25
|
-
import "../../constants/reorg-depths.constants.js";
|
|
26
|
-
import { AbstractNullifierSnapshotService as o } from "../event-service/AbstractNullifierSnapshotService.js";
|
|
27
|
-
class P extends o {
|
|
28
|
-
constructor(t, r) {
|
|
29
|
-
super(t, 0, !1, r);
|
|
30
|
-
}
|
|
31
|
-
async fetchSnapshot() {
|
|
32
|
-
const { chainId: t } = await this.contract.provider.getNetwork(), r = await i(t);
|
|
33
|
-
return {
|
|
34
|
-
latestBlockNumber: r.latestBlockNumber,
|
|
35
|
-
nullifiers: r.nullifiers
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
persistSnapshot(t) {
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
P as ClientNullifierSnapshotService
|
|
44
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { utils as c } from "ethers";
|
|
2
|
-
import "../../../types/circom-data.types.js";
|
|
3
|
-
import { ConvexAction as r } from "../../../types/hinkal.types.js";
|
|
4
|
-
import "../../../types/transactions.types.js";
|
|
5
|
-
import "../../../types/curve.types.js";
|
|
6
|
-
import "../../../constants/chains.constants.js";
|
|
7
|
-
import "../../../constants/vite.constants.js";
|
|
8
|
-
import "../../../constants/contracts.constants.js";
|
|
9
|
-
import "../../../constants/kyc.constants.js";
|
|
10
|
-
import "../../../constants/coingecko.constants.js";
|
|
11
|
-
import "../../../constants/axelar.constants.js";
|
|
12
|
-
import "../../../constants/rewards.constants.js";
|
|
13
|
-
import "../../../constants/reorg-depths.constants.js";
|
|
14
|
-
import "circomlibjs";
|
|
15
|
-
import "../../crypto-keys/keys.js";
|
|
16
|
-
import "axios";
|
|
17
|
-
import "../../crypto-keys/encryptDecryptUtxo.js";
|
|
18
|
-
import "../../../functions/web3/events/getShieldedBalance.js";
|
|
19
|
-
import "../../../webworker/workerFactory.js";
|
|
20
|
-
import "../../../functions/utils/external-action.utils.js";
|
|
21
|
-
import { getERC20Token as m } from "../../../functions/utils/erc20tokenFunctions.js";
|
|
22
|
-
import "../../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
23
|
-
import "../../../functions/utils/userAgent.js";
|
|
24
|
-
import { TransactionType as n } from "./history.types.js";
|
|
25
|
-
import "../../volatile-helper/VolatileHelper.js";
|
|
26
|
-
import "../../custom-token-registry/CustomTokenRegistry.js";
|
|
27
|
-
import "libsodium-wrappers";
|
|
28
|
-
const h = (e, p, i) => {
|
|
29
|
-
const o = c.defaultAbiCoder.decode(
|
|
30
|
-
["uint8", "uint256", "uint256", "uint256"],
|
|
31
|
-
e.externalActionMetadata
|
|
32
|
-
)[0];
|
|
33
|
-
if (o === r.StakeLP || o === r.UnStakeLP) {
|
|
34
|
-
const t = e.erc20TokenAddresses[1];
|
|
35
|
-
return { poolToken: {
|
|
36
|
-
token: m(t, i) ?? { erc20TokenAddress: t },
|
|
37
|
-
balance: e.amountChanges[1].toBigInt()
|
|
38
|
-
}, type: n.CONVEX, convexAction: o };
|
|
39
|
-
}
|
|
40
|
-
if (o === r.ClaimRewardsLP) {
|
|
41
|
-
const t = p[0];
|
|
42
|
-
return {
|
|
43
|
-
poolToken: {
|
|
44
|
-
token: m(t.erc20TokenAddress, i) ?? {
|
|
45
|
-
erc20TokenAddress: t.erc20TokenAddress
|
|
46
|
-
},
|
|
47
|
-
balance: t.amount
|
|
48
|
-
},
|
|
49
|
-
type: n.CONVEX,
|
|
50
|
-
convexAction: o
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
return { type: n.CONVEX, convexAction: o };
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
h as getConvexData
|
|
57
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import "../../../constants/chains.constants.js";
|
|
2
|
-
import "../../../types/circom-data.types.js";
|
|
3
|
-
import "../../../types/transactions.types.js";
|
|
4
|
-
import "../../../types/curve.types.js";
|
|
5
|
-
import "../../../constants/vite.constants.js";
|
|
6
|
-
import "../../../constants/contracts.constants.js";
|
|
7
|
-
import "../../../constants/kyc.constants.js";
|
|
8
|
-
import "../../../constants/coingecko.constants.js";
|
|
9
|
-
import "../../../constants/axelar.constants.js";
|
|
10
|
-
import "../../../constants/rewards.constants.js";
|
|
11
|
-
import "../../../constants/reorg-depths.constants.js";
|
|
12
|
-
import "ethers";
|
|
13
|
-
import "circomlibjs";
|
|
14
|
-
import "../../crypto-keys/keys.js";
|
|
15
|
-
import "axios";
|
|
16
|
-
import "../../crypto-keys/encryptDecryptUtxo.js";
|
|
17
|
-
import "../../../functions/web3/events/getShieldedBalance.js";
|
|
18
|
-
import "../../../webworker/workerFactory.js";
|
|
19
|
-
import "../../../functions/utils/external-action.utils.js";
|
|
20
|
-
import { getERC20Token as e } from "../../../functions/utils/erc20tokenFunctions.js";
|
|
21
|
-
import "../../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
22
|
-
import "../../../functions/utils/userAgent.js";
|
|
23
|
-
import { TransactionType as p } from "./history.types.js";
|
|
24
|
-
import "../../volatile-helper/VolatileHelper.js";
|
|
25
|
-
import "../../custom-token-registry/CustomTokenRegistry.js";
|
|
26
|
-
import "libsodium-wrappers";
|
|
27
|
-
const j = (t, m) => {
|
|
28
|
-
const o = t.erc20TokenAddresses[0], r = t.amountChanges[0].toBigInt(), i = {
|
|
29
|
-
token: e(o, m) ?? { erc20TokenAddress: o },
|
|
30
|
-
balance: r
|
|
31
|
-
};
|
|
32
|
-
return r < 0 ? { tokenWithBalance: i, type: p.WITHDRAW } : { tokenWithBalance: i, type: p.DEPOSIT };
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
j as getDepositData
|
|
36
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { utils as a } from "ethers";
|
|
2
|
-
import "../../../constants/chains.constants.js";
|
|
3
|
-
import "../../../types/circom-data.types.js";
|
|
4
|
-
import { ExternalActionId as i } from "../../../types/external-action.types.js";
|
|
5
|
-
import { LidoAction as p } from "../../../types/hinkal.types.js";
|
|
6
|
-
import "../../../types/transactions.types.js";
|
|
7
|
-
import "../../../types/curve.types.js";
|
|
8
|
-
import "circomlibjs";
|
|
9
|
-
import "../../crypto-keys/keys.js";
|
|
10
|
-
import "axios";
|
|
11
|
-
import "../../crypto-keys/encryptDecryptUtxo.js";
|
|
12
|
-
import "../../../functions/web3/events/getShieldedBalance.js";
|
|
13
|
-
import "../../../webworker/workerFactory.js";
|
|
14
|
-
import { getExternalActionIdHash as r } from "../../../functions/utils/external-action.utils.js";
|
|
15
|
-
import { getERC20TokenBySymbol as e } from "../../../functions/utils/erc20tokenFunctions.js";
|
|
16
|
-
import "../../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
17
|
-
import "../../../constants/coingecko.constants.js";
|
|
18
|
-
import "../../../constants/vite.constants.js";
|
|
19
|
-
import "../../../functions/utils/userAgent.js";
|
|
20
|
-
import "../../../constants/reorg-depths.constants.js";
|
|
21
|
-
import "../../../constants/kyc.constants.js";
|
|
22
|
-
import { TransactionType as d } from "./history.types.js";
|
|
23
|
-
import { wstEthSymbol as l, stMaticSymbol as c, ethSymbol as s, maticSymbol as T } from "../../../constants/lido.constants.js";
|
|
24
|
-
import "../../volatile-helper/VolatileHelper.js";
|
|
25
|
-
import "../../custom-token-registry/CustomTokenRegistry.js";
|
|
26
|
-
import "libsodium-wrappers";
|
|
27
|
-
import "../../../constants/contracts.constants.js";
|
|
28
|
-
import "../../../constants/axelar.constants.js";
|
|
29
|
-
import "../../../constants/rewards.constants.js";
|
|
30
|
-
const U = (t, A, o) => {
|
|
31
|
-
const n = a.defaultAbiCoder.decode(["uint8"], t.externalActionMetadata)[0];
|
|
32
|
-
let m;
|
|
33
|
-
return n === p.Request ? m = t.externalActionId.toBigInt() === r(i.LidoETH) || t.externalActionId.toBigInt() === r(i.LidoETHNFT) ? e(l, o) : e(c, o) : m = t.externalActionId.toBigInt() === r(i.LidoETH) || t.externalActionId.toBigInt() === r(i.LidoETHNFT) ? e(s, o) : e(T, o), {
|
|
34
|
-
lidoToken: {
|
|
35
|
-
token: m,
|
|
36
|
-
balance: t.amountChanges[1].toBigInt()
|
|
37
|
-
},
|
|
38
|
-
type: d.LIDO,
|
|
39
|
-
lidoAction: n
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
U as getLidoData
|
|
44
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import "../../../constants/chains.constants.js";
|
|
2
|
-
import "../../../types/circom-data.types.js";
|
|
3
|
-
import "../../../types/transactions.types.js";
|
|
4
|
-
import "../../../types/curve.types.js";
|
|
5
|
-
import "../../../constants/vite.constants.js";
|
|
6
|
-
import "../../../constants/contracts.constants.js";
|
|
7
|
-
import "../../../constants/kyc.constants.js";
|
|
8
|
-
import "../../../constants/coingecko.constants.js";
|
|
9
|
-
import "../../../constants/axelar.constants.js";
|
|
10
|
-
import "../../../constants/rewards.constants.js";
|
|
11
|
-
import "../../../constants/reorg-depths.constants.js";
|
|
12
|
-
import "ethers";
|
|
13
|
-
import "circomlibjs";
|
|
14
|
-
import "../../crypto-keys/keys.js";
|
|
15
|
-
import "axios";
|
|
16
|
-
import "../../crypto-keys/encryptDecryptUtxo.js";
|
|
17
|
-
import "../../../functions/web3/events/getShieldedBalance.js";
|
|
18
|
-
import "../../../webworker/workerFactory.js";
|
|
19
|
-
import "../../../functions/utils/external-action.utils.js";
|
|
20
|
-
import { getERC20Token as e } from "../../../functions/utils/erc20tokenFunctions.js";
|
|
21
|
-
import "../../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
22
|
-
import "../../../functions/utils/userAgent.js";
|
|
23
|
-
import { TransactionType as n } from "./history.types.js";
|
|
24
|
-
import "../../volatile-helper/VolatileHelper.js";
|
|
25
|
-
import "../../custom-token-registry/CustomTokenRegistry.js";
|
|
26
|
-
import "libsodium-wrappers";
|
|
27
|
-
const h = (o, m, r) => {
|
|
28
|
-
const p = {
|
|
29
|
-
token: e(o.erc20TokenAddresses[0], r) ?? {
|
|
30
|
-
erc20TokenAddress: o.erc20TokenAddresses[0]
|
|
31
|
-
},
|
|
32
|
-
balance: -1n * o.amountChanges[0].toBigInt()
|
|
33
|
-
}, t = m[0], i = {
|
|
34
|
-
token: e(t.erc20TokenAddress, r) ?? {
|
|
35
|
-
erc20TokenAddress: t.erc20TokenAddress
|
|
36
|
-
},
|
|
37
|
-
balance: t.amount
|
|
38
|
-
};
|
|
39
|
-
return { tokenIn: p, tokenOut: i, type: n.SWAP, protocol: o.externalActionId.toBigInt() };
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
h as getSwapData
|
|
43
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import "../../../types/circom-data.types.js";
|
|
2
|
-
import { ExternalActionId as t } from "../../../types/external-action.types.js";
|
|
3
|
-
import "../../../types/transactions.types.js";
|
|
4
|
-
import "../../../types/curve.types.js";
|
|
5
|
-
import { getNonLocalhostChainId as n } from "../../../constants/chains.constants.js";
|
|
6
|
-
import "../../../constants/vite.constants.js";
|
|
7
|
-
import "../../../constants/contracts.constants.js";
|
|
8
|
-
import "../../../constants/kyc.constants.js";
|
|
9
|
-
import "../../../constants/coingecko.constants.js";
|
|
10
|
-
import "../../../constants/axelar.constants.js";
|
|
11
|
-
import "../../../constants/rewards.constants.js";
|
|
12
|
-
import "../../../constants/reorg-depths.constants.js";
|
|
13
|
-
import "ethers";
|
|
14
|
-
import "circomlibjs";
|
|
15
|
-
import "../../crypto-keys/keys.js";
|
|
16
|
-
import "axios";
|
|
17
|
-
import "../../crypto-keys/encryptDecryptUtxo.js";
|
|
18
|
-
import "../../../functions/web3/events/getShieldedBalance.js";
|
|
19
|
-
import "../../../webworker/workerFactory.js";
|
|
20
|
-
import { getExternalActionIdHash as r } from "../../../functions/utils/external-action.utils.js";
|
|
21
|
-
import "../../custom-token-registry/CustomTokenRegistry.js";
|
|
22
|
-
import "../../../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
23
|
-
import { logError as c } from "../../../error-handling/logError.js";
|
|
24
|
-
import "../../../functions/utils/userAgent.js";
|
|
25
|
-
import { getBeefyData as p } from "./getBeefyData.js";
|
|
26
|
-
import { getConvexData as s } from "./getConvexData.js";
|
|
27
|
-
import { getCurveData as l } from "./getCurveData.js";
|
|
28
|
-
import { getDepositData as d } from "./getDepositData.js";
|
|
29
|
-
import { getSwapData as f } from "./getSwapData.js";
|
|
30
|
-
import { TransactionType as T, externalActionToTransactionType as g } from "./history.types.js";
|
|
31
|
-
import { getLidoData as C } from "./getLidoData.js";
|
|
32
|
-
import { getPendleData as D } from "./getPendleData.js";
|
|
33
|
-
import { getVolatileData as I } from "./getVolatileData.js";
|
|
34
|
-
import "../../volatile-helper/VolatileHelper.js";
|
|
35
|
-
import "libsodium-wrappers";
|
|
36
|
-
const tt = async (i, e, a = []) => {
|
|
37
|
-
try {
|
|
38
|
-
const o = n(i);
|
|
39
|
-
switch (e.externalActionId.toBigInt()) {
|
|
40
|
-
case r(t.Transact):
|
|
41
|
-
case 0n:
|
|
42
|
-
return d(e, o);
|
|
43
|
-
case r(t.Uniswap):
|
|
44
|
-
case r(t.Odos):
|
|
45
|
-
case r(t.OneInch):
|
|
46
|
-
return f(e, a, o);
|
|
47
|
-
case r(t.Beefy):
|
|
48
|
-
return p(e, a, o);
|
|
49
|
-
case r(t.Curve):
|
|
50
|
-
case r(t.CurveCRV):
|
|
51
|
-
case r(t.CurveDynamic):
|
|
52
|
-
case r(t.CurveCRVRewards):
|
|
53
|
-
return l(e, a, o);
|
|
54
|
-
case r(t.Convex):
|
|
55
|
-
return s(e, a, o);
|
|
56
|
-
case r(t.LidoETH):
|
|
57
|
-
case r(t.LidoETHNFT):
|
|
58
|
-
case r(t.LidoMATIC):
|
|
59
|
-
case r(t.LidoMATICNFT):
|
|
60
|
-
return C(e, a, o);
|
|
61
|
-
case r(t.Pendle):
|
|
62
|
-
return D(e, a, o);
|
|
63
|
-
case r(t.Volatile):
|
|
64
|
-
return await I(e, a, o);
|
|
65
|
-
default:
|
|
66
|
-
return { type: T.UNKNOWN };
|
|
67
|
-
}
|
|
68
|
-
} catch (o) {
|
|
69
|
-
return c(o), { type: g(e) };
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
export {
|
|
73
|
-
tt as getTxDetails
|
|
74
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { extractMessage as p } from "./get-error.message.js";
|
|
2
|
-
import { restoreSnapshots as e } from "../API/restoreSnapshots.js";
|
|
3
|
-
import { transactionErrorCodes as r } from "./error-codes.constants.js";
|
|
4
|
-
import "ethers";
|
|
5
|
-
import "circomlibjs";
|
|
6
|
-
import "../data-structures/crypto-keys/keys.js";
|
|
7
|
-
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
8
|
-
import "../types/circom-data.types.js";
|
|
9
|
-
import "../types/transactions.types.js";
|
|
10
|
-
import "../types/curve.types.js";
|
|
11
|
-
import "../constants/chains.constants.js";
|
|
12
|
-
import "../constants/vite.constants.js";
|
|
13
|
-
import "../functions/utils/external-action.utils.js";
|
|
14
|
-
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
-
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
-
import "axios";
|
|
17
|
-
import "../constants/coingecko.constants.js";
|
|
18
|
-
import "../functions/web3/events/getShieldedBalance.js";
|
|
19
|
-
import "../functions/utils/userAgent.js";
|
|
20
|
-
import "../webworker/workerFactory.js";
|
|
21
|
-
import "libsodium-wrappers";
|
|
22
|
-
import "../constants/contracts.constants.js";
|
|
23
|
-
import "../constants/kyc.constants.js";
|
|
24
|
-
import "../constants/axelar.constants.js";
|
|
25
|
-
import "../constants/rewards.constants.js";
|
|
26
|
-
import "../constants/reorg-depths.constants.js";
|
|
27
|
-
import { resetMerkleTrees as E } from "../data-structures/Hinkal/resetMerkleTrees.js";
|
|
28
|
-
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
29
|
-
async function k(o, i) {
|
|
30
|
-
const m = i.getCurrentChainId(), t = p(o);
|
|
31
|
-
return t === r.INVALID_NULLIFIER || t === r.MERKLE_TREE_INCOMPLETE || t === r.ACCESS_TOKEN_INVALID_HASH || t === r.INVALID_MERKLE_ROOT || t === r.MERLE_TREE_SNARK || t === r.STATE_TO_UPDATE ? (await e(m), await E(i), new Error(r.INTERNAL_ERROR)) : o;
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
k as checkErrorForSnapshotRestore
|
|
35
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { v4 as y } from "uuid";
|
|
2
|
-
import "../../constants/chains.constants.js";
|
|
3
|
-
import "../../types/circom-data.types.js";
|
|
4
|
-
import "../../types/transactions.types.js";
|
|
5
|
-
import "../../types/curve.types.js";
|
|
6
|
-
import "ethers";
|
|
7
|
-
import "circomlibjs";
|
|
8
|
-
import "../../data-structures/crypto-keys/keys.js";
|
|
9
|
-
import "axios";
|
|
10
|
-
import "../../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
-
import "../web3/events/getShieldedBalance.js";
|
|
12
|
-
import "../../webworker/workerFactory.js";
|
|
13
|
-
import "../utils/external-action.utils.js";
|
|
14
|
-
import "../../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
-
import "../utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
-
import "../../constants/coingecko.constants.js";
|
|
17
|
-
import "../../constants/vite.constants.js";
|
|
18
|
-
import "../utils/userAgent.js";
|
|
19
|
-
import "../../constants/reorg-depths.constants.js";
|
|
20
|
-
import { AUTHENTO as m } from "../../constants/kyc.constants.js";
|
|
21
|
-
import "../../data-structures/volatile-helper/VolatileHelper.js";
|
|
22
|
-
import { openDefaultPassportWindow as f } from "./passportHelper.js";
|
|
23
|
-
import "libsodium-wrappers";
|
|
24
|
-
import "../../constants/contracts.constants.js";
|
|
25
|
-
import "../../constants/axelar.constants.js";
|
|
26
|
-
import "../../constants/rewards.constants.js";
|
|
27
|
-
const z = async (o, i, p) => {
|
|
28
|
-
try {
|
|
29
|
-
const { domainName: t, type: n } = m, r = y(), e = Date.now().toString(), s = { name: t }, a = {
|
|
30
|
-
content: m.verifyMessageText,
|
|
31
|
-
for: t,
|
|
32
|
-
timestamp: e,
|
|
33
|
-
nonce: r
|
|
34
|
-
}, c = await o.signTypedData(s, n, a), d = await o.getEthereumAddress(), u = `${p}verify/${t}?address=${d}&ts=${e}&nonce=${r}&signature=${c}&levelType=BASIC`;
|
|
35
|
-
f(u, i, 700, 510);
|
|
36
|
-
} catch (t) {
|
|
37
|
-
console.error("authentoHelper error: ", t);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
z as authentoKycHandler
|
|
42
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import "../../constants/chains.constants.js";
|
|
2
|
-
import "../../types/circom-data.types.js";
|
|
3
|
-
import "../../types/transactions.types.js";
|
|
4
|
-
import "../../types/curve.types.js";
|
|
5
|
-
import "ethers";
|
|
6
|
-
import "circomlibjs";
|
|
7
|
-
import "../../data-structures/crypto-keys/keys.js";
|
|
8
|
-
import "axios";
|
|
9
|
-
import "../../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
10
|
-
import "../web3/events/getShieldedBalance.js";
|
|
11
|
-
import "../../webworker/workerFactory.js";
|
|
12
|
-
import "../utils/external-action.utils.js";
|
|
13
|
-
import "../../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
14
|
-
import "../utils/convertIntegrationProviderToExternalActionId.js";
|
|
15
|
-
import "../../constants/coingecko.constants.js";
|
|
16
|
-
import "../../constants/vite.constants.js";
|
|
17
|
-
import "../utils/userAgent.js";
|
|
18
|
-
import "../../constants/reorg-depths.constants.js";
|
|
19
|
-
import { SupportedPassports as e } from "../../constants/kyc.constants.js";
|
|
20
|
-
import "../../data-structures/volatile-helper/VolatileHelper.js";
|
|
21
|
-
import "libsodium-wrappers";
|
|
22
|
-
import "../../constants/contracts.constants.js";
|
|
23
|
-
import "../../constants/axelar.constants.js";
|
|
24
|
-
import "../../constants/rewards.constants.js";
|
|
25
|
-
const s = (i, m, o = 650, t = 400) => {
|
|
26
|
-
const p = window.top.outerHeight / 2 + window.top.screenY - o / 2, r = window.top.outerWidth / 2 + window.top.screenX - t / 2;
|
|
27
|
-
window.open(
|
|
28
|
-
i,
|
|
29
|
-
m,
|
|
30
|
-
`toolbar=no, menubar=no, width=${t}, height=${o}, top=${p}, left=${r}`
|
|
31
|
-
);
|
|
32
|
-
}, X = (i, m, o = 650, t = 400) => {
|
|
33
|
-
const { onboardURL: p, shortName: r, customHandleKYC: n } = e[i];
|
|
34
|
-
n ? n(m, r, p) : s(p, r, o, t);
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
s as openDefaultPassportWindow,
|
|
38
|
-
X as openPassportWindow
|
|
39
|
-
};
|