@hinkal/common 0.2.14 → 0.2.16
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 +73 -34
- package/API/API.mjs +112 -59
- package/API/accessCodeCalls.cjs +1 -0
- package/API/accessCodeCalls.d.ts +23 -0
- package/API/accessCodeCalls.mjs +23 -0
- package/API/admin-calls.cjs +1 -0
- package/API/admin-calls.d.ts +2 -0
- package/API/admin-calls.mjs +8 -0
- package/API/ai-calls.cjs +1 -1
- package/API/ai-calls.d.ts +8 -0
- package/API/ai-calls.mjs +16 -8
- package/API/brotherhoodCalls.cjs +1 -0
- package/API/brotherhoodCalls.d.ts +82 -0
- package/API/brotherhoodCalls.mjs +59 -0
- package/API/callLifiAPI.cjs +1 -0
- package/API/callLifiAPI.d.ts +33 -0
- package/API/callLifiAPI.mjs +11 -0
- package/API/callMonitor.cjs +1 -1
- package/API/callMonitor.mjs +5 -2
- package/API/callOdosAPI.cjs +1 -1
- package/API/callOdosAPI.mjs +12 -13
- package/API/callOkxAPI.cjs +1 -0
- package/API/callOkxAPI.d.ts +10 -0
- package/API/callOkxAPI.mjs +13 -0
- package/API/callOneInchAPI.cjs +1 -1
- package/API/callOneInchAPI.mjs +9 -8
- package/API/callRelayer.cjs +1 -1
- package/API/callRelayer.d.ts +17 -0
- package/API/callRelayer.mjs +15 -6
- package/API/checkRisk.cjs +1 -1
- package/API/checkRisk.mjs +5 -4
- package/API/duneAPI.cjs +1 -1
- package/API/duneAPI.mjs +7 -5
- package/API/enclaveCalls.cjs +1 -0
- package/API/enclaveCalls.d.ts +9 -0
- package/API/enclaveCalls.mjs +11 -0
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.d.ts +12 -4
- package/API/fetchCommitmentsCache.mjs +21 -7
- package/API/generate-trading-points.cjs +1 -0
- package/API/generate-trading-points.d.ts +27 -0
- package/API/generate-trading-points.mjs +45 -0
- package/API/get-token-data.cjs +1 -0
- package/API/get-token-data.d.ts +6 -0
- package/API/get-token-data.mjs +8 -0
- package/API/getBridgeProtocols.cjs +1 -0
- package/API/getBridgeProtocols.d.ts +7 -0
- package/API/getBridgeProtocols.mjs +8 -0
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.d.ts +2 -2
- package/API/getGasEstimates.mjs +10 -10
- package/API/getLifiStatus.cjs +1 -0
- package/API/getLifiStatus.d.ts +24 -0
- package/API/getLifiStatus.mjs +15 -0
- package/API/getRelayerURL.cjs +1 -1
- package/API/getRelayerURL.mjs +4 -4
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +3 -1
- package/API/getServerURL.mjs +60 -27
- package/API/getTokenPrice.cjs +1 -1
- package/API/getTokenPrice.d.ts +0 -11
- package/API/getTokenPrice.mjs +8 -16
- package/API/getWebsiteURL.cjs +1 -0
- package/API/getWebsiteURL.d.ts +3 -0
- package/API/getWebsiteURL.mjs +56 -0
- package/API/index.d.ts +9 -3
- package/API/is-tx-stateless.cjs +1 -1
- package/API/is-tx-stateless.d.ts +4 -2
- package/API/is-tx-stateless.mjs +18 -7
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +4 -7
- package/API/kycCalls.mjs +34 -32
- package/API/leaderboardCalls.cjs +1 -0
- package/API/leaderboardCalls.d.ts +14 -0
- package/API/leaderboardCalls.mjs +16 -0
- package/API/proxyAccountsCalls.cjs +1 -0
- package/API/proxyAccountsCalls.d.ts +4 -0
- package/API/proxyAccountsCalls.mjs +26 -0
- package/API/referralsCalls.cjs +1 -0
- package/API/referralsCalls.d.ts +22 -0
- package/API/referralsCalls.mjs +22 -0
- package/API/relayCalls.cjs +1 -1
- package/API/relayCalls.d.ts +1 -1
- package/API/relayCalls.mjs +8 -5
- package/API/resolve-sns.cjs +1 -0
- package/API/resolve-sns.d.ts +1 -0
- package/API/resolve-sns.mjs +12 -0
- package/API/restoreSnapshots.cjs +1 -1
- package/API/restoreSnapshots.mjs +4 -3
- package/API/rewardsUserCalls.cjs +1 -0
- package/API/rewardsUserCalls.d.ts +51 -0
- package/API/rewardsUserCalls.mjs +44 -0
- package/API/scheduled-transactions-calls.cjs +1 -0
- package/API/scheduled-transactions-calls.d.ts +6 -0
- package/API/scheduled-transactions-calls.mjs +9 -0
- package/API/seedless-calls.cjs +1 -0
- package/API/seedless-calls.d.ts +53 -0
- package/API/seedless-calls.mjs +12 -0
- package/API/send-telegram-callback.cjs +1 -0
- package/API/send-telegram-callback.d.ts +7 -0
- package/API/send-telegram-callback.mjs +11 -0
- package/API/simulate-batch-tx.cjs +1 -0
- package/API/simulate-batch-tx.d.ts +3 -0
- package/API/simulate-batch-tx.mjs +13 -0
- package/API/solana-calls.cjs +1 -0
- package/API/solana-calls.d.ts +34 -0
- package/API/solana-calls.mjs +19 -0
- package/API/tenderly.api.cjs +1 -1
- package/API/tenderly.api.d.ts +9 -7
- package/API/tenderly.api.mjs +39 -29
- package/API/token-calls.cjs +1 -1
- package/API/token-calls.d.ts +1 -1
- package/API/token-calls.mjs +12 -7
- package/API/unspent-utxos-calls.cjs +1 -0
- package/API/unspent-utxos-calls.d.ts +26 -0
- package/API/unspent-utxos-calls.mjs +27 -0
- package/API/weeklyAnalyticCalls.cjs +1 -0
- package/API/weeklyAnalyticCalls.d.ts +22 -0
- package/API/weeklyAnalyticCalls.mjs +16 -0
- package/README.md +61 -0
- package/constants/activity.constants.cjs +1 -0
- package/constants/activity.constants.d.ts +2 -0
- package/constants/activity.constants.mjs +14 -0
- package/constants/addresses.constants.cjs +1 -1
- package/constants/addresses.constants.d.ts +9 -0
- package/constants/addresses.constants.mjs +71 -41
- package/constants/backend.constants.cjs +1 -1
- package/constants/backend.constants.d.ts +3 -1
- package/constants/backend.constants.mjs +6 -7
- package/constants/bridging.constants.cjs +1 -0
- package/constants/bridging.constants.d.ts +5 -0
- package/constants/bridging.constants.mjs +8 -0
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +10 -3
- package/constants/chains.constants.mjs +93 -75
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +4 -1
- package/constants/coingecko.constants.mjs +25 -15
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +74 -252
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +3271 -4613
- package/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -0
- package/constants/deploy-data/deploy-data-arcTestnet.json.mjs +7381 -0
- package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-avalanche.json.mjs +2447 -4757
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +3712 -6054
- package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +2375 -4151
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +3434 -8548
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +1209 -10210
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +1726 -8806
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +3263 -4619
- package/constants/deploy-data/deploy-data-solana.json.cjs +1 -0
- package/constants/deploy-data/deploy-data-solana.json.mjs +6111 -0
- package/constants/deploy-data/index.d.ts +3 -3
- package/constants/events.constants.cjs +1 -0
- package/constants/events.constants.d.ts +1 -0
- package/constants/events.constants.mjs +12 -0
- package/constants/fees.constants.cjs +1 -1
- package/constants/fees.constants.d.ts +1 -12
- package/constants/fees.constants.mjs +4 -35
- package/constants/function-signatures.constants.cjs +1 -0
- package/constants/function-signatures.constants.d.ts +5 -0
- package/constants/function-signatures.constants.mjs +8 -0
- package/constants/index.d.ts +11 -6
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +23 -35
- package/constants/lifi.constants.cjs +1 -0
- package/constants/lifi.constants.d.ts +1 -0
- package/constants/lifi.constants.mjs +4 -0
- package/constants/link.constant.cjs +1 -0
- package/constants/link.constant.d.ts +1 -0
- package/constants/link.constant.mjs +4 -0
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +10 -0
- package/constants/mediaUrls.constants.mjs +14 -4
- package/constants/oauthUrls.constants.cjs +1 -0
- package/constants/oauthUrls.constants.d.ts +7 -0
- package/constants/oauthUrls.constants.mjs +10 -0
- package/constants/okx.constants.cjs +1 -0
- package/constants/okx.constants.d.ts +2 -0
- package/constants/okx.constants.mjs +5 -0
- package/constants/permit2.constants.cjs +1 -1
- package/constants/permit2.constants.d.ts +6 -0
- package/constants/permit2.constants.mjs +14 -2
- package/constants/presale.constants.cjs +1 -0
- package/constants/presale.constants.d.ts +78 -0
- package/{externalABIs/LidoWstEthAbi.json.mjs → constants/presale.constants.mjs} +242 -218
- package/constants/protocol.constants.cjs +1 -1
- package/constants/protocol.constants.d.ts +34 -11
- package/constants/protocol.constants.mjs +44 -34
- package/constants/reorg-depths.constants.cjs +1 -1
- package/constants/reorg-depths.constants.mjs +14 -11
- package/constants/rewards.constants.cjs +1 -1
- package/constants/rewards.constants.d.ts +3 -4
- package/constants/rewards.constants.mjs +14 -21
- package/constants/save-depths.cjs +1 -0
- package/constants/save-depths.d.ts +3 -0
- package/constants/save-depths.mjs +19 -0
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +121 -77
- package/constants/server.constants.mjs +196 -129
- package/constants/tasks.constants.cjs +1 -0
- package/constants/tasks.constants.d.ts +9 -0
- package/constants/tasks.constants.mjs +230 -0
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +50 -33
- package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistry.json.mjs +1323 -427
- package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.mjs +1362 -376
- package/constants/token-data/arcTestnetRegistry.json.cjs +1 -0
- package/constants/token-data/arcTestnetRegistry.json.mjs +439 -0
- package/constants/token-data/avalancheRegistry.json.cjs +1 -1
- package/constants/token-data/avalancheRegistry.json.mjs +399 -260
- package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
- package/constants/token-data/avalancheRegistryFixed.json.mjs +399 -260
- package/constants/token-data/baseRegistry.json.cjs +1 -1
- package/constants/token-data/baseRegistry.json.mjs +854 -209
- package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
- package/constants/token-data/baseRegistryFixed.json.mjs +866 -194
- package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistry.json.mjs +444 -516
- package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +444 -516
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +3038 -1456
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +3233 -1193
- package/constants/token-data/index.cjs +1 -1
- package/constants/token-data/index.d.ts +474 -104
- package/constants/token-data/index.mjs +34 -28
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +3 -3
- package/constants/token-data/optimismRegistry.json.cjs +1 -1
- package/constants/token-data/optimismRegistry.json.mjs +129 -1402
- package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
- package/constants/token-data/optimismRegistryFixed.json.mjs +129 -1322
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +1617 -634
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +1649 -594
- package/constants/token-data/solanaLocalnetRegistry.json.cjs +1 -0
- package/constants/token-data/solanaLocalnetRegistry.json.mjs +24 -0
- package/constants/token-data/solanaMainnetRegistry.json.cjs +1 -0
- package/constants/token-data/solanaMainnetRegistry.json.mjs +560 -0
- package/constants/token-data/tokenPricing.consts.d.ts +0 -3
- package/constants/vite.constants.cjs +1 -1
- package/constants/vite.constants.d.ts +8 -11
- package/constants/vite.constants.mjs +12 -36
- package/constants/wallet.constants.cjs +1 -0
- package/constants/wallet.constants.d.ts +7 -0
- package/constants/wallet.constants.mjs +10 -0
- package/crypto/preProcessing.cjs +1 -1
- package/crypto/preProcessing.mjs +3 -3
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -0
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +18 -0
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +175 -0
- package/data-structures/ApprovalDBs/index.d.ts +1 -0
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +40 -46
- package/data-structures/Hinkal/Hinkal.mjs +345 -191
- package/data-structures/Hinkal/IHinkal.d.ts +39 -45
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -0
- package/data-structures/Hinkal/handleAutoDepositBack.d.ts +5 -0
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +108 -0
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +5 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +31 -50
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.d.ts +4 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +33 -31
- package/data-structures/Hinkal/hinkalApprove.cjs +1 -1
- package/data-structures/Hinkal/hinkalApprove.d.ts +2 -1
- package/data-structures/Hinkal/hinkalApprove.mjs +73 -78
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.cjs +1 -0
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.d.ts +3 -0
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +28 -0
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +46 -7
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +76 -62
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +188 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +1 -1
- package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +4 -4
- package/data-structures/Hinkal/hinkalGetZkMeProvider.d.ts +27 -2
- package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -1
- package/data-structures/Hinkal/hinkalInsideTransact.d.ts +3 -1
- package/data-structures/Hinkal/hinkalInsideTransact.mjs +84 -74
- package/data-structures/Hinkal/hinkalMultiSend.cjs +1 -1
- package/data-structures/Hinkal/hinkalMultiSend.mjs +6 -6
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +4 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +127 -73
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +7 -7
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.d.ts +4 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +48 -24
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -0
- package/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +6 -0
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +45 -0
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +3 -2
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +19 -17
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -0
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +133 -0
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +236 -0
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +6 -0
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +55 -0
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +6 -0
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +99 -0
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +5 -0
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +96 -0
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +4 -0
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +119 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +89 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +105 -0
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.d.ts +3 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +103 -58
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.d.ts +4 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +127 -2
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.d.ts +2 -2
- package/data-structures/Hinkal/hinkalWithdraw.mjs +95 -60
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -0
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +4 -0
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +147 -0
- package/data-structures/Hinkal/index.d.ts +5 -4
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +59 -27
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.d.ts +2 -3
- package/data-structures/IndexedDB/activity-db.mjs +146 -83
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.d.ts +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +59 -41
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +83 -29
- package/data-structures/IndexedDB/index.d.ts +1 -0
- package/data-structures/IndexedDB/signatures-db.cjs +1 -0
- package/data-structures/IndexedDB/signatures-db.d.ts +10 -0
- package/data-structures/IndexedDB/signatures-db.mjs +63 -0
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +2 -2
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +32 -31
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -0
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +19 -0
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +204 -0
- package/data-structures/TokenDBs/ArcPublicTokensDB.cjs +1 -0
- package/data-structures/TokenDBs/ArcPublicTokensDB.d.ts +11 -0
- package/data-structures/TokenDBs/ArcPublicTokensDB.mjs +112 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +17 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +173 -0
- package/data-structures/TokenDBs/IPublicTokensDB.d.ts +6 -0
- package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/PrivateTokensDB.mjs +48 -36
- package/data-structures/TokenDBs/PublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/PublicTokensDB.d.ts +4 -8
- package/data-structures/TokenDBs/PublicTokensDB.mjs +21 -70
- package/data-structures/TokenDBs/index.d.ts +2 -0
- package/data-structures/TokenDBs/token-visibility-db.cjs +1 -0
- package/data-structures/TokenDBs/token-visibility-db.d.ts +17 -0
- package/data-structures/TokenDBs/token-visibility-db.mjs +96 -0
- package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/data-structures/crypto-keys/decodeUTXO.d.ts +15 -3
- package/data-structures/crypto-keys/decodeUTXO.mjs +84 -26
- package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +36 -30
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +21 -0
- package/data-structures/crypto-keys/keys.mjs +118 -38
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractAccessTokenSnapshotService.d.ts → evm/AbstractAccessTokenSnapshotService.d.ts} +4 -5
- package/data-structures/event-service/{AbstractAccessTokenSnapshotService.mjs → evm/AbstractAccessTokenSnapshotService.mjs} +12 -23
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractApprovalsSnapshotService.d.ts → evm/AbstractApprovalsSnapshotService.d.ts} +4 -5
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +92 -0
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractCommitmentsSnapshotService.d.ts → evm/AbstractCommitmentsSnapshotService.d.ts} +5 -6
- package/data-structures/event-service/{AbstractCommitmentsSnapshotService.mjs → evm/AbstractCommitmentsSnapshotService.mjs} +26 -34
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -0
- package/data-structures/event-service/evm/AbstractEventService.d.ts +12 -0
- package/data-structures/event-service/evm/AbstractEventService.mjs +37 -0
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractNullifierSnapshotService.d.ts → evm/AbstractNullifierSnapshotService.d.ts} +4 -4
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +48 -0
- package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractSnapshotService.d.ts → evm/AbstractSnapshotService.d.ts} +6 -7
- package/data-structures/event-service/evm/AbstractSnapshotService.mjs +33 -0
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +26 -0
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +90 -0
- package/data-structures/event-service/index.d.ts +13 -6
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +34 -0
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +87 -0
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +29 -0
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +96 -0
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -0
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +22 -0
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +33 -0
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -0
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +21 -0
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +49 -0
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -0
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +22 -0
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +33 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +41 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +154 -0
- package/data-structures/http/BasicHttpClient.cjs +1 -0
- package/data-structures/http/BasicHttpClient.d.ts +11 -0
- package/data-structures/http/BasicHttpClient.mjs +25 -0
- package/data-structures/http/HttpClient.cjs +1 -0
- package/data-structures/http/HttpClient.d.ts +10 -0
- package/data-structures/http/HttpClient.mjs +15 -0
- package/data-structures/http/index.d.ts +2 -0
- package/data-structures/index.d.ts +4 -1
- package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/data-structures/merkle-tree/MerkleTree.d.ts +1 -1
- package/data-structures/merkle-tree/MerkleTree.mjs +15 -14
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +1 -1
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +1 -1
- package/data-structures/presale/PresaleContractWrapper.cjs +1 -0
- package/data-structures/presale/PresaleContractWrapper.d.ts +23 -0
- package/data-structures/presale/PresaleContractWrapper.mjs +54 -0
- package/data-structures/presale/index.d.ts +1 -0
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +4 -3
- package/data-structures/snapshot/SnapshotFetcherService.cjs +1 -0
- package/data-structures/snapshot/SnapshotFetcherService.d.ts +16 -0
- package/data-structures/snapshot/SnapshotFetcherService.mjs +42 -0
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientAccessTokenSnapshotService.d.ts → evm-snapshots/ClientAccessTokenSnapshotService.d.ts} +4 -3
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +41 -0
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientApprovalsSnapshotService.d.ts → evm-snapshots/ClientApprovalsSnapshotService.d.ts} +4 -4
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +43 -0
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +35 -0
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -0
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +34 -0
- package/data-structures/snapshot/index.d.ts +8 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +42 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +34 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.d.ts +8 -0
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +34 -0
- package/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
- package/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -13
- package/data-structures/token-price-fetcher/TokenChecker.mjs +13 -26
- package/data-structures/transactions-manager/history/history.types.cjs +1 -1
- package/data-structures/transactions-manager/history/history.types.d.ts +2 -81
- package/data-structures/transactions-manager/history/history.types.mjs +2 -42
- package/data-structures/transactions-manager/index.d.ts +0 -1
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +6 -1
- package/data-structures/utxo/Utxo.mjs +37 -24
- package/error-handling/customErrors/ErrorWithTx.cjs +1 -0
- package/error-handling/customErrors/ErrorWithTx.d.ts +5 -0
- package/error-handling/customErrors/ErrorWithTx.mjs +9 -0
- package/error-handling/customErrors/SimulationFailureError.cjs +1 -0
- package/error-handling/customErrors/SimulationFailureError.d.ts +10 -0
- package/error-handling/customErrors/SimulationFailureError.mjs +9 -0
- package/error-handling/customErrors/index.d.ts +2 -0
- package/error-handling/error-codes.constants.cjs +2 -2
- package/error-handling/error-codes.constants.d.ts +19 -20
- package/error-handling/error-codes.constants.mjs +178 -179
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.d.ts +2 -0
- package/error-handling/get-error.message.mjs +81 -36
- package/error-handling/index.d.ts +1 -2
- package/error-handling/types.cjs +1 -1
- package/error-handling/types.d.ts +4 -1
- package/error-handling/types.mjs +2 -2
- package/externalABIs/ERC1155.json.cjs +1 -0
- package/externalABIs/ERC1155.json.mjs +320 -0
- package/externalABIs/ERC721.json.cjs +1 -0
- package/externalABIs/{BeefyZapOneInchAbi.json.mjs → ERC721.json.mjs} +162 -167
- package/externalABIs/NodeInterfaceABI.json.cjs +1 -0
- package/externalABIs/NodeInterfaceABI.json.mjs +280 -0
- package/externalABIs/index.cjs +1 -1
- package/externalABIs/index.d.ts +25 -79
- package/externalABIs/index.mjs +18 -20
- package/externalABIs/swapAbi.cjs +1 -0
- package/externalABIs/{BeefyZapAbi.json.mjs → swapAbi.mjs} +161 -81
- package/functions/connectors.types.d.ts +14 -0
- package/functions/index.d.ts +1 -1
- package/functions/pre-transaction/addressTableLookup.cjs +1 -0
- package/functions/pre-transaction/addressTableLookup.d.ts +4 -0
- package/functions/pre-transaction/addressTableLookup.mjs +44 -0
- package/functions/pre-transaction/constructAdminData.cjs +1 -0
- package/functions/pre-transaction/constructAdminData.d.ts +3 -0
- package/functions/pre-transaction/constructAdminData.mjs +33 -0
- package/functions/pre-transaction/convert-okx-instructions.cjs +1 -0
- package/functions/pre-transaction/convert-okx-instructions.d.ts +12 -0
- package/functions/pre-transaction/convert-okx-instructions.mjs +30 -0
- package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/functions/pre-transaction/getExternalSwapAddress.mjs +9 -6
- package/functions/pre-transaction/getFeeStructure.cjs +1 -1
- package/functions/pre-transaction/getFeeStructure.d.ts +2 -2
- package/functions/pre-transaction/getFeeStructure.mjs +8 -9
- package/functions/pre-transaction/getFlatFees.cjs +1 -1
- package/functions/pre-transaction/getFlatFees.d.ts +2 -2
- package/functions/pre-transaction/getFlatFees.mjs +43 -166
- package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -0
- package/functions/pre-transaction/getSolanaCalldataHash.d.ts +4 -0
- package/functions/pre-transaction/getSolanaCalldataHash.mjs +36 -0
- package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -0
- package/functions/pre-transaction/getVolatileTransferAmount.d.ts +9 -0
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +53 -0
- package/functions/pre-transaction/index.d.ts +12 -1
- package/functions/pre-transaction/initTokenLimitIfNeeded.cjs +1 -0
- package/functions/pre-transaction/initTokenLimitIfNeeded.d.ts +3 -0
- package/functions/pre-transaction/initTokenLimitIfNeeded.mjs +20 -0
- package/functions/pre-transaction/interaction-to-action.cjs +1 -1
- package/functions/pre-transaction/interaction-to-action.d.ts +2 -2
- package/functions/pre-transaction/interaction-to-action.mjs +6 -53
- package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -0
- package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +3 -0
- package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +24 -0
- package/functions/pre-transaction/merge-with-fee-structure.cjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure.mjs +15 -17
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +1 -0
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +32 -35
- package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +31 -18
- package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
- package/functions/pre-transaction/process-gas-estimates.d.ts +2 -2
- package/functions/pre-transaction/process-gas-estimates.mjs +9 -9
- package/functions/pre-transaction/recipientUtxoProcessing.cjs +1 -0
- package/functions/pre-transaction/recipientUtxoProcessing.d.ts +3 -0
- package/functions/pre-transaction/recipientUtxoProcessing.mjs +36 -0
- package/functions/pre-transaction/sendInitNullifiersTransaction.cjs +1 -0
- package/functions/pre-transaction/sendInitNullifiersTransaction.d.ts +11 -0
- package/functions/pre-transaction/sendInitNullifiersTransaction.mjs +41 -0
- package/functions/pre-transaction/sendV0Transaction.cjs +1 -0
- package/functions/pre-transaction/sendV0Transaction.d.ts +22 -0
- package/functions/pre-transaction/sendV0Transaction.mjs +121 -0
- package/functions/pre-transaction/solana-public-signals.cjs +1 -0
- package/functions/pre-transaction/solana-public-signals.d.ts +19 -0
- package/functions/pre-transaction/solana-public-signals.mjs +60 -0
- package/functions/pre-transaction/solana.cjs +1 -0
- package/functions/pre-transaction/solana.d.ts +17 -0
- package/functions/pre-transaction/solana.mjs +96 -0
- package/functions/pre-transaction/solanaTransfer.utils.cjs +1 -0
- package/functions/pre-transaction/solanaTransfer.utils.d.ts +6 -0
- package/functions/pre-transaction/solanaTransfer.utils.mjs +38 -0
- package/functions/pre-transaction/store-instructions.cjs +1 -0
- package/functions/pre-transaction/store-instructions.d.ts +4 -0
- package/functions/pre-transaction/store-instructions.mjs +9 -0
- package/functions/pre-transaction/store-proof.cjs +1 -0
- package/functions/pre-transaction/store-proof.d.ts +7 -0
- package/functions/pre-transaction/store-proof.mjs +55 -0
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +20 -7
- package/functions/private-wallet/emporium.helpers.mjs +171 -95
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.d.ts +3 -1
- package/functions/private-wallet/emporium.swap.helpers.mjs +134 -69
- package/functions/private-wallet/index.d.ts +0 -1
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +5 -1
- package/functions/snarkjs/common.snarkjs.mjs +70 -69
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +64 -6
- package/functions/snarkjs/constant.mjs +93 -29
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +7 -6
- package/functions/snarkjs/constructEmporiumProof.mjs +146 -149
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +4 -4
- package/functions/snarkjs/constructGeneralZkProof.mjs +115 -118
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -0
- package/functions/snarkjs/constructSolanaZkProof.d.ts +13 -0
- package/functions/snarkjs/constructSolanaZkProof.mjs +105 -0
- package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -0
- package/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +11 -0
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +22 -0
- package/functions/snarkjs/generateCircomData.cjs +1 -1
- package/functions/snarkjs/generateCircomData.d.ts +1 -1
- package/functions/snarkjs/generateCircomData.mjs +23 -23
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.mjs +13 -4
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
- package/functions/snarkjs/generateZkProofEnclave.mjs +13 -12
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -0
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +13 -0
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +92 -0
- package/functions/snarkjs/getZKFiles.cjs +1 -1
- package/functions/snarkjs/getZKFiles.mjs +13 -13
- package/functions/snarkjs/index.d.ts +1 -0
- package/functions/utils/addresses.cjs +1 -1
- package/functions/utils/addresses.d.ts +2 -1
- package/functions/utils/addresses.mjs +21 -15
- package/functions/utils/amounts.utils.cjs +1 -1
- package/functions/utils/amounts.utils.d.ts +3 -0
- package/functions/utils/amounts.utils.mjs +54 -28
- package/functions/utils/bytes32.utils.cjs +1 -0
- package/functions/utils/bytes32.utils.d.ts +2 -0
- package/functions/utils/bytes32.utils.mjs +10 -0
- package/functions/utils/cacheDevice.utils.cjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +8 -5
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +53 -52
- package/functions/utils/caseInsensitive.utils.cjs +1 -1
- package/functions/utils/caseInsensitive.utils.d.ts +1 -1
- package/functions/utils/caseInsensitive.utils.mjs +3 -3
- package/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
- package/functions/utils/convertEmporiumOpToCallInfo.d.ts +1 -1
- package/functions/utils/convertEmporiumOpToCallInfo.mjs +6 -5
- package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
- package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +5 -4
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +4 -0
- package/functions/utils/create-provider.mjs +9 -2
- package/functions/utils/encodeTokenWithId.cjs +1 -1
- package/functions/utils/encodeTokenWithId.d.ts +1 -1
- package/functions/utils/encodeTokenWithId.mjs +6 -2
- package/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/functions/utils/encryptInputForEnclave.mjs +22 -21
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +7 -2
- package/functions/utils/erc20tokenFunctions.mjs +54 -21
- package/functions/utils/ethers-formatter.utils.cjs +1 -0
- package/functions/utils/ethers-formatter.utils.d.ts +5 -0
- package/functions/utils/ethers-formatter.utils.mjs +59 -0
- package/functions/utils/evmNetworkFunctions.cjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +10 -7
- package/functions/utils/external-action.utils.cjs +1 -1
- package/functions/utils/external-action.utils.d.ts +0 -5
- package/functions/utils/external-action.utils.mjs +8 -56
- package/functions/utils/fees.utils.cjs +1 -1
- package/functions/utils/fees.utils.d.ts +3 -0
- package/functions/utils/fees.utils.mjs +29 -8
- package/functions/utils/get-hinkal-approvals.cjs +1 -0
- package/functions/utils/get-hinkal-approvals.d.ts +3 -0
- package/functions/utils/get-hinkal-approvals.mjs +38 -0
- package/functions/utils/get-signature-header.cjs +1 -0
- package/functions/utils/get-signature-header.d.ts +5 -0
- package/functions/utils/get-signature-header.mjs +8 -0
- package/functions/utils/getBlockExplorerUrl.cjs +1 -1
- package/functions/utils/getBlockExplorerUrl.mjs +3 -3
- package/functions/utils/getDataFromTransaction.cjs +1 -1
- package/functions/utils/getDataFromTransaction.d.ts +3 -4
- package/functions/utils/getDataFromTransaction.mjs +25 -44
- package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/functions/utils/getRecipientInfoFromUserKeys.d.ts +0 -1
- package/functions/utils/getRecipientInfoFromUserKeys.mjs +10 -13
- package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -0
- package/functions/utils/getUtxosFromReceipt.utils.d.ts +4 -0
- package/functions/utils/getUtxosFromReceipt.utils.mjs +29 -0
- package/functions/utils/getUtxosFromReceiptSolana.cjs +1 -0
- package/functions/utils/getUtxosFromReceiptSolana.d.ts +5 -0
- package/functions/utils/getUtxosFromReceiptSolana.mjs +19 -0
- package/functions/utils/inLogicMetadata.cjs +1 -0
- package/functions/utils/inLogicMetadata.d.ts +2 -0
- package/functions/utils/inLogicMetadata.mjs +8 -0
- package/functions/utils/index.d.ts +16 -2
- package/functions/utils/involves-permit2-op.cjs +1 -1
- package/functions/utils/involves-permit2-op.d.ts +8 -1
- package/functions/utils/involves-permit2-op.mjs +7 -3
- package/functions/utils/ipfs.cjs +1 -0
- package/functions/utils/ipfs.d.ts +8 -0
- package/functions/utils/ipfs.mjs +25 -0
- package/functions/utils/is-valid-url.cjs +1 -0
- package/functions/utils/is-valid-url.d.ts +1 -0
- package/functions/utils/is-valid-url.mjs +4 -0
- package/functions/utils/lifi.utils.d.ts +1 -0
- package/functions/utils/merkleTree.utils.cjs +1 -1
- package/functions/utils/merkleTree.utils.mjs +7 -6
- package/functions/utils/mutexes.utils.cjs +1 -0
- package/functions/utils/mutexes.utils.d.ts +2 -0
- package/functions/utils/mutexes.utils.mjs +5 -0
- package/functions/utils/networks.utils.cjs +1 -0
- package/functions/utils/networks.utils.d.ts +1 -0
- package/functions/utils/networks.utils.mjs +21 -0
- package/functions/utils/nftTokenFunctions.cjs +1 -0
- package/functions/utils/nftTokenFunctions.d.ts +2 -0
- package/functions/utils/nftTokenFunctions.mjs +40 -0
- package/functions/utils/postToOffscreen.cjs +1 -0
- package/functions/utils/postToOffscreen.d.ts +2 -0
- package/functions/utils/postToOffscreen.mjs +6 -0
- package/functions/utils/prepareHinkal.cjs +1 -0
- package/functions/utils/prepareHinkal.d.ts +14 -2
- package/functions/utils/prepareHinkal.mjs +88 -0
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.d.ts +5 -3
- package/functions/utils/publicBalance.utils.mjs +95 -15
- package/functions/utils/solanaMint.utils.cjs +1 -0
- package/functions/utils/solanaMint.utils.d.ts +10 -0
- package/functions/utils/solanaMint.utils.mjs +14 -0
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +3 -0
- package/functions/utils/string.utils.mjs +10 -4
- package/functions/utils/time.utils.cjs +1 -1
- package/functions/utils/time.utils.d.ts +11 -0
- package/functions/utils/time.utils.mjs +52 -4
- package/functions/utils/trimFieldValues.cjs +1 -0
- package/functions/utils/trimFieldValues.d.ts +4 -0
- package/functions/utils/trimFieldValues.mjs +17 -0
- package/functions/utils/userAgent.cjs +1 -1
- package/functions/utils/userAgent.d.ts +2 -1
- package/functions/utils/userAgent.mjs +23 -11
- package/functions/utils/walletBalances.utils.cjs +1 -0
- package/functions/utils/walletBalances.utils.d.ts +17 -0
- package/functions/utils/walletBalances.utils.mjs +42 -0
- package/functions/web3/EIP-712.cjs +1 -0
- package/functions/web3/EIP-712.d.ts +23 -0
- package/functions/web3/EIP-712.mjs +113 -0
- package/functions/web3/connectors.utils.cjs +1 -0
- package/functions/web3/connectors.utils.d.ts +6 -0
- package/functions/web3/connectors.utils.mjs +23 -0
- package/functions/web3/events/balanceChangedCustomHandler.cjs +1 -1
- package/functions/web3/events/balanceChangedCustomHandler.mjs +2 -3
- package/functions/web3/events/balanceChangedHandler.cjs +1 -1
- package/functions/web3/events/balanceChangedHandler.mjs +4 -5
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.mjs +42 -68
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +7 -6
- package/functions/web3/events/getInputUtxoAndBalance.mjs +154 -119
- package/functions/web3/events/getInputUtxosEnclave.cjs +1 -0
- package/functions/web3/events/getInputUtxosEnclave.d.ts +8 -0
- package/functions/web3/events/getInputUtxosEnclave.mjs +47 -0
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.ts +2 -2
- package/functions/web3/events/getShieldedBalance.mjs +78 -68
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -0
- package/functions/web3/events/getTransactionLogEvents.d.ts +13 -0
- package/functions/web3/events/getTransactionLogEvents.mjs +75 -0
- package/functions/web3/events/index.d.ts +1 -0
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -0
- package/functions/web3/fetchSolanaMerkleTreeRootHash.d.ts +4 -0
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +45 -0
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +3 -2
- package/functions/web3/functionCalls/accessTokenCalls.mjs +24 -21
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +21 -19
- package/functions/web3/functionCalls/constructBatchCall.cjs +1 -0
- package/functions/web3/functionCalls/constructBatchCall.d.ts +5 -0
- package/functions/web3/functionCalls/constructBatchCall.mjs +21 -0
- package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
- package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -1
- package/functions/web3/functionCalls/estimateGasRelayer.mjs +15 -14
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +38 -24
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +22 -2
- package/functions/web3/functionCalls/transactCallRelayer.mjs +86 -32
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +24 -20
- package/functions/web3/getPublicAddressBalance.cjs +1 -0
- package/functions/web3/getPublicAddressBalance.d.ts +2 -0
- package/functions/web3/getPublicAddressBalance.mjs +9 -0
- package/functions/web3/getTokenHolder.cjs +1 -0
- package/functions/web3/getTokenHolder.d.ts +1 -0
- package/functions/web3/getTokenHolder.mjs +73 -0
- package/functions/web3/index.d.ts +7 -0
- package/functions/web3/lifiAPI.cjs +1 -0
- package/functions/web3/lifiAPI.d.ts +6 -0
- package/functions/web3/lifiAPI.mjs +30 -0
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.d.ts +1 -1
- package/functions/web3/odosAPI.mjs +30 -21
- package/functions/web3/okxAPI.cjs +1 -0
- package/functions/web3/okxAPI.d.ts +8 -0
- package/functions/web3/okxAPI.mjs +43 -0
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.d.ts +1 -1
- package/functions/web3/oneInchAPI.mjs +30 -20
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +33 -26
- package/functions/web3/signAndSendSerializedTransaction.cjs +1 -0
- package/functions/web3/signAndSendSerializedTransaction.d.ts +2 -0
- package/functions/web3/signAndSendSerializedTransaction.mjs +11 -0
- package/functions/web3/solana-wagmi-adapter.cjs +1 -0
- package/functions/web3/solana-wagmi-adapter.d.ts +3 -0
- package/functions/web3/solana-wagmi-adapter.mjs +29 -0
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.mjs +36 -27
- package/index.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.mjs +978 -779
- package/mutexes/index.d.ts +1 -0
- package/mutexes/mutex.cjs +1 -0
- package/mutexes/mutex.d.ts +2 -0
- package/mutexes/mutex.mjs +5 -0
- package/package.json +10 -3
- package/providers/CustomEthersProvider.cjs +1 -0
- package/providers/CustomEthersProvider.d.ts +10 -0
- package/providers/CustomEthersProvider.mjs +29 -0
- package/providers/CustomSolanaConnection.cjs +1 -0
- package/providers/CustomSolanaConnection.d.ts +4 -0
- package/providers/CustomSolanaConnection.mjs +33 -0
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +1 -2
- package/providers/EthersProviderAdapter.mjs +19 -21
- package/providers/SolanaProviderAdapter.cjs +1 -0
- package/providers/SolanaProviderAdapter.d.ts +44 -0
- package/providers/SolanaProviderAdapter.mjs +125 -0
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +5 -2
- package/providers/WagmiProviderAdapter.mjs +110 -56
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +27 -15
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +27 -15
- package/types/API.types.d.ts +0 -19
- package/types/IMultiThreadedUtxoUtils.d.ts +2 -2
- package/types/RewardUserEnums.cjs +1 -0
- package/types/RewardUserEnums.d.ts +11 -0
- package/types/RewardUserEnums.mjs +5 -0
- package/types/TransactionSimulator.types.d.ts +17 -3
- package/types/WeeklyAnalytics.types.d.ts +37 -0
- package/types/activities.types.cjs +1 -1
- package/types/activities.types.d.ts +34 -7
- package/types/activities.types.mjs +22 -10
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +42 -20
- package/types/admin.types.mjs +2 -3
- package/types/all-points.types.d.ts +7 -0
- package/types/approvals.types.cjs +1 -0
- package/types/approvals.types.d.ts +41 -0
- package/types/approvals.types.mjs +4 -0
- package/types/bridging.types.d.ts +29 -0
- package/types/brotherhood-user.types.d.ts +11 -0
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +26 -4
- package/types/cache.types.mjs +2 -2
- package/types/circom-data.types.d.ts +12 -0
- package/types/coingecko.types.d.ts +207 -0
- package/types/commitments.types.d.ts +12 -0
- package/types/confirmation-request.types.cjs +1 -0
- package/types/confirmation-request.types.d.ts +10 -0
- package/types/confirmation-request.types.mjs +4 -0
- package/types/connector.types.d.ts +4 -0
- package/types/contacts.types.d.ts +1 -0
- package/types/eip5792.types.cjs +1 -0
- package/types/eip5792.types.d.ts +33 -0
- package/types/eip5792.types.mjs +5 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +21 -95
- package/types/ethereum-network.types.mjs +2 -2
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +4 -16
- package/types/external-action.types.mjs +2 -2
- package/types/generatePoints.cjs +1 -0
- package/types/generatePoints.d.ts +14 -0
- package/types/generatePoints.mjs +5 -0
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +24 -96
- package/types/hinkal.types.mjs +26 -33
- package/types/http.types.d.ts +8 -0
- package/types/index.d.ts +25 -8
- package/types/kyc.types.cjs +1 -1
- package/types/kyc.types.d.ts +5 -3
- package/types/kyc.types.mjs +3 -3
- package/types/message.types.d.ts +5 -0
- package/types/new-rewards.type.cjs +1 -0
- package/types/new-rewards.type.d.ts +156 -0
- package/types/new-rewards.type.mjs +7 -0
- package/types/offscreen.types.cjs +1 -0
- package/types/offscreen.types.d.ts +9 -0
- package/types/offscreen.types.mjs +4 -0
- package/types/okx.types.d.ts +57 -0
- package/types/presaleReferral.types.d.ts +4 -0
- package/types/proxy.types.d.ts +10 -0
- package/types/referral.types.d.ts +12 -0
- package/types/rewards.types.cjs +1 -1
- package/types/rewards.types.d.ts +15 -210
- package/types/rewards.types.mjs +3 -25
- package/types/routing.types.cjs +1 -0
- package/types/routing.types.d.ts +7 -0
- package/types/routing.types.mjs +4 -0
- package/types/sandbox.types.cjs +1 -1
- package/types/sandbox.types.d.ts +86 -21
- package/types/sandbox.types.mjs +2 -2
- package/types/scheduled-transactions.types.cjs +1 -0
- package/types/scheduled-transactions.types.d.ts +22 -0
- package/types/scheduled-transactions.types.mjs +4 -0
- package/types/session.types.d.ts +11 -0
- package/types/signature.types.d.ts +10 -0
- package/types/slippage.types.cjs +1 -1
- package/types/slippage.types.d.ts +1 -13
- package/types/slippage.types.mjs +2 -13
- package/types/solana.types.d.ts +75 -0
- package/types/tenderly.api.types.d.ts +37 -21
- package/types/token-prices.types.cjs +1 -0
- package/types/token-prices.types.d.ts +7 -0
- package/types/token-prices.types.mjs +9 -0
- package/types/token.types.d.ts +32 -8
- package/types/transactions.types.cjs +1 -1
- package/types/transactions.types.d.ts +12 -20
- package/types/transactions.types.mjs +5 -5
- package/types/wc.types.d.ts +4 -15
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +28 -21
- package/webworker/utxoWorker/utxoWorker.types.d.ts +2 -0
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLogic.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLogic.mjs +33 -31
- package/webworker/viteWorkerURL.constant.cjs +3 -3
- package/webworker/viteWorkerURL.constant.mjs +3 -3
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/API/HinkalPointsCalls.cjs +0 -1
- package/API/HinkalPointsCalls.d.ts +0 -20
- package/API/HinkalPointsCalls.mjs +0 -15
- package/API/callBeefyGraphAPI.cjs +0 -1
- package/API/callBeefyGraphAPI.d.ts +0 -2
- package/API/callBeefyGraphAPI.mjs +0 -14
- package/API/callCurveAPI.cjs +0 -1
- package/API/callCurveAPI.d.ts +0 -9
- package/API/callCurveAPI.mjs +0 -160
- package/API/dataServerCalls.cjs +0 -1
- package/API/dataServerCalls.d.ts +0 -6
- package/API/dataServerCalls.mjs +0 -13
- package/API/fetchNullifiers.cjs +0 -1
- package/API/fetchNullifiers.d.ts +0 -5
- package/API/fetchNullifiers.mjs +0 -7
- package/API/getAxelarGasEstimate.cjs +0 -1
- package/API/getAxelarGasEstimate.d.ts +0 -5
- package/API/getAxelarGasEstimate.mjs +0 -14
- package/API/getConnextReceiveFee.cjs +0 -1
- package/API/getConnextReceiveFee.d.ts +0 -2
- package/API/getConnextReceiveFee.mjs +0 -7
- package/API/referralProgramCalls.cjs +0 -1
- package/API/referralProgramCalls.d.ts +0 -36
- package/API/referralProgramCalls.mjs +0 -35
- package/API/rewardsPointsCalls.cjs +0 -1
- package/API/rewardsPointsCalls.d.ts +0 -10
- package/API/rewardsPointsCalls.mjs +0 -15
- package/API/userVerifyTransactions.cjs +0 -1
- package/API/userVerifyTransactions.d.ts +0 -19
- package/API/userVerifyTransactions.mjs +0 -21
- package/constants/axelar.constants.cjs +0 -1
- package/constants/axelar.constants.d.ts +0 -5
- package/constants/axelar.constants.mjs +0 -48
- package/constants/beefy.registry.cjs +0 -1
- package/constants/beefy.registry.d.ts +0 -8
- package/constants/beefy.registry.mjs +0 -24
- package/constants/crvCvx.registry.cjs +0 -1
- package/constants/crvCvx.registry.d.ts +0 -20
- package/constants/crvCvx.registry.mjs +0 -638
- package/constants/crvDynamic.registry.cjs +0 -1
- package/constants/crvDynamic.registry.d.ts +0 -1
- package/constants/crvDynamic.registry.mjs +0 -24
- package/constants/deploy-data/deploy-data-axelar1.json.cjs +0 -1
- package/constants/deploy-data/deploy-data-axelar1.json.mjs +0 -4329
- package/constants/deploy-data/deploy-data-axelar2.json.cjs +0 -1
- package/constants/deploy-data/deploy-data-axelar2.json.mjs +0 -4329
- package/constants/lido.constants.cjs +0 -1
- package/constants/lido.constants.d.ts +0 -10
- package/constants/lido.constants.mjs +0 -13
- package/constants/pendle.registry.cjs +0 -1
- package/constants/pendle.registry.d.ts +0 -21
- package/constants/pendle.registry.mjs +0 -253
- package/constants/token-data/tokenPricing.consts.cjs +0 -1
- package/constants/token-data/tokenPricing.consts.mjs +0 -6
- package/data-structures/Hinkal/hinkalActionBeefy.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionBeefy.d.ts +0 -3
- package/data-structures/Hinkal/hinkalActionBeefy.mjs +0 -80
- package/data-structures/Hinkal/hinkalActionConvex.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionConvex.d.ts +0 -12
- package/data-structures/Hinkal/hinkalActionConvex.mjs +0 -61
- package/data-structures/Hinkal/hinkalActionCurve.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionCurve.d.ts +0 -12
- package/data-structures/Hinkal/hinkalActionCurve.mjs +0 -93
- package/data-structures/Hinkal/hinkalActionLidoEth.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionLidoEth.d.ts +0 -4
- package/data-structures/Hinkal/hinkalActionLidoEth.mjs +0 -72
- package/data-structures/Hinkal/hinkalActionPendle.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionPendle.d.ts +0 -3
- package/data-structures/Hinkal/hinkalActionPendle.mjs +0 -119
- package/data-structures/Hinkal/hinkalActionPendleLP.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionPendleLP.d.ts +0 -7
- package/data-structures/Hinkal/hinkalActionPendleLP.mjs +0 -81
- package/data-structures/Hinkal/hinkalActionStake.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionStake.mjs +0 -122
- package/data-structures/Hinkal/hinkalActionVolatile.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionVolatile.d.ts +0 -3
- package/data-structures/Hinkal/hinkalActionVolatile.mjs +0 -89
- package/data-structures/Hinkal/hinkalDeploySubAccount.cjs +0 -1
- package/data-structures/Hinkal/hinkalDeploySubAccount.d.ts +0 -3
- package/data-structures/Hinkal/hinkalDeploySubAccount.mjs +0 -15
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractApprovalsSnapshotService.mjs +0 -104
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractEventService.cjs +0 -1
- package/data-structures/event-service/AbstractEventService.d.ts +0 -31
- package/data-structures/event-service/AbstractEventService.mjs +0 -95
- package/data-structures/event-service/AbstractNullifierSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractNullifierSnapshotService.mjs +0 -59
- package/data-structures/event-service/AbstractSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractSnapshotService.mjs +0 -35
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +0 -32
- package/data-structures/snapshot/ClientApprovalsSnapshotService.cjs +0 -1
- package/data-structures/snapshot/ClientApprovalsSnapshotService.mjs +0 -23
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +0 -1
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.d.ts +0 -7
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +0 -31
- package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +0 -1
- package/data-structures/snapshot/ClientNullifierSnapshotService.d.ts +0 -7
- package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +0 -28
- package/data-structures/transactions-manager/TransactionsManager.cjs +0 -1
- package/data-structures/transactions-manager/TransactionsManager.d.ts +0 -28
- package/data-structures/transactions-manager/TransactionsManager.mjs +0 -180
- package/data-structures/transactions-manager/history/getBeefyData.cjs +0 -1
- package/data-structures/transactions-manager/history/getBeefyData.d.ts +0 -3
- package/data-structures/transactions-manager/history/getBeefyData.mjs +0 -49
- package/data-structures/transactions-manager/history/getConvexData.cjs +0 -1
- package/data-structures/transactions-manager/history/getConvexData.d.ts +0 -6
- package/data-structures/transactions-manager/history/getConvexData.mjs +0 -38
- package/data-structures/transactions-manager/history/getCurveData.cjs +0 -1
- package/data-structures/transactions-manager/history/getCurveData.d.ts +0 -6
- package/data-structures/transactions-manager/history/getCurveData.mjs +0 -78
- package/data-structures/transactions-manager/history/getDepositData.cjs +0 -1
- package/data-structures/transactions-manager/history/getDepositData.d.ts +0 -2
- package/data-structures/transactions-manager/history/getDepositData.mjs +0 -12
- package/data-structures/transactions-manager/history/getLidoData.cjs +0 -1
- package/data-structures/transactions-manager/history/getLidoData.d.ts +0 -10
- package/data-structures/transactions-manager/history/getLidoData.mjs +0 -26
- package/data-structures/transactions-manager/history/getPendleData.cjs +0 -1
- package/data-structures/transactions-manager/history/getPendleData.d.ts +0 -3
- package/data-structures/transactions-manager/history/getPendleData.mjs +0 -40
- package/data-structures/transactions-manager/history/getSwapData.cjs +0 -1
- package/data-structures/transactions-manager/history/getSwapData.d.ts +0 -3
- package/data-structures/transactions-manager/history/getSwapData.mjs +0 -19
- package/data-structures/transactions-manager/history/getTxDetails.cjs +0 -1
- package/data-structures/transactions-manager/history/getTxDetails.d.ts +0 -3
- package/data-structures/transactions-manager/history/getTxDetails.mjs +0 -57
- package/data-structures/transactions-manager/history/getVolatileData.cjs +0 -1
- package/data-structures/transactions-manager/history/getVolatileData.d.ts +0 -32
- package/data-structures/transactions-manager/history/getVolatileData.mjs +0 -56
- package/data-structures/transactions-manager/history/history.utils.cjs +0 -1
- package/data-structures/transactions-manager/history/history.utils.d.ts +0 -8
- package/data-structures/transactions-manager/history/history.utils.mjs +0 -8
- package/data-structures/volatile-helper/VolatileHelper.cjs +0 -1
- package/data-structures/volatile-helper/VolatileHelper.d.ts +0 -57
- package/data-structures/volatile-helper/VolatileHelper.mjs +0 -161
- package/data-structures/volatile-helper/index.d.ts +0 -1
- package/externalABIs/BeefyRouterAbi.json.cjs +0 -1
- package/externalABIs/BeefyRouterAbi.json.mjs +0 -1025
- package/externalABIs/BeefyStrategyAbi.json.cjs +0 -1
- package/externalABIs/BeefyStrategyAbi.json.mjs +0 -1426
- package/externalABIs/BeefyVaultAbi.json.cjs +0 -1
- package/externalABIs/BeefyVaultAbi.json.mjs +0 -573
- package/externalABIs/BeefyZapAbi.json.cjs +0 -1
- package/externalABIs/BeefyZapOneInchAbi.json.cjs +0 -1
- package/externalABIs/ConvexBoosterAbi.json.cjs +0 -1
- package/externalABIs/ConvexBoosterAbi.json.mjs +0 -677
- package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +0 -1
- package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +0 -1005
- package/externalABIs/ConvexRewardPoolAbi.json.cjs +0 -1
- package/externalABIs/ConvexRewardPoolAbi.json.mjs +0 -886
- package/externalABIs/CurveReadingWrapperAbi.json.cjs +0 -1
- package/externalABIs/CurveReadingWrapperAbi.json.mjs +0 -1425
- package/externalABIs/CurveWrappedMainPool.json.cjs +0 -1
- package/externalABIs/CurveWrappedMainPool.json.mjs +0 -1139
- package/externalABIs/CurveZap.json.cjs +0 -1
- package/externalABIs/CurveZap.json.mjs +0 -265
- package/externalABIs/CvxCrvUtilities.json.cjs +0 -1
- package/externalABIs/CvxCrvUtilities.json.mjs +0 -267
- package/externalABIs/ERC20.d.ts +0 -1
- package/externalABIs/LidoStEthAbi.json.cjs +0 -1
- package/externalABIs/LidoStEthAbi.json.mjs +0 -1603
- package/externalABIs/LidoStMaticAbi.json.cjs +0 -1
- package/externalABIs/LidoStMaticAbi.json.mjs +0 -1764
- package/externalABIs/LidoStakeManagerAbi.json.cjs +0 -1
- package/externalABIs/LidoStakeManagerAbi.json.mjs +0 -2082
- package/externalABIs/LidoWithdrawalQueueERC721Abi.json.cjs +0 -1
- package/externalABIs/LidoWithdrawalQueueERC721Abi.json.mjs +0 -2030
- package/externalABIs/LidoWstEthAbi.json.cjs +0 -1
- package/externalABIs/PendleRouterAbi.json.cjs +0 -1
- package/externalABIs/PendleRouterAbi.json.mjs +0 -176
- package/externalABIs/PoLidoNftAbi.json.cjs +0 -1
- package/externalABIs/PoLidoNftAbi.json.mjs +0 -701
- package/externalABIs/crvFRAX.d.ts +0 -38
- package/functions/pre-transaction/processAmountChanges.cjs +0 -1
- package/functions/pre-transaction/processAmountChanges.d.ts +0 -12
- package/functions/pre-transaction/processAmountChanges.mjs +0 -228
- package/functions/private-wallet/smartContractWalletCalculator.cjs +0 -1
- package/functions/private-wallet/smartContractWalletCalculator.d.ts +0 -5
- package/functions/private-wallet/smartContractWalletCalculator.mjs +0 -25
- package/functions/protocols/convex.protocols.cjs +0 -1
- package/functions/protocols/convex.protocols.d.ts +0 -1
- package/functions/protocols/convex.protocols.mjs +0 -28
- package/functions/protocols/curve.protocols.cjs +0 -1
- package/functions/protocols/curve.protocols.d.ts +0 -1
- package/functions/protocols/curve.protocols.mjs +0 -22
- package/functions/protocols/index.d.ts +0 -3
- package/functions/protocols/pendle.helpers.cjs +0 -1
- package/functions/protocols/pendle.helpers.d.ts +0 -8
- package/functions/protocols/pendle.helpers.mjs +0 -112
- package/functions/utils/axelar.utils.cjs +0 -1
- package/functions/utils/axelar.utils.d.ts +0 -3
- package/functions/utils/axelar.utils.mjs +0 -45
- package/functions/utils/enum.utils.cjs +0 -1
- package/functions/utils/enum.utils.mjs +0 -14
- package/functions/utils/volatile-patcher.utils.cjs +0 -1
- package/functions/utils/volatile-patcher.utils.d.ts +0 -1
- package/functions/utils/volatile-patcher.utils.mjs +0 -18
- package/types/axelar.types.d.ts +0 -14
- package/types/beefy.types.cjs +0 -1
- package/types/beefy.types.d.ts +0 -11
- package/types/beefy.types.mjs +0 -21
- package/types/connext.types.d.ts +0 -13
- package/types/curve.types.cjs +0 -1
- package/types/curve.types.d.ts +0 -133
- package/types/curve.types.mjs +0 -24
- package/types/earlyAccessCode.types.d.ts +0 -4
- package/types/hinkalTvl.types.d.ts +0 -4
- package/types/pendle.api.types.d.ts +0 -233
- package/types/pendle.types.cjs +0 -1
- package/types/pendle.types.d.ts +0 -222
- package/types/pendle.types.mjs +0 -15
- package/types/time.types.cjs +0 -1
- package/types/time.types.d.ts +0 -31
- package/types/time.types.mjs +0 -58
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { BN as u } from "@coral-xyz/anchor";
|
|
2
|
+
import { PublicKey as c } from "@solana/web3.js";
|
|
3
|
+
const f = (e) => {
|
|
4
|
+
const t = [];
|
|
5
|
+
let r = e;
|
|
6
|
+
for (; r > 0n; )
|
|
7
|
+
t.unshift(Number(r % 256n)), r /= 256n;
|
|
8
|
+
for (; t.length < 32; )
|
|
9
|
+
t.unshift(0);
|
|
10
|
+
return t;
|
|
11
|
+
}, a = (e) => ({
|
|
12
|
+
extraRandomization: f(e.extraRandomization),
|
|
13
|
+
stealthAddress: f(e.stealthAddress),
|
|
14
|
+
h0: f(e.H0),
|
|
15
|
+
h1: f(e.H1)
|
|
16
|
+
}), l = (e, t, r) => {
|
|
17
|
+
const o = f(e), n = [Buffer.from("hinkal_nullifier"), t.toBuffer(), Buffer.from(o)], [s] = c.findProgramAddressSync(n, r);
|
|
18
|
+
return s;
|
|
19
|
+
}, A = (e, t) => {
|
|
20
|
+
const r = [Buffer.from("hinkal"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
21
|
+
return o;
|
|
22
|
+
}, B = (e, t) => {
|
|
23
|
+
const r = [Buffer.from("hinkal_merkle"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
24
|
+
return o;
|
|
25
|
+
}, m = (e, t) => {
|
|
26
|
+
const r = [Buffer.from("hinkal_merkle_access_token"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
27
|
+
return o;
|
|
28
|
+
}, g = (e, t) => {
|
|
29
|
+
const r = [Buffer.from("hinkal_access_token"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
30
|
+
return o;
|
|
31
|
+
}, y = (e, t) => {
|
|
32
|
+
const r = [Buffer.from("hinkal_swapper"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
33
|
+
return o;
|
|
34
|
+
}, P = (e, t) => {
|
|
35
|
+
const r = [Buffer.from("hinkal_vault"), t.toBuffer()], [o] = c.findProgramAddressSync(r, e);
|
|
36
|
+
return o;
|
|
37
|
+
}, k = (e, t, r) => {
|
|
38
|
+
const o = f(e), n = [Buffer.from("hinkal_access_keys"), r.toBuffer(), Buffer.from(o)], [s] = c.findProgramAddressSync(n, t);
|
|
39
|
+
return s;
|
|
40
|
+
}, S = (e, t, r, o) => {
|
|
41
|
+
const n = [
|
|
42
|
+
Buffer.from("hinkal_proof_part1"),
|
|
43
|
+
t.toBuffer(),
|
|
44
|
+
r.toBuffer(),
|
|
45
|
+
new u(o.toString()).toBuffer("be", 4)
|
|
46
|
+
// 4 here because type of id is u32
|
|
47
|
+
], [s] = c.findProgramAddressSync(n, e);
|
|
48
|
+
return s;
|
|
49
|
+
}, h = (e, t, r, o) => {
|
|
50
|
+
const n = [
|
|
51
|
+
Buffer.from("hinkal_proof_part2"),
|
|
52
|
+
t.toBuffer(),
|
|
53
|
+
r.toBuffer(),
|
|
54
|
+
new u(o.toString()).toBuffer("be", 4)
|
|
55
|
+
// 4 here because type of id is u32
|
|
56
|
+
], [s] = c.findProgramAddressSync(n, e);
|
|
57
|
+
return s;
|
|
58
|
+
}, _ = (e, t, r, o) => {
|
|
59
|
+
const n = [
|
|
60
|
+
Buffer.from("hinkal_encrypted_outputs"),
|
|
61
|
+
t.toBuffer(),
|
|
62
|
+
r.toBuffer(),
|
|
63
|
+
new u(o.toString()).toBuffer("be", 4)
|
|
64
|
+
// 4 here because type of id is u32
|
|
65
|
+
], [s] = c.findProgramAddressSync(n, e);
|
|
66
|
+
return s;
|
|
67
|
+
}, b = (e, t, r) => {
|
|
68
|
+
const o = [Buffer.from("hinkal_token_limit"), t.toBuffer(), r.toBuffer()], [n] = c.findProgramAddressSync(o, e);
|
|
69
|
+
return n;
|
|
70
|
+
}, p = (e, t, r, o) => {
|
|
71
|
+
const n = [
|
|
72
|
+
Buffer.from("hinkal_instructions"),
|
|
73
|
+
t.toBuffer(),
|
|
74
|
+
r.toBuffer(),
|
|
75
|
+
new u(o.toString()).toBuffer("be", 4)
|
|
76
|
+
// 4 here because type of id is u32
|
|
77
|
+
], [s] = c.findProgramAddressSync(n, e);
|
|
78
|
+
return s;
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
a as buildAnchorStealthAddressStructure,
|
|
82
|
+
f as encodeToByte32Array,
|
|
83
|
+
k as getAccessTokenAccountPublicKey,
|
|
84
|
+
m as getAccessTokenMerkleAccountPublicKey,
|
|
85
|
+
g as getAccessTokenStorageAccountPublicKey,
|
|
86
|
+
_ as getEncryptedOutputsAccountPublicKey,
|
|
87
|
+
p as getInstructionsAccountPublicKey,
|
|
88
|
+
B as getMerkleAccountPublicKey,
|
|
89
|
+
l as getNullifierAccount,
|
|
90
|
+
S as getProofAccountPart1PublicKey,
|
|
91
|
+
h as getProofAccountPart2PublicKey,
|
|
92
|
+
A as getStorageAccountPublicKey,
|
|
93
|
+
P as getStorageVaultPublicKey,
|
|
94
|
+
y as getSwapperAccountPublicKey,
|
|
95
|
+
b as getTokenLimitStorageAccountPublicKey
|
|
96
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@solana/spl-token"),i=require("@solana/web3.js"),g=require("../../constants/protocol.constants.cjs"),p=async(l,e,c,T,a)=>{const{erc20TokenAddress:u,is2022Program:d,decimals:I}=T,s=[];if(u===g.solanaNativeAddress)return s.push(i.SystemProgram.transfer({fromPubkey:e,toPubkey:c,lamports:Number(a)})),{instructions:s,programId:i.SystemProgram.programId};const n=d?t.TOKEN_2022_PROGRAM_ID:t.TOKEN_PROGRAM_ID,r=new i.PublicKey(u),A=await t.getAssociatedTokenAddress(r,e,!0,n),o=await t.getAssociatedTokenAddress(r,c,!0,n);return await l.getAccountInfo(o)||s.push(t.createAssociatedTokenAccountInstruction(e,o,c,r,n)),d?s.push(t.createTransferCheckedInstruction(A,r,o,e,a,I,[],n)):s.push(t.createTransferInstruction(A,o,e,a,[],n)),{instructions:s,programId:n}};exports.buildSolanaTransferInstructions=p;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
2
|
+
import { ERC20Token } from '../../types/token.types';
|
|
3
|
+
export declare const buildSolanaTransferInstructions: (connection: Connection, fromPubkey: PublicKey, toPubkey: PublicKey, token: ERC20Token, amount: bigint) => Promise<{
|
|
4
|
+
instructions: TransactionInstruction[];
|
|
5
|
+
programId: PublicKey;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TOKEN_2022_PROGRAM_ID as f, TOKEN_PROGRAM_ID as T, getAssociatedTokenAddress as d, createAssociatedTokenAccountInstruction as g, createTransferCheckedInstruction as l, createTransferInstruction as h } from "@solana/spl-token";
|
|
2
|
+
import { SystemProgram as A, PublicKey as _ } from "@solana/web3.js";
|
|
3
|
+
import { solanaNativeAddress as w } from "../../constants/protocol.constants.mjs";
|
|
4
|
+
const D = async (p, n, c, I, e) => {
|
|
5
|
+
const { erc20TokenAddress: a, is2022Program: i, decimals: m } = I, t = [];
|
|
6
|
+
if (a === w)
|
|
7
|
+
return t.push(
|
|
8
|
+
A.transfer({
|
|
9
|
+
fromPubkey: n,
|
|
10
|
+
toPubkey: c,
|
|
11
|
+
lamports: Number(e)
|
|
12
|
+
})
|
|
13
|
+
), {
|
|
14
|
+
instructions: t,
|
|
15
|
+
programId: A.programId
|
|
16
|
+
};
|
|
17
|
+
const r = i ? f : T, o = new _(a), u = await d(o, n, !0, r), s = await d(o, c, !0, r);
|
|
18
|
+
return await p.getAccountInfo(s) || t.push(
|
|
19
|
+
g(n, s, c, o, r)
|
|
20
|
+
), i ? t.push(
|
|
21
|
+
l(
|
|
22
|
+
u,
|
|
23
|
+
o,
|
|
24
|
+
s,
|
|
25
|
+
n,
|
|
26
|
+
e,
|
|
27
|
+
m,
|
|
28
|
+
[],
|
|
29
|
+
r
|
|
30
|
+
)
|
|
31
|
+
) : t.push(h(u, s, n, e, [], r)), {
|
|
32
|
+
instructions: t,
|
|
33
|
+
programId: r
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
D as buildSolanaTransferInstructions
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./sendV0Transaction.cjs"),i=require("./solana.cjs"),a=async(o,n,t,s,c,e)=>{const r=await n.methods.storeInstructions(Number(c),e).accounts({signer:t.publicKey,originalDeployer:s}).instruction();return await u.sendV0Transaction(o,[r],t,[t]),i.getInstructionsAccountPublicKey(n.programId,s,t.publicKey,c)};exports.storeInstructions=a;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { HinkalInstruction } from './convert-okx-instructions';
|
|
3
|
+
import { Connection, Keypair, PublicKey } from '@solana/web3.js';
|
|
4
|
+
export declare const storeInstructions: (connection: Connection, hinkalProgram: Program, signer: Keypair, originalDeployer: PublicKey, id: bigint, instructions: HinkalInstruction[]) => Promise<PublicKey>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { sendV0Transaction as i } from "./sendV0Transaction.mjs";
|
|
2
|
+
import { getInstructionsAccountPublicKey as e } from "./solana.mjs";
|
|
3
|
+
const p = async (s, c, t, o, n, r) => {
|
|
4
|
+
const u = await c.methods.storeInstructions(Number(n), r).accounts({ signer: t.publicKey, originalDeployer: o }).instruction();
|
|
5
|
+
return await i(s, [u], t, [t]), e(c.programId, o, t.publicKey, n);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
p as storeInstructions
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./solana.cjs"),e=require("./sendV0Transaction.cjs"),f=require("../../constants/protocol.constants.cjs"),K=async(s,o,t,c,u,b,d,y,A,n)=>{const a=r.getEncryptedOutputsAccountPublicKey(o.programId,c,t.publicKey,u),N={outputs:b.map(I=>Buffer.from(I))},T=await o.methods.storeEncryptedOutputs(Number(u),N).accounts({originalDeployer:c,signer:t.publicKey,encryptedOutputsAccount:a}).instruction();await e.sendV0Transaction(s,[T],t,[t]);const P=r.getProofAccountPart1PublicKey(o.programId,c,t.publicKey,u),_=await o.methods.storeProofPart1(Number(u),d,y,A,n.slice(0,f.SOLANA_PUBLIC_INPUT_PART_ONE_LENGTH)).accounts({originalDeployer:c,signer:t.publicKey,proofAccountPart1:P}).instruction();await e.sendV0Transaction(s,[_],t,[t]);const p=r.getProofAccountPart2PublicKey(o.programId,c,t.publicKey,u),O=await o.methods.storeProofPart2(Number(u),n.slice(f.SOLANA_PUBLIC_INPUT_PART_ONE_LENGTH)).accounts({originalDeployer:c,signer:t.publicKey,proofAccountPart2:p}).instruction();return await e.sendV0Transaction(s,[O],t,[t]),{proofAccountPart1:P,proofAccountPart2:p,encryptedOutputsAccount:a}};exports.storeProof=K;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Program } from '@coral-xyz/anchor';
|
|
2
|
+
import { Connection, Keypair, PublicKey } from '@solana/web3.js';
|
|
3
|
+
export declare const storeProof: (connection: Connection, hinkalProgram: Program, signer: Keypair, originalDeployer: PublicKey, id: bigint, encryptedOutputs: number[][], proofAArr: number[], proofBArr: number[], proofCArr: number[], publicInputsArr: number[][]) => Promise<{
|
|
4
|
+
proofAccountPart1: PublicKey;
|
|
5
|
+
proofAccountPart2: PublicKey;
|
|
6
|
+
encryptedOutputsAccount: PublicKey;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { getEncryptedOutputsAccountPublicKey as O, getProofAccountPart1PublicKey as w, getProofAccountPart2PublicKey as E } from "./solana.mjs";
|
|
2
|
+
import { sendV0Transaction as r } from "./sendV0Transaction.mjs";
|
|
3
|
+
import { SOLANA_PUBLIC_INPUT_PART_ONE_LENGTH as f } from "../../constants/protocol.constants.mjs";
|
|
4
|
+
const B = async (s, c, t, o, u, n, m, b, y, p) => {
|
|
5
|
+
const e = O(
|
|
6
|
+
c.programId,
|
|
7
|
+
o,
|
|
8
|
+
t.publicKey,
|
|
9
|
+
u
|
|
10
|
+
), K = {
|
|
11
|
+
outputs: n.map((N) => Buffer.from(N))
|
|
12
|
+
}, A = await c.methods.storeEncryptedOutputs(
|
|
13
|
+
Number(u),
|
|
14
|
+
K
|
|
15
|
+
).accounts({
|
|
16
|
+
originalDeployer: o,
|
|
17
|
+
signer: t.publicKey,
|
|
18
|
+
encryptedOutputsAccount: e
|
|
19
|
+
}).instruction();
|
|
20
|
+
await r(s, [A], t, [t]);
|
|
21
|
+
const a = w(
|
|
22
|
+
c.programId,
|
|
23
|
+
o,
|
|
24
|
+
t.publicKey,
|
|
25
|
+
u
|
|
26
|
+
), d = await c.methods.storeProofPart1(
|
|
27
|
+
Number(u),
|
|
28
|
+
m,
|
|
29
|
+
b,
|
|
30
|
+
y,
|
|
31
|
+
p.slice(0, f)
|
|
32
|
+
).accounts({
|
|
33
|
+
originalDeployer: o,
|
|
34
|
+
signer: t.publicKey,
|
|
35
|
+
proofAccountPart1: a
|
|
36
|
+
}).instruction();
|
|
37
|
+
await r(s, [d], t, [t]);
|
|
38
|
+
const P = E(
|
|
39
|
+
c.programId,
|
|
40
|
+
o,
|
|
41
|
+
t.publicKey,
|
|
42
|
+
u
|
|
43
|
+
), I = await c.methods.storeProofPart2(
|
|
44
|
+
Number(u),
|
|
45
|
+
p.slice(f)
|
|
46
|
+
).accounts({
|
|
47
|
+
originalDeployer: o,
|
|
48
|
+
signer: t.publicKey,
|
|
49
|
+
proofAccountPart2: P
|
|
50
|
+
}).instruction();
|
|
51
|
+
return await r(s, [I], t, [t]), { proofAccountPart1: a, proofAccountPart2: P, encryptedOutputsAccount: e };
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
B as storeProof
|
|
55
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("ethers"),p=require("../../constants/protocol.constants.cjs"),g=require("../../types/ethereum-network.types.cjs");require("idb-keyval");const f=require("../../constants/chains.constants.cjs"),w=require("../utils/create-provider.cjs");require("../../constants/token-data/index.cjs");require("../../error-handling/error-codes.constants.cjs");require("../utils/convertIntegrationProviderToExternalActionId.cjs");require("../../types/circom-data.types.cjs");require("../../types/transactions.types.cjs");require("../../types/activities.types.cjs");require("circomlibjs-hinkal-fork");const h=require("../../data-structures/crypto-keys/keys.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../data-structures/http/HttpClient.cjs");require("axios");const m=require("../utils/caseInsensitive.utils.cjs");require("../../API/getServerURL.cjs");require("libsodium-wrappers");require("process");require("buffer");require("../../constants/save-depths.cjs");require("../../constants/reorg-depths.constants.cjs");require("../utils/mutexes.utils.cjs");require("@coral-xyz/anchor");const I=require("../../error-handling/logger.cjs");require("@solana/web3.js");require("@solana/spl-token");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/activity.constants.cjs");require("../../constants/tasks.constants.cjs");require("../../constants/events.constants.cjs");require("../utils/userAgent.cjs");const O=require("../utils/string.utils.cjs");require("multiformats");require("../../API/tenderly.api.cjs");const D=require("../utils/replaceAddressInCalldata.cjs"),F=require("ethers-v6h"),y=({contract:e,func:r,args:n,callDataString:t,invokeWallet:i,value:s})=>{let o=new Uint8Array,c=t?u.utils.arrayify(t):new Uint8Array;if(typeof e=="object"&&"address"in e){if(o=u.utils.arrayify(e.address),t?.length&&t?.length>0)throw Error("If function and args are providedm no calldata is needed");r&&n&&!t&&(c=u.utils.arrayify(e.interface.encodeFunctionData(r,n)))}else o=u.utils.arrayify(e);const a=u.utils.arrayify([i?1:0]),d=u.utils.zeroPad(u.utils.arrayify(u.BigNumber.from(s??0n)),16),l=u.utils.concat([o,a,d,c]);return u.utils.hexlify(l)},P=async(e,r,n,t,i,s)=>{const o=n?await h.UserKeys.signTypedDataFromPrivateKey(e,n,{name:"Emporium",version:"1.0.0",chainId:e,verifyingContract:r},{EmporiumSignature:[{name:"message",type:"uint256"}]},{message:i}):void 0,{v:c,r:a,s:d}=o?u.utils.splitSignature(o):{v:0,r:"0x",s:"0x"};return u.utils.defaultAbiCoder.encode(["tuple(uint8 v,bytes32 r, bytes32 s, uint256 message, address signerAddress, bytes[] ops)"],[{v:c,r:a,s:d,message:i??0n,signerAddress:s??p.zeroAddress,ops:t}])},q=(e,r,n,t)=>y(e?{contract:e,func:"transfer",args:[r,n],invokeWallet:t}:{contract:r,value:n,invokeWallet:t}),W=(e,r,n,t)=>{const i=e.getContractWithFetcher(g.ContractType.HinkalContract);return r.map((s,o)=>{const c=m.caseInsensitiveEqual(s,p.zeroAddress)?void 0:e.getContractWithFetcher(g.ContractType.ERC20Contract,s);return q(c,t??i.address,n[o],!0)})},v=(e,r,n,t)=>y({contract:e,func:"approve",args:[r,n],invokeWallet:t}),A=(e,r,n)=>{const t=e.getSelectedNetwork()?.contractData.hinkalAddress;if(!t)throw Error("No Hinkal Address Provided to modifyDataForProxy");return O.replaceAllInstances(n,t.slice(2),r.slice(2))},T=(e,r,n)=>{if(!r)throw Error("No private key provided to modifyDataForProxy");const t=h.UserKeys.getSignerAddressFromPrivateKey(e.getCurrentChainId(),r);return A(e,t,n)},C=(e,r,n,t,i,s,o)=>{const c=[];for(let a=0;a<r.length;a+=1){const d=r[a],l=m.caseInsensitiveEqual(d,p.zeroAddress)?void 0:e.getContractWithFetcher(g.ContractType.ERC20Contract,d);c.push(q(l,s,n[a],!1))}if(o)for(let a=0;a<t.length;a+=1){const d=t[a];if(!m.caseInsensitiveEqual(d,p.zeroAddress)){const l=e.getContractWithFetcher(g.ContractType.ERC20Contract,d);c.push(v(l,o,i[a],!0))}}return c},x=(e,r,n,t,i,s,o,c,a,d)=>{const l=C(e,r,n,t,i,s,o);if(!!c&&!!a){const k=e.getContractWithFetcher(g.ContractType.HinkalContract);l.push(y({contract:c,callDataString:D.replaceAddressesInCalldata(a,k.address,s),value:d,invokeWallet:!0}))}return l},z="0xef0100",E=async(e,r)=>{try{const{fetchRpcUrl:n}=f.networkRegistry[e];if(!n)throw new Error("RPC URL not found for the specified chain ID");const t=w.createCustomRpcProvider(n),i=await t.getCode(r);if(i==="0x"||!i)return{delegated:!1,implementation:void 0,nonce:void 0};if(i.toLowerCase().startsWith(z)&&i.length===48){const s=`0x${i.slice(8)}`,o=await t.getTransactionCount(r);return{delegated:!0,implementation:u.utils.getAddress(s),nonce:o}}else throw Error("checkEOAWithDelegation: It is a contract")}catch(n){throw I.Logger.error("checkEOAWithDelegation error",{error:n}),n}},B=e=>{const{hinkalWalletAddress:r}=f.networkRegistry[e].contractData;if(!r||m.caseInsensitiveEqual(r,p.zeroAddress))throw Error("Hinkal Wallet Address is not set");return r},R=async(e,r)=>{if(e===f.chainIds.localhost||!r)return;const n=h.UserKeys.getSignerAddressFromPrivateKey(e,r),{delegated:t,implementation:i}=await E(e,n),s=B(e);if(!t||!m.caseInsensitiveEqual(i,s)){const o=await h.UserKeys.authorizeDelegation(e,r,s);return{v:o.signature.v.toString(),r:o.signature.r,s:o.signature.s,nonce:o.nonce.toString(),address:s,chainId:String(e)}}},b=e=>{if(!e)return;const{v:r,r:n,s:t,nonce:i,chainId:s,address:o}=e;return{signature:F.ethers.Signature.from({v:r,r:n,s:t}),nonce:BigInt(i),chainId:BigInt(s),address:o}};exports.checkEOAWithDelegation=E;exports.createApproveEmporiumOp=v;exports.createTransaferEmporiumOpsBatch=W;exports.createTransferToEmporiumOp=q;exports.emporiumOp=y;exports.encodeEmporiumMetadata=P;exports.generateFundAndApproveOps=C;exports.generateFundApproveAndTransactOps=x;exports.getAuthorizationDataIfNeeded=R;exports.modifyDataForProxy=A;exports.modifyDataForProxyWithPrivateKey=T;exports.recoverAuthorizationData=b;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Contract, ContractTransaction } from 'ethers';
|
|
1
|
+
import { Contract, ContractTransaction, ethers } from 'ethers';
|
|
2
2
|
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
3
|
+
import { type AuthorizationData } from '../../types/hinkal.types';
|
|
4
|
+
import { ethers as ethersV6 } from 'ethers-v6h';
|
|
3
5
|
export declare const emporiumOp: <ContractInstance extends Contract, ContractFunctions extends ContractInstance["functions"], ExactFunction extends { [K in keyof ContractFunctions]: ReturnType<ContractFunctions[K]> extends Promise<ContractTransaction> ? K : never; }[keyof ContractFunctions], FunctionArguments extends Parameters<ContractFunctions[ExactFunction]>>({ contract, func, args, callDataString, invokeWallet, value, }: {
|
|
4
6
|
contract: ContractInstance | string;
|
|
5
7
|
func?: ExactFunction | undefined;
|
|
@@ -8,11 +10,22 @@ export declare const emporiumOp: <ContractInstance extends Contract, ContractFun
|
|
|
8
10
|
invokeWallet?: boolean | undefined;
|
|
9
11
|
value?: bigint | undefined;
|
|
10
12
|
}) => string;
|
|
11
|
-
export declare const encodeEmporiumMetadata: (ops: string[],
|
|
12
|
-
export declare const createTransferToEmporiumOp: (
|
|
13
|
-
export declare const createApproveEmporiumOp: (hinkal: IHinkal, erc20TokenAddress: string, to: string, amount: bigint, invokeWallet: boolean) => string;
|
|
14
|
-
export declare const createTransferEmporiumOp: (hinkal: IHinkal, erc20TokenAddress: string, amount: bigint, to?: string) => string;
|
|
13
|
+
export declare const encodeEmporiumMetadata: (chainId: number, emporiumAddress: string, privateKey: string | undefined, ops: string[], message?: bigint, signerAddress?: string) => Promise<string>;
|
|
14
|
+
export declare const createTransferToEmporiumOp: (tokenContract: ethers.Contract | undefined, to: string, amount: bigint, invokeWallet: boolean) => string;
|
|
15
15
|
export declare const createTransaferEmporiumOpsBatch: (hinkal: IHinkal, erc20TokenAddresses: string[], amounts: bigint[], to?: string) => string[];
|
|
16
|
+
export declare const createApproveEmporiumOp: (tokenContract: ethers.Contract, to: string, amount: bigint, invokeWallet: boolean) => string;
|
|
16
17
|
export declare const modifyDataForProxy: (hinkal: IHinkal, userAddress: string, data: string) => string;
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const modifyDataForProxyWithPrivateKey: (hinkal: IHinkal, privateKey: string | undefined, data: string) => string;
|
|
19
|
+
export declare const generateFundAndApproveOps: (hinkal: IHinkal, erc20AddressesToFund: string[], fundAmounts: bigint[], approveTokenAddresses: string[], approveAmounts: bigint[], walletAddress: string, spenderAddress: string | undefined) => string[];
|
|
20
|
+
export declare const generateFundApproveAndTransactOps: (hinkal: IHinkal, erc20AddressesToFund: string[], fundAmounts: bigint[], approveTokenAddresses: string[], approveAmounts: bigint[], walletAddress: string, spenderAddress: string | undefined, to?: string, callDataString?: string, value?: bigint) => string[];
|
|
21
|
+
export declare const checkEOAWithDelegation: (chainId: number, eoaAddress: string) => Promise<{
|
|
22
|
+
delegated: boolean;
|
|
23
|
+
implementation: undefined;
|
|
24
|
+
nonce: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
delegated: boolean;
|
|
27
|
+
implementation: string;
|
|
28
|
+
nonce: number;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const getAuthorizationDataIfNeeded: (chainId: number, privateKey: string | undefined) => Promise<AuthorizationData | undefined>;
|
|
31
|
+
export declare const recoverAuthorizationData: (authorizationData: AuthorizationData | undefined) => ethersV6.Authorization | undefined;
|
|
@@ -1,126 +1,202 @@
|
|
|
1
|
-
import { utils as
|
|
2
|
-
import { zeroAddress as
|
|
3
|
-
import { ContractType as
|
|
4
|
-
import "../../constants/contracts.constants.mjs";
|
|
5
|
-
import "circomlibjs-hinkal-fork";
|
|
6
|
-
import "../../error-handling/error-codes.constants.mjs";
|
|
7
|
-
import "../../data-structures/crypto-keys/keys.mjs";
|
|
1
|
+
import { utils as m, BigNumber as A } from "ethers";
|
|
2
|
+
import { zeroAddress as u } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { ContractType as f } from "../../types/ethereum-network.types.mjs";
|
|
8
4
|
import "idb-keyval";
|
|
9
|
-
import "
|
|
5
|
+
import { networkRegistry as y, chainIds as E } from "../../constants/chains.constants.mjs";
|
|
6
|
+
import { createCustomRpcProvider as w } from "../utils/create-provider.mjs";
|
|
10
7
|
import "../../constants/token-data/index.mjs";
|
|
8
|
+
import "../../error-handling/error-codes.constants.mjs";
|
|
11
9
|
import "../utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
12
10
|
import "../../types/circom-data.types.mjs";
|
|
13
|
-
import "../../constants/vite.constants.mjs";
|
|
14
11
|
import "../../types/transactions.types.mjs";
|
|
15
|
-
import "../../types/curve.types.mjs";
|
|
16
12
|
import "../../types/activities.types.mjs";
|
|
13
|
+
import "circomlibjs-hinkal-fork";
|
|
14
|
+
import { UserKeys as g } from "../../data-structures/crypto-keys/keys.mjs";
|
|
15
|
+
import "../../constants/server.constants.mjs";
|
|
16
|
+
import "../../constants/vite.constants.mjs";
|
|
17
|
+
import "../../data-structures/http/HttpClient.mjs";
|
|
17
18
|
import "axios";
|
|
18
|
-
import "
|
|
19
|
+
import { caseInsensitiveEqual as l } from "../utils/caseInsensitive.utils.mjs";
|
|
20
|
+
import "../../API/getServerURL.mjs";
|
|
19
21
|
import "libsodium-wrappers";
|
|
20
22
|
import "process";
|
|
21
23
|
import "buffer";
|
|
24
|
+
import "../../constants/save-depths.mjs";
|
|
22
25
|
import "../../constants/reorg-depths.constants.mjs";
|
|
26
|
+
import "../utils/mutexes.utils.mjs";
|
|
27
|
+
import "@coral-xyz/anchor";
|
|
28
|
+
import { Logger as k } from "../../error-handling/logger.mjs";
|
|
29
|
+
import "@solana/web3.js";
|
|
30
|
+
import "@solana/spl-token";
|
|
31
|
+
import "../../constants/contracts.constants.mjs";
|
|
23
32
|
import "../../constants/kyc.constants.mjs";
|
|
24
33
|
import "../../constants/coingecko.constants.mjs";
|
|
25
|
-
import "../../constants/axelar.constants.mjs";
|
|
26
|
-
import "../../constants/rewards.constants.mjs";
|
|
27
34
|
import "../../constants/addresses.constants.mjs";
|
|
28
35
|
import "../../constants/token.limits.constants.mjs";
|
|
36
|
+
import "../../constants/presale.constants.mjs";
|
|
37
|
+
import "../../constants/activity.constants.mjs";
|
|
38
|
+
import "../../constants/tasks.constants.mjs";
|
|
39
|
+
import "../../constants/events.constants.mjs";
|
|
29
40
|
import "../utils/userAgent.mjs";
|
|
30
|
-
import { replaceAllInstances as
|
|
31
|
-
import "
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
|
|
41
|
+
import { replaceAllInstances as W } from "../utils/string.utils.mjs";
|
|
42
|
+
import "multiformats";
|
|
43
|
+
import "../../API/tenderly.api.mjs";
|
|
44
|
+
import { replaceAddressesInCalldata as F } from "../utils/replaceAddressInCalldata.mjs";
|
|
45
|
+
import { ethers as D } from "ethers-v6h";
|
|
46
|
+
const h = ({
|
|
35
47
|
contract: t,
|
|
36
48
|
func: r,
|
|
37
|
-
args:
|
|
38
|
-
callDataString:
|
|
39
|
-
invokeWallet:
|
|
40
|
-
value:
|
|
49
|
+
args: o,
|
|
50
|
+
callDataString: e,
|
|
51
|
+
invokeWallet: i,
|
|
52
|
+
value: a
|
|
41
53
|
}) => {
|
|
42
|
-
let
|
|
54
|
+
let n = new Uint8Array(), c = e ? m.arrayify(e) : new Uint8Array();
|
|
43
55
|
if (typeof t == "object" && "address" in t) {
|
|
44
|
-
if (
|
|
56
|
+
if (n = m.arrayify(t.address), e?.length && e?.length > 0)
|
|
45
57
|
throw Error("If function and args are providedm no calldata is needed");
|
|
46
|
-
r &&
|
|
58
|
+
r && o && !e && (c = m.arrayify(t.interface.encodeFunctionData(r, o)));
|
|
47
59
|
} else
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
60
|
+
n = m.arrayify(t);
|
|
61
|
+
const s = m.arrayify([i ? 1 : 0]), p = m.zeroPad(m.arrayify(A.from(a ?? 0n)), 16), d = m.concat([n, s, p, c]);
|
|
62
|
+
return m.hexlify(d);
|
|
63
|
+
}, Ft = async (t, r, o, e, i, a) => {
|
|
64
|
+
const n = o ? await g.signTypedDataFromPrivateKey(
|
|
65
|
+
t,
|
|
66
|
+
o,
|
|
67
|
+
{ name: "Emporium", version: "1.0.0", chainId: t, verifyingContract: r },
|
|
68
|
+
{ EmporiumSignature: [{ name: "message", type: "uint256" }] },
|
|
69
|
+
{ message: i }
|
|
70
|
+
) : void 0, { v: c, r: s, s: p } = n ? m.splitSignature(n) : { v: 0, r: "0x", s: "0x" };
|
|
71
|
+
return m.defaultAbiCoder.encode(
|
|
72
|
+
["tuple(uint8 v,bytes32 r, bytes32 s, uint256 message, address signerAddress, bytes[] ops)"],
|
|
73
|
+
[
|
|
74
|
+
{
|
|
75
|
+
v: c,
|
|
76
|
+
r: s,
|
|
77
|
+
s: p,
|
|
78
|
+
message: i ?? 0n,
|
|
79
|
+
signerAddress: a ?? u,
|
|
80
|
+
ops: e
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
);
|
|
84
|
+
}, v = (t, r, o, e) => h(t ? {
|
|
85
|
+
contract: t,
|
|
86
|
+
func: "transfer",
|
|
87
|
+
args: [r, o],
|
|
88
|
+
invokeWallet: e
|
|
89
|
+
} : { contract: r, value: o, invokeWallet: e }), Dt = (t, r, o, e) => {
|
|
90
|
+
const i = t.getContractWithFetcher(f.HinkalContract);
|
|
91
|
+
return r.map((a, n) => {
|
|
92
|
+
const c = l(a, u) ? void 0 : t.getContractWithFetcher(f.ERC20Contract, a);
|
|
93
|
+
return v(c, e ?? i.address, o[n], !0);
|
|
79
94
|
});
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
}, P = (t, r, o, e) => h({
|
|
96
|
+
contract: t,
|
|
97
|
+
func: "approve",
|
|
98
|
+
args: [r, o],
|
|
99
|
+
invokeWallet: e
|
|
100
|
+
}), I = (t, r, o) => {
|
|
101
|
+
const e = t.getSelectedNetwork()?.contractData.hinkalAddress;
|
|
102
|
+
if (!e)
|
|
86
103
|
throw Error("No Hinkal Address Provided to modifyDataForProxy");
|
|
87
|
-
return
|
|
88
|
-
},
|
|
104
|
+
return W(o, e.slice(2), r.slice(2));
|
|
105
|
+
}, Pt = (t, r, o) => {
|
|
89
106
|
if (!r)
|
|
90
|
-
throw Error("No
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
107
|
+
throw Error("No private key provided to modifyDataForProxy");
|
|
108
|
+
const e = g.getSignerAddressFromPrivateKey(t.getCurrentChainId(), r);
|
|
109
|
+
return I(t, e, o);
|
|
110
|
+
}, x = (t, r, o, e, i, a, n) => {
|
|
111
|
+
const c = [];
|
|
112
|
+
for (let s = 0; s < r.length; s += 1) {
|
|
113
|
+
const p = r[s], d = l(p, u) ? void 0 : t.getContractWithFetcher(f.ERC20Contract, p);
|
|
114
|
+
c.push(v(d, a, o[s], !1));
|
|
115
|
+
}
|
|
116
|
+
if (n)
|
|
117
|
+
for (let s = 0; s < e.length; s += 1) {
|
|
118
|
+
const p = e[s];
|
|
119
|
+
if (!l(p, u)) {
|
|
120
|
+
const d = t.getContractWithFetcher(f.ERC20Contract, p);
|
|
121
|
+
c.push(P(d, n, i[s], !0));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return c;
|
|
125
|
+
}, It = (t, r, o, e, i, a, n, c, s, p) => {
|
|
126
|
+
const d = x(
|
|
127
|
+
t,
|
|
128
|
+
r,
|
|
129
|
+
o,
|
|
130
|
+
e,
|
|
131
|
+
i,
|
|
132
|
+
a,
|
|
133
|
+
n
|
|
95
134
|
);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
135
|
+
if (!!c && !!s) {
|
|
136
|
+
const C = t.getContractWithFetcher(f.HinkalContract);
|
|
137
|
+
d.push(
|
|
138
|
+
h({
|
|
139
|
+
contract: c,
|
|
140
|
+
callDataString: F(s, C.address, a),
|
|
141
|
+
value: p,
|
|
142
|
+
invokeWallet: !0
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return d;
|
|
147
|
+
}, O = "0xef0100", B = async (t, r) => {
|
|
148
|
+
try {
|
|
149
|
+
const { fetchRpcUrl: o } = y[t];
|
|
150
|
+
if (!o)
|
|
151
|
+
throw new Error("RPC URL not found for the specified chain ID");
|
|
152
|
+
const e = w(o), i = await e.getCode(r);
|
|
153
|
+
if (i === "0x" || !i)
|
|
154
|
+
return { delegated: !1, implementation: void 0, nonce: void 0 };
|
|
155
|
+
if (i.toLowerCase().startsWith(O) && i.length === 48) {
|
|
156
|
+
const a = `0x${i.slice(8)}`, n = await e.getTransactionCount(r);
|
|
157
|
+
return { delegated: !0, implementation: m.getAddress(a), nonce: n };
|
|
158
|
+
} else
|
|
159
|
+
throw Error("checkEOAWithDelegation: It is a contract");
|
|
160
|
+
} catch (o) {
|
|
161
|
+
throw k.error("checkEOAWithDelegation error", { error: o }), o;
|
|
102
162
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
163
|
+
}, R = (t) => {
|
|
164
|
+
const { hinkalWalletAddress: r } = y[t].contractData;
|
|
165
|
+
if (!r || l(r, u))
|
|
166
|
+
throw Error("Hinkal Wallet Address is not set");
|
|
167
|
+
return r;
|
|
168
|
+
}, xt = async (t, r) => {
|
|
169
|
+
if (t === E.localhost || !r)
|
|
170
|
+
return;
|
|
171
|
+
const o = g.getSignerAddressFromPrivateKey(t, r), { delegated: e, implementation: i } = await B(t, o), a = R(t);
|
|
172
|
+
if (!e || !l(i, a)) {
|
|
173
|
+
const n = await g.authorizeDelegation(t, r, a);
|
|
174
|
+
return {
|
|
175
|
+
v: n.signature.v.toString(),
|
|
176
|
+
r: n.signature.r,
|
|
177
|
+
s: n.signature.s,
|
|
178
|
+
nonce: n.nonce.toString(),
|
|
179
|
+
address: a,
|
|
180
|
+
chainId: String(t)
|
|
181
|
+
};
|
|
106
182
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
invokeWallet: !0
|
|
113
|
-
})
|
|
114
|
-
), s;
|
|
183
|
+
}, Ot = (t) => {
|
|
184
|
+
if (!t)
|
|
185
|
+
return;
|
|
186
|
+
const { v: r, r: o, s: e, nonce: i, chainId: a, address: n } = t;
|
|
187
|
+
return { signature: D.Signature.from({ v: r, r: o, s: e }), nonce: BigInt(i), chainId: BigInt(a), address: n };
|
|
115
188
|
};
|
|
116
189
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
190
|
+
B as checkEOAWithDelegation,
|
|
191
|
+
P as createApproveEmporiumOp,
|
|
192
|
+
Dt as createTransaferEmporiumOpsBatch,
|
|
193
|
+
v as createTransferToEmporiumOp,
|
|
194
|
+
h as emporiumOp,
|
|
195
|
+
Ft as encodeEmporiumMetadata,
|
|
196
|
+
x as generateFundAndApproveOps,
|
|
197
|
+
It as generateFundApproveAndTransactOps,
|
|
198
|
+
xt as getAuthorizationDataIfNeeded,
|
|
199
|
+
I as modifyDataForProxy,
|
|
200
|
+
Pt as modifyDataForProxyWithPrivateKey,
|
|
201
|
+
Ot as recoverAuthorizationData
|
|
126
202
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("ethers"),E=require("./emporium.helpers.cjs"),l=require("../../constants/addresses.constants.cjs"),I=require("../../types/external-action.types.cjs"),h=require("../../types/ethereum-network.types.cjs"),P=require("../pre-transaction/getExternalSwapAddress.cjs"),x=require("../utils/string.utils.cjs"),C=require("../../constants/protocol.constants.cjs");require("../../constants/token-data/index.cjs");const U=require("../utils/caseInsensitive.utils.cjs"),A=require("../../error-handling/logger.cjs"),L=require("../../constants/token-data/ERC20Registry.cjs"),B=(e,n,c,a,t,i,o=!1)=>{const r=R.BigNumber.from(i).toBigInt(),m={tokenIn:n,tokenOut:a,fee:r,recipient:t,amountIn:c,amountOutMinimum:0,sqrtPriceLimitX96:0},f=["function exactInputSingle(tuple(address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96)) external payable returns (uint256 amountOut)"],g=new R.ethers.Contract(e,f);return E.emporiumOp({contract:g,func:"exactInputSingle",args:[m],invokeWallet:o})},F=(e,n,c,a,t,i,o=!1)=>{const r=P.getExternalSwapAddress(e,n),m=x.replaceAllInstances(a,r.slice(2),t.slice(2));return E.emporiumOp({contract:c,callDataString:m,value:i,invokeWallet:o})},v=(e,n)=>{const a=L.getERC20Registry(n).find(t=>t.symbol==="USDT");return a?U.caseInsensitiveEqual(e,a.erc20TokenAddress):!1},b=async(e,n,c,a,t,i)=>{const o=c.address;if(v(o,e.getCurrentChainId()))try{(await c.allowance(a,t)).toBigInt()>0n&&n.push(E.createApproveEmporiumOp(c,t,0n,i))}catch(r){A.Logger.error("Error in nullifyUsdtApprovalIfNeeded",r)}},d=async(e,n,c,a,t,i,o)=>{if(n!==C.zeroAddress){const r=l.SWAP_FEE_TAKER_ADDRESSES[e.getCurrentChainId()],m=e.getContractWithFetcher(h.ContractType.ERC20Contract,n),f=await m.balanceOf(c);await b(e,t,m,c,r,i),t.push(E.createApproveEmporiumOp(m,r,2n**256n-1n,i));const g=["function takeSwapFee(address token, uint256 beforeBalance, uint256 variableRate, address relay) external payable"],s=new R.ethers.Contract(r,g),w=a;t.push(E.emporiumOp({contract:s,func:"takeSwapFee",args:[n,f,C.HINKAL_SWAP_VARIABLE_RATE,w],invokeWallet:i}))}else{const r=a;t.push(E.emporiumOp({contract:r,value:o*C.HINKAL_SWAP_VARIABLE_RATE/10000n,invokeWallet:i}))}},z=async(e,n,c,a,t,i,o,r,m,f,g,s=!1)=>{const w=i<0n?-1n*i:i,q=e.getCurrentChainId(),u=[],O=l.NATIVE_TOKEN_WRAPPER_ADDRESSES[q];let D=!1,S;if(n===I.ExternalActionId.OneInch||n===I.ExternalActionId.Lifi){if(t!==C.zeroAddress){const _=e.getContractWithFetcher(h.ContractType.ERC20Contract,t);u.push(E.createApproveEmporiumOp(_,c,w,s))}let p=0n;t===C.zeroAddress&&(p+=w),o&&r===C.zeroAddress&&o<0n&&(p+=-1n*o);const y=p>0n?p:void 0;return S=F(e,n,c,a,f,y,s),u.push(S),(n===I.ExternalActionId.OneInch||m&&n===I.ExternalActionId.Lifi)&&r&&o!==void 0&&await d(e,r,f,g,u,s,o),u}if(!r||!o)throw Error("There should be output token for UniSwap and Odos");if(t===C.zeroAddress){const p=e.getContractWithFetcher(h.ContractType.ERC20Contract,O);u.push(E.emporiumOp({contract:p,func:"deposit",value:w,invokeWallet:s})),t=O}let T=0n;if(r===C.zeroAddress&&(r=O,D=!0,T=await e.getContractWithFetcher(h.ContractType.ERC20Contract,O).balanceOf(f)),t!==C.zeroAddress){const p=e.getContractWithFetcher(h.ContractType.ERC20Contract,t);await b(e,u,p,f,c,s),u.push(E.createApproveEmporiumOp(p,c,w,s))}if(n===I.ExternalActionId.Uniswap?S=B(c,t,w,r,f,a,s):S=F(e,n,c,a,f,void 0,s),u.push(S),await d(e,r,f,g,u,s,o),D){const p=l.WRAPPER_TOKEN_EXCHANGE_ADDRESSES[q],y=e.getContractWithFetcher(h.ContractType.ERC20Contract,O);u.push(E.createApproveEmporiumOp(y,p,2n**256n-1n,s));const _=["function withdrawBalanceDifference(uint256 beforeBalance) external"],N=new R.ethers.Contract(p,_);u.push(E.emporiumOp({contract:N,func:"withdrawBalanceDifference",args:[T],invokeWallet:s}))}return u};exports.createSwapToEmporiumOpForUniswap=B;exports.createSwapToEmporiumOpFromData=F;exports.createSwapToEmporiumOps=z;exports.nullifyUsdtApprovalIfNeeded=b;
|