@gurge/sdk 0.3.142 → 0.3.151
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/README.md +43 -29
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +97 -0
- package/common/src/API/API.mjs +96 -121
- package/common/src/API/TokenCallsCachedHelper.d.ts +15 -0
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.d.ts +9 -0
- package/common/src/API/admin-calls.mjs +3 -1
- package/common/src/API/callLifiAPI.cjs +1 -1
- package/common/src/API/callLifiAPI.d.ts +37 -0
- package/common/src/API/callLifiAPI.mjs +7 -2
- package/common/src/API/callMonitor.d.ts +9 -0
- package/common/src/API/callNearIntentsAPI.cjs +1 -1
- package/common/src/API/callNearIntentsAPI.d.ts +3 -0
- package/common/src/API/callNearIntentsAPI.mjs +2 -2
- package/common/src/API/callOkxAPI.d.ts +10 -0
- package/common/src/API/callRelayer.cjs +1 -1
- package/common/src/API/callRelayer.d.ts +76 -0
- package/common/src/API/callRelayer.mjs +7 -1
- package/common/src/API/checkRisk.d.ts +1 -0
- package/common/src/API/dashboardAccountCalls.d.ts +24 -0
- package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
- package/common/src/API/dashboardAccountMemberCalls.d.ts +49 -0
- package/common/src/API/dashboardAccountMemberCalls.mjs +5 -2
- package/common/src/API/dashboardBalanceCalls.d.ts +12 -0
- package/common/src/API/dashboardContactCalls.d.ts +9 -0
- package/common/src/API/dashboardPayoutCalls.cjs +1 -1
- package/common/src/API/dashboardPayoutCalls.d.ts +15 -0
- package/common/src/API/dashboardPayoutCalls.mjs +4 -1
- package/common/src/API/dashboardTransactionCalls.cjs +1 -1
- package/common/src/API/dashboardTransactionCalls.d.ts +6 -0
- package/common/src/API/dashboardTransactionCalls.mjs +2 -2
- package/common/src/API/enclaveRecipientInfoCalls.d.ts +12 -0
- package/common/src/API/enclaveSignatureCalls.cjs +1 -1
- package/common/src/API/enclaveSignatureCalls.d.ts +6 -0
- package/common/src/API/enclaveSignatureCalls.mjs +5 -8
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +59 -0
- package/common/src/API/enclaveUtxoCalls.mjs +16 -17
- package/common/src/API/evm-rpc-fallback.cjs +1 -0
- package/common/src/API/evm-rpc-fallback.d.ts +1 -0
- package/common/src/API/evm-rpc-fallback.mjs +17 -0
- package/common/src/API/evm-token-assets.d.ts +8 -0
- package/common/src/API/fetchCommitmentsCache.d.ts +19 -0
- package/common/src/API/get-token-data.d.ts +6 -0
- package/common/src/API/get-token-price-chart-data.d.ts +16 -0
- package/common/src/API/getCoingeckoPrice.d.ts +21 -0
- package/common/src/API/getGasEstimates.d.ts +10 -0
- package/common/src/API/getOdosPriceForToken.cjs +1 -0
- package/common/src/API/getOdosPriceForToken.d.ts +1 -0
- package/common/src/API/getOdosPriceForToken.mjs +14 -0
- package/common/src/API/getServerURL.d.ts +7 -0
- package/common/src/API/getTokenPrice.d.ts +10 -0
- package/common/src/API/getWebsiteURL.d.ts +3 -0
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +24 -0
- package/common/src/API/index.mjs +4 -5
- package/common/src/API/onrampCalls.d.ts +20 -0
- package/common/src/API/payoutNotificationStateCalls.cjs +1 -0
- package/common/src/API/payoutNotificationStateCalls.d.ts +10 -0
- package/common/src/API/payoutNotificationStateCalls.mjs +10 -0
- package/common/src/API/privacy-score-calls.d.ts +17 -0
- package/common/src/API/privateSendEmailNotificationsCalls.d.ts +8 -0
- package/common/src/API/privateSendNonceCalls.d.ts +13 -0
- package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
- package/common/src/API/privateSendRecipientInfoCalls.d.ts +8 -0
- package/common/src/API/privateSendRecipientInfoCalls.mjs +12 -6
- package/common/src/API/proxyAccountsCalls.cjs +1 -1
- package/common/src/API/proxyAccountsCalls.d.ts +5 -0
- package/common/src/API/proxyAccountsCalls.mjs +11 -10
- package/common/src/API/relayCalls.d.ts +5 -0
- package/common/src/API/resolve-sns.d.ts +1 -0
- package/common/src/API/rewardsUserCalls.cjs +1 -1
- package/common/src/API/rewardsUserCalls.d.ts +21 -0
- package/common/src/API/rewardsUserCalls.mjs +2 -10
- package/common/src/API/route-config.cjs +1 -0
- package/common/src/API/route-config.d.ts +1 -0
- package/common/src/API/route-config.mjs +26 -0
- package/common/src/API/scheduled-transactions-calls.cjs +1 -1
- package/common/src/API/scheduled-transactions-calls.d.ts +17 -0
- package/common/src/API/scheduled-transactions-calls.mjs +2 -6
- package/common/src/API/seedless-calls.d.ts +53 -0
- package/common/src/API/simulate-batch-tx.d.ts +3 -0
- package/common/src/API/simulate-transaction.d.ts +5 -0
- package/common/src/API/snapshot-event-calls.d.ts +7 -0
- package/common/src/API/solana-nft-assets.d.ts +1 -0
- package/common/src/API/solana-priority-fee.cjs +1 -0
- package/common/src/API/solana-priority-fee.d.ts +3 -0
- package/common/src/API/solana-priority-fee.mjs +20 -0
- package/common/src/API/solana-rpc-fallback.cjs +1 -0
- package/common/src/API/solana-rpc-fallback.d.ts +1 -0
- package/common/src/API/solana-rpc-fallback.mjs +13 -0
- package/common/src/API/temporaryWalletCalls.cjs +1 -1
- package/common/src/API/temporaryWalletCalls.d.ts +11 -0
- package/common/src/API/temporaryWalletCalls.mjs +8 -9
- package/common/src/API/tenderly.api.cjs +1 -1
- package/common/src/API/tenderly.api.d.ts +15 -0
- package/common/src/API/tenderly.api.mjs +1 -1
- package/common/src/API/token-calls.d.ts +4 -0
- package/common/src/API/tronSubsidyCalls.d.ts +13 -0
- package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
- package/common/src/API/weeklyAnalyticCalls.d.ts +12 -0
- package/common/src/API/weeklyAnalyticCalls.mjs +2 -5
- package/common/src/constants/activity.constants.d.ts +2 -0
- package/common/src/constants/addresses.constants.cjs +1 -1
- package/common/src/constants/addresses.constants.d.ts +28 -0
- package/common/src/constants/addresses.constants.mjs +19 -60
- package/common/src/constants/auth.constants.d.ts +2 -0
- package/common/src/constants/backend.constants.d.ts +12 -0
- package/common/src/constants/balance.constants.cjs +1 -0
- package/common/src/constants/balance.constants.d.ts +4 -0
- package/common/src/constants/balance.constants.mjs +4 -0
- package/common/src/constants/bridging.constants.cjs +1 -1
- package/common/src/constants/bridging.constants.d.ts +35 -0
- package/common/src/constants/bridging.constants.mjs +2 -1
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.d.ts +74 -0
- package/common/src/constants/chains.constants.mjs +175 -198
- package/common/src/constants/coingecko.constants.cjs +1 -1
- package/common/src/constants/coingecko.constants.d.ts +46 -0
- package/common/src/constants/coingecko.constants.mjs +1 -1
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.d.ts +11 -0
- package/common/src/constants/contracts.constants.mjs +16 -34
- package/common/src/constants/conversion.constants.d.ts +1 -0
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arcTestnet.json.mjs +7 -6
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -0
- package/common/src/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +12 -0
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-localhost.json.mjs +0 -3
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +5 -9
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +0 -1
- package/common/src/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-solana.json.mjs +2 -2
- package/common/src/constants/deploy-data/deploy-data-tempo.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tempo.json.mjs +7 -7
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronMainnet.json.mjs +2 -4
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-tronNile.json.mjs +2 -4
- package/common/src/constants/deploy-data/index.cjs +1 -1
- package/common/src/constants/deploy-data/index.d.ts +15 -0
- package/common/src/constants/deploy-data/index.mjs +16 -15
- package/common/src/constants/deploy-data/mergeDeployData.d.ts +4 -0
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +36 -45
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +2 -46
- package/common/src/constants/enclaveAuth.constants.d.ts +5 -0
- package/common/src/constants/events.constants.cjs +1 -1
- package/common/src/constants/events.constants.d.ts +1 -0
- package/common/src/constants/events.constants.mjs +1 -15
- package/common/src/constants/fees.constants.cjs +1 -1
- package/common/src/constants/fees.constants.d.ts +9 -0
- package/common/src/constants/fees.constants.mjs +2 -2
- package/common/src/constants/function-signatures.constants.d.ts +4 -0
- package/common/src/constants/images.constants.d.ts +1 -0
- package/common/src/constants/index.cjs +1 -1
- package/common/src/constants/index.d.ts +32 -0
- package/common/src/constants/index.mjs +1 -1
- package/common/src/constants/lifi.constants.cjs +1 -1
- package/common/src/constants/lifi.constants.d.ts +3 -0
- package/common/src/constants/lifi.constants.mjs +6 -3
- package/common/src/constants/link.constant.d.ts +1 -0
- package/common/src/constants/mediaUrls.constants.d.ts +43 -0
- package/common/src/constants/oauthUrls.constants.d.ts +4 -0
- package/common/src/constants/okx.constants.d.ts +3 -0
- package/common/src/constants/pay.constants.d.ts +2 -0
- package/common/src/constants/permit2.constants.d.ts +7 -0
- package/common/src/constants/presale.constants.d.ts +87 -0
- package/common/src/constants/protocol.constants.cjs +2 -1
- package/common/src/constants/protocol.constants.d.ts +74 -0
- package/common/src/constants/protocol.constants.mjs +3 -15
- package/common/src/constants/reorg-depths.constants.d.ts +17 -0
- package/common/src/constants/save-depths.d.ts +19 -0
- package/common/src/constants/schedule.constants.d.ts +2 -0
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +116 -0
- package/common/src/constants/server.constants.mjs +19 -49
- package/common/src/constants/tokens.constants.cjs +1 -1
- package/common/src/constants/tokens.constants.d.ts +5 -0
- package/common/src/constants/tokens.constants.mjs +4 -1
- package/common/src/constants/tx-confirmation.constants.cjs +1 -1
- package/common/src/constants/tx-confirmation.constants.d.ts +5 -0
- package/common/src/constants/tx-confirmation.constants.mjs +2 -2
- package/common/src/constants/vite.constants.d.ts +16 -0
- package/common/src/constants/wallet.constants.d.ts +1 -0
- package/common/src/crypto/babyJub.d.ts +16 -0
- package/common/src/crypto/ecdh-sealed-keys.cjs +1 -1
- package/common/src/crypto/ecdh-sealed-keys.d.ts +22 -0
- package/common/src/crypto/ecdh-sealed-keys.mjs +17 -2
- package/common/src/crypto/ecdh.d.ts +2 -0
- package/common/src/crypto/eddsa.d.ts +8 -0
- package/common/src/crypto/index.cjs +1 -1
- package/common/src/crypto/index.d.ts +6 -0
- package/common/src/crypto/index.mjs +1 -2
- package/common/src/crypto/poseidon.d.ts +15 -0
- package/common/src/crypto/preProcessing.d.ts +1 -0
- package/common/src/data-structures/AccountActions/AccountActions.d.ts +17 -0
- package/common/src/data-structures/AccountActions/index.d.ts +1 -0
- package/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.d.ts +17 -0
- package/common/src/data-structures/ApprovalDBs/index.d.ts +1 -0
- package/common/src/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +120 -0
- package/common/src/data-structures/Hinkal/Hinkal.mjs +142 -174
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +106 -0
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.d.ts +3 -0
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +36 -35
- package/common/src/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalActionReceive.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalActionReceive.mjs +13 -11
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +100 -0
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +40 -50
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +50 -119
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +4 -0
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +113 -109
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +98 -64
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +21 -0
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +50 -48
- package/common/src/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalNearDepositAndBridge.mjs +8 -3
- package/common/src/data-structures/Hinkal/hinkalPalEvmDeposit.d.ts +9 -0
- package/common/src/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.d.ts +9 -0
- package/common/src/data-structures/Hinkal/hinkalPalTronDepositPrepare.d.ts +9 -0
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +50 -38
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +52 -117
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.d.ts +10 -0
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +26 -32
- package/common/src/data-structures/Hinkal/hinkalProxySend.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalProxySend.mjs +16 -0
- package/common/src/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxySwap.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalProxySwap.mjs +13 -12
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +19 -17
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.d.ts +4 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +50 -79
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +8 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +47 -51
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +28 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +115 -133
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.d.ts +5 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +16 -12
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.d.ts +28 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +82 -56
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +6 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +11 -13
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.d.ts +8 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSponsoredShield.mjs +32 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.d.ts +4 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +58 -79
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransact.mjs +119 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +46 -77
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +4 -0
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +46 -57
- package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalSwap.mjs +32 -32
- package/common/src/data-structures/Hinkal/hinkalTransact.cjs +1 -0
- package/common/src/data-structures/Hinkal/hinkalTransact.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalTransact.mjs +106 -0
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.d.ts +4 -0
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +39 -44
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.d.ts +7 -0
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +38 -49
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +160 -102
- package/common/src/data-structures/Hinkal/index.d.ts +25 -0
- package/common/src/data-structures/Hinkal/prepareTronDepositToSelf.d.ts +27 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.d.ts +2 -0
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +7 -6
- package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/activity-db.d.ts +14 -0
- package/common/src/data-structures/IndexedDB/activity-db.mjs +34 -34
- package/common/src/data-structures/IndexedDB/balances-db.d.ts +13 -0
- package/common/src/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/contact-db.d.ts +11 -0
- package/common/src/data-structures/IndexedDB/contact-db.mjs +14 -28
- package/common/src/data-structures/IndexedDB/index.cjs +1 -1
- package/common/src/data-structures/IndexedDB/index.d.ts +9 -0
- package/common/src/data-structures/IndexedDB/index.mjs +1 -0
- package/common/src/data-structures/IndexedDB/key-val-store.cjs +1 -1
- package/common/src/data-structures/IndexedDB/key-val-store.d.ts +8 -0
- package/common/src/data-structures/IndexedDB/key-val-store.mjs +14 -0
- package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/pay-activity-db.d.ts +9 -0
- package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +43 -1
- package/common/src/data-structures/IndexedDB/prices-db.d.ts +9 -0
- package/common/src/data-structures/IndexedDB/private-balances-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.d.ts +10 -0
- package/common/src/data-structures/IndexedDB/private-balances-db.mjs +3 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.cjs +1 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.d.ts +11 -0
- package/common/src/data-structures/IndexedDB/scheduled-transactions-db.mjs +34 -0
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/signatures-db.d.ts +10 -0
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +11 -11
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +21 -0
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +29 -26
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.d.ts +18 -0
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.d.ts +11 -0
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +18 -0
- package/common/src/data-structures/TokenDBs/IPublicTokensDB.d.ts +6 -0
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.d.ts +11 -0
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +17 -18
- package/common/src/data-structures/TokenDBs/PublicTokensDB.d.ts +9 -0
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.d.ts +9 -0
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.d.ts +10 -0
- package/common/src/data-structures/TokenDBs/index.d.ts +6 -0
- package/common/src/data-structures/TokenDBs/token-visibility-db.d.ts +17 -0
- package/common/src/data-structures/ValueCache/ValueCache.d.ts +10 -0
- package/common/src/data-structures/ValueCache/index.d.ts +1 -0
- package/common/src/data-structures/WalletManager/WalletManager.d.ts +52 -0
- package/common/src/data-structures/WalletManager/index.d.ts +1 -0
- package/common/src/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +8 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.d.ts +12 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.mjs +3 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/FileCacheDevice.d.ts +13 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.mjs +12 -3
- package/common/src/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +8 -0
- package/common/src/data-structures/cacheDevices/index.d.ts +2 -0
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.d.ts +28 -0
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +11 -71
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +17 -0
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +39 -23
- package/common/src/data-structures/crypto-keys/index.d.ts +4 -0
- package/common/src/data-structures/crypto-keys/keyUtils.d.ts +2 -0
- package/common/src/data-structures/crypto-keys/keys.cjs +1 -1
- package/common/src/data-structures/crypto-keys/keys.d.ts +117 -0
- package/common/src/data-structures/crypto-keys/keys.mjs +64 -79
- package/common/src/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +12 -0
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +34 -0
- package/common/src/data-structures/event-service/evm/AbstractEventService.d.ts +14 -0
- package/common/src/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +22 -0
- package/common/src/data-structures/event-service/evm/AbstractSnapshotService.d.ts +22 -0
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +38 -0
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +46 -38
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +2 -2
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
- package/common/src/data-structures/event-service/helpers/ClientEventHelper.d.ts +10 -0
- package/common/src/data-structures/event-service/helpers/PollingEventHelper.d.ts +7 -0
- package/common/src/data-structures/event-service/index.d.ts +14 -0
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +34 -0
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +27 -23
- package/common/src/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +17 -0
- package/common/src/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +22 -0
- package/common/src/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +21 -0
- package/common/src/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
- package/common/src/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +42 -0
- package/common/src/data-structures/http/BasicHttpClient.d.ts +11 -0
- package/common/src/data-structures/http/HttpClient.d.ts +10 -0
- package/common/src/data-structures/http/index.d.ts +2 -0
- package/common/src/data-structures/index.d.ts +22 -0
- package/common/src/data-structures/merkle-tree/MerkleTree.cjs +1 -1
- package/common/src/data-structures/merkle-tree/MerkleTree.d.ts +93 -0
- package/common/src/data-structures/merkle-tree/MerkleTree.mjs +12 -1
- package/common/src/data-structures/merkle-tree/MerkleTreeIncompleteError.d.ts +3 -0
- package/common/src/data-structures/merkle-tree/index.d.ts +2 -0
- package/common/src/data-structures/presale/PresaleContractWrapper.d.ts +23 -0
- package/common/src/data-structures/presale/index.d.ts +1 -0
- package/common/src/data-structures/private-balances/BalanceChangedHandler.d.ts +9 -0
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -1
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.d.ts +25 -0
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.mjs +100 -86
- package/common/src/data-structures/private-balances/index.d.ts +3 -0
- package/common/src/data-structures/private-balances/privateBalancesReducer.d.ts +2 -0
- package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +36 -0
- package/common/src/data-structures/snapshot/SnapshotFetcherService.d.ts +14 -0
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.d.ts +8 -0
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.d.ts +8 -0
- package/common/src/data-structures/snapshot/index.d.ts +5 -0
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.d.ts +8 -0
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.d.ts +8 -0
- package/common/src/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
- package/common/src/data-structures/token-price-fetcher/TokenChecker.d.ts +10 -0
- package/common/src/data-structures/token-price-fetcher/TokenChecker.mjs +5 -3
- package/common/src/data-structures/token-price-fetcher/index.d.ts +1 -0
- package/common/src/data-structures/transactions-manager/history/history.types.d.ts +16 -0
- package/common/src/data-structures/transactions-manager/index.d.ts +1 -0
- package/common/src/data-structures/utxo/Utxo.cjs +1 -1
- package/common/src/data-structures/utxo/Utxo.d.ts +66 -0
- package/common/src/data-structures/utxo/Utxo.mjs +7 -17
- package/common/src/error-handling/customErrors/ErrorWithAmount.d.ts +4 -0
- package/common/src/error-handling/customErrors/ErrorWithIndex.d.ts +4 -0
- package/common/src/error-handling/customErrors/ErrorWithTx.d.ts +4 -0
- package/common/src/error-handling/customErrors/FeeOverTransactionValueError.d.ts +9 -0
- package/common/src/error-handling/customErrors/HttpError.d.ts +4 -0
- package/common/src/error-handling/customErrors/SimulationFailureError.d.ts +10 -0
- package/common/src/error-handling/customErrors/customErrors.helpers.d.ts +5 -0
- package/common/src/error-handling/customErrors/index.d.ts +7 -0
- package/common/src/error-handling/error-codes.constants.cjs +2 -2
- package/common/src/error-handling/error-codes.constants.d.ts +249 -0
- package/common/src/error-handling/error-codes.constants.mjs +30 -32
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.d.ts +5 -0
- package/common/src/error-handling/get-error.message.mjs +28 -18
- package/common/src/error-handling/index.cjs +1 -1
- package/common/src/error-handling/index.d.ts +7 -0
- package/common/src/error-handling/index.mjs +1 -0
- package/common/src/error-handling/isInsufficientFundsError.d.ts +1 -0
- package/common/src/error-handling/logError.d.ts +1 -0
- package/common/src/error-handling/logger.d.ts +5 -0
- package/common/src/error-handling/retrySolanaError.d.ts +1 -0
- package/common/src/error-handling/types.d.ts +10 -0
- package/common/src/externalABIs/BUSD.d.ts +38 -0
- package/common/src/externalABIs/DAI.d.ts +45 -0
- package/common/src/externalABIs/SanctionsList.d.ts +35 -0
- package/common/src/externalABIs/USDC.d.ts +28 -0
- package/common/src/externalABIs/USDR.d.ts +28 -0
- package/common/src/externalABIs/USDR3CRV.d.ts +49 -0
- package/common/src/externalABIs/USDT.d.ts +41 -0
- package/common/src/externalABIs/WETH.d.ts +38 -0
- package/common/src/externalABIs/amToken.d.ts +28 -0
- package/common/src/externalABIs/index.cjs +1 -1
- package/common/src/externalABIs/index.d.ts +107 -0
- package/common/src/externalABIs/index.mjs +2 -6
- package/common/src/externalABIs/swapAbi.d.ts +77 -0
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.d.ts +9 -0
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +7 -6
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.d.ts +3 -0
- package/common/src/functions/auto-deposit-back-helpers/index.d.ts +4 -0
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.d.ts +13 -0
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +8 -8
- package/common/src/functions/auto-deposit-back-helpers/update-hinkal.d.ts +2 -0
- package/common/src/functions/connectors.types.d.ts +22 -0
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.d.ts +11 -0
- package/common/src/functions/index.mjs +21 -20
- package/common/src/functions/pre-transaction/addressTableLookup.d.ts +4 -0
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.d.ts +14 -0
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +36 -38
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.d.ts +2 -0
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +38 -5
- package/common/src/functions/pre-transaction/constructAdminData.d.ts +3 -0
- package/common/src/functions/pre-transaction/convert-okx-instructions.d.ts +11 -0
- package/common/src/functions/pre-transaction/ensureAmountChanges.cjs +1 -1
- package/common/src/functions/pre-transaction/ensureAmountChanges.d.ts +2 -0
- package/common/src/functions/pre-transaction/ensureAmountChanges.mjs +3 -10
- package/common/src/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/common/src/functions/pre-transaction/getExternalSwapAddress.d.ts +2 -0
- package/common/src/functions/pre-transaction/getExternalSwapAddress.mjs +2 -18
- package/common/src/functions/pre-transaction/getFeeStructure.d.ts +5 -0
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.d.ts +4 -0
- package/common/src/functions/pre-transaction/getSolanaCalldataHash.mjs +11 -10
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.d.ts +9 -0
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +1 -1
- package/common/src/functions/pre-transaction/index.cjs +1 -1
- package/common/src/functions/pre-transaction/index.d.ts +19 -0
- package/common/src/functions/pre-transaction/index.mjs +2 -3
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +3 -0
- package/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +2 -2
- package/common/src/functions/pre-transaction/merge-with-fee-structure.d.ts +2 -0
- package/common/src/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/common/src/functions/pre-transaction/outputUtxoProcessing.d.ts +6 -0
- package/common/src/functions/pre-transaction/outputUtxoProcessing.mjs +19 -18
- package/common/src/functions/pre-transaction/process-gas-estimates.d.ts +5 -0
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.d.ts +11 -0
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +2 -2
- package/common/src/functions/pre-transaction/sendV0Transaction.d.ts +21 -0
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +4 -4
- package/common/src/functions/pre-transaction/solana-public-signals.d.ts +22 -0
- package/common/src/functions/pre-transaction/solana.cjs +1 -1
- package/common/src/functions/pre-transaction/solana.d.ts +27 -0
- package/common/src/functions/pre-transaction/solana.mjs +46 -21
- package/common/src/functions/pre-transaction/solanaTransfer.utils.cjs +1 -1
- package/common/src/functions/pre-transaction/solanaTransfer.utils.d.ts +6 -0
- package/common/src/functions/pre-transaction/solanaTransfer.utils.mjs +16 -15
- package/common/src/functions/pre-transaction/speculativeUtxo.cjs +1 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.d.ts +9 -0
- package/common/src/functions/pre-transaction/speculativeUtxo.mjs +19 -0
- package/common/src/functions/pre-transaction/store-instructions.d.ts +4 -0
- package/common/src/functions/pre-transaction/store-proof.cjs +1 -1
- package/common/src/functions/pre-transaction/store-proof.d.ts +7 -0
- package/common/src/functions/pre-transaction/store-proof.mjs +1 -0
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.d.ts +3 -0
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +53 -0
- package/common/src/functions/private-wallet/emporium.helpers.mjs +116 -72
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.d.ts +3 -0
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +38 -80
- package/common/src/functions/private-wallet/index.cjs +1 -1
- package/common/src/functions/private-wallet/index.d.ts +2 -0
- package/common/src/functions/private-wallet/index.mjs +0 -1
- package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +32 -0
- package/common/src/functions/snarkjs/common.snarkjs.mjs +104 -65
- package/common/src/functions/snarkjs/constant.cjs +1 -1
- package/common/src/functions/snarkjs/constant.d.ts +236 -0
- package/common/src/functions/snarkjs/constant.mjs +231 -145
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +13 -0
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +85 -69
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.cjs +1 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.d.ts +7 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.mjs +2 -0
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.d.ts +16 -0
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +62 -61
- package/common/src/functions/snarkjs/constructTxEnclave.cjs +1 -0
- package/common/src/functions/snarkjs/constructTxEnclave.d.ts +34 -0
- package/common/src/functions/snarkjs/constructTxEnclave.mjs +95 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.cjs +1 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.d.ts +5 -0
- package/common/src/functions/snarkjs/constructTxEnclaveVerify.mjs +295 -0
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +9 -0
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.d.ts +4 -0
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +16 -18
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.cjs +1 -0
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.d.ts +7 -0
- package/common/src/functions/snarkjs/fetchTronInsertionSiblings.mjs +13 -0
- package/common/src/functions/snarkjs/generateCircomData.cjs +1 -1
- package/common/src/functions/snarkjs/generateCircomData.d.ts +5 -0
- package/common/src/functions/snarkjs/generateCircomData.mjs +41 -31
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.d.ts +11 -0
- package/common/src/functions/snarkjs/generateMainAndCommitmentZkProof.mjs +7 -7
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.cjs +1 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.d.ts +2 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.mjs +3 -0
- package/common/src/functions/snarkjs/generateZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/generateZkProof.d.ts +5 -0
- package/common/src/functions/snarkjs/generateZkProof.mjs +9 -16
- package/common/src/functions/snarkjs/generateZkProofSelf.d.ts +5 -0
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +17 -0
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +19 -13
- package/common/src/functions/snarkjs/getOriginalSender.d.ts +1 -0
- package/common/src/functions/snarkjs/getZKFiles.cjs +1 -1
- package/common/src/functions/snarkjs/getZKFiles.d.ts +3 -0
- package/common/src/functions/snarkjs/getZKFiles.mjs +9 -3
- package/common/src/functions/snarkjs/index.cjs +1 -1
- package/common/src/functions/snarkjs/index.d.ts +10 -0
- package/common/src/functions/snarkjs/index.mjs +2 -0
- package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
- package/common/src/functions/snarkjs/signedMessageHash.d.ts +47 -0
- package/common/src/functions/snarkjs/signedMessageHash.mjs +36 -7
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.d.ts +4 -0
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.cjs +1 -0
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.d.ts +1 -0
- package/common/src/functions/snarkjs/verifySignedEnclaveResponse.mjs +11 -0
- package/common/src/functions/utils/abi.utils.d.ts +3 -0
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +12 -0
- package/common/src/functions/utils/addresses.mjs +30 -21
- package/common/src/functions/utils/aggregateTokenAmounts.d.ts +2 -0
- package/common/src/functions/utils/amounts.utils.d.ts +25 -0
- package/common/src/functions/utils/arraysMatch.d.ts +1 -0
- package/common/src/functions/utils/auth.utils.d.ts +5 -0
- package/common/src/functions/utils/bridge-arrival.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.d.ts +1 -0
- package/common/src/functions/utils/bridge-arrival.utils.mjs +16 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.d.ts +19 -0
- package/common/src/functions/utils/bridge-claimable-utxo.utils.mjs +24 -0
- package/common/src/functions/utils/bridge-claimable.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-claimable.utils.d.ts +15 -0
- package/common/src/functions/utils/bridge-claimable.utils.mjs +3 -0
- package/common/src/functions/utils/bridge-flow.utils.cjs +1 -0
- package/common/src/functions/utils/bridge-flow.utils.d.ts +4 -0
- package/common/src/functions/utils/bridge-flow.utils.mjs +2 -0
- package/common/src/functions/utils/buildClaimableDepositPlan.d.ts +17 -0
- package/common/src/functions/utils/bytes32.utils.d.ts +2 -0
- package/common/src/functions/utils/cacheDevice.utils.d.ts +3 -0
- package/common/src/functions/utils/cacheFunctions.d.ts +16 -0
- package/common/src/functions/utils/caseInsensitive.utils.d.ts +3 -0
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.d.ts +2 -0
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.mjs +5 -10
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +3 -0
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -1
- package/common/src/functions/utils/create-provider.cjs +1 -1
- package/common/src/functions/utils/create-provider.d.ts +11 -0
- package/common/src/functions/utils/create-provider.mjs +45 -9
- package/common/src/functions/utils/customEnclaveFunctionsRegister.d.ts +18 -0
- package/common/src/functions/utils/deposit-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/deposit-claimable.utils.d.ts +3 -0
- package/common/src/functions/utils/deposit-claimable.utils.mjs +3 -6
- package/common/src/functions/utils/dispatchBalanceRefreshes.d.ts +4 -0
- package/common/src/functions/utils/enclave-recipient-info-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.d.ts +5 -0
- package/common/src/functions/utils/enclave-recipient-info-storage.mjs +1 -0
- package/common/src/functions/utils/enclave-signature-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-signature-storage.d.ts +1 -0
- package/common/src/functions/utils/enclave-signature-storage.mjs +3 -3
- package/common/src/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +6 -0
- package/common/src/functions/utils/enclave-utxo-storage.mjs +16 -2
- package/common/src/functions/utils/enclaveHandshakeService.d.ts +10 -0
- package/common/src/functions/utils/enclaveSessionSigning.cjs +1 -0
- package/common/src/functions/utils/enclaveSessionSigning.d.ts +16 -0
- package/common/src/functions/utils/enclaveSessionSigning.mjs +2 -0
- package/common/src/functions/utils/encodeTokenWithId.cjs +1 -1
- package/common/src/functions/utils/encodeTokenWithId.d.ts +1 -0
- package/common/src/functions/utils/encodeTokenWithId.mjs +2 -5
- package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.d.ts +16 -0
- package/common/src/functions/utils/encryptInputForEnclave.mjs +43 -23
- package/common/src/functions/utils/enum.utils.d.ts +9 -0
- package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.d.ts +20 -0
- package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -15
- package/common/src/functions/utils/evmNetworkFunctions.d.ts +4 -0
- package/common/src/functions/utils/external-action.utils.d.ts +3 -0
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +9 -0
- package/common/src/functions/utils/fees.utils.mjs +42 -29
- package/common/src/functions/utils/formatter.d.ts +3 -0
- package/common/src/functions/utils/getBlockExplorerUrl.d.ts +1 -0
- package/common/src/functions/utils/getContractAddress.d.ts +2 -0
- package/common/src/functions/utils/getDataFromTransaction.d.ts +34 -0
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.d.ts +4 -0
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +2 -3
- package/common/src/functions/utils/getSignerFromContract.d.ts +3 -0
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.d.ts +6 -0
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +2 -26
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.d.ts +7 -0
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +7 -24
- package/common/src/functions/utils/getWalletGroupKey.utils.d.ts +1 -0
- package/common/src/functions/utils/inLogicMetadata.d.ts +2 -0
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +89 -0
- package/common/src/functions/utils/index.mjs +27 -13
- package/common/src/functions/utils/involves-permit2-op.d.ts +7 -0
- package/common/src/functions/utils/ipfs.d.ts +7 -0
- package/common/src/functions/utils/is-valid-url.d.ts +1 -0
- package/common/src/functions/utils/legacyKeys.cjs +1 -0
- package/common/src/functions/utils/legacyKeys.d.ts +10 -0
- package/common/src/functions/utils/legacyKeys.mjs +8 -0
- package/common/src/functions/utils/lifi.utils.d.ts +7 -0
- package/common/src/functions/utils/map.utils.d.ts +1 -0
- package/common/src/functions/utils/memoize.utils.d.ts +1 -0
- package/common/src/functions/utils/merkleTree.utils.d.ts +2 -0
- package/common/src/functions/utils/mnemonics.cjs +1 -1
- package/common/src/functions/utils/mnemonics.d.ts +1 -0
- package/common/src/functions/utils/mnemonics.mjs +4 -6
- package/common/src/functions/utils/mutexes.utils.d.ts +2 -0
- package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
- package/common/src/functions/utils/nearIntents.utils.d.ts +11 -0
- package/common/src/functions/utils/nearIntents.utils.mjs +27 -13
- package/common/src/functions/utils/networks.utils.d.ts +2 -0
- package/common/src/functions/utils/nftTokenFunctions.d.ts +2 -0
- package/common/src/functions/utils/nickname.utils.d.ts +1 -0
- package/common/src/functions/utils/pay-routing.utils.d.ts +4 -0
- package/common/src/functions/utils/postToOffscreen.d.ts +2 -0
- package/common/src/functions/utils/prepareHinkal.cjs +1 -1
- package/common/src/functions/utils/prepareHinkal.d.ts +9 -0
- package/common/src/functions/utils/prepareHinkal.mjs +2 -1
- package/common/src/functions/utils/process.utils.cjs +1 -1
- package/common/src/functions/utils/process.utils.d.ts +13 -0
- package/common/src/functions/utils/process.utils.mjs +2 -11
- package/common/src/functions/utils/proxyAvatar.utils.cjs +1 -0
- package/common/src/functions/utils/proxyAvatar.utils.d.ts +2 -0
- package/common/src/functions/utils/proxyAvatar.utils.mjs +3 -0
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.d.ts +6 -0
- package/common/src/functions/utils/publicBalance.utils.mjs +37 -23
- package/common/src/functions/utils/recovery-balance.utils.cjs +1 -0
- package/common/src/functions/utils/recovery-balance.utils.d.ts +2 -0
- package/common/src/functions/utils/recovery-balance.utils.mjs +1 -0
- package/common/src/functions/utils/reloadPage.d.ts +1 -0
- package/common/src/functions/utils/requireEnv.d.ts +1 -0
- package/common/src/functions/utils/resolve-domain-address.cjs +1 -0
- package/common/src/functions/utils/resolve-domain-address.d.ts +4 -0
- package/common/src/functions/utils/resolve-domain-address.mjs +3 -0
- package/common/src/functions/utils/resolve-sync.utils.d.ts +6 -0
- package/common/src/functions/utils/rpc-int-encode.d.ts +1 -0
- package/common/src/functions/utils/serialize-utxos.utils.cjs +1 -1
- package/common/src/functions/utils/serialize-utxos.utils.d.ts +3 -0
- package/common/src/functions/utils/serialize-utxos.utils.mjs +6 -4
- package/common/src/functions/utils/serialize.utils.d.ts +10 -0
- package/common/src/functions/utils/solana-memo.d.ts +3 -0
- package/common/src/functions/utils/solana-program.utils.cjs +1 -0
- package/common/src/functions/utils/solana-program.utils.d.ts +3 -0
- package/common/src/functions/utils/solana-program.utils.mjs +17 -0
- package/common/src/functions/utils/solana-sponsored.utils.cjs +1 -0
- package/common/src/functions/utils/solana-sponsored.utils.d.ts +22 -0
- package/common/src/functions/utils/solana-sponsored.utils.mjs +30 -0
- package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
- package/common/src/functions/utils/solanaMint.utils.d.ts +17 -0
- package/common/src/functions/utils/solanaMint.utils.mjs +18 -8
- package/common/src/functions/utils/solanaSendPreflight.utils.d.ts +6 -0
- package/common/src/functions/utils/sponsored-shield.utils.cjs +1 -0
- package/common/src/functions/utils/sponsored-shield.utils.d.ts +3 -0
- package/common/src/functions/utils/sponsored-shield.utils.mjs +3 -0
- package/common/src/functions/utils/string.utils.d.ts +16 -0
- package/common/src/functions/utils/temp-wallet.utils.cjs +1 -0
- package/common/src/functions/utils/temp-wallet.utils.d.ts +8 -0
- package/common/src/functions/utils/temp-wallet.utils.mjs +43 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.cjs +1 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.d.ts +7 -0
- package/common/src/functions/utils/temporary-wallet-recovery.utils.mjs +10 -0
- package/common/src/functions/utils/time.utils.d.ts +20 -0
- package/common/src/functions/utils/token-check.utils.d.ts +4 -0
- package/common/src/functions/utils/transfer-claimable.utils.cjs +1 -1
- package/common/src/functions/utils/transfer-claimable.utils.d.ts +8 -0
- package/common/src/functions/utils/transfer-claimable.utils.mjs +1 -4
- package/common/src/functions/utils/trimFieldValues.d.ts +4 -0
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.d.ts +35 -0
- package/common/src/functions/utils/tron.utils.mjs +89 -152
- package/common/src/functions/utils/tronSimulation.utils.cjs +1 -1
- package/common/src/functions/utils/tronSimulation.utils.d.ts +1 -0
- package/common/src/functions/utils/tronSimulation.utils.mjs +4 -6
- package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.d.ts +11 -0
- package/common/src/functions/utils/tx-confirmation.utils.mjs +16 -13
- package/common/src/functions/utils/upToDateState.d.ts +2 -0
- package/common/src/functions/utils/userAgent.d.ts +2 -0
- package/common/src/functions/utils/validateUsername.d.ts +5 -0
- package/common/src/functions/utils/validateWalletAddress.cjs +1 -0
- package/common/src/functions/utils/validateWalletAddress.d.ts +1 -0
- package/common/src/functions/utils/validateWalletAddress.mjs +2 -0
- package/common/src/functions/utils/voidWallets.utils.cjs +1 -0
- package/common/src/functions/utils/voidWallets.utils.d.ts +4 -0
- package/common/src/functions/utils/voidWallets.utils.mjs +1 -0
- package/common/src/functions/utils/waasStamp.cjs +1 -0
- package/common/src/functions/utils/waasStamp.d.ts +5 -0
- package/common/src/functions/utils/waasStamp.mjs +2 -0
- package/common/src/functions/utils/walletBalances.utils.d.ts +2 -0
- package/common/src/functions/web3/EIP-712.d.ts +23 -0
- package/common/src/functions/web3/connectors.utils.d.ts +9 -0
- package/common/src/functions/web3/crypto.d.ts +1 -0
- package/common/src/functions/web3/etherFunctions.d.ts +21 -0
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.d.ts +31 -0
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +50 -61
- package/common/src/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxosEnclave.d.ts +10 -0
- package/common/src/functions/web3/events/getInputUtxosEnclave.mjs +42 -35
- package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.d.ts +18 -0
- package/common/src/functions/web3/events/getShieldedBalance.mjs +109 -93
- package/common/src/functions/web3/events/getTransactionLogEvents.d.ts +13 -0
- package/common/src/functions/web3/events/index.d.ts +3 -0
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.d.ts +3 -0
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +9 -6
- package/common/src/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/common/src/functions/web3/functionCalls/approveToken.d.ts +4 -0
- package/common/src/functions/web3/functionCalls/approveToken.mjs +21 -107
- package/common/src/functions/web3/functionCalls/approveTokensToHinkal.d.ts +4 -0
- package/common/src/functions/web3/functionCalls/constructBatchCall.cjs +1 -1
- package/common/src/functions/web3/functionCalls/constructBatchCall.d.ts +7 -0
- package/common/src/functions/web3/functionCalls/constructBatchCall.mjs +23 -18
- package/common/src/functions/web3/functionCalls/estimateGasRelayer.d.ts +4 -0
- package/common/src/functions/web3/functionCalls/getRootHash.d.ts +2 -0
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.d.ts +2 -0
- package/common/src/functions/web3/functionCalls/relayFunctions.d.ts +3 -0
- package/common/src/functions/web3/functionCalls/submitProof.cjs +1 -0
- package/common/src/functions/web3/functionCalls/submitProof.d.ts +5 -0
- package/common/src/functions/web3/functionCalls/submitProof.mjs +26 -0
- package/common/src/functions/web3/functionCalls/transactCallDirect.d.ts +6 -0
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.d.ts +16 -0
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +81 -53
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.d.ts +32 -0
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +12 -8
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.d.ts +11 -0
- package/common/src/functions/web3/getContractMetadata.d.ts +5 -0
- package/common/src/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/common/src/functions/web3/getPublicAddressBalance.d.ts +1 -0
- package/common/src/functions/web3/getPublicAddressBalance.mjs +6 -5
- package/common/src/functions/web3/getTokenHolder.cjs +1 -1
- package/common/src/functions/web3/getTokenHolder.d.ts +1 -0
- package/common/src/functions/web3/getTokenHolder.mjs +3 -2
- package/common/src/functions/web3/index.cjs +1 -1
- package/common/src/functions/web3/index.d.ts +11 -0
- package/common/src/functions/web3/index.mjs +1 -4
- package/common/src/functions/web3/lifiAPI.cjs +1 -1
- package/common/src/functions/web3/lifiAPI.d.ts +6 -0
- package/common/src/functions/web3/lifiAPI.mjs +38 -7
- package/common/src/functions/web3/okxAPI.d.ts +8 -0
- package/common/src/functions/web3/runContractFunction.d.ts +16 -0
- package/common/src/functions/web3/signAndSendSerializedTransaction.d.ts +2 -0
- package/common/src/index.d.ts +9 -0
- package/common/src/mutexes/chainBalanceRwLock.d.ts +18 -0
- package/common/src/mutexes/index.d.ts +2 -0
- package/common/src/mutexes/mutex.d.ts +2 -0
- package/common/src/providers/EthersProviderAdapter.cjs +1 -1
- package/common/src/providers/EthersProviderAdapter.d.ts +35 -0
- package/common/src/providers/EthersProviderAdapter.mjs +0 -3
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.d.ts +48 -0
- package/common/src/providers/SolanaProviderAdapter.mjs +4 -11
- package/common/src/providers/TronProviderAdapter.cjs +1 -1
- package/common/src/providers/TronProviderAdapter.d.ts +38 -0
- package/common/src/providers/TronProviderAdapter.mjs +7 -4
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.d.ts +47 -0
- package/common/src/providers/WagmiProviderAdapter.mjs +32 -39
- package/common/src/providers/exportProviers.d.ts +3 -0
- package/common/src/types/API.types.d.ts +21 -0
- package/common/src/types/ICacheDevice.d.ts +5 -0
- package/common/src/types/IMultiThreadedUtxoUtils.d.ts +8 -0
- package/common/src/types/RewardUserEnums.d.ts +11 -0
- package/common/src/types/TransactionSimulator.types.d.ts +16 -0
- package/common/src/types/WeeklyAnalytics.types.d.ts +12 -0
- package/common/src/types/activities.types.cjs +1 -1
- package/common/src/types/activities.types.d.ts +68 -0
- package/common/src/types/activities.types.mjs +1 -1
- package/common/src/types/admin.types.cjs +1 -1
- package/common/src/types/admin.types.d.ts +45 -0
- package/common/src/types/admin.types.mjs +1 -1
- package/common/src/types/all-points.types.d.ts +7 -0
- package/common/src/types/approvals.types.d.ts +41 -0
- package/common/src/types/balances.types.d.ts +39 -0
- package/common/src/types/big-intable.types.d.ts +3 -0
- package/common/src/types/bridging-tx.types.d.ts +40 -0
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +61 -0
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/chains.types.d.ts +11 -0
- package/common/src/types/circom-data.types.cjs +1 -1
- package/common/src/types/circom-data.types.d.ts +112 -0
- package/common/src/types/circom-data.types.mjs +1 -1
- package/common/src/types/coingecko.types.d.ts +220 -0
- package/common/src/types/commitments.types.d.ts +34 -0
- package/common/src/types/confirmation-request.types.d.ts +10 -0
- package/common/src/types/connector.types.d.ts +5 -0
- package/common/src/types/contacts.types.d.ts +7 -0
- package/common/src/types/dashboard-account.d.ts +116 -0
- package/common/src/types/dashboard-payout.types.d.ts +30 -0
- package/common/src/types/dashboard-transaction.types.d.ts +25 -0
- package/common/src/types/eip5792.types.d.ts +33 -0
- package/common/src/types/enclaveApi.types.d.ts +77 -0
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +46 -0
- package/common/src/types/ethereum-network.types.mjs +1 -1
- package/common/src/types/events.types.d.ts +6 -0
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +14 -0
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/fee.types.d.ts +13 -0
- package/common/src/types/hinkal.types.cjs +1 -1
- package/common/src/types/hinkal.types.d.ts +82 -0
- package/common/src/types/hinkal.types.mjs +12 -20
- package/common/src/types/http.types.d.ts +8 -0
- package/common/src/types/index.cjs +1 -1
- package/common/src/types/index.d.ts +61 -0
- package/common/src/types/index.mjs +3 -2
- package/common/src/types/message.types.d.ts +5 -0
- package/common/src/types/near-intents.types.d.ts +62 -0
- package/common/src/types/new-rewards.type.d.ts +82 -0
- package/common/src/types/offscreen.types.cjs +1 -1
- package/common/src/types/offscreen.types.d.ts +8 -0
- package/common/src/types/offscreen.types.mjs +1 -1
- package/common/src/types/okx.types.d.ts +57 -0
- package/common/src/types/onramp.types.d.ts +58 -0
- package/common/src/types/pay-activities.types.d.ts +52 -0
- package/common/src/types/pay-routing.types.d.ts +9 -0
- package/common/src/types/payout-notification.types.d.ts +11 -0
- package/common/src/types/presaleReferral.types.d.ts +4 -0
- package/common/src/types/proxy-progress.types.d.ts +5 -0
- package/common/src/types/proxy.types.d.ts +19 -0
- package/common/src/types/remote-proof.types.d.ts +14 -0
- package/common/src/types/remote-tx-build.types.d.ts +298 -0
- package/common/src/types/schedule.types.d.ts +7 -0
- package/common/src/types/scheduled-transactions.types.d.ts +67 -0
- package/common/src/types/session.types.d.ts +13 -0
- package/common/src/types/signature.types.d.ts +10 -0
- package/common/src/types/slippage.types.d.ts +3 -0
- package/common/src/types/snark.types.d.ts +38 -0
- package/common/src/types/solana-transact.types.cjs +1 -0
- package/common/src/types/solana-transact.types.d.ts +35 -0
- package/common/src/types/solana-transact.types.mjs +6 -0
- package/common/src/types/solana.types.cjs +1 -0
- package/common/src/types/solana.types.d.ts +96 -0
- package/common/src/types/solana.types.mjs +6 -0
- package/common/src/types/temp-wallet.types.d.ts +9 -0
- package/common/src/types/tenderly.api.types.d.ts +266 -0
- package/common/src/types/token-prices.types.d.ts +18 -0
- package/common/src/types/token.types.cjs +1 -1
- package/common/src/types/token.types.d.ts +98 -0
- package/common/src/types/token.types.mjs +2 -2
- package/common/src/types/transact.types.cjs +1 -0
- package/common/src/types/transact.types.d.ts +53 -0
- package/common/src/types/transact.types.mjs +6 -0
- package/common/src/types/transaction.types.d.ts +159 -0
- package/common/src/types/transactions.types.d.ts +78 -0
- package/common/src/types/tron.types.d.ts +15 -0
- package/common/src/types/wc.types.d.ts +78 -0
- package/common/src/types/with-id.types.d.ts +3 -0
- package/common/src/webworker/WorkerWrapper.d.ts +9 -0
- package/common/src/webworker/logError-ScFy7p5w.js +2 -0
- package/common/src/webworker/package.json +26 -25
- package/common/src/webworker/performTaskWithWorker.d.ts +5 -0
- package/common/src/webworker/snarkjsWorker/snarkjsWorker.types.d.ts +14 -0
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.d.ts +1 -0
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLogic.d.ts +2 -0
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +1 -0
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorker.types.d.ts +33 -0
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.d.ts +1 -0
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLogic.d.ts +5 -0
- package/common/src/webworker/utxoWorker/utxoWorkerNode.d.ts +1 -0
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
- package/common/src/webworker/viteWorkerURL.constant.d.ts +10 -0
- package/common/src/webworker/viteWorkerURL.constant.fallback.d.ts +4 -0
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/common/src/webworker/worker.registry.d.ts +10 -0
- package/common/src/webworker/worker.types.d.ts +33 -0
- package/common/src/webworker/workerErrorHandler.d.ts +1 -0
- package/common/src/webworker/workerFactory.d.ts +11 -0
- package/common/src/webworker/workerProxy-B_eSl85g.js +1 -0
- package/common/src/webworker/workerProxy.d.ts +39 -0
- package/common/src/webworker/zkProofWorker/zkProofWorker.types.d.ts +26 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.d.ts +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLogic.d.ts +4 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerNode.d.ts +1 -0
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +1 -1
- package/internal/swapApi.cjs +1 -1
- package/internal/swapApi.d.ts +3 -3
- package/internal/swapApi.mjs +22 -25
- package/package.json +26 -25
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.d.ts +1 -0
- package/providers/prepareEthersHinkal.mjs +2 -2
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.d.ts +1 -0
- package/providers/prepareSolanaHinkal.mjs +2 -2
- package/providers/prepareTronHinkal.cjs +1 -1
- package/providers/prepareTronHinkal.d.ts +1 -0
- package/providers/prepareTronHinkal.mjs +2 -2
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.d.ts +1 -0
- package/providers/prepareWagmiHinkal.mjs +2 -2
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +16 -10
- package/services/Hinkal.mjs +29 -17
- package/types/IHinkal.d.ts +16 -10
- package/types/swap.types.d.ts +3 -20
- package/common/src/API/accessCodeCalls.cjs +0 -1
- package/common/src/API/accessCodeCalls.mjs +0 -13
- package/common/src/API/brotherhoodCalls.cjs +0 -1
- package/common/src/API/brotherhoodCalls.mjs +0 -17
- package/common/src/API/callOdosAPI.cjs +0 -1
- package/common/src/API/callOdosAPI.mjs +0 -18
- package/common/src/API/callOneInchAPI.cjs +0 -1
- package/common/src/API/callOneInchAPI.mjs +0 -13
- package/common/src/API/deposit-and-withdraw-status-calls.cjs +0 -1
- package/common/src/API/deposit-and-withdraw-status-calls.mjs +0 -13
- package/common/src/API/generate-trading-points.cjs +0 -1
- package/common/src/API/generate-trading-points.mjs +0 -23
- package/common/src/API/leaderboardCalls.cjs +0 -1
- package/common/src/API/leaderboardCalls.mjs +0 -8
- package/common/src/API/referralsCalls.cjs +0 -1
- package/common/src/API/referralsCalls.mjs +0 -11
- package/common/src/API/send-telegram-callback.cjs +0 -1
- package/common/src/API/send-telegram-callback.mjs +0 -11
- package/common/src/constants/tasks.constants.cjs +0 -1
- package/common/src/constants/tasks.constants.mjs +0 -124
- package/common/src/crypto/ecdh-dual-path.cjs +0 -1
- package/common/src/crypto/ecdh-dual-path.mjs +0 -6
- package/common/src/data-structures/Hinkal/hinkalMultiSend.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalMultiSend.mjs +0 -12
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +0 -128
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +0 -1
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +0 -34
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -172
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -134
- package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -32
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TempoPublicTokensDB.mjs +0 -41
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +0 -47
- package/common/src/data-structures/TokenDBs/index.cjs +0 -1
- package/common/src/data-structures/TokenDBs/index.mjs +0 -6
- package/common/src/externalABIs/IQuoterV2.json.cjs +0 -1
- package/common/src/externalABIs/IQuoterV2.json.mjs +0 -203
- package/common/src/externalABIs/ISwapRouter.json.cjs +0 -1
- package/common/src/externalABIs/ISwapRouter.json.mjs +0 -537
- package/common/src/externalABIs/IUniswapV3Factory.json.cjs +0 -1
- package/common/src/externalABIs/IUniswapV3Factory.json.mjs +0 -188
- package/common/src/externalABIs/IUniswapV3Pool.json.cjs +0 -1
- package/common/src/externalABIs/IUniswapV3Pool.json.mjs +0 -938
- package/common/src/externalABIs/UniswapV2PoolAbi.json.cjs +0 -1
- package/common/src/externalABIs/UniswapV2PoolAbi.json.mjs +0 -78
- package/common/src/functions/pre-transaction/interaction-to-action.cjs +0 -1
- package/common/src/functions/pre-transaction/interaction-to-action.mjs +0 -1
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.cjs +0 -1
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.mjs +0 -32
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.cjs +0 -1
- package/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +0 -29
- package/common/src/functions/private-wallet/opProducer.cjs +0 -1
- package/common/src/functions/private-wallet/opProducer.mjs +0 -3
- package/common/src/functions/snarkjs/generateZkProofEnclave.cjs +0 -1
- package/common/src/functions/snarkjs/generateZkProofEnclave.mjs +0 -27
- package/common/src/functions/utils/bit.operations.cjs +0 -1
- package/common/src/functions/utils/bit.operations.mjs +0 -4
- package/common/src/functions/utils/get-signature-header.cjs +0 -1
- package/common/src/functions/utils/get-signature-header.mjs +0 -4
- package/common/src/functions/utils/ipfs.cjs +0 -1
- package/common/src/functions/utils/ipfs.mjs +0 -1
- package/common/src/functions/utils/reloadPage.cjs +0 -1
- package/common/src/functions/utils/reloadPage.mjs +0 -4
- package/common/src/functions/web3/getSolanaPriorityFee.cjs +0 -1
- package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -26
- package/common/src/functions/web3/odosAPI.cjs +0 -1
- package/common/src/functions/web3/odosAPI.mjs +0 -35
- package/common/src/functions/web3/oneInchAPI.cjs +0 -1
- package/common/src/functions/web3/oneInchAPI.mjs +0 -34
- package/common/src/functions/web3/uniswapAPI.cjs +0 -1
- package/common/src/functions/web3/uniswapAPI.mjs +0 -60
- package/common/src/types/new-rewards.type.cjs +0 -1
- package/common/src/types/new-rewards.type.mjs +0 -10
- package/common/src/types/scheduled-transactions.types.cjs +0 -1
- package/common/src/types/scheduled-transactions.types.mjs +0 -6
- package/common/src/webworker/logError-CZYZ3oyV.js +0 -2
- package/common/src/webworker/workerProxy-DPeuP2Mg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../functions/utils/caseInsensitive.utils.cjs`),t=require(`../../
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../functions/utils/caseInsensitive.utils.cjs`),t=require(`../../error-handling/logger.cjs`);require(`../../functions/index.cjs`);let n=require(`idb-keyval`);new class{STORAGE_KEY=`contacts`;checkForDuplicate(e,t,n){if(e.find(({ethereumAddress:e,nickname:r})=>(e===t.ethereumAddress||r===t.nickname)&&e!==n)!==void 0)throw Error(`Duplicate Contact attribute`)}async createContact(e,t){let r=e.toLowerCase();await(0,n.update)(this.STORAGE_KEY,e=>{let n=e??{},i=n[r]??[];return this.checkForDuplicate(i,t),i.push(t),n[r]=i,n})}async getContacts(e){try{let t=e.toLowerCase(),r=await(0,n.get)(this.STORAGE_KEY);return!r||!r[t]?[]:r[t]}catch(e){return t.Logger.error(`Error while getting contacts:`,e),[]}}async editContact(t,r,i){let a=t.toLowerCase();await(0,n.update)(this.STORAGE_KEY,t=>{let n=t??{},o=n[a];if(!n||!o)throw Error(`Contacts could not be fetched`);this.checkForDuplicate(o,i,r);let s=o.findIndex(({ethereumAddress:t})=>e.caseInsensitiveEqual(t,r));if(s===-1)throw Error(`Contact to be edited was not found`);return o[s]=i,n[a]=o,n})}async deleteContact(e,t){let r=e.toLowerCase();await(0,n.update)(this.STORAGE_KEY,e=>{let n=e??{},i=n[r];if(!n||!i)throw Error(`Contacts could not be fetched`);return n[r]=i.filter(({ethereumAddress:e})=>e!==t),n})}};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Contact } from '../../types/contacts.types';
|
|
2
|
+
declare class ContactStorage {
|
|
3
|
+
private readonly STORAGE_KEY;
|
|
4
|
+
private checkForDuplicate;
|
|
5
|
+
createContact(walletAddress: string, newContact: Contact): Promise<void>;
|
|
6
|
+
getContacts(walletAddress: string): Promise<Contact[]>;
|
|
7
|
+
editContact(walletAddress: string, oldContactAddress: string, editedContact: Contact): Promise<void>;
|
|
8
|
+
deleteContact(walletAddress: string, contactAddressToDelete: string): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare const contactStorage: ContactStorage;
|
|
11
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { caseInsensitiveEqual as e } from "../../functions/utils/caseInsensitive.utils.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
2
|
+
import { Logger as t } from "../../error-handling/logger.mjs";
|
|
4
3
|
import "../../functions/index.mjs";
|
|
5
|
-
import { get as
|
|
4
|
+
import { get as n, update as r } from "idb-keyval";
|
|
6
5
|
new class {
|
|
7
6
|
STORAGE_KEY = "contacts";
|
|
8
7
|
checkForDuplicate(e, t, n) {
|
|
@@ -10,46 +9,33 @@ new class {
|
|
|
10
9
|
}
|
|
11
10
|
async createContact(e, t) {
|
|
12
11
|
let n = e.toLowerCase();
|
|
13
|
-
await
|
|
12
|
+
await r(this.STORAGE_KEY, (e) => {
|
|
14
13
|
let r = e ?? {}, i = r[n] ?? [];
|
|
15
14
|
return this.checkForDuplicate(i, t), i.push(t), r[n] = i, r;
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
async getContacts(e) {
|
|
19
18
|
try {
|
|
20
|
-
await this.
|
|
21
|
-
|
|
22
|
-
return !n || !n[t] ? [] : n[t];
|
|
19
|
+
let t = e.toLowerCase(), r = await n(this.STORAGE_KEY);
|
|
20
|
+
return !r || !r[t] ? [] : r[t];
|
|
23
21
|
} catch (e) {
|
|
24
|
-
return
|
|
22
|
+
return t.error("Error while getting contacts:", e), [];
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
|
-
async editContact(t, n,
|
|
28
|
-
let
|
|
29
|
-
await
|
|
30
|
-
let
|
|
31
|
-
if (!
|
|
32
|
-
this.checkForDuplicate(o,
|
|
25
|
+
async editContact(t, n, i) {
|
|
26
|
+
let a = t.toLowerCase();
|
|
27
|
+
await r(this.STORAGE_KEY, (t) => {
|
|
28
|
+
let r = t ?? {}, o = r[a];
|
|
29
|
+
if (!r || !o) throw Error("Contacts could not be fetched");
|
|
30
|
+
this.checkForDuplicate(o, i, n);
|
|
33
31
|
let s = o.findIndex(({ ethereumAddress: t }) => e(t, n));
|
|
34
32
|
if (s === -1) throw Error("Contact to be edited was not found");
|
|
35
|
-
return o[s] =
|
|
33
|
+
return o[s] = i, r[a] = o, r;
|
|
36
34
|
});
|
|
37
35
|
}
|
|
38
|
-
async removeOldStylePrivateAddressContacts(e) {
|
|
39
|
-
let r = e.toLowerCase(), i = 0;
|
|
40
|
-
return await a(this.STORAGE_KEY, (e) => {
|
|
41
|
-
let a = e ?? {}, o = a[r];
|
|
42
|
-
if (!o?.length) return a;
|
|
43
|
-
let s = o.filter((e) => {
|
|
44
|
-
let r = e.ethereumAddress;
|
|
45
|
-
return !t(r) || n(r) ? !0 : (i += 1, !1);
|
|
46
|
-
});
|
|
47
|
-
return i === 0 || (a[r] = s), a;
|
|
48
|
-
}), i;
|
|
49
|
-
}
|
|
50
36
|
async deleteContact(e, t) {
|
|
51
37
|
let n = e.toLowerCase();
|
|
52
|
-
await
|
|
38
|
+
await r(this.STORAGE_KEY, (e) => {
|
|
53
39
|
let r = e ?? {}, i = r[n];
|
|
54
40
|
if (!r || !i) throw Error("Contacts could not be fetched");
|
|
55
41
|
return r[n] = i.filter(({ ethereumAddress: e }) => e !== t), r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./key-val-store.cjs`),require(`./activity-db.cjs`),require(`./balances-db.cjs`),require(`./private-balances-db.cjs`),require(`./prices-db.cjs`),require(`./contact-db.cjs`),require(`./signatures-db.cjs`),require(`./pay-activity-db.cjs`);
|
|
1
|
+
require(`./key-val-store.cjs`),require(`./activity-db.cjs`),require(`./balances-db.cjs`),require(`./private-balances-db.cjs`),require(`./prices-db.cjs`),require(`./contact-db.cjs`),require(`./signatures-db.cjs`),require(`./pay-activity-db.cjs`),require(`./scheduled-transactions-db.cjs`);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './key-val-store';
|
|
2
|
+
export * from './activity-db';
|
|
3
|
+
export * from './balances-db';
|
|
4
|
+
export * from './private-balances-db';
|
|
5
|
+
export * from './prices-db';
|
|
6
|
+
export * from './contact-db';
|
|
7
|
+
export * from './signatures-db';
|
|
8
|
+
export * from './pay-activity-db';
|
|
9
|
+
export * from './scheduled-transactions-db';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../functions/utils/serialize.utils.cjs`),t=require(`../../constants/vite.constants.cjs`);require(`../../constants/index.cjs`);const n=require(`../cacheDevices/FileCacheDevice.cjs`);var r=()=>typeof globalThis<`u`&&`indexedDB`in globalThis&&globalThis.indexedDB!=null||t.isReactNative,i=class{idbPromise=null;idb(){return this.idbPromise||=t.isReactNative?Promise.resolve(require(`idb-keyval`)):import(`idb-keyval`),this.idbPromise}async get(e){let{get:t}=await this.idb();return t(e)}async set(e,t){let{set:n}=await this.idb();await n(e,t)}async update(e,t){let{update:n}=await this.idb(),r;return await n(e,e=>(r=t(e),r)),r}},a=class{device;constructor(){let e=require(`path`);this.device=new n.FileCacheDevice(!0,e.resolve(process.cwd(),`hinkalKeyValCache.json`))}async get(t){let n=this.device.get(t);if(n)return e.CustomJSONParse(n)}async set(t,n){this.device.set(t,e.CustomJSONStringify(n))}async update(e,t){let n=t(await this.get(e));return await this.set(e,n),n}},o=r()?new i:new a;exports.keyValStore=o;
|
|
1
|
+
const e=require(`../../functions/utils/serialize.utils.cjs`),t=require(`../../constants/vite.constants.cjs`);require(`../../constants/index.cjs`);const n=require(`../cacheDevices/FileCacheDevice.cjs`);var r=()=>typeof globalThis<`u`&&`indexedDB`in globalThis&&globalThis.indexedDB!=null||t.isReactNative,i=class{idbPromise=null;idb(){return this.idbPromise||=t.isReactNative?Promise.resolve(require(`idb-keyval`)):import(`idb-keyval`),this.idbPromise}async get(e){let{get:t}=await this.idb();return t(e)}async set(e,t){let{set:n}=await this.idb();await n(e,t)}async del(e){let{del:t}=await this.idb();await t(e)}async clear(){let{clear:e}=await this.idb();await e()}async update(e,t){let{update:n}=await this.idb(),r;return await n(e,e=>(r=t(e),r)),r}},a=class{device;constructor(){let e=require(`path`);this.device=new n.FileCacheDevice(!0,e.resolve(process.cwd(),`hinkalKeyValCache.json`))}async get(t){let n=this.device.get(t);if(n)return e.CustomJSONParse(n)}async set(t,n){this.device.set(t,e.CustomJSONStringify(n))}async del(e){this.device.del(e)}async clear(){this.device.clear()}async update(e,t){let n=t(await this.get(e));return await this.set(e,n),n}},o=r()?new i:new a;exports.keyValStore=o;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface IKeyValStore {
|
|
2
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
3
|
+
set<T>(key: string, value: T): Promise<void>;
|
|
4
|
+
del(key: string): Promise<void>;
|
|
5
|
+
clear(): Promise<void>;
|
|
6
|
+
update<T>(key: string, updater: (current: T | undefined) => T): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
export declare const keyValStore: IKeyValStore;
|
|
@@ -17,6 +17,14 @@ var a = () => typeof globalThis < "u" && "indexedDB" in globalThis && globalThis
|
|
|
17
17
|
let { set: n } = await this.idb();
|
|
18
18
|
await n(e, t);
|
|
19
19
|
}
|
|
20
|
+
async del(e) {
|
|
21
|
+
let { del: t } = await this.idb();
|
|
22
|
+
await t(e);
|
|
23
|
+
}
|
|
24
|
+
async clear() {
|
|
25
|
+
let { clear: e } = await this.idb();
|
|
26
|
+
await e();
|
|
27
|
+
}
|
|
20
28
|
async update(e, t) {
|
|
21
29
|
let { update: n } = await this.idb(), r;
|
|
22
30
|
return await n(e, (e) => (r = t(e), r)), r;
|
|
@@ -34,6 +42,12 @@ var a = () => typeof globalThis < "u" && "indexedDB" in globalThis && globalThis
|
|
|
34
42
|
async set(e, t) {
|
|
35
43
|
this.device.set(e, n(t));
|
|
36
44
|
}
|
|
45
|
+
async del(e) {
|
|
46
|
+
this.device.del(e);
|
|
47
|
+
}
|
|
48
|
+
async clear() {
|
|
49
|
+
this.device.clear();
|
|
50
|
+
}
|
|
37
51
|
async update(e, t) {
|
|
38
52
|
let n = t(await this.get(e));
|
|
39
53
|
return await this.set(e, n), n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/cache.types.cjs`);require(`../../types/index.cjs`);const t=require(`./activity-db.cjs`);let n=require(`idb-keyval`);new class extends t.ActivityStorage{async savePrivateSendTx(t){let r=this.generateTxId(),i={timestamp:new Date,...t};return await(0,n.update)(e.StorageKeys.TX_ACTIVITY,(e={})=>(e[r]=i,e)),r}async saveMultiplePrivateSendTxs(e){let t=e.map(e=>this.savePrivateSendTx(e));return Promise.all(t)}async getTransactionRecords(){
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/cache.types.cjs`);require(`../../types/index.cjs`);const t=require(`./activity-db.cjs`);let n=require(`idb-keyval`);var r=e=>{let{token:t,amount:n,amountInDollar:r,...i}=e;return i.tokens?.length?{...i,tokens:[...i.tokens]}:t?{...i,tokens:[{token:t,amount:n??`0`,amountInDollar:r??`0`}]}:{...i,tokens:[]}},i=e=>[e.txHash,e.to?.toLowerCase(),e.activityType,e.sentFrom,e.sentTo].join(`-`),a=e=>{let t={...e},n=new Map,a=!1;return Object.entries(e).forEach(([e,o])=>{let s=r(o);if(s.tokens.length===0||(o.token&&(a=!0),t[e]=s,!s.txHash))return;let c=i(s),l=n.get(c);if(l===void 0){n.set(c,e);return}t[l].tokens.push(...s.tokens),delete t[e],a=!0}),{mergedRecords:t,needsWrite:a}};new class extends t.ActivityStorage{async savePrivateSendTx(t){let r=this.generateTxId(),i={timestamp:new Date,...t};return await(0,n.update)(e.StorageKeys.TX_ACTIVITY,(e={})=>(e[r]=i,e)),r}async saveMultiplePrivateSendTxs(e){let t=e.map(e=>this.savePrivateSendTx(e));return Promise.all(t)}async getTransactionRecords(){let t=await(0,n.get)(e.StorageKeys.TX_ACTIVITY);if(!t)return[];let i=a(t);return i.needsWrite&&await(0,n.update)(e.StorageKeys.TX_ACTIVITY,(e={})=>(i=a(e),i.mergedRecords)),Object.values(i.mergedRecords).map(r).filter(e=>e.tokens.length>0)}};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PayActivity, PayActivityAddRequest } from '../../types';
|
|
2
|
+
import { ActivityStorage } from './activity-db';
|
|
3
|
+
declare class PayActivityStorage extends ActivityStorage {
|
|
4
|
+
savePrivateSendTx(txRequest: PayActivityAddRequest): Promise<string>;
|
|
5
|
+
saveMultiplePrivateSendTxs(txRequests: PayActivityAddRequest[]): Promise<string[]>;
|
|
6
|
+
getTransactionRecords(): Promise<PayActivity[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare const payActivityStorage: PayActivityStorage;
|
|
9
|
+
export {};
|
|
@@ -2,6 +2,45 @@ import { StorageKeys as e } from "../../types/cache.types.mjs";
|
|
|
2
2
|
import "../../types/index.mjs";
|
|
3
3
|
import { ActivityStorage as t } from "./activity-db.mjs";
|
|
4
4
|
import { get as n, update as r } from "idb-keyval";
|
|
5
|
+
//#region libs/shared/common/src/data-structures/IndexedDB/pay-activity-db.ts
|
|
6
|
+
var i = (e) => {
|
|
7
|
+
let { token: t, amount: n, amountInDollar: r, ...i } = e;
|
|
8
|
+
return i.tokens?.length ? {
|
|
9
|
+
...i,
|
|
10
|
+
tokens: [...i.tokens]
|
|
11
|
+
} : t ? {
|
|
12
|
+
...i,
|
|
13
|
+
tokens: [{
|
|
14
|
+
token: t,
|
|
15
|
+
amount: n ?? "0",
|
|
16
|
+
amountInDollar: r ?? "0"
|
|
17
|
+
}]
|
|
18
|
+
} : {
|
|
19
|
+
...i,
|
|
20
|
+
tokens: []
|
|
21
|
+
};
|
|
22
|
+
}, a = (e) => [
|
|
23
|
+
e.txHash,
|
|
24
|
+
e.to?.toLowerCase(),
|
|
25
|
+
e.activityType,
|
|
26
|
+
e.sentFrom,
|
|
27
|
+
e.sentTo
|
|
28
|
+
].join("-"), o = (e) => {
|
|
29
|
+
let t = { ...e }, n = /* @__PURE__ */ new Map(), r = !1;
|
|
30
|
+
return Object.entries(e).forEach(([e, o]) => {
|
|
31
|
+
let s = i(o);
|
|
32
|
+
if (s.tokens.length === 0 || (o.token && (r = !0), t[e] = s, !s.txHash)) return;
|
|
33
|
+
let c = a(s), l = n.get(c);
|
|
34
|
+
if (l === void 0) {
|
|
35
|
+
n.set(c, e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
t[l].tokens.push(...s.tokens), delete t[e], r = !0;
|
|
39
|
+
}), {
|
|
40
|
+
mergedRecords: t,
|
|
41
|
+
needsWrite: r
|
|
42
|
+
};
|
|
43
|
+
};
|
|
5
44
|
new class extends t {
|
|
6
45
|
async savePrivateSendTx(t) {
|
|
7
46
|
let n = this.generateTxId(), i = {
|
|
@@ -15,7 +54,10 @@ new class extends t {
|
|
|
15
54
|
return Promise.all(t);
|
|
16
55
|
}
|
|
17
56
|
async getTransactionRecords() {
|
|
18
|
-
|
|
57
|
+
let t = await n(e.TX_ACTIVITY);
|
|
58
|
+
if (!t) return [];
|
|
59
|
+
let a = o(t);
|
|
60
|
+
return a.needsWrite && await r(e.TX_ACTIVITY, (e = {}) => (a = o(e), a.mergedRecords)), Object.values(a.mergedRecords).map(i).filter((e) => e.tokens.length > 0);
|
|
19
61
|
}
|
|
20
62
|
}();
|
|
21
63
|
//#endregion
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare class PricesStorage {
|
|
2
|
+
readonly tokenPricesRecordLabel = "tokenPrices";
|
|
3
|
+
getPrices(): Promise<Record<string, number> | undefined>;
|
|
4
|
+
updatePrices(chainId: number, erc20Addresses: string[]): Promise<number[]>;
|
|
5
|
+
getAndUpdatePrices(currentChainId: number, erc20Addresses: string[]): Promise<number[]>;
|
|
6
|
+
updateCachedPricesByChain(chainId: number): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const pricesStorage: PricesStorage;
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../functions/utils/string.utils.cjs`),t=require(`./key-val-store.cjs`);var n=new class{balancesRecordLabel=`privateWalletsBalances`;async getBalances(){return t.keyValStore.get(this.balancesRecordLabel)}async getBalancesByWallet(t,n){let r=await this.getBalances();if(r)return r[e.getStateKey(t,n,!0)]}async setBalances(n,r,i){let a=e.getStateKey(n,r,!0);await t.keyValStore.update(this.balancesRecordLabel,(e={})=>({...e,[a]:i}))}};exports.privateBalancesStorage=n;
|
|
1
|
+
const e=require(`../../functions/utils/string.utils.cjs`),t=require(`./key-val-store.cjs`);var n=new class{balancesRecordLabel=`privateWalletsBalances`;async getBalances(){return t.keyValStore.get(this.balancesRecordLabel)}async getBalancesByWallet(t,n){let r=await this.getBalances();if(r)return r[e.getStateKey(t,n,!0)]}async setBalances(n,r,i){let a=e.getStateKey(n,r,!0);await t.keyValStore.update(this.balancesRecordLabel,(e={})=>({...e,[a]:i}))}async del(){await t.keyValStore.del(this.balancesRecordLabel)}};exports.privateBalancesStorage=n;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TokenBalance } from '../../types/token.types';
|
|
2
|
+
declare class PrivateBalancesStorage {
|
|
3
|
+
readonly balancesRecordLabel = "privateWalletsBalances";
|
|
4
|
+
getBalances(): Promise<Record<string, TokenBalance[]> | undefined>;
|
|
5
|
+
getBalancesByWallet(address: string, chainId: number): Promise<TokenBalance[] | undefined>;
|
|
6
|
+
setBalances(address: string, chainId: number, newBalances: TokenBalance[]): Promise<void>;
|
|
7
|
+
del(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare const privateBalancesStorage: PrivateBalancesStorage;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../functions/utils/tron.utils.cjs`);const e=require(`../../types/cache.types.cjs`),t=require(`./key-val-store.cjs`);new class{scheduledTransactionsRecordLabel=e.StorageKeys.SCHEDULED_TRANSACTIONS;async getAll(){return t.keyValStore.get(this.scheduledTransactionsRecordLabel)}async getByAddress(e){let t=await this.getAll();return t?t[e]??[]:[]}async saveScheduledTransaction(e,n){await t.keyValStore.update(this.scheduledTransactionsRecordLabel,(t={})=>({...t,[e]:[...t[e]??[],n]}))}async updateLegs(e,n,r){await t.keyValStore.update(this.scheduledTransactionsRecordLabel,(t={})=>({...t,[e]:(t[e]??[]).map(e=>e.scheduleId===n?{...e,legs:e.legs.map((e,t)=>r[t]?{...e,status:r[t].status,scheduledTime:r[t].scheduledTime,txHash:r[t].txHash}:e)}:e)}))}};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScheduledTransactionCacheEntry, ScheduledTransactionItemStatus } from '../../types/scheduled-transactions.types';
|
|
2
|
+
export declare const getScheduledTransactionCacheAddressKey: (address: string, isSignedIn: boolean, isSolana: boolean) => string;
|
|
3
|
+
declare class ScheduledTransactionsStorage {
|
|
4
|
+
private readonly scheduledTransactionsRecordLabel;
|
|
5
|
+
private getAll;
|
|
6
|
+
getByAddress(addressKey: string): Promise<ScheduledTransactionCacheEntry[]>;
|
|
7
|
+
saveScheduledTransaction(addressKey: string, entry: ScheduledTransactionCacheEntry): Promise<void>;
|
|
8
|
+
updateLegs(addressKey: string, scheduleId: string, polledLegs: ScheduledTransactionItemStatus[]): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare const scheduledTransactionsStorage: ScheduledTransactionsStorage;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "../../functions/utils/tron.utils.mjs";
|
|
2
|
+
import { StorageKeys as e } from "../../types/cache.types.mjs";
|
|
3
|
+
import { keyValStore as t } from "./key-val-store.mjs";
|
|
4
|
+
new class {
|
|
5
|
+
scheduledTransactionsRecordLabel = e.SCHEDULED_TRANSACTIONS;
|
|
6
|
+
async getAll() {
|
|
7
|
+
return t.get(this.scheduledTransactionsRecordLabel);
|
|
8
|
+
}
|
|
9
|
+
async getByAddress(e) {
|
|
10
|
+
let t = await this.getAll();
|
|
11
|
+
return t ? t[e] ?? [] : [];
|
|
12
|
+
}
|
|
13
|
+
async saveScheduledTransaction(e, n) {
|
|
14
|
+
await t.update(this.scheduledTransactionsRecordLabel, (t = {}) => ({
|
|
15
|
+
...t,
|
|
16
|
+
[e]: [...t[e] ?? [], n]
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
async updateLegs(e, n, r) {
|
|
20
|
+
await t.update(this.scheduledTransactionsRecordLabel, (t = {}) => ({
|
|
21
|
+
...t,
|
|
22
|
+
[e]: (t[e] ?? []).map((e) => e.scheduleId === n ? {
|
|
23
|
+
...e,
|
|
24
|
+
legs: e.legs.map((e, t) => r[t] ? {
|
|
25
|
+
...e,
|
|
26
|
+
status: r[t].status,
|
|
27
|
+
scheduledTime: r[t].scheduledTime,
|
|
28
|
+
txHash: r[t].txHash
|
|
29
|
+
} : e)
|
|
30
|
+
} : e)
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
}();
|
|
34
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../error-handling/logger.cjs`),t=require(`../../types/cache.types.cjs`);require(`../../types/index.cjs`),require(`../../error-handling/index.cjs`);let n=require(`idb-keyval`);new class{generateMessageId(){return`msg_${new Date().getTime()}_${Math.random().toString(36).substring(2,15)}`}async saveSignedMessage(r,i,a,o,s,c){try{let e=this.generateMessageId(),l=await(0,n.get)(t.StorageKeys.SIGNED_MESSAGES)||{},u={chainId:r,messageText:i,messageType:a,subAccountAddress:o,signature:s,appMetaData:c};l[e]={timestamp:new Date().toISOString(),...u},await(0,n.set)(t.StorageKeys.SIGNED_MESSAGES,l)}catch(t){e.Logger.error(`Failed to save signed message:`,t,{chainId:r,messageType:a})}}async getAllSignedMessages(){try{let e=await(0,n.get)(t.StorageKeys.SIGNED_MESSAGES)||{};return Object.values(e).sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime())}catch(t){return e.Logger.error(`Failed to retrieve signed messages:`,t),[]}}};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConfirmationRequestType } from '../../types/confirmation-request.types';
|
|
2
|
+
import { AppMetaData } from '../../types/wc.types';
|
|
3
|
+
import { SignedMessage } from '../../types';
|
|
4
|
+
declare class SignedMessagesStorage {
|
|
5
|
+
private generateMessageId;
|
|
6
|
+
saveSignedMessage(chainId: number, messageText: string, messageType: ConfirmationRequestType.PERSONAL_SIGN | ConfirmationRequestType.SIGN_TYPE_V4, subAccountAddress: string, signature: string, appMetaData: AppMetaData): Promise<void>;
|
|
7
|
+
getAllSignedMessages(): Promise<SignedMessage[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare const signedMessagesStorage: SignedMessagesStorage;
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Logger as e } from "../../error-handling/logger.mjs";
|
|
2
|
+
import { StorageKeys as t } from "../../types/cache.types.mjs";
|
|
2
3
|
import "../../types/index.mjs";
|
|
3
|
-
import { Logger as t } from "../../error-handling/logger.mjs";
|
|
4
4
|
import "../../error-handling/index.mjs";
|
|
5
5
|
import { get as n, set as r } from "idb-keyval";
|
|
6
6
|
new class {
|
|
@@ -9,7 +9,7 @@ new class {
|
|
|
9
9
|
}
|
|
10
10
|
async saveSignedMessage(i, a, o, s, c, l) {
|
|
11
11
|
try {
|
|
12
|
-
let
|
|
12
|
+
let e = this.generateMessageId(), u = await n(t.SIGNED_MESSAGES) || {}, d = {
|
|
13
13
|
chainId: i,
|
|
14
14
|
messageText: a,
|
|
15
15
|
messageType: o,
|
|
@@ -17,12 +17,12 @@ new class {
|
|
|
17
17
|
signature: c,
|
|
18
18
|
appMetaData: l
|
|
19
19
|
};
|
|
20
|
-
u[
|
|
20
|
+
u[e] = {
|
|
21
21
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
22
22
|
...d
|
|
23
|
-
}, await r(
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
}, await r(t.SIGNED_MESSAGES, u);
|
|
24
|
+
} catch (t) {
|
|
25
|
+
e.error("Failed to save signed message:", t, {
|
|
26
26
|
chainId: i,
|
|
27
27
|
messageType: o
|
|
28
28
|
});
|
|
@@ -30,10 +30,10 @@ new class {
|
|
|
30
30
|
}
|
|
31
31
|
async getAllSignedMessages() {
|
|
32
32
|
try {
|
|
33
|
-
let
|
|
34
|
-
return Object.values(
|
|
35
|
-
} catch (
|
|
36
|
-
return
|
|
33
|
+
let e = await n(t.SIGNED_MESSAGES) || {};
|
|
34
|
+
return Object.values(e).sort((e, t) => new Date(t.timestamp).getTime() - new Date(e.timestamp).getTime());
|
|
35
|
+
} catch (t) {
|
|
36
|
+
return e.error("Failed to retrieve signed messages:", t), [];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/vite.constants.cjs`),t=require(`../crypto-keys/keys.cjs`),n=require(`../utxo/Utxo.cjs`),r=require(`../../webworker/worker.registry.cjs`),i=require(`../../webworker/performTaskWithWorker.cjs`),a=require(`../../webworker/utxoWorker/utxoWorker.types.cjs`);var o=16,s=class{NUM_WORKERS;NUM_WORKERS_BATCH_PROCESS;constructor(){e.isNode?(this.NUM_WORKERS=1,this.NUM_WORKERS_BATCH_PROCESS=1):(this.NUM_WORKERS=3,this.NUM_WORKERS_BATCH_PROCESS=Math.min(o,Math.ceil(navigator.deviceMemory??4)))}async createUtxoPromise(e){return await i.performTaskWithWorker({type:r.WorkerVariant.UTXO,payload:e})}async batchFilterUtxosWithNullifier(e,r){let i=this.sliceArrayIntoParts(e,this.NUM_WORKERS).map(e=>this.createUtxoPromise({type:a.UtxoWorkerActionType.BATCH_FILTER_UTXOS_WITH_NULLIFIER,data:{utxos:e.map(e=>e.getConstructableParams()),nullifiers:r}})),o=await Promise.all(i);return o.forEach(e=>{t.stealthPairCacheDevice.mergeWithSerialized(e.stealthPairCache)
|
|
1
|
+
const e=require(`../../constants/vite.constants.cjs`),t=require(`../crypto-keys/keys.cjs`),n=require(`../utxo/Utxo.cjs`),r=require(`../../webworker/worker.registry.cjs`),i=require(`../../webworker/performTaskWithWorker.cjs`),a=require(`../../webworker/utxoWorker/utxoWorker.types.cjs`);var o=16,s=class{NUM_WORKERS;NUM_WORKERS_BATCH_PROCESS;constructor(){e.isNode?(this.NUM_WORKERS=1,this.NUM_WORKERS_BATCH_PROCESS=1):(this.NUM_WORKERS=3,this.NUM_WORKERS_BATCH_PROCESS=Math.min(o,Math.ceil(navigator.deviceMemory??4)))}keyMaterialFor(e){return e.hasSignature()?{signature:e.getSignature()}:{nullifyingKey:e.getShieldedPrivateKey()}}async createUtxoPromise(e){return await i.performTaskWithWorker({type:r.WorkerVariant.UTXO,payload:e})}async batchFilterUtxosWithNullifier(e,r){let i=this.sliceArrayIntoParts(e,this.NUM_WORKERS).map(e=>this.createUtxoPromise({type:a.UtxoWorkerActionType.BATCH_FILTER_UTXOS_WITH_NULLIFIER,data:{utxos:e.map(e=>e.getConstructableParams()),nullifiers:r}})),o=await Promise.all(i);return o.forEach(e=>{t.stealthPairCacheDevice.mergeWithSerialized(e.stealthPairCache)}),o.flatMap(e=>e.utxoConstructors).map(e=>new n.Utxo(e))}async buildBatchProcess(e,t,r){let i=this.sliceArrayIntoParts(e,this.NUM_WORKERS).map(e=>this.createUtxoPromise({type:a.UtxoWorkerActionType.BUILD_UTXOS,data:{...this.keyMaterialFor(t),encryptedOutputs:e,chainId:r}}));return(await Promise.all(i)).flat().map(e=>new n.Utxo(e))}sliceArrayIntoParts(e,t){let n=Math.ceil(e.length/t);return Array.from({length:t},(t,r)=>e.slice(n*r,n*(r+1))).filter(e=>e.length>0)}findLastOutput(e,t){let n=t;return e.forEach(e=>{e!==t&&(n=e)}),n}async batchProcess(e,t,n,r){let i=this.sliceArrayIntoParts(e,this.NUM_WORKERS_BATCH_PROCESS),o=this.keyMaterialFor(n),s=i.map(e=>{let n={type:a.UtxoWorkerActionType.DECIPHER_OUTPUTS,data:{encryptedOutputs:e,lastOutput:t,...o,chainId:r}};return this.createUtxoPromise(n)}),c=await Promise.all(s),l=c.map(({additionalEncryptedOutputs:e})=>e).flat(),u=new Set;return{additionalEncryptedOutputs:l.reduce((e,t)=>u.has(t.value)?e:(u.add(t.value),[...e,t]),[]),lastOutput:this.findLastOutput(c.map(e=>e.lastOutput),t)??t}}};exports.MultiThreadedUtxoUtils=s;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EncryptedOutputWithSign, OutputsWithSignAndLast } from '../../types/commitments.types';
|
|
2
|
+
import { IMultiThreadedUtxoUtils } from '../../types/IMultiThreadedUtxoUtils';
|
|
3
|
+
import { UserKeys } from '../crypto-keys/keys';
|
|
4
|
+
import { Utxo } from '../utxo/Utxo';
|
|
5
|
+
declare global {
|
|
6
|
+
interface Navigator {
|
|
7
|
+
deviceMemory: number | undefined;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class MultiThreadedUtxoUtils implements IMultiThreadedUtxoUtils {
|
|
11
|
+
readonly NUM_WORKERS: number;
|
|
12
|
+
readonly NUM_WORKERS_BATCH_PROCESS: number;
|
|
13
|
+
constructor();
|
|
14
|
+
private keyMaterialFor;
|
|
15
|
+
private createUtxoPromise;
|
|
16
|
+
batchFilterUtxosWithNullifier(allUtxos: Utxo[], nullifiers: Set<string>): Promise<Utxo[]>;
|
|
17
|
+
buildBatchProcess(encryptedOutputs: EncryptedOutputWithSign[], userKeys: UserKeys, chainId: number): Promise<Utxo[]>;
|
|
18
|
+
private sliceArrayIntoParts;
|
|
19
|
+
findLastOutput(lastOutputsArray: string[], lastOutput: string): string;
|
|
20
|
+
batchProcess(encryptedOutputs: EncryptedOutputWithSign[], lastOutput: string, userKeys: UserKeys, chainId: number): Promise<OutputsWithSignAndLast<boolean>>;
|
|
21
|
+
}
|
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
import { isNode as e } from "../../constants/vite.constants.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { Utxo as
|
|
4
|
-
import { WorkerVariant as
|
|
5
|
-
import { performTaskWithWorker as
|
|
6
|
-
import { UtxoWorkerActionType as
|
|
2
|
+
import { stealthPairCacheDevice as t } from "../crypto-keys/keys.mjs";
|
|
3
|
+
import { Utxo as n } from "../utxo/Utxo.mjs";
|
|
4
|
+
import { WorkerVariant as r } from "../../webworker/worker.registry.mjs";
|
|
5
|
+
import { performTaskWithWorker as i } from "../../webworker/performTaskWithWorker.mjs";
|
|
6
|
+
import { UtxoWorkerActionType as a } from "../../webworker/utxoWorker/utxoWorker.types.mjs";
|
|
7
7
|
//#region libs/shared/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.ts
|
|
8
|
-
var
|
|
8
|
+
var o = 16, s = class {
|
|
9
9
|
NUM_WORKERS;
|
|
10
10
|
NUM_WORKERS_BATCH_PROCESS;
|
|
11
11
|
constructor() {
|
|
12
|
-
e ? (this.NUM_WORKERS = 1, this.NUM_WORKERS_BATCH_PROCESS = 1) : (this.NUM_WORKERS = 3, this.NUM_WORKERS_BATCH_PROCESS = Math.min(
|
|
12
|
+
e ? (this.NUM_WORKERS = 1, this.NUM_WORKERS_BATCH_PROCESS = 1) : (this.NUM_WORKERS = 3, this.NUM_WORKERS_BATCH_PROCESS = Math.min(o, Math.ceil(navigator.deviceMemory ?? 4)));
|
|
13
|
+
}
|
|
14
|
+
keyMaterialFor(e) {
|
|
15
|
+
return e.hasSignature() ? { signature: e.getSignature() } : { nullifyingKey: e.getShieldedPrivateKey() };
|
|
13
16
|
}
|
|
14
17
|
async createUtxoPromise(e) {
|
|
15
|
-
return await
|
|
16
|
-
type:
|
|
18
|
+
return await i({
|
|
19
|
+
type: r.UTXO,
|
|
17
20
|
payload: e
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
|
-
async batchFilterUtxosWithNullifier(e,
|
|
21
|
-
let
|
|
22
|
-
type:
|
|
23
|
+
async batchFilterUtxosWithNullifier(e, r) {
|
|
24
|
+
let i = this.sliceArrayIntoParts(e, this.NUM_WORKERS).map((e) => this.createUtxoPromise({
|
|
25
|
+
type: a.BATCH_FILTER_UTXOS_WITH_NULLIFIER,
|
|
23
26
|
data: {
|
|
24
27
|
utxos: e.map((e) => e.getConstructableParams()),
|
|
25
|
-
nullifiers:
|
|
28
|
+
nullifiers: r
|
|
26
29
|
}
|
|
27
|
-
})),
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}),
|
|
30
|
+
})), o = await Promise.all(i);
|
|
31
|
+
return o.forEach((e) => {
|
|
32
|
+
t.mergeWithSerialized(e.stealthPairCache);
|
|
33
|
+
}), o.flatMap((e) => e.utxoConstructors).map((e) => new n(e));
|
|
31
34
|
}
|
|
32
|
-
async buildBatchProcess(e, t,
|
|
35
|
+
async buildBatchProcess(e, t, r) {
|
|
33
36
|
let i = this.sliceArrayIntoParts(e, this.NUM_WORKERS).map((e) => this.createUtxoPromise({
|
|
34
|
-
type:
|
|
37
|
+
type: a.BUILD_UTXOS,
|
|
35
38
|
data: {
|
|
36
|
-
|
|
39
|
+
...this.keyMaterialFor(t),
|
|
37
40
|
encryptedOutputs: e,
|
|
38
|
-
chainId:
|
|
41
|
+
chainId: r
|
|
39
42
|
}
|
|
40
43
|
}));
|
|
41
|
-
return (await Promise.all(i)).flat().map((e) => new
|
|
44
|
+
return (await Promise.all(i)).flat().map((e) => new n(e));
|
|
42
45
|
}
|
|
43
46
|
sliceArrayIntoParts(e, t) {
|
|
44
47
|
let n = Math.ceil(e.length / t);
|
|
@@ -51,13 +54,13 @@ var s = 16, c = class {
|
|
|
51
54
|
}), n;
|
|
52
55
|
}
|
|
53
56
|
async batchProcess(e, t, n, r) {
|
|
54
|
-
let i = this.sliceArrayIntoParts(e, this.NUM_WORKERS_BATCH_PROCESS),
|
|
57
|
+
let i = this.sliceArrayIntoParts(e, this.NUM_WORKERS_BATCH_PROCESS), o = this.keyMaterialFor(n), s = i.map((e) => {
|
|
55
58
|
let n = {
|
|
56
|
-
type:
|
|
59
|
+
type: a.DECIPHER_OUTPUTS,
|
|
57
60
|
data: {
|
|
58
61
|
encryptedOutputs: e,
|
|
59
62
|
lastOutput: t,
|
|
60
|
-
|
|
63
|
+
...o,
|
|
61
64
|
chainId: r
|
|
62
65
|
}
|
|
63
66
|
};
|
|
@@ -70,4 +73,4 @@ var s = 16, c = class {
|
|
|
70
73
|
}
|
|
71
74
|
};
|
|
72
75
|
//#endregion
|
|
73
|
-
export {
|
|
76
|
+
export { s as MultiThreadedUtxoUtils };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
import { IPublicTokensDB } from './IPublicTokensDB';
|
|
3
|
+
export declare class AlchemyPublicTokensDB implements IPublicTokensDB {
|
|
4
|
+
private fetchedTokens;
|
|
5
|
+
private readonly KNOWN_GOOD_NFTS;
|
|
6
|
+
private isWhitelistedNFT;
|
|
7
|
+
getPublicTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
8
|
+
getFetchedTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
9
|
+
fetchAndUpdatePublicTokens(walletAddress: string, chainId: number): Promise<void>;
|
|
10
|
+
private fetchAndUpdateSolanaTokens;
|
|
11
|
+
getWalletTokenAddresses(chainId: number, walletAddress: string): Promise<string[]>;
|
|
12
|
+
private fetchAndUpdateEVMTokens;
|
|
13
|
+
private getSolanaTokenAddresses;
|
|
14
|
+
private getNFTAddresses;
|
|
15
|
+
private getEVMTokenAddresses;
|
|
16
|
+
private getNFTTokens;
|
|
17
|
+
}
|
|
18
|
+
export declare const alchemyPublicTokensDB: AlchemyPublicTokensDB;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
export declare class ArcPublicTokensDB {
|
|
3
|
+
private readonly API_BASE;
|
|
4
|
+
private fetchedTokens;
|
|
5
|
+
getPublicTokens(walletAddress: string): Promise<ERC20Token[]>;
|
|
6
|
+
getFetchedTokens(walletAddress: string): ERC20Token[];
|
|
7
|
+
fetchAndUpdatePublicTokens(walletAddress: string): Promise<void>;
|
|
8
|
+
private getERC20TokenAddresses;
|
|
9
|
+
private getNFTTokens;
|
|
10
|
+
}
|
|
11
|
+
export declare const arcPublicTokensDB: ArcPublicTokensDB;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
import { IPublicTokensDB } from './IPublicTokensDB';
|
|
3
|
+
export declare class EventsPublicTokensDB implements IPublicTokensDB {
|
|
4
|
+
private fetchedTokens;
|
|
5
|
+
private updateMutexes;
|
|
6
|
+
private readonly transferEventTopic;
|
|
7
|
+
private readonly chunkSize;
|
|
8
|
+
private getMutex;
|
|
9
|
+
getPublicTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
10
|
+
getFetchedTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
11
|
+
fetchAndUpdatePublicTokens(walletAddress: string, chainId: number): Promise<void>;
|
|
12
|
+
private getLastProcessedBlock;
|
|
13
|
+
private updateLastProcessedBlock;
|
|
14
|
+
private getEvents;
|
|
15
|
+
private updateTokenIds;
|
|
16
|
+
private fetchPublicTokens;
|
|
17
|
+
}
|
|
18
|
+
export declare const eventsPublicTokensDB: EventsPublicTokensDB;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
export interface IPublicTokensDB {
|
|
3
|
+
getPublicTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
4
|
+
getFetchedTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
5
|
+
fetchAndUpdatePublicTokens(walletAddress: string, chainId: number): Promise<void>;
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../functions/utils/caseInsensitive.utils.cjs`),t=require(`../../
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../functions/utils/caseInsensitive.utils.cjs`),t=require(`../../error-handling/logger.cjs`),n=require(`../../types/cache.types.cjs`),r=require(`../../API/API.cjs`),i=require(`../../functions/utils/string.utils.cjs`),a=require(`./token-visibility-db.cjs`);let o=require(`idb-keyval`);var s=new class{fetchedTokens={};initalFetched=!1;async updateFetchedTokens(){let e=await(0,o.get)(n.StorageKeys.PRIVATE_TOKENS);this.fetchedTokens=e??{},this.initalFetched=!0}async getPrivateTokens(e,t){let r=i.getStateKey(t,e);return(await(0,o.get)(n.StorageKeys.PRIVATE_TOKENS))?.[r]||[]}async fetchPrivateTokens(n,i,a){try{let t=[...new Set(i)].filter(t=>t&&!e.lowerCaseIncludes(a,t));if(!t.length)return[];let o=(await r.API.tokensInfoCall(n,t)).filter(e=>!!e),s=new Map;return o.forEach(e=>{s.set(e.erc20TokenAddress.toLowerCase(),e)}),Array.from(s.values())}catch(e){return t.Logger.error(`Error fetching private tokens:`,e),[]}}async fetchAndUpdatePrivateTokens(t,r,s,c){let l=(await this.getPrivateTokens(r,s)).map(e=>e.erc20TokenAddress),u=c??await this.fetchPrivateTokens(r,t,l),d=await a.tokenVisibilityStorage.hideSpamsAndFetchHiddenTokensAddresses(r,u),f=i.getStateKey(s,r);await(0,o.update)(n.StorageKeys.PRIVATE_TOKENS,(t={})=>{let n=t?.[f]||[],r=n.map(e=>e.erc20TokenAddress),i=u.filter(t=>!e.lowerCaseIncludes(r,t.erc20TokenAddress));n.push(...i);let a=n.filter(t=>!e.lowerCaseIncludes(d,t.erc20TokenAddress)),o={...t,[f]:a};return this.fetchedTokens=o,o})}getFetchedTokens(e,t){let n=i.getStateKey(t,e);return this.fetchedTokens[n]||[]}};exports.privateTokensDB=s;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ERC20Token } from '../../types/token.types';
|
|
2
|
+
export declare class PrivateTokensDB {
|
|
3
|
+
private fetchedTokens;
|
|
4
|
+
initalFetched: boolean;
|
|
5
|
+
updateFetchedTokens(): Promise<void>;
|
|
6
|
+
getPrivateTokens(chainId: number, walletAddress: string): Promise<ERC20Token[]>;
|
|
7
|
+
private fetchPrivateTokens;
|
|
8
|
+
fetchAndUpdatePrivateTokens(erc20Addresses: string[], chainId: number, walletAddress: string, preFetchedTokens?: ERC20Token[]): Promise<void>;
|
|
9
|
+
getFetchedTokens(chainId: number, walletAddress: string): ERC20Token[];
|
|
10
|
+
}
|
|
11
|
+
export declare const privateTokensDB: PrivateTokensDB;
|