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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey as e } from "@solana/web3.js";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../shared/common/src/functions/pre-transaction/convert-okx-instructions.ts
|
|
3
3
|
var t = 255, n = (n, r) => {
|
|
4
4
|
let i = [], a = [];
|
|
5
5
|
return n.forEach((n) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CIRCOM_P as e } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { calcAmountChanges as t } from "../snarkjs/common.snarkjs.mjs";
|
|
3
3
|
import { isEqual as n } from "lodash";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/ensureAmountChanges.ts
|
|
5
5
|
var r = (r, i, a) => {
|
|
6
6
|
let o = t(r, i), s = a.map((t) => t < 0n ? e + t : t);
|
|
7
7
|
if (o.length !== s.length || !n(o, s)) throw Error("Amount changes are not equal");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExternalActionId as e } from "../../types/external-action.types.mjs";
|
|
2
2
|
import { networkRegistry as t } from "../../constants/chains.constants.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/pre-transaction/getExternalSwapAddress.ts
|
|
4
4
|
var n = (n, r) => {
|
|
5
5
|
let { contractData: i } = t[n], a;
|
|
6
6
|
switch (r) {
|
|
@@ -3,7 +3,7 @@ import { caseInsensitiveEqual as t } from "../utils/caseInsensitive.utils.mjs";
|
|
|
3
3
|
import { getERC20Token as n } from "../utils/erc20tokenFunctions.mjs";
|
|
4
4
|
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
5
5
|
import { processGasEstimates as i } from "./process-gas-estimates.mjs";
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../shared/common/src/functions/pre-transaction/getFeeStructure.ts
|
|
7
7
|
var a = async (a, o, s, c, l = [], u = 0n, d) => {
|
|
8
8
|
let f = n(o ?? e, a);
|
|
9
9
|
if (!f) throw Error("failed to find feeToken");
|
|
@@ -3,7 +3,7 @@ import "../../types/index.mjs";
|
|
|
3
3
|
import { getERC20Token as t } from "../utils/erc20tokenFunctions.mjs";
|
|
4
4
|
import { getInteractionFromAction as n } from "./interaction-to-action.mjs";
|
|
5
5
|
import { processGasEstimates as r } from "./process-gas-estimates.mjs";
|
|
6
|
-
//#region
|
|
6
|
+
//#region ../shared/common/src/functions/pre-transaction/getFlatFees.ts
|
|
7
7
|
var i = async (i, a, o, s, c, l = []) => {
|
|
8
8
|
let u, d = n(o);
|
|
9
9
|
if (d === e.NONE) throw Error("No interaction was choosen");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shouldPatchAccessTokenMerkleTree as e } from "./shouldPatchAccessTokenMerkleTree.mjs";
|
|
2
2
|
import { getSignatureDataForTransact as t } from "./getSignatureDataForTransact.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/pre-transaction/getKycAndSignatureData.ts
|
|
4
4
|
var n = async (n, r, i, a, o) => {
|
|
5
5
|
let { patchAccessTokenMerkleTree: s, kycRequired: c, hasAccessToken: l } = await e(n, r, i, a);
|
|
6
6
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultSignatureData as e } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { API as t } from "../../API/API.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/pre-transaction/getSignatureDataForTransact.ts
|
|
4
4
|
var n = async (n, r, i, a, o) => !a || o ? e : (await t.getAccessTokenSignature(n, r, i.getAccessKey())).signatureData;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { n as getSignatureDataForTransact };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CIRCOM_P as e } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { ethers as t } from "ethers";
|
|
3
3
|
import { BN as n } from "@coral-xyz/anchor";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/getSolanaCalldataHash.ts
|
|
5
5
|
var r = (r, i, a, o, s, c, l, u) => {
|
|
6
6
|
let d = new n(s.toString()), f = new n(c.toString()), p = o.reduce((e, t) => [
|
|
7
7
|
...e,
|
|
@@ -2,7 +2,7 @@ import { simulateVolatileTokenTransfer as e } from "../../API/simulate-transacti
|
|
|
2
2
|
import { Logger as t } from "../../error-handling/logger.mjs";
|
|
3
3
|
import "../../error-handling/index.mjs";
|
|
4
4
|
import { TokenChecker as n } from "../../data-structures/token-price-fetcher/TokenChecker.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/pre-transaction/getVolatileTransferAmount.ts
|
|
6
6
|
var r = async (r, i, a, o) => {
|
|
7
7
|
try {
|
|
8
8
|
let t = i.map((e, t) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { getTokenLimitStorageAccountPublicKey as e } from "./solana.mjs";
|
|
3
3
|
import { sendV0Transaction as t } from "./sendV0Transaction.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/initTokenLimitIfNeeded.ts
|
|
5
5
|
var n = async (n, r, i, a) => {
|
|
6
6
|
let o = await n.methods.initTokenLimit().accounts({
|
|
7
7
|
mint: i.toBase58() === "11111111111111111111111111111111" ? null : i,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalActionId as e } from "../../types/external-action.types.mjs";
|
|
2
2
|
import { INTERACTION as t } from "../../types/hinkal.types.mjs";
|
|
3
3
|
import "../../types/index.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/interaction-to-action.ts
|
|
5
5
|
var n = (n) => n === e.Transact ? t.WITHDRAW : [
|
|
6
6
|
e.Uniswap,
|
|
7
7
|
e.Odos,
|
|
@@ -4,7 +4,7 @@ import { maxBigInt as n } from "../utils/amounts.utils.mjs";
|
|
|
4
4
|
import { createTransferToEmporiumOp as r } from "../private-wallet/emporium.helpers.mjs";
|
|
5
5
|
import { mergeWithFeeStructure as i } from "./merge-with-fee-structure.mjs";
|
|
6
6
|
import { getPublicAddressBalance as a } from "../web3/getPublicAddressBalance.mjs";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/pre-transaction/merge-with-fee-structure-emporium.ts
|
|
8
8
|
var o = async (o, s, c, l, u, d, f, p) => {
|
|
9
9
|
let m = 0n, h = p < 0n ? p : 0n, g = await a(o, s, f.feeToken, c) + h;
|
|
10
10
|
m = g < 0 ? f.flatFee : n(f.flatFee - g, 0n), m !== 0n && (i(s, u, d, {
|
|
@@ -2,7 +2,7 @@ import { caseInsensitiveEqual as e } from "../utils/caseInsensitive.utils.mjs";
|
|
|
2
2
|
import { getERC20Token as t } from "../utils/erc20tokenFunctions.mjs";
|
|
3
3
|
import { FeeOverTransactionValueError as n } from "../../error-handling/customErrors/FeeOverTransactionValueError.mjs";
|
|
4
4
|
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/pre-transaction/merge-with-fee-structure.ts
|
|
6
6
|
var i = (i, a, o, s) => {
|
|
7
7
|
r.log("amount changes before merge", { amountChanges: o });
|
|
8
8
|
let c = a.findIndex((t) => e(t, s.feeToken));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/conversion.constants.cjs`);const e=require(`../../types/hinkal.types.cjs`),t=require(`../utils/caseInsensitive.utils.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../utils/amounts.utils.cjs`),i=require(`../utils/processUseApprovalUtxoData.cjs`);var a=(a,o,s,c,l,u)=>{if(
|
|
1
|
+
require(`../../constants/conversion.constants.cjs`);const e=require(`../../types/hinkal.types.cjs`),t=require(`../utils/caseInsensitive.utils.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../utils/amounts.utils.cjs`),i=require(`../utils/processUseApprovalUtxoData.cjs`);var a=(a,o,s,c,l,u)=>{if(u&&u>0)throw Error(n.transactionErrorCodes.INSUFFICIENT_FUNDS);let d=r.countTotalAmountInUtxos(s),{erc20TokenAddress:f}=s[0],p=a.getApprovedUtxosForToken(f,o).filter(e=>!t.caseInsensitiveEqual(e.interactionAddress,l)),m=e.defaultUseApprovalUTXOData(3,0n);if(c<0n&&d+c<0n){let e=-(d+c);for(let t=0;t<Math.min(p.length,3)&&e!==0n;t+=1){let n=p[t],r=n.amount>=e?-e:-n.amount;e+=r,m.approvalChanges[t]=r,m.externalApprovalAddresses[t]=n.interactionAddress,m.conversionInHinkalAddress[t]=n.inHinkalAddress}if(e!==0n)throw Error(n.transactionErrorCodes.INSUFFICIENT_FUNDS)}return{useApprovalUtxoData:i.isUseApprovalDataEmpty(m)?void 0:m}};exports.outputApprovalDataProcessing=a;
|
|
@@ -4,9 +4,9 @@ import { caseInsensitiveEqual as t } from "../utils/caseInsensitive.utils.mjs";
|
|
|
4
4
|
import { transactionErrorCodes as n } from "../../error-handling/error-codes.constants.mjs";
|
|
5
5
|
import { countTotalAmountInUtxos as r } from "../utils/amounts.utils.mjs";
|
|
6
6
|
import { isUseApprovalDataEmpty as i } from "../utils/processUseApprovalUtxoData.mjs";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/pre-transaction/outputApprovalDataProcessing.ts
|
|
8
8
|
var a = (a, o, s, c, l, u) => {
|
|
9
|
-
if (
|
|
9
|
+
if (u && u > 0) throw Error(n.INSUFFICIENT_FUNDS);
|
|
10
10
|
let d = r(s), { erc20TokenAddress: f } = s[0], p = a.getApprovedUtxosForToken(f, o).filter((e) => !t(e.interactionAddress, l)), m = e(3, 0n);
|
|
11
11
|
if (c < 0n && d + c < 0n) {
|
|
12
12
|
let e = -(d + c);
|
|
@@ -14,7 +14,7 @@ var a = (a, o, s, c, l, u) => {
|
|
|
14
14
|
let n = p[t], r = n.amount >= e ? -e : -n.amount;
|
|
15
15
|
e += r, m.approvalChanges[t] = r, m.externalApprovalAddresses[t] = n.interactionAddress, m.conversionInHinkalAddress[t] = n.inHinkalAddress;
|
|
16
16
|
}
|
|
17
|
-
if (
|
|
17
|
+
if (e !== 0n) throw Error(n.INSUFFICIENT_FUNDS);
|
|
18
18
|
}
|
|
19
19
|
return { useApprovalUtxoData: i(m) ? void 0 : m };
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../utils/amounts.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);var r=(r,i,a,o,s,c=!0,l,u)=>{let d=t.countTotalAmountInUtxos(i),{erc20TokenAddress:f,mintAddress:p}=i[0];if(c&&a<0n&&d+a<0n)throw
|
|
1
|
+
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`../utils/amounts.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);var r=(r,i,a,o,s,c=!0,l,u)=>{let d=t.countTotalAmountInUtxos(i),{erc20TokenAddress:f,mintAddress:p}=i[0];if(c&&a<0n&&d+a<0n)throw Error(e.transactionErrorCodes.INSUFFICIENT_FUNDS_TO_TRANSACT);let m=[new n.Utxo({amount:t.bigintMax(d+a,0n),erc20TokenAddress:f,mintAddress:p,shieldedPrivateKey:r.getShieldedPrivateKey(),timeStamp:o,tokenId:s})];if(l!==void 0&&u!==void 0){let[e,t,r]=l.split(`,`);m.push(new n.Utxo({amount:u,erc20TokenAddress:f,randomization:BigInt(e),stealthAddress:t,encryptionKey:r,timeStamp:o}))}return{outputUtxos:m}};exports.outputUtxoProcessing=r;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
|
|
2
2
|
import { bigintMax as t, countTotalAmountInUtxos as n } from "../utils/amounts.utils.mjs";
|
|
3
3
|
import { Utxo as r } from "../../data-structures/utxo/Utxo.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/outputUtxoProcessing.ts
|
|
5
5
|
var i = (i, a, o, s, c, l = !0, u, d) => {
|
|
6
6
|
let f = n(a), { erc20TokenAddress: p, mintAddress: m } = a[0];
|
|
7
|
-
if (l && o < 0n && f + o < 0n) throw
|
|
8
|
-
amountChange: o,
|
|
9
|
-
totalAmount: f
|
|
10
|
-
}), Error(e.INSUFFICIENT_FUNDS_TO_TRANSACT);
|
|
7
|
+
if (l && o < 0n && f + o < 0n) throw Error(e.INSUFFICIENT_FUNDS_TO_TRANSACT);
|
|
11
8
|
let h = [new r({
|
|
12
9
|
amount: t(f + o, 0n),
|
|
13
10
|
erc20TokenAddress: p,
|
|
@@ -2,7 +2,7 @@ import { getGasEstimates as e } from "../../API/getGasEstimates.mjs";
|
|
|
2
2
|
import { getAmountInWei as t } from "../web3/etherFunctions.mjs";
|
|
3
3
|
import { getValueFirstNDigit as n } from "../utils/amounts.utils.mjs";
|
|
4
4
|
import { logError as r } from "../../error-handling/logError.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/pre-transaction/process-gas-estimates.ts
|
|
6
6
|
var i = async (i, a, o, s, c, l = [], u) => {
|
|
7
7
|
let d, f;
|
|
8
8
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { caseInsensitiveEqual as e } from "../utils/caseInsensitive.utils.mjs";
|
|
2
2
|
import { Utxo as t } from "../../data-structures/utxo/Utxo.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/pre-transaction/recipientUtxoProcessing.ts
|
|
4
4
|
var n = (n, r, i, a) => {
|
|
5
5
|
let { recipientInfo: o, amount: s, token: c } = n, [l, u, d] = o.split(","), f = r.findIndex((t) => t.find((t) => e(t.erc20TokenAddress, n?.token.erc20TokenAddress)) !== void 0), p = new t({
|
|
6
6
|
amount: s,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getNullifierAccount as e } from "./solana.mjs";
|
|
2
2
|
import { sendV0Transaction as t } from "./sendV0Transaction.mjs";
|
|
3
3
|
import { convertBytes32ToBigInt as n } from "../utils/bytes32.utils.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/sendInitNullifiersTransaction.ts
|
|
5
5
|
var r = async (t, r, i, a, o) => {
|
|
6
6
|
if (o.every((e) => e === 0)) return {
|
|
7
7
|
instruction: void 0,
|
|
@@ -6,7 +6,7 @@ import { getSolanaPriorityFee as o } from "../web3/getSolanaPriorityFee.mjs";
|
|
|
6
6
|
import { pollForValue as s } from "../utils/process.utils.mjs";
|
|
7
7
|
import { ComputeBudgetProgram as c, PublicKey as l, TransactionMessage as u, VersionedTransaction as d } from "@solana/web3.js";
|
|
8
8
|
import { ASSOCIATED_TOKEN_PROGRAM_ID as f, TOKEN_PROGRAM_ID as p, createAssociatedTokenAccountInstruction as m, getAssociatedTokenAddress as h } from "@solana/spl-token";
|
|
9
|
-
//#region
|
|
9
|
+
//#region ../shared/common/src/functions/pre-transaction/sendV0Transaction.ts
|
|
10
10
|
var g = 5e3, _ = 6e4, v = (e) => e instanceof Error && (e.message?.includes("Blockhash not found") || e.name === "TransactionExpiredBlockheightExceededError" || e.message?.includes("block height exceeded")), y = async (e, t, n = "confirmed") => await s(() => e.getTransaction(t, {
|
|
11
11
|
commitment: n,
|
|
12
12
|
maxSupportedTransactionVersion: 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../shared/common/src/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.ts
|
|
2
2
|
var e = async (e, t, n, r, i) => {
|
|
3
3
|
let [a, o] = await Promise.all([e.checkTokenRegistry(t, n, r), e.checkAccessToken(t, i)]);
|
|
4
4
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../shared/common/src/functions/pre-transaction/solana-public-signals.ts
|
|
2
2
|
var e = (e, t) => {
|
|
3
3
|
let n = t.tokenNumber, r = t.nullifierAmount, i = t.outputAmount, a = 0, o = Uint8Array.from(e[a]);
|
|
4
4
|
a += 1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { poseidonFunction as e } from "../../crypto/poseidon.mjs";
|
|
2
2
|
import { PublicKey as t } from "@solana/web3.js";
|
|
3
3
|
import { BN as n } from "@coral-xyz/anchor";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/solana.ts
|
|
5
5
|
var r = (e) => new TextEncoder().encode(e), i = (e) => {
|
|
6
6
|
let t = [], n = e;
|
|
7
7
|
for (; n > 0n;) t.unshift(Number(n % 256n)), n /= 256n;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { PublicKey as e, SystemProgram as t } from "@solana/web3.js";
|
|
3
3
|
import { TOKEN_2022_PROGRAM_ID as n, TOKEN_PROGRAM_ID as r, createAssociatedTokenAccountInstruction as i, createTransferCheckedInstruction as a, createTransferInstruction as o, getAssociatedTokenAddress as s } from "@solana/spl-token";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/solanaTransfer.utils.ts
|
|
5
5
|
var c = async (c, l, u, d, f) => {
|
|
6
6
|
let { erc20TokenAddress: p, is2022Program: m, decimals: h } = d, g = [];
|
|
7
7
|
if (p === "11111111111111111111111111111111") return g.push(t.transfer({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getInstructionsAccountPublicKey as e } from "./solana.mjs";
|
|
2
2
|
import { sendV0Transaction as t } from "./sendV0Transaction.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/pre-transaction/store-instructions.ts
|
|
4
4
|
var n = async (n, r, i, a, o, s) => {
|
|
5
5
|
let c = e(r.programId, a, i.publicKey, o);
|
|
6
6
|
return await t(n, [await r.methods.storeInstructions(Number(o), s).accounts({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { getEncryptedOutputsAccountPublicKey as e, getProofAccountPart1PublicKey as t, getProofAccountPart2PublicKey as n } from "./solana.mjs";
|
|
3
3
|
import { sendV0Transaction as r } from "./sendV0Transaction.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/pre-transaction/store-proof.ts
|
|
5
5
|
var i = async (i, a, o, s, c, l, u, d, f, p) => {
|
|
6
6
|
let m = e(a.programId, s, o.publicKey, c), h = { outputs: l.map((e) => Buffer.from(e)) };
|
|
7
7
|
await r(i, [await a.methods.storeEncryptedOutputs(Number(c), h).accounts({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { waitLittle as e } from "../utils/time.utils.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../shared/common/src/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.ts
|
|
3
3
|
var t = 60, n = (e, t) => {
|
|
4
4
|
if (!e.length) return !0;
|
|
5
5
|
let n = new Set(t.map((e) => e.toString()));
|
|
@@ -8,7 +8,7 @@ import { createCustomRpcProvider as s } from "../utils/create-provider.mjs";
|
|
|
8
8
|
import { AccountActions as c } from "../../data-structures/AccountActions/AccountActions.mjs";
|
|
9
9
|
import "../utils/index.mjs";
|
|
10
10
|
import { ethers as l } from "ethers";
|
|
11
|
-
//#region
|
|
11
|
+
//#region ../shared/common/src/functions/private-wallet/emporium.helpers.ts
|
|
12
12
|
var u = ({ contract: e, func: t, args: n, callDataString: r, invokeWallet: i, value: o }) => {
|
|
13
13
|
let s = new Uint8Array(), c = r ? l.getBytesCopy(r) : new Uint8Array();
|
|
14
14
|
if (typeof e == "object") {
|
|
@@ -11,7 +11,7 @@ import { replaceAllInstances as d } from "../utils/string.utils.mjs";
|
|
|
11
11
|
import { createApproveEmporiumOp as f, emporiumOp as p } from "./emporium.helpers.mjs";
|
|
12
12
|
import { getExternalSwapAddress as m } from "../pre-transaction/getExternalSwapAddress.mjs";
|
|
13
13
|
import { ethers as h } from "ethers";
|
|
14
|
-
//#region
|
|
14
|
+
//#region ../shared/common/src/functions/private-wallet/emporium.swap.helpers.ts
|
|
15
15
|
var g = (e, t, n, r, i, a, o = !1) => {
|
|
16
16
|
let s = {
|
|
17
17
|
tokenIn: t,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ERC20ABI as e, ISwapRouterABI as t } from "../../externalABIs/index.mjs";
|
|
2
2
|
import { emporiumOp as n } from "./emporium.helpers.mjs";
|
|
3
3
|
import { ethers as r } from "ethers";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/private-wallet/opProducer.ts
|
|
5
5
|
var i = /* @__PURE__ */ function(e) {
|
|
6
6
|
return e[e.Erc20Token = 0] = "Erc20Token", e[e.Uniswap = 1] = "Uniswap", e;
|
|
7
7
|
}({}), a = (a, o, s, c, l, u) => {
|
|
@@ -8,7 +8,7 @@ import { encryptUtxo as o } from "../../data-structures/crypto-keys/encryptDecry
|
|
|
8
8
|
import { getExternalActionIdHash as s } from "../utils/external-action.utils.mjs";
|
|
9
9
|
import { getOriginalSender as c } from "./getOriginalSender.mjs";
|
|
10
10
|
import { ethers as l } from "ethers";
|
|
11
|
-
//#region
|
|
11
|
+
//#region ../shared/common/src/functions/snarkjs/common.snarkjs.ts
|
|
12
12
|
var u = (e, t) => e.map((e, n) => e.map((e) => t[n] ? "0" : e.getNullifier())), d = (e) => e.map((e) => e.map((e) => e.amount === 0n ? "0" : e.getCommitment())), f = (e, n, r = !1) => {
|
|
13
13
|
let i = [];
|
|
14
14
|
for (let a = 0; a < e.length; a += 1) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../shared/common/src/functions/snarkjs/constant.ts
|
|
2
2
|
var e = "https://enclave-server.hinkal.pro", t = "https://s3.us-west-1.amazonaws.com/hinkal-v1.1-verifiers/", n = () => {
|
|
3
3
|
let e = t;
|
|
4
4
|
return {
|
|
@@ -16,7 +16,7 @@ import { AccountActions as le } from "../../data-structures/AccountActions/Accou
|
|
|
16
16
|
import { createHinkalHelperFromData as ue, hinkalCheckTokenRegistry as de } from "../../data-structures/Hinkal/hinkalCheckTokenRegistry.mjs";
|
|
17
17
|
import { getDataFromWorkers as fe } from "./getMerkleTreeSiblingsAndRootHashes.mjs";
|
|
18
18
|
import { encodeEmporiumMetadata as d, getAuthorizationDataIfNeeded as f } from "../private-wallet/emporium.helpers.mjs";
|
|
19
|
-
//#region
|
|
19
|
+
//#region ../shared/common/src/functions/snarkjs/constructEmporiumProof.ts
|
|
20
20
|
var p = async (p, m, h, g, _, v, y, b, pe, x, me, he, S = r, C = ee.localhost, w = _.map(() => !1), T = _.map(() => 0n), E, D = void 0, O = !1, k, A = void 0, j, M = n, N) => {
|
|
21
21
|
let P = c(_, v), F = re(v), I = y.getShieldedPrivateKey(), L = o.findCorrectRandomization(i(31), I), R = await de(j ?? ue(C), h, c(_, v, !0)), { inCommitmentSiblings: ge, inCommitmentSiblingSides: _e, accessTokenSiblings: z, accessTokenSiblingSides: B, rootHashHinkal: V, rootHashAccessToken: H, inNullifiers: U } = await fe(C, p, m, y, _.map((e) => e.map((e) => e.getConstructableParams())), O, R), W = s(v), G = N ?? i(31), ve = ne(G), K = {
|
|
22
22
|
rootHashHinkal: V,
|
|
@@ -10,7 +10,7 @@ import { generateZkProof as re } from "./generateZkProof.mjs";
|
|
|
10
10
|
import { generateFeeStructure as ie } from "../utils/fees.utils.mjs";
|
|
11
11
|
import { createHinkalHelperFromData as ae, hinkalCheckTokenRegistry as oe, hinkalCheckTronTokenRegistry as p } from "../../data-structures/Hinkal/hinkalCheckTokenRegistry.mjs";
|
|
12
12
|
import { getDataFromWorkers as se } from "./getMerkleTreeSiblingsAndRootHashes.mjs";
|
|
13
|
-
//#region
|
|
13
|
+
//#region ../shared/common/src/functions/snarkjs/constructGeneralZkProof.ts
|
|
14
14
|
var m = async (m, ce, h, g, _, v, y, b, x, S, C = n, w = e.localhost, T = h.map(() => !1), E = h.map(() => 0n), D = void 0, O = !1, k = void 0, A, j = void 0, M, N = ee, P) => {
|
|
15
15
|
let F = s(h, g), I = h.map((e) => e[0].erc20TokenAddress), L = ne(g), R = _.getShieldedPrivateKey(), z = te.findCorrectRandomization(i(31), R), B = t(w) ? await p(I, s(h, g, !0), w) : await oe(M ?? ae(w), I, s(h, g, !0)), V = t(w) ? O || B : O, { inCommitmentSiblings: H, inCommitmentSiblingSides: U, accessTokenSiblings: W, accessTokenSiblingSides: le, rootHashHinkal: G, rootHashAccessToken: K, inNullifiers: q } = await se(w, m, ce, _, h.map((e) => e.map((e) => e.getConstructableParams())), V, B), J = o(g), Y = {
|
|
16
16
|
rootHashHinkal: G,
|
|
@@ -8,7 +8,7 @@ import "../pre-transaction/index.mjs";
|
|
|
8
8
|
import { getDataFromWorkers as o } from "./getMerkleTreeSiblingsAndRootHashes.mjs";
|
|
9
9
|
import { getSolanaCalldataHash as s } from "../pre-transaction/getSolanaCalldataHash.mjs";
|
|
10
10
|
import { PublicKey as c } from "@solana/web3.js";
|
|
11
|
-
//#region
|
|
11
|
+
//#region ../shared/common/src/functions/snarkjs/constructSolanaZkProof.ts
|
|
12
12
|
var l = async (l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e.solanaLocalnet, E = !1, D = 0n, O = [], k = []) => {
|
|
13
13
|
let A = new c(x), j = new c(S), M = p.getShieldedPrivateKey(), N = h.map((e) => r(e)), P = N.map((e) => e.mintAccountPart1), F = N.map((e) => e.mintAccountPart2), I = s(C, A, j, w, y, b, O, k), L = `${C.tokenNumber}x${C.nullifierAmount}x${C.outputAmount}`, R = i(g, _), z = await n(m, new c(u), h, R), { inCommitmentSiblings: B, inCommitmentSiblingSides: V, accessTokenSiblings: H, accessTokenSiblingSides: U, rootHashHinkal: W, rootHashAccessToken: G, inNullifiers: K } = await o(T, d, f, p, g.map((e) => e.map((e) => e.getConstructableParams())), E, z), q = {
|
|
14
14
|
rootHashHinkal: W,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API_CONFIG as e } from "../../constants/server.constants.mjs";
|
|
2
2
|
import { SNAPSHOT_SERVER_URL as t } from "../../API/getServerURL.mjs";
|
|
3
3
|
import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/snarkjs/fetchMerkleTreeSiblings.ts
|
|
5
5
|
var r = async (r, i, a) => {
|
|
6
6
|
let o = i.map((e) => e.map((e) => ({
|
|
7
7
|
...e,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContractType as e } from "../../types/ethereum-network.types.mjs";
|
|
2
2
|
import { getContractWithFetcherByChainId as t } from "../web3/getContractMetadata.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/snarkjs/fetchOnChainRootHashes.ts
|
|
4
4
|
var n = async (n) => {
|
|
5
5
|
let r = t(n, e.HinkalContract), i = t(n, e.AccessTokenContract), [a, o] = await Promise.all([r.getRootHash(), i.getRootHash()]);
|
|
6
6
|
return {
|
|
@@ -2,7 +2,7 @@ import { defaultHookData as e } from "../../types/circom-data.types.mjs";
|
|
|
2
2
|
import { defaultSignatureData as t, zeroAddress as n } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { getExternalActionIdHash as r } from "../utils/external-action.utils.mjs";
|
|
4
4
|
import { getOriginalSender as i } from "./getOriginalSender.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/snarkjs/generateCircomData.ts
|
|
6
6
|
var a = (a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D = t, O) => {
|
|
7
7
|
let k = structuredClone(w);
|
|
8
8
|
return "interactionAddress" in k && delete k.interactionAddress, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Logger as e } from "../../error-handling/logger.mjs";
|
|
2
2
|
import { generateZkProofEnclave as t } from "./generateZkProofEnclave.mjs";
|
|
3
3
|
import { generateZkProofSelf as n } from "./generateZkProofSelf.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/snarkjs/generateZkProof.ts
|
|
5
5
|
var r = async (r, i, a, o) => {
|
|
6
6
|
if (o) try {
|
|
7
7
|
return await t(r, i, a);
|
|
@@ -4,7 +4,7 @@ import "../../data-structures/http/index.mjs";
|
|
|
4
4
|
import { ENCLAVE_EC2_URL as n } from "./constant.mjs";
|
|
5
5
|
import { makeEnclaveHandshakeAndEncryptInput as r } from "../utils/encryptInputForEnclave.mjs";
|
|
6
6
|
import { getWASMFile as i, getZKeyFile as a } from "./getZKFiles.mjs";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/snarkjs/generateZkProofEnclave.ts
|
|
8
8
|
var o = (e) => {
|
|
9
9
|
if (e.startsWith("http")) {
|
|
10
10
|
let t = e.split("/").at(-1);
|
|
@@ -2,7 +2,7 @@ import { getWASMFile as e, getZKeyFile as t } from "./getZKFiles.mjs";
|
|
|
2
2
|
import { WorkerVariant as n } from "../../webworker/worker.registry.mjs";
|
|
3
3
|
import { performTaskWithWorker as r } from "../../webworker/performTaskWithWorker.mjs";
|
|
4
4
|
import { SnarkJSWorkerActionType as i } from "../../webworker/snarkjsWorker/snarkjsWorker.types.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/snarkjs/generateZkProofSelf.ts
|
|
6
6
|
var a = async (a, o, s) => {
|
|
7
7
|
let c = e(o, a), l = t(o, a), { publicSignals: u, zkCallData: d } = await r({
|
|
8
8
|
type: n.SnarkJS,
|
|
@@ -9,7 +9,7 @@ import "../../data-structures/merkle-tree/index.mjs";
|
|
|
9
9
|
import { ZKProofWorkerActionType as s } from "../../webworker/zkProofWorker/zkProofWorker.types.mjs";
|
|
10
10
|
import { fetchMerkleTreeSiblings as c } from "./fetchMerkleTreeSiblings.mjs";
|
|
11
11
|
import { fetchOnChainRootHashes as l } from "./fetchOnChainRootHashes.mjs";
|
|
12
|
-
//#region
|
|
12
|
+
//#region ../shared/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.ts
|
|
13
13
|
var u = async (e, t) => {
|
|
14
14
|
let n = e.getRootHash();
|
|
15
15
|
if (n === void 0) throw Error("Root hash not available from patched merkle tree");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../shared/common/src/functions/snarkjs/getOriginalSender.ts
|
|
3
3
|
var t = (t, n) => n === e ? t ?? e : e;
|
|
4
4
|
//#endregion
|
|
5
5
|
export { t as getOriginalSender };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { chainIds as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { PROVER_VERSION as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { localVerifiers as n, prodVerifiers as r } from "./constant.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/snarkjs/getZKFiles.ts
|
|
5
5
|
var i = (i, a) => a === e.localhost || a === e.solanaLocalnet || a === e.tronLocalnet ? n[`${i}${t}Wasm`] : r()[`${i}${t}Wasm`], a = (i, a) => a === e.localhost || a === e.solanaLocalnet || a === e.tronLocalnet ? n[`${i}${t}Zkey`] : r()[`${i}${t}Zkey`];
|
|
6
6
|
//#endregion
|
|
7
7
|
export { i as getWASMFile, a as getZKeyFile };
|
|
@@ -4,7 +4,7 @@ import { caseInsensitiveEqual as r } from "./caseInsensitive.utils.mjs";
|
|
|
4
4
|
import { ethers as i } from "ethers";
|
|
5
5
|
import { PublicKey as a } from "@solana/web3.js";
|
|
6
6
|
import { TronWeb as o } from "tronweb";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/utils/addresses.ts
|
|
8
8
|
var s = [
|
|
9
9
|
"http://",
|
|
10
10
|
"https://",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { safeJsonStringify as e } from "./serialize.utils.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region ../shared/common/src/functions/utils/amounts.utils.ts
|
|
3
3
|
var t = (e) => e.reduce((e, t) => e + t, 0), n = (e) => e.reduce((e, t) => e + t, 0n), r = (e) => e / 100, i = (e, t) => t * e / 10000n;
|
|
4
4
|
function a(e) {
|
|
5
5
|
return typeof e == "object" && "toBigInt" in e ? e.toBigInt() : BigInt(e);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { constructStealthAddressStructure as e } from "./addresses.mjs";
|
|
2
2
|
import { Utxo as t } from "../../data-structures/utxo/Utxo.mjs";
|
|
3
3
|
import { calcStealthAddressStructure as n } from "../snarkjs/common.snarkjs.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region ../shared/common/src/functions/utils/buildClaimableDepositPlan.ts
|
|
5
5
|
var r = ({ recipientAmounts: r, recipientAddresses: i, recipientInfos: a, nonce: o, tokenAddress: s, getShieldedPrivateKeyFromNonce: c }) => {
|
|
6
6
|
if (i.length !== r.length) throw Error("recipientAddresses must have the same length as recipientAmounts");
|
|
7
7
|
if (a && a.length !== r.length) throw Error("recipientInfos must have the same length as recipientAmounts");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Buffer as e } from "buffer";
|
|
2
2
|
import { BN as t } from "@coral-xyz/anchor";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/utils/bytes32.utils.ts
|
|
4
4
|
var n = (e) => {
|
|
5
5
|
if (e.length !== 32 || e.some((e) => !Number.isInteger(e) || e < 0 || e >= 256)) throw Error("invalid bytes32 value");
|
|
6
6
|
return e.reduce((e, t) => e * 256n + BigInt(t), 0n);
|
|
@@ -4,7 +4,7 @@ import "../../constants/index.mjs";
|
|
|
4
4
|
import { FileCacheDevice as n } from "../../data-structures/cacheDevices/FileCacheDevice.mjs";
|
|
5
5
|
import { LocalStorageCacheDevice as r } from "../../data-structures/cacheDevices/LocalStorageCacheDevice.mjs";
|
|
6
6
|
import "../../data-structures/cacheDevices/index.mjs";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/utils/cacheDevice.utils.ts
|
|
8
8
|
var i = (i) => {
|
|
9
9
|
if (t) {
|
|
10
10
|
let t, r;
|
|
@@ -4,7 +4,7 @@ import { networkRegistry as n } from "../../constants/chains.constants.mjs";
|
|
|
4
4
|
import { deserializeDecodedTxs as r, serializeDecodedTxs as i } from "./getDataFromTransaction.mjs";
|
|
5
5
|
import { getContractAddress as a } from "./getContractAddress.mjs";
|
|
6
6
|
import { get as o, set as s } from "idb-keyval";
|
|
7
|
-
//#region
|
|
7
|
+
//#region ../shared/common/src/functions/utils/cacheFunctions.ts
|
|
8
8
|
var c = {
|
|
9
9
|
encryptedOutputs: [],
|
|
10
10
|
lastOutput: ""
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region ../shared/common/src/functions/utils/caseInsensitive.utils.ts
|
|
2
2
|
var e = (e, t) => e === void 0 || t === void 0 || e === null || t === null ? !1 : e.toLowerCase() === t.toLowerCase(), t = (t, n) => t.some((t) => e(t, n)), n = (e, t) => e.some((e) => e.toLowerCase().startsWith(t.toLowerCase()));
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as caseInsensitiveEqual, t as lowerCaseIncludes, n as lowerCaseStartsWith };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { ethers as t } from "ethers";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/utils/convertEmporiumOpToCallInfo.ts
|
|
4
4
|
var n = (n, r, i) => {
|
|
5
5
|
let { hinkalAddress: a } = e[i].contractData, o = t.getBytes(n), s = o.slice(0, 20), c = o.slice(20, 21), [l, u, d, f] = [
|
|
6
6
|
s,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExternalActionId as e } from "../../types/external-action.types.mjs";
|
|
2
2
|
import { IntegrationProvider as t } from "../../types/hinkal.types.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/utils/convertIntegrationProviderToExternalActionId.ts
|
|
4
4
|
var n = {
|
|
5
5
|
[t.UNISWAP]: e.Uniswap,
|
|
6
6
|
[t.ODOS]: e.Odos,
|
|
@@ -2,7 +2,7 @@ import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
|
2
2
|
import { CustomSolanaConnection as t } from "../../providers/CustomSolanaConnection.mjs";
|
|
3
3
|
import { CustomEthersProvider as n } from "../../providers/CustomEthersProvider.mjs";
|
|
4
4
|
import { ethers as r } from "ethers";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/utils/create-provider.ts
|
|
6
6
|
var i = (e) => new r.JsonRpcProvider(e), a = (t) => {
|
|
7
7
|
let { fetchRpcUrl: i } = e[t];
|
|
8
8
|
if (!i) throw Error("RPC URL not found for the specified chain ID");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getSignatureEnclaveCall as e, storeSignatureEnclaveCall as t } from "../../API/enclaveSignatureCalls.mjs";
|
|
2
2
|
import { makeEnclaveHandshakeAndEncryptInput as n } from "./encryptInputForEnclave.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region ../shared/common/src/functions/utils/enclave-signature-storage.ts
|
|
4
4
|
var r = async (e, r) => {
|
|
5
5
|
let { keyCiphertext: i, inputCiphertext: a } = await n(r);
|
|
6
6
|
await t(e, a, i);
|
|
@@ -2,7 +2,7 @@ import { getUtxosEnclaveCall as e, storeUtxoEnclaveCall as t } from "../../API/e
|
|
|
2
2
|
import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
|
|
3
3
|
import { makeEnclaveHandshakeAndEncryptInput as r } from "./encryptInputForEnclave.mjs";
|
|
4
4
|
import { serializeUtxoConstructorParams as i } from "./serialize-utxos.utils.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region ../shared/common/src/functions/utils/enclave-utxo-storage.ts
|
|
6
6
|
var a = (e) => {
|
|
7
7
|
let t = /* @__PURE__ */ new Set(), r = [];
|
|
8
8
|
for (let i of e) {
|