@hinkal/common 0.2.13 → 0.2.15
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.cjs +1 -1
- package/API/API.d.ts +10 -3
- package/API/API.mjs +42 -31
- package/API/ai-calls.cjs +1 -0
- package/API/ai-calls.d.ts +9 -0
- package/API/ai-calls.mjs +13 -0
- package/API/callCurveAPI.cjs +1 -1
- package/API/callCurveAPI.mjs +28 -22
- package/API/callRelayer.d.ts +3 -2
- package/API/dataServerCalls.cjs +1 -1
- package/API/dataServerCalls.d.ts +4 -0
- package/API/dataServerCalls.mjs +11 -7
- package/API/duneAPI.cjs +1 -1
- package/API/duneAPI.mjs +7 -4
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.d.ts +9 -1
- package/API/fetchCommitmentsCache.mjs +6 -5
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.d.ts +2 -1
- package/API/getGasEstimates.mjs +10 -9
- package/API/getRelayerURL.cjs +1 -1
- package/API/getRelayerURL.mjs +4 -4
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +1 -1
- package/API/getServerURL.mjs +14 -12
- package/API/index.d.ts +2 -0
- package/API/is-tx-stateless.cjs +1 -0
- package/API/is-tx-stateless.d.ts +3 -0
- package/API/is-tx-stateless.mjs +9 -0
- package/API/rewardsPointsCalls.cjs +1 -1
- package/API/rewardsPointsCalls.d.ts +3 -3
- package/API/rewardsPointsCalls.mjs +1 -3
- package/API/tenderly.api.cjs +1 -0
- package/API/tenderly.api.d.ts +14 -0
- package/API/tenderly.api.mjs +55 -0
- package/API/token-calls.cjs +1 -0
- package/API/token-calls.d.ts +2 -0
- package/API/token-calls.mjs +9 -0
- package/API/userVerifyTransactions.cjs +1 -1
- package/API/userVerifyTransactions.d.ts +6 -7
- package/API/userVerifyTransactions.mjs +13 -14
- package/constants/addresses.constants.cjs +1 -0
- package/constants/addresses.constants.d.ts +16 -0
- package/constants/addresses.constants.mjs +50 -0
- package/constants/assets.constants.cjs +1 -1
- package/constants/assets.constants.mjs +13 -13
- package/constants/axelar.constants.cjs +1 -1
- package/constants/axelar.constants.mjs +11 -11
- package/constants/balance.constants.cjs +1 -0
- package/constants/balance.constants.d.ts +1 -0
- package/constants/balance.constants.mjs +4 -0
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +2 -2
- package/constants/chains.constants.mjs +32 -35
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +144 -140
- package/constants/conversion.constants.cjs +1 -0
- package/constants/conversion.constants.d.ts +1 -0
- package/constants/conversion.constants.mjs +4 -0
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +10115 -3422
- package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-avalanche.json.mjs +10112 -3415
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +9408 -3725
- package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +9893 -3194
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +6318 -3587
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +3208 -1550
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +10113 -3422
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +10092 -3423
- package/constants/fees.constants.cjs +1 -1
- package/constants/fees.constants.d.ts +5 -3
- package/constants/fees.constants.mjs +22 -19
- package/constants/index.d.ts +6 -0
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +30 -18
- package/constants/mediaUrls.constants.cjs +1 -0
- package/constants/mediaUrls.constants.d.ts +23 -0
- package/constants/mediaUrls.constants.mjs +26 -0
- package/constants/permit2.constants.cjs +1 -0
- package/constants/permit2.constants.d.ts +2 -0
- package/constants/permit2.constants.mjs +5 -0
- package/constants/protocol.constants.cjs +1 -1
- package/constants/protocol.constants.d.ts +8 -0
- package/constants/protocol.constants.mjs +29 -15
- package/constants/rewards.constants.cjs +1 -1
- package/constants/rewards.constants.mjs +14 -12
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +34 -6
- package/constants/server.constants.mjs +48 -20
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +49 -48
- package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistry.json.mjs +350 -110
- package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.mjs +334 -100
- package/constants/token-data/avalancheRegistry.json.cjs +1 -1
- package/constants/token-data/avalancheRegistry.json.mjs +236 -68
- package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
- package/constants/token-data/avalancheRegistryFixed.json.mjs +236 -68
- package/constants/token-data/baseRegistry.json.cjs +1 -1
- package/constants/token-data/baseRegistry.json.mjs +224 -59
- package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
- package/constants/token-data/baseRegistryFixed.json.mjs +212 -56
- package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistry.json.mjs +67 -64
- package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +67 -64
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +1017 -344
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +946 -303
- package/constants/token-data/index.cjs +1 -0
- package/constants/token-data/index.d.ts +1496 -15
- package/constants/token-data/index.mjs +34 -0
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +296 -276
- package/constants/token-data/optimismRegistry.json.cjs +1 -1
- package/constants/token-data/optimismRegistry.json.mjs +703 -180
- package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
- package/constants/token-data/optimismRegistryFixed.json.mjs +679 -173
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +530 -155
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +504 -147
- package/constants/token.limits.constants.cjs +1 -0
- package/constants/token.limits.constants.d.ts +5 -0
- package/constants/token.limits.constants.mjs +30 -0
- package/constants/vite.constants.cjs +1 -1
- package/constants/vite.constants.d.ts +7 -1
- package/constants/vite.constants.mjs +27 -22
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +48 -20
- package/data-structures/Hinkal/Hinkal.mjs +264 -85
- package/data-structures/Hinkal/IHinkal.d.ts +37 -10
- package/data-structures/Hinkal/hinkalActionBeefy.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionBeefy.mjs +25 -23
- package/data-structures/Hinkal/hinkalActionConvex.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionConvex.mjs +11 -9
- package/data-structures/Hinkal/hinkalActionCurve.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionCurve.mjs +18 -16
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -0
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +3 -0
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +61 -0
- package/data-structures/Hinkal/hinkalActionLidoEth.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionLidoEth.mjs +24 -22
- package/data-structures/Hinkal/hinkalActionPendle.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.mjs +17 -15
- package/data-structures/Hinkal/hinkalActionPendleLP.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendleLP.mjs +29 -26
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -0
- package/data-structures/Hinkal/hinkalActionReceive.d.ts +4 -0
- package/data-structures/Hinkal/hinkalActionReceive.mjs +39 -0
- package/data-structures/Hinkal/hinkalActionStake.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionStake.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionStake.mjs +15 -11
- package/data-structures/Hinkal/hinkalActionVolatile.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.mjs +31 -26
- package/data-structures/Hinkal/hinkalApprove.cjs +1 -0
- package/data-structures/Hinkal/hinkalApprove.d.ts +2 -0
- package/data-structures/Hinkal/hinkalApprove.mjs +120 -0
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -0
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.d.ts +3 -0
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -0
- package/data-structures/Hinkal/hinkalDeploySubAccount.cjs +1 -0
- package/data-structures/Hinkal/hinkalDeploySubAccount.d.ts +3 -0
- package/data-structures/Hinkal/hinkalDeploySubAccount.mjs +15 -0
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.d.ts +3 -2
- package/data-structures/Hinkal/hinkalDeposit.mjs +116 -52
- package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +10 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +6 -17
- package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -0
- package/data-structures/Hinkal/hinkalInsideTransact.d.ts +2 -0
- package/data-structures/Hinkal/hinkalInsideTransact.mjs +111 -0
- package/data-structures/Hinkal/hinkalMultiSend.cjs +1 -0
- package/data-structures/Hinkal/hinkalMultiSend.d.ts +3 -0
- package/data-structures/Hinkal/hinkalMultiSend.mjs +13 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +83 -37
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -0
- package/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +4 -0
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +46 -0
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -0
- package/data-structures/Hinkal/hinkalProxySwap.d.ts +5 -0
- package/data-structures/Hinkal/hinkalProxySwap.mjs +36 -0
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -0
- package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +20 -0
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +69 -60
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.d.ts +3 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +77 -50
- package/data-structures/Hinkal/index.d.ts +1 -0
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +18 -11
- package/data-structures/IndexedDB/activity-db.cjs +1 -0
- package/data-structures/IndexedDB/activity-db.d.ts +16 -0
- package/data-structures/IndexedDB/activity-db.mjs +124 -0
- package/data-structures/IndexedDB/balances-db.cjs +1 -0
- package/data-structures/IndexedDB/balances-db.d.ts +13 -0
- package/data-structures/IndexedDB/balances-db.mjs +75 -0
- package/data-structures/IndexedDB/contact-db.cjs +1 -0
- package/data-structures/IndexedDB/contact-db.d.ts +11 -0
- package/data-structures/IndexedDB/contact-db.mjs +44 -0
- package/data-structures/IndexedDB/index.d.ts +5 -0
- package/data-structures/IndexedDB/prices-db.cjs +1 -0
- package/data-structures/IndexedDB/prices-db.d.ts +9 -0
- package/data-structures/IndexedDB/prices-db.mjs +62 -0
- package/data-structures/IndexedDB/private-balances-db.cjs +1 -0
- package/data-structures/IndexedDB/private-balances-db.d.ts +9 -0
- package/data-structures/IndexedDB/private-balances-db.mjs +28 -0
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +47 -44
- package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -0
- package/data-structures/TokenDBs/PrivateTokensDB.d.ts +11 -0
- package/data-structures/TokenDBs/PrivateTokensDB.mjs +53 -0
- package/data-structures/TokenDBs/PublicTokensDB.cjs +1 -0
- package/data-structures/TokenDBs/PublicTokensDB.d.ts +13 -0
- package/data-structures/TokenDBs/PublicTokensDB.mjs +86 -0
- package/data-structures/TokenDBs/index.d.ts +2 -0
- package/data-structures/cacheDevices/AttachableMemoryCacheDevice.cjs +1 -0
- package/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +8 -0
- package/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +28 -0
- package/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
- package/data-structures/cacheDevices/BaseCacheDevice.d.ts +9 -6
- package/data-structures/cacheDevices/BaseCacheDevice.mjs +13 -4
- package/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
- package/data-structures/cacheDevices/FileCacheDevice.d.ts +1 -0
- package/data-structures/cacheDevices/FileCacheDevice.mjs +7 -3
- package/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +1 -1
- package/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +2 -1
- package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +10 -5
- package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/data-structures/crypto-keys/decodeUTXO.mjs +13 -12
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +13 -3
- package/data-structures/crypto-keys/keys.mjs +45 -34
- package/data-structures/custom-token-registry/CustomTokenRegistry.cjs +1 -1
- package/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +2 -3
- package/data-structures/custom-token-registry/CustomTokenRegistry.mjs +17 -21
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.mjs +15 -29
- package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +1 -0
- package/data-structures/event-service/AbstractApprovalsSnapshotService.d.ts +30 -0
- package/data-structures/event-service/AbstractApprovalsSnapshotService.mjs +104 -0
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.mjs +24 -37
- package/data-structures/event-service/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/AbstractEventService.d.ts +1 -1
- package/data-structures/event-service/AbstractEventService.mjs +15 -15
- package/data-structures/event-service/index.d.ts +1 -0
- package/data-structures/index.d.ts +2 -0
- package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/data-structures/merkle-tree/MerkleTree.d.ts +7 -2
- package/data-structures/merkle-tree/MerkleTree.mjs +85 -70
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +1 -0
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +3 -0
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +13 -0
- package/data-structures/merkle-tree/index.d.ts +1 -0
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +2 -0
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +3 -2
- package/data-structures/snapshot/ClientApprovalsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/ClientApprovalsSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/ClientApprovalsSnapshotService.mjs +23 -0
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +3 -2
- package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +6 -5
- package/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
- package/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -0
- package/data-structures/token-price-fetcher/TokenChecker.mjs +4 -2
- package/data-structures/transactions-manager/TransactionsManager.cjs +1 -1
- package/data-structures/transactions-manager/TransactionsManager.d.ts +8 -6
- package/data-structures/transactions-manager/TransactionsManager.mjs +124 -122
- package/data-structures/transactions-manager/history/getBeefyData.cjs +1 -1
- package/data-structures/transactions-manager/history/getBeefyData.mjs +3 -2
- package/data-structures/transactions-manager/history/getConvexData.cjs +1 -1
- package/data-structures/transactions-manager/history/getConvexData.mjs +3 -2
- package/data-structures/transactions-manager/history/getCurveData.cjs +1 -1
- package/data-structures/transactions-manager/history/getCurveData.mjs +3 -2
- package/data-structures/transactions-manager/history/getLidoData.cjs +1 -1
- package/data-structures/transactions-manager/history/getLidoData.mjs +3 -2
- package/data-structures/transactions-manager/history/getPendleData.cjs +1 -1
- package/data-structures/transactions-manager/history/getPendleData.mjs +13 -12
- package/data-structures/transactions-manager/history/getTxDetails.cjs +1 -1
- package/data-structures/transactions-manager/history/getTxDetails.mjs +22 -20
- package/data-structures/transactions-manager/history/getVolatileData.cjs +1 -1
- package/data-structures/transactions-manager/history/getVolatileData.mjs +11 -10
- package/data-structures/transactions-manager/history/history.types.cjs +1 -1
- package/data-structures/transactions-manager/history/history.types.mjs +4 -2
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +3 -3
- package/data-structures/utxo/Utxo.mjs +8 -7
- package/error-handling/error-codes.constants.cjs +2 -2
- package/error-handling/error-codes.constants.d.ts +22 -1
- package/error-handling/error-codes.constants.mjs +129 -112
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +29 -25
- package/error-handling/index.d.ts +1 -0
- package/error-handling/logger.cjs +1 -0
- package/error-handling/logger.d.ts +5 -0
- package/error-handling/logger.mjs +16 -0
- package/error-handling/types.cjs +1 -1
- package/error-handling/types.d.ts +3 -1
- package/error-handling/types.mjs +2 -2
- package/externalABIs/BabPassport.json.cjs +1 -1
- package/externalABIs/BabPassport.json.mjs +8 -3
- package/externalABIs/BeefyRouterAbi.json.cjs +1 -1
- package/externalABIs/BeefyRouterAbi.json.mjs +5 -2
- package/externalABIs/BeefyStrategyAbi.json.cjs +1 -1
- package/externalABIs/BeefyStrategyAbi.json.mjs +5 -2
- package/externalABIs/BeefyVaultAbi.json.cjs +1 -1
- package/externalABIs/BeefyVaultAbi.json.mjs +5 -2
- package/externalABIs/BeefyZapAbi.json.cjs +1 -1
- package/externalABIs/BeefyZapAbi.json.mjs +5 -2
- package/externalABIs/BeefyZapOneInchAbi.json.cjs +1 -1
- package/externalABIs/BeefyZapOneInchAbi.json.mjs +5 -2
- package/externalABIs/ConvexBoosterAbi.json.cjs +1 -1
- package/externalABIs/ConvexBoosterAbi.json.mjs +5 -2
- package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +1 -1
- package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +5 -2
- package/externalABIs/ConvexRewardPoolAbi.json.cjs +1 -1
- package/externalABIs/ConvexRewardPoolAbi.json.mjs +5 -2
- package/externalABIs/CurveReadingWrapperAbi.json.cjs +1 -1
- package/externalABIs/CurveReadingWrapperAbi.json.mjs +5 -2
- package/externalABIs/CurveWrappedMainPool.json.cjs +1 -1
- package/externalABIs/CurveWrappedMainPool.json.mjs +5 -2
- package/externalABIs/CurveZap.json.cjs +1 -1
- package/externalABIs/CurveZap.json.mjs +5 -2
- package/externalABIs/CvxCrvUtilities.json.cjs +1 -1
- package/externalABIs/CvxCrvUtilities.json.mjs +5 -2
- package/externalABIs/ERC20.json.cjs +1 -1
- package/externalABIs/ERC20.json.mjs +20 -3
- package/externalABIs/GalxePassport.json.cjs +1 -1
- package/externalABIs/GalxePassport.json.mjs +8 -3
- package/externalABIs/IQuoterV2.json.cjs +1 -1
- package/externalABIs/IQuoterV2.json.mjs +20 -3
- package/externalABIs/ISwapRouter.json.cjs +1 -1
- package/externalABIs/ISwapRouter.json.mjs +5 -2
- package/externalABIs/IUniswapV3Factory.json.cjs +1 -1
- package/externalABIs/IUniswapV3Factory.json.mjs +20 -3
- package/externalABIs/IUniswapV3Pool.json.cjs +1 -1
- package/externalABIs/IUniswapV3Pool.json.mjs +20 -3
- package/externalABIs/PendleRouterAbi.json.cjs +1 -1
- package/externalABIs/PendleRouterAbi.json.mjs +5 -2
- package/externalABIs/UniswapV2PoolAbi.json.cjs +1 -1
- package/externalABIs/UniswapV2PoolAbi.json.mjs +16 -3
- package/externalABIs/index.cjs +1 -0
- package/externalABIs/index.d.ts +307 -11
- package/externalABIs/index.mjs +23 -0
- package/externalABIs/transactionsProver.json.cjs +1 -1
- package/externalABIs/transactionsProver.json.mjs +20 -3
- package/functions/kyc/zkMeHelper.cjs +1 -1
- package/functions/kyc/zkMeHelper.d.ts +0 -1
- package/functions/kyc/zkMeHelper.mjs +8 -11
- package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -0
- package/functions/pre-transaction/getExternalSwapAddress.d.ts +3 -0
- package/functions/pre-transaction/getExternalSwapAddress.mjs +26 -0
- package/functions/pre-transaction/getFeeStructure.cjs +1 -0
- package/functions/pre-transaction/getFeeStructure.d.ts +4 -0
- package/functions/pre-transaction/getFeeStructure.mjs +30 -0
- package/functions/pre-transaction/getFlatFees.cjs +1 -1
- package/functions/pre-transaction/getFlatFees.d.ts +3 -7
- package/functions/pre-transaction/getFlatFees.mjs +52 -46
- package/functions/pre-transaction/getSignatureDataForTransact.cjs +1 -0
- package/functions/pre-transaction/getSignatureDataForTransact.d.ts +3 -0
- package/functions/pre-transaction/getSignatureDataForTransact.mjs +6 -0
- package/functions/pre-transaction/index.d.ts +1 -0
- package/functions/pre-transaction/interaction-to-action.cjs +1 -1
- package/functions/pre-transaction/interaction-to-action.mjs +3 -2
- package/functions/pre-transaction/merge-with-fee-structure.cjs +1 -0
- package/functions/pre-transaction/merge-with-fee-structure.d.ts +2 -0
- package/functions/pre-transaction/merge-with-fee-structure.mjs +25 -0
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -0
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +16 -0
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +42 -0
- package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +19 -30
- package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
- package/functions/pre-transaction/process-gas-estimates.d.ts +2 -2
- package/functions/pre-transaction/process-gas-estimates.mjs +17 -27
- package/functions/pre-transaction/processAmountChanges.cjs +1 -1
- package/functions/pre-transaction/processAmountChanges.mjs +34 -23
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -0
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +6 -0
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +7 -0
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +9 -1
- package/functions/private-wallet/emporium.helpers.mjs +117 -22
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -0
- package/functions/private-wallet/emporium.swap.helpers.d.ts +5 -0
- package/functions/private-wallet/emporium.swap.helpers.mjs +92 -0
- package/functions/private-wallet/index.d.ts +1 -0
- package/functions/private-wallet/opProducer.cjs +1 -1
- package/functions/private-wallet/opProducer.mjs +9 -10
- package/functions/private-wallet/smartContractWalletCalculator.cjs +1 -1
- package/functions/private-wallet/smartContractWalletCalculator.d.ts +5 -1
- package/functions/private-wallet/smartContractWalletCalculator.mjs +22 -17
- package/functions/protocols/convex.protocols.cjs +1 -1
- package/functions/protocols/convex.protocols.mjs +11 -8
- package/functions/protocols/pendle.helpers.cjs +1 -1
- package/functions/protocols/pendle.helpers.mjs +20 -15
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +8 -5
- package/functions/snarkjs/common.snarkjs.mjs +177 -87
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +223 -1
- package/functions/snarkjs/constant.mjs +315 -94
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +6 -3
- package/functions/snarkjs/constructEmporiumProof.mjs +148 -84
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +5 -3
- package/functions/snarkjs/constructGeneralZkProof.mjs +142 -86
- package/functions/snarkjs/generateCircomData.cjs +1 -1
- package/functions/snarkjs/generateCircomData.d.ts +3 -2
- package/functions/snarkjs/generateCircomData.mjs +33 -35
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.d.ts +2 -2
- package/functions/snarkjs/generateZkProof.mjs +4 -15
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -0
- package/functions/snarkjs/generateZkProofEnclave.d.ts +6 -0
- package/functions/snarkjs/generateZkProofEnclave.mjs +26 -0
- package/functions/snarkjs/generateZkProofSelf.cjs +1 -0
- package/functions/snarkjs/generateZkProofSelf.d.ts +5 -0
- package/functions/snarkjs/generateZkProofSelf.mjs +17 -0
- package/functions/snarkjs/getOriginalSender.cjs +1 -0
- package/functions/snarkjs/getOriginalSender.d.ts +1 -0
- package/functions/snarkjs/getOriginalSender.mjs +5 -0
- package/functions/snarkjs/getZKFiles.cjs +1 -1
- package/functions/snarkjs/getZKFiles.d.ts +3 -2
- package/functions/snarkjs/getZKFiles.mjs +14 -5
- package/functions/utils/addresses.cjs +1 -0
- package/functions/utils/addresses.d.ts +4 -0
- package/functions/utils/addresses.mjs +20 -0
- package/functions/utils/amounts.utils.cjs +1 -1
- package/functions/utils/amounts.utils.d.ts +4 -1
- package/functions/utils/amounts.utils.mjs +29 -27
- package/functions/utils/arraysMatch.cjs +1 -0
- package/functions/utils/arraysMatch.d.ts +1 -0
- package/functions/utils/arraysMatch.mjs +4 -0
- package/functions/utils/axelar.utils.cjs +1 -1
- package/functions/utils/axelar.utils.d.ts +1 -0
- package/functions/utils/axelar.utils.mjs +32 -9
- package/functions/utils/cacheDevice.utils.cjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +11 -8
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.d.ts +10 -7
- package/functions/utils/cacheFunctions.mjs +62 -39
- package/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -0
- package/functions/utils/convertEmporiumOpToCallInfo.d.ts +2 -0
- package/functions/utils/convertEmporiumOpToCallInfo.mjs +10 -0
- package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
- package/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +2 -1
- package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +7 -10
- package/functions/utils/encodeTokenWithId.cjs +1 -0
- package/functions/utils/encodeTokenWithId.d.ts +2 -0
- package/functions/utils/encodeTokenWithId.mjs +4 -0
- package/functions/utils/encryptInputForEnclave.cjs +1 -0
- package/functions/utils/encryptInputForEnclave.d.ts +8 -0
- package/functions/utils/encryptInputForEnclave.mjs +43 -0
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +8 -2
- package/functions/utils/erc20tokenFunctions.mjs +23 -14
- package/functions/utils/evmNetworkFunctions.cjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +7 -4
- package/functions/utils/external-action.utils.d.ts +2 -2
- package/functions/utils/fees.utils.cjs +1 -0
- package/functions/utils/fees.utils.d.ts +2 -0
- package/functions/utils/fees.utils.mjs +14 -0
- package/functions/utils/getBlockExplorerUrl.cjs +1 -0
- package/functions/utils/getBlockExplorerUrl.d.ts +1 -0
- package/functions/utils/getBlockExplorerUrl.mjs +6 -0
- package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -0
- package/functions/utils/getRecipientInfoFromUserKeys.d.ts +3 -0
- package/functions/utils/getRecipientInfoFromUserKeys.mjs +18 -0
- package/functions/utils/index.d.ts +12 -0
- package/functions/utils/involves-permit2-op.cjs +1 -0
- package/functions/utils/involves-permit2-op.d.ts +1 -0
- package/functions/utils/involves-permit2-op.mjs +5 -0
- package/functions/utils/merkleTree.utils.cjs +1 -0
- package/functions/utils/merkleTree.utils.d.ts +2 -0
- package/functions/utils/merkleTree.utils.mjs +20 -0
- package/functions/utils/prepareHinkal.d.ts +6 -0
- package/functions/utils/processUseApprovalUtxoData.cjs +1 -0
- package/functions/utils/processUseApprovalUtxoData.d.ts +3 -0
- package/functions/utils/processUseApprovalUtxoData.mjs +19 -0
- package/functions/utils/publicBalance.utils.cjs +1 -0
- package/functions/utils/publicBalance.utils.d.ts +5 -0
- package/functions/utils/publicBalance.utils.mjs +25 -0
- package/functions/utils/replaceAddressInCalldata.cjs +1 -0
- package/functions/utils/replaceAddressInCalldata.d.ts +1 -0
- package/functions/utils/replaceAddressInCalldata.mjs +7 -0
- package/functions/utils/rpc-int-encode.cjs +1 -0
- package/functions/utils/rpc-int-encode.d.ts +2 -0
- package/functions/utils/rpc-int-encode.mjs +8 -0
- package/functions/utils/serialize.utils.cjs +1 -1
- package/functions/utils/serialize.utils.d.ts +1 -0
- package/functions/utils/serialize.utils.mjs +3 -2
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +2 -0
- package/functions/utils/string.utils.mjs +28 -14
- package/functions/utils/time.utils.cjs +1 -1
- package/functions/utils/time.utils.d.ts +1 -0
- package/functions/utils/time.utils.mjs +4 -3
- package/functions/utils/token-check.utils.cjs +1 -0
- package/functions/utils/token-check.utils.d.ts +1 -0
- package/functions/utils/token-check.utils.mjs +10 -0
- package/functions/utils/upToDateState.cjs +1 -0
- package/functions/utils/upToDateState.d.ts +2 -0
- package/functions/utils/upToDateState.mjs +11 -0
- package/functions/utils/userAgent.cjs +1 -1
- package/functions/utils/userAgent.mjs +8 -8
- package/functions/web3/events/balanceChangedCustomHandler.cjs +1 -0
- package/functions/web3/events/balanceChangedCustomHandler.d.ts +2 -0
- package/functions/web3/events/balanceChangedCustomHandler.mjs +14 -0
- package/functions/web3/events/balanceChangedHandler.cjs +1 -1
- package/functions/web3/events/balanceChangedHandler.mjs +5 -4
- package/functions/web3/events/getApprovedBalance.cjs +1 -0
- package/functions/web3/events/getApprovedBalance.d.ts +7 -0
- package/functions/web3/events/getApprovedBalance.mjs +80 -0
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +16 -3
- package/functions/web3/events/getInputUtxoAndBalance.mjs +128 -46
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.ts +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +70 -65
- package/functions/web3/events/index.d.ts +2 -0
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +2 -2
- package/functions/web3/functionCalls/accessTokenCalls.mjs +20 -18
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +8 -7
- package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -0
- package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +4 -0
- package/functions/web3/functionCalls/approveTokensToHinkal.mjs +11 -0
- package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
- package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -2
- package/functions/web3/functionCalls/estimateGasRelayer.mjs +14 -8
- package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +1 -0
- package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +5 -0
- package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +32 -0
- package/functions/web3/functionCalls/relayFunctions.d.ts +1 -15
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.d.ts +2 -2
- package/functions/web3/functionCalls/transactCallDirect.mjs +31 -30
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +2 -2
- package/functions/web3/functionCalls/transactCallRelayer.mjs +32 -9
- package/functions/web3/getContractMetadata.cjs +1 -0
- package/functions/web3/getContractMetadata.d.ts +5 -0
- package/functions/web3/getContractMetadata.mjs +30 -0
- package/functions/web3/getTokenHolder.cjs +1 -0
- package/functions/web3/getTokenHolder.d.ts +1 -0
- package/functions/web3/getTokenHolder.mjs +12 -0
- package/functions/web3/index.d.ts +1 -0
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.d.ts +1 -2
- package/functions/web3/odosAPI.mjs +23 -19
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.d.ts +1 -2
- package/functions/web3/oneInchAPI.mjs +20 -15
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +3 -2
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.d.ts +4 -4
- package/functions/web3/uniswapAPI.mjs +57 -43
- package/index.cjs +1 -1
- package/index.mjs +739 -609
- package/package.json +19 -8
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +8 -3
- package/providers/EthersProviderAdapter.mjs +52 -43
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +4 -1
- package/providers/WagmiProviderAdapter.mjs +53 -56
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +18 -10
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +18 -10
- package/types/API.types.d.ts +21 -0
- package/types/ICacheDevice.d.ts +4 -3
- package/types/TransactionSimulator.types.d.ts +9 -0
- package/types/activities.types.cjs +1 -0
- package/types/activities.types.d.ts +45 -0
- package/types/activities.types.mjs +13 -0
- package/types/balances.types.cjs +1 -0
- package/types/balances.types.d.ts +17 -0
- package/types/balances.types.mjs +4 -0
- package/types/cache.types.cjs +1 -0
- package/types/cache.types.d.ts +27 -0
- package/types/cache.types.mjs +4 -0
- package/types/circom-data.types.d.ts +29 -9
- package/types/commitments.types.d.ts +6 -0
- package/types/contacts.types.d.ts +5 -0
- package/types/crypto.types.d.ts +1 -0
- package/types/earlyAccessCode.types.d.ts +4 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +8 -3
- package/types/ethereum-network.types.mjs +1 -1
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +2 -1
- package/types/external-action.types.mjs +1 -1
- package/types/fee.types.d.ts +9 -0
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +48 -0
- package/types/hinkal.types.mjs +38 -13
- package/types/index.d.ts +9 -0
- package/types/kyc.types.cjs +1 -1
- package/types/kyc.types.d.ts +1 -1
- package/types/kyc.types.mjs +1 -1
- package/types/remote-proof.types.d.ts +15 -0
- package/types/rewards.types.d.ts +9 -0
- package/types/sandbox.types.cjs +1 -0
- package/types/sandbox.types.d.ts +157 -0
- package/types/sandbox.types.mjs +4 -0
- package/types/tenderly.api.types.d.ts +180 -0
- package/types/time.types.cjs +1 -1
- package/types/time.types.mjs +1 -1
- package/types/token-with-id.types.d.ts +4 -0
- package/types/token.types.d.ts +23 -0
- package/types/transactions.types.cjs +1 -1
- package/types/transactions.types.d.ts +31 -0
- package/types/transactions.types.mjs +8 -5
- package/types/wc.types.d.ts +89 -0
- package/types/with-id.types.d.ts +3 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +26 -26
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLogic.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLogic.mjs +58 -50
- package/webworker/viteWorkerURL.constant.cjs +3 -3
- package/webworker/viteWorkerURL.constant.mjs +3 -3
- package/webworker/workerFactory.cjs +1 -1
- package/webworker/workerFactory.mjs +2 -2
- package/webworker/workerProxy.cjs +1 -1
- package/webworker/workerProxy.d.ts +11 -11
- package/webworker/workerProxy.mjs +24 -26
- package/webworker/zkProofWorker/zkProofWorker.types.d.ts +2 -0
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLogic.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +47 -61
- package/functions/utils/memoize.utils.cjs +0 -1
- package/functions/utils/memoize.utils.mjs +0 -14
|
@@ -3,14 +3,15 @@ import "../../../types/circom-data.types.mjs";
|
|
|
3
3
|
import { VolatileAction as f } from "../../../types/hinkal.types.mjs";
|
|
4
4
|
import "../../../types/transactions.types.mjs";
|
|
5
5
|
import "../../../types/curve.types.mjs";
|
|
6
|
+
import "../../../types/activities.types.mjs";
|
|
6
7
|
import { getERC20Token as l } from "../../../functions/utils/erc20tokenFunctions.mjs";
|
|
7
|
-
import { caseInsensitiveEqual as
|
|
8
|
+
import { caseInsensitiveEqual as a } from "../../../functions/utils/caseInsensitive.utils.mjs";
|
|
8
9
|
import { getERC20Registry as W } from "../../../constants/token-data/ERC20Registry.mjs";
|
|
9
10
|
import { VolatileHelper as g } from "../../volatile-helper/VolatileHelper.mjs";
|
|
10
|
-
const
|
|
11
|
+
const N = async (n, u, s) => {
|
|
11
12
|
const c = W(s), { externalActionMetadata: B } = n, { volatileAmounts: k, redirectActionId: V, volatileAction: A } = g.decodeVolatileMetadata(B);
|
|
12
13
|
if (A === f.Deposit) {
|
|
13
|
-
const r = n.erc20TokenAddresses[0], e = c.find((t) =>
|
|
14
|
+
const r = n.erc20TokenAddresses[0], e = c.find((t) => a(t.sharedAddress, r));
|
|
14
15
|
if (!e)
|
|
15
16
|
throw Error("Volatile not found in statistics");
|
|
16
17
|
return {
|
|
@@ -22,7 +23,7 @@ const C = async (n, u, s) => {
|
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
if (A === f.Withdraw) {
|
|
25
|
-
const r = n.erc20TokenAddresses[0], e = c.find((t) =>
|
|
26
|
+
const r = n.erc20TokenAddresses[0], e = c.find((t) => a(t.sharedAddress, r));
|
|
26
27
|
if (!e)
|
|
27
28
|
throw Error("Volatile not found in statistics");
|
|
28
29
|
return {
|
|
@@ -34,13 +35,13 @@ const C = async (n, u, s) => {
|
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
if (A === f.Swap) {
|
|
37
|
-
const r = n.erc20TokenAddresses[0], e = n.erc20TokenAddresses[1], T = n.amountChanges[0].toBigInt(),
|
|
38
|
-
if (!
|
|
38
|
+
const r = n.erc20TokenAddresses[0], e = n.erc20TokenAddresses[1], T = n.amountChanges[0].toBigInt(), i = c.find((o) => a(o.sharedAddress, r)), t = c.find((o) => a(o.sharedAddress, e));
|
|
39
|
+
if (!i && !t)
|
|
39
40
|
throw Error("Volatile not found in swap statistics");
|
|
40
41
|
const E = {
|
|
41
|
-
token: l(
|
|
42
|
-
balance:
|
|
43
|
-
}, m = u.find((o) =>
|
|
42
|
+
token: l(i ? i.erc20TokenAddress : r, s),
|
|
43
|
+
balance: i ? k[0].toBigInt() : T
|
|
44
|
+
}, m = u.find((o) => a(o.erc20TokenAddress, e));
|
|
44
45
|
let p = { token: l(e, s), balance: m?.amount };
|
|
45
46
|
if (t) {
|
|
46
47
|
const o = await g.getVolatileTokenBalance(s, e, m?.amount ?? 0n);
|
|
@@ -51,5 +52,5 @@ const C = async (n, u, s) => {
|
|
|
51
52
|
return { type: d.UNKNOWN };
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
N as getVolatileData
|
|
55
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../functions/utils/external-action.utils.cjs");require("../../../types/circom-data.types.cjs");const t=require("../../../types/external-action.types.cjs");require("../../../types/transactions.types.cjs");require("../../../types/curve.types.cjs");var r=(e=>(e[e.DEPOSIT=0]="DEPOSIT",e[e.WITHDRAW=1]="WITHDRAW",e[e.SWAP=2]="SWAP",e[e.BEEFY=3]="BEEFY",e[e.CURVE=4]="CURVE",e[e.CONVEX=5]="CONVEX",e[e.LIDO=6]="LIDO",e[e.PENDLE=7]="PENDLE",e[e.VOLATILE=8]="VOLATILE",e[e.UNKNOWN=9]="UNKNOWN",e))(r||{});const l=e=>{const n=e.externalActionId.toBigInt();switch(c.getExternalActionIdFromNumber(n)){case t.ExternalActionId.Transact:return e.amountChanges[0].toBigInt()>=0n?0:1;case t.ExternalActionId.Uniswap:case t.ExternalActionId.Odos:case t.ExternalActionId.OneInch:return 2;case t.ExternalActionId.Beefy:case t.ExternalActionId.BeefyStake:return 3;case t.ExternalActionId.Curve:case t.ExternalActionId.CurveDynamic:case t.ExternalActionId.CurveCRV:case t.ExternalActionId.CurveCRVRewards:return 4;case t.ExternalActionId.Convex:return 5;case t.ExternalActionId.LidoETH:case t.ExternalActionId.LidoMATIC:case t.ExternalActionId.LidoETHNFT:case t.ExternalActionId.LidoMATICNFT:return 6;case t.ExternalActionId.Pendle:return 7;case t.ExternalActionId.Volatile:return e.amountChanges.length===1?e.amountChanges[0].toBigInt()<0n?1:0:e.amountChanges.length===2?2:9;default:return 9}};exports.TransactionType=r;exports.externalActionToTransactionType=l;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../functions/utils/external-action.utils.cjs");require("../../../types/circom-data.types.cjs");const t=require("../../../types/external-action.types.cjs");require("../../../constants/vite.constants.cjs");require("../../../types/transactions.types.cjs");require("../../../types/curve.types.cjs");require("../../../types/activities.types.cjs");var r=(e=>(e[e.DEPOSIT=0]="DEPOSIT",e[e.WITHDRAW=1]="WITHDRAW",e[e.SWAP=2]="SWAP",e[e.BEEFY=3]="BEEFY",e[e.CURVE=4]="CURVE",e[e.CONVEX=5]="CONVEX",e[e.LIDO=6]="LIDO",e[e.PENDLE=7]="PENDLE",e[e.VOLATILE=8]="VOLATILE",e[e.UNKNOWN=9]="UNKNOWN",e))(r||{});const l=e=>{const n=e.externalActionId.toBigInt();switch(c.getExternalActionIdFromNumber(n)){case t.ExternalActionId.Transact:return e.amountChanges[0].toBigInt()>=0n?0:1;case t.ExternalActionId.Uniswap:case t.ExternalActionId.Odos:case t.ExternalActionId.OneInch:return 2;case t.ExternalActionId.Beefy:case t.ExternalActionId.BeefyStake:return 3;case t.ExternalActionId.Curve:case t.ExternalActionId.CurveDynamic:case t.ExternalActionId.CurveCRV:case t.ExternalActionId.CurveCRVRewards:return 4;case t.ExternalActionId.Convex:return 5;case t.ExternalActionId.LidoETH:case t.ExternalActionId.LidoMATIC:case t.ExternalActionId.LidoETHNFT:case t.ExternalActionId.LidoMATICNFT:return 6;case t.ExternalActionId.Pendle:return 7;case t.ExternalActionId.Volatile:return e.amountChanges.length===1?e.amountChanges[0].toBigInt()<0n?1:0:e.amountChanges.length===2?2:9;default:return 9}};exports.TransactionType=r;exports.externalActionToTransactionType=l;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { getExternalActionIdFromNumber as u } from "../../../functions/utils/external-action.utils.mjs";
|
|
2
2
|
import "../../../types/circom-data.types.mjs";
|
|
3
3
|
import { ExternalActionId as r } from "../../../types/external-action.types.mjs";
|
|
4
|
+
import "../../../constants/vite.constants.mjs";
|
|
4
5
|
import "../../../types/transactions.types.mjs";
|
|
5
6
|
import "../../../types/curve.types.mjs";
|
|
7
|
+
import "../../../types/activities.types.mjs";
|
|
6
8
|
var E = /* @__PURE__ */ ((e) => (e[e.DEPOSIT = 0] = "DEPOSIT", e[e.WITHDRAW = 1] = "WITHDRAW", e[e.SWAP = 2] = "SWAP", e[e.BEEFY = 3] = "BEEFY", e[e.CURVE = 4] = "CURVE", e[e.CONVEX = 5] = "CONVEX", e[e.LIDO = 6] = "LIDO", e[e.PENDLE = 7] = "PENDLE", e[e.VOLATILE = 8] = "VOLATILE", e[e.UNKNOWN = 9] = "UNKNOWN", e))(E || {});
|
|
7
|
-
const
|
|
9
|
+
const l = (e) => {
|
|
8
10
|
const t = e.externalActionId.toBigInt();
|
|
9
11
|
switch (u(t)) {
|
|
10
12
|
case r.Transact:
|
|
@@ -38,5 +40,5 @@ const N = (e) => {
|
|
|
38
40
|
};
|
|
39
41
|
export {
|
|
40
42
|
E as TransactionType,
|
|
41
|
-
|
|
43
|
+
l as externalActionToTransactionType
|
|
42
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("ethers"),a=require("../../constants/protocol.constants.cjs"),d=require("../../crypto/poseidon.cjs"),S=require("../../functions/web3/etherFunctions.cjs"),h=require("../crypto-keys/keys.cjs");class o{amount;erc20TokenAddress;timeStamp;tokenId;shieldedPrivateKey;randomization;stealthAddress;encryptionKey;commitment;nullifier;isStake;isStakeOrUnstakeInput;isUnstakeOutput;constructor({amount:t,erc20TokenAddress:e,timeStamp:s,tokenId:i,shieldedPrivateKey:n,randomization:r,stealthAddress:m,encryptionKey:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("ethers"),a=require("../../constants/protocol.constants.cjs"),d=require("../../crypto/poseidon.cjs"),S=require("../../functions/web3/etherFunctions.cjs"),h=require("../crypto-keys/keys.cjs"),g=require("../../functions/utils/time.utils.cjs");class o{amount;erc20TokenAddress;timeStamp;tokenId;shieldedPrivateKey;randomization;stealthAddress;encryptionKey;commitment;nullifier;isStake;isStakeOrUnstakeInput;isUnstakeOutput;constructor({amount:t,erc20TokenAddress:e,timeStamp:s,tokenId:i,shieldedPrivateKey:n,randomization:r,stealthAddress:m,encryptionKey:u,commitment:l=void 0,nullifier:c=void 0,isStake:p=!1,isStakeOrUnstakeInput:k=!1,isUnstakeOutput:y=!1}){this.amount=t,this.erc20TokenAddress=e,this.timeStamp=s??g.getCurrentTimeInSeconds().toString(),this.tokenId=i??0,this.shieldedPrivateKey=n,this.randomization=r??o.findCorrectRandomization(S.randomBigInt(31),n),this.stealthAddress=m,this.encryptionKey=u,this.commitment=l,this.nullifier=c,this.isStake=p,this.isStakeOrUnstakeInput=k,this.isUnstakeOutput=y}static createFrom(t,e){return new o({...t.getConstructableParams(),nullifier:void 0,commitment:void 0,...e})}getConstructableParams(){return{amount:this.amount,erc20TokenAddress:this.erc20TokenAddress,timeStamp:this.timeStamp,shieldedPrivateKey:this.shieldedPrivateKey,randomization:this.randomization,stealthAddress:this.stealthAddress,encryptionKey:this.encryptionKey,tokenId:this.tokenId,commitment:this.commitment,nullifier:this.nullifier,isStake:this.isStake,isStakeOrUnstakeInput:this.isStakeOrUnstakeInput,isUnstakeOutput:this.isUnstakeOutput}}getCommitment(){if(!this.commitment){const t=[this.amount,this.erc20TokenAddress,BigInt(this.getStealthAddress()),this.timeStamp];this.tokenId>0&&t.push(this.tokenId.toString()),(this.isStake||this.isUnstakeOutput)&&t.push(0n,1n),this.commitment=d.poseidonHash(...t)}return this.commitment}getNullifier(){if(!this.nullifier){if(!this.shieldedPrivateKey)throw new Error("No Nullifiers if private key is not provided");const t=d.poseidonHash(this.shieldedPrivateKey,this.getCommitment()),e=BigInt(d.poseidonHash(this.commitment,t)),s=BigInt(this.isStakeOrUnstakeInput);this.nullifier=f.ethers.BigNumber.from(e+s).toHexString()}return this.nullifier}getStealthAddress(){if(!this.stealthAddress){if(!this.shieldedPrivateKey)throw Error("No stealth address in UTXO if private key is not provided");const t=h.UserKeys.getStealthAddress(this.randomization,this.shieldedPrivateKey);this.stealthAddress=t}return this.stealthAddress}getEncryptionKey(){if(!this.shieldedPrivateKey){if(!this.encryptionKey)throw Error("No encryption key provided in UTXO");return this.encryptionKey}return h.UserKeys.getEncryptionKeyPair(this.shieldedPrivateKey).publicKey}static findCorrectRandomization(t,e){if(!e)throw Error("No Private Shielded Key Provided");const s=BigInt(e)%a.CIRCOM_P;let i,n,r=0n;do i=t*10n**r%a.CIRCOM_P,n=i*s%a.CIRCOM_P,r+=1n;while(n>=2n**253n||i>=2n**253n);return i}}exports.Utxo=o;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type IUtxoConstructor = {
|
|
2
|
-
amount:
|
|
1
|
+
export type IUtxoConstructor<T = bigint> = {
|
|
2
|
+
amount: T;
|
|
3
3
|
erc20TokenAddress: string;
|
|
4
4
|
timeStamp?: string;
|
|
5
5
|
shieldedPrivateKey?: string;
|
|
6
|
-
randomization?:
|
|
6
|
+
randomization?: T;
|
|
7
7
|
stealthAddress?: string;
|
|
8
8
|
encryptionKey?: string;
|
|
9
9
|
tokenId?: number;
|
|
@@ -2,8 +2,9 @@ import { ethers as y } from "ethers";
|
|
|
2
2
|
import { CIRCOM_P as o } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { poseidonHash as a } from "../../crypto/poseidon.mjs";
|
|
4
4
|
import { randomBigInt as S } from "../../functions/web3/etherFunctions.mjs";
|
|
5
|
-
import { UserKeys as
|
|
6
|
-
|
|
5
|
+
import { UserKeys as h } from "../crypto-keys/keys.mjs";
|
|
6
|
+
import { getCurrentTimeInSeconds as g } from "../../functions/utils/time.utils.mjs";
|
|
7
|
+
class d {
|
|
7
8
|
amount;
|
|
8
9
|
erc20TokenAddress;
|
|
9
10
|
timeStamp;
|
|
@@ -49,10 +50,10 @@ class h {
|
|
|
49
50
|
isStakeOrUnstakeInput: k = !1,
|
|
50
51
|
isUnstakeOutput: f = !1
|
|
51
52
|
}) {
|
|
52
|
-
this.amount = t, this.erc20TokenAddress = e, this.timeStamp = s ??
|
|
53
|
+
this.amount = t, this.erc20TokenAddress = e, this.timeStamp = s ?? g().toString(), this.tokenId = i ?? 0, this.shieldedPrivateKey = r, this.randomization = n ?? d.findCorrectRandomization(S(31), r), this.stealthAddress = m, this.encryptionKey = l, this.commitment = u, this.nullifier = c, this.isStake = p, this.isStakeOrUnstakeInput = k, this.isUnstakeOutput = f;
|
|
53
54
|
}
|
|
54
55
|
static createFrom(t, e) {
|
|
55
|
-
return new
|
|
56
|
+
return new d({
|
|
56
57
|
...t.getConstructableParams(),
|
|
57
58
|
nullifier: void 0,
|
|
58
59
|
commitment: void 0,
|
|
@@ -105,7 +106,7 @@ class h {
|
|
|
105
106
|
if (!this.stealthAddress) {
|
|
106
107
|
if (!this.shieldedPrivateKey)
|
|
107
108
|
throw Error("No stealth address in UTXO if private key is not provided");
|
|
108
|
-
const t =
|
|
109
|
+
const t = h.getStealthAddress(this.randomization, this.shieldedPrivateKey);
|
|
109
110
|
this.stealthAddress = t;
|
|
110
111
|
}
|
|
111
112
|
return this.stealthAddress;
|
|
@@ -116,7 +117,7 @@ class h {
|
|
|
116
117
|
throw Error("No encryption key provided in UTXO");
|
|
117
118
|
return this.encryptionKey;
|
|
118
119
|
}
|
|
119
|
-
return
|
|
120
|
+
return h.getEncryptionKeyPair(this.shieldedPrivateKey).publicKey;
|
|
120
121
|
}
|
|
121
122
|
static findCorrectRandomization(t, e) {
|
|
122
123
|
if (!e)
|
|
@@ -130,5 +131,5 @@ class h {
|
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
+
d as Utxo
|
|
134
135
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
version`},n={...a,...t,INSUFFICIENT_FUNDS:"Insufficient funds",INSUFFICIENT_FUNDS_WITHDRAW:"Not enough funds to withdraw",INSUFFICIENT_FUNDS_TRANSFER:"Not enough funds to transfer",INSUFFICIENT_FUNDS_TO_TRANSACT:"Not enough funds to transact",INSUFFICIENT_FUNDS_GAS:"Insufficient funds for gas * price",NOT_ENOUGH_TOKENS:"Transfer amount exceeds balance",TRANSACTION_NOT_CONFIRMED:"The transaction was not confirmed by the network. Please, try again.",RPC_PROVIDER_LIMIT_ERROR:"Non-200 status code: '429'",RELAYER_NOT_AVAILABLE:"All relayers are busy, please try in a few seconds",TRANSACTION_TIMEOUT:"Your transaction got stale. Please, try in a few seconds",CONNECT_ERROR:"Connection error",CONNECT_ERROR2:"DOMException: Failed",USER_REJECTED_TX:"Transaction rejected.",USER_REJECTED_SIGN:"User rejected signing",USER_REJECTED_TRANSACTION:"user rejected transaction",USER_REJECTED_SIGN2:"User rejected the request",SIGNING_FAILED:"The signing failed. Please, try again.",SIGNATURE_UNSUPPORTED_CHAINS:"Details: Unsupported chains.",SIGNATURE_UNSUPPORTED_CHAINS2:"User disapproved requested chains",SIGNATURE_REQUEST_EXPIRED:"Request expired. Please try again",SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:"The method personal_sign does not exist",USER_DISAPPROVED_REQUESTED_METHODS:"User disapproved requested methods",INVALID_AUTHORIZATION:"The requested account and/or method has not been authorized by the user",INVALID_NULLIFIER:"Nullifier cannot be reused",SANCTIONED_ADDRESS:"Address is sanctioned",INVALID_AMOUNT:"Please, select correct amount",RECIPIENT_FORMAT_INCORRECT:"Recipient Information format is incorrect",INVALID_TOKEN:"Invalid token provided",STATE_TO_UPDATE:"Error in template Verifier_219 line: 121",HAS_TOKEN:"User already has an access token",INVALID_RECEIVER:"Receiver address doesn't match",INVALID_RELAYER:"Relayer address doesn't match",INVALID_RELAYER_FEE:"Relayer fee amount doesn't match",TIMESTAMP_STALE:"Timestamp provided does not align with current time",INVALID_ZKP:"Proof must be valid",NO_TRANSACTIONS_TO_CERTIFY:"This week, you do not have transactions to certify",UNSUPPORTED_NETWORK:"Unsupported network: please choose Polygon, BNB Chain",SIG_BY_OWNER:"Signature must be signed by the owner of the contract",AMOUNT_EMPTY:"Please, specify amount",UNVERIFIED_USER:"Please, pass KYC verification",RELAYER_ISSUE:"Relayer has some issues. Try again later",RELAYER_GAS_ESTIMATE:"Relayer was not able to estimate the gas costs of tx. Please, try later.",RECEIVER_EMPTY:"Please, enter recipient address",NOT_ETHEREUM_ADDRESS:"Please, input shielded address instead of ethereum address",NOT_SHIELDED_ADDRESS:"Please, input valid shielded address",VALID_ETHEREUM_ADDRESS:"Please, input valid ethereum address",METAMASK_NOT_INSTALLED:"Please, install Metamask Wallet",VIABLE_TX:"The transaction is not viable. Please increase the swap amount to swap with Relayer.",TRANSACTION_REPLACED:"transaction was replaced",TRANSACTION_REPLACED2:"replacement fee too low",TRANSACTION_CANCELED:"Transaction was cancelled. Please try again",NONCE_HIGH:"Nonce too high.",WALLET_CONNECT_MATCHING_KEYS:"No matching key. keychain",UNKNOWN_PROVIDER:"Unknown provider",SAFE_ERC:"SafeERC20: low-level call failed",SAFE_ERC_APPROVE:"SafeERC20: approve from non-zero to non-zero allowance",SWAP_RELAYER_MIN:"Relayer minimum fee is not satisfied",LOW_LEVEL_CALL:"low-level delegate call failed",INTEGRAL_CURVE_ZERO:"previous integral cannot be zero",ODOS_FETCH:"Odos API Fetch Error",PENDLE_SWAP_FAILED_BELOW_THRESHOLD:"Error: Cannot swap",PENDLE_SWAP_TOKENS_UNSUPPORTED:"No route found to swap",PENDLE_SWAP_TOKENS_UNSUPPORTED2:"tokenInAddr is not a valid SY token in",PENDLE_MINIMUM_AMOUNT_NOT_REACHED:"MinimumStakeAmountNotReached",SLIPPAGE_LIMIT:"Slippage Limit Exceeded",SLIPPAGE_LIMIT_1:"Slippage screwed you",QUOTE_EXPIRED:"Quote has expired",REVERT_NO_STRING:"Transaction reverted without a reason string",UNISWAP_NOT_ENOUGH_LIQUIDITY:"Not Enough Liquidity",CONNECTION_FAILED:"Failed to connect",FAILED_TO_SWITCH_NETWORKS:"Failed to switch network, Please switch networks using your wallet's settings",INVALID_FROM:"Invalid from token",INVALID_TO:"Invalid to token",Invalid_Password:"Invalid password",INTERNAL_ERROR:"Internal error: please, try again",INVALID_MERKLE_ROOT:"Invalid merkle tree root",ACCESS_TOKEN_INVALID_HASH:"Access Token not minted",MERLE_TREE_SNARK:"Error in template ForceEqualIfEnabled",DECIMALS_LIMIT:"Number of decimals exceed maximum",MERKLE_TREE_INCOMPLETE:"Merkle tree is incomplete",FAIL_ESTIMATE_GAS:"Failed to estimate gas: check the transaction parameters",ODOS_SWAP_FAILED:"Odos swap call failed",ONEINCH_SWAP_FAILED:"One inch swap failed",GAS_ESTIMATION_ERROR:"Failed Gas Estimates Response",GAS_ESTIMATE_INCORRECT_PARAMETERS:"Incorrect Parameters for Gas Estimate",CONNECTIVITY_ERROR:"Request failed with status code 500",TRANSACTION_FAILED:"Transaction Failed: Revert",NO_UNISWAP_PRICE:"Cannot get Uniswap Price",NO_ODOS_PRICE:"Cannot get Odos Price",NO_ONEINCH_PRICE:"Cannot get OneInch Price",FEES_OVER_TRANSACTION_VALUE:"Fees are over transaction value. Please, increase the amount.",GAS_STATION_NOT_AVAILABLE:"Gas Station Not Available",INBALANCE_IN_TOKEN:"Inbalance in token detected",BALANCE_EQUATION_FAILED:"Balance Diff Should be equal to sum of onchain and offchain created commitments",TOKEN_ADD_ERROR:"Error occoured while adding token. Please make sure you are adding a valid ERC-20 token",CANNOT_ESTIMATE_GAS:"transaction may require manual gas limit",NETWORK_ERROR:"Network Error",MAX_FEE_GAS_ERROR:"max fee per gas less than block base fee",CORS_ERROR:"has been blocked by CORS policy",CANNOT_ESTIMATE_GAS2:"transaction may fail or may require manual gas limit",NO_RESPONSE_PRIVATE:"No resonse from private relay",TRY_AGAIN_AFTER_TRANSACTION:"Please, try again",ALREADY_SUBSCRIBED:"User Already Subscribed",PREFERRED_TOKEN_OR_ADDRESS_MISSING:"Please, specify both the preferred token and public wallet address",SNAPSHOT_FILE_NOT_FOUND:"We are updating our servers. Please try again in some time.",API_KEY_DOES_NOT_MATCH:"Please provide a valid API Key for the wallet. If you do not have one, please contact the Hinkal team to get one.",SAME_ADDRESS_FORBIDDEN:"You cannot recieve staked tokens on the same ethereum address",NOT_VALID_ETHEREUM_ADDRESS:"Please enter a valid Ethereum address",MUST_STAKE_AT_LEAST_ONE_ETH:"Amount too low, Please stake at least 1 ETH",OUT_OF_MEMORY:"Out of memory: Cannot allocate Wasm memory",OUT_OF_MEMORY2:"could not allocate memory",OUT_OF_MEMORY3:"out of memory",UNKNOWN:"Unknown error"},e="Not enough memory. Please, close some tabs/applications to free up memory and try again.",r={USER_REJECTED_TRANSACTION:"Transaction rejected by user.",WC_NO_MATCHING_KEY:"Wallet Connect error. Please, try again",RPC_PROVIDER_LIMIT_ERROR:"Rate Limit: please, use different rpc provider in your wallet.",INSUFFICIENT_FUNDS_GAS:"Your balance is too low to cover the transaction fees. Please add funds to proceed.",INVALID_NULLIFIER:"There seems to be a temporary caching issue. Please press ‘Refresh your balance’ under your shielded address.",STATE_TO_UPDATE:"A technical issue has occurred. Please contact the Hinkal support team for assistance.",INVALID_ZKP:"The Zero Knowledge Proof provided is invalid. Please check and try again.",NONCE_HIGH:"To resolve this issue, please reset your wallet in the Settings.",UNKNOWN_PROVIDER:"The provider is not recognized. Please check your settings.",TRANSACTION_REPLACED:"Your transaction was replaced by another. Please submit your transaction again.",TRANSACTION_REPLACED2:"This transaction was replaced. Please try submitting again.",TRANSACTION_TIMEOUT:"Your transaction got stale. Please, try in a few seconds",SAFE_ERC:"The selected ERC20 Token could not be transferred. Please contact the Hinkal support team.",SAFE_ERC_APPROVE:"The selected ERC20 Token could not be approved. Please contact the Hinkal support team.",INTEGRAL_CURVE_ZERO:"There's an issue with the pool's staking function. Please contact the Hinkal support team for assistance.",LOW_LEVEL_CALL:"A technical issue occurred. Please contact the Hinkal team for assistance.",ODOS_FETCH:"Current Odos price is unavailable. Please try again.",ODOS_SWAP_FAILED:"Your Odos Swap transaction didn’t go through. Please try again.",ONEINCH_SWAP_FAILED:"Your 1inch Swap transaction didn’t go through. Please try again.",PENDLE_SWAP_FAILED_BELOW_THRESHOLD:"The amount is below the minimum required. Try a higher amount.",PENDLE_SWAP_FAILED:"Your Pendle Swap transaction didn’t go through. Please try again.",PENDLE_SWAP_TOKENS_UNSUPPORTED:"You can't use Pendle to swap between those tokens. Try a different pair.",PENDLE_SWAP_TOKENS_UNSUPPORTED2:"You can't use Pendle to swap between those tokens. Try a different pair.",PENDLE_MINIMUM_AMOUNT_NOT_REACHED:"The amount is below the minimum required. Try a higher amount.",CONNECT_ERROR2:"Oops, there are connectivity issues. Please check your internet connection and try again.",WALLET_CONNECT_MATCHING_KEYS:"An internal WalletConnect error occurred. Please try reconnecting.",SIGNATURE_UNSUPPORTED_CHAINS:"The transaction couldn’t be signed: this network is not supported.",SIGNATURE_UNSUPPORTED_CHAINS2:"The transaction couldn’t be signed: this network is not supported.",SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:"Your active wallet doesn't support personal signatures. Please use a different wallet.",REVERT_NO_STRING:"Your transaction didn’t go through due to technical issues. Please contact Hinkal support.",INVALID_MERKLE_ROOT:"There's an issue with the merkle tree root. Please contact Hinkal support.",MERLE_TREE_SNARK:"An error occurred in the circuit processing. Contact Hinkal support for assistance.",MAX_FEE_GAS_ERROR:"Your transaction was rejected due to high network congestion.",MERKLE_TREE_INCOMPLETE:"A technical issue has occurred. Please contact the Hinkal team for assistance.",CORS_ERROR:"Unable to reach the remote client. Please contact Hinkal support.",NETWORK_ERROR:"Connection error. Please, check back later.",CONNECTIVITY_ERROR:"A connectivity issue occurred. Please check your network connection.",INBALANCE_IN_TOKEN:"Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance.",BALANCE_EQUATION_FAILED:"There's an issue with the balance calculation. Please adjust your transaction parameters.",SLIPPAGE_LIMIT_1:"Your transaction didn’t go through due to price slippage. Adjust slippage settings and retry.",CANNOT_ESTIMATE_GAS:"Unable to estimate the gas required. Please set the gas limit manually.",CANNOT_ESTIMATE_GAS2:"Your transaction didn’t go through. Please try setting gas limit manually.",GAS_STATION_NOT_AVAILABLE:"The Gas Station service is currently unavailable. Please contact the Hinkal team.",TIMESTAMP_STALE:"This transaction is outdated. Please initiate a new transaction.",ALREADY_SUBSCRIBED:"This email is already subscribed to the Hinkal newsletter.",OUT_OF_MEMORY:e,OUT_OF_MEMORY2:e,OUT_OF_MEMORY3:e};exports.UserFriendlyErrorCodes=r;exports.transactionErrorCodes=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={CANNOT_CERTIFY_FOR_PAST_WEEK:"Certification for the past week is not available.",ACTIVE_CODE_INVALID:"The code you entered does not exist. Please try again.",REFERRE_CANT_USE_OWN:"You cannot use own referre code.",USER_HAS_ACTIVE_CODE:"User already has an active code.",SAME_REFERRAL_CODE:"You cannot add the same referral code.",ALREADY_EXISTING_REFERRAL_CODE:"You cannot add already existing referral code.",CYCLICAL_REFERRALS_FORBIDDEN:"Cyclical referrals are forbidden.",WRONG_RECEIVING_TOKEN:"Currently you cannot receive rewards in the token you provided. Please select a different token or contact the Hinkal Team.",INVALID_RECEIVING_ADDRESS:"The receiving wallet address you submitted is not a valid address. Please check and submit again.",USER_IS_UNRANKED:"Please certify transactions to see rank.",MULTI_VERIFICATION_FAILED:"Transaction Verification on multiple network failed. Please, try again."},r={WC_NO_MATCHING_KEY:`creating the transaction failed
|
|
2
|
+
version`},s={WC_INVALID_URI:"Invalid WalletConnect URI. Please, try again.",WC_PAIRINNG_ERROR:"Pairing failed. Check your code and retry."},a={INSUFFICIENT_FUNDS:"Insufficient funds.",INSUFFICIENT_FUNDS_WITHDRAW:"Not enough funds to withdraw.",INSUFFICIENT_FUNDS_TRANSFER:"Not enough funds to transfer.",INSUFFICIENT_FUNDS_TO_TRANSACT:"Not enough funds to transact.",INSUFFICIENT_FUNDS_GAS:"Insufficient funds for gas * price."},n={...t,...r,...a,SOME_ERROR:"Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord.",TOO_HIGH_AMOUNT:"ApproxParamsInvalid",NOT_ENOUGH_TOKENS:"Transfer amount exceeds balance.",TRANSACTION_NOT_CONFIRMED:"The transaction was not confirmed by the network. Please, try again.",RPC_PROVIDER_LIMIT_ERROR:"Non-200 status code: '429'",RELAYER_NOT_AVAILABLE:"All relayers are busy, please try in a few seconds.",TRANSACTION_TIMEOUT:"Your transaction got stale. Please, try in a few seconds.",CONNECT_ERROR:"Connection error",CONNECT_ERROR2:"DOMException: Failed.",USER_REJECTED_TX:"Transaction rejected.",USER_REJECTED_SIGN:"User rejected signing.",USER_REJECTED_TRANSACTION:"user rejected transaction.",USER_REJECTED_SIGN2:"User rejected the request.",SIGNING_FAILED:"The signing failed. Please, try again.",SIGNATURE_UNSUPPORTED_CHAINS:"Details: Unsupported chains.",SIGNATURE_UNSUPPORTED_CHAINS2:"User disapproved requested chains.",SIGNATURE_REQUEST_EXPIRED:"Request expired. Please try again.",SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:"The method personal_sign does not exist.",USER_DISAPPROVED_REQUESTED_METHODS:"User disapproved requested methods.",INVALID_AUTHORIZATION:"The requested account and/or method has not been authorized by the user.",INVALID_NULLIFIER:"Nullifier cannot be reused.",SANCTIONED_ADDRESS:"Address is sanctioned.",INVALID_AMOUNT:"Please, select correct amount.",RECIPIENT_FORMAT_INCORRECT:"Recipient Information format is incorrect.",INVALID_TOKEN:"Invalid token provided.",STATE_TO_UPDATE:"Error in template Verifier_219 line: 121",HAS_TOKEN:"User already has an access token.",INVALID_RECEIVER:"Receiver address doesn't match.",INVALID_RELAYER:"Relayer address doesn't match.",INVALID_RELAYER_FEE:"Relayer fee amount doesn't match.",TIMESTAMP_STALE:"Timestamp provided does not align with current time.",INVALID_ZKP:"Proof must be valid.",NO_TRANSACTIONS_TO_CERTIFY:"This week, you do not have transactions to certify.",UNSUPPORTED_NETWORK:"Unsupported network: please choose Polygon, BNB Chain.",SIG_BY_OWNER:"Signature must be signed by the owner of the contract.",AMOUNT_EMPTY:"Please, specify amount.",UNVERIFIED_USER:"Please, pass KYC verification.",RELAYER_ISSUE:"Relayer has some issues. Try again later.",RELAYER_GAS_ESTIMATE:"Relayer was not able to estimate the gas costs of tx. Please, try later.",RECEIVER_EMPTY:"Please, enter recipient address.",NOT_ETHEREUM_ADDRESS:"Please, input shielded address instead of ethereum address.",NOT_SHIELDED_ADDRESS:"Please, input valid shielded address.",VALID_ETHEREUM_ADDRESS:"Please, input valid ethereum address.",METAMASK_NOT_INSTALLED:"Please, install Metamask Wallet.",VIABLE_TX:"The transaction is not viable. Please increase the swap amount to swap with Relayer.",TRANSACTION_REPLACED:"transaction was replaced.",TRANSACTION_REPLACED2:"replacement fee too low.",TRANSACTION_CANCELED:"Transaction was cancelled. Please try again.",NONCE_HIGH:"Nonce too high.",WALLET_CONNECT_MATCHING_KEYS:"No matching key. keychain.",UNKNOWN_PROVIDER:"Unknown provider.",SAFE_ERC:"SafeERC20: low-level call failed.",SAFE_ERC_APPROVE:"SafeERC20: approve from non-zero to non-zero allowance.",SWAP_RELAYER_MIN:"Relayer minimum fee is not satisfied.",LOW_LEVEL_CALL:"low-level delegate call failed.",INTEGRAL_CURVE_ZERO:"previous integral cannot be zero.",ODOS_FETCH:"Odos API Fetch Error.",PENDLE_SWAP_FAILED_BELOW_THRESHOLD:"Error: Cannot swap.",PENDLE_SWAP_TOKENS_UNSUPPORTED:"No route found to swap.",PENDLE_SWAP_TOKENS_UNSUPPORTED2:"tokenInAddr is not a valid SY token in.",PENDLE_MINIMUM_AMOUNT_NOT_REACHED:"MinimumStakeAmountNotReached.",SLIPPAGE_LIMIT:"Slippage Limit Exceeded.",SLIPPAGE_LIMIT_1:"Slippage screwed you.",QUOTE_EXPIRED:"Quote has expired.",REVERT_NO_STRING:"Transaction reverted without a reason string.",UNISWAP_NOT_ENOUGH_LIQUIDITY:"Not Enough Liquidity.",CONNECTION_FAILED:"Failed to connect.",FAILED_TO_SWITCH_NETWORKS:"Failed to switch network, Please switch networks using your wallet's settings.",INVALID_FROM:"Invalid from token.",INVALID_TO:"Invalid to token.",Invalid_Password:"Invalid password.",INTERNAL_ERROR:"Internal error: please, try again.",INVALID_MERKLE_ROOT:"Invalid merkle tree root.",ACCESS_TOKEN_INVALID_HASH:"Access Token not minted.",MERLE_TREE_SNARK:"Error in template ForceEqualIfEnabled.",ERROR_MESSAGE_CHAIN_ADDRESS_CHANGED:"Chain/address changed: balance updated canceled.",DECIMALS_LIMIT:"Number of decimals exceed maximum.",MERKLE_TREE_INCOMPLETE:"Merkle tree is incomplete.",FAIL_ESTIMATE_GAS:"Failed to estimate gas: check the transaction parameters.",ODOS_SWAP_FAILED:"Odos swap call failed.",ONEINCH_SWAP_FAILED:"One inch swap failed.",GAS_ESTIMATION_ERROR:"Failed Gas Estimates Response.",GAS_ESTIMATE_INCORRECT_PARAMETERS:"Incorrect Parameters for Gas Estimate.",CONNECTIVITY_ERROR:"Request failed with status code 500.",TRANSACTION_FAILED:"Transaction Failed: Revert.",NO_UNISWAP_PRICE:"Cannot get Uniswap Price.",NO_ODOS_PRICE:"Cannot get Odos Price.",NO_ONEINCH_PRICE:"Cannot get OneInch Price.",FEES_OVER_TRANSACTION_VALUE:"Fees are over transaction value. Please, increase the amount.",GAS_STATION_NOT_AVAILABLE:"Gas Station Not Available.",INBALANCE_IN_TOKEN:"Inbalance in token detected.",BALANCE_EQUATION_FAILED:"Balance Diff Should be equal to sum of onchain and offchain created commitments.",TOKEN_ADD_ERROR:"Error occoured while adding token. Please make sure you are adding a valid ERC-20 token.",CANNOT_ESTIMATE_GAS:"transaction may require manual gas limit.",NETWORK_ERROR:"Network Error.",MAX_FEE_GAS_ERROR:"max fee per gas less than block base fee.",CORS_ERROR:"has been blocked by CORS policy.",CANNOT_ESTIMATE_GAS2:"transaction may fail or may require manual gas limit.",NO_RESPONSE_PRIVATE:"No resonse from private relay.",TRY_AGAIN_AFTER_TRANSACTION:"Please, try again.",ALREADY_SUBSCRIBED:"User Already Subscribed.",PREFERRED_TOKEN_OR_ADDRESS_MISSING:"Please, specify both the preferred token and public wallet address.",SNAPSHOT_FILE_NOT_FOUND:"We are updating our servers. Please try again in some time.",API_KEY_DOES_NOT_MATCH:"Please provide a valid API Key for the wallet. If you do not have one, please contact the Hinkal team to get one.",SAME_ADDRESS_FORBIDDEN:"You cannot recieve staked tokens on the same ethereum address.",NOT_VALID_ETHEREUM_ADDRESS:"Please enter a valid Ethereum address.",MUST_STAKE_AT_LEAST_ONE_ETH:"Amount too low, Please stake at least 1 ETH.",OUT_OF_MEMORY:"Out of memory: Cannot allocate Wasm memory.",OUT_OF_MEMORY2:"could not allocate memory.",OUT_OF_MEMORY3:"out of memory.",UNKNOWN:"Unknown error.",SANDBOX_WRONG_REQUEST:"The requested Transaction type is not supported."},e="Not enough memory. Please, close some tabs/applications to free up memory and try again.",o={USER_REJECTED_TRANSACTION:"Transaction rejected by user.",SOME_ERROR:"Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord",TOO_HIGH_AMOUNT:"The amount you provided is too high, please adjust the amount",WC_NO_MATCHING_KEY:"Wallet Connect error. Please, try again",RPC_PROVIDER_LIMIT_ERROR:"Rate Limit: please, use different rpc provider in your wallet.",INSUFFICIENT_FUNDS_GAS:"Your balance is too low to cover the transaction fees. Please add funds to proceed.",INVALID_NULLIFIER:"There seems to be a temporary caching issue. Please press ‘Refresh your balance’ under your shielded address.",STATE_TO_UPDATE:"A technical issue has occurred. Please contact the Hinkal support team for assistance.",INVALID_ZKP:"The Zero Knowledge Proof provided is invalid. Please check and try again.",NONCE_HIGH:"To resolve this issue, please reset your wallet in the Settings.",UNKNOWN_PROVIDER:"The provider is not recognized. Please check your settings.",TRANSACTION_REPLACED:"Your transaction was replaced by another. Please submit your transaction again.",TRANSACTION_REPLACED2:"This transaction was replaced. Please try submitting again.",TRANSACTION_TIMEOUT:"Your transaction got stale. Please, try in a few seconds",SAFE_ERC:"The selected ERC20 Token could not be transferred. Please contact the Hinkal support team.",SAFE_ERC_APPROVE:"The selected ERC20 Token could not be approved. Please contact the Hinkal support team.",INTEGRAL_CURVE_ZERO:"There's an issue with the pool's staking function. Please contact the Hinkal support team for assistance.",LOW_LEVEL_CALL:"A technical issue occurred. Please contact the Hinkal team for assistance.",ODOS_FETCH:"Current Odos price is unavailable. Please try again.",ODOS_SWAP_FAILED:"Your Odos Swap transaction didn’t go through. Please try again.",ONEINCH_SWAP_FAILED:"Your 1inch Swap transaction didn’t go through. Please try again.",PENDLE_SWAP_FAILED_BELOW_THRESHOLD:"The amount is below the minimum required. Try a higher amount.",PENDLE_SWAP_FAILED:"Your Pendle Swap transaction didn’t go through. Please try again.",PENDLE_SWAP_TOKENS_UNSUPPORTED:"You can't use Pendle to swap between those tokens. Try a different pair.",PENDLE_SWAP_TOKENS_UNSUPPORTED2:"You can't use Pendle to swap between those tokens. Try a different pair.",PENDLE_MINIMUM_AMOUNT_NOT_REACHED:"The amount is below the minimum required. Try a higher amount.",CONNECT_ERROR2:"Oops, there are connectivity issues. Please check your internet connection and try again.",WALLET_CONNECT_MATCHING_KEYS:"An internal WalletConnect error occurred. Please try reconnecting.",SIGNATURE_UNSUPPORTED_CHAINS:"The transaction couldn’t be signed: this network is not supported.",SIGNATURE_UNSUPPORTED_CHAINS2:"The transaction couldn’t be signed: this network is not supported.",SIGNATURE_UNSUPPORTED_PERSONAL_SIGN:"Your active wallet doesn't support personal signatures. Please use a different wallet.",REVERT_NO_STRING:"Your transaction didn’t go through due to technical issues. Please contact Hinkal support.",INVALID_MERKLE_ROOT:"There's an issue with the merkle tree root. Please contact Hinkal support.",MERLE_TREE_SNARK:"An error occurred in the circuit processing. Contact Hinkal support for assistance.",MAX_FEE_GAS_ERROR:"Your transaction was rejected due to high network congestion.",MERKLE_TREE_INCOMPLETE:"A technical issue has occurred. Please contact the Hinkal team for assistance.",CORS_ERROR:"Unable to reach the remote client. Please contact Hinkal support.",NETWORK_ERROR:"Connection error. Please, check back later.",CONNECTIVITY_ERROR:"A connectivity issue occurred. Please check your network connection.",INBALANCE_IN_TOKEN:"Your transaction didn’t go through due to price slippage. Try increasing your slippage tolerance.",BALANCE_EQUATION_FAILED:"There's an issue with the balance calculation. Please adjust your transaction parameters.",SLIPPAGE_LIMIT_1:"Your transaction didn’t go through due to price slippage. Adjust slippage settings and retry.",CANNOT_ESTIMATE_GAS:"Unable to estimate the gas required. Please set the gas limit manually.",CANNOT_ESTIMATE_GAS2:"Your transaction didn’t go through. Please try setting gas limit manually.",GAS_STATION_NOT_AVAILABLE:"The Gas Station service is currently unavailable. Please contact the Hinkal team.",TIMESTAMP_STALE:"This transaction is outdated. Please initiate a new transaction.",ALREADY_SUBSCRIBED:"This email is already subscribed to the Hinkal newsletter.",OUT_OF_MEMORY:e,OUT_OF_MEMORY2:e,OUT_OF_MEMORY3:e,INVALID_RECOVERY_PHRASE:"Invalid recovery phrase.",PHRASES_DONT_MATCH:"Phrases do not match. You can always go back and check!",PASSWORDS_DONT_MATCH:"Passwords do not match.",PASSWORD_TOO_SMALL:"Password must be at least 8 characters."};exports.UserFriendlyErrorCodes=o;exports.insufficientResourcesErrorCodes=a;exports.transactionErrorCodes=n;exports.walletConnectErrorCodes=s;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const walletConnectErrorCodes: {
|
|
2
|
+
WC_INVALID_URI: string;
|
|
3
|
+
WC_PAIRINNG_ERROR: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const insufficientResourcesErrorCodes: {
|
|
2
6
|
INSUFFICIENT_FUNDS: string;
|
|
3
7
|
INSUFFICIENT_FUNDS_WITHDRAW: string;
|
|
4
8
|
INSUFFICIENT_FUNDS_TRANSFER: string;
|
|
5
9
|
INSUFFICIENT_FUNDS_TO_TRANSACT: string;
|
|
6
10
|
INSUFFICIENT_FUNDS_GAS: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const transactionErrorCodes: {
|
|
13
|
+
SOME_ERROR: string;
|
|
14
|
+
TOO_HIGH_AMOUNT: string;
|
|
7
15
|
NOT_ENOUGH_TOKENS: string;
|
|
8
16
|
TRANSACTION_NOT_CONFIRMED: string;
|
|
9
17
|
RPC_PROVIDER_LIMIT_ERROR: string;
|
|
@@ -77,6 +85,7 @@ export declare const transactionErrorCodes: {
|
|
|
77
85
|
INVALID_MERKLE_ROOT: string;
|
|
78
86
|
ACCESS_TOKEN_INVALID_HASH: string;
|
|
79
87
|
MERLE_TREE_SNARK: string;
|
|
88
|
+
ERROR_MESSAGE_CHAIN_ADDRESS_CHANGED: string;
|
|
80
89
|
DECIMALS_LIMIT: string;
|
|
81
90
|
MERKLE_TREE_INCOMPLETE: string;
|
|
82
91
|
FAIL_ESTIMATE_GAS: string;
|
|
@@ -112,6 +121,12 @@ export declare const transactionErrorCodes: {
|
|
|
112
121
|
OUT_OF_MEMORY2: string;
|
|
113
122
|
OUT_OF_MEMORY3: string;
|
|
114
123
|
UNKNOWN: string;
|
|
124
|
+
SANDBOX_WRONG_REQUEST: string;
|
|
125
|
+
INSUFFICIENT_FUNDS: string;
|
|
126
|
+
INSUFFICIENT_FUNDS_WITHDRAW: string;
|
|
127
|
+
INSUFFICIENT_FUNDS_TRANSFER: string;
|
|
128
|
+
INSUFFICIENT_FUNDS_TO_TRANSACT: string;
|
|
129
|
+
INSUFFICIENT_FUNDS_GAS: string;
|
|
115
130
|
WC_NO_MATCHING_KEY: string;
|
|
116
131
|
CANNOT_CERTIFY_FOR_PAST_WEEK: string;
|
|
117
132
|
ACTIVE_CODE_INVALID: string;
|
|
@@ -127,6 +142,8 @@ export declare const transactionErrorCodes: {
|
|
|
127
142
|
};
|
|
128
143
|
export declare const UserFriendlyErrorCodes: {
|
|
129
144
|
USER_REJECTED_TRANSACTION: string;
|
|
145
|
+
SOME_ERROR: string;
|
|
146
|
+
TOO_HIGH_AMOUNT: string;
|
|
130
147
|
WC_NO_MATCHING_KEY: string;
|
|
131
148
|
RPC_PROVIDER_LIMIT_ERROR: string;
|
|
132
149
|
INSUFFICIENT_FUNDS_GAS: string;
|
|
@@ -174,4 +191,8 @@ export declare const UserFriendlyErrorCodes: {
|
|
|
174
191
|
OUT_OF_MEMORY: string;
|
|
175
192
|
OUT_OF_MEMORY2: string;
|
|
176
193
|
OUT_OF_MEMORY3: string;
|
|
194
|
+
INVALID_RECOVERY_PHRASE: string;
|
|
195
|
+
PHRASES_DONT_MATCH: string;
|
|
196
|
+
PASSWORDS_DONT_MATCH: string;
|
|
197
|
+
PASSWORD_TOO_SMALL: string;
|
|
177
198
|
};
|
|
@@ -1,137 +1,148 @@
|
|
|
1
1
|
const a = {
|
|
2
|
-
CANNOT_CERTIFY_FOR_PAST_WEEK: "Certification for the past week is not available",
|
|
3
|
-
ACTIVE_CODE_INVALID: "The code you entered does not exist. Please try again",
|
|
4
|
-
REFERRE_CANT_USE_OWN: "You cannot use own referre code",
|
|
5
|
-
USER_HAS_ACTIVE_CODE: "User already has an active code",
|
|
6
|
-
SAME_REFERRAL_CODE: "You cannot add the same referral code",
|
|
7
|
-
ALREADY_EXISTING_REFERRAL_CODE: "You cannot add already existing referral code",
|
|
8
|
-
CYCLICAL_REFERRALS_FORBIDDEN: "Cyclical referrals are forbidden",
|
|
9
|
-
WRONG_RECEIVING_TOKEN: "Currently you cannot receive rewards in the token you provided. Please select a different token or contact the Hinkal Team",
|
|
10
|
-
INVALID_RECEIVING_ADDRESS: "The receiving wallet address you submitted is not a valid address. Please check and submit again",
|
|
11
|
-
USER_IS_UNRANKED: "Please certify transactions to see rank",
|
|
2
|
+
CANNOT_CERTIFY_FOR_PAST_WEEK: "Certification for the past week is not available.",
|
|
3
|
+
ACTIVE_CODE_INVALID: "The code you entered does not exist. Please try again.",
|
|
4
|
+
REFERRE_CANT_USE_OWN: "You cannot use own referre code.",
|
|
5
|
+
USER_HAS_ACTIVE_CODE: "User already has an active code.",
|
|
6
|
+
SAME_REFERRAL_CODE: "You cannot add the same referral code.",
|
|
7
|
+
ALREADY_EXISTING_REFERRAL_CODE: "You cannot add already existing referral code.",
|
|
8
|
+
CYCLICAL_REFERRALS_FORBIDDEN: "Cyclical referrals are forbidden.",
|
|
9
|
+
WRONG_RECEIVING_TOKEN: "Currently you cannot receive rewards in the token you provided. Please select a different token or contact the Hinkal Team.",
|
|
10
|
+
INVALID_RECEIVING_ADDRESS: "The receiving wallet address you submitted is not a valid address. Please check and submit again.",
|
|
11
|
+
USER_IS_UNRANKED: "Please certify transactions to see rank.",
|
|
12
12
|
MULTI_VERIFICATION_FAILED: "Transaction Verification on multiple network failed. Please, try again."
|
|
13
13
|
}, t = {
|
|
14
14
|
WC_NO_MATCHING_KEY: `creating the transaction failed
|
|
15
15
|
version`
|
|
16
|
+
}, s = {
|
|
17
|
+
WC_INVALID_URI: "Invalid WalletConnect URI. Please, try again.",
|
|
18
|
+
WC_PAIRINNG_ERROR: "Pairing failed. Check your code and retry."
|
|
16
19
|
}, n = {
|
|
20
|
+
INSUFFICIENT_FUNDS: "Insufficient funds.",
|
|
21
|
+
INSUFFICIENT_FUNDS_WITHDRAW: "Not enough funds to withdraw.",
|
|
22
|
+
INSUFFICIENT_FUNDS_TRANSFER: "Not enough funds to transfer.",
|
|
23
|
+
INSUFFICIENT_FUNDS_TO_TRANSACT: "Not enough funds to transact.",
|
|
24
|
+
INSUFFICIENT_FUNDS_GAS: "Insufficient funds for gas * price."
|
|
25
|
+
}, r = {
|
|
17
26
|
...a,
|
|
18
27
|
...t,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
INSUFFICIENT_FUNDS_GAS: "Insufficient funds for gas * price",
|
|
24
|
-
NOT_ENOUGH_TOKENS: "Transfer amount exceeds balance",
|
|
28
|
+
...n,
|
|
29
|
+
SOME_ERROR: "Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord.",
|
|
30
|
+
TOO_HIGH_AMOUNT: "ApproxParamsInvalid",
|
|
31
|
+
NOT_ENOUGH_TOKENS: "Transfer amount exceeds balance.",
|
|
25
32
|
TRANSACTION_NOT_CONFIRMED: "The transaction was not confirmed by the network. Please, try again.",
|
|
26
33
|
RPC_PROVIDER_LIMIT_ERROR: "Non-200 status code: '429'",
|
|
27
|
-
RELAYER_NOT_AVAILABLE: "All relayers are busy, please try in a few seconds",
|
|
28
|
-
TRANSACTION_TIMEOUT: "Your transaction got stale. Please, try in a few seconds",
|
|
34
|
+
RELAYER_NOT_AVAILABLE: "All relayers are busy, please try in a few seconds.",
|
|
35
|
+
TRANSACTION_TIMEOUT: "Your transaction got stale. Please, try in a few seconds.",
|
|
29
36
|
CONNECT_ERROR: "Connection error",
|
|
30
|
-
CONNECT_ERROR2: "DOMException: Failed",
|
|
37
|
+
CONNECT_ERROR2: "DOMException: Failed.",
|
|
31
38
|
USER_REJECTED_TX: "Transaction rejected.",
|
|
32
|
-
USER_REJECTED_SIGN: "User rejected signing",
|
|
33
|
-
USER_REJECTED_TRANSACTION: "user rejected transaction",
|
|
34
|
-
USER_REJECTED_SIGN2: "User rejected the request",
|
|
39
|
+
USER_REJECTED_SIGN: "User rejected signing.",
|
|
40
|
+
USER_REJECTED_TRANSACTION: "user rejected transaction.",
|
|
41
|
+
USER_REJECTED_SIGN2: "User rejected the request.",
|
|
35
42
|
SIGNING_FAILED: "The signing failed. Please, try again.",
|
|
36
43
|
SIGNATURE_UNSUPPORTED_CHAINS: "Details: Unsupported chains.",
|
|
37
|
-
SIGNATURE_UNSUPPORTED_CHAINS2: "User disapproved requested chains",
|
|
38
|
-
SIGNATURE_REQUEST_EXPIRED: "Request expired. Please try again",
|
|
39
|
-
SIGNATURE_UNSUPPORTED_PERSONAL_SIGN: "The method personal_sign does not exist",
|
|
40
|
-
USER_DISAPPROVED_REQUESTED_METHODS: "User disapproved requested methods",
|
|
41
|
-
INVALID_AUTHORIZATION: "The requested account and/or method has not been authorized by the user",
|
|
42
|
-
INVALID_NULLIFIER: "Nullifier cannot be reused",
|
|
43
|
-
SANCTIONED_ADDRESS: "Address is sanctioned",
|
|
44
|
-
INVALID_AMOUNT: "Please, select correct amount",
|
|
45
|
-
RECIPIENT_FORMAT_INCORRECT: "Recipient Information format is incorrect",
|
|
46
|
-
INVALID_TOKEN: "Invalid token provided",
|
|
44
|
+
SIGNATURE_UNSUPPORTED_CHAINS2: "User disapproved requested chains.",
|
|
45
|
+
SIGNATURE_REQUEST_EXPIRED: "Request expired. Please try again.",
|
|
46
|
+
SIGNATURE_UNSUPPORTED_PERSONAL_SIGN: "The method personal_sign does not exist.",
|
|
47
|
+
USER_DISAPPROVED_REQUESTED_METHODS: "User disapproved requested methods.",
|
|
48
|
+
INVALID_AUTHORIZATION: "The requested account and/or method has not been authorized by the user.",
|
|
49
|
+
INVALID_NULLIFIER: "Nullifier cannot be reused.",
|
|
50
|
+
SANCTIONED_ADDRESS: "Address is sanctioned.",
|
|
51
|
+
INVALID_AMOUNT: "Please, select correct amount.",
|
|
52
|
+
RECIPIENT_FORMAT_INCORRECT: "Recipient Information format is incorrect.",
|
|
53
|
+
INVALID_TOKEN: "Invalid token provided.",
|
|
47
54
|
STATE_TO_UPDATE: "Error in template Verifier_219 line: 121",
|
|
48
|
-
HAS_TOKEN: "User already has an access token",
|
|
49
|
-
INVALID_RECEIVER: "Receiver address doesn't match",
|
|
50
|
-
INVALID_RELAYER: "Relayer address doesn't match",
|
|
51
|
-
INVALID_RELAYER_FEE: "Relayer fee amount doesn't match",
|
|
52
|
-
TIMESTAMP_STALE: "Timestamp provided does not align with current time",
|
|
53
|
-
INVALID_ZKP: "Proof must be valid",
|
|
54
|
-
NO_TRANSACTIONS_TO_CERTIFY: "This week, you do not have transactions to certify",
|
|
55
|
-
UNSUPPORTED_NETWORK: "Unsupported network: please choose Polygon, BNB Chain",
|
|
56
|
-
SIG_BY_OWNER: "Signature must be signed by the owner of the contract",
|
|
57
|
-
AMOUNT_EMPTY: "Please, specify amount",
|
|
58
|
-
UNVERIFIED_USER: "Please, pass KYC verification",
|
|
59
|
-
RELAYER_ISSUE: "Relayer has some issues. Try again later",
|
|
55
|
+
HAS_TOKEN: "User already has an access token.",
|
|
56
|
+
INVALID_RECEIVER: "Receiver address doesn't match.",
|
|
57
|
+
INVALID_RELAYER: "Relayer address doesn't match.",
|
|
58
|
+
INVALID_RELAYER_FEE: "Relayer fee amount doesn't match.",
|
|
59
|
+
TIMESTAMP_STALE: "Timestamp provided does not align with current time.",
|
|
60
|
+
INVALID_ZKP: "Proof must be valid.",
|
|
61
|
+
NO_TRANSACTIONS_TO_CERTIFY: "This week, you do not have transactions to certify.",
|
|
62
|
+
UNSUPPORTED_NETWORK: "Unsupported network: please choose Polygon, BNB Chain.",
|
|
63
|
+
SIG_BY_OWNER: "Signature must be signed by the owner of the contract.",
|
|
64
|
+
AMOUNT_EMPTY: "Please, specify amount.",
|
|
65
|
+
UNVERIFIED_USER: "Please, pass KYC verification.",
|
|
66
|
+
RELAYER_ISSUE: "Relayer has some issues. Try again later.",
|
|
60
67
|
RELAYER_GAS_ESTIMATE: "Relayer was not able to estimate the gas costs of tx. Please, try later.",
|
|
61
|
-
RECEIVER_EMPTY: "Please, enter recipient address",
|
|
62
|
-
NOT_ETHEREUM_ADDRESS: "Please, input shielded address instead of ethereum address",
|
|
63
|
-
NOT_SHIELDED_ADDRESS: "Please, input valid shielded address",
|
|
64
|
-
VALID_ETHEREUM_ADDRESS: "Please, input valid ethereum address",
|
|
65
|
-
METAMASK_NOT_INSTALLED: "Please, install Metamask Wallet",
|
|
68
|
+
RECEIVER_EMPTY: "Please, enter recipient address.",
|
|
69
|
+
NOT_ETHEREUM_ADDRESS: "Please, input shielded address instead of ethereum address.",
|
|
70
|
+
NOT_SHIELDED_ADDRESS: "Please, input valid shielded address.",
|
|
71
|
+
VALID_ETHEREUM_ADDRESS: "Please, input valid ethereum address.",
|
|
72
|
+
METAMASK_NOT_INSTALLED: "Please, install Metamask Wallet.",
|
|
66
73
|
VIABLE_TX: "The transaction is not viable. Please increase the swap amount to swap with Relayer.",
|
|
67
|
-
TRANSACTION_REPLACED: "transaction was replaced",
|
|
68
|
-
TRANSACTION_REPLACED2: "replacement fee too low",
|
|
69
|
-
TRANSACTION_CANCELED: "Transaction was cancelled. Please try again",
|
|
74
|
+
TRANSACTION_REPLACED: "transaction was replaced.",
|
|
75
|
+
TRANSACTION_REPLACED2: "replacement fee too low.",
|
|
76
|
+
TRANSACTION_CANCELED: "Transaction was cancelled. Please try again.",
|
|
70
77
|
NONCE_HIGH: "Nonce too high.",
|
|
71
|
-
WALLET_CONNECT_MATCHING_KEYS: "No matching key. keychain",
|
|
72
|
-
UNKNOWN_PROVIDER: "Unknown provider",
|
|
73
|
-
SAFE_ERC: "SafeERC20: low-level call failed",
|
|
74
|
-
SAFE_ERC_APPROVE: "SafeERC20: approve from non-zero to non-zero allowance",
|
|
75
|
-
SWAP_RELAYER_MIN: "Relayer minimum fee is not satisfied",
|
|
76
|
-
LOW_LEVEL_CALL: "low-level delegate call failed",
|
|
77
|
-
INTEGRAL_CURVE_ZERO: "previous integral cannot be zero",
|
|
78
|
-
ODOS_FETCH: "Odos API Fetch Error",
|
|
79
|
-
PENDLE_SWAP_FAILED_BELOW_THRESHOLD: "Error: Cannot swap",
|
|
80
|
-
PENDLE_SWAP_TOKENS_UNSUPPORTED: "No route found to swap",
|
|
81
|
-
PENDLE_SWAP_TOKENS_UNSUPPORTED2: "tokenInAddr is not a valid SY token in",
|
|
82
|
-
PENDLE_MINIMUM_AMOUNT_NOT_REACHED: "MinimumStakeAmountNotReached",
|
|
83
|
-
SLIPPAGE_LIMIT: "Slippage Limit Exceeded",
|
|
84
|
-
SLIPPAGE_LIMIT_1: "Slippage screwed you",
|
|
85
|
-
QUOTE_EXPIRED: "Quote has expired",
|
|
86
|
-
REVERT_NO_STRING: "Transaction reverted without a reason string",
|
|
87
|
-
UNISWAP_NOT_ENOUGH_LIQUIDITY: "Not Enough Liquidity",
|
|
88
|
-
CONNECTION_FAILED: "Failed to connect",
|
|
89
|
-
FAILED_TO_SWITCH_NETWORKS: "Failed to switch network, Please switch networks using your wallet's settings",
|
|
90
|
-
INVALID_FROM: "Invalid from token",
|
|
91
|
-
INVALID_TO: "Invalid to token",
|
|
92
|
-
Invalid_Password: "Invalid password",
|
|
93
|
-
INTERNAL_ERROR: "Internal error: please, try again",
|
|
94
|
-
INVALID_MERKLE_ROOT: "Invalid merkle tree root",
|
|
95
|
-
ACCESS_TOKEN_INVALID_HASH: "Access Token not minted",
|
|
96
|
-
MERLE_TREE_SNARK: "Error in template ForceEqualIfEnabled",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
78
|
+
WALLET_CONNECT_MATCHING_KEYS: "No matching key. keychain.",
|
|
79
|
+
UNKNOWN_PROVIDER: "Unknown provider.",
|
|
80
|
+
SAFE_ERC: "SafeERC20: low-level call failed.",
|
|
81
|
+
SAFE_ERC_APPROVE: "SafeERC20: approve from non-zero to non-zero allowance.",
|
|
82
|
+
SWAP_RELAYER_MIN: "Relayer minimum fee is not satisfied.",
|
|
83
|
+
LOW_LEVEL_CALL: "low-level delegate call failed.",
|
|
84
|
+
INTEGRAL_CURVE_ZERO: "previous integral cannot be zero.",
|
|
85
|
+
ODOS_FETCH: "Odos API Fetch Error.",
|
|
86
|
+
PENDLE_SWAP_FAILED_BELOW_THRESHOLD: "Error: Cannot swap.",
|
|
87
|
+
PENDLE_SWAP_TOKENS_UNSUPPORTED: "No route found to swap.",
|
|
88
|
+
PENDLE_SWAP_TOKENS_UNSUPPORTED2: "tokenInAddr is not a valid SY token in.",
|
|
89
|
+
PENDLE_MINIMUM_AMOUNT_NOT_REACHED: "MinimumStakeAmountNotReached.",
|
|
90
|
+
SLIPPAGE_LIMIT: "Slippage Limit Exceeded.",
|
|
91
|
+
SLIPPAGE_LIMIT_1: "Slippage screwed you.",
|
|
92
|
+
QUOTE_EXPIRED: "Quote has expired.",
|
|
93
|
+
REVERT_NO_STRING: "Transaction reverted without a reason string.",
|
|
94
|
+
UNISWAP_NOT_ENOUGH_LIQUIDITY: "Not Enough Liquidity.",
|
|
95
|
+
CONNECTION_FAILED: "Failed to connect.",
|
|
96
|
+
FAILED_TO_SWITCH_NETWORKS: "Failed to switch network, Please switch networks using your wallet's settings.",
|
|
97
|
+
INVALID_FROM: "Invalid from token.",
|
|
98
|
+
INVALID_TO: "Invalid to token.",
|
|
99
|
+
Invalid_Password: "Invalid password.",
|
|
100
|
+
INTERNAL_ERROR: "Internal error: please, try again.",
|
|
101
|
+
INVALID_MERKLE_ROOT: "Invalid merkle tree root.",
|
|
102
|
+
ACCESS_TOKEN_INVALID_HASH: "Access Token not minted.",
|
|
103
|
+
MERLE_TREE_SNARK: "Error in template ForceEqualIfEnabled.",
|
|
104
|
+
ERROR_MESSAGE_CHAIN_ADDRESS_CHANGED: "Chain/address changed: balance updated canceled.",
|
|
105
|
+
DECIMALS_LIMIT: "Number of decimals exceed maximum.",
|
|
106
|
+
MERKLE_TREE_INCOMPLETE: "Merkle tree is incomplete.",
|
|
107
|
+
FAIL_ESTIMATE_GAS: "Failed to estimate gas: check the transaction parameters.",
|
|
108
|
+
ODOS_SWAP_FAILED: "Odos swap call failed.",
|
|
109
|
+
ONEINCH_SWAP_FAILED: "One inch swap failed.",
|
|
110
|
+
GAS_ESTIMATION_ERROR: "Failed Gas Estimates Response.",
|
|
111
|
+
GAS_ESTIMATE_INCORRECT_PARAMETERS: "Incorrect Parameters for Gas Estimate.",
|
|
112
|
+
CONNECTIVITY_ERROR: "Request failed with status code 500.",
|
|
113
|
+
TRANSACTION_FAILED: "Transaction Failed: Revert.",
|
|
114
|
+
NO_UNISWAP_PRICE: "Cannot get Uniswap Price.",
|
|
115
|
+
NO_ODOS_PRICE: "Cannot get Odos Price.",
|
|
116
|
+
NO_ONEINCH_PRICE: "Cannot get OneInch Price.",
|
|
109
117
|
FEES_OVER_TRANSACTION_VALUE: "Fees are over transaction value. Please, increase the amount.",
|
|
110
|
-
GAS_STATION_NOT_AVAILABLE: "Gas Station Not Available",
|
|
111
|
-
INBALANCE_IN_TOKEN: "Inbalance in token detected",
|
|
112
|
-
BALANCE_EQUATION_FAILED: "Balance Diff Should be equal to sum of onchain and offchain created commitments",
|
|
113
|
-
TOKEN_ADD_ERROR: "Error occoured while adding token. Please make sure you are adding a valid ERC-20 token",
|
|
114
|
-
CANNOT_ESTIMATE_GAS: "transaction may require manual gas limit",
|
|
115
|
-
NETWORK_ERROR: "Network Error",
|
|
116
|
-
MAX_FEE_GAS_ERROR: "max fee per gas less than block base fee",
|
|
117
|
-
CORS_ERROR: "has been blocked by CORS policy",
|
|
118
|
-
CANNOT_ESTIMATE_GAS2: "transaction may fail or may require manual gas limit",
|
|
119
|
-
NO_RESPONSE_PRIVATE: "No resonse from private relay",
|
|
120
|
-
TRY_AGAIN_AFTER_TRANSACTION: "Please, try again",
|
|
121
|
-
ALREADY_SUBSCRIBED: "User Already Subscribed",
|
|
122
|
-
PREFERRED_TOKEN_OR_ADDRESS_MISSING: "Please, specify both the preferred token and public wallet address",
|
|
118
|
+
GAS_STATION_NOT_AVAILABLE: "Gas Station Not Available.",
|
|
119
|
+
INBALANCE_IN_TOKEN: "Inbalance in token detected.",
|
|
120
|
+
BALANCE_EQUATION_FAILED: "Balance Diff Should be equal to sum of onchain and offchain created commitments.",
|
|
121
|
+
TOKEN_ADD_ERROR: "Error occoured while adding token. Please make sure you are adding a valid ERC-20 token.",
|
|
122
|
+
CANNOT_ESTIMATE_GAS: "transaction may require manual gas limit.",
|
|
123
|
+
NETWORK_ERROR: "Network Error.",
|
|
124
|
+
MAX_FEE_GAS_ERROR: "max fee per gas less than block base fee.",
|
|
125
|
+
CORS_ERROR: "has been blocked by CORS policy.",
|
|
126
|
+
CANNOT_ESTIMATE_GAS2: "transaction may fail or may require manual gas limit.",
|
|
127
|
+
NO_RESPONSE_PRIVATE: "No resonse from private relay.",
|
|
128
|
+
TRY_AGAIN_AFTER_TRANSACTION: "Please, try again.",
|
|
129
|
+
ALREADY_SUBSCRIBED: "User Already Subscribed.",
|
|
130
|
+
PREFERRED_TOKEN_OR_ADDRESS_MISSING: "Please, specify both the preferred token and public wallet address.",
|
|
123
131
|
SNAPSHOT_FILE_NOT_FOUND: "We are updating our servers. Please try again in some time.",
|
|
124
132
|
API_KEY_DOES_NOT_MATCH: "Please provide a valid API Key for the wallet. If you do not have one, please contact the Hinkal team to get one.",
|
|
125
|
-
SAME_ADDRESS_FORBIDDEN: "You cannot recieve staked tokens on the same ethereum address",
|
|
126
|
-
NOT_VALID_ETHEREUM_ADDRESS: "Please enter a valid Ethereum address",
|
|
127
|
-
MUST_STAKE_AT_LEAST_ONE_ETH: "Amount too low, Please stake at least 1 ETH",
|
|
133
|
+
SAME_ADDRESS_FORBIDDEN: "You cannot recieve staked tokens on the same ethereum address.",
|
|
134
|
+
NOT_VALID_ETHEREUM_ADDRESS: "Please enter a valid Ethereum address.",
|
|
135
|
+
MUST_STAKE_AT_LEAST_ONE_ETH: "Amount too low, Please stake at least 1 ETH.",
|
|
128
136
|
// there are 3 possible out of memory errors we can get
|
|
129
|
-
OUT_OF_MEMORY: "Out of memory: Cannot allocate Wasm memory",
|
|
130
|
-
OUT_OF_MEMORY2: "could not allocate memory",
|
|
131
|
-
OUT_OF_MEMORY3: "out of memory",
|
|
132
|
-
UNKNOWN: "Unknown error"
|
|
137
|
+
OUT_OF_MEMORY: "Out of memory: Cannot allocate Wasm memory.",
|
|
138
|
+
OUT_OF_MEMORY2: "could not allocate memory.",
|
|
139
|
+
OUT_OF_MEMORY3: "out of memory.",
|
|
140
|
+
UNKNOWN: "Unknown error.",
|
|
141
|
+
SANDBOX_WRONG_REQUEST: "The requested Transaction type is not supported."
|
|
133
142
|
}, e = "Not enough memory. Please, close some tabs/applications to free up memory and try again.", o = {
|
|
134
143
|
USER_REJECTED_TRANSACTION: "Transaction rejected by user.",
|
|
144
|
+
SOME_ERROR: "Some error has occurred. Please try again in a few minutes. If the issue persists, please report it in Discord",
|
|
145
|
+
TOO_HIGH_AMOUNT: "The amount you provided is too high, please adjust the amount",
|
|
135
146
|
WC_NO_MATCHING_KEY: "Wallet Connect error. Please, try again",
|
|
136
147
|
RPC_PROVIDER_LIMIT_ERROR: "Rate Limit: please, use different rpc provider in your wallet.",
|
|
137
148
|
INSUFFICIENT_FUNDS_GAS: "Your balance is too low to cover the transaction fees. Please add funds to proceed.",
|
|
@@ -178,9 +189,15 @@ version`
|
|
|
178
189
|
ALREADY_SUBSCRIBED: "This email is already subscribed to the Hinkal newsletter.",
|
|
179
190
|
OUT_OF_MEMORY: e,
|
|
180
191
|
OUT_OF_MEMORY2: e,
|
|
181
|
-
OUT_OF_MEMORY3: e
|
|
192
|
+
OUT_OF_MEMORY3: e,
|
|
193
|
+
INVALID_RECOVERY_PHRASE: "Invalid recovery phrase.",
|
|
194
|
+
PHRASES_DONT_MATCH: "Phrases do not match. You can always go back and check!",
|
|
195
|
+
PASSWORDS_DONT_MATCH: "Passwords do not match.",
|
|
196
|
+
PASSWORD_TOO_SMALL: "Password must be at least 8 characters."
|
|
182
197
|
};
|
|
183
198
|
export {
|
|
184
199
|
o as UserFriendlyErrorCodes,
|
|
185
|
-
n as
|
|
200
|
+
n as insufficientResourcesErrorCodes,
|
|
201
|
+
r as transactionErrorCodes,
|
|
202
|
+
s as walletConnectErrorCodes
|
|
186
203
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./customErrors/ErrorWithAmount.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./customErrors/ErrorWithAmount.cjs"),l=require("./customErrors/FeeOverTransactionValueError.cjs"),f=require("./customErrors/customErrors.helpers.cjs"),s=require("./error-codes.constants.cjs"),n=require("./types.cjs"),c=e=>{if(typeof e=="object"&&e!==null){if("response"in e&&typeof e.response=="object"&&e.response!==null&&"data"in e.response&&typeof e.response.data=="object"&&e.response.data!==null&&"message"in e.response.data&&typeof e.response.data.message=="string")return e.response.data.message;if("data"in e&&typeof e.data=="object"&&e.data!==null&&"message"in e.data&&typeof e.data.message=="string")return e.data.message;if("message"in e&&typeof e.message=="string")return e.message}if(e instanceof Error)return e.message;if(typeof e=="string")return e},p=e=>{switch(e){case n.ErrorCategory.DEPOSIT:return"Deposit Failed";case n.ErrorCategory.SWAP:return"Swap Failed";case n.ErrorCategory.WITHDRAW:return"Withdraw Failed";case n.ErrorCategory.Fund:return"Fund Failed";case n.ErrorCategory.Receive:return"Receive Failed";default:return s.transactionErrorCodes.UNKNOWN}},C=(e,o)=>{if(e instanceof l.FeeOverTransactionValueError)return f.getGenericFeeOverTransactionValueErrorMessage(e,o);if(e instanceof g.ErrorWithAmount){const{amount:r,message:t}=e;return`${t} ${r}`}const u=c(e);if(u){const r=u.toLowerCase(),t=Object.keys(s.transactionErrorCodes).find(i=>r===s.transactionErrorCodes[i].toLowerCase());if(t&&t in s.UserFriendlyErrorCodes)return s.UserFriendlyErrorCodes[t];const a=Object.entries(s.transactionErrorCodes).find(([i,d])=>r.includes(d.toLowerCase()));if(a)return s.UserFriendlyErrorCodes[a[0]]??a[1]}return o?p(o):s.transactionErrorCodes.UNKNOWN};exports.extractMessage=c;exports.getErrorMessage=C;
|