@sabaaa1/common 0.1.7 → 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/estimateGasRelayer.cjs +1 -1
- package/functions/web3/functionCalls/estimateGasRelayer.mjs +12 -12
- 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
|
@@ -2,42 +2,43 @@ import * as s from "node-forge";
|
|
|
2
2
|
import { ENCLAVE_EC2_URL as d } from "../snarkjs/constant.mjs";
|
|
3
3
|
import { ethers as a } from "ethers";
|
|
4
4
|
import c from "libsodium-wrappers";
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
import { httpClient as h } from "../../data-structures/http/HttpClient.mjs";
|
|
6
|
+
import "axios";
|
|
7
|
+
const l = 214, p = async () => {
|
|
8
|
+
const e = (await h.get(`${d}/handshake`)).public_key, r = s.util.decode64(e), n = s.asn1.fromDer(r);
|
|
9
|
+
return s.pki.publicKeyFromAsn1(n);
|
|
10
|
+
}, i = (t) => typeof t == "bigint" || typeof t == "number" ? t.toString() : t, y = (t) => s.util.hexToBytes(t.replace("0x", "")), f = (t) => {
|
|
11
|
+
const e = structuredClone(t);
|
|
12
|
+
return Object.entries(e).forEach(([r, n]) => {
|
|
13
|
+
e[r] = i(n), Array.isArray(n) && (Array.isArray(n[0]) ? e[r] = n.map((o) => o.map(i)) : e[r] = n.map(i));
|
|
14
|
+
}), e;
|
|
15
|
+
}, E = (t, e) => {
|
|
16
|
+
const r = a.utils.hexlify(e).slice(2), n = y(r);
|
|
17
|
+
if (n.length > l)
|
|
17
18
|
throw new Error("too many bytes passed to assymetric_encrypt");
|
|
18
|
-
const o = t.encrypt(
|
|
19
|
+
const o = t.encrypt(n, "RSA-OAEP", {
|
|
19
20
|
md: s.md.sha1.create(),
|
|
20
21
|
mgf1: { md: s.md.sha1.create() },
|
|
21
22
|
label: null
|
|
22
23
|
});
|
|
23
24
|
return s.util.encode64(o);
|
|
24
|
-
}, b = (t,
|
|
25
|
-
const r = c.randombytes_buf(c.crypto_secretbox_NONCEBYTES),
|
|
25
|
+
}, b = (t, e) => {
|
|
26
|
+
const r = c.randombytes_buf(c.crypto_secretbox_NONCEBYTES), n = c.crypto_secretbox_easy(e, r, t), o = a.utils.hexlify(r) + a.utils.hexlify(n).slice(2), u = y(o);
|
|
26
27
|
return s.util.encode64(u);
|
|
27
|
-
}, m = (t,
|
|
28
|
-
const r = c.randombytes_buf(c.crypto_secretbox_KEYBYTES),
|
|
29
|
-
return { keyCiphertext:
|
|
30
|
-
}, x = (t,
|
|
31
|
-
const r =
|
|
32
|
-
return m(o,
|
|
33
|
-
}, S = async (t) => {
|
|
34
|
-
const n = await p();
|
|
35
|
-
return x(t, n);
|
|
28
|
+
}, m = (t, e) => {
|
|
29
|
+
const r = c.randombytes_buf(c.crypto_secretbox_KEYBYTES), n = E(e, r), o = b(r, t);
|
|
30
|
+
return { keyCiphertext: n, inputCiphertext: o };
|
|
31
|
+
}, x = (t, e) => {
|
|
32
|
+
const r = f(t), n = JSON.stringify(r), o = new TextEncoder().encode(n);
|
|
33
|
+
return m(o, e);
|
|
36
34
|
}, g = async (t) => {
|
|
37
|
-
const
|
|
38
|
-
return
|
|
35
|
+
const e = await p();
|
|
36
|
+
return x(t, e);
|
|
37
|
+
}, H = async (t) => {
|
|
38
|
+
const e = await p();
|
|
39
|
+
return m(t, e);
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
g as makeEnclaveHandshakeAndEncryptInput,
|
|
43
|
+
H as makeEnclaveHandshakeAndEncryptUint8Array
|
|
43
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const l=require("../../data-structures/custom-token-registry/CustomTokenRegistry.cjs"),k=require("../web3/etherFunctions.cjs"),g=require("./amounts.utils.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const l=require("../../data-structures/custom-token-registry/CustomTokenRegistry.cjs"),k=require("../web3/etherFunctions.cjs"),g=require("./amounts.utils.cjs"),i=require("../../constants/protocol.constants.cjs"),c=require("../../constants/token-data/popularTokens.constants.cjs"),m=require("../../constants/chains.constants.cjs"),u=require("../../constants/token-data/ERC20Registry.cjs"),a=e=>{const n=u.getERC20Registry(e),o=l.customTokenRegistry.getCustomTokens(e);return[...n,...o]},y=(e,n,o)=>(o??a(n))?.find(r=>e===void 0?!1:r.erc20TokenAddress.toLowerCase()===e.toLowerCase()),C=(e,n)=>a(n)?.find(o=>e===void 0?!1:o.symbol.toLowerCase()===e.toLowerCase()),d=(e,n)=>{const o=u.getERC20Registry(n);if(e.hasHToken)return o.find(r=>r.underlyingErc20TokenAddress?.toLowerCase()===e.erc20TokenAddress.toLowerCase()&&r.isHToken)},p=e=>{const n=e.reduce((o,{amount:r,token:T,nftIds:s})=>{const t=T.erc20TokenAddress.toLowerCase();return o[t]?o[t].amount+=r:o[t]={amount:r,token:T,nftIds:s},o},{});return Object.values(n)},f=e=>e.map(({amount:n,token:o,nftIds:r})=>{if(n===0n)return;const T=n>0n?"+":"-",s=Number(k.getAmountInToken(o,n));return{token:o,amount:`${T}${g.fixDecimalsAmount(s>0?s:-s)}`,nftIds:r}}).filter(n=>!!n),b=e=>e.nftTokenType===i.TokenType.ERC721||e.nftTokenType===i.TokenType.ERC1155||e.nftTokenType===i.TokenType.MetaplexNFT||e.nftTokenType===i.TokenType.Token2022NFT||e.nftTokenType===i.TokenType.CompressedNFT,R=e=>e.chainId===m.chainIds.arcTestnet&&e.erc20TokenAddress===i.zeroAddress,h=(e,n)=>{const o=n.toLowerCase();return e.symbol.toLowerCase().includes(o)||e.name.toLowerCase().includes(o)||e.erc20TokenAddress.toLowerCase().startsWith(o)},L=e=>{const n=e.filter(s=>c.PopularTokenSymbols.some(t=>t.symbol===s.symbol)),o=e.filter(s=>!c.PopularTokenSymbols.some(t=>t.symbol===s.symbol)),r=n.sort((s,t)=>s.symbol.localeCompare(t.symbol,"en-US")),T=o.sort((s,t)=>s.symbol.localeCompare(t.symbol,"en-US"));return[...r,...T]};exports.aggregateTokenChanges=p;exports.formatTokenChangesList=f;exports.getERC20Token=y;exports.getERC20TokenBySymbol=C;exports.getErc20TokensForChain=a;exports.getHToken=d;exports.isArcNativeToken=R;exports.isNFTToken=b;exports.searchCompareFunction=h;exports.sortTokens=L;
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import "../../constants/token-data/index.mjs";
|
|
2
|
-
import { customTokenRegistry as
|
|
2
|
+
import { customTokenRegistry as u } from "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
3
3
|
import { getAmountInToken as l } from "../web3/etherFunctions.mjs";
|
|
4
4
|
import { fixDecimalsAmount as d } from "./amounts.utils.mjs";
|
|
5
|
-
import { TokenType as m, zeroAddress as
|
|
6
|
-
import { PopularTokenSymbols as
|
|
7
|
-
import { chainIds as
|
|
8
|
-
import { getERC20Registry as
|
|
9
|
-
const
|
|
10
|
-
const r =
|
|
5
|
+
import { TokenType as m, zeroAddress as p } from "../../constants/protocol.constants.mjs";
|
|
6
|
+
import { PopularTokenSymbols as i } from "../../constants/token-data/popularTokens.constants.mjs";
|
|
7
|
+
import { chainIds as f } from "../../constants/chains.constants.mjs";
|
|
8
|
+
import { getERC20Registry as a } from "../../constants/token-data/ERC20Registry.mjs";
|
|
9
|
+
const c = (e) => {
|
|
10
|
+
const r = a(e), o = u.getCustomTokens(e);
|
|
11
11
|
return [...r, ...o];
|
|
12
|
-
}, R = (e, r, o) => (o ??
|
|
13
|
-
const o =
|
|
12
|
+
}, R = (e, r, o) => (o ?? c(r))?.find((n) => e === void 0 ? !1 : n.erc20TokenAddress.toLowerCase() === e.toLowerCase()), h = (e, r) => c(r)?.find((o) => e === void 0 ? !1 : o.symbol.toLowerCase() === e.toLowerCase()), E = (e, r) => {
|
|
13
|
+
const o = a(r);
|
|
14
14
|
if (e.hasHToken)
|
|
15
15
|
return o.find(
|
|
16
16
|
(n) => n.underlyingErc20TokenAddress?.toLowerCase() === e.erc20TokenAddress.toLowerCase() && n.isHToken
|
|
17
17
|
);
|
|
18
|
-
},
|
|
18
|
+
}, N = (e) => {
|
|
19
19
|
const r = e.reduce(
|
|
20
|
-
(o, { amount: n, token:
|
|
21
|
-
const t =
|
|
20
|
+
(o, { amount: n, token: T, nftIds: s }) => {
|
|
21
|
+
const t = T.erc20TokenAddress.toLowerCase();
|
|
22
22
|
return o[t] ? o[t].amount += n : o[t] = {
|
|
23
23
|
amount: n,
|
|
24
|
-
token:
|
|
24
|
+
token: T,
|
|
25
25
|
nftIds: s
|
|
26
26
|
}, o;
|
|
27
27
|
},
|
|
28
28
|
{}
|
|
29
29
|
);
|
|
30
30
|
return Object.values(r);
|
|
31
|
-
},
|
|
31
|
+
}, v = (e) => e.map(({ amount: r, token: o, nftIds: n }) => {
|
|
32
32
|
if (r === 0n)
|
|
33
33
|
return;
|
|
34
|
-
const
|
|
34
|
+
const T = r > 0n ? "+" : "-", s = Number(l(o, r));
|
|
35
35
|
return {
|
|
36
36
|
token: o,
|
|
37
|
-
amount: `${
|
|
37
|
+
amount: `${T}${d(s > 0 ? s : -s)}`,
|
|
38
38
|
nftIds: n
|
|
39
39
|
};
|
|
40
|
-
}).filter((r) => !!r),
|
|
40
|
+
}).filter((r) => !!r), F = (e) => e.nftTokenType === m.ERC721 || e.nftTokenType === m.ERC1155 || e.nftTokenType === m.MetaplexNFT || e.nftTokenType === m.Token2022NFT || e.nftTokenType === m.CompressedNFT, S = (e) => e.chainId === f.arcTestnet && e.erc20TokenAddress === p, P = (e, r) => {
|
|
41
41
|
const o = r.toLowerCase();
|
|
42
42
|
return e.symbol.toLowerCase().includes(o) || e.name.toLowerCase().includes(o) || e.erc20TokenAddress.toLowerCase().startsWith(o);
|
|
43
|
-
},
|
|
43
|
+
}, x = (e) => {
|
|
44
44
|
const r = e.filter(
|
|
45
|
-
(s) =>
|
|
45
|
+
(s) => i.some((t) => t.symbol === s.symbol)
|
|
46
46
|
), o = e.filter(
|
|
47
|
-
(s) => !
|
|
48
|
-
), n = r.sort((s, t) => s.symbol.localeCompare(t.symbol, "en-US")),
|
|
49
|
-
return [...n, ...
|
|
47
|
+
(s) => !i.some((t) => t.symbol === s.symbol)
|
|
48
|
+
), n = r.sort((s, t) => s.symbol.localeCompare(t.symbol, "en-US")), T = o.sort((s, t) => s.symbol.localeCompare(t.symbol, "en-US"));
|
|
49
|
+
return [...n, ...T];
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
N as aggregateTokenChanges,
|
|
53
|
+
v as formatTokenChangesList,
|
|
54
54
|
R as getERC20Token,
|
|
55
55
|
h as getERC20TokenBySymbol,
|
|
56
|
-
|
|
56
|
+
c as getErc20TokensForChain,
|
|
57
57
|
E as getHToken,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
S as isArcNativeToken,
|
|
59
|
+
F as isNFTToken,
|
|
60
|
+
P as searchCompareFunction,
|
|
61
|
+
x as sortTokens
|
|
62
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=e=>({to:e.to||"",from:e.from,contractAddress:e.contractAddress,gasUsed:{type:"BigNumber",hex:e.gasUsed.toString()},logsBloom:e.logsBloom,blockHash:e.blockHash,transactionHash:e.hash,blockNumber:e.blockNumber,confirmations:1,cumulativeGasUsed:{type:"BigNumber",hex:e.cumulativeGasUsed.toString()},effectiveGasPrice:{type:"BigNumber",hex:e.gasPrice?e.gasPrice.toString():"0x0"},status:e.status!==null?Number(e.status):0,type:e.type!==null?Number(e.type):0,byzantium:!0}),m=(e,t,r,s,a)=>{const n=t?.meta?.err?0:1,o=t?.meta?.fee||0,l=t?.slot||0,u=t?.transaction?.message?.recentBlockhash||"0x0";return{to:s,from:r,contractAddress:a,gasUsed:{type:"BigNumber",hex:`0x${o.toString(16)}`},logsBloom:"0x",blockHash:u,transactionHash:e,blockNumber:l,confirmations:1,cumulativeGasUsed:{type:"BigNumber",hex:`0x${o.toString(16)}`},effectiveGasPrice:{type:"BigNumber",hex:"0x1"},status:n,type:0,byzantium:!0}};exports.convertSolanaTransactionToRelayer=m;exports.convertV6ReceiptToRelayer=c;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { ethers as ethersV6 } from 'ethers-v6h';
|
|
2
2
|
import { RelayerTransaction } from '../../types/relayer.types';
|
|
3
|
+
import { Connection } from '@solana/web3.js';
|
|
3
4
|
export declare const convertV6ReceiptToRelayer: (v6Receipt: ethersV6.TransactionReceipt) => RelayerTransaction;
|
|
5
|
+
export declare const convertSolanaTransactionToRelayer: (signature: string, transaction: Awaited<ReturnType<Connection['getTransaction']>>, from: string, to: string, programAddress: string) => RelayerTransaction;
|
|
@@ -1,29 +1,59 @@
|
|
|
1
|
-
const
|
|
2
|
-
to:
|
|
3
|
-
from:
|
|
4
|
-
contractAddress:
|
|
1
|
+
const m = (s) => ({
|
|
2
|
+
to: s.to || "",
|
|
3
|
+
from: s.from,
|
|
4
|
+
contractAddress: s.contractAddress,
|
|
5
5
|
gasUsed: {
|
|
6
6
|
type: "BigNumber",
|
|
7
|
-
hex:
|
|
7
|
+
hex: s.gasUsed.toString()
|
|
8
8
|
},
|
|
9
|
-
logsBloom:
|
|
10
|
-
blockHash:
|
|
11
|
-
transactionHash:
|
|
12
|
-
blockNumber:
|
|
9
|
+
logsBloom: s.logsBloom,
|
|
10
|
+
blockHash: s.blockHash,
|
|
11
|
+
transactionHash: s.hash,
|
|
12
|
+
blockNumber: s.blockNumber,
|
|
13
13
|
confirmations: 1,
|
|
14
14
|
// Set to 1 as default
|
|
15
15
|
cumulativeGasUsed: {
|
|
16
16
|
type: "BigNumber",
|
|
17
|
-
hex:
|
|
17
|
+
hex: s.cumulativeGasUsed.toString()
|
|
18
18
|
},
|
|
19
19
|
effectiveGasPrice: {
|
|
20
20
|
type: "BigNumber",
|
|
21
|
-
hex:
|
|
21
|
+
hex: s.gasPrice ? s.gasPrice.toString() : "0x0"
|
|
22
22
|
},
|
|
23
|
-
status:
|
|
24
|
-
type:
|
|
23
|
+
status: s.status !== null ? Number(s.status) : 0,
|
|
24
|
+
type: s.type !== null ? Number(s.type) : 0,
|
|
25
25
|
byzantium: !0
|
|
26
|
-
})
|
|
26
|
+
}), c = (s, t, o, e, a) => {
|
|
27
|
+
const n = t?.meta?.err ? 0 : 1, r = t?.meta?.fee || 0, u = t?.slot || 0, l = t?.transaction?.message?.recentBlockhash || "0x0";
|
|
28
|
+
return {
|
|
29
|
+
to: e,
|
|
30
|
+
from: o,
|
|
31
|
+
contractAddress: a,
|
|
32
|
+
gasUsed: {
|
|
33
|
+
type: "BigNumber",
|
|
34
|
+
hex: `0x${r.toString(16)}`
|
|
35
|
+
},
|
|
36
|
+
logsBloom: "0x",
|
|
37
|
+
// Solana doesn't have logsBloom, using empty hex
|
|
38
|
+
blockHash: l,
|
|
39
|
+
transactionHash: s,
|
|
40
|
+
blockNumber: u,
|
|
41
|
+
confirmations: 1,
|
|
42
|
+
cumulativeGasUsed: {
|
|
43
|
+
type: "BigNumber",
|
|
44
|
+
hex: `0x${r.toString(16)}`
|
|
45
|
+
},
|
|
46
|
+
effectiveGasPrice: {
|
|
47
|
+
type: "BigNumber",
|
|
48
|
+
hex: "0x1"
|
|
49
|
+
// Solana uses fees instead of gas prices
|
|
50
|
+
},
|
|
51
|
+
status: n,
|
|
52
|
+
type: 0,
|
|
53
|
+
byzantium: !0
|
|
54
|
+
};
|
|
55
|
+
};
|
|
27
56
|
export {
|
|
28
|
-
|
|
57
|
+
c as convertSolanaTransactionToRelayer,
|
|
58
|
+
m as convertV6ReceiptToRelayer
|
|
29
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const r=require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const r=require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.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");const i=e=>r.networkRegistry[e],u=e=>Object.keys(r.chainIdsByType)[Object.values(r.chainIdsByType).findIndex(t=>t.includes(e.chainId))];exports.getNetworkObject=i;exports.getNetworkType=u;
|
|
@@ -9,12 +9,11 @@ import "../../constants/reorg-depths.constants.mjs";
|
|
|
9
9
|
import "../../constants/addresses.constants.mjs";
|
|
10
10
|
import "../../constants/token.limits.constants.mjs";
|
|
11
11
|
import "../../constants/presale.constants.mjs";
|
|
12
|
-
import "../../constants/mystery-boxes.constants.mjs";
|
|
13
12
|
import "../../constants/activity.constants.mjs";
|
|
14
13
|
import "../../constants/tasks.constants.mjs";
|
|
15
14
|
import "../../constants/events.constants.mjs";
|
|
16
|
-
const
|
|
15
|
+
const I = (t) => i[t], O = (t) => Object.keys(o)[Object.values(o).findIndex((r) => r.includes(t.chainId))];
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
I as getNetworkObject,
|
|
18
|
+
O as getNetworkType
|
|
20
19
|
};
|
|
@@ -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("../../constants/fees.constants.cjs"),o=require("../../constants/protocol.constants.cjs"),_=require("../../types/hinkal.types.cjs"),l=require("./erc20tokenFunctions.cjs"),s=require("../../constants/chains.constants.cjs"),c=(t,n)=>{if(t.length!==n.length)throw new Error("length mismatch");const e=t.findIndex(a=>a!==0n);return e===-1?_.defaultFeeStructure:{feeToken:n[e],flatFee:t[e],variableRate:0n}},i=t=>{if(!t)return r.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS;const n=s.isSolanaLike(t)?o.solanaNativeAddress:o.zeroAddress,e=l.getERC20Token(n,t)?.symbol;return s.isSolanaLike(t)&&e?[e]:e&&!r.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS.includes(e)?[e,...r.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS]:r.NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS},O=(t,n)=>{const e=t*n.variableRate/10000n;return n.flatFee+e};exports.calculateTotalFee=O;exports.generateFeeStructure=c;exports.getGasTokenSymbols=i;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { FeeStructure } from '../../types/hinkal.types';
|
|
2
2
|
export declare const generateFeeStructure: (flatFees: bigint[], erc20TokenAddresses: string[]) => FeeStructure<bigint>;
|
|
3
3
|
export declare const getGasTokenSymbols: (chainId: number | undefined) => string[];
|
|
4
|
+
export declare const calculateTotalFee: (amount: bigint, feeStructure: FeeStructure) => bigint;
|
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../constants/
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "../../constants/chains.constants.mjs";
|
|
6
|
-
const
|
|
1
|
+
import { NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS as o } from "../../constants/fees.constants.mjs";
|
|
2
|
+
import { solanaNativeAddress as i, zeroAddress as l } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { defaultFeeStructure as m } from "../../types/hinkal.types.mjs";
|
|
4
|
+
import { getERC20Token as s } from "./erc20tokenFunctions.mjs";
|
|
5
|
+
import { isSolanaLike as n } from "../../constants/chains.constants.mjs";
|
|
6
|
+
const b = (t, r) => {
|
|
7
7
|
if (t.length !== r.length)
|
|
8
8
|
throw new Error("length mismatch");
|
|
9
|
-
const e = t.findIndex((
|
|
10
|
-
return e === -1 ?
|
|
9
|
+
const e = t.findIndex((a) => a !== 0n);
|
|
10
|
+
return e === -1 ? m : {
|
|
11
11
|
feeToken: r[e],
|
|
12
12
|
flatFee: t[e],
|
|
13
13
|
variableRate: 0n
|
|
14
14
|
};
|
|
15
|
+
}, d = (t) => {
|
|
16
|
+
if (!t)
|
|
17
|
+
return o;
|
|
18
|
+
const r = n(t) ? i : l, e = s(r, t)?.symbol;
|
|
19
|
+
return n(t) && e ? [e] : e && !o.includes(e) ? [e, ...o] : o;
|
|
20
|
+
}, g = (t, r) => {
|
|
21
|
+
const e = t * r.variableRate / 10000n;
|
|
22
|
+
return r.flatFee + e;
|
|
15
23
|
};
|
|
16
24
|
export {
|
|
17
|
-
|
|
25
|
+
g as calculateTotalFee,
|
|
26
|
+
b as generateFeeStructure,
|
|
27
|
+
d as getGasTokenSymbols
|
|
18
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../API/getServerURL.cjs");require("axios");require("../../constants/coingecko.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/chains.constants.cjs");require("../../constants/vite.constants.cjs");const a=require("../../API/API.cjs");require("../../constants/token-data/index.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../API/getServerURL.cjs");require("axios");require("../../constants/coingecko.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/chains.constants.cjs");require("../../data-structures/http/HttpClient.cjs");require("../../constants/vite.constants.cjs");const a=require("../../API/API.cjs");require("../../constants/token-data/index.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/reorg-depths.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("../../API/tenderly.api.cjs");const l=async n=>{const s=n.getCurrentChainId(),r=n.getApprovedUtxos();if(r.length===0)return[];const o=[...new Set(r.map(e=>e.tokenAddress.toLowerCase()))],i=(await a.API.tokensInfoCall(s,o)).filter(e=>!!e),u=new Map(i.map(e=>[e.erc20TokenAddress.toLowerCase(),e]));return r.map(e=>{const t=u.get(e.tokenAddress.toLowerCase());return t?{token:t,spenderAddress:e.interactionAddress,allowance:e.amount}:null}).filter(e=>e!==null&&e.allowance>0n)};exports.getHinkalApprovals=l;
|
|
@@ -3,6 +3,7 @@ import "axios";
|
|
|
3
3
|
import "../../constants/coingecko.constants.mjs";
|
|
4
4
|
import "../../constants/server.constants.mjs";
|
|
5
5
|
import "../../constants/chains.constants.mjs";
|
|
6
|
+
import "../../data-structures/http/HttpClient.mjs";
|
|
6
7
|
import "../../constants/vite.constants.mjs";
|
|
7
8
|
import { API as a } from "../../API/API.mjs";
|
|
8
9
|
import "../../constants/token-data/index.mjs";
|
|
@@ -12,7 +13,6 @@ import "../../constants/reorg-depths.constants.mjs";
|
|
|
12
13
|
import "../../constants/addresses.constants.mjs";
|
|
13
14
|
import "../../constants/token.limits.constants.mjs";
|
|
14
15
|
import "../../constants/presale.constants.mjs";
|
|
15
|
-
import "../../constants/mystery-boxes.constants.mjs";
|
|
16
16
|
import "../../constants/activity.constants.mjs";
|
|
17
17
|
import "../../constants/tasks.constants.mjs";
|
|
18
18
|
import "../../constants/events.constants.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../constants/chains.constants.cjs"),r=require("../../constants/mediaUrls.constants.cjs"),s=e=>e===i.chainIds.polygon?r.mediaUrls.POLY_SCAN:e===i.chainIds.arbMainnet?r.mediaUrls.ARB_SCAN:e===i.chainIds.ethMainnet?r.mediaUrls.ETH_SCAN:e===i.chainIds.avalanche?r.mediaUrls.AVAX_SCAN:e===i.chainIds.bnbMainnet?r.mediaUrls.BSC_SCAN:e===i.chainIds.base?r.mediaUrls.BASE_SCAN:e===i.chainIds.optimism?r.mediaUrls.OPTIMISM_SCAN:e===i.chainIds.arcTestnet?r.mediaUrls.ARC_TESTNET_EXPLORER:i.isSolanaLike(e)?r.mediaUrls.SOL_SCAN:r.mediaUrls.ETH_SCAN;exports.getBlockExplorerUrl=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { chainIds as t } from "../../constants/chains.constants.mjs";
|
|
1
|
+
import { chainIds as t, isSolanaLike as S } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { mediaUrls as r } from "../../constants/mediaUrls.constants.mjs";
|
|
3
|
-
const f = (e) => e === t.polygon ? r.POLY_SCAN : e === t.arbMainnet ? r.ARB_SCAN : e === t.ethMainnet ? r.ETH_SCAN : e === t.avalanche ? r.AVAX_SCAN : e === t.bnbMainnet ? r.BSC_SCAN : e === t.base ? r.BASE_SCAN : e === t.optimism ? r.OPTIMISM_SCAN : e === t.arcTestnet ? r.ARC_TESTNET_EXPLORER : r.ETH_SCAN;
|
|
3
|
+
const f = (e) => e === t.polygon ? r.POLY_SCAN : e === t.arbMainnet ? r.ARB_SCAN : e === t.ethMainnet ? r.ETH_SCAN : e === t.avalanche ? r.AVAX_SCAN : e === t.bnbMainnet ? r.BSC_SCAN : e === t.base ? r.BASE_SCAN : e === t.optimism ? r.OPTIMISM_SCAN : e === t.arcTestnet ? r.ARC_TESTNET_EXPLORER : S(e) ? r.SOL_SCAN : r.ETH_SCAN;
|
|
4
4
|
export {
|
|
5
5
|
f as getBlockExplorerUrl
|
|
6
6
|
};
|
|
@@ -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("../../constants/protocol.constants.cjs");require("ethers");require("@solana/web3.js");require("circomlibjs-hinkal-fork");require("../../constants/chains.constants.cjs");const y=require("../../data-structures/utxo/Utxo.cjs"),s=require("../../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const a=o=>{const e=o.getShieldedPrivateKey(),n=s.UserKeys.getEncryptionKeyPair(e).publicKey,t=new y.Utxo({amount:0n,erc20TokenAddress:u.zeroAddress,shieldedPrivateKey:e}),{randomization:r}=t,i=t.getStealthAddress(),{h0:c,h1:d}=s.UserKeys.getStealthAddressCompressedPoints(r,e);return`${r},${i},${n},${c},${d}`};exports.getRecipientInfoFromUserKeys=a;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { zeroAddress as
|
|
1
|
+
import { zeroAddress as p } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import "ethers";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import "@solana/web3.js";
|
|
4
|
+
import "circomlibjs-hinkal-fork";
|
|
5
|
+
import "../../constants/chains.constants.mjs";
|
|
6
|
+
import { Utxo as c } from "../../data-structures/utxo/Utxo.mjs";
|
|
7
|
+
import { UserKeys as r } from "../../data-structures/crypto-keys/keys.mjs";
|
|
5
8
|
import "libsodium-wrappers";
|
|
6
|
-
const
|
|
7
|
-
const e = s.getShieldedPrivateKey(),
|
|
8
|
-
|
|
9
|
-
throw Error("Cannot get recipient information");
|
|
10
|
-
return `${r},${n},${t}`;
|
|
11
|
-
}, g = (s) => {
|
|
12
|
-
const e = s.getShieldedPrivateKey(), t = new d({ amount: 0n, erc20TokenAddress: i, shieldedPrivateKey: e }), { randomization: o } = t, r = t.getStealthAddress(), { h0: n, h1: a } = c.getStealthAddressCompressedPoints(o, e);
|
|
13
|
-
return `${o},${r},${n},${a}`;
|
|
9
|
+
const f = (s) => {
|
|
10
|
+
const e = s.getShieldedPrivateKey(), i = r.getEncryptionKeyPair(e).publicKey, t = new c({ amount: 0n, erc20TokenAddress: p, shieldedPrivateKey: e }), { randomization: o } = t, n = t.getStealthAddress(), { h0: d, h1: m } = r.getStealthAddressCompressedPoints(o, e);
|
|
11
|
+
return `${o},${n},${i},${d},${m}`;
|
|
14
12
|
};
|
|
15
13
|
export {
|
|
16
|
-
|
|
17
|
-
K as getRecipientInfoFromUserKeys
|
|
14
|
+
f as getRecipientInfoFromUserKeys
|
|
18
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../../data-structures/crypto-keys/decodeUTXO.cjs"),i=require("./caseInsensitive.utils.cjs");require("../../types/circom-data.types.cjs");const p=require("../../types/ethereum-network.types.cjs");require("../../types/transactions.types.cjs");require("../../types/activities.types.cjs");const q=require("./amounts.utils.cjs"),y=(o,t,c)=>{const r=t.getContractWithFetcher(p.ContractType.HinkalContract),u=r.interface,a=t.userKeys.getShieldedPrivateKey(),d=t.getCurrentChainId();return o.logs.filter(e=>i.caseInsensitiveEqual(e.address,r.address)).map(e=>{try{const n=u.parseLog(e);if(n.name==="NewCommitment"){const{encryptedOutput:l,index:g}=n.args;if(q.toBigInt(g)<0n){const s=m.decodeUtxo(l,a,d);if(i.caseInsensitiveEqual(s.erc20TokenAddress,c))return s}}}catch{return null}return null}).filter(e=>e!==null)};exports.getUtxosFromReceipt=y;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ethers } from 'ethers';
|
|
2
|
+
import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
3
|
+
import { IHinkal } from '../../data-structures/Hinkal/IHinkal';
|
|
4
|
+
export declare const getUtxosFromReceipt: (receipt: ethers.providers.TransactionReceipt, hinkal: IHinkal, tokenAddress: string) => Utxo[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { decodeUtxo as u } from "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
2
|
+
import { caseInsensitiveEqual as i } from "./caseInsensitive.utils.mjs";
|
|
3
|
+
import "../../types/circom-data.types.mjs";
|
|
4
|
+
import { ContractType as f } from "../../types/ethereum-network.types.mjs";
|
|
5
|
+
import "../../types/transactions.types.mjs";
|
|
6
|
+
import "../../types/activities.types.mjs";
|
|
7
|
+
import { toBigInt as g } from "./amounts.utils.mjs";
|
|
8
|
+
const k = (s, e, c) => {
|
|
9
|
+
const r = e.getContractWithFetcher(f.HinkalContract), a = r.interface, d = e.userKeys.getShieldedPrivateKey(), m = e.getCurrentChainId();
|
|
10
|
+
return s.logs.filter((t) => i(t.address, r.address)).map((t) => {
|
|
11
|
+
try {
|
|
12
|
+
const o = a.parseLog(t);
|
|
13
|
+
if (o.name === "NewCommitment") {
|
|
14
|
+
const { encryptedOutput: p, index: l } = o.args;
|
|
15
|
+
if (g(l) < 0n) {
|
|
16
|
+
const n = u(p, d, m);
|
|
17
|
+
if (i(n.erc20TokenAddress, c))
|
|
18
|
+
return n;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}).filter((t) => t !== null);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
k as getUtxosFromReceipt
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("@solana/web3.js"),P=require("./bytes32.utils.cjs"),h=require("../../crypto/poseidon.cjs"),A=require("../../data-structures/utxo/Utxo.cjs"),o=require("@coral-xyz/anchor"),C=(r,t,i)=>[...new o.EventParser(t.programId,new o.BorshCoder(t.idl)).parseLogs(r.meta?.logMessages??[])].filter(({name:e})=>e==="newCommitment").filter(({data:e})=>e.encryptedOutput.length===0).map(e=>{const{onChainData:s}=e.data,[a,m,d,c,,,,u]=s.map(P.convertBytes32ToBigInt),[,l,p]=s,v=new y.PublicKey([...l.slice(16),...p.slice(16)]),g=h.poseidonHash(m,d),n=new A.Utxo({amount:a,timeStamp:u.toString(),randomization:c,shieldedPrivateKey:i.getShieldedPrivateKey(),mintAddress:v.toBase58(),erc20TokenAddress:g});return n.getStealthAddress(),n});exports.getUtxosFromReceiptSolana=C;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TransactionResponse, VersionedTransactionResponse } from '@solana/web3.js';
|
|
2
|
+
import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
3
|
+
import { Program } from '@coral-xyz/anchor';
|
|
4
|
+
import { UserKeys } from '../../data-structures/crypto-keys/keys';
|
|
5
|
+
export declare const getUtxosFromReceiptSolana: (tx: VersionedTransactionResponse | TransactionResponse, hinkalProgram: Program, userKeys: UserKeys) => Utxo[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PublicKey as u } from "@solana/web3.js";
|
|
2
|
+
import { convertBytes32ToBigInt as A } from "./bytes32.utils.mjs";
|
|
3
|
+
import { poseidonHash as C } from "../../crypto/poseidon.mjs";
|
|
4
|
+
import { Utxo as P } from "../../data-structures/utxo/Utxo.mjs";
|
|
5
|
+
import { EventParser as h, BorshCoder as f } from "@coral-xyz/anchor";
|
|
6
|
+
const T = (o, e, r) => [...new h(e.programId, new f(e.idl)).parseLogs(o.meta?.logMessages ?? [])].filter(({ name: t }) => t === "newCommitment").filter(({ data: t }) => t.encryptedOutput.length === 0).map((t) => {
|
|
7
|
+
const { onChainData: s } = t.data, [m, i, a, d, , , , c] = s.map(A), [, p, v] = s, l = new u([...p.slice(16), ...v.slice(16)]), g = C(i, a), n = new P({
|
|
8
|
+
amount: m,
|
|
9
|
+
timeStamp: c.toString(),
|
|
10
|
+
randomization: d,
|
|
11
|
+
shieldedPrivateKey: r.getShieldedPrivateKey(),
|
|
12
|
+
mintAddress: l.toBase58(),
|
|
13
|
+
erc20TokenAddress: g
|
|
14
|
+
});
|
|
15
|
+
return n.getStealthAddress(), n;
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
T as getUtxosFromReceiptSolana
|
|
19
|
+
};
|
|
@@ -38,6 +38,10 @@ export * from './inLogicMetadata';
|
|
|
38
38
|
export * from './networks.utils';
|
|
39
39
|
export * from './is-valid-url';
|
|
40
40
|
export * from './get-hinkal-approvals';
|
|
41
|
-
export * from './mystery-box-auction.utils';
|
|
42
41
|
export * from './postToOffscreen';
|
|
43
42
|
export * from './get-signature-header';
|
|
43
|
+
export * from './solanaMint.utils';
|
|
44
|
+
export * from './prepareHinkal';
|
|
45
|
+
export * from './bytes32.utils';
|
|
46
|
+
export * from './getUtxosFromReceipt.utils';
|
|
47
|
+
export * from './fees.utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const t=require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.constants.cjs");require("../../constants/addresses.constants.cjs");require("../../constants/token.limits.constants.cjs");require("../../constants/presale.constants.cjs");require("../../constants/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../../constants/token-data/index.cjs");const t=require("../../constants/chains.constants.cjs");require("../../constants/contracts.constants.cjs");require("../../constants/kyc.constants.cjs");require("../../constants/server.constants.cjs");require("../../constants/vite.constants.cjs");require("../../constants/coingecko.constants.cjs");require("../../constants/reorg-depths.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");const i=r=>{const e=t.networkRegistry[r];return e?e.name:"Unsupported network"};exports.getNetworkName=i;
|
|
@@ -9,14 +9,13 @@ import "../../constants/reorg-depths.constants.mjs";
|
|
|
9
9
|
import "../../constants/addresses.constants.mjs";
|
|
10
10
|
import "../../constants/token.limits.constants.mjs";
|
|
11
11
|
import "../../constants/presale.constants.mjs";
|
|
12
|
-
import "../../constants/mystery-boxes.constants.mjs";
|
|
13
12
|
import "../../constants/activity.constants.mjs";
|
|
14
13
|
import "../../constants/tasks.constants.mjs";
|
|
15
14
|
import "../../constants/events.constants.mjs";
|
|
16
|
-
const
|
|
15
|
+
const f = (r) => {
|
|
17
16
|
const t = o[r];
|
|
18
17
|
return t ? t.name : "Unsupported network";
|
|
19
18
|
};
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
f as getNetworkName
|
|
22
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../constants/protocol.constants.cjs");require("../../error-handling/error-codes.constants.cjs");require("ethers");require("../../types/circom-data.types.cjs");require("../../types/transactions.types.cjs");require("../../types/activities.types.cjs");require("../../constants/server.constants.cjs");require("../../API/getServerURL.cjs");require("../../data-structures/http/HttpClient.cjs");require("axios");require("../../constants/chains.constants.cjs");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");require("process");require("buffer");require("../../constants/vite.constants.cjs");require("../../constants/save-depths.cjs");require("../../constants/reorg-depths.constants.cjs");require("./mutexes.utils.cjs");require("@coral-xyz/anchor");const s=require("../../error-handling/logger.cjs");require("@solana/web3.js");require("../../data-structures/crypto-keys/keys.cjs");const q=u=>{const e={};return u.forEach(({assetInfo:t,id:i})=>{if(o.NFT_TRANSACTION_TYPES.includes(t.standard)&&i)try{if(t?.contractAddress){const r=t.contractAddress.toLowerCase();e[r]||(e[r]=[]),e[r].push(BigInt(i).toString())}}catch(r){s.Logger.error(`Failed to parse tokenId: ${i}`,r)}}),e};exports.extractTokenIdsFromAssetChanges=q;
|
|
@@ -6,18 +6,22 @@ import "../../types/transactions.types.mjs";
|
|
|
6
6
|
import "../../types/activities.types.mjs";
|
|
7
7
|
import "../../constants/server.constants.mjs";
|
|
8
8
|
import "../../API/getServerURL.mjs";
|
|
9
|
+
import "../../data-structures/http/HttpClient.mjs";
|
|
9
10
|
import "axios";
|
|
10
11
|
import "../../constants/chains.constants.mjs";
|
|
11
|
-
import "../../constants/reorg-depths.constants.mjs";
|
|
12
|
-
import "./mutexes.utils.mjs";
|
|
13
12
|
import "circomlibjs-hinkal-fork";
|
|
14
13
|
import "libsodium-wrappers";
|
|
15
14
|
import "process";
|
|
16
15
|
import "buffer";
|
|
17
16
|
import "../../constants/vite.constants.mjs";
|
|
18
17
|
import "../../constants/save-depths.mjs";
|
|
18
|
+
import "../../constants/reorg-depths.constants.mjs";
|
|
19
|
+
import "./mutexes.utils.mjs";
|
|
20
|
+
import "@coral-xyz/anchor";
|
|
19
21
|
import { Logger as e } from "../../error-handling/logger.mjs";
|
|
20
|
-
|
|
22
|
+
import "@solana/web3.js";
|
|
23
|
+
import "../../data-structures/crypto-keys/keys.mjs";
|
|
24
|
+
const y = (m) => {
|
|
21
25
|
const t = {};
|
|
22
26
|
return m.forEach(({ assetInfo: o, id: i }) => {
|
|
23
27
|
if (p.includes(o.standard) && i)
|
|
@@ -32,5 +36,5 @@ const E = (m) => {
|
|
|
32
36
|
}), t;
|
|
33
37
|
};
|
|
34
38
|
export {
|
|
35
|
-
|
|
39
|
+
y as extractTokenIdsFromAssetChanges
|
|
36
40
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("ethers"),v=require("@solana/web3.js"),o=require("../../crypto/preProcessing.cjs"),s=require("../../providers/EthersProviderAdapter.cjs"),c=require("../../constants/chains.constants.cjs"),g=require("../../data-structures/crypto-keys/keys.cjs"),d=require("./create-provider.cjs"),u=require("../../providers/SolanaProviderAdapter.cjs"),h=(e,t)=>{const r=c.networkRegistry[t].fetchRpcUrl;if(!r)throw new Error("RPC URL not found for the specified chain ID");const n=d.createCustomRpcProvider(r);return new w.ethers.Wallet(e,n)},l=(e,t)=>{const r=c.networkRegistry[t].fetchRpcUrl;if(!r)throw new Error("RPC URL not found for the specified chain ID");const n=d.createCustomRpcProvider(r);return new w.ethers.VoidSigner(e,n)},y=async(e,t)=>{await o.preProcessing();const r=s.default();r.initSigner?.(t),await e.initProviderAdapter(void 0,r),await e.initUserKeys()},P=async(e,t,r)=>{const n=s.default(),i=l(r,t);n.initSigner?.(i),await e.initProviderAdapter(void 0,n)},A=async(e,t,r,n)=>{await o.preProcessing(),await P(e,r,t),await e.initUserKeysWithPassword(n)},R=async(e,t)=>{await o.preProcessing();const r=e.getSelectedNetwork()?.chainId;if(!r)throw Error("chainId is undefined");const n=h(t,r),i=s.default();return i.initSigner?.(n),{userKeys:new g.UserKeys(await i.signMessage(e.signingMessage)),signer:n}},U=async(e,t,r)=>{await o.preProcessing();const n=e.getSelectedNetwork()?.chainId;if(!n)throw Error("chainId is undefined");const i=l(t,n);s.default().initSigner?.(i);const p=new g.UserKeys(r);return await e.switchAccount(i),p},S=e=>{const t=e.userKeys.getDerivedSolanaPublicKey();return{publicKey:new v.PublicKey(t),signTransaction:()=>{throw new Error("Void wallet cannot sign transactions")},signAllTransactions:()=>{throw new Error("Void wallet cannot sign transactions")},signMessage:()=>{throw new Error("Void wallet cannot sign messages")}}},f=async(e,t,r)=>{const n=c.networkRegistry[t].fetchRpcUrl;if(!n)throw new Error("RPC URL not found for the specified chain ID");const i=d.createCustomSolanaConnection(n),a=S(e),p=new u.SolanaProviderAdapter(i,t,a,r);await e.initProviderAdapter(a,p)},W=async(e,t,r)=>{await o.preProcessing();const n=c.networkRegistry[t].fetchRpcUrl;if(!n)throw new Error("RPC URL not found for the specified chain ID");const i=d.createCustomSolanaConnection(n),a=new u.SolanaProviderAdapter(i,t,r);await e.initProviderAdapter(r,a),await e.initUserKeys()},K=async(e,t,r,n)=>{await e.initUserKeysWithPassword(n),await o.preProcessing(),await f(e,r,t)};exports.createSigner=h;exports.createVoidSigner=l;exports.createVoidSolanaWallet=S;exports.prepareEthersProviderAdapter=P;exports.prepareHinkal=y;exports.prepareHinkalWithSignature=A;exports.prepareSolanaHinkal=W;exports.prepareSolanaHinkalWithSignature=K;exports.prepareSolanaProviderAdapter=f;exports.prepareToAccessNewWallet=R;exports.prepareToAccessNewWalletWithSignature=U;
|