@hinkal/common 0.0.104 → 0.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API/API.js +58 -0
- package/API/HinkalPointsCalls.js +38 -0
- package/API/callBeefyGraphAPI.js +37 -0
- package/API/callCurveAPI.js +156 -0
- package/API/callMonitor.js +30 -0
- package/API/callOdosAPI.js +44 -0
- package/API/callOneInchAPI.js +37 -0
- package/API/callRelayer.js +32 -0
- package/API/checkRisk.js +30 -0
- package/API/dataServerCalls.js +32 -0
- package/API/fetchCommitmentsCache.js +31 -0
- package/API/fetchNullifiers.js +30 -0
- package/API/getAxelarGasEstimate.js +37 -0
- package/API/getCoingeckoPrice.js +27 -0
- package/API/getConnextReceiveFee.js +30 -0
- package/API/getGasEstimates.js +38 -0
- package/API/getRelayerURL.js +32 -0
- package/API/getServerURL.js +67 -0
- package/API/getTokenPrice.js +41 -0
- package/API/kycCalls.js +32 -0
- package/API/passwordCalls.js +36 -0
- package/API/referralProgramCalls.js +58 -0
- package/API/relayCalls.js +30 -0
- package/API/restoreSnapshots.js +32 -0
- package/API/rewardsPointsCalls.js +40 -0
- package/API/userVerifyTransactions.js +45 -0
- package/README.md +116 -1
- package/assets/{snarkjsWorkerLogic-CatB8Hso.js → snarkjsWorkerLogic-Fv0M38Mc.js} +2 -2
- package/assets/{utxoWorkerLogic-DDqTe7hT.js → utxoWorkerLogic-CtFLQiAX.js} +2 -2
- package/assets/{zkProofWorkerLauncher-C-pvCm0b.js → zkProofWorkerLauncher-J3Ts5_Ba.js} +1 -1
- package/assets/{zkProofWorkerLogic-CLpRqNRx.js → zkProofWorkerLogic-CPNuu61R.js} +18 -19
- package/constants/assets.constants.js +16 -0
- package/constants/axelar.constants.js +55 -0
- package/constants/backend.constants.js +18 -0
- package/constants/beefy.registry.js +24 -0
- package/constants/chains.constants.js +204 -0
- package/constants/coingecko.constants.js +53 -0
- package/constants/contracts.constants.js +276 -0
- package/constants/crvCvx.registry.js +636 -0
- package/constants/crvDynamic.registry.js +24 -0
- package/constants/deploy-data/deploy-data-arbMainnet.json.js +7415 -0
- package/constants/deploy-data/deploy-data-avalanche.json.js +7411 -0
- package/constants/deploy-data/deploy-data-axelar1.json.js +4329 -0
- package/constants/deploy-data/deploy-data-axelar2.json.js +4329 -0
- package/constants/deploy-data/deploy-data-base.json.js +8425 -0
- package/constants/deploy-data/deploy-data-blast.json.js +9600 -0
- package/constants/deploy-data/deploy-data-bnbMainnet.json.js +6877 -0
- package/constants/deploy-data/deploy-data-ethMainnet.json.js +11427 -0
- package/constants/deploy-data/deploy-data-localhost.json.js +13283 -0
- package/constants/deploy-data/deploy-data-optimism.json.js +7417 -0
- package/constants/deploy-data/deploy-data-polygon.json.js +7439 -0
- package/constants/fees.constants.js +57 -0
- package/constants/kyc.constants.js +118 -0
- package/constants/lido.constants.js +13 -0
- package/constants/pendle.registry.js +253 -0
- package/constants/protocol.constants.js +26 -0
- package/constants/reorg-depths.constants.js +15 -0
- package/constants/rewards.constants.js +27 -0
- package/constants/server.constants.js +157 -0
- package/constants/token-data/ERC20Registry.js +85 -0
- package/constants/token-data/arbMainnetRegistry.json.js +946 -0
- package/constants/token-data/arbMainnetRegistryFixed.json.js +856 -0
- package/constants/token-data/avalancheRegistry.json.js +591 -0
- package/constants/token-data/avalancheRegistryFixed.json.js +591 -0
- package/constants/token-data/baseRegistry.json.js +490 -0
- package/constants/token-data/baseRegistryFixed.json.js +463 -0
- package/constants/token-data/blastRegistry.json.js +137 -0
- package/constants/token-data/blastRegistryFixed.json.js +137 -0
- package/constants/token-data/bnbMainnetRegistry.json.js +973 -0
- package/constants/token-data/bnbMainnetRegistryFixed.json.js +973 -0
- package/constants/token-data/coingeckoRegistry.json.js +115623 -0
- package/constants/token-data/ethMainnetRegistry.json.js +2700 -0
- package/constants/token-data/ethMainnetRegistryFixed.json.js +2251 -0
- package/constants/token-data/index.js +6 -0
- package/constants/token-data/localhostRegistry.json.js +2768 -0
- package/constants/token-data/optimismRegistry.json.js +1455 -0
- package/constants/token-data/optimismRegistryFixed.json.js +1392 -0
- package/constants/token-data/polygonRegistry.json.js +1327 -0
- package/constants/token-data/polygonRegistryFixed.json.js +1255 -0
- package/constants/token-data/popularTokens.constants.js +14 -0
- package/constants/token-data/tokenPricing.consts.js +8 -0
- package/constants/vite.constants.js +29 -0
- package/crypto/babyJub.js +15 -0
- package/crypto/poseidon.js +26 -0
- package/crypto/preProcessing.js +9 -0
- package/data-structures/Hinkal/Hinkal.js +299 -0
- package/data-structures/Hinkal/hinkalActionBeefy.js +101 -0
- package/data-structures/Hinkal/hinkalActionConvex.js +83 -0
- package/data-structures/Hinkal/hinkalActionCurve.js +112 -0
- package/data-structures/Hinkal/hinkalActionLidoEth.js +91 -0
- package/data-structures/Hinkal/hinkalActionPendle.js +140 -0
- package/data-structures/Hinkal/hinkalActionPendleLP.js +96 -0
- package/data-structures/Hinkal/hinkalActionStake.js +138 -0
- package/data-structures/Hinkal/hinkalActionVolatile.js +112 -0
- package/data-structures/Hinkal/hinkalDeposit.js +95 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.js +47 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.js +66 -0
- package/data-structures/Hinkal/hinkalSwap.js +98 -0
- package/data-structures/Hinkal/hinkalTransfer.js +5 -0
- package/data-structures/Hinkal/hinkalWithdraw.js +91 -0
- package/data-structures/Hinkal/resetMerkleTrees.js +49 -0
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.js +83 -0
- package/data-structures/ValueCache/ValueCache.js +25 -0
- package/data-structures/crypto-keys/decodeUTXO.js +40 -0
- package/data-structures/crypto-keys/encryptDecryptUtxo.js +41 -0
- package/data-structures/crypto-keys/keyUtils.js +10 -0
- package/data-structures/crypto-keys/keys.js +90 -0
- package/data-structures/custom-token-registry/CustomTokenRegistry.js +33 -0
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.js +131 -0
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.js +132 -0
- package/data-structures/event-service/AbstractEventService.js +118 -0
- package/data-structures/event-service/AbstractNullifierSnapshotService.js +59 -0
- package/data-structures/event-service/AbstractSnapshotService.js +35 -0
- package/data-structures/merkle-tree/MerkleTree.js +177 -0
- package/data-structures/merkle-tree/MerkleTreeIncompleteError.js +8 -0
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.js +48 -0
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.js +47 -0
- package/data-structures/snapshot/ClientNullifierSnapshotService.js +44 -0
- package/data-structures/token-price-fetcher/TokenChecker.js +29 -0
- package/data-structures/token-price-fetcher/TokenPriceFetcher.js +218 -0
- package/data-structures/transactions-manager/TransactionsManager.js +194 -0
- package/data-structures/transactions-manager/history/getBeefyData.js +68 -0
- package/data-structures/transactions-manager/history/getConvexData.js +57 -0
- package/data-structures/transactions-manager/history/getCurveData.js +97 -0
- package/data-structures/transactions-manager/history/getDepositData.js +36 -0
- package/data-structures/transactions-manager/history/getLidoData.js +44 -0
- package/data-structures/transactions-manager/history/getPendleData.js +59 -0
- package/data-structures/transactions-manager/history/getSwapData.js +43 -0
- package/data-structures/transactions-manager/history/getTxDetails.js +74 -0
- package/data-structures/transactions-manager/history/getVolatileData.js +75 -0
- package/data-structures/transactions-manager/history/history.types.js +62 -0
- package/data-structures/transactions-manager/history/history.utils.js +8 -0
- package/data-structures/utxo/Utxo.js +134 -0
- package/data-structures/volatile-helper/VolatileHelper.js +181 -0
- package/error-handling/customErrors/ErrorWithAmount.js +9 -0
- package/error-handling/customErrors/FeeOverTransactionValueError.js +9 -0
- package/error-handling/customErrors/customErrors.helpers.js +21 -0
- package/error-handling/error-codes.constants.js +184 -0
- package/error-handling/get-error.message.js +53 -0
- package/error-handling/handleErrorRestore.js +35 -0
- package/error-handling/logError.js +7 -0
- package/error-handling/types.js +4 -0
- package/externalABIs/BUSD.js +519 -0
- package/externalABIs/BabPassport.json.js +24 -0
- package/externalABIs/BeefyRouterAbi.json.js +1022 -0
- package/externalABIs/BeefyStrategyAbi.json.js +1423 -0
- package/externalABIs/BeefyVaultAbi.json.js +570 -0
- package/externalABIs/BeefyZapAbi.json.js +208 -0
- package/externalABIs/BeefyZapOneInchAbi.json.js +340 -0
- package/externalABIs/ConvexBoosterAbi.json.js +674 -0
- package/externalABIs/ConvexBoosterAbiMainnet.json.js +1002 -0
- package/externalABIs/ConvexRewardPoolAbi.json.js +883 -0
- package/externalABIs/CurveReadingWrapperAbi.json.js +1422 -0
- package/externalABIs/CurveWrappedMainPool.json.js +1136 -0
- package/externalABIs/CurveZap.json.js +262 -0
- package/externalABIs/CvxCrvUtilities.json.js +264 -0
- package/externalABIs/DAI.js +334 -0
- package/externalABIs/ERC20.json.js +291 -0
- package/externalABIs/GalxePassport.json.js +41 -0
- package/externalABIs/IQuoterV2.json.js +205 -0
- package/externalABIs/ISwapRouter.json.js +568 -0
- package/externalABIs/IUniswapV3Factory.json.js +201 -0
- package/externalABIs/IUniswapV3Pool.json.js +999 -0
- package/externalABIs/LidoStEthAbi.json.js +1603 -0
- package/externalABIs/LidoStMaticAbi.json.js +1764 -0
- package/externalABIs/LidoStakeManagerAbi.json.js +2082 -0
- package/externalABIs/LidoWithdrawalQueueERC721Abi.json.js +2030 -0
- package/externalABIs/LidoWstEthAbi.json.js +480 -0
- package/externalABIs/OptimismGasPriceOracle.json.js +206 -0
- package/externalABIs/PendleRouterAbi.json.js +173 -0
- package/externalABIs/PoLidoNftAbi.json.js +701 -0
- package/externalABIs/SanctionsList.js +89 -0
- package/externalABIs/USDC.js +721 -0
- package/externalABIs/USDR.js +346 -0
- package/externalABIs/USDR3CRV.js +542 -0
- package/externalABIs/USDT.js +393 -0
- package/externalABIs/UniswapV2PoolAbi.json.js +80 -0
- package/externalABIs/WETH.js +156 -0
- package/externalABIs/amToken.js +350 -0
- package/externalABIs/transactionsProver.json.js +39 -0
- package/functions/kyc/authentoHelper.js +42 -0
- package/functions/kyc/passportHelper.js +39 -0
- package/functions/kyc/zkMeHelper.js +56 -0
- package/functions/pre-transaction/getFlatFees.js +203 -0
- package/functions/pre-transaction/interaction-to-action.js +57 -0
- package/functions/pre-transaction/outputUtxoProcessing.js +45 -0
- package/functions/pre-transaction/process-gas-estimates.js +57 -0
- package/functions/pre-transaction/processAmountChanges.js +229 -0
- package/functions/private-wallet/emporium.helpers.js +19 -0
- package/functions/private-wallet/opProducer.js +24 -0
- package/functions/protocols/convex.protocols.js +41 -0
- package/functions/protocols/curve.protocols.js +45 -0
- package/functions/protocols/pendle.helpers.js +108 -0
- package/functions/snarkjs/common.snarkjs.js +96 -0
- package/functions/snarkjs/constant.js +211 -0
- package/functions/snarkjs/constructEmporiumProof.js +105 -0
- package/functions/snarkjs/constructGeneralZkProof.js +129 -0
- package/functions/snarkjs/generateCircomData.js +60 -0
- package/functions/snarkjs/generateZkProof.js +18 -0
- package/functions/snarkjs/getZKFiles.js +30 -0
- package/functions/staking/index.js +40 -0
- package/functions/utils/amounts.utils.js +70 -0
- package/functions/utils/axelar.utils.js +38 -0
- package/functions/utils/cacheFunctions.js +67 -0
- package/functions/utils/caseInsensitive.utils.js +6 -0
- package/functions/utils/convertIntegrationProviderToExternalActionId.js +16 -0
- package/functions/utils/create-provider.js +5 -0
- package/functions/utils/enum.utils.js +14 -0
- package/functions/utils/erc20tokenFunctions.js +20 -0
- package/functions/utils/evmNetworkFunctions.js +29 -0
- package/functions/utils/external-action.utils.js +61 -0
- package/functions/utils/getDataFromTransaction.js +105 -0
- package/functions/utils/memoize.utils.js +14 -0
- package/functions/utils/nickname.utils.js +7 -0
- package/functions/utils/process.utils.js +4 -0
- package/functions/utils/reloadPage.js +4 -0
- package/functions/utils/requireEnv.js +7 -0
- package/functions/utils/resolve-sync.utils.js +22 -0
- package/functions/utils/serialize.utils.js +4 -0
- package/functions/utils/string.utils.js +14 -0
- package/functions/utils/time.utils.js +8 -0
- package/functions/utils/userAgent.js +15 -0
- package/functions/utils/volatile-patcher.utils.js +40 -0
- package/functions/web3/etherFunctions.js +41 -0
- package/functions/web3/events/balanceChangedHandler.js +10 -0
- package/functions/web3/events/getInputUtxoAndBalance.js +72 -0
- package/functions/web3/events/getShieldedBalance.js +107 -0
- package/functions/web3/events/web3RetrieveEvents.js +9 -0
- package/functions/web3/functionCalls/accessTokenCalls.js +48 -0
- package/functions/web3/functionCalls/approveToken.js +153 -0
- package/functions/web3/functionCalls/estimateGasRelayer.js +18 -0
- package/functions/web3/functionCalls/transactCallDirect.js +60 -0
- package/functions/web3/functionCalls/transactCallRelayer.js +42 -0
- package/functions/web3/odosAPI.js +65 -0
- package/functions/web3/oneInchAPI.js +61 -0
- package/functions/web3/runContractFunction.js +95 -0
- package/functions/web3/uniswapAPI.js +97 -0
- package/index.js +644 -0
- package/package.json +5 -4
- package/types/beefy.types.js +21 -0
- package/types/circom-data.types.js +22 -0
- package/types/curve.types.js +25 -0
- package/types/ethereum-network.types.js +4 -0
- package/types/external-action.types.js +4 -0
- package/types/hinkal.stake.types.js +4 -0
- package/types/hinkal.types.js +15 -0
- package/types/kyc.types.js +13 -0
- package/types/pendle.types.js +15 -0
- package/types/rewards.types.js +27 -0
- package/types/slippage.types.js +15 -0
- package/types/time.types.js +58 -0
- package/types/token.types.js +4 -0
- package/types/transactions.types.js +36 -0
- package/webworker/performTaskWithWorker.js +62 -0
- package/webworker/snarkjsWorker/snarkjsWorker.types.js +4 -0
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.js +32 -0
- package/webworker/utxoWorker/utxoWorker.types.js +4 -0
- package/webworker/utxoWorker/utxoWorkerLogic.js +70 -0
- package/webworker/viteWorkerURL.constant.d.ts +3 -3
- package/webworker/worker.registry.js +4 -0
- package/webworker/workerFactory.d.ts +0 -1
- package/webworker/workerFactory.js +42 -0
- package/{workerProxy-BDj498Ht.mjs → webworker/workerProxy.js} +1 -1
- package/webworker/zkProofWorker/zkProofWorker.types.js +4 -0
- package/webworker/zkProofWorker/zkProofWorkerLogic.js +66 -0
- package/assets/viteWorkerURL.constant-DrIQXA2B.js +0 -11
- package/index-DbehuQxV.mjs +0 -398145
- package/index.mjs +0 -457
- package/snarkjsWorkerLogic-BpNWzeoy.mjs +0 -12086
- package/utxoWorkerLogic-D7NuHk_K.mjs +0 -64
- package/viteWorkerURL.constant-Bc7ufzqC.mjs +0 -9
- package/zkProofWorkerLogic-Bnalmuka.mjs +0 -60
package/API/API.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getActiveCode as e, updateActiveCode as r, getWeeklyReferralCodes as t, getReferralCodes as o, addReferralCode as i, getLpProgram as s, getRewardsHistory as a, setRewardsReceivingData as n, getRewardsReceivingData as g } from "./referralProgramCalls.js";
|
|
2
|
+
import { addNickname as m, getNickname as c, points as d, leaderboard as f, seasonLeaderboard as k } from "./rewardsPointsCalls.js";
|
|
3
|
+
import { verificationStartDate as p, userGetTransactions as P, userVerifyTransactions as y } from "./userVerifyTransactions.js";
|
|
4
|
+
import { getIdleRelay as l } from "./relayCalls.js";
|
|
5
|
+
import { userHasPassword as R, userRegisterPassword as A } from "./passwordCalls.js";
|
|
6
|
+
import { getTokenPrice as T, getTokenPriceEth as u, getTokenPrices as C } from "./getTokenPrice.js";
|
|
7
|
+
import { getUserKycStatus as S, setAiPriseVerificationUrl as v, getAccessTokenSignature as w, getZkMeAccessToken as U, userHasAccessToken as D, afterKycCall as H } from "./kycCalls.js";
|
|
8
|
+
import { getOdosPriceForToken as L } from "./callOdosAPI.js";
|
|
9
|
+
import { getUserPoints as b } from "./dataServerCalls.js";
|
|
10
|
+
import { getLimitedAnonymityStakingPoints as I, getUserAnonymityStakingPoints as K, getUserAnonymityStakingReferralPoints as N } from "./HinkalPointsCalls.js";
|
|
11
|
+
const j = {
|
|
12
|
+
// KYC
|
|
13
|
+
getUserKycStatus: S,
|
|
14
|
+
setAiPriseVerificationUrl: v,
|
|
15
|
+
getAccessTokenSignature: w,
|
|
16
|
+
getZkMeAccessToken: U,
|
|
17
|
+
userHasAccessToken: D,
|
|
18
|
+
afterKycCall: H,
|
|
19
|
+
// Prices
|
|
20
|
+
getTokenPrice: T,
|
|
21
|
+
getTokenPriceEth: u,
|
|
22
|
+
getTokenPrices: C,
|
|
23
|
+
getOdosPriceForToken: L,
|
|
24
|
+
// Referral Codes
|
|
25
|
+
getActiveCode: e,
|
|
26
|
+
updateActiveCode: r,
|
|
27
|
+
getWeeklyReferralCodes: t,
|
|
28
|
+
getReferralCodes: o,
|
|
29
|
+
addReferralCode: i,
|
|
30
|
+
getLpProgram: s,
|
|
31
|
+
// Rewards Points
|
|
32
|
+
addNickname: m,
|
|
33
|
+
getNickname: c,
|
|
34
|
+
// Transaction Verifications
|
|
35
|
+
verificationStartDate: p,
|
|
36
|
+
userGetTransactions: P,
|
|
37
|
+
userVerifyTransactions: y,
|
|
38
|
+
points: d,
|
|
39
|
+
leaderboard: f,
|
|
40
|
+
seasonLeaderboard: k,
|
|
41
|
+
// relay
|
|
42
|
+
getIdleRelay: l,
|
|
43
|
+
// password
|
|
44
|
+
userHasPassword: R,
|
|
45
|
+
userRegisterPassword: A,
|
|
46
|
+
getRewardsHistory: a,
|
|
47
|
+
setRewardsReceivingData: n,
|
|
48
|
+
getRewardsReceivingData: g,
|
|
49
|
+
// points
|
|
50
|
+
getUserPoints: b,
|
|
51
|
+
// AnonymityStakingPoints
|
|
52
|
+
getLimitedAnonymityStakingPoints: I,
|
|
53
|
+
getUserAnonymityStakingPoints: K,
|
|
54
|
+
getUserAnonymityStakingReferralPoints: N
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
j as API
|
|
58
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import o from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as r } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as m } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const C = async (t, i) => (await o.get(
|
|
28
|
+
`${r(t)}${m.ROUTES.getLimitedAnonymityStakingPoints(i)}`
|
|
29
|
+
)).data, F = async (t, i) => (await o.get(
|
|
30
|
+
`${r(t)}${m.ROUTES.getUserAnonymityStakingPoints(i)}`
|
|
31
|
+
)).data, G = async (t, i) => (await o.get(
|
|
32
|
+
`${r(t)}${m.ROUTES.getUserAnonymityStakingReferralPoints(i)}`
|
|
33
|
+
)).data;
|
|
34
|
+
export {
|
|
35
|
+
C as getLimitedAnonymityStakingPoints,
|
|
36
|
+
F as getUserAnonymityStakingPoints,
|
|
37
|
+
G as getUserAnonymityStakingReferralPoints
|
|
38
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import m from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as e } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as a } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const E = async (t, r, o, i = "apys") => {
|
|
28
|
+
const p = {
|
|
29
|
+
id: t,
|
|
30
|
+
datePeriod: r,
|
|
31
|
+
dataType: i
|
|
32
|
+
};
|
|
33
|
+
return await m.post(`${e(o)}${a.ROUTES.beefyGraphAPI}`, p);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
E as getBeefyHistoricalChartData
|
|
37
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import p from "axios";
|
|
2
|
+
import { ethers as A } from "ethers";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import { curveNetworkNames as f, curvePools as w } from "../types/curve.types.js";
|
|
6
|
+
import { getCrvCvxWithChainId as C } from "../constants/crvCvx.registry.js";
|
|
7
|
+
import { getERC20Registry as l } from "../constants/token-data/ERC20Registry.js";
|
|
8
|
+
import { getNonLocalhostChainId as u } from "../constants/chains.constants.js";
|
|
9
|
+
import { zeroAddress as m } from "../constants/protocol.constants.js";
|
|
10
|
+
import { logError as D } from "../error-handling/logError.js";
|
|
11
|
+
import { lowerCaseIncludes as k, caseInsensitiveEqual as h } from "../functions/utils/caseInsensitive.utils.js";
|
|
12
|
+
const T = /* @__PURE__ */ new Set(), L = {}, y = (e, o) => {
|
|
13
|
+
const n = l(e), a = n.find((t) => t.erc20TokenAddress.toLocaleLowerCase() === o.toLocaleLowerCase());
|
|
14
|
+
return a ? a ? a.symbol : o : n[0].symbol;
|
|
15
|
+
}, P = (e, o) => {
|
|
16
|
+
const n = l(e), a = n.find((t) => t.erc20TokenAddress.toLocaleLowerCase() === o.toLocaleLowerCase());
|
|
17
|
+
return a ? a.logoURI ? a.logoURI : "" : n[0].logoURI ? n[0].logoURI : "";
|
|
18
|
+
};
|
|
19
|
+
async function b(e) {
|
|
20
|
+
const o = u(e), n = f[o];
|
|
21
|
+
return p.get(`https://api.curve.fi/api/getSubgraphData/${n}`, { timeout: 7e3 }).then((a) => a.data ? a.data.data.poolList.map((t) => ({
|
|
22
|
+
address: t.address,
|
|
23
|
+
volumeUSD: t.volumeUSD,
|
|
24
|
+
dailyApy: t.latestDailyApy,
|
|
25
|
+
weeklyApy: t.latestWeeklyApy
|
|
26
|
+
})) : []).catch(() => []);
|
|
27
|
+
}
|
|
28
|
+
async function U(e, o) {
|
|
29
|
+
const n = u(e), a = f[n];
|
|
30
|
+
return a ? p.get(`https://api.curve.fi/api/getPools/${a}/${o}`).then((t) => t.data?.data.poolData.map((s) => {
|
|
31
|
+
const { usdTotal: i } = s, d = Number(A.utils.formatEther(s.totalSupply || "0")), c = d > 0 ? Number(i) / d : 0;
|
|
32
|
+
return {
|
|
33
|
+
id: s.id,
|
|
34
|
+
name: s.name,
|
|
35
|
+
address: s.address,
|
|
36
|
+
lpToken: y(e, s.lpTokenAddress || ""),
|
|
37
|
+
lpTokenAddress: s.lpTokenAddress,
|
|
38
|
+
coins: s.underlyingCoins ? s.underlyingCoins : s.coins,
|
|
39
|
+
tokensForDeposit: s.coins,
|
|
40
|
+
coinAddresses: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => y(e, r)),
|
|
41
|
+
coinLogos: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => P(e, r)),
|
|
42
|
+
gaugeAddress: s.gaugeAddress ? s.gaugeAddress : void 0,
|
|
43
|
+
gaugeCrvApy: s.gaugeCrvApy && s.gaugeCrvApy[0] && s.gaugeCrvApy[0] !== 0 ? { base: s.gaugeCrvApy[0], boosted: s.gaugeCrvApy[1] } : void 0,
|
|
44
|
+
gaugeRewards: s.gaugeRewards,
|
|
45
|
+
usdTotal: i,
|
|
46
|
+
totalSupply: d,
|
|
47
|
+
lpPrice: c,
|
|
48
|
+
liquidityUtilization: void 0
|
|
49
|
+
};
|
|
50
|
+
})) : [];
|
|
51
|
+
}
|
|
52
|
+
async function N(e) {
|
|
53
|
+
let o = [];
|
|
54
|
+
return await Promise.all(
|
|
55
|
+
w.map(async (n) => {
|
|
56
|
+
const a = await U(e, n);
|
|
57
|
+
return o = o.concat(a), a;
|
|
58
|
+
})
|
|
59
|
+
), Promise.all(o);
|
|
60
|
+
}
|
|
61
|
+
async function v(e) {
|
|
62
|
+
const o = await b(e), n = await N(e), a = [];
|
|
63
|
+
for (const t of n) {
|
|
64
|
+
if (a.map((d) => d.address).includes(t.address))
|
|
65
|
+
continue;
|
|
66
|
+
const s = t.lpTokenAddress.toLowerCase();
|
|
67
|
+
T.add(s.toLowerCase()), L[s] = t.address.toLowerCase();
|
|
68
|
+
const i = {
|
|
69
|
+
id: t.id,
|
|
70
|
+
name: t.name,
|
|
71
|
+
address: t.address,
|
|
72
|
+
lpToken: s,
|
|
73
|
+
lpTokenAddress: s,
|
|
74
|
+
coins: t.coins,
|
|
75
|
+
coinNames: t.coinAddresses.join(" "),
|
|
76
|
+
coinAddresses: t.coinAddresses,
|
|
77
|
+
coinLogos: t.coinLogos,
|
|
78
|
+
tokensForDeposit: t.tokensForDeposit,
|
|
79
|
+
gaugeAddress: t.gaugeAddress,
|
|
80
|
+
usdTotal: t.usdTotal,
|
|
81
|
+
totalSupply: t.totalSupply,
|
|
82
|
+
lpPrice: t.lpPrice,
|
|
83
|
+
tvl: Math.round(t.usdTotal),
|
|
84
|
+
gaugeRewards: t.gaugeRewards,
|
|
85
|
+
gaugeCrvApy: t.gaugeCrvApy ? {
|
|
86
|
+
base: Math.round(t.gaugeCrvApy.base * 100) / 100,
|
|
87
|
+
boosted: Math.round(t.gaugeCrvApy.boosted * 100) / 100
|
|
88
|
+
} : void 0,
|
|
89
|
+
liquidityUtilization: 0,
|
|
90
|
+
volumeUSD: 0,
|
|
91
|
+
dailyApy: 0,
|
|
92
|
+
weeklyApy: 0
|
|
93
|
+
};
|
|
94
|
+
for (const d of o)
|
|
95
|
+
if (h(t.address, d.address)) {
|
|
96
|
+
i.liquidityUtilization = d.volumeUSD / t.usdTotal, i.volumeUSD = Math.round(d.volumeUSD), i.dailyApy = Math.round(d.dailyApy * 100) / 100, i.weeklyApy = Math.round(d.weeklyApy * 100) / 100;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
a.push(i);
|
|
100
|
+
}
|
|
101
|
+
return a;
|
|
102
|
+
}
|
|
103
|
+
const j = async (e) => {
|
|
104
|
+
const o = u(e), n = await v(o), a = C(o).map((s) => s.lpToken.toLowerCase());
|
|
105
|
+
return n.filter((s) => k(a, s.lpTokenAddress));
|
|
106
|
+
}, G = async (e) => {
|
|
107
|
+
const o = u(e), n = await v(o), t = l(e).map((i) => i.erc20TokenAddress.toLowerCase());
|
|
108
|
+
return n.filter((i) => k(t, i.lpTokenAddress));
|
|
109
|
+
};
|
|
110
|
+
async function $(e, o) {
|
|
111
|
+
let n = 0;
|
|
112
|
+
for (let r = 0; r < e.tokensForDeposit.length; r += 1)
|
|
113
|
+
e.tokensForDeposit[r].usdTotal = Number(
|
|
114
|
+
A.utils.formatUnits(
|
|
115
|
+
BigInt(e.tokensForDeposit[r].poolBalance),
|
|
116
|
+
Number(e.tokensForDeposit[r].decimals)
|
|
117
|
+
)
|
|
118
|
+
) * e.tokensForDeposit[r].usdPrice, n += e.tokensForDeposit[r].usdTotal || 0, e.tokensForDeposit[r].symbol.startsWith("am") && (e.tokensForDeposit[r].symbol = e.tokensForDeposit[r].symbol.slice(2));
|
|
119
|
+
for (let r = 0; r < e.tokensForDeposit.length; r += 1)
|
|
120
|
+
e.tokensForDeposit[r].weighting = (e.tokensForDeposit[r].usdTotal || 0) / n;
|
|
121
|
+
const a = await o.functions.fee();
|
|
122
|
+
let t, s, i, d = !1;
|
|
123
|
+
try {
|
|
124
|
+
const r = (await o.functions.future_A_time())[0].toNumber(), g = new Date(r * 1e3);
|
|
125
|
+
s = g.toLocaleString(), i = (await o.functions.future_A())[0].toNumber() / 100, d = !!r && g >= /* @__PURE__ */ new Date(), t = (await o.functions.initial_A())[0].toNumber() / 100;
|
|
126
|
+
} catch {
|
|
127
|
+
D("A ramp up not found");
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
poolAddress: o.address,
|
|
131
|
+
lpToken: e.lpTokenAddress,
|
|
132
|
+
gaugeAddress: e.gaugeAddress,
|
|
133
|
+
gaugeCrvApy: e.gaugeCrvApy,
|
|
134
|
+
currencyReserves: e.coins,
|
|
135
|
+
liquidityUtilization: e.liquidityUtilization,
|
|
136
|
+
volumeUSD: e.volumeUSD,
|
|
137
|
+
dailyApy: e.dailyApy,
|
|
138
|
+
weeklyApy: e.weeklyApy,
|
|
139
|
+
gaugeRewards: e?.gaugeRewards,
|
|
140
|
+
A: (await o.functions.A())[0].toNumber(),
|
|
141
|
+
initialA: t,
|
|
142
|
+
futureTime: s,
|
|
143
|
+
futureA: i,
|
|
144
|
+
hasRampUp: d,
|
|
145
|
+
fee: a[0].toNumber() / 1e8,
|
|
146
|
+
daoFee: a[0].toNumber() / 2e8,
|
|
147
|
+
virtualPrice: Number((await o.functions.get_virtual_price())[0].toBigInt() / 100000000000000n) / 1e4
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
j as getCurvePools,
|
|
152
|
+
G as getCurvePoolsforPriceFetching,
|
|
153
|
+
$ as getExtendedPoolInfo,
|
|
154
|
+
T as lpTokens,
|
|
155
|
+
L as lpTokensToBasePool
|
|
156
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import t from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as m } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as i } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const b = (o, r) => t.post(`${m(r)}${i.ROUTES.monitor}`, { address: o });
|
|
28
|
+
export {
|
|
29
|
+
b as monitor
|
|
30
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import m from "axios";
|
|
2
|
+
import { chainIds as i } from "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as p } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as e } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
async function C(r, o) {
|
|
28
|
+
return [i.base, i.localhost].includes(r) || (o.referralCode = "702077826"), (await m.post(`${p(r)}${e.ROUTES.callOdosAPI}`, o)).data;
|
|
29
|
+
}
|
|
30
|
+
const b = async (r, o) => {
|
|
31
|
+
try {
|
|
32
|
+
const { data: t } = await m.get(
|
|
33
|
+
`${p(r)}${e.ROUTES.getOdosPriceForToken(o)}`
|
|
34
|
+
);
|
|
35
|
+
return t.price;
|
|
36
|
+
} catch (t) {
|
|
37
|
+
console.error("Error fetching Odos price:", t);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
C as callOdosAPI,
|
|
43
|
+
b as getOdosPriceForToken
|
|
44
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import r from "axios";
|
|
2
|
+
import { getNonLocalhostChainId as m } from "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as n } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as e } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const N = async (i, o) => {
|
|
28
|
+
const t = m(i), p = new URLSearchParams();
|
|
29
|
+
p.append("fromTokenAddress", o.fromTokenAddress), p.append("toTokenAddress", o.toTokenAddress), p.append("amount", `${o.amount}`), p.append("fromAddress", o.fromAddress), p.append("slippage", `${o.slippage}`), o.destReceiver && p.append("destReceiver", o.destReceiver), o.disableEstimate && p.append("disableEstimate", `${o.disableEstimate}`), o.allowPartialFill && p.append("allowPartialFill", `${o.allowPartialFill}`);
|
|
30
|
+
const a = {
|
|
31
|
+
url: `https://api.1inch.dev/swap/v5.2/${t}/swap?${p}`
|
|
32
|
+
};
|
|
33
|
+
return (await r.post(`${n(i)}${e.ROUTES.callOneInchAPI}`, a)).data.oneInchResponse;
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
N as callOneInchAPI
|
|
37
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import o from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
10
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
11
|
+
import "../webworker/workerFactory.js";
|
|
12
|
+
import "../functions/utils/external-action.utils.js";
|
|
13
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
14
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
15
|
+
import "../constants/coingecko.constants.js";
|
|
16
|
+
import { getRelayerURL as i } from "./getRelayerURL.js";
|
|
17
|
+
import { RELAYER_CONFIG as m } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
async function P(r, t) {
|
|
28
|
+
return (await o.post(`${i(r)}${m.TRANSACT}`, t)).data;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
P as callRelayerTransactAPI
|
|
32
|
+
};
|
package/API/checkRisk.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import o from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as i } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as m } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const G = async (r, t) => (await o.get(`${i(r)}${m.ROUTES.checkRisk(t)}`)).data;
|
|
28
|
+
export {
|
|
29
|
+
G as checkRisk
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import r from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getDataServerURL as i } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { DATA_SERVER_CONFIG as m } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const L = async (t, o) => (await r.get(
|
|
28
|
+
`${i(t)}${m.getUserPoints(o)}`
|
|
29
|
+
)).data;
|
|
30
|
+
export {
|
|
31
|
+
L as getUserPoints
|
|
32
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import o from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as m } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as r } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const F = async (t) => (await o.get(`${m(t)}${r.ROUTES.getCommitmentsSnapshot}`)).data, G = async (t) => (await o.get(`${m(t)}${r.ROUTES.getAccessTokenSnapshot}`)).data;
|
|
28
|
+
export {
|
|
29
|
+
G as fetchAccessTokenSnapshot,
|
|
30
|
+
F as fetchCommitmentsSnapshot
|
|
31
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import t from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as i } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as o } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const E = async (r) => (await t.get(`${i(r)}${o.ROUTES.getNullifiers}`)).data;
|
|
28
|
+
export {
|
|
29
|
+
E as fetchNullifiers
|
|
30
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import p from "axios";
|
|
2
|
+
import "../constants/chains.constants.js";
|
|
3
|
+
import "../types/circom-data.types.js";
|
|
4
|
+
import "../types/transactions.types.js";
|
|
5
|
+
import "../types/curve.types.js";
|
|
6
|
+
import "ethers";
|
|
7
|
+
import "circomlibjs";
|
|
8
|
+
import "../data-structures/crypto-keys/keys.js";
|
|
9
|
+
import { getServerURL as a } from "./getServerURL.js";
|
|
10
|
+
import "../data-structures/crypto-keys/encryptDecryptUtxo.js";
|
|
11
|
+
import "../functions/web3/events/getShieldedBalance.js";
|
|
12
|
+
import "../webworker/workerFactory.js";
|
|
13
|
+
import "../functions/utils/external-action.utils.js";
|
|
14
|
+
import "../data-structures/custom-token-registry/CustomTokenRegistry.js";
|
|
15
|
+
import "../functions/utils/convertIntegrationProviderToExternalActionId.js";
|
|
16
|
+
import "../constants/coingecko.constants.js";
|
|
17
|
+
import { API_CONFIG as e } from "../constants/server.constants.js";
|
|
18
|
+
import "../constants/vite.constants.js";
|
|
19
|
+
import "../functions/utils/userAgent.js";
|
|
20
|
+
import "../constants/reorg-depths.constants.js";
|
|
21
|
+
import "../constants/kyc.constants.js";
|
|
22
|
+
import "../data-structures/volatile-helper/VolatileHelper.js";
|
|
23
|
+
import "libsodium-wrappers";
|
|
24
|
+
import "../constants/contracts.constants.js";
|
|
25
|
+
import "../constants/axelar.constants.js";
|
|
26
|
+
import "../constants/rewards.constants.js";
|
|
27
|
+
const _ = async (t, r, o, m, i) => (await p.get(
|
|
28
|
+
`${a(t)}${e.ROUTES.axelarGasEstimate(
|
|
29
|
+
r,
|
|
30
|
+
o,
|
|
31
|
+
m,
|
|
32
|
+
i
|
|
33
|
+
)}`
|
|
34
|
+
)).data;
|
|
35
|
+
export {
|
|
36
|
+
_ as getAxelarGasEstimate
|
|
37
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import o from "axios";
|
|
2
|
+
import { coingeckoPriceUrl as c, proHeader as t, COINGECKO_API_KEY as i, coingeckoPriceUrl2 as a, coingeckoTokenListUrl as s } from "../constants/coingecko.constants.js";
|
|
3
|
+
async function u(e) {
|
|
4
|
+
return (await o.get(c(e), {
|
|
5
|
+
headers: { [t]: i || "" }
|
|
6
|
+
})).data[e];
|
|
7
|
+
}
|
|
8
|
+
async function d(e, n) {
|
|
9
|
+
const r = e.toLowerCase();
|
|
10
|
+
return (await o.get(a(r, n), {
|
|
11
|
+
headers: { [t]: i || "" }
|
|
12
|
+
})).data[e];
|
|
13
|
+
}
|
|
14
|
+
async function C(e) {
|
|
15
|
+
return (await o.get(c(e), {
|
|
16
|
+
headers: { [t]: i || "" }
|
|
17
|
+
})).data;
|
|
18
|
+
}
|
|
19
|
+
async function f() {
|
|
20
|
+
return await o.get(s);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
u as getCoingeckoPrice,
|
|
24
|
+
d as getCoingeckoPrice2,
|
|
25
|
+
C as getCoingeckoPrices,
|
|
26
|
+
f as getCoingeckoTokenList
|
|
27
|
+
};
|