@hinkal/common 0.2.29 → 0.2.30
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.mjs +1 -1
- 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/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +0 -2068
- package/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arcTestnet.json.mjs +0 -2246
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +0 -2068
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +0 -2265
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +1 -2266
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +0 -2068
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +0 -2068
- 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/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.mjs +1 -1
- package/constants/token-data/index.mjs +1 -1
- 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.mjs +1 -1
- 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.mjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +2 -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.mjs +1 -1
- 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.mjs +1 -1
- package/error-handling/error-codes.constants.mjs +1 -1
- package/error-handling/get-error.message.mjs +1 -1
- 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.mjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +1 -1
- 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.d.ts +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.cjs +1 -1
- package/functions/utils/create-provider.d.ts +1 -1
- package/functions/utils/create-provider.mjs +5 -7
- 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.d.ts +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.d.ts +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +16 -14
- package/functions/web3/events/getInputUtxosEnclave.mjs +1 -1
- package/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +2 -2
- package/functions/web3/events/getTransactionLogEvents.d.ts +5 -8
- 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/mutexes/mutex.mjs +1 -1
- package/package.json +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/providers/CustomEthersProvider.cjs +0 -1
- package/providers/CustomEthersProvider.mjs +0 -28
|
@@ -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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/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 libs/shared/common/src/functions/utils/convertIntegrationProviderToExternalActionId.ts
|
|
4
4
|
var n = {
|
|
5
5
|
[t.UNISWAP]: e.Uniswap,
|
|
6
6
|
[t.ODOS]: e.Odos,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../providers/CustomSolanaConnection.cjs`)
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../providers/CustomSolanaConnection.cjs`);let n=require(`ethers`);var r=e=>new n.ethers.JsonRpcProvider(e),i=t=>{let{fetchRpcUrl:r}=e.networkRegistry[t];if(!r)throw Error(`RPC URL not found for the specified chain ID`);return new n.JsonRpcProvider(r,t,{staticNetwork:!0})},a=(e,n=`confirmed`)=>new t.CustomSolanaConnection(e,n);exports.createCustomRpcProvider=i,exports.createCustomSolanaConnection=a,exports.createProvider=r;
|
|
@@ -2,5 +2,5 @@ import { CustomSolanaConnection } from '../../providers/CustomSolanaConnection';
|
|
|
2
2
|
import { Commitment, ConnectionConfig } from '@solana/web3.js';
|
|
3
3
|
import { ethers } from 'ethers';
|
|
4
4
|
export declare const createProvider: (rpcUrl: string) => ethers.JsonRpcProvider;
|
|
5
|
-
export declare const createCustomRpcProvider: (chainId: number) =>
|
|
5
|
+
export declare const createCustomRpcProvider: (chainId: number) => any;
|
|
6
6
|
export declare const createCustomSolanaConnection: (endpoint: string, commitmentOrConfig?: Commitment | ConnectionConfig) => CustomSolanaConnection;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { CustomSolanaConnection as t } from "../../providers/CustomSolanaConnection.mjs";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region ../shared/common/src/functions/utils/create-provider.ts
|
|
3
|
+
import { JsonRpcProvider as n, ethers as r } from "ethers";
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/create-provider.ts
|
|
6
5
|
var i = (e) => new r.JsonRpcProvider(e), a = (t) => {
|
|
7
|
-
let { fetchRpcUrl:
|
|
8
|
-
if (!
|
|
9
|
-
|
|
10
|
-
return new r.BrowserProvider(a);
|
|
6
|
+
let { fetchRpcUrl: r } = e[t];
|
|
7
|
+
if (!r) throw Error("RPC URL not found for the specified chain ID");
|
|
8
|
+
return new n(r, t, { staticNetwork: !0 });
|
|
11
9
|
}, o = (e, n = "confirmed") => new t(e, n);
|
|
12
10
|
//#endregion
|
|
13
11
|
export { a as createCustomRpcProvider, o as createCustomSolanaConnection, i as createProvider };
|
|
@@ -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 libs/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 libs/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) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/encodeTokenWithId.ts
|
|
3
3
|
var t = (t, n) => {
|
|
4
4
|
let r = `${n.erc20TokenAddress}-${n.tokenId}`;
|
|
5
5
|
return e(t) ? r : r.toLowerCase();
|
|
@@ -5,7 +5,7 @@ import { ENCLAVE_EC2_URL as n } from "../snarkjs/constant.mjs";
|
|
|
5
5
|
import { ethers as r } from "ethers";
|
|
6
6
|
import i from "libsodium-wrappers";
|
|
7
7
|
import * as a from "node-forge";
|
|
8
|
-
//#region
|
|
8
|
+
//#region libs/shared/common/src/functions/utils/encryptInputForEnclave.ts
|
|
9
9
|
var o = 214, s = async () => {
|
|
10
10
|
let e = (await t.get(`${n}/handshake`)).public_key, r = a.util.decode64(e), i = a.asn1.fromDer(r);
|
|
11
11
|
return a.pki.publicKeyFromAsn1(i);
|
|
@@ -6,7 +6,7 @@ import { getAmountInToken as i } from "../web3/etherFunctions.mjs";
|
|
|
6
6
|
import { customTokenRegistry as a } from "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
7
7
|
import { fixDecimalsAmount as o } from "./amounts.utils.mjs";
|
|
8
8
|
import { PopularTokenSymbols as s, chainNativeTokenSymbol as c } from "../../constants/tokens.constants.mjs";
|
|
9
|
-
//#region
|
|
9
|
+
//#region libs/shared/common/src/functions/utils/erc20tokenFunctions.ts
|
|
10
10
|
var l = (e) => {
|
|
11
11
|
let t = r(e), n = a.getCustomTokens(e);
|
|
12
12
|
return [...t, ...n];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { chainIdsByType as e, networkRegistry as t } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import "../../constants/index.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region libs/shared/common/src/functions/utils/evmNetworkFunctions.ts
|
|
4
4
|
var n = (e) => t[e], r = (t) => Object.keys(e)[Object.values(e).findIndex((e) => e.includes(t.chainId))];
|
|
5
5
|
//#endregion
|
|
6
6
|
export { n as getNetworkObject, r as getNetworkType };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExternalActionId as e } from "../../types/external-action.types.mjs";
|
|
2
2
|
import { CIRCOM_P as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { ethers as n } from "ethers";
|
|
4
|
-
//#region
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/external-action.utils.ts
|
|
5
5
|
var r = (e) => e === 0n ? 0n : BigInt(n.id(e)) % t, i = (t) => BigInt(t) === 0n ? e.Transact : Object.values(e).find((e) => BigInt(t) === r(e));
|
|
6
6
|
//#endregion
|
|
7
7
|
export { i as getExternalActionIdFromNumber, r as getExternalActionIdHash };
|
|
@@ -3,7 +3,7 @@ import { solanaNativeAddress as t, zeroAddress as n } from "../../constants/prot
|
|
|
3
3
|
import { BPS_DENOMINATOR as r, EXTENDED_NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS as i, NON_NATIVE_GAS_COST_TOKEN_SYMBOL_OPTIONS as a } from "../../constants/fees.constants.mjs";
|
|
4
4
|
import { defaultFeeStructure as o } from "../../types/hinkal.types.mjs";
|
|
5
5
|
import { getERC20Token as s } from "./erc20tokenFunctions.mjs";
|
|
6
|
-
//#region
|
|
6
|
+
//#region libs/shared/common/src/functions/utils/fees.utils.ts
|
|
7
7
|
var c = (e, t) => {
|
|
8
8
|
if (e.length !== t.length) throw Error("length mismatch");
|
|
9
9
|
let n = e.findIndex((e) => e !== 0n);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { chainIds as e, isSolanaLike as t } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { mediaUrls as n } from "../../constants/mediaUrls.constants.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region libs/shared/common/src/functions/utils/getBlockExplorerUrl.ts
|
|
4
4
|
var r = (r) => r === e.polygon ? n.POLY_SCAN : r === e.arbMainnet ? n.ARB_SCAN : r === e.ethMainnet ? n.ETH_SCAN : r === e.avalanche ? n.AVAX_SCAN : r === e.bnbMainnet ? n.BSC_SCAN : r === e.base ? n.BASE_SCAN : r === e.optimism ? n.OPTIMISM_SCAN : r === e.arcTestnet ? n.ARC_TESTNET_EXPLORER : r === e.tronNile ? n.TRON_NILE_EXPLORER : r === e.tronMainnet ? n.TRON_MAINNET_EXPLORER : t(r) ? n.SOL_SCAN : n.ETH_SCAN;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { r as getBlockExplorerUrl };
|
|
@@ -2,7 +2,7 @@ import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
|
|
|
2
2
|
import { UserKeys as t } from "../../data-structures/crypto-keys/keys.mjs";
|
|
3
3
|
import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
|
|
4
4
|
import "../../data-structures/crypto-keys/index.mjs";
|
|
5
|
-
//#region
|
|
5
|
+
//#region libs/shared/common/src/functions/utils/getRecipientInfoFromUserKeys.ts
|
|
6
6
|
var r = (r) => {
|
|
7
7
|
let i = r.getShieldedPrivateKey(), a = t.getEncryptionKeyPair(i).publicKey, o = new n({
|
|
8
8
|
amount: 0n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ethers as e } from "ethers";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/getSignerFromContract.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
let { runner: n } = t;
|
|
5
5
|
if (!(n instanceof e.AbstractSigner)) throw Error("expected signer");
|
|
@@ -7,7 +7,7 @@ import { decodeUtxo as i } from "../../data-structures/crypto-keys/decodeUTXO.mj
|
|
|
7
7
|
import { decryptUtxo as a } from "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
8
8
|
import { getContractAddress as o } from "./getContractAddress.mjs";
|
|
9
9
|
import { ethers as s } from "ethers";
|
|
10
|
-
//#region
|
|
10
|
+
//#region libs/shared/common/src/functions/utils/getUtxosFromReceipt.utils.ts
|
|
11
11
|
var c = (r, a, s, c) => {
|
|
12
12
|
let l = a.getContractWithFetcher(s, e.HinkalContract), u = l.interface, d = a.userKeys.getShieldedPrivateKey(), f = o(l);
|
|
13
13
|
return r.logs.filter((e) => t(e.address, f)).map((e) => {
|
|
@@ -5,7 +5,7 @@ import { decryptUtxo as r } from "../../data-structures/crypto-keys/encryptDecry
|
|
|
5
5
|
import { convertBytes32ToBigInt as i } from "./bytes32.utils.mjs";
|
|
6
6
|
import { PublicKey as a } from "@solana/web3.js";
|
|
7
7
|
import { BorshCoder as o, EventParser as s } from "@coral-xyz/anchor";
|
|
8
|
-
//#region
|
|
8
|
+
//#region libs/shared/common/src/functions/utils/getUtxosFromReceiptSolana.ts
|
|
9
9
|
var c = (e) => e instanceof Uint8Array ? e : Array.isArray(e) ? Uint8Array.from(e) : new Uint8Array(e), l = (r, c, l, u) => [...new s(c.programId, new o(c.idl)).parseLogs(r.meta?.logMessages ?? [])].filter(({ name: e }) => e === "newCommitment").filter(({ data: e }) => e.encryptedOutput.length === 0).map((e) => {
|
|
10
10
|
let { onChainData: r } = e.data, [o, s, c, u, , , , d] = r.map(i), [, f, p] = r, m = new a([...f.slice(16), ...p.slice(16)]), h = t(s, c), g = new n({
|
|
11
11
|
amount: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uniswapWorkaroundAddresses as e } from "../../constants/permit2.constants.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/involves-permit2-op.ts
|
|
3
3
|
var t = (t) => t.some((t) => e.some((e) => t.toLowerCase().includes(e.slice(2).toLowerCase())));
|
|
4
4
|
//#endregion
|
|
5
5
|
export { t as uniswapWorkaround };
|
package/functions/utils/ipfs.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CID as e } from "multiformats";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/ipfs.ts
|
|
3
3
|
var t = (e) => {
|
|
4
4
|
if (e.startsWith("ipfs://ipfs/")) return e.replace("ipfs://ipfs/", "");
|
|
5
5
|
if (e.startsWith("ipfs://")) return e.replace("ipfs://", "");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region libs/shared/common/src/functions/utils/is-valid-url.ts
|
|
2
2
|
var e = (e) => e ? /^https?:\/\/[a-z0-9.-]+\.[a-z]{2,}(?::\d{1,5})?(?:\/[^\s]*)?$/i.test(e.trim()) : !1;
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as isValidUrl };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MERKLE_LEVELS as e } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { poseidonFunction as t } from "../../crypto/poseidon.mjs";
|
|
3
3
|
import { MerkleTree as n } from "../../data-structures/merkle-tree/MerkleTree.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/merkleTree.utils.ts
|
|
5
5
|
var r = (e) => new Map(Object.entries(e).map(([e, t]) => [BigInt(e), BigInt(t)])), i = (i) => {
|
|
6
6
|
let a = r(i.tree), o = i.reverseTree ? r(i.reverseTree) : void 0;
|
|
7
7
|
return n.createWithData(a, o, BigInt(i.index), BigInt(i.count), t, e, 0n);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mutex as e } from "async-mutex";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/mutexes.utils.ts
|
|
3
3
|
var t = /* @__PURE__ */ new Map(), n = (n) => (t.has(n) || t.set(n, new e()), t.get(n) ?? new e());
|
|
4
4
|
//#endregion
|
|
5
5
|
export { n as getChainBalanceFetchingMutex };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import "../../constants/index.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region libs/shared/common/src/functions/utils/networks.utils.ts
|
|
4
4
|
var t = (t) => {
|
|
5
5
|
let n = e[t];
|
|
6
6
|
return n ? n.name : "Unsupported network";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NFT_TRANSACTION_TYPES as e } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { Logger as t } from "../../error-handling/logger.mjs";
|
|
3
3
|
import "../../error-handling/index.mjs";
|
|
4
|
-
//#region
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/nftTokenFunctions.ts
|
|
5
5
|
var n = (n) => {
|
|
6
6
|
let r = {};
|
|
7
7
|
return n.forEach(({ assetInfo: n, id: i }) => {
|
|
@@ -5,7 +5,7 @@ import r from "../../providers/EthersProviderAdapter.mjs";
|
|
|
5
5
|
import { SolanaProviderAdapter as i } from "../../providers/SolanaProviderAdapter.mjs";
|
|
6
6
|
import { ethers as a } from "ethers";
|
|
7
7
|
import { PublicKey as o } from "@solana/web3.js";
|
|
8
|
-
//#region
|
|
8
|
+
//#region libs/shared/common/src/functions/utils/prepareHinkal.ts
|
|
9
9
|
var s = (t) => {
|
|
10
10
|
let r = n(e.ethMainnet);
|
|
11
11
|
return new a.Wallet(t, r);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../constants/conversion.constants.mjs";
|
|
2
2
|
import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
|
|
3
|
-
//#region
|
|
3
|
+
//#region libs/shared/common/src/functions/utils/processUseApprovalUtxoData.ts
|
|
4
4
|
var t = (e, t, n) => {
|
|
5
5
|
let r = [...e];
|
|
6
6
|
for (; r.length < n;) r.push(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region libs/shared/common/src/functions/utils/proxyAvatar.utils.ts
|
|
2
2
|
var e = 353, t = () => Math.floor(Math.random() * 353);
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as PROXY_AVATAR_INDEX_COUNT, t as getRandomProxyAvatarIndex };
|
|
@@ -12,7 +12,7 @@ import { getFormattedIpfsUrl as m } from "./ipfs.mjs";
|
|
|
12
12
|
import { ethers as h } from "ethers";
|
|
13
13
|
import { Connection as g, PublicKey as _ } from "@solana/web3.js";
|
|
14
14
|
import { TOKEN_2022_PROGRAM_ID as v, TOKEN_PROGRAM_ID as y, getAssociatedTokenAddress as b } from "@solana/spl-token";
|
|
15
|
-
//#region
|
|
15
|
+
//#region libs/shared/common/src/functions/utils/publicBalance.utils.ts
|
|
16
16
|
var x = async (e, t, n) => {
|
|
17
17
|
try {
|
|
18
18
|
let i = n.erc20TokenAddress, a, o = new h.Contract(n.erc20TokenAddress, p, e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region libs/shared/common/src/functions/utils/requireEnv.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = process.env[e];
|
|
4
4
|
return t === void 0 && (console.log(`Error: ${e} environment variable not set`), process.exitCode = 1, process.exit()), t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region libs/shared/common/src/functions/utils/serialize.utils.ts
|
|
2
2
|
var e = (t) => typeof t == "bigint" ? t.toString() : typeof t != "object" || !t ? t : Array.isArray(t) ? t.map((t) => e(t)) : t instanceof Date ? t.toISOString() : Object.fromEntries(Object.entries(t).map(([t, n]) => [t, e(n)])), t = (e, t = null, n) => JSON.stringify(e, (e, n) => {
|
|
3
3
|
let r = typeof t == "function" ? t(e, n) : n;
|
|
4
4
|
return typeof r == "bigint" ? r.toString() : r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { poseidonHash as e } from "../../crypto/poseidon.mjs";
|
|
2
2
|
import { ethers as t } from "ethers";
|
|
3
3
|
import { PublicKey as n } from "@solana/web3.js";
|
|
4
|
-
//#region
|
|
4
|
+
//#region libs/shared/common/src/functions/utils/solanaMint.utils.ts
|
|
5
5
|
var r = (e) => {
|
|
6
6
|
let n = e.toBytes();
|
|
7
7
|
return BigInt(t.hexlify(n));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../constants/chains.constants.mjs";
|
|
2
|
-
//#region
|
|
2
|
+
//#region libs/shared/common/src/functions/utils/string.utils.ts
|
|
3
3
|
function r(e) {
|
|
4
4
|
return e?.toLowerCase().split(" ").map((e) => e.charAt(0).toUpperCase() + e.substring(1)).join(" ");
|
|
5
5
|
}
|