@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
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
import "ethers";
|
|
2
2
|
import "circomlibjs-hinkal-fork";
|
|
3
|
+
import "../error-handling/error-codes.constants.mjs";
|
|
4
|
+
import "../data-structures/crypto-keys/keys.mjs";
|
|
3
5
|
import "libsodium-wrappers";
|
|
4
6
|
import { Hinkal as p } from "../data-structures/Hinkal/Hinkal.mjs";
|
|
5
7
|
import "../constants/chains.constants.mjs";
|
|
6
8
|
import "../types/circom-data.types.mjs";
|
|
9
|
+
import "../constants/vite.constants.mjs";
|
|
7
10
|
import "../types/transactions.types.mjs";
|
|
8
11
|
import "../types/curve.types.mjs";
|
|
9
|
-
import "../
|
|
10
|
-
import "../constants/
|
|
12
|
+
import "../types/activities.types.mjs";
|
|
13
|
+
import "../constants/token-data/index.mjs";
|
|
11
14
|
import "axios";
|
|
12
|
-
import "../
|
|
15
|
+
import { preProcessing as m } from "../crypto/preProcessing.mjs";
|
|
16
|
+
import "../constants/reorg-depths.constants.mjs";
|
|
17
|
+
import "../functions/utils/external-action.utils.mjs";
|
|
18
|
+
import "node-forge";
|
|
19
|
+
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
13
20
|
import "../constants/contracts.constants.mjs";
|
|
21
|
+
import "idb-keyval";
|
|
22
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
14
23
|
import "../constants/kyc.constants.mjs";
|
|
24
|
+
import "../constants/coingecko.constants.mjs";
|
|
15
25
|
import "../constants/axelar.constants.mjs";
|
|
16
26
|
import "../constants/rewards.constants.mjs";
|
|
17
|
-
import "../constants/
|
|
18
|
-
import
|
|
19
|
-
import "../functions/utils/
|
|
20
|
-
import "../functions/web3/events/getShieldedBalance.mjs";
|
|
27
|
+
import "../constants/addresses.constants.mjs";
|
|
28
|
+
import "../constants/token.limits.constants.mjs";
|
|
29
|
+
import "../functions/utils/userAgent.mjs";
|
|
21
30
|
import "../data-structures/volatile-helper/VolatileHelper.mjs";
|
|
22
|
-
import "idb-keyval";
|
|
23
31
|
import { wagmiProviderAdapter as r } from "./WagmiProviderAdapter.mjs";
|
|
24
|
-
const
|
|
32
|
+
const F = async (t, o) => {
|
|
25
33
|
await m();
|
|
26
34
|
const i = new p();
|
|
27
35
|
return r.initConfig(o), await i.initProviderAdapter(t, r), await i.initUserKeys(), await i.resetMerkle(), i;
|
|
28
36
|
};
|
|
29
37
|
export {
|
|
30
|
-
|
|
38
|
+
F as prepareWagmiHinkal
|
|
31
39
|
};
|
package/types/API.types.d.ts
CHANGED
|
@@ -21,3 +21,24 @@ export interface LeaderBoardItem {
|
|
|
21
21
|
export interface LeaderboardEntry extends LeaderBoardItem {
|
|
22
22
|
position: number;
|
|
23
23
|
}
|
|
24
|
+
interface AssetChange {
|
|
25
|
+
type: string;
|
|
26
|
+
amount: string | null;
|
|
27
|
+
raw_amount: string;
|
|
28
|
+
dollar_value: string;
|
|
29
|
+
from: string;
|
|
30
|
+
to: string;
|
|
31
|
+
token_info: {
|
|
32
|
+
standard: string;
|
|
33
|
+
type: string;
|
|
34
|
+
contract_address: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export type AssetChanges = AssetChange[] | null;
|
|
38
|
+
export interface CallInfo<T = bigint> {
|
|
39
|
+
from: string;
|
|
40
|
+
to: string;
|
|
41
|
+
calldata: string;
|
|
42
|
+
value: T;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
package/types/ICacheDevice.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export interface ICacheDevice {
|
|
2
|
-
get(key: string):
|
|
3
|
-
set(key: string, value:
|
|
1
|
+
export interface ICacheDevice<T = string> {
|
|
2
|
+
get(key: string): T | undefined;
|
|
3
|
+
set(key: string, value: T): void;
|
|
4
|
+
serialize(): Record<string, string>;
|
|
4
5
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenChanges } from './token.types';
|
|
2
|
+
import { TxParametersBase } from './wc.types';
|
|
3
|
+
export interface TransactionSimulatorResult<T = bigint> {
|
|
4
|
+
isSameStateChanges: boolean;
|
|
5
|
+
tokenChanges: TokenChanges<T>[];
|
|
6
|
+
}
|
|
7
|
+
export interface ITransactionSimulator {
|
|
8
|
+
isTxStateless(txParameters: TxParametersBase): Promise<TransactionSimulatorResult>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./hinkal.types.cjs");var e=(r=>(r.PENDING="PENDING",r.CONFIRMED="CONFIRMED",r.FAILED="FAILED",r))(e||{}),o=(r=>(r.SHIELD="Deposit",r.SWAP="Swap",r.SEND="Send",r.DAPP_INTERACTION="Dapp Interaction",r.DAPP_INTERACTION_APPROVAL="Dapp Interaction Approval",r.RECIEVE="Shield",r.FUND="Fund",r.UNKNOWN="Unknown Transaction",r))(o||{});const I=[n.IntegrationProvider.UNISWAP,n.IntegrationProvider.ODOS,n.IntegrationProvider.ONEINCH,n.IntegrationProvider.NONE];exports.ActivityStatus=e;exports.ActivityTypes=o;exports.DexProviders=I;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { IntegrationProvider } from './hinkal.types';
|
|
2
|
+
import { ERC20Token } from './token.types';
|
|
3
|
+
import { BigNumber } from 'ethers';
|
|
4
|
+
export declare enum ActivityStatus {
|
|
5
|
+
PENDING = "PENDING",
|
|
6
|
+
CONFIRMED = "CONFIRMED",
|
|
7
|
+
FAILED = "FAILED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ActivityTypes {
|
|
10
|
+
SHIELD = "Deposit",
|
|
11
|
+
SWAP = "Swap",
|
|
12
|
+
SEND = "Send",
|
|
13
|
+
DAPP_INTERACTION = "Dapp Interaction",
|
|
14
|
+
DAPP_INTERACTION_APPROVAL = "Dapp Interaction Approval",
|
|
15
|
+
RECIEVE = "Shield",
|
|
16
|
+
FUND = "Fund",
|
|
17
|
+
UNKNOWN = "Unknown Transaction"
|
|
18
|
+
}
|
|
19
|
+
export type TokenAmountInfo = {
|
|
20
|
+
token: ERC20Token;
|
|
21
|
+
amount: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const DexProviders: IntegrationProvider[];
|
|
24
|
+
export interface ActivityAddRequest {
|
|
25
|
+
activityType: ActivityTypes;
|
|
26
|
+
from?: string;
|
|
27
|
+
to?: string;
|
|
28
|
+
value?: string;
|
|
29
|
+
status?: ActivityStatus;
|
|
30
|
+
txHash?: string;
|
|
31
|
+
gas?: BigNumber;
|
|
32
|
+
gasPrice?: BigNumber;
|
|
33
|
+
tokensReceive?: TokenAmountInfo[];
|
|
34
|
+
tokensSpend?: TokenAmountInfo[];
|
|
35
|
+
chainId: number;
|
|
36
|
+
ownerPublicAddress?: string;
|
|
37
|
+
activityIcon?: string;
|
|
38
|
+
dappUrl?: string;
|
|
39
|
+
integrationProvider?: IntegrationProvider;
|
|
40
|
+
}
|
|
41
|
+
export interface Activity extends ActivityAddRequest {
|
|
42
|
+
id: string;
|
|
43
|
+
timestamp: Date;
|
|
44
|
+
status: ActivityStatus;
|
|
45
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IntegrationProvider as r } from "./hinkal.types.mjs";
|
|
2
|
+
var I = /* @__PURE__ */ ((N) => (N.PENDING = "PENDING", N.CONFIRMED = "CONFIRMED", N.FAILED = "FAILED", N))(I || {}), n = /* @__PURE__ */ ((N) => (N.SHIELD = "Deposit", N.SWAP = "Swap", N.SEND = "Send", N.DAPP_INTERACTION = "Dapp Interaction", N.DAPP_INTERACTION_APPROVAL = "Dapp Interaction Approval", N.RECIEVE = "Shield", N.FUND = "Fund", N.UNKNOWN = "Unknown Transaction", N))(n || {});
|
|
3
|
+
const E = [
|
|
4
|
+
r.UNISWAP,
|
|
5
|
+
r.ODOS,
|
|
6
|
+
r.ONEINCH,
|
|
7
|
+
r.NONE
|
|
8
|
+
];
|
|
9
|
+
export {
|
|
10
|
+
I as ActivityStatus,
|
|
11
|
+
n as ActivityTypes,
|
|
12
|
+
E as DexProviders
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(r=>(r.OnlyCache="ONLY_CACHE",r.Fresh="FRESH",r.FreshWithoutLoader="FRESH_WITHOUT_LOADER",r))(e||{});exports.PrivateBalanceUpdateType=e;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UserKeys } from '../data-structures/crypto-keys/keys';
|
|
2
|
+
export declare enum PrivateBalanceUpdateType {
|
|
3
|
+
OnlyCache = "ONLY_CACHE",
|
|
4
|
+
Fresh = "FRESH",
|
|
5
|
+
FreshWithoutLoader = "FRESH_WITHOUT_LOADER"
|
|
6
|
+
}
|
|
7
|
+
export interface BalanceChangeState {
|
|
8
|
+
chainId?: number;
|
|
9
|
+
ethereumAddress?: string;
|
|
10
|
+
userKeys?: UserKeys;
|
|
11
|
+
}
|
|
12
|
+
export type PrivateBalanceUpdateEventType = {
|
|
13
|
+
updateType?: PrivateBalanceUpdateType;
|
|
14
|
+
resetCacheBefore?: boolean;
|
|
15
|
+
balanceChangeState?: BalanceChangeState;
|
|
16
|
+
updateTokensListBefore?: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _=(E=>(E.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT="userAnalyticsConsentPref",E.PASSWORD_HASH="passwordHash",E.SELECTED_NETWORK_CHAIN_ID="selectedNetworkChainId",E.LAST_ADDRESS="lastAddress",E.AUTO_LOCK_TIME="autoLockTime",E.TOKEN_REGISTRY="tokenRegistry",E.IS_BALANCE_HIDDEN="isBalanceHidden",E.SANDBOX_TRANSACTION_STATUS="sandboxTransactionStatus",E.SELECTED_SUB_ACCOUNT_ADDRESS="selectedSubAccountAddress",E.GENERATE_PROOF_REMOTELY="generateProofRemotely",E.IS_RELAYER_OFF="isRelayerOff",E.ONBOARDING_SHOWN="onboardingShown",E.STARRED_PENDLE_MARKETS="starredPendleMarkets",E.STARRED_PENDLE_POOLS="starredPendlePools",E.CONNECT_WITH_HINKAL="connectWithHinkal",E.GAS_COST_TOKEN="gasCostToken",E.PRIVATE_TOKENS="privateTokens",E.PUBLIC_TOKENS="publicTokens",E.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS="publicTokensLastProcessedBlocks",E.ACCEPTED_TERMS_OF_SERVICES="acceptedTermsOfServices",E.SLIPPAGE_PERCENTAGE="slippagePercentage",E.IS_SLIPPAGE_PERCENTAGE_CUSTOM="isSlippagePercentageCustom",E.MNEMONIC_PHRASE="mnemonicPhrase",E.SOURCE_MNEMONIC_PHRASE="sourceMnemonicPhrase",E.SELECTED_WALLET_ENVIRONMENT="selectedWalletEnvironment",E))(_||{});exports.StorageKeys=_;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum StorageKeys {
|
|
2
|
+
LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref",
|
|
3
|
+
PASSWORD_HASH = "passwordHash",
|
|
4
|
+
SELECTED_NETWORK_CHAIN_ID = "selectedNetworkChainId",
|
|
5
|
+
LAST_ADDRESS = "lastAddress",
|
|
6
|
+
AUTO_LOCK_TIME = "autoLockTime",
|
|
7
|
+
TOKEN_REGISTRY = "tokenRegistry",
|
|
8
|
+
IS_BALANCE_HIDDEN = "isBalanceHidden",
|
|
9
|
+
SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus",
|
|
10
|
+
SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress",
|
|
11
|
+
GENERATE_PROOF_REMOTELY = "generateProofRemotely",
|
|
12
|
+
IS_RELAYER_OFF = "isRelayerOff",
|
|
13
|
+
ONBOARDING_SHOWN = "onboardingShown",
|
|
14
|
+
STARRED_PENDLE_MARKETS = "starredPendleMarkets",
|
|
15
|
+
STARRED_PENDLE_POOLS = "starredPendlePools",
|
|
16
|
+
CONNECT_WITH_HINKAL = "connectWithHinkal",
|
|
17
|
+
GAS_COST_TOKEN = "gasCostToken",
|
|
18
|
+
PRIVATE_TOKENS = "privateTokens",
|
|
19
|
+
PUBLIC_TOKENS = "publicTokens",
|
|
20
|
+
PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks",
|
|
21
|
+
ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices",
|
|
22
|
+
SLIPPAGE_PERCENTAGE = "slippagePercentage",
|
|
23
|
+
IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom",
|
|
24
|
+
MNEMONIC_PHRASE = "mnemonicPhrase",
|
|
25
|
+
SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase",
|
|
26
|
+
SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment"
|
|
27
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var _ = /* @__PURE__ */ ((E) => (E.LOCAL_STORAGE_KEY_USER_ANALYTICS_CONSENT = "userAnalyticsConsentPref", E.PASSWORD_HASH = "passwordHash", E.SELECTED_NETWORK_CHAIN_ID = "selectedNetworkChainId", E.LAST_ADDRESS = "lastAddress", E.AUTO_LOCK_TIME = "autoLockTime", E.TOKEN_REGISTRY = "tokenRegistry", E.IS_BALANCE_HIDDEN = "isBalanceHidden", E.SANDBOX_TRANSACTION_STATUS = "sandboxTransactionStatus", E.SELECTED_SUB_ACCOUNT_ADDRESS = "selectedSubAccountAddress", E.GENERATE_PROOF_REMOTELY = "generateProofRemotely", E.IS_RELAYER_OFF = "isRelayerOff", E.ONBOARDING_SHOWN = "onboardingShown", E.STARRED_PENDLE_MARKETS = "starredPendleMarkets", E.STARRED_PENDLE_POOLS = "starredPendlePools", E.CONNECT_WITH_HINKAL = "connectWithHinkal", E.GAS_COST_TOKEN = "gasCostToken", E.PRIVATE_TOKENS = "privateTokens", E.PUBLIC_TOKENS = "publicTokens", E.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS = "publicTokensLastProcessedBlocks", E.ACCEPTED_TERMS_OF_SERVICES = "acceptedTermsOfServices", E.SLIPPAGE_PERCENTAGE = "slippagePercentage", E.IS_SLIPPAGE_PERCENTAGE_CUSTOM = "isSlippagePercentageCustom", E.MNEMONIC_PHRASE = "mnemonicPhrase", E.SOURCE_MNEMONIC_PHRASE = "sourceMnemonicPhrase", E.SELECTED_WALLET_ENVIRONMENT = "selectedWalletEnvironment", E))(_ || {});
|
|
2
|
+
export {
|
|
3
|
+
_ as StorageKeys
|
|
4
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SignatureData } from './crypto.types';
|
|
2
|
+
import { FeeStructure, HinkalLogicArgs } from './hinkal.types';
|
|
3
|
+
export interface CircomDataBaseType {
|
|
2
4
|
rootHashHinkal: bigint | undefined;
|
|
3
5
|
erc20TokenAddresses: string[];
|
|
4
6
|
tokenIds: string[];
|
|
@@ -6,7 +8,6 @@ export type CircomDataType = {
|
|
|
6
8
|
inputNullifiers: string[][];
|
|
7
9
|
outCommitments: string[][];
|
|
8
10
|
encryptedOutputs: string[][];
|
|
9
|
-
flatFees: bigint[];
|
|
10
11
|
timeStamp?: string;
|
|
11
12
|
stealthAddressStructure: StealthAddressStructure;
|
|
12
13
|
rootHashAccessToken: bigint | undefined;
|
|
@@ -17,16 +18,26 @@ export type CircomDataType = {
|
|
|
17
18
|
hookData: HookDataType;
|
|
18
19
|
calldataHash: bigint;
|
|
19
20
|
publicSignalCount: number;
|
|
20
|
-
}
|
|
21
|
-
export
|
|
21
|
+
}
|
|
22
|
+
export interface CircomDataV1 extends CircomDataBaseType {
|
|
23
|
+
flatFees: bigint[];
|
|
24
|
+
}
|
|
25
|
+
export interface CircomDataV1x1 extends CircomDataBaseType {
|
|
26
|
+
onChainCreation: boolean[];
|
|
27
|
+
slippageValues: bigint[];
|
|
28
|
+
hinkalLogicArgs: HinkalLogicArgs;
|
|
29
|
+
feeStructure: FeeStructure;
|
|
30
|
+
signatureData: SignatureData;
|
|
31
|
+
originalSender: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CircomDataBaseJsonType {
|
|
22
34
|
rootHashHinkal: bigint | undefined | string;
|
|
23
35
|
erc20TokenAddresses: string[];
|
|
24
36
|
tokenIds: string[];
|
|
37
|
+
amountChanges: bigint[] | string[];
|
|
25
38
|
inputNullifiers: string[][];
|
|
26
39
|
outCommitments: string[][];
|
|
27
40
|
encryptedOutputs: string[][];
|
|
28
|
-
flatFees: bigint[] | string[];
|
|
29
|
-
amountChanges: bigint[] | string[];
|
|
30
41
|
stealthAddressStructure: StealthAddressStructure<bigint | string>;
|
|
31
42
|
timeStamp?: string;
|
|
32
43
|
rootHashAccessToken: bigint | undefined | string;
|
|
@@ -37,7 +48,16 @@ export type CircomDataJsonType = {
|
|
|
37
48
|
hookData: HookDataType;
|
|
38
49
|
calldataHash: bigint | string;
|
|
39
50
|
publicSignalCount: number;
|
|
40
|
-
}
|
|
51
|
+
}
|
|
52
|
+
export interface CircomDataBaseJsonV1 extends CircomDataBaseJsonType {
|
|
53
|
+
flatFees: bigint[] | string[];
|
|
54
|
+
}
|
|
55
|
+
export interface CircomDataBaseJsonV1x1 extends CircomDataBaseJsonType {
|
|
56
|
+
onChainCreation: boolean[] | string[];
|
|
57
|
+
slippageValues: bigint[] | string[];
|
|
58
|
+
hinkalLogicArgs: HinkalLogicArgs<bigint | string>;
|
|
59
|
+
feeStructure: FeeStructure<bigint | string>;
|
|
60
|
+
}
|
|
41
61
|
export type DimDataType = {
|
|
42
62
|
tokenNumber: number;
|
|
43
63
|
nullifierAmount: number;
|
|
@@ -61,9 +81,9 @@ export declare const emptyStealthAddressStructure: {
|
|
|
61
81
|
H0: string;
|
|
62
82
|
H1: string;
|
|
63
83
|
};
|
|
64
|
-
export interface TransactParams {
|
|
84
|
+
export interface TransactParams<CircomType = CircomDataBaseJsonV1x1> {
|
|
65
85
|
dimensions: DimDataType;
|
|
66
|
-
circomData:
|
|
86
|
+
circomData: CircomType;
|
|
67
87
|
}
|
|
68
88
|
export declare const defaultHookData: HookDataType;
|
|
69
89
|
export declare const defaultHookDataArray: string[];
|
package/types/crypto.types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var l=(e=>(e[e.HinkalContract=0]="HinkalContract",e[e.HinkalHelperContract=1]="HinkalHelperContract",e[e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var l=(e=>(e[e.HinkalContract=0]="HinkalContract",e[e.HinkalHelperContract=1]="HinkalHelperContract",e[e.AccessTokenContract=2]="AccessTokenContract",e[e.UniswapV3FactoryContract=3]="UniswapV3FactoryContract",e[e.UniswapV3PoolContract=4]="UniswapV3PoolContract",e[e.UniswapV3QuoterContract=5]="UniswapV3QuoterContract",e[e.ERC20Contract=6]="ERC20Contract",e[e.WATokenContract=7]="WATokenContract",e[e.OneInchExternalActionContract=8]="OneInchExternalActionContract",e[e.MerkleTreeContract=9]="MerkleTreeContract",e[e.ContractWithNonces=10]="ContractWithNonces",e[e.PermitterContract=11]="PermitterContract",e[e.CurveWrappedMainPool=12]="CurveWrappedMainPool",e[e.CurveReadingWrapper=13]="CurveReadingWrapper",e[e.CurvePoolLPTokenAmountCalculator2=14]="CurvePoolLPTokenAmountCalculator2",e[e.CurvePoolLPTokenAmountCalculator3=15]="CurvePoolLPTokenAmountCalculator3",e[e.CurvePoolLPTokenAmountCalculator4=16]="CurvePoolLPTokenAmountCalculator4",e[e.CurvePoolLPTokenAmountCalculatorDynamic=17]="CurvePoolLPTokenAmountCalculatorDynamic",e[e.CurvePoolLPTokenAmountCalculator2OneArg=18]="CurvePoolLPTokenAmountCalculator2OneArg",e[e.CurvePoolLPTokenAmountCalculator3OneArg=19]="CurvePoolLPTokenAmountCalculator3OneArg",e[e.CurvePoolLPTokenAmountCalculator4OneArg=20]="CurvePoolLPTokenAmountCalculator4OneArg",e[e.CurvePoolWithIntCoins=21]="CurvePoolWithIntCoins",e[e.CurveExternalAction=22]="CurveExternalAction",e[e.WrappedStakedCurveLp=23]="WrappedStakedCurveLp",e[e.WrappedStakedRewardsCurveLp=24]="WrappedStakedRewardsCurveLp",e[e.CurveGauge=25]="CurveGauge",e[e.ConvexBooster=26]="ConvexBooster",e[e.ConvexBoosterMainnet=27]="ConvexBoosterMainnet",e[e.ConvexRewardPool=28]="ConvexRewardPool",e[e.ConvexCvxLocker=29]="ConvexCvxLocker",e[e.ConvexStakePool=30]="ConvexStakePool",e[e.ConvexCvxCRVWrapper=31]="ConvexCvxCRVWrapper",e[e.ConvexCxvCrvUtillities=32]="ConvexCxvCrvUtillities",e[e.ConvexExternalAction=33]="ConvexExternalAction",e[e.WrappedStakedConvexLp=34]="WrappedStakedConvexLp",e[e.CurvePoolWithIntBalances=35]="CurvePoolWithIntBalances",e[e.CurveZaps=36]="CurveZaps",e[e.BeefyVault=37]="BeefyVault",e[e.BeefyZap=38]="BeefyZap",e[e.BeefyRouter=39]="BeefyRouter",e[e.BeefyZapOneInch=40]="BeefyZapOneInch",e[e.BeefyExternalAction=41]="BeefyExternalAction",e[e.BeefyStakeExternalAction=42]="BeefyStakeExternalAction",e[e.BeefyStrategy=43]="BeefyStrategy",e[e.WrappedStakedBeefyLp=44]="WrappedStakedBeefyLp",e[e.UniswapV2PoolContract=45]="UniswapV2PoolContract",e[e.LidoWstEther=46]="LidoWstEther",e[e.LidoStEther=47]="LidoStEther",e[e.LidoStMatic=48]="LidoStMatic",e[e.LidoWithdrawalQueueERC721=49]="LidoWithdrawalQueueERC721",e[e.LidoStakeManager=50]="LidoStakeManager",e[e.PoLidoNFT=51]="PoLidoNFT",e[e.PendleGeneralExternalAction=52]="PendleGeneralExternalAction",e[e.PendleRouter=53]="PendleRouter",e[e.WstPendleLPToken=54]="WstPendleLPToken",e[e.WstYtToken=55]="WstYtToken",e[e.VolatileVault=56]="VolatileVault",e[e.VolatileTokenAction=57]="VolatileTokenAction",e[e.HinkalWrapper=58]="HinkalWrapper",e[e.HinkalWrapper2=59]="HinkalWrapper2",e[e.HinkalStakeExternalAction=60]="HinkalStakeExternalAction",e[e.HToken=61]="HToken",e[e.HinkalWalletFactory=62]="HinkalWalletFactory",e))(l||{});exports.ContractType=l;
|
|
@@ -6,7 +6,7 @@ export type ContractMetadata = {
|
|
|
6
6
|
export declare enum ContractType {
|
|
7
7
|
HinkalContract = 0,
|
|
8
8
|
HinkalHelperContract = 1,
|
|
9
|
-
|
|
9
|
+
AccessTokenContract = 2,
|
|
10
10
|
UniswapV3FactoryContract = 3,
|
|
11
11
|
UniswapV3PoolContract = 4,
|
|
12
12
|
UniswapV3QuoterContract = 5,
|
|
@@ -65,15 +65,20 @@ export declare enum ContractType {
|
|
|
65
65
|
HinkalWrapper = 58,
|
|
66
66
|
HinkalWrapper2 = 59,
|
|
67
67
|
HinkalStakeExternalAction = 60,
|
|
68
|
-
HToken = 61
|
|
68
|
+
HToken = 61,
|
|
69
|
+
HinkalWalletFactory = 62
|
|
69
70
|
}
|
|
70
71
|
export interface ContractData {
|
|
71
72
|
hinkalAddress: string;
|
|
72
73
|
hinkalABI: ContractInterface;
|
|
73
74
|
hinkalHelperAddress?: string;
|
|
74
75
|
hinkalHelperABI?: ContractInterface;
|
|
76
|
+
accessTokenAddress?: string;
|
|
77
|
+
accessTokenABI?: ContractInterface;
|
|
75
78
|
crossChainAccessTokenAddress?: string;
|
|
76
79
|
crossChainAccessTokenABI?: ContractInterface;
|
|
80
|
+
crossChainAccessTokenManagerAddress?: string;
|
|
81
|
+
crossChainAccessTokenManagerABI?: ContractInterface;
|
|
77
82
|
permitterAddress?: string;
|
|
78
83
|
permitterABI?: ContractInterface;
|
|
79
84
|
uniswapExternalActionAddress?: string;
|
|
@@ -122,6 +127,7 @@ export interface ContractData {
|
|
|
122
127
|
emporiumAddress?: string;
|
|
123
128
|
hinkalWalletFactoryAddress?: string;
|
|
124
129
|
hinkalWalletBeaconAddress?: string;
|
|
130
|
+
hinkalWalletFactoryABI?: ContractInterface;
|
|
125
131
|
}
|
|
126
132
|
export interface EthereumNetwork {
|
|
127
133
|
name: string;
|
|
@@ -134,7 +140,6 @@ export interface EthereumNetwork {
|
|
|
134
140
|
supported?: boolean;
|
|
135
141
|
quoterV2Address?: string;
|
|
136
142
|
uniswapV3FactoryAddress?: string;
|
|
137
|
-
accessTokenMintingFee?: string;
|
|
138
143
|
pollingInterval?: number;
|
|
139
144
|
gasStationUrl?: string;
|
|
140
145
|
priority?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var l = /* @__PURE__ */ ((e) => (e[e.HinkalContract = 0] = "HinkalContract", e[e.HinkalHelperContract = 1] = "HinkalHelperContract", e[e.
|
|
1
|
+
var l = /* @__PURE__ */ ((e) => (e[e.HinkalContract = 0] = "HinkalContract", e[e.HinkalHelperContract = 1] = "HinkalHelperContract", e[e.AccessTokenContract = 2] = "AccessTokenContract", e[e.UniswapV3FactoryContract = 3] = "UniswapV3FactoryContract", e[e.UniswapV3PoolContract = 4] = "UniswapV3PoolContract", e[e.UniswapV3QuoterContract = 5] = "UniswapV3QuoterContract", e[e.ERC20Contract = 6] = "ERC20Contract", e[e.WATokenContract = 7] = "WATokenContract", e[e.OneInchExternalActionContract = 8] = "OneInchExternalActionContract", e[e.MerkleTreeContract = 9] = "MerkleTreeContract", e[e.ContractWithNonces = 10] = "ContractWithNonces", e[e.PermitterContract = 11] = "PermitterContract", e[e.CurveWrappedMainPool = 12] = "CurveWrappedMainPool", e[e.CurveReadingWrapper = 13] = "CurveReadingWrapper", e[e.CurvePoolLPTokenAmountCalculator2 = 14] = "CurvePoolLPTokenAmountCalculator2", e[e.CurvePoolLPTokenAmountCalculator3 = 15] = "CurvePoolLPTokenAmountCalculator3", e[e.CurvePoolLPTokenAmountCalculator4 = 16] = "CurvePoolLPTokenAmountCalculator4", e[e.CurvePoolLPTokenAmountCalculatorDynamic = 17] = "CurvePoolLPTokenAmountCalculatorDynamic", e[e.CurvePoolLPTokenAmountCalculator2OneArg = 18] = "CurvePoolLPTokenAmountCalculator2OneArg", e[e.CurvePoolLPTokenAmountCalculator3OneArg = 19] = "CurvePoolLPTokenAmountCalculator3OneArg", e[e.CurvePoolLPTokenAmountCalculator4OneArg = 20] = "CurvePoolLPTokenAmountCalculator4OneArg", e[e.CurvePoolWithIntCoins = 21] = "CurvePoolWithIntCoins", e[e.CurveExternalAction = 22] = "CurveExternalAction", e[e.WrappedStakedCurveLp = 23] = "WrappedStakedCurveLp", e[e.WrappedStakedRewardsCurveLp = 24] = "WrappedStakedRewardsCurveLp", e[e.CurveGauge = 25] = "CurveGauge", e[e.ConvexBooster = 26] = "ConvexBooster", e[e.ConvexBoosterMainnet = 27] = "ConvexBoosterMainnet", e[e.ConvexRewardPool = 28] = "ConvexRewardPool", e[e.ConvexCvxLocker = 29] = "ConvexCvxLocker", e[e.ConvexStakePool = 30] = "ConvexStakePool", e[e.ConvexCvxCRVWrapper = 31] = "ConvexCvxCRVWrapper", e[e.ConvexCxvCrvUtillities = 32] = "ConvexCxvCrvUtillities", e[e.ConvexExternalAction = 33] = "ConvexExternalAction", e[e.WrappedStakedConvexLp = 34] = "WrappedStakedConvexLp", e[e.CurvePoolWithIntBalances = 35] = "CurvePoolWithIntBalances", e[e.CurveZaps = 36] = "CurveZaps", e[e.BeefyVault = 37] = "BeefyVault", e[e.BeefyZap = 38] = "BeefyZap", e[e.BeefyRouter = 39] = "BeefyRouter", e[e.BeefyZapOneInch = 40] = "BeefyZapOneInch", e[e.BeefyExternalAction = 41] = "BeefyExternalAction", e[e.BeefyStakeExternalAction = 42] = "BeefyStakeExternalAction", e[e.BeefyStrategy = 43] = "BeefyStrategy", e[e.WrappedStakedBeefyLp = 44] = "WrappedStakedBeefyLp", e[e.UniswapV2PoolContract = 45] = "UniswapV2PoolContract", e[e.LidoWstEther = 46] = "LidoWstEther", e[e.LidoStEther = 47] = "LidoStEther", e[e.LidoStMatic = 48] = "LidoStMatic", e[e.LidoWithdrawalQueueERC721 = 49] = "LidoWithdrawalQueueERC721", e[e.LidoStakeManager = 50] = "LidoStakeManager", e[e.PoLidoNFT = 51] = "PoLidoNFT", e[e.PendleGeneralExternalAction = 52] = "PendleGeneralExternalAction", e[e.PendleRouter = 53] = "PendleRouter", e[e.WstPendleLPToken = 54] = "WstPendleLPToken", e[e.WstYtToken = 55] = "WstYtToken", e[e.VolatileVault = 56] = "VolatileVault", e[e.VolatileTokenAction = 57] = "VolatileTokenAction", e[e.HinkalWrapper = 58] = "HinkalWrapper", e[e.HinkalWrapper2 = 59] = "HinkalWrapper2", e[e.HinkalStakeExternalAction = 60] = "HinkalStakeExternalAction", e[e.HToken = 61] = "HToken", e[e.HinkalWalletFactory = 62] = "HinkalWalletFactory", e))(l || {});
|
|
2
2
|
export {
|
|
3
3
|
l as ContractType
|
|
4
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var C=(e=>(e.Transact="Transact",e.Uniswap="Uniswap",e.Odos="Odos",e.OneInch="OneInch",e.Curve="Curve",e.CurveDynamic="CurveDynamic",e.CurveCRV="CurveCRV",e.CurveCRVRewards="CurveCRVRewards",e.Convex="Convex",e.Beefy="Beefy",e.BeefyStake="BeefyStake",e.Volatile="Volatile",e.LidoETH="LidoETH",e.LidoMATIC="LidoMATIC",e.LidoETHNFT="LidoETHNFT",e.LidoMATICNFT="LidoMATICNFT",e.Pendle="Pendle",e.PendleLP="PendleLP",e.HinkalStake="HinkalStake",e.Connext="Connext",e.Emporium="Emporium",e))(C||{});exports.ExternalActionId=C;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var C=(e=>(e.Transact="Transact",e.Uniswap="Uniswap",e.Odos="Odos",e.OneInch="OneInch",e.Curve="Curve",e.CurveDynamic="CurveDynamic",e.CurveCRV="CurveCRV",e.CurveCRVRewards="CurveCRVRewards",e.Convex="Convex",e.Beefy="Beefy",e.BeefyStake="BeefyStake",e.Volatile="Volatile",e.LidoETH="LidoETH",e.LidoMATIC="LidoMATIC",e.LidoETHNFT="LidoETHNFT",e.LidoMATICNFT="LidoMATICNFT",e.Pendle="Pendle",e.PendleLP="PendleLP",e.HinkalStake="HinkalStake",e.Connext="Connext",e.Emporium="Emporium",e.Wallet="Wallet",e))(C||{});exports.ExternalActionId=C;
|
|
@@ -19,7 +19,8 @@ export declare enum ExternalActionId {
|
|
|
19
19
|
PendleLP = "PendleLP",
|
|
20
20
|
HinkalStake = "HinkalStake",
|
|
21
21
|
Connext = "Connext",
|
|
22
|
-
Emporium = "Emporium"
|
|
22
|
+
Emporium = "Emporium",
|
|
23
|
+
Wallet = "Wallet"
|
|
23
24
|
}
|
|
24
25
|
export interface ExternalActionData {
|
|
25
26
|
externalActionId: 0n | ExternalActionId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var C = /* @__PURE__ */ ((e) => (e.Transact = "Transact", e.Uniswap = "Uniswap", e.Odos = "Odos", e.OneInch = "OneInch", e.Curve = "Curve", e.CurveDynamic = "CurveDynamic", e.CurveCRV = "CurveCRV", e.CurveCRVRewards = "CurveCRVRewards", e.Convex = "Convex", e.Beefy = "Beefy", e.BeefyStake = "BeefyStake", e.Volatile = "Volatile", e.LidoETH = "LidoETH", e.LidoMATIC = "LidoMATIC", e.LidoETHNFT = "LidoETHNFT", e.LidoMATICNFT = "LidoMATICNFT", e.Pendle = "Pendle", e.PendleLP = "PendleLP", e.HinkalStake = "HinkalStake", e.Connext = "Connext", e.Emporium = "Emporium", e))(C || {});
|
|
1
|
+
var C = /* @__PURE__ */ ((e) => (e.Transact = "Transact", e.Uniswap = "Uniswap", e.Odos = "Odos", e.OneInch = "OneInch", e.Curve = "Curve", e.CurveDynamic = "CurveDynamic", e.CurveCRV = "CurveCRV", e.CurveCRVRewards = "CurveCRVRewards", e.Convex = "Convex", e.Beefy = "Beefy", e.BeefyStake = "BeefyStake", e.Volatile = "Volatile", e.LidoETH = "LidoETH", e.LidoMATIC = "LidoMATIC", e.LidoETHNFT = "LidoETHNFT", e.LidoMATICNFT = "LidoMATICNFT", e.Pendle = "Pendle", e.PendleLP = "PendleLP", e.HinkalStake = "HinkalStake", e.Connext = "Connext", e.Emporium = "Emporium", e.Wallet = "Wallet", e))(C || {});
|
|
2
2
|
export {
|
|
3
3
|
C as ExternalActionId
|
|
4
4
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ERC20Token } from './token.types';
|
|
2
|
+
export interface MinimalFeeInfo {
|
|
3
|
+
flatFees: bigint[];
|
|
4
|
+
feeUnit: ERC20Token | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface FeeInfo extends MinimalFeeInfo {
|
|
7
|
+
priceOfTransactionInToken: bigint | undefined;
|
|
8
|
+
priceOfTransactionInUSD: number | undefined;
|
|
9
|
+
}
|
package/types/hinkal.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(a=>(a.BalanceChange="BalanceChange",a.NetworkChange="NetworkChange",a.KycNeeded="KycNeeded",a.AccountChanged="AccountChanged",a.ShowConnect="ShowConnect",a.ShowNetworkPopup="ShowNetworkPopup",a.MerkleTreeUpdated="MerkleTreeUpdated",a.MerkleTreeResetStarted="MerkleTreeResetStarted",a.MerkleTreeResetFinished="MerkleTreeResetFinished",a))(E||{}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../constants/conversion.constants.cjs"),R=require("../constants/fees.constants.cjs"),e=require("../constants/protocol.constants.cjs");var E=(a=>(a.BalanceChange="BalanceChange",a.NetworkChange="NetworkChange",a.KycNeeded="KycNeeded",a.AccountChanged="AccountChanged",a.ShowConnect="ShowConnect",a.ShowNetworkPopup="ShowNetworkPopup",a.MerkleTreeUpdated="MerkleTreeUpdated",a.MerkleTreeResetStarted="MerkleTreeResetStarted",a.MerkleTreeResetFinished="MerkleTreeResetFinished",a))(E||{}),s=(a=>(a[a.UNISWAP=1]="UNISWAP",a[a.ODOS=2]="ODOS",a[a.ONEINCH=3]="ONEINCH",a[a.PENDLE=4]="PENDLE",a[a.ALL=5]="ALL",a[a.NONE=6]="NONE",a))(s||{}),S=(a=>(a[a.CurveAavePool=0]="CurveAavePool",a))(S||{}),D=(a=>(a[a.Deposit=0]="Deposit",a[a.WithdrawInt=11]="WithdrawInt",a[a.WithdrawUint=12]="WithdrawUint",a[a.WithdrawImbalance=13]="WithdrawImbalance",a[a.Stake=2]="Stake",a[a.Unstake=3]="Unstake",a[a.GetCRV=4]="GetCRV",a))(D||{}),_=(a=>(a[a.StakeLP=0]="StakeLP",a[a.UnStakeLP=1]="UnStakeLP",a[a.ClaimRewardsLP=2]="ClaimRewardsLP",a))(_||{}),h=(a=>(a[a.Deposit=0]="Deposit",a[a.DepositRegular=1]="DepositRegular",a[a.DepositOneInchSingle=2]="DepositOneInchSingle",a[a.DepositOneInchUniswap=3]="DepositOneInchUniswap",a[a.DepositOneInchSolidly=4]="DepositOneInchSolidly",a[a.Withdraw=5]="Withdraw",a[a.WithdrawRegular=6]="WithdrawRegular",a[a.WithdrawOneInchSingle=7]="WithdrawOneInchSingle",a[a.WithdrawOneInchUniswapAndSolidly=8]="WithdrawOneInchUniswapAndSolidly",a[a.WithdrawBoth=9]="WithdrawBoth",a[a.Stake=10]="Stake",a[a.Unstake=11]="Unstake",a[a.GetRewards=12]="GetRewards",a))(h||{}),t=(a=>(a.Ethereum="Ethereum",a.Polygon="Polygon",a))(t||{}),L=(a=>(a[a.Stake=0]="Stake",a[a.Request=1]="Request",a[a.Claim=2]="Claim",a))(L||{}),p=(a=>(a[a.Deposit=0]="Deposit",a[a.Withdraw=1]="Withdraw",a[a.SwapFromYt=2]="SwapFromYt",a[a.SwapToYt=3]="SwapToYt",a[a.SwapPt=4]="SwapPt",a[a.Mint=5]="Mint",a[a.Redeem=6]="Redeem",a[a.Checkpoint=7]="Checkpoint",a[a.PoolRemove=8]="PoolRemove",a))(p||{}),W=(a=>(a[a.AddOrRemoveLiquidity=0]="AddOrRemoveLiquidity",a[a.Checkpoint=1]="Checkpoint",a[a.Invalid=99]="Invalid",a))(W||{}),U=(a=>(a[a.Persist=0]="Persist",a[a.Deposit=1]="Deposit",a[a.Withdraw=2]="Withdraw",a[a.Swap=3]="Swap",a))(U||{}),w=(a=>(a[a.DepositOrStake=0]="DepositOrStake",a[a.Unstake=1]="Unstake",a))(w||{}),d=(a=>(a.WITHDRAW="WITHDRAW",a.SWAP="SWAP",a.CURVE_DEPOSIT="CURVE_DEPOSIT",a.CURVE_WITHDRAW="CURVE_WITHDRAW",a.CURVE_WITHDRAW_INBALANCED="CURVE_WITHDRAW_INBALANCED",a.STAKING="STAKING",a.UNSTAKING="UNSTAKING",a.CLAIMING="CLAIMING",a.BEEFY="BEEFY",a.BEEFY_STAKE="BEEFY_STAKE",a.BEEFY_UNSTAKE="BEEFY_UNSTAKE",a.BEEFY_GET_REWARDS="BEEFY_GET_REWARDS",a.LIDO_STAKE="LIDO_STAKE",a.LIDO_REQUEST="LIDO_REQUEST",a.LIDO_CLAIM="LIDO_CLAIM",a.PENDLE_TRANSACT="PENDLE_TRANSACT",a.PENDLE_YT_IN_SWAP="PENDLE_YT_IN_SWAP",a.PENDLE_YT_OUT_SWAP="PENDLE_YT_OUT_SWAP",a.PENDLE_PT_SWAP="PENDLE_PT_SWAP",a.PENDLE_MINT="PENDLE_MINT",a.PENDLE_REDEEM="PENDLE_REDEEM",a.PENDLE_CLAIM="PENDLE_CLAIM",a.PENDLE_LP="PENDLE_LP",a.PENDLE_LP_CLAIM="PENDLE_LP_CLAIM",a.VOLATILE_WITHDRAW="VOLATILE_WITHDRAW",a.VOLATILE_SWAP="VOLATILE_SWAP",a.EMPORIUM="EMPORIUM",a.NONE="NONE",a))(d||{}),l=(a=>(a[a.NONE=0]="NONE",a[a.APPROVE=1]="APPROVE",a[a.RELEASE_BUFFER=2]="RELEASE_BUFFER",a[a.EXECUTE=3]="EXECUTE",a))(l||{});const u=(a,r)=>({approvalChanges:Array.from({length:a}).fill(r),externalApprovalAddresses:Array.from({length:a}).fill(e.zeroAddress),conversionInHinkalAddress:Array.from({length:a}).fill(r)}),k=(a,r)=>({hinkalLogicAction:0,inHinkalAddress:r.getInHinkalAddress(e.zeroAddress),executeApprovalChanges:Array.from({length:a}).fill(0n),doPreTxApproval:!1,useApprovalUtxoData:Array.from({length:a}).map(()=>u(P.APPROVED_UTXO_CONVERSION_COUNT,0n)),interactionAddress:e.zeroAddress}),O={feeToken:R.defaultFeeToken,flatFee:0n,variableRate:0n};exports.BeefyAction=h;exports.ConvexAction=_;exports.CurveAction=D;exports.EventType=E;exports.HinkalLogicAction=l;exports.HinkalStakeAction=w;exports.INTERACTION=d;exports.IntegrationProvider=s;exports.LidoAction=L;exports.LidoVariant=t;exports.PendleAction=p;exports.PendleLPAction=W;exports.StakeProvider=S;exports.VolatileAction=U;exports.defaultFeeStructure=O;exports.defaultHinkalLogicArgs=k;exports.defaultUseApprovalUTXOData=u;
|
package/types/hinkal.types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserKeys } from '../data-structures/crypto-keys/keys';
|
|
1
2
|
import { ExternalActionId } from './external-action.types';
|
|
2
3
|
/**
|
|
3
4
|
* Configuration options for the Hinkal system.
|
|
@@ -13,7 +14,15 @@ export type HinkalConfig = {
|
|
|
13
14
|
* Node only.
|
|
14
15
|
*/
|
|
15
16
|
useFileCache?: boolean;
|
|
17
|
+
disableCaching?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Indicator controlling wether the proof should be constructed remotely in secure enclave.
|
|
20
|
+
*/
|
|
21
|
+
generateProofRemotely?: boolean;
|
|
22
|
+
disableMerkleTreeUpdates?: boolean;
|
|
23
|
+
serializedCache?: Record<string, string>;
|
|
16
24
|
};
|
|
25
|
+
export type ProverVersion = 'v1x0' | 'v1x1';
|
|
17
26
|
export declare enum EventType {
|
|
18
27
|
BalanceChange = "BalanceChange",
|
|
19
28
|
NetworkChange = "NetworkChange",
|
|
@@ -138,3 +147,42 @@ export declare enum INTERACTION {
|
|
|
138
147
|
EMPORIUM = "EMPORIUM",
|
|
139
148
|
NONE = "NONE"
|
|
140
149
|
}
|
|
150
|
+
export declare enum HinkalLogicAction {
|
|
151
|
+
NONE = 0,// = 0
|
|
152
|
+
APPROVE = 1,// = 1
|
|
153
|
+
RELEASE_BUFFER = 2,// = 2
|
|
154
|
+
EXECUTE = 3
|
|
155
|
+
}
|
|
156
|
+
export interface UseApprovalUTXOData<T = bigint> {
|
|
157
|
+
approvalChanges: T[];
|
|
158
|
+
externalApprovalAddresses: string[];
|
|
159
|
+
conversionInHinkalAddress: T[];
|
|
160
|
+
}
|
|
161
|
+
export type ApprovedUtxo<T = bigint> = {
|
|
162
|
+
tokenAddress: string;
|
|
163
|
+
amount: T;
|
|
164
|
+
inHinkalAddress: T;
|
|
165
|
+
};
|
|
166
|
+
export type ApprovedUtxoWithInteractionAddress<T = bigint> = ApprovedUtxo<T> & {
|
|
167
|
+
interactionAddress: string;
|
|
168
|
+
};
|
|
169
|
+
export type HinkalLogicArgs<T = bigint> = {
|
|
170
|
+
hinkalLogicAction: HinkalLogicAction;
|
|
171
|
+
executeApprovalChanges: T[];
|
|
172
|
+
doPreTxApproval: boolean;
|
|
173
|
+
inHinkalAddress: T;
|
|
174
|
+
useApprovalUtxoData: UseApprovalUTXOData<T>[];
|
|
175
|
+
interactionAddress?: string;
|
|
176
|
+
};
|
|
177
|
+
export declare const defaultUseApprovalUTXOData: <T>(dimension: number, defaultValue: T) => {
|
|
178
|
+
approvalChanges: T[];
|
|
179
|
+
externalApprovalAddresses: string[];
|
|
180
|
+
conversionInHinkalAddress: T[];
|
|
181
|
+
};
|
|
182
|
+
export declare const defaultHinkalLogicArgs: (dimension: number, userKeys: UserKeys) => HinkalLogicArgs;
|
|
183
|
+
export type FeeStructure<T = bigint> = {
|
|
184
|
+
feeToken: string;
|
|
185
|
+
flatFee: T;
|
|
186
|
+
variableRate: T;
|
|
187
|
+
};
|
|
188
|
+
export declare const defaultFeeStructure: FeeStructure<bigint>;
|
package/types/hinkal.types.mjs
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
import { APPROVED_UTXO_CONVERSION_COUNT as S } from "../constants/conversion.constants.mjs";
|
|
2
|
+
import { defaultFeeToken as D } from "../constants/fees.constants.mjs";
|
|
3
|
+
import { zeroAddress as E } from "../constants/protocol.constants.mjs";
|
|
4
|
+
var s = /* @__PURE__ */ ((a) => (a.BalanceChange = "BalanceChange", a.NetworkChange = "NetworkChange", a.KycNeeded = "KycNeeded", a.AccountChanged = "AccountChanged", a.ShowConnect = "ShowConnect", a.ShowNetworkPopup = "ShowNetworkPopup", a.MerkleTreeUpdated = "MerkleTreeUpdated", a.MerkleTreeResetStarted = "MerkleTreeResetStarted", a.MerkleTreeResetFinished = "MerkleTreeResetFinished", a))(s || {}), _ = /* @__PURE__ */ ((a) => (a[a.UNISWAP = 1] = "UNISWAP", a[a.ODOS = 2] = "ODOS", a[a.ONEINCH = 3] = "ONEINCH", a[a.PENDLE = 4] = "PENDLE", a[a.ALL = 5] = "ALL", a[a.NONE = 6] = "NONE", a))(_ || {}), h = /* @__PURE__ */ ((a) => (a[a.CurveAavePool = 0] = "CurveAavePool", a))(h || {}), W = /* @__PURE__ */ ((a) => (a[a.Deposit = 0] = "Deposit", a[a.WithdrawInt = 11] = "WithdrawInt", a[a.WithdrawUint = 12] = "WithdrawUint", a[a.WithdrawImbalance = 13] = "WithdrawImbalance", a[a.Stake = 2] = "Stake", a[a.Unstake = 3] = "Unstake", a[a.GetCRV = 4] = "GetCRV", a))(W || {}), p = /* @__PURE__ */ ((a) => (a[a.StakeLP = 0] = "StakeLP", a[a.UnStakeLP = 1] = "UnStakeLP", a[a.ClaimRewardsLP = 2] = "ClaimRewardsLP", a))(p || {}), e = /* @__PURE__ */ ((a) => (a[a.Deposit = 0] = "Deposit", a[a.DepositRegular = 1] = "DepositRegular", a[a.DepositOneInchSingle = 2] = "DepositOneInchSingle", a[a.DepositOneInchUniswap = 3] = "DepositOneInchUniswap", a[a.DepositOneInchSolidly = 4] = "DepositOneInchSolidly", a[a.Withdraw = 5] = "Withdraw", a[a.WithdrawRegular = 6] = "WithdrawRegular", a[a.WithdrawOneInchSingle = 7] = "WithdrawOneInchSingle", a[a.WithdrawOneInchUniswapAndSolidly = 8] = "WithdrawOneInchUniswapAndSolidly", a[a.WithdrawBoth = 9] = "WithdrawBoth", a[a.Stake = 10] = "Stake", a[a.Unstake = 11] = "Unstake", a[a.GetRewards = 12] = "GetRewards", a))(e || {}), L = /* @__PURE__ */ ((a) => (a.Ethereum = "Ethereum", a.Polygon = "Polygon", a))(L || {}), w = /* @__PURE__ */ ((a) => (a[a.Stake = 0] = "Stake", a[a.Request = 1] = "Request", a[a.Claim = 2] = "Claim", a))(w || {}), U = /* @__PURE__ */ ((a) => (a[a.Deposit = 0] = "Deposit", a[a.Withdraw = 1] = "Withdraw", a[a.SwapFromYt = 2] = "SwapFromYt", a[a.SwapToYt = 3] = "SwapToYt", a[a.SwapPt = 4] = "SwapPt", a[a.Mint = 5] = "Mint", a[a.Redeem = 6] = "Redeem", a[a.Checkpoint = 7] = "Checkpoint", a[a.PoolRemove = 8] = "PoolRemove", a))(U || {}), R = /* @__PURE__ */ ((a) => (a[a.AddOrRemoveLiquidity = 0] = "AddOrRemoveLiquidity", a[a.Checkpoint = 1] = "Checkpoint", a[a.Invalid = 99] = "Invalid", a))(R || {}), P = /* @__PURE__ */ ((a) => (a[a.Persist = 0] = "Persist", a[a.Deposit = 1] = "Deposit", a[a.Withdraw = 2] = "Withdraw", a[a.Swap = 3] = "Swap", a))(P || {}), d = /* @__PURE__ */ ((a) => (a[a.DepositOrStake = 0] = "DepositOrStake", a[a.Unstake = 1] = "Unstake", a))(d || {}), k = /* @__PURE__ */ ((a) => (a.WITHDRAW = "WITHDRAW", a.SWAP = "SWAP", a.CURVE_DEPOSIT = "CURVE_DEPOSIT", a.CURVE_WITHDRAW = "CURVE_WITHDRAW", a.CURVE_WITHDRAW_INBALANCED = "CURVE_WITHDRAW_INBALANCED", a.STAKING = "STAKING", a.UNSTAKING = "UNSTAKING", a.CLAIMING = "CLAIMING", a.BEEFY = "BEEFY", a.BEEFY_STAKE = "BEEFY_STAKE", a.BEEFY_UNSTAKE = "BEEFY_UNSTAKE", a.BEEFY_GET_REWARDS = "BEEFY_GET_REWARDS", a.LIDO_STAKE = "LIDO_STAKE", a.LIDO_REQUEST = "LIDO_REQUEST", a.LIDO_CLAIM = "LIDO_CLAIM", a.PENDLE_TRANSACT = "PENDLE_TRANSACT", a.PENDLE_YT_IN_SWAP = "PENDLE_YT_IN_SWAP", a.PENDLE_YT_OUT_SWAP = "PENDLE_YT_OUT_SWAP", a.PENDLE_PT_SWAP = "PENDLE_PT_SWAP", a.PENDLE_MINT = "PENDLE_MINT", a.PENDLE_REDEEM = "PENDLE_REDEEM", a.PENDLE_CLAIM = "PENDLE_CLAIM", a.PENDLE_LP = "PENDLE_LP", a.PENDLE_LP_CLAIM = "PENDLE_LP_CLAIM", a.VOLATILE_WITHDRAW = "VOLATILE_WITHDRAW", a.VOLATILE_SWAP = "VOLATILE_SWAP", a.EMPORIUM = "EMPORIUM", a.NONE = "NONE", a))(k || {}), m = /* @__PURE__ */ ((a) => (a[a.NONE = 0] = "NONE", a[a.APPROVE = 1] = "APPROVE", a[a.RELEASE_BUFFER = 2] = "RELEASE_BUFFER", a[a.EXECUTE = 3] = "EXECUTE", a))(m || {});
|
|
5
|
+
const M = (a, r) => ({
|
|
6
|
+
approvalChanges: Array.from({ length: a }).fill(r),
|
|
7
|
+
externalApprovalAddresses: Array.from({ length: a }).fill(E),
|
|
8
|
+
conversionInHinkalAddress: Array.from({ length: a }).fill(r)
|
|
9
|
+
}), F = (a, r) => ({
|
|
10
|
+
hinkalLogicAction: 0,
|
|
11
|
+
inHinkalAddress: r.getInHinkalAddress(E),
|
|
12
|
+
executeApprovalChanges: Array.from({ length: a }).fill(0n),
|
|
13
|
+
doPreTxApproval: !1,
|
|
14
|
+
useApprovalUtxoData: Array.from({ length: a }).map(
|
|
15
|
+
() => M(S, 0n)
|
|
16
|
+
),
|
|
17
|
+
interactionAddress: E
|
|
18
|
+
}), t = {
|
|
19
|
+
feeToken: D,
|
|
20
|
+
flatFee: 0n,
|
|
21
|
+
variableRate: 0n
|
|
22
|
+
};
|
|
2
23
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
24
|
+
e as BeefyAction,
|
|
25
|
+
p as ConvexAction,
|
|
26
|
+
W as CurveAction,
|
|
27
|
+
s as EventType,
|
|
28
|
+
m as HinkalLogicAction,
|
|
29
|
+
d as HinkalStakeAction,
|
|
8
30
|
k as INTERACTION,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
31
|
+
_ as IntegrationProvider,
|
|
32
|
+
w as LidoAction,
|
|
33
|
+
L as LidoVariant,
|
|
34
|
+
U as PendleAction,
|
|
35
|
+
R as PendleLPAction,
|
|
36
|
+
h as StakeProvider,
|
|
37
|
+
P as VolatileAction,
|
|
38
|
+
t as defaultFeeStructure,
|
|
39
|
+
F as defaultHinkalLogicArgs,
|
|
40
|
+
M as defaultUseApprovalUTXOData
|
|
16
41
|
};
|