@hinkal/common 0.0.112 → 0.0.114
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/assets/{snarkjsWorkerLauncher-fuD5h_j0.js → snarkjsWorkerLauncher-CaBCnle3.js} +283 -257
- package/assets/snarkjsWorkerLogic-BAbiO5gj.js +17935 -0
- package/assets/snarkjsWorkerLogic-wHJfYCfg.js +15636 -0
- package/assets/{utxoWorkerLogic-CtFLQiAX.js → utxoWorkerLogic-BGFm-Zl2.js} +2 -2
- package/assets/{zkProofWorkerLauncher-J3Ts5_Ba.js → zkProofWorkerLauncher-BteYxRBn.js} +1 -1
- package/assets/{zkProofWorkerLogic-CPNuu61R.js → zkProofWorkerLogic-DiLbAhAo.js} +8354 -8298
- 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 +642 -455
- package/package.json +2 -2
- 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/{snarkjsWorkerLogic-CVna_BW9.mjs → webworker/snarkjsWorker/snarkjsWorkerLogic.js} +1 -1
- package/webworker/utxoWorker/utxoWorker.types.js +4 -0
- package/webworker/utxoWorker/utxoWorkerLogic.js +70 -0
- package/webworker/worker.registry.js +4 -0
- 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/snarkjsWorkerLogic-B6N4z_eM.js +0 -12136
- package/assets/snarkjsWorkerLogic-Fv0M38Mc.js +0 -12087
- package/index-DXElTGy9.mjs +0 -254449
- package/utxoWorkerLogic-B1Hh-bq4.mjs +0 -64
- package/zkProofWorkerLogic-D9rxuuiK.mjs +0 -60
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
{
|
|
3
|
+
inputs: [
|
|
4
|
+
{
|
|
5
|
+
internalType: "address",
|
|
6
|
+
name: "_ACTION_ADD_REMOVE_LIQ",
|
|
7
|
+
type: "address"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
internalType: "address",
|
|
11
|
+
name: "_ACTION_SWAP_PT",
|
|
12
|
+
type: "address"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
internalType: "address",
|
|
16
|
+
name: "_ACTION_SWAP_YT",
|
|
17
|
+
type: "address"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
internalType: "address",
|
|
21
|
+
name: "_ACTION_MISC",
|
|
22
|
+
type: "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
internalType: "address",
|
|
26
|
+
name: "_ACTION_CALLBACK",
|
|
27
|
+
type: "address"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
stateMutability: "nonpayable",
|
|
31
|
+
type: "constructor"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
inputs: [
|
|
35
|
+
{
|
|
36
|
+
internalType: "bytes4",
|
|
37
|
+
name: "selector",
|
|
38
|
+
type: "bytes4"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
name: "RouterInvalidAction",
|
|
42
|
+
type: "error"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
anonymous: !1,
|
|
46
|
+
inputs: [
|
|
47
|
+
{
|
|
48
|
+
components: [
|
|
49
|
+
{
|
|
50
|
+
internalType: "address",
|
|
51
|
+
name: "facetAddress",
|
|
52
|
+
type: "address"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
internalType: "enum IDiamondCut.FacetCutAction",
|
|
56
|
+
name: "action",
|
|
57
|
+
type: "uint8"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
internalType: "bytes4[]",
|
|
61
|
+
name: "functionSelectors",
|
|
62
|
+
type: "bytes4[]"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
indexed: !1,
|
|
66
|
+
internalType: "struct IDiamondCut.FacetCut[]",
|
|
67
|
+
name: "_diamondCut",
|
|
68
|
+
type: "tuple[]"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
indexed: !1,
|
|
72
|
+
internalType: "address",
|
|
73
|
+
name: "_init",
|
|
74
|
+
type: "address"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
indexed: !1,
|
|
78
|
+
internalType: "bytes",
|
|
79
|
+
name: "_calldata",
|
|
80
|
+
type: "bytes"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
name: "DiamondCut",
|
|
84
|
+
type: "event"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
stateMutability: "payable",
|
|
88
|
+
type: "fallback"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
inputs: [
|
|
92
|
+
{
|
|
93
|
+
internalType: "bytes4",
|
|
94
|
+
name: "sig",
|
|
95
|
+
type: "bytes4"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
name: "facetAddress",
|
|
99
|
+
outputs: [
|
|
100
|
+
{
|
|
101
|
+
internalType: "address",
|
|
102
|
+
name: "",
|
|
103
|
+
type: "address"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
stateMutability: "view",
|
|
107
|
+
type: "function"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
inputs: [],
|
|
111
|
+
name: "facetAddresses",
|
|
112
|
+
outputs: [
|
|
113
|
+
{
|
|
114
|
+
internalType: "address[]",
|
|
115
|
+
name: "",
|
|
116
|
+
type: "address[]"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
stateMutability: "view",
|
|
120
|
+
type: "function"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
inputs: [
|
|
124
|
+
{
|
|
125
|
+
internalType: "address",
|
|
126
|
+
name: "facet",
|
|
127
|
+
type: "address"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
name: "facetFunctionSelectors",
|
|
131
|
+
outputs: [
|
|
132
|
+
{
|
|
133
|
+
internalType: "bytes4[]",
|
|
134
|
+
name: "res",
|
|
135
|
+
type: "bytes4[]"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
stateMutability: "view",
|
|
139
|
+
type: "function"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
inputs: [],
|
|
143
|
+
name: "facets",
|
|
144
|
+
outputs: [
|
|
145
|
+
{
|
|
146
|
+
components: [
|
|
147
|
+
{
|
|
148
|
+
internalType: "address",
|
|
149
|
+
name: "facetAddress",
|
|
150
|
+
type: "address"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
internalType: "bytes4[]",
|
|
154
|
+
name: "functionSelectors",
|
|
155
|
+
type: "bytes4[]"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
internalType: "struct IDiamondLoupe.Facet[]",
|
|
159
|
+
name: "facets_",
|
|
160
|
+
type: "tuple[]"
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
stateMutability: "view",
|
|
164
|
+
type: "function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
stateMutability: "payable",
|
|
168
|
+
type: "receive"
|
|
169
|
+
}
|
|
170
|
+
];
|
|
171
|
+
export {
|
|
172
|
+
e as abi
|
|
173
|
+
};
|