@sabaaa1/common 0.1.6 → 0.1.14
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 +16 -12
- package/API/API.mjs +73 -69
- 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 -1
- package/API/admin-calls.mjs +5 -7
- package/API/ai-calls.cjs +1 -1
- package/API/ai-calls.mjs +11 -10
- package/API/brotherhoodCalls.cjs +1 -1
- package/API/brotherhoodCalls.mjs +43 -69
- package/API/callLifiAPI.cjs +1 -1
- package/API/callLifiAPI.mjs +8 -7
- package/API/callOdosAPI.cjs +1 -1
- package/API/callOdosAPI.mjs +16 -16
- 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 +8 -7
- package/API/callRelayer.cjs +1 -1
- package/API/callRelayer.d.ts +11 -0
- package/API/callRelayer.mjs +15 -7
- package/API/checkRisk.cjs +1 -1
- package/API/checkRisk.mjs +5 -4
- package/API/duneAPI.cjs +1 -1
- package/API/duneAPI.mjs +2 -3
- package/API/enclaveCalls.cjs +1 -1
- package/API/enclaveCalls.mjs +9 -11
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.d.ts +2 -2
- package/API/fetchCommitmentsCache.mjs +13 -10
- package/API/generate-trading-points.cjs +1 -1
- package/API/generate-trading-points.mjs +34 -39
- package/API/get-token-data.cjs +1 -1
- package/API/get-token-data.mjs +5 -4
- package/API/getBridgeProtocols.cjs +1 -1
- package/API/getBridgeProtocols.mjs +4 -3
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.d.ts +2 -1
- package/API/getGasEstimates.mjs +14 -16
- package/API/getLifiStatus.cjs +1 -1
- package/API/getLifiStatus.mjs +11 -10
- package/API/getRelayerURL.cjs +1 -1
- package/API/getRelayerURL.mjs +4 -4
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.mjs +42 -36
- package/API/getTokenPrice.cjs +1 -1
- package/API/getTokenPrice.d.ts +0 -11
- package/API/getTokenPrice.mjs +8 -23
- package/API/getWebsiteURL.cjs +1 -1
- package/API/getWebsiteURL.d.ts +1 -1
- package/API/getWebsiteURL.mjs +6 -7
- package/API/index.d.ts +2 -1
- package/API/is-tx-stateless.cjs +1 -1
- package/API/is-tx-stateless.mjs +17 -22
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +2 -2
- package/API/kycCalls.mjs +31 -30
- package/API/leaderboardCalls.cjs +1 -1
- package/API/leaderboardCalls.mjs +11 -16
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.mjs +19 -18
- package/API/referralsCalls.cjs +1 -1
- package/API/referralsCalls.mjs +16 -24
- package/API/relayCalls.cjs +1 -1
- package/API/relayCalls.mjs +6 -8
- 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 +5 -5
- package/API/rewardsUserCalls.cjs +1 -1
- package/API/rewardsUserCalls.mjs +37 -54
- 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 -1
- package/API/send-telegram-callback.mjs +9 -11
- package/API/simulate-batch-tx.cjs +1 -1
- package/API/simulate-batch-tx.mjs +11 -13
- 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.mjs +48 -59
- package/API/token-calls.cjs +1 -1
- package/API/token-calls.mjs +11 -13
- package/API/weeklyAnalyticCalls.cjs +1 -1
- package/API/weeklyAnalyticCalls.mjs +9 -14
- package/README.md +164 -0
- package/_virtual/_commonjsHelpers.cjs +1 -0
- package/_virtual/_commonjsHelpers.mjs +30 -0
- package/_virtual/bn.cjs +1 -0
- package/_virtual/bn.mjs +4 -0
- package/_virtual/bn2.cjs +1 -0
- package/_virtual/bn2.mjs +4 -0
- package/_virtual/common.cjs +1 -0
- package/_virtual/common.mjs +4 -0
- package/_virtual/common2.cjs +1 -0
- package/_virtual/common2.mjs +4 -0
- package/_virtual/hash.cjs +1 -0
- package/_virtual/hash.mjs +4 -0
- package/_virtual/index.cjs +1 -0
- package/_virtual/index.mjs +6 -0
- package/_virtual/index10.cjs +1 -0
- package/_virtual/index10.mjs +6 -0
- package/_virtual/index11.cjs +1 -0
- package/_virtual/index11.mjs +6 -0
- package/_virtual/index12.cjs +1 -0
- package/_virtual/index12.mjs +6 -0
- package/_virtual/index13.cjs +1 -0
- package/_virtual/index13.mjs +6 -0
- package/_virtual/index14.cjs +1 -0
- package/_virtual/index14.mjs +6 -0
- package/_virtual/index15.cjs +1 -0
- package/_virtual/index15.mjs +6 -0
- package/_virtual/index16.cjs +1 -0
- package/_virtual/index16.mjs +6 -0
- package/_virtual/index17.cjs +1 -0
- package/_virtual/index17.mjs +6 -0
- package/_virtual/index18.cjs +1 -0
- package/_virtual/index18.mjs +6 -0
- package/_virtual/index19.cjs +1 -0
- package/_virtual/index19.mjs +6 -0
- package/_virtual/index2.cjs +1 -0
- package/_virtual/index2.mjs +6 -0
- package/_virtual/index20.cjs +1 -0
- package/_virtual/index20.mjs +6 -0
- package/_virtual/index21.cjs +1 -0
- package/_virtual/index21.mjs +6 -0
- package/_virtual/index22.cjs +1 -0
- package/_virtual/index22.mjs +4 -0
- package/_virtual/index3.cjs +1 -0
- package/_virtual/index3.mjs +6 -0
- package/_virtual/index4.cjs +1 -0
- package/_virtual/index4.mjs +6 -0
- package/_virtual/index5.cjs +1 -0
- package/_virtual/index5.mjs +6 -0
- package/_virtual/index6.cjs +1 -0
- package/_virtual/index6.mjs +6 -0
- package/_virtual/index7.cjs +1 -0
- package/_virtual/index7.mjs +6 -0
- package/_virtual/index8.cjs +1 -0
- package/_virtual/index8.mjs +6 -0
- package/_virtual/index9.cjs +1 -0
- package/_virtual/index9.mjs +6 -0
- package/_virtual/inherits_browser.cjs +1 -0
- package/_virtual/inherits_browser.mjs +4 -0
- package/_virtual/ripemd.cjs +1 -0
- package/_virtual/ripemd.mjs +4 -0
- package/_virtual/scrypt.cjs +1 -0
- package/_virtual/scrypt.mjs +4 -0
- package/_virtual/sha.cjs +1 -0
- package/_virtual/sha.mjs +4 -0
- package/_virtual/sha3.cjs +1 -0
- package/_virtual/sha3.mjs +4 -0
- package/_virtual/utils.cjs +1 -0
- package/_virtual/utils.mjs +4 -0
- package/_virtual/utils2.cjs +1 -0
- package/_virtual/utils2.mjs +4 -0
- package/constants/backend.constants.cjs +1 -1
- package/constants/backend.constants.d.ts +2 -1
- package/constants/backend.constants.mjs +5 -7
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +5 -0
- package/constants/chains.constants.mjs +63 -35
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +1 -1
- package/constants/coingecko.constants.mjs +18 -11
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +19 -15
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +1218 -8
- package/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arcTestnet.json.mjs +1214 -4
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +1218 -8
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +1213 -3
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +1218 -8
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +1218 -8
- 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 +2 -1
- package/constants/index.d.ts +1 -1
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +9 -0
- package/constants/mediaUrls.constants.mjs +13 -4
- package/constants/okx.constants.cjs +1 -0
- package/constants/okx.constants.d.ts +2 -0
- package/constants/okx.constants.mjs +5 -0
- package/constants/protocol.constants.cjs +1 -1
- package/constants/protocol.constants.d.ts +12 -1
- package/constants/protocol.constants.mjs +37 -29
- package/constants/save-depths.cjs +1 -1
- package/constants/save-depths.mjs +4 -1
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +23 -10
- package/constants/server.constants.mjs +102 -89
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +49 -35
- package/constants/token-data/index.cjs +1 -1
- package/constants/token-data/index.d.ts +17 -1
- package/constants/token-data/index.mjs +29 -25
- 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/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +41 -41
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +19 -10
- package/data-structures/Hinkal/Hinkal.mjs +290 -125
- package/data-structures/Hinkal/IHinkal.d.ts +18 -11
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +36 -32
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +24 -23
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +13 -12
- 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 +11 -8
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +167 -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/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 +2 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +109 -93
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +23 -22
- 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.mjs +11 -9
- 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 +216 -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 +120 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +90 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +3 -0
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +106 -0
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +33 -27
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +20 -14
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +15 -9
- package/data-structures/Hinkal/index.d.ts +4 -0
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +56 -23
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.d.ts +0 -1
- package/data-structures/IndexedDB/activity-db.mjs +86 -86
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +15 -12
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +29 -26
- package/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/data-structures/IndexedDB/signatures-db.mjs +14 -10
- 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 -1
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +6 -1
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +154 -79
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +24 -21
- package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/PrivateTokensDB.mjs +39 -34
- 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 +19 -5
- package/data-structures/crypto-keys/keys.mjs +117 -60
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractAccessTokenSnapshotService.d.ts → evm/AbstractAccessTokenSnapshotService.d.ts} +2 -2
- package/data-structures/event-service/{AbstractAccessTokenSnapshotService.mjs → evm/AbstractAccessTokenSnapshotService.mjs} +6 -6
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractApprovalsSnapshotService.d.ts → evm/AbstractApprovalsSnapshotService.d.ts} +2 -2
- package/data-structures/event-service/{AbstractApprovalsSnapshotService.mjs → evm/AbstractApprovalsSnapshotService.mjs} +2 -2
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractCommitmentsSnapshotService.d.ts → evm/AbstractCommitmentsSnapshotService.d.ts} +3 -3
- package/data-structures/event-service/{AbstractCommitmentsSnapshotService.mjs → evm/AbstractCommitmentsSnapshotService.mjs} +24 -21
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -0
- package/data-structures/event-service/{AbstractEventService.d.ts → evm/AbstractEventService.d.ts} +1 -1
- package/data-structures/event-service/evm/AbstractEventService.mjs +37 -0
- package/data-structures/event-service/{AbstractNullifierSnapshotService.d.ts → evm/AbstractNullifierSnapshotService.d.ts} +1 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -0
- package/data-structures/event-service/{AbstractSnapshotService.mjs → evm/AbstractSnapshotService.mjs} +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/{BlockchainEventEmitter.d.ts → evm/BlockchainEventEmitter.d.ts} +2 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +89 -0
- package/data-structures/event-service/index.d.ts +13 -7
- 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 +39 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +153 -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 +1 -0
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +1 -3
- package/data-structures/snapshot/SnapshotFetcherService.d.ts +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientAccessTokenSnapshotService.d.ts → evm-snapshots/ClientAccessTokenSnapshotService.d.ts} +2 -2
- package/data-structures/snapshot/{ClientAccessTokenSnapshotService.mjs → evm-snapshots/ClientAccessTokenSnapshotService.mjs} +13 -9
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientApprovalsSnapshotService.d.ts → evm-snapshots/ClientApprovalsSnapshotService.d.ts} +2 -3
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +43 -0
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientCommitmentsSnapshotService.d.ts → evm-snapshots/ClientCommitmentsSnapshotService.d.ts} +2 -2
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +35 -0
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -0
- package/data-structures/snapshot/{ClientNullifierSnapshotService.d.ts → evm-snapshots/ClientNullifierSnapshotService.d.ts} +2 -2
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +34 -0
- package/data-structures/snapshot/index.d.ts +7 -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.mjs +5 -4
- 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/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +2 -0
- package/error-handling/error-codes.constants.mjs +4 -2
- package/functions/connectors.types.d.ts +14 -0
- package/functions/index.d.ts +1 -0
- 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 -1
- package/functions/pre-transaction/constructAdminData.d.ts +2 -1
- package/functions/pre-transaction/constructAdminData.mjs +30 -12
- 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/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 -1
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +11 -7
- package/functions/pre-transaction/index.d.ts +10 -0
- 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/outputUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +14 -13
- 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 +13 -12
- 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.mjs +33 -29
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.d.ts +1 -1
- package/functions/private-wallet/emporium.swap.helpers.mjs +79 -69
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +40 -0
- package/functions/snarkjs/constant.mjs +66 -23
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.mjs +32 -32
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +1 -1
- package/functions/snarkjs/constructGeneralZkProof.mjs +63 -61
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -0
- package/functions/snarkjs/constructSolanaZkProof.d.ts +13 -0
- package/functions/snarkjs/constructSolanaZkProof.mjs +109 -0
- package/functions/snarkjs/generateCircomData.cjs +1 -1
- package/functions/snarkjs/generateCircomData.d.ts +1 -1
- package/functions/snarkjs/generateCircomData.mjs +9 -9
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
- package/functions/snarkjs/generateZkProofEnclave.mjs +10 -9
- 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 +1 -1
- package/functions/utils/addresses.mjs +21 -17
- package/functions/utils/amounts.utils.cjs +1 -1
- package/functions/utils/amounts.utils.d.ts +1 -0
- package/functions/utils/amounts.utils.mjs +53 -40
- 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 +2 -3
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +53 -52
- package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
- package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -0
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +4 -1
- package/functions/utils/create-provider.mjs +8 -6
- 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 +29 -28
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.mjs +29 -29
- package/functions/utils/ethers-formatter.utils.cjs +1 -1
- package/functions/utils/ethers-formatter.utils.d.ts +2 -0
- package/functions/utils/ethers-formatter.utils.mjs +45 -15
- package/functions/utils/evmNetworkFunctions.cjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +3 -4
- package/functions/utils/fees.utils.cjs +1 -1
- package/functions/utils/fees.utils.d.ts +1 -0
- package/functions/utils/fees.utils.mjs +19 -9
- package/functions/utils/get-hinkal-approvals.cjs +1 -1
- package/functions/utils/get-hinkal-approvals.mjs +1 -1
- package/functions/utils/getBlockExplorerUrl.cjs +1 -1
- package/functions/utils/getBlockExplorerUrl.mjs +2 -2
- 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/index.d.ts +5 -1
- package/functions/utils/networks.utils.cjs +1 -1
- package/functions/utils/networks.utils.mjs +2 -3
- package/functions/utils/nftTokenFunctions.cjs +1 -1
- package/functions/utils/nftTokenFunctions.mjs +8 -4
- package/functions/utils/prepareHinkal.cjs +1 -0
- package/functions/utils/prepareHinkal.d.ts +7 -1
- package/functions/utils/prepareHinkal.mjs +88 -0
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.d.ts +1 -0
- package/functions/utils/publicBalance.utils.mjs +75 -45
- 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/time.utils.cjs +1 -1
- package/functions/utils/time.utils.d.ts +1 -1
- package/functions/utils/time.utils.mjs +11 -11
- package/functions/utils/userAgent.cjs +1 -1
- package/functions/utils/userAgent.mjs +6 -7
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +2 -1
- package/functions/utils/walletBalances.utils.mjs +18 -17
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +98 -91
- package/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/functions/web3/events/getInputUtxosEnclave.mjs +38 -16
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.mjs +70 -62
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.d.ts +3 -2
- package/functions/web3/events/getTransactionLogEvents.mjs +12 -9
- 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 +2 -0
- package/functions/web3/functionCalls/accessTokenCalls.mjs +25 -7
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +20 -0
- package/functions/web3/functionCalls/transactCallRelayer.mjs +61 -19
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +20 -50
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +29 -24
- package/functions/web3/index.d.ts +2 -0
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.mjs +11 -8
- 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.mjs +7 -4
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +22 -18
- 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/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.mjs +7 -4
- package/index.cjs +1 -1
- package/index.mjs +922 -810
- package/package.json +12 -16
- package/providers/CustomEthersProvider.cjs +1 -0
- package/providers/{TorExternalProvider.d.ts → CustomEthersProvider.d.ts} +2 -2
- 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 +8 -48
- 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 +1 -2
- package/providers/WagmiProviderAdapter.mjs +26 -24
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +10 -7
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +9 -6
- package/types/IMultiThreadedUtxoUtils.d.ts +2 -2
- package/types/TransactionSimulator.types.d.ts +1 -0
- package/types/activities.types.cjs +1 -1
- package/types/activities.types.d.ts +1 -0
- package/types/activities.types.mjs +6 -4
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +16 -0
- package/types/admin.types.mjs +1 -1
- package/types/all-points.types.d.ts +0 -1
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +8 -1
- package/types/cache.types.mjs +1 -1
- package/types/circom-data.types.d.ts +6 -0
- package/types/commitments.types.d.ts +12 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +9 -3
- package/types/ethereum-network.types.mjs +1 -1
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +3 -1
- package/types/external-action.types.mjs +2 -2
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +3 -2
- package/types/hinkal.types.mjs +8 -8
- package/types/http.types.d.ts +8 -0
- package/types/index.d.ts +3 -2
- package/types/new-rewards.type.d.ts +2 -9
- package/types/offscreen.types.cjs +1 -1
- package/types/offscreen.types.d.ts +2 -1
- package/types/offscreen.types.mjs +2 -2
- package/types/okx.types.d.ts +57 -0
- package/types/rewards.types.d.ts +0 -11
- package/types/sandbox.types.cjs +1 -1
- package/types/sandbox.types.d.ts +19 -2
- package/types/sandbox.types.mjs +2 -2
- package/types/solana.types.d.ts +75 -0
- package/types/token.types.d.ts +6 -0
- 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.d.ts +0 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +28 -30
- 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 +21 -1
- package/webworker/viteWorkerURL.constant.mjs +21 -12
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
- package/API/mysteryBoxesCalls.cjs +0 -1
- package/API/mysteryBoxesCalls.d.ts +0 -60
- package/API/mysteryBoxesCalls.mjs +0 -66
- package/assets/snarkjsWorkerLauncher-CWaDqRaL.js +0 -14803
- package/assets/utxoWorkerLauncher-BUhBaUSg.js +0 -115868
- package/assets/zkProofWorkerLauncher-DlWQP3l9.js +0 -115360
- package/constants/mystery-boxes.constants.cjs +0 -1
- package/constants/mystery-boxes.constants.d.ts +0 -63
- package/constants/mystery-boxes.constants.mjs +0 -355
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +0 -1
- package/data-structures/event-service/AbstractEventService.cjs +0 -1
- package/data-structures/event-service/AbstractEventService.mjs +0 -33
- package/data-structures/event-service/AbstractSnapshotService.cjs +0 -1
- package/data-structures/event-service/BlockchainEventEmitter.cjs +0 -1
- package/data-structures/event-service/BlockchainEventEmitter.mjs +0 -80
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +0 -1
- 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.mjs +0 -31
- package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +0 -1
- package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +0 -30
- package/functions/utils/mystery-box-auction.utils.cjs +0 -1
- package/functions/utils/mystery-box-auction.utils.d.ts +0 -8
- package/functions/utils/mystery-box-auction.utils.mjs +0 -51
- package/providers/TorExternalProvider.cjs +0 -1
- package/providers/TorExternalProvider.mjs +0 -29
- package/types/merch-order.types.cjs +0 -1
- package/types/merch-order.types.d.ts +0 -16
- package/types/merch-order.types.mjs +0 -4
- package/types/mystery-boxes.types.cjs +0 -1
- package/types/mystery-boxes.types.d.ts +0 -43
- package/types/mystery-boxes.types.mjs +0 -6
- /package/data-structures/event-service/{AbstractNullifierSnapshotService.cjs → evm/AbstractNullifierSnapshotService.cjs} +0 -0
- /package/data-structures/event-service/{AbstractNullifierSnapshotService.mjs → evm/AbstractNullifierSnapshotService.mjs} +0 -0
- /package/data-structures/event-service/{AbstractSnapshotService.d.ts → evm/AbstractSnapshotService.d.ts} +0 -0
|
@@ -1,73 +1,89 @@
|
|
|
1
|
-
import { EventType as
|
|
2
|
-
import { ContractType as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { EventType as C } from "../../types/hinkal.types.mjs";
|
|
2
|
+
import { ContractType as k } from "../../types/ethereum-network.types.mjs";
|
|
3
|
+
import { hinkalCheckSolanaTokenRegistry as M } from "./hinkalCheckSolanaTokenRegistry.mjs";
|
|
4
|
+
import { checkHinkalAccessToken as R, mintAccessToken as H } from "../../functions/web3/functionCalls/accessTokenCalls.mjs";
|
|
5
|
+
import { getShieldedBalance as D } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
6
|
+
import { UserKeys as y } from "../crypto-keys/keys.mjs";
|
|
7
|
+
import { hinkalDeposit as W, hinkalDepositForOther as x } from "./hinkalDeposit.mjs";
|
|
8
|
+
import { hinkalDepositAndWithdraw as K } from "./hinkalDepositAndWithdraw.mjs";
|
|
9
|
+
import { hinkalSolanaDeposit as U, hinkalSolanaDepositForOther as b, hinkalSolanaMultiPaymentDeposit as B } from "./hinkalSolanaDeposit.mjs";
|
|
10
|
+
import { hinkalSwap as N } from "./hinkalSwap.mjs";
|
|
11
|
+
import { hinkalWithdraw as L } from "./hinkalWithdraw.mjs";
|
|
12
|
+
import { resetMerkleTrees as O } from "./resetMerkleTrees.mjs";
|
|
13
|
+
import { MerkleTree as S } from "../merkle-tree/MerkleTree.mjs";
|
|
11
14
|
import "ethers";
|
|
12
|
-
import { transactionErrorCodes as
|
|
13
|
-
import { poseidonFunction as
|
|
15
|
+
import { transactionErrorCodes as P } from "../../error-handling/error-codes.constants.mjs";
|
|
16
|
+
import { poseidonFunction as T } from "../../crypto/poseidon.mjs";
|
|
14
17
|
import "circomlibjs-hinkal-fork";
|
|
15
18
|
import "libsodium-wrappers";
|
|
16
19
|
import "process";
|
|
17
20
|
import "buffer";
|
|
18
|
-
import { networkRegistry as
|
|
21
|
+
import { networkRegistry as v, isSolanaLike as p } from "../../constants/chains.constants.mjs";
|
|
19
22
|
import "../../API/getServerURL.mjs";
|
|
20
23
|
import "axios";
|
|
21
24
|
import "../../constants/coingecko.constants.mjs";
|
|
22
25
|
import "../../constants/server.constants.mjs";
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
26
|
+
import "../http/HttpClient.mjs";
|
|
27
|
+
import { isExtension as _ } from "../../constants/vite.constants.mjs";
|
|
28
|
+
import { API as A } from "../../API/API.mjs";
|
|
25
29
|
import "../../constants/token-data/index.mjs";
|
|
26
30
|
import "../../constants/contracts.constants.mjs";
|
|
27
|
-
import { supportedPassportLinks as
|
|
31
|
+
import { supportedPassportLinks as z } from "../../constants/kyc.constants.mjs";
|
|
28
32
|
import "../../constants/reorg-depths.constants.mjs";
|
|
29
33
|
import "../../constants/addresses.constants.mjs";
|
|
30
34
|
import "../../constants/token.limits.constants.mjs";
|
|
31
35
|
import "../../constants/presale.constants.mjs";
|
|
32
|
-
import "../../constants/mystery-boxes.constants.mjs";
|
|
33
36
|
import "../../constants/activity.constants.mjs";
|
|
34
37
|
import "../../constants/tasks.constants.mjs";
|
|
35
38
|
import "../../constants/events.constants.mjs";
|
|
36
39
|
import "../../API/tenderly.api.mjs";
|
|
37
|
-
import { reloadPage as
|
|
38
|
-
import { MultiThreadedUtxoUtils as
|
|
39
|
-
import { hinkalPrivateWallet as
|
|
40
|
-
import { resetCache as
|
|
41
|
-
import { createCacheDevice as
|
|
42
|
-
import { getContractWithFetcherByChainId as
|
|
43
|
-
import { getRecipientInfo as
|
|
44
|
-
import { hinkalApprove as
|
|
45
|
-
import { hinkalInsideTransact as
|
|
46
|
-
import { getApprovedBalance as G, getApprovedUtxos as
|
|
47
|
-
import { getInteractionApprovals as
|
|
48
|
-
import { hinkalSignSubAccount as
|
|
49
|
-
import { hinkalCheckTokenRegistry as
|
|
50
|
-
import { hinkalActionReceive as
|
|
51
|
-
import { hinkalActionFundApproveAndTransact as
|
|
52
|
-
import { privateTokensDB as
|
|
40
|
+
import { reloadPage as j } from "../../functions/utils/reloadPage.mjs";
|
|
41
|
+
import { MultiThreadedUtxoUtils as $ } from "../MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs";
|
|
42
|
+
import { hinkalPrivateWallet as q } from "./hinkalPrivateWallet.mjs";
|
|
43
|
+
import { resetCache as J } from "../../functions/utils/cacheFunctions.mjs";
|
|
44
|
+
import { createCacheDevice as Q } from "../../functions/utils/cacheDevice.utils.mjs";
|
|
45
|
+
import { getContractWithFetcherByChainId as V } from "../../functions/web3/getContractMetadata.mjs";
|
|
46
|
+
import { getRecipientInfo as X } from "./hinkalGetRecipientInfo.mjs";
|
|
47
|
+
import { hinkalApprove as Y } from "./hinkalApprove.mjs";
|
|
48
|
+
import { hinkalInsideTransact as Z } from "./hinkalInsideTransact.mjs";
|
|
49
|
+
import { getApprovedBalance as G, getApprovedUtxos as ee, getApprovedUtxosForToken as te, getMyApprovalAmountForInteraction as re } from "../../functions/web3/events/getApprovedBalance.mjs";
|
|
50
|
+
import { getInteractionApprovals as ie, checkExistingApprovalFromHinkal as ae, getBufferEntry as oe } from "../../functions/web3/functionCalls/inHinkalApprovalCalls.mjs";
|
|
51
|
+
import { hinkalSignSubAccount as ne } from "./hinkalSignSubAccount.mjs";
|
|
52
|
+
import { hinkalCheckTokenRegistry as se } from "./hinkalCheckTokenRegistry.mjs";
|
|
53
|
+
import { hinkalActionReceive as ce } from "./hinkalActionReceive.mjs";
|
|
54
|
+
import { hinkalActionFundApproveAndTransact as he } from "./hinkalActionFundApproveAndTransact.mjs";
|
|
55
|
+
import { privateTokensDB as pe } from "../TokenDBs/PrivateTokensDB.mjs";
|
|
53
56
|
import "idb-keyval";
|
|
54
|
-
import { getErc20TokensForChain as
|
|
57
|
+
import { getErc20TokensForChain as le } from "../../functions/utils/erc20tokenFunctions.mjs";
|
|
55
58
|
import "multiformats";
|
|
59
|
+
import { PublicKey as g } from "@solana/web3.js";
|
|
60
|
+
import "@solana/spl-token";
|
|
56
61
|
import "async-mutex";
|
|
57
62
|
import "../../functions/utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
58
63
|
import "../../types/circom-data.types.mjs";
|
|
59
64
|
import "../../types/transactions.types.mjs";
|
|
60
65
|
import "../../types/activities.types.mjs";
|
|
66
|
+
import { getMerkleAccountPublicKey as de, getAccessTokenMerkleAccountPublicKey as me } from "../../functions/pre-transaction/solana.mjs";
|
|
67
|
+
import "@coral-xyz/anchor";
|
|
61
68
|
import "../../functions/utils/userAgent.mjs";
|
|
62
69
|
import "../../functions/utils/mutexes.utils.mjs";
|
|
63
70
|
import "node-forge";
|
|
64
71
|
import "../../functions/web3/getTokenHolder.mjs";
|
|
65
|
-
import "
|
|
66
|
-
import { hinkalProoflessDeposit as
|
|
67
|
-
import { hinkalProxySwap as
|
|
68
|
-
import { hinkalMultiSendPrivateRecipients as
|
|
69
|
-
import { hinkalTransfer as
|
|
70
|
-
|
|
72
|
+
import { createTransaferEmporiumOpsBatch as ge } from "../../functions/private-wallet/emporium.helpers.mjs";
|
|
73
|
+
import { hinkalProoflessDeposit as ue } from "./hinkalProoflessDeposit.mjs";
|
|
74
|
+
import { hinkalProxySwap as ve } from "./hinkalProxySwap.mjs";
|
|
75
|
+
import { hinkalMultiSendPrivateRecipients as fe } from "./hinkalMultiSend.mjs";
|
|
76
|
+
import { hinkalTransfer as ke } from "./hinkalTransfer.mjs";
|
|
77
|
+
import { hinkalProxyToPrivate as ye } from "./hinkalProxyToPrivate.mjs";
|
|
78
|
+
import { hinkalSolanaDepositAndWithdraw as Ae } from "./hinkalSolanaDepositAndWithdraw.mjs";
|
|
79
|
+
import { hinkalSolanaWithdraw as we } from "./hinkalSolanaWithdraw.mjs";
|
|
80
|
+
import { hinkalSolanaTransfer as Ce } from "./hinkalSolanaTransfer.mjs";
|
|
81
|
+
import { hinkalSolanaSwap as Se } from "./hinkalSolanaSwap.mjs";
|
|
82
|
+
import { hinkalSolanaProxySend as Pe } from "./hinkalSolanaProxySend.mjs";
|
|
83
|
+
import { hinkalSolanaProxySwap as Te } from "./hinkalSolanaProxySwap.mjs";
|
|
84
|
+
import { hinkalSolanaProxyShield as I } from "./hinkalSolanaProxyShield.mjs";
|
|
85
|
+
import { fetchSolanaMerkleTreeRootHash as E } from "../../functions/web3/fetchSolanaMerkleTreeRootHash.mjs";
|
|
86
|
+
class ar {
|
|
71
87
|
providerAdapter;
|
|
72
88
|
userKeys;
|
|
73
89
|
signingMessage = "Login to Hinkal Protocol";
|
|
@@ -85,7 +101,7 @@ class Tt {
|
|
|
85
101
|
generateProofRemotely;
|
|
86
102
|
disableMerkleTreeUpdates;
|
|
87
103
|
constructor(e) {
|
|
88
|
-
this.userKeys = new
|
|
104
|
+
this.userKeys = new y(void 0), this.merkleTreeHinkal = S.create(T, 0n), this.merkleTreeAccessToken = S.create(T, 0n), this.nullifiers = /* @__PURE__ */ new Set(), this.encryptedOutputs = [], this.approvals = /* @__PURE__ */ new Map(), this.generateProofRemotely = e?.generateProofRemotely ?? !1, this.utxoUtils = new $(), this.cacheDevice = Q(e), this.disableMerkleTreeUpdates = e?.disableMerkleTreeUpdates ?? !1;
|
|
89
105
|
}
|
|
90
106
|
async initProviderAdapter(e, t) {
|
|
91
107
|
await this.updateProviderAdapter(t), this.providerAdapter?.initConnector(e);
|
|
@@ -93,13 +109,13 @@ class Tt {
|
|
|
93
109
|
await t.init(r), await this.setListeners();
|
|
94
110
|
}
|
|
95
111
|
async initUserKeys() {
|
|
96
|
-
this.userKeys = new
|
|
112
|
+
this.userKeys = new y(await this.getProviderAdapter().signMessage(this.signingMessage));
|
|
97
113
|
}
|
|
98
114
|
async initUserKeysWithPassword(e) {
|
|
99
|
-
this.userKeys = new
|
|
115
|
+
this.userKeys = new y(e);
|
|
100
116
|
}
|
|
101
117
|
async resetMerkle() {
|
|
102
|
-
this.disableMerkleTreeUpdates || this.isSelectedNetworkSupported() && await
|
|
118
|
+
this.disableMerkleTreeUpdates || this.isSelectedNetworkSupported() && await O(this);
|
|
103
119
|
}
|
|
104
120
|
getProviderAdapter() {
|
|
105
121
|
if (!this.providerAdapter)
|
|
@@ -116,7 +132,7 @@ class Tt {
|
|
|
116
132
|
return this.getProviderAdapter().getContract(e, t, r);
|
|
117
133
|
}
|
|
118
134
|
getContractWithFetcherByChainId(e, t, r = void 0) {
|
|
119
|
-
return
|
|
135
|
+
return V(e, t, r);
|
|
120
136
|
}
|
|
121
137
|
async signMessage(e) {
|
|
122
138
|
return await this.getProviderAdapter().signMessage(e);
|
|
@@ -125,7 +141,7 @@ class Tt {
|
|
|
125
141
|
return await this.getProviderAdapter().signTypedData(e, t, r);
|
|
126
142
|
}
|
|
127
143
|
async signWithSubAccount(e, t, r) {
|
|
128
|
-
return
|
|
144
|
+
return ne(this, e, t, r);
|
|
129
145
|
}
|
|
130
146
|
getContractWithSigner(e, t = "") {
|
|
131
147
|
return this.getProviderAdapter().getContractWithSigner(e, t);
|
|
@@ -137,13 +153,13 @@ class Tt {
|
|
|
137
153
|
return this.getProviderAdapter().getContractWithFetcherForEthereum(e, t);
|
|
138
154
|
}
|
|
139
155
|
isSelectedNetworkSupported() {
|
|
140
|
-
return !!
|
|
156
|
+
return !!v[this.getCurrentChainId()];
|
|
141
157
|
}
|
|
142
158
|
async switchNetwork(e) {
|
|
143
159
|
try {
|
|
144
160
|
await this.getProviderAdapter().switchNetwork(e);
|
|
145
161
|
} catch {
|
|
146
|
-
throw new Error(
|
|
162
|
+
throw new Error(P.FAILED_TO_SWITCH_NETWORKS);
|
|
147
163
|
}
|
|
148
164
|
}
|
|
149
165
|
async switchAccount(e) {
|
|
@@ -186,22 +202,23 @@ class Tt {
|
|
|
186
202
|
}
|
|
187
203
|
async onAccountChanged() {
|
|
188
204
|
await this.getProviderAdapter().onAccountChanged();
|
|
189
|
-
const e =
|
|
205
|
+
const e = C.AccountChanged;
|
|
190
206
|
typeof document < "u" ? document?.dispatchEvent(new Event(e)) : process?.emit("message", e, void 0);
|
|
191
207
|
}
|
|
192
208
|
async onChainChanged(e) {
|
|
193
209
|
if (e) {
|
|
194
210
|
await this.getProviderAdapter().onChainChanged(e);
|
|
195
|
-
const t =
|
|
211
|
+
const t = C.NetworkChange;
|
|
196
212
|
typeof document < "u" ? document.dispatchEvent(new Event(t)) : process?.emit("message", t, void 0);
|
|
197
213
|
} else
|
|
198
|
-
await this.disconnectFromConnector(),
|
|
214
|
+
await this.disconnectFromConnector(), j();
|
|
199
215
|
}
|
|
200
216
|
async monitorConnectedAddress() {
|
|
201
|
-
|
|
217
|
+
const e = this.getCurrentChainId();
|
|
218
|
+
p(e) || await A.monitor(await this.getEthereumAddress(), e);
|
|
202
219
|
}
|
|
203
|
-
async getBalances(e, t, r, i, a = !1,
|
|
204
|
-
return
|
|
220
|
+
async getBalances(e, t, r, i, a = !1, o) {
|
|
221
|
+
return D(
|
|
205
222
|
this,
|
|
206
223
|
e,
|
|
207
224
|
t,
|
|
@@ -209,49 +226,65 @@ class Tt {
|
|
|
209
226
|
i,
|
|
210
227
|
a,
|
|
211
228
|
this.generateProofRemotely,
|
|
212
|
-
|
|
229
|
+
o
|
|
213
230
|
);
|
|
214
231
|
}
|
|
215
232
|
async getApprovedBalances(e = !1, t = !1) {
|
|
216
233
|
return G(this, e, t);
|
|
217
234
|
}
|
|
218
235
|
async getTotalBalance(e, t, r, i = !1, a) {
|
|
219
|
-
const
|
|
220
|
-
s,
|
|
221
|
-
n.getShieldedPrivateKey(),
|
|
222
|
-
n.getShieldedPublicKey(),
|
|
236
|
+
const o = e ?? this.getCurrentChainId(), n = r ?? await this.getEthereumAddress(), s = t ?? this.userKeys, c = await this.getBalances(
|
|
223
237
|
o,
|
|
238
|
+
s.getShieldedPrivateKey(),
|
|
239
|
+
s.getShieldedPublicKey(),
|
|
240
|
+
n,
|
|
224
241
|
i,
|
|
225
242
|
a
|
|
226
|
-
),
|
|
227
|
-
return d.forEach((
|
|
228
|
-
const
|
|
229
|
-
token:
|
|
230
|
-
balance: (
|
|
231
|
-
timestamp:
|
|
232
|
-
nfts:
|
|
243
|
+
), l = p(o) ? /* @__PURE__ */ new Map() : await this.getApprovedBalances(i, a), d = _ ? await pe.getPrivateTokens(o, n) : le(o), h = [];
|
|
244
|
+
return d.forEach((m) => {
|
|
245
|
+
const u = m.erc20TokenAddress.toLowerCase(), f = c.get(u), w = l.get(u), F = {
|
|
246
|
+
token: m,
|
|
247
|
+
balance: (f?.balance ?? 0n) + (w?.balance ?? 0n),
|
|
248
|
+
timestamp: f?.timestamp || w?.timestamp || "0",
|
|
249
|
+
nfts: f?.nfts || []
|
|
233
250
|
};
|
|
234
|
-
h.push(
|
|
251
|
+
h.push(F);
|
|
235
252
|
}), h;
|
|
236
253
|
}
|
|
237
254
|
getSupportedPassportLinks() {
|
|
238
|
-
return
|
|
255
|
+
return z;
|
|
239
256
|
}
|
|
240
257
|
checkAccessToken() {
|
|
241
|
-
return
|
|
258
|
+
return R(this);
|
|
242
259
|
}
|
|
243
260
|
async mintHinkalAccessToken(e, t) {
|
|
244
|
-
return
|
|
261
|
+
return H(this, e, t);
|
|
245
262
|
}
|
|
246
263
|
async getHinkalTreeRootHash() {
|
|
247
|
-
|
|
264
|
+
const e = this.getCurrentChainId();
|
|
265
|
+
if (p(e)) {
|
|
266
|
+
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } = v[e].contractData;
|
|
267
|
+
if (!r || !i || !a)
|
|
268
|
+
throw new Error(`Missing Solana configuration for chain ${e}`);
|
|
269
|
+
const o = new g(a), n = new g(i), s = de(n, o), c = this.getSolanaProgram(r);
|
|
270
|
+
return E(c, s);
|
|
271
|
+
}
|
|
272
|
+
return this.getContractWithFetcher(k.HinkalContract).getRootHash();
|
|
248
273
|
}
|
|
249
274
|
async getAccessTokenTreeRootHash() {
|
|
250
|
-
|
|
275
|
+
const e = this.getCurrentChainId();
|
|
276
|
+
if (p(e)) {
|
|
277
|
+
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } = v[e].contractData;
|
|
278
|
+
if (!r || !i || !a)
|
|
279
|
+
throw new Error(`Missing Solana configuration for chain ${e}`);
|
|
280
|
+
const o = new g(a), n = new g(i), s = me(n, o), c = this.getSolanaProgram(r);
|
|
281
|
+
return E(c, s);
|
|
282
|
+
}
|
|
283
|
+
return this.getContractWithFetcher(k.AccessTokenContract).getRootHash();
|
|
251
284
|
}
|
|
252
285
|
async resetMerkleTreesIfNecessary() {
|
|
253
286
|
if (!this.isSelectedNetworkSupported())
|
|
254
|
-
throw new Error(
|
|
287
|
+
throw new Error(P.UNSUPPORTED_NETWORK);
|
|
255
288
|
const [e, t] = await Promise.all([
|
|
256
289
|
this.getHinkalTreeRootHash(),
|
|
257
290
|
this.getAccessTokenTreeRootHash()
|
|
@@ -270,7 +303,8 @@ class Tt {
|
|
|
270
303
|
return this.getProviderAdapter().getAddress();
|
|
271
304
|
}
|
|
272
305
|
async getRandomRelay(e = !1) {
|
|
273
|
-
|
|
306
|
+
const t = this.getCurrentChainId();
|
|
307
|
+
return (await A.getIdleRelay(t, e)).relay;
|
|
274
308
|
}
|
|
275
309
|
getGasPrice() {
|
|
276
310
|
if (!this.providerAdapter?.chainId)
|
|
@@ -278,171 +312,302 @@ class Tt {
|
|
|
278
312
|
return this.providerAdapter.getGasPrice();
|
|
279
313
|
}
|
|
280
314
|
getAPI() {
|
|
281
|
-
return
|
|
315
|
+
return A;
|
|
282
316
|
}
|
|
283
317
|
resetCache() {
|
|
284
|
-
|
|
318
|
+
J(this, this.getCurrentChainId(), this.userKeys.getShieldedPublicKey());
|
|
285
319
|
}
|
|
286
320
|
snapshotsClearInterval() {
|
|
287
321
|
this.commitmentsSnapshotService?.intervalClear(), this.accessTokenSnapshotService?.intervalClear(), this.nullifierSnapshotService?.intervalClear(), this.approvalsSnapshotService?.intervalClear();
|
|
288
322
|
}
|
|
289
323
|
checkTokenRegistry(e, t) {
|
|
290
|
-
const r = this.
|
|
291
|
-
|
|
324
|
+
const r = this.getCurrentChainId();
|
|
325
|
+
if (p(r)) {
|
|
326
|
+
const {
|
|
327
|
+
hinkalIdl: a,
|
|
328
|
+
hinkalAddress: o,
|
|
329
|
+
originalDeployer: n
|
|
330
|
+
} = v[r].contractData;
|
|
331
|
+
if (!a || !o || !n)
|
|
332
|
+
throw new Error("missing solana data");
|
|
333
|
+
const s = this.getSolanaProgram(a), c = new g(n);
|
|
334
|
+
return M(s, c, e, t);
|
|
335
|
+
}
|
|
336
|
+
const i = this.getContractWithFetcher(k.HinkalHelperContract);
|
|
337
|
+
return se(i, e, t);
|
|
292
338
|
}
|
|
293
|
-
getRecipientInfo(
|
|
294
|
-
return
|
|
339
|
+
getRecipientInfo() {
|
|
340
|
+
return X(this);
|
|
295
341
|
}
|
|
296
342
|
async getInteractionApprovals(e) {
|
|
297
|
-
return await
|
|
343
|
+
return await ie(this, e);
|
|
298
344
|
}
|
|
299
345
|
getApprovedUtxos(e = !1) {
|
|
300
|
-
return
|
|
346
|
+
return ee(this, e);
|
|
301
347
|
}
|
|
302
348
|
getApprovedUtxosForToken(e, t = !1) {
|
|
303
|
-
return
|
|
349
|
+
return te(this, e, t);
|
|
304
350
|
}
|
|
305
351
|
getMyApprovalAmountForInteraction(e, t) {
|
|
306
|
-
return
|
|
352
|
+
return re(this, e, t);
|
|
307
353
|
}
|
|
308
354
|
async checkExistingApprovalFromHinkal(e, t) {
|
|
309
|
-
return await
|
|
355
|
+
return await ae(this, e, t);
|
|
310
356
|
}
|
|
311
357
|
async getBufferEntry(e, t, r) {
|
|
312
|
-
return
|
|
358
|
+
return oe(this, e, t, r);
|
|
313
359
|
}
|
|
314
360
|
async deposit(e, t) {
|
|
315
|
-
return
|
|
361
|
+
return W(this, e, t);
|
|
316
362
|
}
|
|
317
363
|
async depositForOther(e, t, r) {
|
|
318
|
-
return
|
|
364
|
+
return x(this, e, t, r);
|
|
365
|
+
}
|
|
366
|
+
async depositAndWithdraw(e, t, r, i) {
|
|
367
|
+
return K(this, e, t, r, i);
|
|
319
368
|
}
|
|
320
369
|
async prooflessDeposit(e, t, r) {
|
|
321
|
-
return
|
|
370
|
+
return ue(this, e, t, r);
|
|
371
|
+
}
|
|
372
|
+
getSolanaProgram(e) {
|
|
373
|
+
if (!this.providerAdapter)
|
|
374
|
+
throw new Error("No provider adapter initialized");
|
|
375
|
+
if (!("getSolanaProgram" in this.providerAdapter))
|
|
376
|
+
throw new Error("Current provider adapter is not a Solana provider adapter");
|
|
377
|
+
return this.providerAdapter.getSolanaProgram(e);
|
|
378
|
+
}
|
|
379
|
+
getSolanaPublicKey() {
|
|
380
|
+
if (!this.providerAdapter)
|
|
381
|
+
throw new Error("No provider adapter initialized");
|
|
382
|
+
if (!("getSolanaPublicKey" in this.providerAdapter))
|
|
383
|
+
throw new Error("Current provider adapter is not a Solana provider adapter");
|
|
384
|
+
return this.providerAdapter.getSolanaPublicKey();
|
|
322
385
|
}
|
|
323
|
-
async
|
|
324
|
-
return
|
|
386
|
+
async depositSolana(e, t) {
|
|
387
|
+
return U(this, e, t);
|
|
388
|
+
}
|
|
389
|
+
async depositSolanaForOther(e, t, r) {
|
|
390
|
+
return b(this, e, t, r);
|
|
391
|
+
}
|
|
392
|
+
async solanaMultiPaymentDeposit(e, t) {
|
|
393
|
+
return B(this, e, t);
|
|
394
|
+
}
|
|
395
|
+
async solanaDepositAndWithdraw(e, t, r, i) {
|
|
396
|
+
return Ae(this, e, t, r, i);
|
|
397
|
+
}
|
|
398
|
+
async transfer(e, t, r, i, a, o, n = !1) {
|
|
399
|
+
return p(this.getCurrentChainId()) ? Ce(
|
|
325
400
|
this,
|
|
326
401
|
e,
|
|
327
402
|
t,
|
|
328
403
|
r,
|
|
329
404
|
i,
|
|
330
405
|
a,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
async withdraw(e, t, r, i, a, s, o, n = !1) {
|
|
336
|
-
return H(
|
|
406
|
+
n
|
|
407
|
+
) : ke(
|
|
337
408
|
this,
|
|
338
409
|
e,
|
|
339
410
|
t,
|
|
340
411
|
r,
|
|
341
412
|
i,
|
|
342
413
|
a,
|
|
343
|
-
s,
|
|
344
414
|
o,
|
|
345
415
|
n
|
|
346
416
|
);
|
|
347
417
|
}
|
|
348
|
-
async
|
|
349
|
-
return
|
|
418
|
+
async withdraw(e, t, r, i, a, o, n, s = !1) {
|
|
419
|
+
return p(this.getCurrentChainId()) ? we(
|
|
420
|
+
this,
|
|
421
|
+
e.map((c) => c.erc20TokenAddress),
|
|
422
|
+
t,
|
|
423
|
+
r,
|
|
424
|
+
a,
|
|
425
|
+
o,
|
|
426
|
+
s
|
|
427
|
+
) : L(
|
|
350
428
|
this,
|
|
351
429
|
e,
|
|
352
430
|
t,
|
|
353
431
|
r,
|
|
354
432
|
i,
|
|
355
433
|
a,
|
|
356
|
-
s,
|
|
357
434
|
o,
|
|
358
435
|
n,
|
|
359
|
-
|
|
436
|
+
s
|
|
360
437
|
);
|
|
361
438
|
}
|
|
362
|
-
async
|
|
363
|
-
return
|
|
439
|
+
async swap(e, t, r, i, a, o, n, s = !1, c = !1) {
|
|
440
|
+
return p(this.getCurrentChainId()) ? this.swapSolana(e, t, i, a, o, s) : N(
|
|
364
441
|
this,
|
|
365
442
|
e,
|
|
366
443
|
t,
|
|
367
444
|
r,
|
|
368
445
|
i,
|
|
369
446
|
a,
|
|
447
|
+
o,
|
|
448
|
+
n,
|
|
449
|
+
s,
|
|
450
|
+
c
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
async swapSolana(e, t, r, i, a, o = !1) {
|
|
454
|
+
const n = JSON.parse(r), { instructionLists: s, addressLookupTableAccount: c } = n.data;
|
|
455
|
+
return Se(
|
|
456
|
+
this,
|
|
457
|
+
e,
|
|
458
|
+
t,
|
|
370
459
|
s,
|
|
460
|
+
c,
|
|
461
|
+
i,
|
|
462
|
+
a,
|
|
371
463
|
o
|
|
372
464
|
);
|
|
373
465
|
}
|
|
374
|
-
async
|
|
375
|
-
|
|
466
|
+
async actionReceive(e, t, r, i, a, o, n = !1) {
|
|
467
|
+
if (!a)
|
|
468
|
+
throw new Error("subAccount is required");
|
|
469
|
+
return p(this.getCurrentChainId()) ? I(this, e[0], t[0], a, void 0, n) : ce(
|
|
470
|
+
this,
|
|
471
|
+
e,
|
|
472
|
+
t,
|
|
473
|
+
r,
|
|
474
|
+
i,
|
|
475
|
+
a,
|
|
476
|
+
o,
|
|
477
|
+
n
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
async actionFundApproveAndTransact(e, t, r, i, a, o, n, s, c = !1, l, d, h) {
|
|
481
|
+
return he(
|
|
376
482
|
this,
|
|
377
483
|
e,
|
|
378
484
|
t,
|
|
379
485
|
r,
|
|
380
486
|
i,
|
|
381
487
|
a,
|
|
382
|
-
s,
|
|
383
488
|
o,
|
|
384
489
|
n,
|
|
490
|
+
s,
|
|
385
491
|
c,
|
|
386
|
-
|
|
492
|
+
l,
|
|
387
493
|
d,
|
|
388
494
|
h
|
|
389
495
|
);
|
|
390
496
|
}
|
|
391
|
-
async actionPrivateWallet(e, t, r, i, a,
|
|
392
|
-
return
|
|
497
|
+
async actionPrivateWallet(e, t, r, i, a, o, n, s, c, l = !1, d, h, m, u = !1) {
|
|
498
|
+
return q(
|
|
393
499
|
this,
|
|
394
500
|
e,
|
|
395
501
|
t,
|
|
396
502
|
r,
|
|
397
503
|
i,
|
|
398
504
|
a,
|
|
399
|
-
s,
|
|
400
505
|
o,
|
|
401
506
|
n,
|
|
507
|
+
s,
|
|
402
508
|
c,
|
|
403
|
-
|
|
509
|
+
l,
|
|
404
510
|
d,
|
|
405
511
|
h,
|
|
406
|
-
|
|
512
|
+
m,
|
|
513
|
+
u
|
|
407
514
|
);
|
|
408
515
|
}
|
|
409
|
-
async approve(e, t, r, i, a,
|
|
410
|
-
return
|
|
516
|
+
async approve(e, t, r, i, a, o = !1) {
|
|
517
|
+
return Y(this, e, t, r, i, a, o);
|
|
411
518
|
}
|
|
412
|
-
async hinkalInsideTransact(e, t, r, i, a,
|
|
413
|
-
return
|
|
519
|
+
async hinkalInsideTransact(e, t, r, i, a, o, n, s, c, l = !1) {
|
|
520
|
+
return Z(
|
|
414
521
|
this,
|
|
415
522
|
e,
|
|
416
523
|
t,
|
|
417
524
|
r,
|
|
418
525
|
i,
|
|
419
526
|
a,
|
|
420
|
-
s,
|
|
421
527
|
o,
|
|
422
528
|
n,
|
|
529
|
+
s,
|
|
423
530
|
c,
|
|
424
|
-
|
|
531
|
+
l
|
|
425
532
|
);
|
|
426
533
|
}
|
|
427
|
-
async proxySwap(e, t, r, i, a,
|
|
428
|
-
return
|
|
534
|
+
async proxySwap(e, t, r, i, a, o, n, s, c = !1, l, d, h = !1) {
|
|
535
|
+
return p(this.getCurrentChainId()) ? Te(
|
|
536
|
+
this,
|
|
537
|
+
e,
|
|
538
|
+
t,
|
|
539
|
+
i,
|
|
540
|
+
o,
|
|
541
|
+
n,
|
|
542
|
+
s,
|
|
543
|
+
h
|
|
544
|
+
) : ve(
|
|
429
545
|
this,
|
|
430
546
|
e,
|
|
431
547
|
t,
|
|
432
548
|
r,
|
|
433
549
|
i,
|
|
434
550
|
a,
|
|
435
|
-
s,
|
|
436
551
|
o,
|
|
437
552
|
n,
|
|
553
|
+
s,
|
|
438
554
|
c,
|
|
439
|
-
|
|
555
|
+
l,
|
|
440
556
|
d,
|
|
441
557
|
h
|
|
442
558
|
);
|
|
443
559
|
}
|
|
560
|
+
async proxyToPrivate(e, t, r, i, a, o, n, s = !1) {
|
|
561
|
+
return p(this.getCurrentChainId()) ? I(
|
|
562
|
+
this,
|
|
563
|
+
e[0],
|
|
564
|
+
t[0],
|
|
565
|
+
r,
|
|
566
|
+
i,
|
|
567
|
+
s
|
|
568
|
+
) : ye(
|
|
569
|
+
this,
|
|
570
|
+
e,
|
|
571
|
+
t,
|
|
572
|
+
i,
|
|
573
|
+
a,
|
|
574
|
+
o,
|
|
575
|
+
r,
|
|
576
|
+
n,
|
|
577
|
+
s
|
|
578
|
+
);
|
|
579
|
+
}
|
|
580
|
+
async proxySend(e, t, r, i, a, o, n, s = !1) {
|
|
581
|
+
if (p(this.getCurrentChainId()))
|
|
582
|
+
return Pe(this, e[0], t[0], r, i, s);
|
|
583
|
+
const c = ge(
|
|
584
|
+
this,
|
|
585
|
+
e.map((h) => h.erc20TokenAddress),
|
|
586
|
+
t,
|
|
587
|
+
i
|
|
588
|
+
), l = e.map((h, m) => ({
|
|
589
|
+
token: h,
|
|
590
|
+
amount: -1n * t[m]
|
|
591
|
+
}));
|
|
592
|
+
return await this.actionPrivateWallet(
|
|
593
|
+
[],
|
|
594
|
+
[],
|
|
595
|
+
[],
|
|
596
|
+
c,
|
|
597
|
+
l,
|
|
598
|
+
r,
|
|
599
|
+
a,
|
|
600
|
+
o,
|
|
601
|
+
void 0,
|
|
602
|
+
void 0,
|
|
603
|
+
void 0,
|
|
604
|
+
n,
|
|
605
|
+
void 0,
|
|
606
|
+
s
|
|
607
|
+
);
|
|
608
|
+
}
|
|
444
609
|
async multiSendPrivateRecipients(e, t, r) {
|
|
445
|
-
return
|
|
610
|
+
return fe(this, e, t, r);
|
|
446
611
|
}
|
|
447
612
|
areMerkleTreeUpdatesDisabled() {
|
|
448
613
|
return this.disableMerkleTreeUpdates;
|
|
@@ -452,5 +617,5 @@ class Tt {
|
|
|
452
617
|
}
|
|
453
618
|
}
|
|
454
619
|
export {
|
|
455
|
-
|
|
620
|
+
ar as Hinkal
|
|
456
621
|
};
|