@hinkal/common 0.2.2 → 0.2.4
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 +3 -2
- package/API/userVerifyTransactions.cjs +1 -1
- package/API/userVerifyTransactions.d.ts +6 -7
- package/API/userVerifyTransactions.mjs +13 -14
- package/README.md +32 -22
- 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 +138 -134
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +846 -11
- package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-avalanche.json.mjs +848 -13
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +852 -17
- package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +855 -20
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +850 -15
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +935 -100
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +844 -9
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +844 -9
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +30 -18
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +3 -2
- package/constants/server.constants.mjs +7 -6
- 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 +4 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.mjs +4 -1
- package/constants/token-data/avalancheRegistry.json.cjs +1 -1
- package/constants/token-data/avalancheRegistry.json.mjs +4 -1
- package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
- package/constants/token-data/avalancheRegistryFixed.json.mjs +4 -1
- package/constants/token-data/baseRegistry.json.cjs +1 -1
- package/constants/token-data/baseRegistry.json.mjs +4 -1
- package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
- package/constants/token-data/baseRegistryFixed.json.mjs +4 -1
- package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistry.json.mjs +12 -9
- package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +12 -9
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +15 -12
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +15 -12
- package/constants/token-data/index.cjs +1 -0
- package/constants/token-data/index.d.ts +972 -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 +15 -12
- package/constants/token-data/optimismRegistry.json.cjs +1 -1
- package/constants/token-data/optimismRegistry.json.mjs +4 -1
- package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
- package/constants/token-data/optimismRegistryFixed.json.mjs +4 -1
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +4 -1
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +4 -1
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +2 -0
- package/data-structures/Hinkal/Hinkal.mjs +38 -32
- package/data-structures/Hinkal/IHinkal.d.ts +2 -0
- package/data-structures/Hinkal/hinkalActionBeefy.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionBeefy.mjs +21 -20
- package/data-structures/Hinkal/hinkalActionConvex.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionConvex.mjs +13 -12
- package/data-structures/Hinkal/hinkalActionCurve.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionCurve.mjs +15 -14
- package/data-structures/Hinkal/hinkalActionLidoEth.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionLidoEth.mjs +17 -16
- package/data-structures/Hinkal/hinkalActionPendle.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionPendle.mjs +24 -23
- package/data-structures/Hinkal/hinkalActionPendleLP.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionPendleLP.mjs +21 -20
- package/data-structures/Hinkal/hinkalActionStake.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionStake.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionStake.mjs +6 -5
- package/data-structures/Hinkal/hinkalActionVolatile.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
- package/data-structures/Hinkal/hinkalActionVolatile.mjs +9 -8
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.d.ts +2 -2
- package/data-structures/Hinkal/hinkalDeposit.mjs +93 -54
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +3 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +5 -4
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +23 -22
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.d.ts +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +13 -12
- package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/data-structures/merkle-tree/MerkleTree.d.ts +2 -0
- package/data-structures/merkle-tree/MerkleTree.mjs +38 -25
- 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 +9 -0
- package/data-structures/merkle-tree/index.d.ts +1 -0
- package/data-structures/transactions-manager/TransactionsManager.cjs +1 -1
- package/data-structures/transactions-manager/TransactionsManager.d.ts +6 -5
- package/data-structures/transactions-manager/TransactionsManager.mjs +118 -111
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +4 -0
- package/error-handling/error-codes.constants.mjs +6 -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/process-gas-estimates.cjs +1 -1
- package/functions/pre-transaction/process-gas-estimates.mjs +3 -2
- package/functions/private-wallet/opProducer.cjs +1 -1
- package/functions/private-wallet/opProducer.mjs +9 -10
- package/functions/protocols/convex.protocols.cjs +1 -1
- package/functions/protocols/convex.protocols.mjs +3 -2
- package/functions/protocols/pendle.helpers.cjs +1 -1
- package/functions/protocols/pendle.helpers.mjs +14 -13
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +1 -0
- package/functions/snarkjs/constant.mjs +6 -5
- 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 +76 -75
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.d.ts +1 -1
- package/functions/snarkjs/generateZkProof.mjs +4 -15
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -0
- package/functions/snarkjs/generateZkProofEnclave.d.ts +5 -0
- package/functions/snarkjs/generateZkProofEnclave.mjs +33 -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/utils/axelar.utils.cjs +1 -1
- package/functions/utils/axelar.utils.mjs +3 -2
- package/functions/utils/cacheDevice.utils.cjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +9 -8
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.mjs +8 -7
- package/functions/utils/evmNetworkFunctions.cjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +4 -3
- 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 +43 -29
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +10 -8
- 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/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.d.ts +1 -2
- package/functions/web3/odosAPI.mjs +19 -18
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.d.ts +1 -2
- package/functions/web3/oneInchAPI.mjs +17 -15
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.d.ts +4 -4
- package/functions/web3/uniswapAPI.mjs +54 -43
- package/index.cjs +1 -1
- package/index.mjs +617 -638
- package/package.json +4 -3
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +1 -0
- package/providers/EthersProviderAdapter.mjs +26 -37
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +1 -1
- package/providers/WagmiProviderAdapter.mjs +52 -66
- package/providers/exportProviers.d.ts +1 -1
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +4 -2
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +4 -2
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +62 -59
- package/types/ethereum-network.types.mjs +1 -1
- package/types/hinkal.types.d.ts +4 -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 +5 -0
- 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/API/API.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./referralProgramCalls.cjs"),r=require("./rewardsPointsCalls.cjs"),s=require("./userVerifyTransactions.cjs"),n=require("./relayCalls.cjs"),o=require("./passwordCalls.cjs"),a=require("./getTokenPrice.cjs"),t=require("./kycCalls.cjs"),c=require("./callOdosAPI.cjs"),g=require("./dataServerCalls.cjs"),i=require("./HinkalPointsCalls.cjs"),d={getUserKycStatus:t.getUserKycStatus,setAiPriseVerificationUrl:t.setAiPriseVerificationUrl,getAccessTokenSignature:t.getAccessTokenSignature,getReclaimVerificationRequest:t.getReclaimVerificationRequest,getZkMeAccessToken:t.getZkMeAccessToken,userHasAccessToken:t.userHasAccessToken,afterKycCall:t.afterKycCall,getTokenPrice:a.getTokenPrice,getTokenPriceEth:a.getTokenPriceEth,getTokenPrices:a.getTokenPrices,getOdosPriceForToken:c.getOdosPriceForToken,getActiveCode:e.getActiveCode,updateActiveCode:e.updateActiveCode,getWeeklyReferralCodes:e.getWeeklyReferralCodes,getReferralCodes:e.getReferralCodes,addReferralCode:e.addReferralCode,getLpProgram:e.getLpProgram,addNickname:r.addNickname,getNickname:r.getNickname,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./referralProgramCalls.cjs"),r=require("./rewardsPointsCalls.cjs"),s=require("./userVerifyTransactions.cjs"),n=require("./relayCalls.cjs"),o=require("./passwordCalls.cjs"),a=require("./getTokenPrice.cjs"),t=require("./kycCalls.cjs"),c=require("./callOdosAPI.cjs"),g=require("./dataServerCalls.cjs"),i=require("./HinkalPointsCalls.cjs"),d={getUserKycStatus:t.getUserKycStatus,setAiPriseVerificationUrl:t.setAiPriseVerificationUrl,getAccessTokenSignature:t.getAccessTokenSignature,getReclaimVerificationRequest:t.getReclaimVerificationRequest,getZkMeAccessToken:t.getZkMeAccessToken,userHasAccessToken:t.userHasAccessToken,afterKycCall:t.afterKycCall,getTokenPrice:a.getTokenPrice,getTokenPriceEth:a.getTokenPriceEth,getTokenPrices:a.getTokenPrices,getOdosPriceForToken:c.getOdosPriceForToken,getActiveCode:e.getActiveCode,updateActiveCode:e.updateActiveCode,getWeeklyReferralCodes:e.getWeeklyReferralCodes,getReferralCodes:e.getReferralCodes,addReferralCode:e.addReferralCode,getLpProgram:e.getLpProgram,addNickname:r.addNickname,getNickname:r.getNickname,userGetLatestCertifiedHashes:s.userGetLatestCertifiedHashes,userGetTransactions:s.userGetTransactions,userVerifyTransactions:s.userVerifyTransactions,points:r.points,leaderboard:r.leaderboard,seasonLeaderboard:r.seasonLeaderboard,getIdleRelay:n.getIdleRelay,userHasPassword:o.userHasPassword,userRegisterPassword:o.userRegisterPassword,getRewardsHistory:e.getRewardsHistory,setRewardsReceivingData:e.setRewardsReceivingData,getRewardsReceivingData:e.getRewardsReceivingData,getUserPoints:g.getUserPoints,getLimitedAnonymityStakingPoints:i.getLimitedAnonymityStakingPoints,getUserAnonymityStakingPoints:i.getUserAnonymityStakingPoints,getUserAnonymityStakingReferralPoints:i.getUserAnonymityStakingReferralPoints};exports.API=d;
|
package/API/API.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { addReferralCode, getActiveCode, getLpProgram, getReferralCodes, getRewardsHistory, getRewardsReceivingData, getWeeklyReferralCodes, setRewardsReceivingData, updateActiveCode } from './referralProgramCalls';
|
|
2
2
|
import { addNickname, getNickname, leaderboard, points, seasonLeaderboard } from './rewardsPointsCalls';
|
|
3
|
-
import { userGetTransactions, userVerifyTransactions
|
|
3
|
+
import { userGetLatestCertifiedHashes, userGetTransactions, userVerifyTransactions } from './userVerifyTransactions';
|
|
4
4
|
import { getIdleRelay } from './relayCalls';
|
|
5
5
|
import { userHasPassword, userRegisterPassword } from './passwordCalls';
|
|
6
6
|
import { getTokenPrice, getTokenPriceEth, getTokenPrices } from './getTokenPrice';
|
|
@@ -28,7 +28,7 @@ export type IAPI = {
|
|
|
28
28
|
getNickname: typeof getNickname;
|
|
29
29
|
userHasAccessToken: typeof userHasAccessToken;
|
|
30
30
|
afterKycCall: typeof afterKycCall;
|
|
31
|
-
|
|
31
|
+
userGetLatestCertifiedHashes: typeof userGetLatestCertifiedHashes;
|
|
32
32
|
userGetTransactions: typeof userGetTransactions;
|
|
33
33
|
userVerifyTransactions: typeof userVerifyTransactions;
|
|
34
34
|
getIdleRelay: typeof getIdleRelay;
|
package/API/API.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { getActiveCode as e, updateActiveCode as t, getWeeklyReferralCodes as r, getReferralCodes as o, addReferralCode as i, getLpProgram as s, getRewardsHistory as a, setRewardsReceivingData as n, getRewardsReceivingData as g } from "./referralProgramCalls.mjs";
|
|
2
2
|
import { addNickname as m, getNickname as c, points as d, leaderboard as f, seasonLeaderboard as k } from "./rewardsPointsCalls.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { userGetLatestCertifiedHashes as p, userGetTransactions as P, userVerifyTransactions as R } from "./userVerifyTransactions.mjs";
|
|
4
4
|
import { getIdleRelay as l } from "./relayCalls.mjs";
|
|
5
|
-
import { userHasPassword as y, userRegisterPassword as
|
|
6
|
-
import { getTokenPrice as
|
|
7
|
-
import { getUserKycStatus as
|
|
8
|
-
import { getOdosPriceForToken as
|
|
9
|
-
import { getUserPoints as
|
|
10
|
-
import { getLimitedAnonymityStakingPoints as
|
|
5
|
+
import { userHasPassword as y, userRegisterPassword as u } from "./passwordCalls.mjs";
|
|
6
|
+
import { getTokenPrice as A, getTokenPriceEth as T, getTokenPrices as C } from "./getTokenPrice.mjs";
|
|
7
|
+
import { getUserKycStatus as w, setAiPriseVerificationUrl as S, getAccessTokenSignature as U, getReclaimVerificationRequest as v, getZkMeAccessToken as H, userHasAccessToken as L, afterKycCall as V } from "./kycCalls.mjs";
|
|
8
|
+
import { getOdosPriceForToken as b } from "./callOdosAPI.mjs";
|
|
9
|
+
import { getUserPoints as h } from "./dataServerCalls.mjs";
|
|
10
|
+
import { getLimitedAnonymityStakingPoints as D, getUserAnonymityStakingPoints as G, getUserAnonymityStakingReferralPoints as I } from "./HinkalPointsCalls.mjs";
|
|
11
11
|
const j = {
|
|
12
12
|
// KYC
|
|
13
|
-
getUserKycStatus:
|
|
14
|
-
setAiPriseVerificationUrl:
|
|
15
|
-
getAccessTokenSignature:
|
|
16
|
-
getReclaimVerificationRequest:
|
|
17
|
-
getZkMeAccessToken:
|
|
18
|
-
userHasAccessToken:
|
|
19
|
-
afterKycCall:
|
|
13
|
+
getUserKycStatus: w,
|
|
14
|
+
setAiPriseVerificationUrl: S,
|
|
15
|
+
getAccessTokenSignature: U,
|
|
16
|
+
getReclaimVerificationRequest: v,
|
|
17
|
+
getZkMeAccessToken: H,
|
|
18
|
+
userHasAccessToken: L,
|
|
19
|
+
afterKycCall: V,
|
|
20
20
|
// Prices
|
|
21
|
-
getTokenPrice:
|
|
21
|
+
getTokenPrice: A,
|
|
22
22
|
getTokenPriceEth: T,
|
|
23
23
|
getTokenPrices: C,
|
|
24
|
-
getOdosPriceForToken:
|
|
24
|
+
getOdosPriceForToken: b,
|
|
25
25
|
// Referral Codes
|
|
26
26
|
getActiveCode: e,
|
|
27
27
|
updateActiveCode: t,
|
|
@@ -33,7 +33,7 @@ const j = {
|
|
|
33
33
|
addNickname: m,
|
|
34
34
|
getNickname: c,
|
|
35
35
|
// Transaction Verifications
|
|
36
|
-
|
|
36
|
+
userGetLatestCertifiedHashes: p,
|
|
37
37
|
userGetTransactions: P,
|
|
38
38
|
userVerifyTransactions: R,
|
|
39
39
|
points: d,
|
|
@@ -43,16 +43,16 @@ const j = {
|
|
|
43
43
|
getIdleRelay: l,
|
|
44
44
|
// password
|
|
45
45
|
userHasPassword: y,
|
|
46
|
-
userRegisterPassword:
|
|
46
|
+
userRegisterPassword: u,
|
|
47
47
|
getRewardsHistory: a,
|
|
48
48
|
setRewardsReceivingData: n,
|
|
49
49
|
getRewardsReceivingData: g,
|
|
50
50
|
// points
|
|
51
|
-
getUserPoints:
|
|
51
|
+
getUserPoints: h,
|
|
52
52
|
// AnonymityStakingPoints
|
|
53
|
-
getLimitedAnonymityStakingPoints:
|
|
54
|
-
getUserAnonymityStakingPoints:
|
|
55
|
-
getUserAnonymityStakingReferralPoints:
|
|
53
|
+
getLimitedAnonymityStakingPoints: D,
|
|
54
|
+
getUserAnonymityStakingPoints: G,
|
|
55
|
+
getUserAnonymityStakingReferralPoints: I
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
j as API
|
package/API/duneAPI.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),a=require("./getServerURL.cjs");require("../constants/chains.constants.cjs");require("../constants/vite.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");const u=require("../constants/server.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const n=async(e,r)=>{const{balances:t}=(await i.get(`${a.getServerURL(r)}${u.API_CONFIG.ROUTES.getPublicWalletInformation(e)}`)).data;return t};exports.getPublicWalletBalance=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),a=require("./getServerURL.cjs");require("../constants/token-data/index.cjs");require("../constants/chains.constants.cjs");require("../constants/vite.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");const u=require("../constants/server.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const n=async(e,r)=>{const{balances:t}=(await i.get(`${a.getServerURL(r)}${u.API_CONFIG.ROUTES.getPublicWalletInformation(e)}`)).data;return t};exports.getPublicWalletBalance=n;
|
package/API/duneAPI.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import i from "axios";
|
|
2
2
|
import { getServerURL as m } from "./getServerURL.mjs";
|
|
3
|
+
import "../constants/token-data/index.mjs";
|
|
3
4
|
import "../constants/chains.constants.mjs";
|
|
4
5
|
import "../constants/vite.constants.mjs";
|
|
5
6
|
import "../constants/contracts.constants.mjs";
|
|
@@ -9,12 +10,12 @@ import "../constants/coingecko.constants.mjs";
|
|
|
9
10
|
import "../constants/axelar.constants.mjs";
|
|
10
11
|
import "../constants/rewards.constants.mjs";
|
|
11
12
|
import "../constants/reorg-depths.constants.mjs";
|
|
12
|
-
const
|
|
13
|
+
const x = async (t, o) => {
|
|
13
14
|
const { balances: r } = (await i.get(
|
|
14
15
|
`${m(o)}${a.ROUTES.getPublicWalletInformation(t)}`
|
|
15
16
|
)).data;
|
|
16
17
|
return r;
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
x as getPublicWalletBalance
|
|
20
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),n=require("./getServerURL.cjs"),i=require("../constants/server.constants.cjs"),c=async(e,t)=>{const{data:s}=await a.get(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userGetLatestCertifiedHashes(t)}`);return s},u=async(e,t,s,r)=>(await a.get(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userGetTransactions(t,s,r)}`)).data,T=async(e,t,s,r,o)=>(await a.post(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userVerifyTransactions}`,{transactionHashes:t,zkCallDataArray:s,backendToken:r,ethereumAddress:o})).data;exports.userGetLatestCertifiedHashes=c;exports.userGetTransactions=u;exports.userVerifyTransactions=T;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { NewZkCallDataType } from '../types/snark.types';
|
|
2
2
|
import { RawTx } from '../types/transactions.types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
hasCertifiedAll: boolean;
|
|
3
|
+
import { HashInfoByChain } from '../types';
|
|
4
|
+
interface IUserGetLatestCertifiedHashes {
|
|
5
|
+
lastCertifiedHashes: HashInfoByChain;
|
|
7
6
|
}
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const userGetLatestCertifiedHashes: (chainId: number, ethereumAddress: string) => Promise<IUserGetLatestCertifiedHashes>;
|
|
9
8
|
interface IUserGetTransactions {
|
|
10
9
|
transactions: RawTx[];
|
|
11
10
|
}
|
|
12
|
-
export declare const userGetTransactions: (chainId: number, week?: number, lastHash?: string) => Promise<IUserGetTransactions>;
|
|
11
|
+
export declare const userGetTransactions: (chainId: number, week?: number, lastHash?: string, startWeek?: number) => Promise<IUserGetTransactions>;
|
|
13
12
|
interface IUserVerifyTransactions {
|
|
14
13
|
trade: number;
|
|
15
14
|
transactions: number;
|
|
16
15
|
lockedDeposit: number;
|
|
17
16
|
verification: boolean;
|
|
18
17
|
}
|
|
19
|
-
export declare const userVerifyTransactions: (chainId: number, transactionHashes: string[], zkCallDataArray: NewZkCallDataType[], backendToken: string, ethereumAddress: string
|
|
18
|
+
export declare const userVerifyTransactions: (chainId: number, transactionHashes: string[], zkCallDataArray: NewZkCallDataType[], backendToken: string, ethereumAddress: string) => Promise<IUserVerifyTransactions>;
|
|
20
19
|
export {};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "axios";
|
|
2
2
|
import { getServerURL as n } from "./getServerURL.mjs";
|
|
3
|
-
import { API_CONFIG as
|
|
4
|
-
const
|
|
5
|
-
const { data: r } = await
|
|
6
|
-
`${n(t)}${
|
|
3
|
+
import { API_CONFIG as o } from "../constants/server.constants.mjs";
|
|
4
|
+
const m = async (t, s) => {
|
|
5
|
+
const { data: r } = await e.get(
|
|
6
|
+
`${n(t)}${o.ROUTES.userGetLatestCertifiedHashes(s)}`
|
|
7
7
|
);
|
|
8
8
|
return r;
|
|
9
|
-
}, $ = async (t,
|
|
10
|
-
`${n(t)}${
|
|
11
|
-
)).data,
|
|
12
|
-
transactionHashes:
|
|
9
|
+
}, $ = async (t, s, r, a) => (await e.get(
|
|
10
|
+
`${n(t)}${o.ROUTES.userGetTransactions(s, r, a)}`
|
|
11
|
+
)).data, d = async (t, s, r, a, i) => (await e.post(`${n(t)}${o.ROUTES.userVerifyTransactions}`, {
|
|
12
|
+
transactionHashes: s,
|
|
13
13
|
zkCallDataArray: r,
|
|
14
|
-
backendToken:
|
|
15
|
-
ethereumAddress: i
|
|
16
|
-
week: c
|
|
14
|
+
backendToken: a,
|
|
15
|
+
ethereumAddress: i
|
|
17
16
|
})).data;
|
|
18
17
|
export {
|
|
18
|
+
m as userGetLatestCertifiedHashes,
|
|
19
19
|
$ as userGetTransactions,
|
|
20
|
-
|
|
21
|
-
S as verificationStartDate
|
|
20
|
+
d as userVerifyTransactions
|
|
22
21
|
};
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Hinkal SDK
|
|
2
2
|
|
|
3
|
-
Hinkal is
|
|
3
|
+
Hinkal is middleware and a set of smart contracts on EVM chains that use ZK-proofs and stealth addresses to enable compliant and private transactions on major dApps. Users can privately store assets and transact on platforms such as Uniswap, Pendle, Lido, Curve, and others.
|
|
4
4
|
|
|
5
|
-
This SDK
|
|
5
|
+
This SDK enables users to perform arbitrary smart contract interactions privately.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -20,35 +20,38 @@ yarn add @hinkal/common
|
|
|
20
20
|
|
|
21
21
|
### Usage
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
#### Initialization
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
import { Hinkal } from '@hinkal/common';
|
|
27
|
-
|
|
28
|
-
const hinkal = new Hinkal<Connector>();
|
|
29
|
-
```
|
|
25
|
+
To get started with Hinkal, initialize it based on the Web3 connection library you’re using:
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
**ethers.js:**
|
|
32
28
|
|
|
33
29
|
```typescript
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
import { prepareEthersHinkal } from '@hinkal/common/providers/prepareEthersHinkal';
|
|
31
|
+
// signer: ethers.Signer
|
|
32
|
+
const hinkal = await prepareEthersHinkal(signer);
|
|
36
33
|
```
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
**wagmi:**
|
|
39
36
|
|
|
40
37
|
```typescript
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
import { prepareWagmiHinkal } from '@hinkal/common/providers/prepareWagmiHinkal';
|
|
39
|
+
// connector: wagmi.Connector
|
|
40
|
+
// config: wagmi.Config
|
|
41
|
+
const hinkal = await prepareWagmiHinkal(connector, config);
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
#### Shielded balance
|
|
45
|
+
|
|
46
|
+
Once the Hinkal object is initialized, shielded balances become accessible and can be calculated as needed:
|
|
46
47
|
|
|
47
48
|
```typescript
|
|
48
49
|
const balances = await hinkal.getBalances();
|
|
49
50
|
```
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
#### Depositing funds to the shielded balance
|
|
53
|
+
|
|
54
|
+
A user can deposit funds to their shielded address using:
|
|
52
55
|
|
|
53
56
|
```typescript
|
|
54
57
|
function deposit(erc20addresses: string[], amountChanges: bigint[]): Promise<TransactionObject>;
|
|
@@ -56,7 +59,9 @@ function deposit(erc20addresses: string[], amountChanges: bigint[]): Promise<Tra
|
|
|
56
59
|
|
|
57
60
|
where erc20Addresses is an array of token addresses, and amountChanges represents the token amounts for the deposit.
|
|
58
61
|
|
|
59
|
-
|
|
62
|
+
#### Interacting with smart contracts privately
|
|
63
|
+
|
|
64
|
+
After a user’s shielded balance is updated, they can perform any smart contract interaction privately using:
|
|
60
65
|
|
|
61
66
|
```typescript
|
|
62
67
|
function actionPrivateWallet(
|
|
@@ -67,27 +72,32 @@ function actionPrivateWallet(
|
|
|
67
72
|
): Promise<TransactionObject>;
|
|
68
73
|
```
|
|
69
74
|
|
|
70
|
-
where onChainCreation indicates the amounts of tokens that are uncertain before the transaction is executed on-chain. The ops array
|
|
75
|
+
where onChainCreation indicates the amounts of tokens that are uncertain before the transaction is executed on-chain. The ops array contains encoded user operations.
|
|
71
76
|
|
|
72
77
|
### Access Tokens
|
|
73
78
|
|
|
74
|
-
Before interacting with Hinkal smart contracts,
|
|
79
|
+
Before interacting with Hinkal smart contracts, users need to mint an access token after passing compliance checks.
|
|
75
80
|
|
|
76
|
-
To check whether
|
|
81
|
+
To check whether a user already has an access token, use the checkAccessToken function:
|
|
77
82
|
|
|
78
83
|
```typescript
|
|
79
84
|
function checkAccessToken(): Promise<boolean>;
|
|
80
85
|
```
|
|
81
86
|
|
|
82
|
-
If the user does not have an access token, one of the compliance providers
|
|
87
|
+
If the user does not have an access token, they must use one of the compliance providers to pass the check. To view the available providers:
|
|
83
88
|
|
|
84
89
|
```typescript
|
|
85
90
|
function getSupportedPassportLinks(): string[];
|
|
86
91
|
```
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
After passing the compliance check, the user can mint an access token using:
|
|
89
94
|
|
|
90
95
|
```typescript
|
|
91
96
|
const { signatureData } = await hinkal.getAPI().getAccessTokenSignature(chainId, ethereumAddress, accessKey);
|
|
92
97
|
await mintAccessToken(this, signatureData);
|
|
93
98
|
```
|
|
99
|
+
|
|
100
|
+
### References
|
|
101
|
+
|
|
102
|
+
Application: [Hinkal](https://app.hinkal.pro)
|
|
103
|
+
Docs: [Hinkal Documentation](https://hinkal-team.gitbook.io/hinkal)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),l=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),h=require("./deploy-data/deploy-data-optimism.json.cjs"),u=require("./deploy-data/deploy-data-polygon.json.cjs"),m=require("./deploy-data/deploy-data-avalanche.json.cjs"),b=require("./deploy-data/deploy-data-base.json.cjs"),F=require("./deploy-data/deploy-data-localhost.json.cjs"),y=require("./deploy-data/deploy-data-axelar1.json.cjs"),g=require("./deploy-data/deploy-data-axelar2.json.cjs"),s=require("./vite.constants.cjs"),e={polygon:137,arbMainnet:42161,ethMainnet:1,avalanche:43114,bnbMainnet:56,optimism:10,base:8453,bnbTestnet:97,polygonMumbai:80001,mainnetSepolia:11155111,optimismSepolia:11155420,axelar1:2500,axelar2:2501,localhost:31337,hardhat:31337},n=e.ethMainnet,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./deploy-data/deploy-data-bnbMainnet.json.cjs"),l=require("./deploy-data/deploy-data-arbMainnet.json.cjs"),d=require("./deploy-data/deploy-data-ethMainnet.json.cjs"),h=require("./deploy-data/deploy-data-optimism.json.cjs"),u=require("./deploy-data/deploy-data-polygon.json.cjs"),m=require("./deploy-data/deploy-data-avalanche.json.cjs"),b=require("./deploy-data/deploy-data-base.json.cjs"),F=require("./deploy-data/deploy-data-localhost.json.cjs"),y=require("./deploy-data/deploy-data-axelar1.json.cjs"),g=require("./deploy-data/deploy-data-axelar2.json.cjs"),s=require("./vite.constants.cjs"),e={polygon:137,arbMainnet:42161,ethMainnet:1,avalanche:43114,bnbMainnet:56,optimism:10,base:8453,bnbTestnet:97,polygonMumbai:80001,mainnetSepolia:11155111,optimismSepolia:11155420,axelar1:2500,axelar2:2501,localhost:31337,hardhat:31337},n=e.ethMainnet,r=t=>!![e.axelar1,e.axelar2,e.localhost].includes(t),k=t=>t?r(t)?n:t:n,a={[e.ethMainnet]:{name:"Ethereum",chainId:e.ethMainnet,rpcUrl:"https://rpc.ankr.com/eth",fetchRpcUrl:"https://eth-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:d.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:1,privateMempoolRpcUrl:"https://relay.flashbots.net"},[e.arbMainnet]:{name:"Arbitrum",chainId:e.arbMainnet,rpcUrl:"https://endpoints.omniatech.io/v1/arbitrum/one/public",fetchRpcUrl:"https://arb-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:l.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:2},[e.optimism]:{name:"Optimism",chainId:e.optimism,rpcUrl:"https://optimism-mainnet.infura.io/v3/c26b99456bb6464bb498926ff5162903",fetchRpcUrl:"https://opt-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:h.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:3},[e.polygon]:{name:"Polygon",chainId:e.polygon,rpcUrl:"https://polygon-rpc.com",fetchRpcUrl:"https://polygon-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:u.default,quoterV2Address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",uniswapV3FactoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",accessTokenMintingFee:"0",priority:4},[e.avalanche]:{name:"Avalanche",chainId:e.avalanche,rpcUrl:"https://api.avax.network/ext/bc/C/rpc",fetchRpcUrl:"https://avax-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:m.default,quoterV2Address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",uniswapV3FactoryAddress:"0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD",accessTokenMintingFee:"0",priority:5},[e.bnbMainnet]:{name:"BNB Chain",chainId:e.bnbMainnet,rpcUrl:"https://bsc-dataseed.binance.org",fetchRpcUrl:"https://bnb-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:p.default,quoterV2Address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",uniswapV3FactoryAddress:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",accessTokenMintingFee:"0",priority:6},[e.base]:{name:"Base",chainId:e.base,rpcUrl:"https://mainnet.base.org/",fetchRpcUrl:"https://base-mainnet.g.alchemy.com/v2/XzUgeU8YiIIzkD7j2GWnTsFUck7wGgK9",supported:!0,contractData:b.default,quoterV2Address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",uniswapV3FactoryAddress:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",accessTokenMintingFee:"0",priority:7},...s.isDevelopment?{}:{}},A={name:"Localhost",chainId:e.localhost,rpcUrl:"http://127.0.0.1:8545",fetchRpcUrl:"http://127.0.0.1:8545",supported:!0,contractData:F.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:7},f={name:"axelar1",chainId:e.axelar1,rpcUrl:"http://localhost:8600/0",fetchRpcUrl:"http://localhost:8600/0",supported:!0,contractData:y.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:8},D={name:"axelar2",chainId:e.axelar2,rpcUrl:"http://localhost:8600/1",fetchRpcUrl:"http://localhost:8600/1",supported:!0,contractData:g.default,quoterV2Address:a[n].quoterV2Address,uniswapV3FactoryAddress:a[n].uniswapV3FactoryAddress,accessTokenMintingFee:a[n].accessTokenMintingFee,priority:9};s.isDevelopment&&(a[e.localhost]=A,a[e.axelar1]=f,a[e.axelar2]=D);const U=[e.ethMainnet,e.arbMainnet,e.avalanche,e.bnbMainnet,e.polygon,e.optimism,e.base];var o=(t=>(t.Mainnet="Mainnet",t.Testnet="Testnet",t.Local="Local",t))(o||{});const M={Mainnet:[e.polygon,e.arbMainnet,e.ethMainnet,e.bnbMainnet,e.optimism,e.avalanche,e.base],Testnet:[e.bnbTestnet,e.polygonMumbai],Local:[e.localhost,e.axelar1,e.axelar2]},c=t=>[e.optimism,e.base].includes(t),i=t=>!1,x=t=>c(t)||i();exports.EthereumNetworkType=o;exports.chainIds=e;exports.chainIdsByType=M;exports.crossChainAccessTokenNetworks=U;exports.getNonLocalhostChainId=k;exports.isLocalNetwork=r;exports.isOptimismBedrockLike=i;exports.isOptimismEcotoneLike=c;exports.isOptimismLike=x;exports.localhostNetwork=n;exports.networkRegistry=a;
|
|
@@ -117,8 +117,8 @@ const t = {
|
|
|
117
117
|
}, u = {
|
|
118
118
|
name: "Localhost",
|
|
119
119
|
chainId: t.localhost,
|
|
120
|
-
rpcUrl: "http://
|
|
121
|
-
fetchRpcUrl: "http://
|
|
120
|
+
rpcUrl: "http://127.0.0.1:8545",
|
|
121
|
+
fetchRpcUrl: "http://127.0.0.1:8545",
|
|
122
122
|
supported: !0,
|
|
123
123
|
contractData: m,
|
|
124
124
|
quoterV2Address: e[n].quoterV2Address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("ethers"),y=require("../externalABIs/BeefyVaultAbi.json.cjs"),T=require("../externalABIs/CurveReadingWrapperAbi.json.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("ethers"),y=require("../externalABIs/BeefyVaultAbi.json.cjs"),T=require("../externalABIs/CurveReadingWrapperAbi.json.cjs"),f=require("../externalABIs/CurveWrappedMainPool.json.cjs"),k=require("../externalABIs/ERC20.json.cjs"),v=require("../externalABIs/IQuoterV2.json.cjs"),I=require("../externalABIs/IUniswapV3Factory.json.cjs"),w=require("../externalABIs/LidoStEthAbi.json.cjs"),h=require("../externalABIs/LidoStMaticAbi.json.cjs"),x=require("../externalABIs/LidoWithdrawalQueueERC721Abi.json.cjs"),m=require("../externalABIs/PoLidoNftAbi.json.cjs"),B=require("../externalABIs/LidoWstEthAbi.json.cjs"),P=require("../externalABIs/LidoStakeManagerAbi.json.cjs"),S=require("../externalABIs/BeefyRouterAbi.json.cjs"),L=require("../externalABIs/BeefyStrategyAbi.json.cjs"),W=require("../externalABIs/BeefyZapAbi.json.cjs"),g=require("../externalABIs/BeefyZapOneInchAbi.json.cjs"),E=require("../externalABIs/ConvexBoosterAbi.json.cjs"),q=require("../externalABIs/ConvexBoosterAbiMainnet.json.cjs"),V=require("../externalABIs/ConvexRewardPoolAbi.json.cjs"),M=require("../externalABIs/CurveZap.json.cjs"),_=require("../externalABIs/CvxCrvUtilities.json.cjs"),R=require("../externalABIs/PendleRouterAbi.json.cjs"),H=require("../externalABIs/IUniswapV3Pool.json.cjs"),N=require("../externalABIs/UniswapV2PoolAbi.json.cjs"),s=require("./chains.constants.cjs"),t=require("../types/ethereum-network.types.cjs"),a=require("./lido.constants.cjs"),c={abi:I.default.abi},u={abi:H.default.abi},l={abi:N.default.abi},d={abi:v.default.abi},O=new n.ethers.utils.Interface(["function coins(int128 arg0) external view returns (address)"]),U=new n.ethers.utils.Interface(["function balances(int128 arg0) external view returns (uint256)"]),r=e=>new n.ethers.utils.Interface([`function calc_token_amount(uint256[${e||""}] _amounts, bool is_deposit) external view returns (uint256)`,"function coins(uint256 arg0) external view returns (address)","function calc_withdraw_one_coin(uint256 token_amount, uint256 i) external view returns (uint256)","function fee() external view returns (uint256)"]),o=e=>new n.ethers.utils.Interface([`function calc_token_amount(uint256[${e}] _amounts) external view returns (uint256)`,"function coins(uint256 arg0) external view returns (address)","function calc_withdraw_one_coin(uint256 token_amount, uint256 i) external view returns (uint256)","function fee() external view returns (uint256)"]),Q=new n.ethers.utils.Interface(["function claimable_tokens(address addr) external view returns (uint256)"]),Z=new n.ethers.utils.Interface(["function lockedSupply() external view returns (uint256)"]),F=new n.ethers.utils.Interface(["function checkpoint(uint256 lpBalance, uint256 prevTimeStamp, uint256 currentTimeStamp) external returns (uint256, uint256[] memory)","function claimable(uint256 lpBalance, uint256 prevTimeStamp) external returns (uint256, uint256[] memory)"]),G={[t.ContractType.HinkalContract]:e=>({abi:e.hinkalABI,address:e.hinkalAddress}),[t.ContractType.HinkalHelperContract]:e=>({abi:e.hinkalHelperABI,address:e.hinkalHelperAddress}),[t.ContractType.CrossChainAccessTokenContract]:e=>({abi:e.crossChainAccessTokenABI,address:e.crossChainAccessTokenAddress}),[t.ContractType.CrossChainAccessTokenManagerContract]:e=>({abi:e.crossChainAccessTokenManagerABI,address:e.crossChainAccessTokenManagerAddress}),[t.ContractType.MerkleTreeContract]:()=>({abi:new n.ethers.utils.Interface(["function getRootHash() public view returns (uint256)"])}),[t.ContractType.UniswapV3FactoryContract]:()=>({abi:c.abi}),[t.ContractType.UniswapV3PoolContract]:()=>({abi:u.abi}),[t.ContractType.UniswapV2PoolContract]:()=>({abi:l.abi}),[t.ContractType.UniswapV3QuoterContract]:()=>({abi:d.abi}),[t.ContractType.ERC20Contract]:()=>({abi:k.default.abi}),[t.ContractType.WATokenContract]:e=>({abi:e.waTokenABI}),[t.ContractType.ContractWithNonces]:()=>({abi:new n.ethers.utils.Interface(["function nonces(address owner) external view returns (uint)"])}),[t.ContractType.PermitterContract]:e=>({abi:e.permitterABI,address:e.permitterAddress}),[t.ContractType.CurveExternalAction]:e=>({address:e.curveExternalActionInstanceAddress,abi:e.curveExternalActionABI}),[t.ContractType.WrappedStakedCurveLp]:e=>({abi:e.wrappedStakedCurveLpABI}),[t.ContractType.WrappedStakedRewardsCurveLp]:()=>({abi:F}),[t.ContractType.CurveWrappedMainPool]:()=>({abi:f.default.abi}),[t.ContractType.CurveReadingWrapper]:()=>({abi:T.default.abi}),[t.ContractType.CurvePoolLPTokenAmountCalculator2]:()=>({abi:r(2)}),[t.ContractType.CurvePoolLPTokenAmountCalculator3]:()=>({abi:r(3)}),[t.ContractType.CurvePoolLPTokenAmountCalculator4]:()=>({abi:r(4)}),[t.ContractType.CurvePoolLPTokenAmountCalculatorDynamic]:()=>({abi:r()}),[t.ContractType.CurvePoolLPTokenAmountCalculator2OneArg]:()=>({abi:o(2)}),[t.ContractType.CurvePoolLPTokenAmountCalculator3OneArg]:()=>({abi:o(3)}),[t.ContractType.CurvePoolLPTokenAmountCalculator4OneArg]:()=>({abi:o(4)}),[t.ContractType.CurvePoolWithIntCoins]:()=>({abi:O}),[t.ContractType.CurvePoolWithIntBalances]:()=>({abi:U}),[t.ContractType.OneInchExternalActionContract]:e=>({address:e.oneInchExternalActionInstanceAddress}),[t.ContractType.CurveGauge]:()=>({abi:Q}),[t.ContractType.CurveZaps]:()=>({abi:M.default.abi}),[t.ContractType.ConvexExternalAction]:e=>({address:e.convexExternalActionInstanceAddress,abi:e.convexExternalActionABI}),[t.ContractType.WrappedStakedConvexLp]:e=>({abi:e.wrappedStakedConvexLpABI}),[t.ContractType.ConvexBooster]:()=>({abi:E.default.abi}),[t.ContractType.ConvexBoosterMainnet]:()=>({abi:q.default.abi}),[t.ContractType.ConvexRewardPool]:()=>({abi:V.default.abi}),[t.ContractType.ConvexCvxLocker]:()=>({abi:Z}),[t.ContractType.ConvexStakePool]:()=>({abi:new n.ethers.utils.Interface(["function totalSupply() external view returns (uint256)"])}),[t.ContractType.ConvexCvxCRVWrapper]:()=>({abi:new n.ethers.utils.Interface(["function totalSupply() external view returns (uint256)"])}),[t.ContractType.ConvexCxvCrvUtillities]:()=>({abi:_.default.abi}),[t.ContractType.BeefyVault]:()=>({abi:y.default.abi}),[t.ContractType.BeefyZap]:()=>({abi:W.default.abi}),[t.ContractType.BeefyRouter]:()=>({abi:S.default.abi}),[t.ContractType.BeefyZapOneInch]:()=>({abi:g.default.abi}),[t.ContractType.BeefyStrategy]:()=>({abi:L.default.abi}),[t.ContractType.BeefyExternalAction]:e=>({abi:e.BeefyExternalActionABI,address:e.beefyExternalActionInstanceAddress}),[t.ContractType.BeefyStakeExternalAction]:e=>({abi:e.BeefyStakeExternalActionABI,address:e.beefyStakeExternalActionInstanceAddress}),[t.ContractType.WrappedStakedBeefyLp]:e=>({abi:e.WrappedStakedBeefyLpABI}),[t.ContractType.LidoWstEther]:()=>({abi:B,address:a.lidoWstEthContractAddress}),[t.ContractType.LidoStEther]:()=>({abi:w,address:a.lidoStEthContractAddress}),[t.ContractType.LidoWithdrawalQueueERC721]:()=>({abi:x,address:a.lidoWithdrawalQueueERC721Address}),[t.ContractType.PendleGeneralExternalAction]:e=>({abi:e.pendleExternalActionABI,address:e.pendleExternalActionInstanceAddress}),[t.ContractType.WstYtToken]:e=>({abi:e.WstYtTokenABI}),[t.ContractType.WstPendleLPToken]:e=>({abi:e.WstPendleLPABI}),[t.ContractType.PendleRouter]:e=>({abi:R.default.abi,address:e.pendleExternalActionInstanceAddress}),[t.ContractType.PoLidoNFT]:()=>({abi:m,address:a.poLidoNftAddress}),[t.ContractType.LidoStMatic]:()=>({abi:h,address:a.lidoStMaticAddress}),[t.ContractType.LidoStakeManager]:()=>({abi:P,address:a.lidoStakeManagerAddress}),[t.ContractType.VolatileVault]:e=>({abi:e.VolatileVaultABI,address:e.volatileVaultInstanceAddress}),[t.ContractType.VolatileTokenAction]:e=>({abi:e.VolatileTokenActionABI,address:e.volatileTokenActionInstanceAddress}),[t.ContractType.HinkalWrapper]:e=>({abi:e.HinkalWrapperABI,address:e.hinkalWrapperAddress}),[t.ContractType.HinkalWrapper2]:e=>({abi:e.HinkalWrapper2ABI??e.HinkalWrapperABI,address:e.hinkalWrapper2Address??e.hinkalWrapperAddress}),[t.ContractType.HinkalStakeExternalAction]:e=>({abi:e.HinkalStakeExternalActionABI,address:e.hinkalStakeExternalActionAddress}),[t.ContractType.HToken]:e=>({abi:e.HTokenABI})},Y=e=>{const{contractData:p}=s.networkRegistry[s.getNonLocalhostChainId(e)],C=JSON.stringify(p.hinkalABI),i=new n.utils.Interface(C),b=i.getSighash("transact"),A=i.getSighash("transactWithExternalAction");return{hinkalInterface:i,transactMethodId:b,transactWithExternalActionMethodId:A,NewCommitment:"NewCommitment",NewCommitmentTopic:"0xc2e3bd2d00c3cf4d09298e5a0cfd317cf7a6e5bf15d467cfa805a91e1a4a221d"}};exports.contractMetadataMapping=G;exports.getHinkalParameters=Y;exports.uniswapV2PoolData=l;exports.uniswapV3FactoryData=c;exports.uniswapV3PoolData=u;exports.uniswapV3QuoterData=d;
|