h_test_1 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API/API.mjs +1 -1
- package/API/accessCodeCalls.mjs +1 -1
- package/API/admin-calls.mjs +1 -1
- package/API/brotherhoodCalls.mjs +1 -1
- package/API/callLifiAPI.mjs +1 -1
- package/API/callMonitor.mjs +1 -1
- package/API/callOdosAPI.mjs +1 -1
- package/API/callOkxAPI.mjs +1 -1
- package/API/callOneInchAPI.mjs +1 -1
- package/API/callRelayer.mjs +1 -1
- package/API/checkRisk.mjs +1 -1
- package/API/deposit-and-withdraw-status-calls.mjs +1 -1
- package/API/enclaveSignatureCalls.mjs +1 -1
- package/API/enclaveUtxoCalls.mjs +1 -1
- package/API/fetchCommitmentsCache.mjs +1 -1
- package/API/generate-trading-points.mjs +1 -1
- package/API/get-token-data.mjs +1 -1
- package/API/get-token-price-chart-data.mjs +1 -1
- package/API/getCoingeckoPrice.mjs +1 -1
- package/API/getGasEstimates.mjs +1 -1
- package/API/getServerURL.mjs +1 -1
- package/API/getTokenPrice.mjs +1 -1
- package/API/getWebsiteURL.mjs +1 -1
- package/API/kycCalls.mjs +1 -1
- package/API/leaderboardCalls.mjs +1 -1
- package/API/onrampCalls.mjs +1 -1
- package/API/privacy-score-calls.mjs +1 -1
- package/API/privateSendEmailNotificationsCalls.mjs +1 -1
- package/API/privateSendNonceCalls.mjs +1 -1
- package/API/privateSendRecipientInfoCalls.mjs +1 -1
- package/API/proxyAccountsCalls.mjs +1 -1
- package/API/referralsCalls.mjs +1 -1
- package/API/relayCalls.mjs +1 -1
- package/API/resolve-sns.mjs +1 -1
- package/API/rewardsUserCalls.mjs +1 -1
- package/API/scheduled-transactions-calls.mjs +1 -1
- package/API/seedless-calls.mjs +1 -1
- package/API/send-telegram-callback.mjs +1 -1
- package/API/simulate-batch-tx.mjs +1 -1
- package/API/simulate-transaction.mjs +1 -1
- package/API/snapshot-event-calls.mjs +1 -1
- package/API/solana-calls.mjs +1 -1
- package/API/temporaryWalletCalls.mjs +1 -1
- package/API/tenderly.api.mjs +1 -1
- package/API/token-calls.mjs +1 -1
- package/API/tronSubsidyCalls.mjs +1 -1
- package/API/weeklyAnalyticCalls.mjs +1 -1
- package/constants/activity.constants.mjs +1 -1
- package/constants/addresses.constants.mjs +1 -1
- package/constants/assets.constants.mjs +1 -1
- package/constants/backend.constants.mjs +1 -1
- package/constants/balance.constants.mjs +1 -1
- package/constants/bridging.constants.mjs +1 -1
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.mjs +118 -120
- package/constants/coingecko.constants.mjs +1 -1
- package/constants/contracts.constants.mjs +1 -1
- package/constants/conversion.constants.mjs +1 -1
- package/constants/deploy-data/index.d.ts +1 -3
- package/constants/events.constants.mjs +1 -1
- package/constants/fees.constants.mjs +1 -1
- package/constants/function-signatures.constants.mjs +1 -1
- package/constants/images.constants.mjs +1 -1
- package/constants/index.cjs +1 -1
- package/constants/index.mjs +0 -2
- package/constants/kyc.constants.mjs +1 -1
- package/constants/lifi.constants.mjs +1 -1
- package/constants/link.constant.mjs +1 -1
- package/constants/mediaUrls.constants.mjs +1 -1
- package/constants/non-circular-tokens.constants.mjs +1 -1
- package/constants/oauthUrls.constants.mjs +1 -1
- package/constants/okx.constants.mjs +1 -1
- package/constants/pay.constants.mjs +1 -1
- package/constants/permit2.constants.mjs +1 -1
- package/constants/presale.constants.mjs +1 -1
- package/constants/protocol.constants.mjs +1 -1
- package/constants/reorg-depths.constants.mjs +1 -1
- package/constants/rewards.constants.mjs +1 -1
- package/constants/save-depths.mjs +1 -1
- package/constants/schedule.constants.mjs +1 -1
- package/constants/server.constants.mjs +1 -1
- package/constants/tasks.constants.mjs +1 -1
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +39 -51
- package/constants/token-data/index.cjs +1 -1
- package/constants/token-data/index.d.ts +1 -233
- package/constants/token-data/index.mjs +14 -18
- package/constants/token.limits.constants.mjs +1 -1
- package/constants/tokens.constants.mjs +1 -1
- package/constants/tx-confirmation.constants.mjs +1 -1
- package/constants/vite.constants.mjs +1 -1
- package/constants/wallet.constants.mjs +1 -1
- package/crypto/preProcessing.mjs +1 -1
- package/data-structures/AccountActions/AccountActions.mjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +1 -1
- package/data-structures/BlockchainEvent/BlockchainEvent.mjs +1 -1
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.mjs +2 -2
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +1 -1
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +1 -1
- package/data-structures/Hinkal/hinkalClaimUtxo.mjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndBridge.mjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +1 -1
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +1 -1
- package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +1 -1
- package/data-structures/Hinkal/hinkalMultiSend.mjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +3 -9
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +1 -1
- package/data-structures/IndexedDB/activity-db.mjs +1 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +1 -1
- package/data-structures/TokenDBs/ArcPublicTokensDB.mjs +1 -1
- package/data-structures/TokenDBs/PrivateTokensDB.mjs +1 -1
- package/data-structures/TokenDBs/PublicTokensDB.mjs +1 -1
- package/data-structures/ValueCache/ValueCache.mjs +1 -1
- package/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +1 -1
- package/data-structures/cacheDevices/BaseCacheDevice.mjs +1 -1
- package/data-structures/cacheDevices/FileCacheDevice.mjs +1 -1
- package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +1 -1
- package/data-structures/crypto-keys/decodeUTXO.mjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +1 -1
- package/data-structures/crypto-keys/keyUtils.mjs +1 -1
- package/data-structures/crypto-keys/keys.mjs +1 -1
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +1 -1
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +1 -1
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.mjs +2 -2
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +1 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.mjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/helpers/ClientEventHelper.mjs +1 -1
- package/data-structures/event-service/helpers/PollingEventHelper.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +1 -1
- package/data-structures/http/BasicHttpClient.mjs +1 -1
- package/data-structures/http/HttpClient.mjs +1 -1
- package/data-structures/merkle-tree/MerkleTree.mjs +1 -1
- package/data-structures/merkle-tree/MerkleTreeIncompleteError.mjs +1 -1
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +1 -1
- package/data-structures/presale/PresaleContractWrapper.mjs +1 -1
- package/data-structures/snapshot/SnapshotFetcherService.mjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +1 -1
- package/data-structures/token-price-fetcher/TokenChecker.mjs +1 -1
- package/data-structures/transactions-manager/history/history.types.mjs +1 -1
- package/data-structures/utxo/Utxo.mjs +1 -1
- package/error-handling/customErrors/ErrorWithAmount.mjs +1 -1
- package/error-handling/customErrors/ErrorWithIndex.mjs +1 -1
- package/error-handling/customErrors/ErrorWithTx.mjs +1 -1
- package/error-handling/customErrors/FeeOverTransactionValueError.mjs +1 -1
- package/error-handling/customErrors/SimulationFailureError.mjs +1 -1
- package/error-handling/customErrors/customErrors.helpers.cjs +1 -1
- package/error-handling/customErrors/customErrors.helpers.mjs +2 -2
- package/error-handling/error-codes.constants.mjs +1 -1
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +2 -2
- package/error-handling/isInsufficientFundsError.mjs +1 -1
- package/error-handling/logError.mjs +1 -1
- package/error-handling/logger.mjs +1 -1
- package/error-handling/types.mjs +1 -1
- package/externalABIs/BUSD.mjs +1 -1
- package/externalABIs/DAI.mjs +1 -1
- package/externalABIs/NodeInterfaceABI.json.mjs +1 -1
- package/externalABIs/OptimismGasPriceOracle.json.mjs +1 -1
- package/externalABIs/SanctionsList.mjs +1 -1
- package/externalABIs/USDC.mjs +1 -1
- package/externalABIs/USDR.mjs +1 -1
- package/externalABIs/USDR3CRV.mjs +1 -1
- package/externalABIs/USDT.mjs +1 -1
- package/externalABIs/WETH.mjs +1 -1
- package/externalABIs/amToken.mjs +1 -1
- package/externalABIs/index.mjs +1 -1
- package/externalABIs/swapAbi.mjs +1 -1
- package/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +1 -1
- package/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.mjs +1 -1
- package/functions/auto-deposit-back-helpers/select-gas-token.mjs +1 -1
- package/functions/auto-deposit-back-helpers/update-hinkal.mjs +1 -1
- package/functions/kyc/checkTokenLimitsUSD.mjs +1 -1
- package/functions/kyc/openDefaultPassportWindow.mjs +1 -1
- package/functions/kyc/passportHelper.mjs +1 -1
- package/functions/kyc/zkMeHelper.mjs +1 -1
- package/functions/pre-transaction/addressTableLookup.mjs +1 -1
- package/functions/pre-transaction/constructAdminData.mjs +1 -1
- package/functions/pre-transaction/convert-okx-instructions.mjs +1 -1
- package/functions/pre-transaction/ensureAmountChanges.mjs +1 -1
- package/functions/pre-transaction/getExternalSwapAddress.mjs +1 -1
- package/functions/pre-transaction/getFeeStructure.mjs +1 -1
- package/functions/pre-transaction/getFlatFees.mjs +1 -1
- package/functions/pre-transaction/getKycAndSignatureData.mjs +1 -1
- package/functions/pre-transaction/getSignatureDataForTransact.mjs +1 -1
- package/functions/pre-transaction/getSolanaCalldataHash.mjs +1 -1
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +1 -1
- package/functions/pre-transaction/initTokenLimitIfNeeded.mjs +1 -1
- package/functions/pre-transaction/interaction-to-action.mjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure.mjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +3 -3
- package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +2 -5
- package/functions/pre-transaction/process-gas-estimates.mjs +1 -1
- package/functions/pre-transaction/recipientUtxoProcessing.mjs +1 -1
- package/functions/pre-transaction/sendInitNullifiersTransaction.mjs +1 -1
- package/functions/pre-transaction/sendV0Transaction.mjs +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +1 -1
- package/functions/pre-transaction/solana-public-signals.mjs +1 -1
- package/functions/pre-transaction/solana.mjs +1 -1
- package/functions/pre-transaction/solanaTransfer.utils.mjs +1 -1
- package/functions/pre-transaction/store-instructions.mjs +1 -1
- package/functions/pre-transaction/store-proof.mjs +1 -1
- package/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +1 -1
- package/functions/private-wallet/emporium.helpers.mjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.mjs +1 -1
- package/functions/private-wallet/opProducer.mjs +1 -1
- package/functions/snarkjs/common.snarkjs.mjs +1 -1
- package/functions/snarkjs/constant.mjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.mjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.mjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +1 -1
- package/functions/snarkjs/fetchOnChainRootHashes.mjs +1 -1
- package/functions/snarkjs/generateCircomData.mjs +1 -1
- package/functions/snarkjs/generateZkProof.mjs +1 -1
- package/functions/snarkjs/generateZkProofEnclave.mjs +1 -1
- package/functions/snarkjs/generateZkProofSelf.mjs +1 -1
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +1 -1
- package/functions/snarkjs/getOriginalSender.mjs +1 -1
- package/functions/snarkjs/getZKFiles.mjs +1 -1
- package/functions/utils/addresses.mjs +1 -1
- package/functions/utils/amounts.utils.mjs +1 -1
- package/functions/utils/arraysMatch.mjs +1 -1
- package/functions/utils/buildClaimableDepositPlan.mjs +1 -1
- package/functions/utils/bytes32.utils.mjs +1 -1
- package/functions/utils/cacheDevice.utils.mjs +1 -1
- package/functions/utils/cacheFunctions.mjs +1 -1
- package/functions/utils/caseInsensitive.utils.mjs +1 -1
- package/functions/utils/convertEmporiumOpToCallInfo.mjs +1 -1
- package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -1
- package/functions/utils/create-provider.mjs +1 -1
- package/functions/utils/enclave-signature-storage.mjs +1 -1
- package/functions/utils/enclave-utxo-storage.mjs +1 -1
- package/functions/utils/encodeTokenWithId.mjs +1 -1
- package/functions/utils/encryptInputForEnclave.mjs +1 -1
- package/functions/utils/erc20tokenFunctions.mjs +1 -1
- package/functions/utils/evmNetworkFunctions.mjs +1 -1
- package/functions/utils/external-action.utils.mjs +1 -1
- package/functions/utils/fees.utils.mjs +1 -1
- package/functions/utils/get-signature-header.mjs +1 -1
- package/functions/utils/getBlockExplorerUrl.mjs +1 -1
- package/functions/utils/getContractAddress.mjs +1 -1
- package/functions/utils/getDataFromTransaction.mjs +1 -1
- package/functions/utils/getRecipientInfoFromUserKeys.mjs +1 -1
- package/functions/utils/getSignerFromContract.mjs +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.mjs +1 -1
- package/functions/utils/getUtxosFromReceiptSolana.mjs +1 -1
- package/functions/utils/getWalletGroupKey.utils.mjs +1 -1
- package/functions/utils/inLogicMetadata.mjs +1 -1
- package/functions/utils/involves-permit2-op.mjs +1 -1
- package/functions/utils/ipfs.mjs +1 -1
- package/functions/utils/is-valid-url.mjs +1 -1
- package/functions/utils/merkleTree.utils.mjs +1 -1
- package/functions/utils/mutexes.utils.mjs +1 -1
- package/functions/utils/networks.utils.mjs +1 -1
- package/functions/utils/nftTokenFunctions.mjs +1 -1
- package/functions/utils/nickname.utils.mjs +1 -1
- package/functions/utils/postToOffscreen.mjs +1 -1
- package/functions/utils/prepareHinkal.mjs +1 -1
- package/functions/utils/process.utils.mjs +1 -1
- package/functions/utils/processUseApprovalUtxoData.mjs +1 -1
- package/functions/utils/proxyAvatar.utils.mjs +1 -1
- package/functions/utils/publicBalance.utils.mjs +1 -1
- package/functions/utils/reloadPage.mjs +1 -1
- package/functions/utils/requireEnv.mjs +1 -1
- package/functions/utils/resolve-sync.utils.mjs +1 -1
- package/functions/utils/rpc-int-encode.mjs +1 -1
- package/functions/utils/serialize-utxos.utils.mjs +1 -1
- package/functions/utils/serialize.utils.mjs +1 -1
- package/functions/utils/solanaMint.utils.mjs +1 -1
- package/functions/utils/string.utils.mjs +1 -1
- package/functions/utils/time.utils.mjs +1 -1
- package/functions/utils/token-check.utils.mjs +1 -1
- package/functions/utils/trimFieldValues.mjs +1 -1
- package/functions/utils/tron.utils.mjs +1 -1
- package/functions/utils/tronSimulation.utils.mjs +1 -1
- package/functions/utils/tx-confirmation.utils.mjs +1 -1
- package/functions/utils/upToDateState.mjs +1 -1
- package/functions/utils/userAgent.mjs +1 -1
- package/functions/utils/validateUsername.mjs +1 -1
- package/functions/utils/walletBalances.utils.mjs +1 -1
- package/functions/web3/EIP-712.mjs +1 -1
- package/functions/web3/connectors.utils.mjs +1 -1
- package/functions/web3/crypto.mjs +1 -1
- package/functions/web3/etherFunctions.mjs +1 -1
- package/functions/web3/events/balanceChangedCustomHandler.mjs +1 -1
- package/functions/web3/events/balanceChangedHandler.mjs +1 -1
- package/functions/web3/events/getApprovedBalance.mjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +13 -60
- package/functions/web3/events/getInputUtxosEnclave.mjs +1 -1
- package/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +3 -13
- package/functions/web3/events/getTransactionLogEvents.mjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.mjs +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +1 -1
- package/functions/web3/functionCalls/approveTokensToHinkal.mjs +1 -1
- package/functions/web3/functionCalls/constructBatchCall.mjs +1 -1
- package/functions/web3/functionCalls/recoverTransactionFromError.mjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +1 -1
- package/functions/web3/functionCalls/transactCallDirectTron.mjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +1 -1
- package/functions/web3/functionCalls/waitForErc20Approvals.mjs +1 -1
- package/functions/web3/getContractMetadata.mjs +1 -1
- package/functions/web3/getPublicAddressBalance.mjs +1 -1
- package/functions/web3/getSolanaPriorityFee.mjs +1 -1
- package/functions/web3/getTokenHolder.mjs +1 -1
- package/functions/web3/lifiAPI.mjs +1 -1
- package/functions/web3/odosAPI.mjs +1 -1
- package/functions/web3/okxAPI.mjs +1 -1
- package/functions/web3/oneInchAPI.mjs +1 -1
- package/functions/web3/runContractFunction.mjs +1 -1
- package/functions/web3/signAndSendSerializedTransaction.mjs +1 -1
- package/functions/web3/tron-wagmi-adapter.mjs +1 -1
- package/functions/web3/uniswapAPI.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +308 -310
- package/mutexes/mutex.mjs +1 -1
- package/package.json +1 -1
- package/providers/CustomEthersProvider.mjs +1 -1
- package/providers/CustomSolanaConnection.mjs +1 -1
- package/providers/EthersProviderAdapter.mjs +1 -1
- package/providers/SolanaProviderAdapter.mjs +1 -1
- package/providers/TronProviderAdapter.mjs +1 -1
- package/providers/WagmiProviderAdapter.mjs +1 -1
- package/providers/prepareEthersHinkal.mjs +1 -1
- package/providers/prepareSolanaHinkal.mjs +1 -1
- package/providers/prepareTronHinkal.mjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +1 -1
- package/types/RewardUserEnums.mjs +1 -1
- package/types/activities.types.mjs +1 -1
- package/types/admin.types.mjs +1 -1
- package/types/approvals.types.mjs +1 -1
- package/types/balances.types.mjs +1 -1
- package/types/cache.types.mjs +1 -1
- package/types/circom-data.types.mjs +1 -1
- package/types/confirmation-request.types.mjs +1 -1
- package/types/eip5792.types.mjs +1 -1
- package/types/ethereum-network.types.mjs +1 -1
- package/types/events.types.mjs +1 -1
- package/types/external-action.types.mjs +1 -1
- package/types/fee.types.mjs +1 -1
- package/types/generatePoints.mjs +1 -1
- package/types/hinkal.types.mjs +1 -1
- package/types/kyc.types.mjs +1 -1
- package/types/new-rewards.type.mjs +1 -1
- package/types/offscreen.types.mjs +1 -1
- package/types/onramp.types.mjs +1 -1
- package/types/pay-activities.types.mjs +1 -1
- package/types/rewards.types.mjs +1 -1
- package/types/schedule.types.mjs +1 -1
- package/types/scheduled-transactions.types.mjs +1 -1
- package/types/slippage.types.mjs +1 -1
- package/types/token-prices.types.mjs +1 -1
- package/types/token.types.mjs +1 -1
- package/types/transaction.types.mjs +1 -1
- package/webworker/performTaskWithWorker.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorker.types.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +2 -2
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +1 -1
- package/webworker/utxoWorker/utxoWorker.types.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +2 -2
- package/webworker/utxoWorker/utxoWorkerLogic.mjs +1 -1
- package/webworker/worker.registry.mjs +1 -1
- package/webworker/workerFactory.mjs +1 -1
- package/webworker/workerProxy.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorker.types.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +2 -2
- package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +1 -1
- package/constants/deploy-data/deploy-data-avalanche.json.cjs +0 -1
- package/constants/deploy-data/deploy-data-avalanche.json.mjs +0 -5352
- package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +0 -1
- package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +0 -5352
- package/constants/token-data/avalancheRegistry.json.cjs +0 -1
- package/constants/token-data/avalancheRegistry.json.mjs +0 -729
- package/constants/token-data/avalancheRegistryFixed.json.cjs +0 -1
- package/constants/token-data/avalancheRegistryFixed.json.mjs +0 -729
- package/constants/token-data/bnbMainnetRegistry.json.cjs +0 -1
- package/constants/token-data/bnbMainnetRegistry.json.mjs +0 -900
- package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +0 -1
- package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +0 -900
|
@@ -10,20 +10,10 @@ import { formatMintAddress as d } from "../../utils/solanaMint.utils.mjs";
|
|
|
10
10
|
import { getInputUtxosEnclave as f } from "./getInputUtxosEnclave.mjs";
|
|
11
11
|
import { addressToHexFormat as p } from "../../utils/tron.utils.mjs";
|
|
12
12
|
import { Mutex as m } from "async-mutex";
|
|
13
|
-
//#region
|
|
13
|
+
//#region ../shared/common/src/functions/web3/events/getInputUtxoAndBalance.ts
|
|
14
14
|
var h = new m(), g = async (e, t, n, r, i, a, s, c, u) => h.runExclusive(async () => {
|
|
15
15
|
u += 1;
|
|
16
|
-
let d = a.slice(u);
|
|
17
|
-
console.log("sending list of outputs for batch processing", {
|
|
18
|
-
outputsSlice: d,
|
|
19
|
-
lastOutput: c
|
|
20
|
-
});
|
|
21
|
-
let { lastOutput: f, additionalEncryptedOutputs: p } = await e.utxoUtils.batchProcess(d, c, t, n);
|
|
22
|
-
console.log("batch process result", {
|
|
23
|
-
lastOutputNew: f,
|
|
24
|
-
additionalEncryptedOutputs: p
|
|
25
|
-
});
|
|
26
|
-
let m = [...s, ...p];
|
|
16
|
+
let d = a.slice(u), { lastOutput: f, additionalEncryptedOutputs: p } = await e.utxoUtils.batchProcess(d, c, t, n), m = [...s, ...p];
|
|
27
17
|
return await o(e, r), l({
|
|
28
18
|
lastOutput: f,
|
|
29
19
|
encryptedOutputs: m
|
|
@@ -52,33 +42,14 @@ var h = new m(), g = async (e, t, n, r, i, a, s, c, u) => h.runExclusive(async (
|
|
|
52
42
|
tokenId: o
|
|
53
43
|
})), n) for (; e.length > 6;) e.splice(e.length - 1);
|
|
54
44
|
}, S = async ({ hinkal: e, chainId: t, passedShieldedPublicKey: n = void 0, ethAddress: r = void 0, resetCacheBefore: i = !1, allowRemoteDecryption: a = !1, useBlockedUtxos: l = !1 }) => {
|
|
55
|
-
let u = r ?? await e.getEthereumAddress(), d = n ?? e.userKeys.getShieldedPublicKey();
|
|
56
|
-
|
|
57
|
-
chainId: t,
|
|
58
|
-
ethereumAddress: u,
|
|
59
|
-
shieldedPublicKey: d
|
|
60
|
-
});
|
|
61
|
-
let { userKeys: f } = e, p = e.encryptedOutputsByChain[t], m = e.nullifiersByChain[t], h = Array.from(p);
|
|
62
|
-
console.log("getInputUtxoAndBalance 2 hinkalOutputs", {
|
|
63
|
-
hinkalOutputs: h,
|
|
64
|
-
encryptedOutputs: p,
|
|
65
|
-
nullifiers: m
|
|
66
|
-
}), i && c(e, t, d);
|
|
45
|
+
let u = r ?? await e.getEthereumAddress(), d = n ?? e.userKeys.getShieldedPublicKey(), { userKeys: f } = e, p = e.encryptedOutputsByChain[t], m = e.nullifiersByChain[t], h = Array.from(p);
|
|
46
|
+
i && c(e, t, d);
|
|
67
47
|
let { encryptedOutputs: _, lastOutput: y } = s(e, t, d);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}), await o(e, u);
|
|
72
|
-
let x = y !== "", S = h.findIndex((e) => e.value === y), C = S > -1, w = !x && S === -1;
|
|
73
|
-
console.log("getInputUtxoAndBalance 3 case1", C, w, x, S);
|
|
74
|
-
let T = e.areMerkleTreeUpdatesDisabled(), E = !T && (C || !a && w), D = !T && a && w, O = !E && !D;
|
|
75
|
-
console.log("getInputUtxoAndBalance 4 forceReadFromCache", T), console.log("getInputUtxoAndBalance 5 decryptLocally", E), console.log("getInputUtxoAndBalance 6 decryptRemotely", D), console.log("getInputUtxoAndBalance 7 useCache", O);
|
|
76
|
-
let k = [];
|
|
77
|
-
E ? k = await g(e, f, t, u, d, h, _, y, S) : D ? k = await v(e, f, t, u, d, h, _, y, S) : O && (k = await e.utxoUtils.buildBatchProcess(_, f, t)), console.log({ allUtxos: k }), await o(e, u);
|
|
48
|
+
await o(e, u);
|
|
49
|
+
let x = y !== "", S = h.findIndex((e) => e.value === y), C = S > -1, w = !x && S === -1, T = e.areMerkleTreeUpdatesDisabled(), E = !T && (C || !a && w), D = !T && a && w, O = !E && !D, k = [];
|
|
50
|
+
E ? k = await g(e, f, t, u, d, h, _, y, S) : D ? k = await v(e, f, t, u, d, h, _, y, S) : O && (k = await e.utxoUtils.buildBatchProcess(_, f, t)), await o(e, u);
|
|
78
51
|
let A = await b(e, k, m);
|
|
79
|
-
|
|
80
|
-
let j = l ? A.filter((e) => e.isBlocked) : A.filter((e) => !e.isBlocked);
|
|
81
|
-
return console.log("getInputUtxoAndBalance 9 filteredInputUtxos", j), { inputUtxos: j };
|
|
52
|
+
return { inputUtxos: l ? A.filter((e) => e.isBlocked) : A.filter((e) => !e.isBlocked) };
|
|
82
53
|
}, C = async ({ hinkal: e, chainId: n, passedShieldedPublicKey: a = void 0, ethAddress: o = void 0, resetCacheBefore: s = !1, allowRemoteDecryption: c = !1 }) => {
|
|
83
54
|
let l = o ?? await e.getEthereumAddressByChain(n), u = r(t(n) ? p(l) : l), { inputUtxos: d } = await S({
|
|
84
55
|
hinkal: e,
|
|
@@ -96,21 +67,7 @@ var h = new m(), g = async (e, t, n, r, i, a, s, c, u) => h.runExclusive(async (
|
|
|
96
67
|
});
|
|
97
68
|
return { inputUtxos: f.map((e) => d[e]).filter((e) => !!e) };
|
|
98
69
|
}, w = async ({ hinkal: t, tokenWithId: r, minInput: i = 2, sliceIfMore6: a = !0, chainId: o, passedShieldedPrivateKey: s = void 0, passedShieldedPublicKey: c = void 0, ethAddress: l = void 0, resetCacheBefore: f = !1, ensuredTokensWithId: p, useBlockedUtxos: m = !1 }) => {
|
|
99
|
-
|
|
100
|
-
tokenWithId: r,
|
|
101
|
-
minInput: i,
|
|
102
|
-
sliceIfMore6: a,
|
|
103
|
-
chainId: o,
|
|
104
|
-
passedShieldedPrivateKey: s,
|
|
105
|
-
passedShieldedPublicKey: c,
|
|
106
|
-
ethAddress: l,
|
|
107
|
-
resetCacheBefore: f,
|
|
108
|
-
ensuredTokensWithId: p,
|
|
109
|
-
useBlockedUtxos: m
|
|
110
|
-
});
|
|
111
|
-
let h = s ?? t.userKeys.getShieldedPrivateKey();
|
|
112
|
-
console.log("getInputUtxoAndBalancePerToken 1 useBlockedUtxos", m);
|
|
113
|
-
let { inputUtxos: g } = m ? await C({
|
|
70
|
+
let h = s ?? t.userKeys.getShieldedPrivateKey(), { inputUtxos: g } = m ? await C({
|
|
114
71
|
hinkal: t,
|
|
115
72
|
chainId: o,
|
|
116
73
|
ethAddress: l,
|
|
@@ -126,11 +83,7 @@ var h = new m(), g = async (e, t, n, r, i, a, s, c, u) => h.runExclusive(async (
|
|
|
126
83
|
passedShieldedPublicKey: c,
|
|
127
84
|
ethAddress: l,
|
|
128
85
|
resetCacheBefore: f
|
|
129
|
-
});
|
|
130
|
-
console.log("getInputUtxoAndBalancePerToken 2 inputUtxos", g);
|
|
131
|
-
let _ = y(r);
|
|
132
|
-
console.log("getInputUtxoAndBalancePerToken 3 tokensWithId", _);
|
|
133
|
-
let v = /* @__PURE__ */ new Map();
|
|
86
|
+
}), _ = y(r), v = /* @__PURE__ */ new Map();
|
|
134
87
|
g.forEach((e) => {
|
|
135
88
|
let t = e.getTokenAddress(o);
|
|
136
89
|
if (_ && !_.some((r) => n(r.erc20TokenAddress, t) && r.tokenId === e.tokenId)) return;
|
|
@@ -139,18 +92,18 @@ var h = new m(), g = async (e, t, n, r, i, a, s, c, u) => h.runExclusive(async (
|
|
|
139
92
|
tokenId: e.tokenId
|
|
140
93
|
}), i = v.get(r) ?? [];
|
|
141
94
|
v.set(r, [...i, e]);
|
|
142
|
-
}),
|
|
95
|
+
}), p?.forEach((e) => {
|
|
143
96
|
let t = u(o, {
|
|
144
97
|
erc20TokenAddress: e.erc20TokenAddress,
|
|
145
98
|
tokenId: e.tokenId
|
|
146
99
|
});
|
|
147
100
|
v.set(t, v.get(t) ?? []);
|
|
148
|
-
})
|
|
101
|
+
});
|
|
149
102
|
for (let [t, n] of v) {
|
|
150
103
|
let r = t.split("-")[0], s = Number(t.split("-")[1]), c = e(o), l = c ? r : void 0;
|
|
151
104
|
x(n, i, a, h, c ? d(r).compressedAddress.toLowerCase() : r.toLowerCase(), s, l);
|
|
152
105
|
}
|
|
153
|
-
return
|
|
106
|
+
return v;
|
|
154
107
|
};
|
|
155
108
|
//#endregion
|
|
156
109
|
export { v as attemptGetInputUtxosRemotely, S as getInputUtxoAndBalance, C as getInputUtxoAndBalanceOfStuckUtxos, w as getInputUtxoAndBalancePerToken, _ as getInputUtxosRemotely };
|
|
@@ -5,7 +5,7 @@ import { makeEnclaveHandshakeAndEncryptUint8Array as r } from "../../utils/encry
|
|
|
5
5
|
import { formatMintAddress as i } from "../../utils/solanaMint.utils.mjs";
|
|
6
6
|
import { ethers as a } from "ethers";
|
|
7
7
|
import { PublicKey as o } from "@solana/web3.js";
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../shared/common/src/functions/web3/events/getInputUtxosEnclave.ts
|
|
9
9
|
var s = (e) => {
|
|
10
10
|
if (!e) return;
|
|
11
11
|
let t = a.getBytes(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../utils/caseInsensitive.utils.cjs`),r=require(`../../../error-handling/error-codes.constants.cjs`),i=require(`../etherFunctions.cjs`),a=require(`../../utils/erc20tokenFunctions.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`);require(`../../../error-handling/customErrors/index.cjs`);const c=require(`../../utils/encodeTokenWithId.cjs`),l=require(`../../utils/solanaMint.utils.cjs`),u=require(`./getInputUtxoAndBalance.cjs`),d=require(`../../../data-structures/TokenDBs/PrivateTokensDB.cjs`),f=require(`../../utils/mutexes.utils.cjs`);var p=async(t,r,i,o,s,c=!1,l,p=!1,m=!1)=>f.getChainBalanceFetchingMutex(r).runExclusive(async()=>{let{inputUtxos:f}=m?await u.getInputUtxoAndBalanceOfStuckUtxos({hinkal:t,chainId:r,ethAddress:s,passedShieldedPrivateKey:i,resetCacheBefore:c,allowRemoteDecryption:l}):await u.getInputUtxoAndBalance({hinkal:t,sliceIfMore6:!1,chainId:r,passedShieldedPrivateKey:i,passedShieldedPublicKey:o,ethAddress:s,resetCacheBefore:c,allowRemoteDecryption:l});p&&e.isExtension&&await d.privateTokensDB.fetchAndUpdatePrivateTokens(f.map(e=>e.getTokenAddress(r)).filter(e=>e!==void 0),r,s);let h=(e.isExtension?await d.privateTokensDB.getPrivateTokens(r,s):a.getErc20TokensForChain(r)).map(e=>({token:e,balance:f.reduce((t,i)=>{let a=e.erc20TokenAddress;return n.caseInsensitiveEqual(a,i.getTokenAddress(r))?t+i.amount:t},0n),timestamp:f.filter(t=>n.caseInsensitiveEqual(t.getTokenAddress(r),e.erc20TokenAddress))[0]?.timeStamp,nfts:f.filter(t=>n.caseInsensitiveEqual(t.getTokenAddress(r),e.erc20TokenAddress)&&t.tokenId!==0).map(e=>({tokenId:e.tokenId,timestamp:e.timeStamp}))})),g=new Map;return h.forEach(e=>{g.set(e.token.erc20TokenAddress.toLowerCase(),e)}),g}),m=async(e,n,d,f,p=6,m=d.map(()=>0),h=!1,g=!1)=>{
|
|
1
|
+
const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../utils/caseInsensitive.utils.cjs`),r=require(`../../../error-handling/error-codes.constants.cjs`),i=require(`../etherFunctions.cjs`),a=require(`../../utils/erc20tokenFunctions.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`);require(`../../../error-handling/customErrors/index.cjs`);const c=require(`../../utils/encodeTokenWithId.cjs`),l=require(`../../utils/solanaMint.utils.cjs`),u=require(`./getInputUtxoAndBalance.cjs`),d=require(`../../../data-structures/TokenDBs/PrivateTokensDB.cjs`),f=require(`../../utils/mutexes.utils.cjs`);var p=async(t,r,i,o,s,c=!1,l,p=!1,m=!1)=>f.getChainBalanceFetchingMutex(r).runExclusive(async()=>{let{inputUtxos:f}=m?await u.getInputUtxoAndBalanceOfStuckUtxos({hinkal:t,chainId:r,ethAddress:s,passedShieldedPrivateKey:i,resetCacheBefore:c,allowRemoteDecryption:l}):await u.getInputUtxoAndBalance({hinkal:t,sliceIfMore6:!1,chainId:r,passedShieldedPrivateKey:i,passedShieldedPublicKey:o,ethAddress:s,resetCacheBefore:c,allowRemoteDecryption:l});p&&e.isExtension&&await d.privateTokensDB.fetchAndUpdatePrivateTokens(f.map(e=>e.getTokenAddress(r)).filter(e=>e!==void 0),r,s);let h=(e.isExtension?await d.privateTokensDB.getPrivateTokens(r,s):a.getErc20TokensForChain(r)).map(e=>({token:e,balance:f.reduce((t,i)=>{let a=e.erc20TokenAddress;return n.caseInsensitiveEqual(a,i.getTokenAddress(r))?t+i.amount:t},0n),timestamp:f.filter(t=>n.caseInsensitiveEqual(t.getTokenAddress(r),e.erc20TokenAddress))[0]?.timeStamp,nfts:f.filter(t=>n.caseInsensitiveEqual(t.getTokenAddress(r),e.erc20TokenAddress)&&t.tokenId!==0).map(e=>({tokenId:e.tokenId,timestamp:e.timeStamp}))})),g=new Map;return h.forEach(e=>{g.set(e.token.erc20TokenAddress.toLowerCase(),e)}),g}),m=async(e,n,d,f,p=6,m=d.map(()=>0),h=!1,g=!1)=>{let{userKeys:_}=e,v=[],y=[];if(d.length===0)return[];let b=await u.getInputUtxoAndBalancePerToken({hinkal:e,sliceIfMore6:!1,ensuredTokensWithId:d.map((e,t)=>({erc20TokenAddress:d[t],tokenId:m[t]})),allowRemoteDecryption:!1,useBlockedUtxos:g,chainId:n}),x=0;for(let e=0;e<d.length;e+=1)if(h===!1){let t=b.get(c.encodeTokenWithId(n,{erc20TokenAddress:d[e],tokenId:m[e]}))??[];if(!t)throw Error(`Missing utxos for token`);x=Math.max(t.length,x),y.push(t)}else y.push([]);return x===2?y:(y.forEach((e,c)=>{if(e.length>p){let t=e.slice(0,p),o=t.reduce((e,t)=>e+t.amount,0n);if(f[c]<0n&&o<-f[c]){let e=a.getERC20Token(d[c],n),t=e.decimals===18?6:2,l=Number(i.getAmountWithPrecision(o,e,t));throw new s.ErrorWithAmount(l,`${r.DIRECTLY_SHOW_MESSAGE_ERROR_CODES.UTXO_LIMITATIONS}. Please try again with ${l} ${e.symbol}, including gas fees.`)}v.push(t)}else if(e.length<=p){let r=[...e],i=p-e.length;for(;i>0;){--i;let e=t.isSolanaLike(n),a=e?d[c]:void 0,s=e?l.formatMintAddress(d[c]).compressedAddress:d[c];r.push(new o.Utxo({amount:0n,erc20TokenAddress:s,mintAddress:a,shieldedPrivateKey:_.getShieldedPrivateKey(),tokenId:m[c]}))}v.push(r)}}),v)};exports.addPaddingToUtxos=m,exports.getShieldedBalance=p;
|
|
@@ -12,7 +12,7 @@ import { formatMintAddress as u } from "../../utils/solanaMint.utils.mjs";
|
|
|
12
12
|
import { getInputUtxoAndBalance as d, getInputUtxoAndBalanceOfStuckUtxos as f, getInputUtxoAndBalancePerToken as p } from "./getInputUtxoAndBalance.mjs";
|
|
13
13
|
import { privateTokensDB as m } from "../../../data-structures/TokenDBs/PrivateTokensDB.mjs";
|
|
14
14
|
import { getChainBalanceFetchingMutex as h } from "../../utils/mutexes.utils.mjs";
|
|
15
|
-
//#region
|
|
15
|
+
//#region ../shared/common/src/functions/web3/events/getShieldedBalance.ts
|
|
16
16
|
var g = async (t, r, i, a, s, c = !1, l, u = !1, p = !1) => h(r).runExclusive(async () => {
|
|
17
17
|
let { inputUtxos: h } = p ? await f({
|
|
18
18
|
hinkal: t,
|
|
@@ -48,14 +48,6 @@ var g = async (t, r, i, a, s, c = !1, l, u = !1, p = !1) => h(r).runExclusive(as
|
|
|
48
48
|
_.set(e.token.erc20TokenAddress.toLowerCase(), e);
|
|
49
49
|
}), _;
|
|
50
50
|
}), _ = async (e, n, o, d, f = 6, m = o.map(() => 0), h = !1, g = !1) => {
|
|
51
|
-
console.log("addPaddingToUtxos 0 start", {
|
|
52
|
-
erc20Addresses: o,
|
|
53
|
-
amountChanges: d,
|
|
54
|
-
maxInput: f,
|
|
55
|
-
tokenIds: m,
|
|
56
|
-
forceEmptyUtxos: h,
|
|
57
|
-
useBlockedUtxos: g
|
|
58
|
-
});
|
|
59
51
|
let { userKeys: _ } = e, v = [], y = [];
|
|
60
52
|
if (o.length === 0) return [];
|
|
61
53
|
let b = await p({
|
|
@@ -68,9 +60,7 @@ var g = async (t, r, i, a, s, c = !1, l, u = !1, p = !1) => h(r).runExclusive(as
|
|
|
68
60
|
allowRemoteDecryption: !1,
|
|
69
61
|
useBlockedUtxos: g,
|
|
70
62
|
chainId: n
|
|
71
|
-
});
|
|
72
|
-
console.log("addPaddingToUtxos 1 inputUtxosPerToken", b);
|
|
73
|
-
let x = 0;
|
|
63
|
+
}), x = 0;
|
|
74
64
|
for (let e = 0; e < o.length; e += 1) if (h === !1) {
|
|
75
65
|
let t = b.get(l(n, {
|
|
76
66
|
erc20TokenAddress: o[e],
|
|
@@ -79,7 +69,7 @@ var g = async (t, r, i, a, s, c = !1, l, u = !1, p = !1) => h(r).runExclusive(as
|
|
|
79
69
|
if (!t) throw Error("Missing utxos for token");
|
|
80
70
|
x = Math.max(t.length, x), y.push(t);
|
|
81
71
|
} else y.push([]);
|
|
82
|
-
return x === 2 ?
|
|
72
|
+
return x === 2 ? y : (y.forEach((e, l) => {
|
|
83
73
|
if (e.length > f) {
|
|
84
74
|
let t = e.slice(0, f), s = t.reduce((e, t) => e + t.amount, 0n);
|
|
85
75
|
if (d[l] < 0n && s < -d[l]) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCustomRpcProvider as e } from "../../utils/create-provider.mjs";
|
|
2
2
|
import "../../utils/index.mjs";
|
|
3
3
|
import { ethers as t } from "ethers";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/web3/events/getTransactionLogEvents.ts
|
|
5
5
|
var n = (e, n) => {
|
|
6
6
|
let r = new t.Interface(n);
|
|
7
7
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { convertBytes32ToBigInt as e } from "../utils/bytes32.utils.mjs";
|
|
2
2
|
import "../utils/index.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.ts
|
|
4
4
|
var t = async (t, n) => {
|
|
5
5
|
let r = await t.account.merkle.fetch(n, "confirmed"), i = Number(e(r.rootIndex));
|
|
6
6
|
return e(r.roots.at(i - 1));
|
|
@@ -3,7 +3,7 @@ import { isSolanaLike as t, isTronLike as n, networkRegistry as r } from "../../
|
|
|
3
3
|
import "../../../types/index.mjs";
|
|
4
4
|
import { getAccessTokenAccountPublicKey as i } from "../../pre-transaction/solana.mjs";
|
|
5
5
|
import { PublicKey as a } from "@solana/web3.js";
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../shared/common/src/functions/web3/functionCalls/accessTokenCalls.ts
|
|
7
7
|
var o = async (t, n, r) => {
|
|
8
8
|
let i = r ?? t.userKeys.getAccessKey();
|
|
9
9
|
return (await t.getContractWithFetcher(n, e.AccessTokenContract).hasToken(i))[0];
|
|
@@ -6,7 +6,7 @@ import { getContractAddress as a } from "../../utils/getContractAddress.mjs";
|
|
|
6
6
|
import { getProviderFromContract as o, getSignerFromContract as s } from "../../utils/getSignerFromContract.mjs";
|
|
7
7
|
import { recoverTransactionFromError as c } from "./recoverTransactionFromError.mjs";
|
|
8
8
|
import { ethers as l } from "ethers";
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../shared/common/src/functions/web3/functionCalls/approveToken.ts
|
|
10
10
|
var u = async (e, t, n) => {
|
|
11
11
|
let r = s(n);
|
|
12
12
|
return await n.allowance(await r.getAddress(), t.target) >= e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { zeroAddress as e } from "../../../constants/protocol.constants.mjs";
|
|
2
2
|
import { approveTokenToHinkal as t } from "./approveToken.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/web3/functionCalls/approveTokensToHinkal.ts
|
|
4
4
|
var n = async (n, r, i, a, o) => {
|
|
5
5
|
for (let s = 0; s < o.length; s += 1) {
|
|
6
6
|
let c = o[s], l = a[s];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ERC20ABI as e } from "../../../externalABIs/index.mjs";
|
|
2
2
|
import { getContractAddress as t } from "../../utils/getContractAddress.mjs";
|
|
3
3
|
import { ethers as n } from "ethers";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/web3/functionCalls/constructBatchCall.ts
|
|
5
5
|
var r = (t, r) => new n.Interface(e).encodeFunctionData("approve", [t, r]), i = (e, t, n, r) => r.encodeFunctionData("transact", [
|
|
6
6
|
e[0],
|
|
7
7
|
e[1],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransactionReceiptStatus as e } from "../../../types/transactions.types.mjs";
|
|
2
2
|
import "../../../types/index.mjs";
|
|
3
3
|
import { waitLittle as t } from "../../utils/time.utils.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/web3/functionCalls/recoverTransactionFromError.ts
|
|
5
5
|
var n = 1 * 1e3, r = 30 * 1e3, i = async (i, a, o = 0) => {
|
|
6
6
|
if ((await i.getTransactionReceipt(a))?.status !== e.Succeeded) return;
|
|
7
7
|
o > 0 && await i.waitForTransaction(a, o);
|
|
@@ -7,7 +7,7 @@ import { approveTokensToHinkal as a } from "./approveTokensToHinkal.mjs";
|
|
|
7
7
|
import { buildApproveAndTransactCalls as o } from "./constructBatchCall.mjs";
|
|
8
8
|
import { waitForErc20Approvals as s } from "./waitForErc20Approvals.mjs";
|
|
9
9
|
import { ethers as c } from "ethers";
|
|
10
|
-
//#region
|
|
10
|
+
//#region ../shared/common/src/functions/web3/functionCalls/transactCallDirect.ts
|
|
11
11
|
var l = async (l, u, d, f, p, m, h, g, _, v = !0, y = !1) => {
|
|
12
12
|
let b = Array.isArray(d) ? d : [d], x = Array.isArray(f) ? f : [f];
|
|
13
13
|
if (b.length !== x.length) throw Error("token and amount length mismatch");
|
|
@@ -7,7 +7,7 @@ import { circomDataToArray as o, createTronCallData as s, estimateTronFeeSunWith
|
|
|
7
7
|
import { Logger as f } from "../../../error-handling/logger.mjs";
|
|
8
8
|
import { simulateTronTransaction as p } from "../../utils/tronSimulation.utils.mjs";
|
|
9
9
|
import { waitForTronErc20Approvals as m } from "./waitForErc20Approvals.mjs";
|
|
10
|
-
//#region
|
|
10
|
+
//#region ../shared/common/src/functions/web3/functionCalls/transactCallDirectTron.ts
|
|
11
11
|
var h = async (h, g, _, v, y, b, x, S, C, w = !0) => {
|
|
12
12
|
let T = h.getTronWeb(), E = l(v.erc20TokenAddress), D = await h.getEthereumAddressByChain(g), { hinkalAddress: O, hinkalABI: k } = e[g].contractData, A = T.contract(k, l(O)), j = S ?? A, M = C ?? A;
|
|
13
13
|
if (!j.address) throw Error("contractForApproval address not set");
|
|
@@ -6,7 +6,7 @@ import { ErrorWithRelayerTransaction as o } from "../../../error-handling/custom
|
|
|
6
6
|
import { serializeCircomData as s } from "../../snarkjs/common.snarkjs.mjs";
|
|
7
7
|
import "../../../error-handling/index.mjs";
|
|
8
8
|
import "../../snarkjs/index.mjs";
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../shared/common/src/functions/web3/functionCalls/transactCallRelayer.ts
|
|
10
10
|
var c = (e) => {
|
|
11
11
|
if (e.status === "success") return e.message;
|
|
12
12
|
throw e.message && e.error ? new o(e.error, e.message) : Error(e.error);
|
|
@@ -3,7 +3,7 @@ import { zeroAddress as t } from "../../../constants/protocol.constants.mjs";
|
|
|
3
3
|
import { caseInsensitiveEqual as n } from "../../utils/caseInsensitive.utils.mjs";
|
|
4
4
|
import { ERC20ABI as r } from "../../../externalABIs/index.mjs";
|
|
5
5
|
import { waitLittle as i } from "../../utils/time.utils.mjs";
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../shared/common/src/functions/web3/functionCalls/waitForErc20Approvals.ts
|
|
7
7
|
var a = async (r, a, o, s, c, l = 30, u = 1e3) => {
|
|
8
8
|
let d = c.filter(({ tokenAddress: e, requiredAmount: r }) => r > 0n && !n(e, t));
|
|
9
9
|
if (d.length === 0) return;
|
|
@@ -4,7 +4,7 @@ import { transactionErrorCodes as n } from "../../error-handling/error-codes.con
|
|
|
4
4
|
import { addressToHexFormat as r } from "../utils/tron.utils.mjs";
|
|
5
5
|
import { createCustomRpcProvider as i } from "../utils/create-provider.mjs";
|
|
6
6
|
import { ethers as a } from "ethers";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/web3/getContractMetadata.ts
|
|
8
8
|
var o = (r, i) => {
|
|
9
9
|
let a = e[i];
|
|
10
10
|
if (!a) throw Error(n.UNSUPPORTED_NETWORK);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ContractType as e } from "../../types/ethereum-network.types.mjs";
|
|
2
2
|
import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { getProviderFromContract as n } from "../utils/getSignerFromContract.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/web3/getPublicAddressBalance.ts
|
|
5
5
|
var r = async (r, i, a, o) => {
|
|
6
6
|
let s = r.getContractWithFetcher(i, e.ERC20Contract, a);
|
|
7
7
|
return a === t ? n(s).getBalance(o) : s.balanceOf(o);
|
|
@@ -4,7 +4,7 @@ import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
|
|
|
4
4
|
import "../../data-structures/http/index.mjs";
|
|
5
5
|
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
6
6
|
import { SolanaPriorityFeeMode as i } from "../../types/fee.types.mjs";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/web3/getSolanaPriorityFee.ts
|
|
8
8
|
var a = async (a, o = i.RECOMMENDED) => {
|
|
9
9
|
let s = a.map((e) => e.toBase58());
|
|
10
10
|
try {
|
|
@@ -5,7 +5,7 @@ import { ERC20ABI as n } from "../../externalABIs/index.mjs";
|
|
|
5
5
|
import { createCustomRpcProvider as r } from "../utils/create-provider.mjs";
|
|
6
6
|
import "../utils/index.mjs";
|
|
7
7
|
import { ethers as i } from "ethers";
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../shared/common/src/functions/web3/getTokenHolder.ts
|
|
9
9
|
var a = {
|
|
10
10
|
[e.base]: "base",
|
|
11
11
|
[e.optimism]: "optimism",
|
|
@@ -2,7 +2,7 @@ import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
|
|
|
2
2
|
import { callLifiAPI as t } from "../../API/callLifiAPI.mjs";
|
|
3
3
|
import { transactionErrorCodes as n } from "../../error-handling/error-codes.constants.mjs";
|
|
4
4
|
import { getAmountInWei as r } from "./etherFunctions.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/web3/lifiAPI.ts
|
|
6
6
|
var i = async (i, a, o, s, c, l) => {
|
|
7
7
|
try {
|
|
8
8
|
let n = r(i, o), { lifiResponse: u } = await t({
|
|
@@ -5,7 +5,7 @@ import { transactionErrorCodes as i } from "../../error-handling/error-codes.con
|
|
|
5
5
|
import { getAmountInWei as a } from "./etherFunctions.mjs";
|
|
6
6
|
import "../../constants/index.mjs";
|
|
7
7
|
import "../../error-handling/index.mjs";
|
|
8
|
-
//#region
|
|
8
|
+
//#region ../shared/common/src/functions/web3/odosAPI.ts
|
|
9
9
|
var o = async (o, s, c, l, u = .7) => {
|
|
10
10
|
try {
|
|
11
11
|
let { odosResponse: i, status: d } = await r(o, {
|
|
@@ -4,7 +4,7 @@ import { getAmountInWei as r, randomBigInt as i } from "./etherFunctions.mjs";
|
|
|
4
4
|
import { getSwapperAccountPublicKeyFromSalt as a } from "../pre-transaction/solana.mjs";
|
|
5
5
|
import { callOkxAPI as o } from "../../API/callOkxAPI.mjs";
|
|
6
6
|
import { PublicKey as s } from "@solana/web3.js";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/web3/okxAPI.ts
|
|
8
8
|
var c = (e, t, n, r, i = .7) => ({
|
|
9
9
|
amount: `${n}`,
|
|
10
10
|
chainIndex: "501",
|
|
@@ -8,7 +8,7 @@ import "../../constants/index.mjs";
|
|
|
8
8
|
import { Logger as o } from "../../error-handling/logger.mjs";
|
|
9
9
|
import "../../error-handling/index.mjs";
|
|
10
10
|
import { getContractMetadata as s } from "./getContractMetadata.mjs";
|
|
11
|
-
//#region
|
|
11
|
+
//#region ../shared/common/src/functions/web3/oneInchAPI.ts
|
|
12
12
|
var c = async (c, l, u, d, f = .7) => {
|
|
13
13
|
try {
|
|
14
14
|
let i = await r(c, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UserFriendlyErrorCodes as e, transactionErrorCodes as t } from "../../error-handling/error-codes.constants.mjs";
|
|
2
2
|
import { getErrorMessage as n } from "../../error-handling/get-error.message.mjs";
|
|
3
3
|
import "../../error-handling/index.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/web3/runContractFunction.ts
|
|
5
5
|
var r = 5e4, i = 1, a = 11, o = 15, s = /* @__PURE__ */ function(e) {
|
|
6
6
|
return e[e.Initial = 0] = "Initial", e[e.Secondary = 1] = "Secondary", e;
|
|
7
7
|
}(s || {}), c = async (e, t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VersionedTransaction as e } from "@solana/web3.js";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../shared/common/src/functions/web3/signAndSendSerializedTransaction.ts
|
|
3
3
|
var t = async (t, n, r, i) => {
|
|
4
4
|
let a = Buffer.from(n, "base64"), o = e.deserialize(a), { wallet: s, connection: c } = t;
|
|
5
5
|
if (!s) throw Error("missing solana wallet");
|
|
@@ -8,7 +8,7 @@ import "../../constants/index.mjs";
|
|
|
8
8
|
import { logError as a } from "../../error-handling/logError.mjs";
|
|
9
9
|
import "../../error-handling/index.mjs";
|
|
10
10
|
import { ethers as o } from "ethers";
|
|
11
|
-
//#region
|
|
11
|
+
//#region ../shared/common/src/functions/web3/uniswapAPI.ts
|
|
12
12
|
var s = async (e, t, i, a) => {
|
|
13
13
|
let o = (await Promise.all([
|
|
14
14
|
100,
|