@hinkal/common 0.2.4 → 0.2.13
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 +2 -2
- package/API/API.mjs +22 -22
- package/API/duneAPI.cjs +1 -1
- package/API/duneAPI.mjs +2 -3
- package/API/userVerifyTransactions.cjs +1 -1
- package/API/userVerifyTransactions.d.ts +7 -6
- package/API/userVerifyTransactions.mjs +14 -13
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.mjs +2 -2
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +134 -138
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +11 -846
- package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-avalanche.json.mjs +13 -848
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +17 -852
- package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +20 -855
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +15 -850
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +100 -935
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +18 -849
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +9 -844
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +18 -30
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +2 -3
- package/constants/server.constants.mjs +6 -7
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +48 -48
- package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistry.json.mjs +1 -4
- package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.mjs +1 -4
- package/constants/token-data/avalancheRegistry.json.cjs +1 -1
- package/constants/token-data/avalancheRegistry.json.mjs +1 -4
- package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
- package/constants/token-data/avalancheRegistryFixed.json.mjs +1 -4
- package/constants/token-data/baseRegistry.json.cjs +1 -1
- package/constants/token-data/baseRegistry.json.mjs +1 -4
- package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
- package/constants/token-data/baseRegistryFixed.json.mjs +1 -4
- package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistry.json.mjs +1 -4
- package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +1 -4
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +1 -4
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +1 -4
- package/constants/token-data/index.d.ts +15 -972
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +1 -4
- package/constants/token-data/optimismRegistry.json.cjs +1 -1
- package/constants/token-data/optimismRegistry.json.mjs +1 -4
- package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
- package/constants/token-data/optimismRegistryFixed.json.mjs +1 -4
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +1 -4
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +1 -4
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +0 -2
- package/data-structures/Hinkal/Hinkal.mjs +32 -38
- package/data-structures/Hinkal/IHinkal.d.ts +0 -2
- package/data-structures/Hinkal/hinkalActionBeefy.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionBeefy.mjs +20 -21
- package/data-structures/Hinkal/hinkalActionConvex.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionConvex.mjs +12 -13
- package/data-structures/Hinkal/hinkalActionCurve.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionCurve.mjs +14 -15
- package/data-structures/Hinkal/hinkalActionLidoEth.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionLidoEth.mjs +16 -17
- package/data-structures/Hinkal/hinkalActionPendle.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.mjs +23 -24
- package/data-structures/Hinkal/hinkalActionPendleLP.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendleLP.mjs +20 -21
- package/data-structures/Hinkal/hinkalActionStake.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionStake.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionStake.mjs +5 -6
- package/data-structures/Hinkal/hinkalActionVolatile.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.mjs +8 -9
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.d.ts +2 -2
- package/data-structures/Hinkal/hinkalDeposit.mjs +54 -93
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +2 -3
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +4 -5
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +22 -23
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.d.ts +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +12 -13
- package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/data-structures/merkle-tree/MerkleTree.d.ts +0 -2
- package/data-structures/merkle-tree/MerkleTree.mjs +25 -38
- package/data-structures/merkle-tree/index.d.ts +0 -1
- package/data-structures/transactions-manager/TransactionsManager.cjs +1 -1
- package/data-structures/transactions-manager/TransactionsManager.d.ts +5 -6
- package/data-structures/transactions-manager/TransactionsManager.mjs +111 -118
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +0 -4
- package/error-handling/error-codes.constants.mjs +2 -6
- package/externalABIs/BabPassport.json.cjs +1 -1
- package/externalABIs/BabPassport.json.mjs +3 -8
- package/externalABIs/BeefyRouterAbi.json.cjs +1 -1
- package/externalABIs/BeefyRouterAbi.json.mjs +2 -5
- package/externalABIs/BeefyStrategyAbi.json.cjs +1 -1
- package/externalABIs/BeefyStrategyAbi.json.mjs +2 -5
- package/externalABIs/BeefyVaultAbi.json.cjs +1 -1
- package/externalABIs/BeefyVaultAbi.json.mjs +2 -5
- package/externalABIs/BeefyZapAbi.json.cjs +1 -1
- package/externalABIs/BeefyZapAbi.json.mjs +2 -5
- package/externalABIs/BeefyZapOneInchAbi.json.cjs +1 -1
- package/externalABIs/BeefyZapOneInchAbi.json.mjs +2 -5
- package/externalABIs/ConvexBoosterAbi.json.cjs +1 -1
- package/externalABIs/ConvexBoosterAbi.json.mjs +2 -5
- package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +1 -1
- package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +2 -5
- package/externalABIs/ConvexRewardPoolAbi.json.cjs +1 -1
- package/externalABIs/ConvexRewardPoolAbi.json.mjs +2 -5
- package/externalABIs/CurveReadingWrapperAbi.json.cjs +1 -1
- package/externalABIs/CurveReadingWrapperAbi.json.mjs +2 -5
- package/externalABIs/CurveWrappedMainPool.json.cjs +1 -1
- package/externalABIs/CurveWrappedMainPool.json.mjs +2 -5
- package/externalABIs/CurveZap.json.cjs +1 -1
- package/externalABIs/CurveZap.json.mjs +2 -5
- package/externalABIs/CvxCrvUtilities.json.cjs +1 -1
- package/externalABIs/CvxCrvUtilities.json.mjs +2 -5
- package/externalABIs/ERC20.json.cjs +1 -1
- package/externalABIs/ERC20.json.mjs +3 -20
- package/externalABIs/GalxePassport.json.cjs +1 -1
- package/externalABIs/GalxePassport.json.mjs +3 -8
- package/externalABIs/IQuoterV2.json.cjs +1 -1
- package/externalABIs/IQuoterV2.json.mjs +3 -20
- package/externalABIs/ISwapRouter.json.cjs +1 -1
- package/externalABIs/ISwapRouter.json.mjs +2 -5
- package/externalABIs/IUniswapV3Factory.json.cjs +1 -1
- package/externalABIs/IUniswapV3Factory.json.mjs +3 -20
- package/externalABIs/IUniswapV3Pool.json.cjs +1 -1
- package/externalABIs/IUniswapV3Pool.json.mjs +3 -20
- package/externalABIs/PendleRouterAbi.json.cjs +1 -1
- package/externalABIs/PendleRouterAbi.json.mjs +2 -5
- package/externalABIs/UniswapV2PoolAbi.json.cjs +1 -1
- package/externalABIs/UniswapV2PoolAbi.json.mjs +3 -16
- package/externalABIs/index.d.ts +11 -307
- package/externalABIs/transactionsProver.json.cjs +1 -1
- package/externalABIs/transactionsProver.json.mjs +3 -20
- package/functions/kyc/zkMeHelper.cjs +1 -1
- package/functions/kyc/zkMeHelper.d.ts +1 -0
- package/functions/kyc/zkMeHelper.mjs +11 -8
- package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
- package/functions/pre-transaction/process-gas-estimates.mjs +2 -3
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +8 -3
- package/functions/private-wallet/emporium.helpers.mjs +23 -11
- package/functions/private-wallet/index.d.ts +1 -0
- package/functions/private-wallet/opProducer.cjs +1 -1
- package/functions/private-wallet/opProducer.mjs +10 -9
- package/functions/private-wallet/smartContractWalletCalculator.cjs +1 -0
- package/functions/private-wallet/smartContractWalletCalculator.d.ts +1 -0
- package/functions/private-wallet/smartContractWalletCalculator.mjs +20 -0
- package/functions/protocols/convex.protocols.cjs +1 -1
- package/functions/protocols/convex.protocols.mjs +2 -3
- package/functions/protocols/pendle.helpers.cjs +1 -1
- package/functions/protocols/pendle.helpers.mjs +13 -14
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +0 -1
- package/functions/snarkjs/constant.mjs +5 -6
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +1 -1
- package/functions/snarkjs/constructEmporiumProof.mjs +31 -31
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +1 -1
- package/functions/snarkjs/constructGeneralZkProof.mjs +75 -76
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.d.ts +1 -1
- package/functions/snarkjs/generateZkProof.mjs +15 -4
- package/functions/utils/axelar.utils.cjs +1 -1
- package/functions/utils/axelar.utils.mjs +2 -3
- package/functions/utils/cacheDevice.utils.cjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +8 -9
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.mjs +7 -8
- package/functions/utils/evmNetworkFunctions.cjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +3 -4
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +1 -0
- package/functions/utils/string.utils.mjs +16 -6
- package/functions/utils/userAgent.cjs +1 -1
- package/functions/utils/userAgent.mjs +8 -8
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.mjs +8 -8
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +29 -43
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +8 -10
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.d.ts +2 -1
- package/functions/web3/odosAPI.mjs +18 -19
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.d.ts +2 -1
- package/functions/web3/oneInchAPI.mjs +15 -17
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.d.ts +4 -4
- package/functions/web3/uniswapAPI.mjs +43 -54
- package/index.cjs +1 -1
- package/index.mjs +641 -617
- package/package.json +2 -3
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +0 -1
- package/providers/EthersProviderAdapter.mjs +37 -26
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +0 -1
- package/providers/WagmiProviderAdapter.mjs +56 -45
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +2 -4
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +2 -4
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +61 -62
- package/types/ethereum-network.types.mjs +1 -1
- package/types/hinkal.types.d.ts +0 -4
- package/types/kyc.types.cjs +1 -1
- package/types/kyc.types.d.ts +1 -1
- package/types/kyc.types.mjs +1 -1
- package/types/rewards.types.d.ts +0 -5
- package/types/time.types.cjs +1 -1
- package/types/time.types.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/constants/token-data/index.cjs +0 -1
- package/constants/token-data/index.mjs +0 -34
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +0 -1
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +0 -3
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +0 -9
- package/externalABIs/index.cjs +0 -1
- package/externalABIs/index.mjs +0 -23
- package/functions/snarkjs/generateZkProofEnclave.cjs +0 -1
- package/functions/snarkjs/generateZkProofEnclave.d.ts +0 -5
- package/functions/snarkjs/generateZkProofEnclave.mjs +0 -33
- package/functions/snarkjs/generateZkProofSelf.cjs +0 -1
- package/functions/snarkjs/generateZkProofSelf.d.ts +0 -5
- package/functions/snarkjs/generateZkProofSelf.mjs +0 -17
- package/functions/web3/getContractMetadata.cjs +0 -1
- package/functions/web3/getContractMetadata.d.ts +0 -5
- package/functions/web3/getContractMetadata.mjs +0 -30
- package/types/remote-proof.types.d.ts +0 -15
|
@@ -7,66 +7,65 @@ export declare enum ContractType {
|
|
|
7
7
|
HinkalContract = 0,
|
|
8
8
|
HinkalHelperContract = 1,
|
|
9
9
|
CrossChainAccessTokenContract = 2,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
HToken = 62
|
|
10
|
+
UniswapV3FactoryContract = 3,
|
|
11
|
+
UniswapV3PoolContract = 4,
|
|
12
|
+
UniswapV3QuoterContract = 5,
|
|
13
|
+
ERC20Contract = 6,
|
|
14
|
+
WATokenContract = 7,
|
|
15
|
+
OneInchExternalActionContract = 8,
|
|
16
|
+
MerkleTreeContract = 9,
|
|
17
|
+
ContractWithNonces = 10,
|
|
18
|
+
PermitterContract = 11,
|
|
19
|
+
CurveWrappedMainPool = 12,
|
|
20
|
+
CurveReadingWrapper = 13,
|
|
21
|
+
CurvePoolLPTokenAmountCalculator2 = 14,
|
|
22
|
+
CurvePoolLPTokenAmountCalculator3 = 15,
|
|
23
|
+
CurvePoolLPTokenAmountCalculator4 = 16,
|
|
24
|
+
CurvePoolLPTokenAmountCalculatorDynamic = 17,
|
|
25
|
+
CurvePoolLPTokenAmountCalculator2OneArg = 18,
|
|
26
|
+
CurvePoolLPTokenAmountCalculator3OneArg = 19,
|
|
27
|
+
CurvePoolLPTokenAmountCalculator4OneArg = 20,
|
|
28
|
+
CurvePoolWithIntCoins = 21,
|
|
29
|
+
CurveExternalAction = 22,
|
|
30
|
+
WrappedStakedCurveLp = 23,
|
|
31
|
+
WrappedStakedRewardsCurveLp = 24,
|
|
32
|
+
CurveGauge = 25,
|
|
33
|
+
ConvexBooster = 26,
|
|
34
|
+
ConvexBoosterMainnet = 27,
|
|
35
|
+
ConvexRewardPool = 28,
|
|
36
|
+
ConvexCvxLocker = 29,
|
|
37
|
+
ConvexStakePool = 30,
|
|
38
|
+
ConvexCvxCRVWrapper = 31,
|
|
39
|
+
ConvexCxvCrvUtillities = 32,
|
|
40
|
+
ConvexExternalAction = 33,
|
|
41
|
+
WrappedStakedConvexLp = 34,
|
|
42
|
+
CurvePoolWithIntBalances = 35,
|
|
43
|
+
CurveZaps = 36,
|
|
44
|
+
BeefyVault = 37,
|
|
45
|
+
BeefyZap = 38,
|
|
46
|
+
BeefyRouter = 39,
|
|
47
|
+
BeefyZapOneInch = 40,
|
|
48
|
+
BeefyExternalAction = 41,
|
|
49
|
+
BeefyStakeExternalAction = 42,
|
|
50
|
+
BeefyStrategy = 43,
|
|
51
|
+
WrappedStakedBeefyLp = 44,
|
|
52
|
+
UniswapV2PoolContract = 45,
|
|
53
|
+
LidoWstEther = 46,
|
|
54
|
+
LidoStEther = 47,
|
|
55
|
+
LidoStMatic = 48,
|
|
56
|
+
LidoWithdrawalQueueERC721 = 49,
|
|
57
|
+
LidoStakeManager = 50,
|
|
58
|
+
PoLidoNFT = 51,
|
|
59
|
+
PendleGeneralExternalAction = 52,
|
|
60
|
+
PendleRouter = 53,
|
|
61
|
+
WstPendleLPToken = 54,
|
|
62
|
+
WstYtToken = 55,
|
|
63
|
+
VolatileVault = 56,
|
|
64
|
+
VolatileTokenAction = 57,
|
|
65
|
+
HinkalWrapper = 58,
|
|
66
|
+
HinkalWrapper2 = 59,
|
|
67
|
+
HinkalStakeExternalAction = 60,
|
|
68
|
+
HToken = 61
|
|
70
69
|
}
|
|
71
70
|
export interface ContractData {
|
|
72
71
|
hinkalAddress: string;
|
|
@@ -75,8 +74,6 @@ export interface ContractData {
|
|
|
75
74
|
hinkalHelperABI?: ContractInterface;
|
|
76
75
|
crossChainAccessTokenAddress?: string;
|
|
77
76
|
crossChainAccessTokenABI?: ContractInterface;
|
|
78
|
-
crossChainAccessTokenManagerAddress?: string;
|
|
79
|
-
crossChainAccessTokenManagerABI?: ContractInterface;
|
|
80
77
|
permitterAddress?: string;
|
|
81
78
|
permitterABI?: ContractInterface;
|
|
82
79
|
uniswapExternalActionAddress?: string;
|
|
@@ -123,6 +120,8 @@ export interface ContractData {
|
|
|
123
120
|
hETHOracleAddress?: string;
|
|
124
121
|
HTokenOracleABI?: ContractInterface;
|
|
125
122
|
emporiumAddress?: string;
|
|
123
|
+
hinkalWalletFactoryAddress?: string;
|
|
124
|
+
hinkalWalletBeaconAddress?: string;
|
|
126
125
|
}
|
|
127
126
|
export interface EthereumNetwork {
|
|
128
127
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var l = /* @__PURE__ */ ((e) => (e[e.HinkalContract = 0] = "HinkalContract", e[e.HinkalHelperContract = 1] = "HinkalHelperContract", e[e.CrossChainAccessTokenContract = 2] = "CrossChainAccessTokenContract", e[e.
|
|
1
|
+
var l = /* @__PURE__ */ ((e) => (e[e.HinkalContract = 0] = "HinkalContract", e[e.HinkalHelperContract = 1] = "HinkalHelperContract", e[e.CrossChainAccessTokenContract = 2] = "CrossChainAccessTokenContract", 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))(l || {});
|
|
2
2
|
export {
|
|
3
3
|
l as ContractType
|
|
4
4
|
};
|
package/types/hinkal.types.d.ts
CHANGED
|
@@ -13,10 +13,6 @@ export type HinkalConfig = {
|
|
|
13
13
|
* Node only.
|
|
14
14
|
*/
|
|
15
15
|
useFileCache?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Indicator controlling wether the proof should be constructed remotely in secure enclave.
|
|
18
|
-
*/
|
|
19
|
-
generateProofRemotely?: boolean;
|
|
20
16
|
};
|
|
21
17
|
export declare enum EventType {
|
|
22
18
|
BalanceChange = "BalanceChange",
|
package/types/kyc.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(e=>(e.USER="USER",e.BUSINESS="BUSINESS",e))(E||{});const a=["USER","BUSINESS"];var N=(e=>(e[e.AiPriseKyc=0]="AiPriseKyc",e[e.AiPriseKyb=1]="AiPriseKyb",e[e.BABPassport=2]="BABPassport",e[e.GalxePassport=3]="GalxePassport",e[e.ZkMePassport=4]="ZkMePassport",e[e.CoinbasePassport=5]="CoinbasePassport",e[e.AuthentoPassport=6]="AuthentoPassport",e[e.AuthentoPassportKyb=7]="AuthentoPassportKyb",e[e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(e=>(e.USER="USER",e.BUSINESS="BUSINESS",e))(E||{});const a=["USER","BUSINESS"];var N=(e=>(e[e.AiPriseKyc=0]="AiPriseKyc",e[e.AiPriseKyb=1]="AiPriseKyb",e[e.BABPassport=2]="BABPassport",e[e.GalxePassport=3]="GalxePassport",e[e.ZkMePassport=4]="ZkMePassport",e[e.CoinbasePassport=5]="CoinbasePassport",e[e.AuthentoPassport=6]="AuthentoPassport",e[e.AuthentoPassportKyb=7]="AuthentoPassportKyb",e[e.ReclaimBinance=8]="ReclaimBinance",e[e.ReclaimBNBPassport=9]="ReclaimBNBPassport",e[e.ReclaimOKXPassport=10]="ReclaimOKXPassport",e[e.ReclaimGatePassport=11]="ReclaimGatePassport",e[e.ReclaimKucoinPassport=12]="ReclaimKucoinPassport",e[e.ReclaimMexcPassport=13]="ReclaimMexcPassport",e[e.ReclaimHtxPassport=14]="ReclaimHtxPassport",e))(N||{}),R=(e=>(e.APPROVED="APPROVED",e.DECLINED="DECLINED",e.REVIEW="REVIEW",e.UNKNOWN="UNKNOWN",e))(R||{}),i=(e=>(e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.PENDING="PENDING",e.RUNNING="RUNNING",e.NOT_STARTED="NOT_STARTED",e))(i||{});exports.KycVerificationResult=R;exports.KycVerificationStatus=i;exports.Passports=N;exports.VERIFICATION_TYPE=E;exports.VerificationTypes=a;
|
package/types/kyc.types.d.ts
CHANGED
package/types/kyc.types.mjs
CHANGED
|
@@ -4,7 +4,7 @@ const m = [
|
|
|
4
4
|
"BUSINESS"
|
|
5
5
|
/* BUSINESS */
|
|
6
6
|
];
|
|
7
|
-
var N = /* @__PURE__ */ ((e) => (e[e.AiPriseKyc = 0] = "AiPriseKyc", e[e.AiPriseKyb = 1] = "AiPriseKyb", e[e.BABPassport = 2] = "BABPassport", e[e.GalxePassport = 3] = "GalxePassport", e[e.ZkMePassport = 4] = "ZkMePassport", e[e.CoinbasePassport = 5] = "CoinbasePassport", e[e.AuthentoPassport = 6] = "AuthentoPassport", e[e.AuthentoPassportKyb = 7] = "AuthentoPassportKyb", e[e.
|
|
7
|
+
var N = /* @__PURE__ */ ((e) => (e[e.AiPriseKyc = 0] = "AiPriseKyc", e[e.AiPriseKyb = 1] = "AiPriseKyb", e[e.BABPassport = 2] = "BABPassport", e[e.GalxePassport = 3] = "GalxePassport", e[e.ZkMePassport = 4] = "ZkMePassport", e[e.CoinbasePassport = 5] = "CoinbasePassport", e[e.AuthentoPassport = 6] = "AuthentoPassport", e[e.AuthentoPassportKyb = 7] = "AuthentoPassportKyb", e[e.ReclaimBinance = 8] = "ReclaimBinance", e[e.ReclaimBNBPassport = 9] = "ReclaimBNBPassport", e[e.ReclaimOKXPassport = 10] = "ReclaimOKXPassport", e[e.ReclaimGatePassport = 11] = "ReclaimGatePassport", e[e.ReclaimKucoinPassport = 12] = "ReclaimKucoinPassport", e[e.ReclaimMexcPassport = 13] = "ReclaimMexcPassport", e[e.ReclaimHtxPassport = 14] = "ReclaimHtxPassport", e))(N || {}), R = /* @__PURE__ */ ((e) => (e.APPROVED = "APPROVED", e.DECLINED = "DECLINED", e.REVIEW = "REVIEW", e.UNKNOWN = "UNKNOWN", e))(R || {}), A = /* @__PURE__ */ ((e) => (e.COMPLETED = "COMPLETED", e.FAILED = "FAILED", e.PENDING = "PENDING", e.RUNNING = "RUNNING", e.NOT_STARTED = "NOT_STARTED", e))(A || {});
|
|
8
8
|
export {
|
|
9
9
|
R as KycVerificationResult,
|
|
10
10
|
A as KycVerificationStatus,
|
package/types/rewards.types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { networkRegistry } from '../constants/chains.constants';
|
|
2
1
|
export declare enum TIER_LEVEL {
|
|
3
2
|
None = "None",
|
|
4
3
|
Bronze = "Bronze",
|
|
@@ -219,7 +218,3 @@ export interface HistoryIndexesProps {
|
|
|
219
218
|
lpProgramStartWeek: number;
|
|
220
219
|
raffleProgramStartWeek: number;
|
|
221
220
|
}
|
|
222
|
-
export type HashInfoByChain = Record<keyof typeof networkRegistry, {
|
|
223
|
-
lastCertifiedHash: string;
|
|
224
|
-
week: number;
|
|
225
|
-
}>;
|
package/types/time.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=1e3,a=60*c,l=60*a,u=24*l,R=7*u,o=new Date("2024-03-04T00:00:00.000Z"),d=e=>{if(e<0)throw Error("Certification for the past week is not available")},s=e=>(d(e),new Date(new Date(o).setUTCDate(o.getUTCDate()+7*e))),g=e=>{d(e);const t=s(e).getTime()/1e3,n=s(e+1).getTime()/1e3;return{initialTimestamp:t,endTimestamp:n}},r=()=>{const e=new Date().getTime()/1e3;let t=-1,n;do t+=1,{endTimestamp:n}=g(t);while(e>n);return t},f=e=>{if(e===void 0)return r();const t=Number(e);return!Number.isFinite(t)||t<0?r():t},k=(e,t="/")=>[e.getUTCDate(),e.getUTCMonth()+1,e.getUTCFullYear()].join(t),A=e=>{const t=r();return e===t},I=e=>{const t=r();return e<t},p=e=>{const t=new Date(e);return t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t};var E=(e=>(e[e.JANUARY=0]="JANUARY",e[e.FEBRUARY=1]="FEBRUARY",e[e.MARCH=2]="MARCH",e[e.APRIL=3]="APRIL",e[e.MAY=4]="MAY",e[e.JUNE=5]="JUNE",e[e.JULY=6]="JULY",e[e.AUGUST=7]="AUGUST",e[e.SEPTEMBER=8]="SEPTEMBER",e[e.OCTOBER=9]="OCTOBER",e[e.NOVEMBER=10]="NOVEMBER",e[e.DECEMBER=11]="DECEMBER",e))(E||{});const v=(e,t)=>{if(t<0||t>11)throw Error("getNextMonth: incorrect month provided");if(e<2023||e>2025)throw Error("getNextMonth: incorrect year provided");let n=e,i;return t<11?i=t+1:(i=0,n=e+1),{newYear:n,newMonth:i}},W=(e,t)=>{const{newYear:n,newMonth:i}=v(e,t),C=new Date(e,t,1).getTime()/1e3,D=new Date(e,t,8).getTime()/1e3,U=new Date(e,t,15).getTime()/1e3,w=new Date(e,t,23).getTime()/1e3,m=new Date(n,i,1).getTime()/1e3;return[C,D,U,w,m]};exports.MONTHS=E;exports.dayInMilliseconds=u;exports.divideMonthOnIntervals=W;exports.getCurrentWeek=r;exports.getDateFromWeek=s;exports.getNextDay=p;exports.getWeekTimestamps=g;exports.hasCertificationPeriodExpired=I;exports.hourInMilliseconds=l;exports.isWeekCurrent=A;exports.minuteInMilliseconds=a;exports.parseWeek=f;exports.secondInMilliseconds=c;exports.toDateString=k;exports.weekInMilliseconds=R;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=1e3,a=60*c,l=60*a,u=24*l,R=7*u,o=new Date("2024-03-04T00:00:00.000Z"),d=e=>{if(e<0)throw Error("Certification for the past week is not available")},s=e=>(d(e),new Date(new Date(o).setUTCDate(o.getUTCDate()+7*e))),g=e=>{d(e);const t=s(e).getTime()/1e3,n=s(e+1).getTime()/1e3;return{initialTimestamp:t,endTimestamp:n}},r=()=>{const e=new Date().getTime()/1e3;let t=-1,n;do t+=1,{endTimestamp:n}=g(t);while(e>n);return t},f=e=>{if(e===void 0)return r();const t=Number(e);return!Number.isFinite(t)||t<0?r():t},k=(e,t="/")=>[e.getUTCDate(),e.getUTCMonth()+1,e.getUTCFullYear()].join(t),A=e=>{const t=r();return e===t},I=e=>{const t=r();return e<t-1},p=e=>{const t=new Date(e);return t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t};var E=(e=>(e[e.JANUARY=0]="JANUARY",e[e.FEBRUARY=1]="FEBRUARY",e[e.MARCH=2]="MARCH",e[e.APRIL=3]="APRIL",e[e.MAY=4]="MAY",e[e.JUNE=5]="JUNE",e[e.JULY=6]="JULY",e[e.AUGUST=7]="AUGUST",e[e.SEPTEMBER=8]="SEPTEMBER",e[e.OCTOBER=9]="OCTOBER",e[e.NOVEMBER=10]="NOVEMBER",e[e.DECEMBER=11]="DECEMBER",e))(E||{});const v=(e,t)=>{if(t<0||t>11)throw Error("getNextMonth: incorrect month provided");if(e<2023||e>2025)throw Error("getNextMonth: incorrect year provided");let n=e,i;return t<11?i=t+1:(i=0,n=e+1),{newYear:n,newMonth:i}},W=(e,t)=>{const{newYear:n,newMonth:i}=v(e,t),C=new Date(e,t,1).getTime()/1e3,D=new Date(e,t,8).getTime()/1e3,U=new Date(e,t,15).getTime()/1e3,w=new Date(e,t,23).getTime()/1e3,m=new Date(n,i,1).getTime()/1e3;return[C,D,U,w,m]};exports.MONTHS=E;exports.dayInMilliseconds=u;exports.divideMonthOnIntervals=W;exports.getCurrentWeek=r;exports.getDateFromWeek=s;exports.getNextDay=p;exports.getWeekTimestamps=g;exports.hasCertificationPeriodExpired=I;exports.hourInMilliseconds=l;exports.isWeekCurrent=A;exports.minuteInMilliseconds=a;exports.parseWeek=f;exports.secondInMilliseconds=c;exports.toDateString=k;exports.weekInMilliseconds=R;
|
package/types/time.types.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const w = 1e3, R = 6e4, m = 36e5, f = 864e5, A = 6048e5, r = /* @__PURE__ */ new
|
|
|
22
22
|
return e === t;
|
|
23
23
|
}, p = (e) => {
|
|
24
24
|
const t = i();
|
|
25
|
-
return e < t;
|
|
25
|
+
return e < t - 1;
|
|
26
26
|
}, v = (e) => {
|
|
27
27
|
const t = new Date(e);
|
|
28
28
|
return t.setUTCDate(t.getUTCDate() + 1), t.setUTCHours(0), t.setUTCMinutes(0), t.setUTCSeconds(0), t.setUTCMilliseconds(0), t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/zkProofWorkerLauncher-CK9HJBVR.js").href:new URL("../../assets/zkProofWorkerLauncher-CK9HJBVR.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ethMainnetRegistryFixed.json.cjs"),t=require("./arbMainnetRegistryFixed.json.cjs"),i=require("./bnbMainnetRegistryFixed.json.cjs"),r=require("./polygonRegistryFixed.json.cjs"),s=require("./avalancheRegistryFixed.json.cjs"),n=require("./optimismRegistryFixed.json.cjs"),o=require("./baseRegistryFixed.json.cjs"),a=require("./ethMainnetRegistry.json.cjs"),g=require("./arbMainnetRegistry.json.cjs"),y=require("./bnbMainnetRegistry.json.cjs"),R=require("./polygonRegistry.json.cjs"),c=require("./avalancheRegistry.json.cjs"),d=require("./optimismRegistry.json.cjs"),l=require("./baseRegistry.json.cjs"),u=require("./localhostRegistry.json.cjs");require("../chains.constants.cjs");const b=e.default.networkRegistry,x=t.default.networkRegistry,F=i.default.networkRegistry,M=r.default.networkRegistry,f=s.default.networkRegistry,q=n.default.networkRegistry,h=o.default.networkRegistry,k=a.default.networkRegistry,w=g.default.networkRegistry,$=y.default.networkRegistry,m=R.default.networkRegistry,p=c.default.networkRegistry,v=d.default.networkRegistry,S=l.default.networkRegistry,j=u.default.networkRegistry;exports.arbMainnetRegistry=w;exports.arbMainnetRegistryFixed=x;exports.avalancheRegistry=p;exports.avalancheRegistryFixed=f;exports.baseRegistry=S;exports.baseRegistryFixed=h;exports.bnbMainnetRegistry=$;exports.bnbMainnetRegistryFixed=F;exports.ethMainnetRegistry=k;exports.ethMainnetRegistryFixed=b;exports.localhostRegistry=j;exports.optimismRegistry=v;exports.optimismRegistryFixed=q;exports.polygonRegistry=m;exports.polygonRegistryFixed=M;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import t from "./ethMainnetRegistryFixed.json.mjs";
|
|
2
|
-
import e from "./arbMainnetRegistryFixed.json.mjs";
|
|
3
|
-
import r from "./bnbMainnetRegistryFixed.json.mjs";
|
|
4
|
-
import i from "./polygonRegistryFixed.json.mjs";
|
|
5
|
-
import o from "./avalancheRegistryFixed.json.mjs";
|
|
6
|
-
import s from "./optimismRegistryFixed.json.mjs";
|
|
7
|
-
import n from "./baseRegistryFixed.json.mjs";
|
|
8
|
-
import g from "./ethMainnetRegistry.json.mjs";
|
|
9
|
-
import y from "./arbMainnetRegistry.json.mjs";
|
|
10
|
-
import R from "./bnbMainnetRegistry.json.mjs";
|
|
11
|
-
import m from "./polygonRegistry.json.mjs";
|
|
12
|
-
import a from "./avalancheRegistry.json.mjs";
|
|
13
|
-
import p from "./optimismRegistry.json.mjs";
|
|
14
|
-
import c from "./baseRegistry.json.mjs";
|
|
15
|
-
import b from "./localhostRegistry.json.mjs";
|
|
16
|
-
import "../chains.constants.mjs";
|
|
17
|
-
const B = t.networkRegistry, C = e.networkRegistry, D = r.networkRegistry, E = i.networkRegistry, G = o.networkRegistry, H = s.networkRegistry, I = n.networkRegistry, K = g.networkRegistry, L = y.networkRegistry, N = R.networkRegistry, O = m.networkRegistry, P = a.networkRegistry, Q = p.networkRegistry, S = c.networkRegistry, T = b.networkRegistry;
|
|
18
|
-
export {
|
|
19
|
-
L as arbMainnetRegistry,
|
|
20
|
-
C as arbMainnetRegistryFixed,
|
|
21
|
-
P as avalancheRegistry,
|
|
22
|
-
G as avalancheRegistryFixed,
|
|
23
|
-
S as baseRegistry,
|
|
24
|
-
I as baseRegistryFixed,
|
|
25
|
-
N as bnbMainnetRegistry,
|
|
26
|
-
D as bnbMainnetRegistryFixed,
|
|
27
|
-
K as ethMainnetRegistry,
|
|
28
|
-
B as ethMainnetRegistryFixed,
|
|
29
|
-
T as localhostRegistry,
|
|
30
|
-
Q as optimismRegistry,
|
|
31
|
-
H as optimismRegistryFixed,
|
|
32
|
-
O as polygonRegistry,
|
|
33
|
-
E as polygonRegistryFixed
|
|
34
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(t,c,n)=>{if(n)return t;const e=t.clone(),s=e.getIndex(),r=BigInt(c.getAccessKey());return e.insert(r,s),e};exports.getPatchedAccessTokenMerkleTree=o;
|
package/externalABIs/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./BeefyVaultAbi.json.cjs"),r=require("./CurveReadingWrapperAbi.json.cjs"),a=require("./CurveWrappedMainPool.json.cjs"),t=require("./ERC20.json.cjs"),o=require("./IQuoterV2.json.cjs"),u=require("./IUniswapV3Factory.json.cjs"),i=require("./ISwapRouter.json.cjs"),n=require("./transactionsProver.json.cjs"),s=require("./BabPassport.json.cjs"),c=require("./GalxePassport.json.cjs"),B=e.default.abi,I=r.default.abi,l=a.default.abi,A=t.default.abi,p=o.default.abi,d=u.default.abi,b=i.default.abi,f=n.default.abi,q=s.default.abi,v=c.default.abi;exports.BabABI=q;exports.BeefyVaultABI=B;exports.CurveReadingWrapperABI=I;exports.CurveWrappedMainPoolABI=l;exports.ERC20ABI=A;exports.GalxeABI=v;exports.ISwapRouterABI=b;exports.factoryABI=d;exports.quoterV2ABI=p;exports.transactionProverABI=f;
|
package/externalABIs/index.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import o from "./BeefyVaultAbi.json.mjs";
|
|
2
|
-
import r from "./CurveReadingWrapperAbi.json.mjs";
|
|
3
|
-
import a from "./CurveWrappedMainPool.json.mjs";
|
|
4
|
-
import t from "./ERC20.json.mjs";
|
|
5
|
-
import i from "./IQuoterV2.json.mjs";
|
|
6
|
-
import B from "./IUniswapV3Factory.json.mjs";
|
|
7
|
-
import e from "./ISwapRouter.json.mjs";
|
|
8
|
-
import n from "./transactionsProver.json.mjs";
|
|
9
|
-
import I from "./BabPassport.json.mjs";
|
|
10
|
-
import p from "./GalxePassport.json.mjs";
|
|
11
|
-
const V = o.abi, d = r.abi, y = a.abi, C = t.abi, J = i.abi, P = B.abi, W = e.abi, w = n.abi, x = I.abi, g = p.abi;
|
|
12
|
-
export {
|
|
13
|
-
x as BabABI,
|
|
14
|
-
V as BeefyVaultABI,
|
|
15
|
-
d as CurveReadingWrapperABI,
|
|
16
|
-
y as CurveWrappedMainPoolABI,
|
|
17
|
-
C as ERC20ABI,
|
|
18
|
-
g as GalxeABI,
|
|
19
|
-
W as ISwapRouterABI,
|
|
20
|
-
P as factoryABI,
|
|
21
|
-
J as quoterV2ABI,
|
|
22
|
-
w as transactionProverABI
|
|
23
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("node-forge"),u=require("axios"),p=require("./getZKFiles.cjs"),d=require("./constant.cjs");function z(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const s=z(P),f=214,a=t=>typeof t=="bigint"||typeof t=="number"?t.toString():t,w=t=>{const e=structuredClone(t);return Object.entries(e).forEach(([n,r])=>{e[n]=a(r),Array.isArray(r)&&(Array.isArray(r[0])?e[n]=r.map(c=>c.map(a)):e[n]=r.map(a))}),e},g=t=>t.startsWith("http")?t.split("amazonaws.com/")[1]:t,j=async(t,e,n)=>{const r=g(p.getWASMFile(e,t)),c=g(p.getZKeyFile(e,t)),m=(await u.get(`${d.PROOF_GENERATION_EC2_URL}/handshake`)).data.public_key,y=s.util.decode64(m),b=s.asn1.fromDer(y),O=s.pki.publicKeyFromAsn1(b),_=w(n),i=JSON.stringify(_);let l="",o=0;for(;o<i.length;){const A=i.slice(o,o+f);o+=f;const E=O.encrypt(A,"RSA-OAEP",{md:s.md.sha1.create(),mgf1:{md:s.md.sha1.create()},label:null}),F=s.util.encode64(E);l+=F}const k={chainId:t,circuit_wasm:r,circuit_zkey:c,input:l},h=await u.post(`${d.PROOF_GENERATION_EC2_URL}/generate`,k),{public_signals:S,zk_calldata:R}=h.data;return{zkCallData:R,publicSignals:S}};exports.generateZkProofEnclave=j;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as s from "node-forge";
|
|
2
|
-
import l from "axios";
|
|
3
|
-
import { getWASMFile as F, getZKeyFile as O } from "./getZKFiles.mjs";
|
|
4
|
-
import { PROOF_GENERATION_EC2_URL as m } from "./constant.mjs";
|
|
5
|
-
const u = 214, a = (t) => typeof t == "bigint" || typeof t == "number" ? t.toString() : t, w = (t) => {
|
|
6
|
-
const n = structuredClone(t);
|
|
7
|
-
return Object.entries(n).forEach(([o, e]) => {
|
|
8
|
-
n[o] = a(e), Array.isArray(e) && (Array.isArray(e[0]) ? n[o] = e.map((i) => i.map(a)) : n[o] = e.map(a));
|
|
9
|
-
}), n;
|
|
10
|
-
}, d = (t) => t.startsWith("http") ? t.split("amazonaws.com/")[1] : t, T = async (t, n, o) => {
|
|
11
|
-
const e = d(F(n, t)), i = d(O(n, t)), f = (await l.get(`${m}/handshake`)).data.public_key, y = s.util.decode64(f), g = s.asn1.fromDer(y), h = s.pki.publicKeyFromAsn1(g), k = w(o), c = JSON.stringify(k);
|
|
12
|
-
let p = "", r = 0;
|
|
13
|
-
for (; r < c.length; ) {
|
|
14
|
-
const S = c.slice(r, r + u);
|
|
15
|
-
r += u;
|
|
16
|
-
const z = h.encrypt(S, "RSA-OAEP", {
|
|
17
|
-
md: s.md.sha1.create(),
|
|
18
|
-
mgf1: { md: s.md.sha1.create() },
|
|
19
|
-
label: null
|
|
20
|
-
}), E = s.util.encode64(z);
|
|
21
|
-
p += E;
|
|
22
|
-
}
|
|
23
|
-
const A = {
|
|
24
|
-
chainId: t,
|
|
25
|
-
circuit_wasm: e,
|
|
26
|
-
circuit_zkey: i,
|
|
27
|
-
input: p
|
|
28
|
-
}, _ = await l.post(`${m}/generate`, A), { public_signals: b, zk_calldata: R } = _.data;
|
|
29
|
-
return { zkCallData: R, publicSignals: b };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
T as generateZkProofEnclave
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./getZKFiles.cjs"),l=require("../../webworker/performTaskWithWorker.cjs"),k=require("../../webworker/snarkjsWorker/snarkjsWorker.types.cjs"),c=require("../../webworker/worker.registry.cjs"),y=async(e,r,o)=>{const a=t.getWASMFile(r,e),s=t.getZKeyFile(r,e),{publicSignals:n,zkCallData:i}=await l.performTaskWithWorker({type:c.WorkerVariant.SnarkJS,payload:{type:k.SnarkJSWorkerActionType.FULL_PROVE,data:{input:o,chainId:e,wasmFilePath:a,zKeyFilePath:s}}});return{zkCallData:i,publicSignals:n}};exports.generateZkProofSelf=y;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getWASMFile as l, getZKeyFile as n } from "./getZKFiles.mjs";
|
|
2
|
-
import { performTaskWithWorker as m } from "../../webworker/performTaskWithWorker.mjs";
|
|
3
|
-
import { SnarkJSWorkerActionType as k } from "../../webworker/snarkjsWorker/snarkjsWorker.types.mjs";
|
|
4
|
-
import { WorkerVariant as s } from "../../webworker/worker.registry.mjs";
|
|
5
|
-
const F = async (t, r, o) => {
|
|
6
|
-
const e = l(r, t), a = n(r, t), { publicSignals: p, zkCallData: i } = await m({
|
|
7
|
-
type: s.SnarkJS,
|
|
8
|
-
payload: {
|
|
9
|
-
type: k.FULL_PROVE,
|
|
10
|
-
data: { input: o, chainId: t, wasmFilePath: e, zKeyFilePath: a }
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return { zkCallData: i, publicSignals: p };
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
F as generateZkProofSelf
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../constants/contracts.constants.cjs"),a=require("../../constants/chains.constants.cjs"),g=require("../../error-handling/error-codes.constants.cjs"),c=require("ethers"),s=(t,o)=>{const r=a.networkRegistry[o];if(!r)throw new Error(g.transactionErrorCodes.UNSUPPORTED_NETWORK);const e=d.contractMetadataMapping[t];if(!e)throw new Error(`Unsupported contractType: ${t}`);return e(r.contractData)},i=(t,o,r)=>{const e=s(t,o);if(!e.abi)throw new Error(`No ABI configured for contractType: ${t}`);if(e.address&&r)throw new Error(`Overriding address is not supported for contractType: ${t}`);const n=e.address??r;if(!n)throw new Error(`No contractAddress configured for contractType: ${t}`);return new c.ethers.Contract(n,e.abi)},h=(t,o,r=void 0)=>i(o,t,r).connect(new c.ethers.providers.StaticJsonRpcProvider(a.networkRegistry[t].fetchRpcUrl));exports.getContract=i;exports.getContractMetadata=s;exports.getContractWithFetcherByChainId=h;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ContractMetadata, ContractType } from '../../types/ethereum-network.types';
|
|
2
|
-
import { ethers } from 'ethers';
|
|
3
|
-
export declare const getContractMetadata: (contractType: ContractType, chainId: number) => ContractMetadata;
|
|
4
|
-
export declare const getContract: (contractType: ContractType, chainId: number, contractAddress?: string) => ethers.Contract;
|
|
5
|
-
export declare const getContractWithFetcherByChainId: (chainId: number, contractType: ContractType, contractAddress?: undefined) => ethers.Contract;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { contractMetadataMapping as s } from "../../constants/contracts.constants.mjs";
|
|
2
|
-
import { networkRegistry as a } from "../../constants/chains.constants.mjs";
|
|
3
|
-
import { transactionErrorCodes as i } from "../../error-handling/error-codes.constants.mjs";
|
|
4
|
-
import { ethers as c } from "ethers";
|
|
5
|
-
const d = (r, e) => {
|
|
6
|
-
const t = a[e];
|
|
7
|
-
if (!t)
|
|
8
|
-
throw new Error(i.UNSUPPORTED_NETWORK);
|
|
9
|
-
const o = s[r];
|
|
10
|
-
if (!o)
|
|
11
|
-
throw new Error(`Unsupported contractType: ${r}`);
|
|
12
|
-
return o(t.contractData);
|
|
13
|
-
}, f = (r, e, t) => {
|
|
14
|
-
const o = d(r, e);
|
|
15
|
-
if (!o.abi)
|
|
16
|
-
throw new Error(`No ABI configured for contractType: ${r}`);
|
|
17
|
-
if (o.address && t)
|
|
18
|
-
throw new Error(`Overriding address is not supported for contractType: ${r}`);
|
|
19
|
-
const n = o.address ?? t;
|
|
20
|
-
if (!n)
|
|
21
|
-
throw new Error(`No contractAddress configured for contractType: ${r}`);
|
|
22
|
-
return new c.Contract(n, o.abi);
|
|
23
|
-
}, m = (r, e, t = void 0) => f(e, r, t).connect(
|
|
24
|
-
new c.providers.StaticJsonRpcProvider(a[r].fetchRpcUrl)
|
|
25
|
-
);
|
|
26
|
-
export {
|
|
27
|
-
f as getContract,
|
|
28
|
-
d as getContractMetadata,
|
|
29
|
-
m as getContractWithFetcherByChainId
|
|
30
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { NewZkCallDataType } from './snark.types';
|
|
2
|
-
export type HandshakeResponseType = {
|
|
3
|
-
public_key: string;
|
|
4
|
-
};
|
|
5
|
-
export type RemoteProofType = {
|
|
6
|
-
pi_a: string[];
|
|
7
|
-
pi_b: string[][];
|
|
8
|
-
pi_c: string[];
|
|
9
|
-
protocol: string;
|
|
10
|
-
};
|
|
11
|
-
export type GenerateProofResponseType = {
|
|
12
|
-
proof: RemoteProofType;
|
|
13
|
-
public_signals: string[];
|
|
14
|
-
zk_calldata: NewZkCallDataType;
|
|
15
|
-
};
|