@kapa123456789/sdk 0.0.25 → 0.0.36
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/common/src/API/accessCodeCalls.cjs +1 -1
- package/common/src/API/accessCodeCalls.mjs +0 -1
- package/common/src/API/admin-calls.cjs +1 -1
- package/common/src/API/admin-calls.mjs +0 -1
- package/common/src/API/brotherhoodCalls.cjs +1 -1
- package/common/src/API/brotherhoodCalls.mjs +0 -1
- package/common/src/API/callLifiAPI.cjs +1 -1
- package/common/src/API/callLifiAPI.mjs +0 -1
- package/common/src/API/callMonitor.cjs +1 -1
- package/common/src/API/callMonitor.mjs +0 -1
- package/common/src/API/callOdosAPI.cjs +1 -1
- package/common/src/API/callOdosAPI.mjs +0 -1
- package/common/src/API/callOkxAPI.cjs +1 -1
- package/common/src/API/callOkxAPI.mjs +0 -1
- package/common/src/API/callOneInchAPI.cjs +1 -1
- package/common/src/API/callOneInchAPI.mjs +0 -1
- package/common/src/API/callRelayer.cjs +1 -1
- package/common/src/API/callRelayer.mjs +0 -1
- package/common/src/API/dashboardAccountCalls.cjs +1 -1
- package/common/src/API/dashboardAccountCalls.mjs +0 -1
- package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
- package/common/src/API/dashboardAccountMemberCalls.mjs +0 -1
- package/common/src/API/dashboardBalanceCalls.cjs +1 -1
- package/common/src/API/dashboardBalanceCalls.mjs +0 -1
- package/common/src/API/dashboardContactCalls.cjs +1 -1
- package/common/src/API/dashboardContactCalls.mjs +0 -1
- package/common/src/API/dashboardPayoutCalls.cjs +1 -1
- package/common/src/API/dashboardPayoutCalls.mjs +0 -1
- package/common/src/API/dashboardTransactionCalls.cjs +1 -1
- package/common/src/API/dashboardTransactionCalls.mjs +0 -1
- package/common/src/API/enclaveSignatureCalls.cjs +1 -1
- package/common/src/API/enclaveSignatureCalls.mjs +0 -1
- package/common/src/API/enclaveUtxoCalls.cjs +1 -1
- package/common/src/API/enclaveUtxoCalls.mjs +0 -1
- package/common/src/API/fetchCommitmentsCache.cjs +1 -1
- package/common/src/API/fetchCommitmentsCache.mjs +0 -1
- package/common/src/API/generate-trading-points.cjs +1 -1
- package/common/src/API/generate-trading-points.mjs +0 -1
- package/common/src/API/get-token-data.cjs +1 -1
- package/common/src/API/get-token-data.mjs +0 -1
- package/common/src/API/getGasEstimates.cjs +1 -1
- package/common/src/API/getGasEstimates.mjs +0 -1
- package/common/src/API/getTokenPrice.cjs +1 -1
- package/common/src/API/getTokenPrice.mjs +0 -1
- package/common/src/API/kycCalls.cjs +1 -1
- package/common/src/API/kycCalls.mjs +0 -1
- package/common/src/API/leaderboardCalls.cjs +1 -1
- package/common/src/API/leaderboardCalls.mjs +0 -1
- package/common/src/API/onrampCalls.cjs +1 -1
- package/common/src/API/onrampCalls.mjs +0 -1
- package/common/src/API/privacy-score-calls.cjs +1 -1
- package/common/src/API/privacy-score-calls.mjs +0 -1
- package/common/src/API/privateSendEmailNotificationsCalls.cjs +1 -1
- package/common/src/API/privateSendEmailNotificationsCalls.mjs +0 -1
- package/common/src/API/privateSendNonceCalls.cjs +1 -1
- package/common/src/API/privateSendNonceCalls.mjs +0 -1
- package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
- package/common/src/API/privateSendRecipientInfoCalls.mjs +0 -1
- package/common/src/API/proxyAccountsCalls.cjs +1 -1
- package/common/src/API/proxyAccountsCalls.mjs +0 -1
- package/common/src/API/referralsCalls.cjs +1 -1
- package/common/src/API/referralsCalls.mjs +0 -1
- package/common/src/API/relayCalls.cjs +1 -1
- package/common/src/API/relayCalls.mjs +0 -1
- package/common/src/API/rewardsUserCalls.cjs +1 -1
- package/common/src/API/rewardsUserCalls.mjs +0 -1
- package/common/src/API/seedless-calls.cjs +1 -1
- package/common/src/API/seedless-calls.mjs +0 -1
- package/common/src/API/send-telegram-callback.cjs +1 -1
- package/common/src/API/send-telegram-callback.mjs +0 -1
- package/common/src/API/simulate-batch-tx.cjs +1 -1
- package/common/src/API/simulate-batch-tx.mjs +0 -1
- package/common/src/API/simulate-transaction.cjs +1 -1
- package/common/src/API/simulate-transaction.mjs +0 -1
- package/common/src/API/snapshot-event-calls.cjs +1 -1
- package/common/src/API/snapshot-event-calls.mjs +0 -1
- package/common/src/API/solana-calls.cjs +1 -1
- package/common/src/API/solana-calls.mjs +0 -1
- package/common/src/API/temporaryWalletCalls.cjs +1 -1
- package/common/src/API/temporaryWalletCalls.mjs +0 -1
- package/common/src/API/token-calls.cjs +1 -1
- package/common/src/API/token-calls.mjs +0 -1
- package/common/src/API/tronSubsidyCalls.cjs +1 -1
- package/common/src/API/tronSubsidyCalls.mjs +0 -1
- package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
- package/common/src/API/weeklyAnalyticCalls.mjs +0 -1
- package/common/src/constants/addresses.constants.cjs +1 -1
- package/common/src/constants/addresses.constants.mjs +0 -1
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.mjs +30 -30
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.mjs +1 -1
- package/common/src/constants/kyc.constants.cjs +1 -1
- package/common/src/constants/kyc.constants.mjs +1 -1
- package/common/src/constants/lifi.constants.cjs +1 -1
- package/common/src/constants/lifi.constants.mjs +1 -1
- package/common/src/constants/permit2.constants.cjs +1 -1
- package/common/src/constants/permit2.constants.mjs +7 -8
- package/common/src/constants/protocol.constants.cjs +1 -1
- package/common/src/constants/protocol.constants.mjs +3 -8
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.mjs +1 -2
- package/common/src/constants/vite.constants.cjs +1 -1
- package/common/src/constants/vite.constants.mjs +2 -2
- package/common/src/crypto/babyJub.cjs +1 -1
- package/common/src/crypto/babyJub.mjs +6 -5
- package/common/src/crypto/poseidon.cjs +1 -1
- package/common/src/crypto/poseidon.mjs +11 -10
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +0 -4
- package/common/src/data-structures/Hinkal/Hinkal.mjs +2 -13
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +0 -3
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +0 -4
- package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +0 -4
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +0 -3
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +0 -2
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSignSubAccount.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +0 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +0 -4
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +0 -3
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +0 -2
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +0 -3
- package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSwap.mjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +0 -2
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +0 -2
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +0 -2
- package/common/src/data-structures/Hinkal/index.d.ts +0 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +0 -3
- package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/activity-db.mjs +3 -7
- package/common/src/data-structures/IndexedDB/index.d.ts +0 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +3 -4
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +1 -2
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +0 -2
- package/common/src/data-structures/crypto-keys/keyUtils.cjs +1 -1
- package/common/src/data-structures/crypto-keys/keyUtils.mjs +1 -1
- package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +0 -2
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +0 -2
- package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +0 -2
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +0 -2
- package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +0 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +0 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +0 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +0 -1
- package/common/src/error-handling/customErrors/customErrors.helpers.cjs +1 -1
- package/common/src/error-handling/customErrors/customErrors.helpers.mjs +0 -2
- package/common/src/error-handling/get-error.message.cjs +1 -1
- package/common/src/error-handling/get-error.message.mjs +1 -3
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +0 -2
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.mjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +0 -4
- package/common/src/functions/kyc/checkTokenLimitsUSD.cjs +1 -1
- package/common/src/functions/kyc/checkTokenLimitsUSD.mjs +0 -5
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +0 -1
- package/common/src/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/common/src/functions/pre-transaction/sendV0Transaction.mjs +1 -1
- package/common/src/functions/pre-transaction/solana.cjs +1 -1
- package/common/src/functions/pre-transaction/solana.mjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.mjs +1 -2
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +1 -2
- package/common/src/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructEmporiumProof.mjs +0 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +0 -1
- package/common/src/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
- package/common/src/functions/snarkjs/generateZkProofEnclave.mjs +0 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +0 -1
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.mjs +0 -1
- package/common/src/functions/utils/cacheDevice.utils.cjs +1 -1
- package/common/src/functions/utils/cacheDevice.utils.mjs +0 -2
- package/common/src/functions/utils/cacheFunctions.cjs +1 -1
- package/common/src/functions/utils/cacheFunctions.mjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/common/src/functions/utils/encryptInputForEnclave.mjs +0 -1
- package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -14
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +0 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +0 -3
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +0 -1
- package/common/src/functions/utils/process.utils.cjs +1 -1
- package/common/src/functions/utils/process.utils.mjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
- package/common/src/functions/utils/publicBalance.utils.mjs +6 -20
- package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
- package/common/src/functions/utils/solanaMint.utils.mjs +1 -1
- package/common/src/functions/utils/string.utils.cjs +1 -1
- package/common/src/functions/utils/string.utils.mjs +7 -10
- package/common/src/functions/utils/token-check.utils.cjs +1 -1
- package/common/src/functions/utils/token-check.utils.mjs +0 -2
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.mjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/common/src/functions/utils/tx-confirmation.utils.mjs +1 -2
- package/common/src/functions/web3/events/balanceChangedHandler.cjs +1 -1
- package/common/src/functions/web3/events/balanceChangedHandler.d.ts +1 -1
- package/common/src/functions/web3/events/balanceChangedHandler.mjs +0 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.mjs +0 -1
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +0 -1
- package/common/src/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/common/src/functions/web3/functionCalls/accessTokenCalls.mjs +0 -1
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.cjs +1 -1
- package/common/src/functions/web3/functionCalls/recoverTransactionFromError.mjs +0 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +0 -2
- package/common/src/functions/web3/getSolanaPriorityFee.cjs +1 -1
- package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -1
- package/common/src/functions/web3/odosAPI.cjs +1 -1
- package/common/src/functions/web3/odosAPI.mjs +0 -2
- package/common/src/functions/web3/okxAPI.cjs +1 -1
- package/common/src/functions/web3/okxAPI.mjs +1 -1
- package/common/src/functions/web3/oneInchAPI.cjs +1 -1
- package/common/src/functions/web3/oneInchAPI.mjs +0 -3
- package/common/src/functions/web3/uniswapAPI.cjs +1 -1
- package/common/src/functions/web3/uniswapAPI.mjs +1 -4
- package/common/src/providers/TronProviderAdapter.cjs +1 -1
- package/common/src/providers/TronProviderAdapter.mjs +0 -1
- package/common/src/types/balances.types.d.ts +0 -22
- package/common/src/types/hinkal.types.cjs +1 -1
- package/common/src/types/hinkal.types.mjs +1 -1
- package/common/src/types/kyc.types.cjs +1 -1
- package/common/src/types/kyc.types.mjs +1 -1
- package/common/src/types/new-rewards.type.cjs +1 -1
- package/common/src/types/new-rewards.type.mjs +1 -5
- package/common/src/webworker/logError-FeCdVeea.js +1 -0
- package/common/src/webworker/package.json +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +1 -0
- package/common/src/webworker/snarkjsWorkerNode.cjs +122 -11
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerNode.d.ts +1 -0
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/workerProxy-5NFtWSKK.js +1 -0
- package/common/src/webworker/workerThreadsPatch.d.ts +2 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerNode.d.ts +1 -0
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/functions/index.mjs +0 -1
- package/functions/utils/index.mjs +0 -1
- package/index.cjs +1 -1
- package/index.mjs +0 -1
- package/package.json +1 -1
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +3 -3
- package/services/Hinkal.mjs +7 -10
- package/types/IHinkal.d.ts +3 -4
- package/types/balances.types.d.ts +1 -1
- package/common/src/API/checkRisk.cjs +0 -1
- package/common/src/API/checkRisk.mjs +0 -3
- package/common/src/API/enclaveRecipientInfoCalls.cjs +0 -1
- package/common/src/API/enclaveRecipientInfoCalls.mjs +0 -2
- package/common/src/API/getCoingeckoPrice.cjs +0 -1
- package/common/src/API/getCoingeckoPrice.mjs +0 -2
- package/common/src/API/getWebsiteURL.cjs +0 -1
- package/common/src/API/getWebsiteURL.mjs +0 -1
- package/common/src/API/index.cjs +0 -1
- package/common/src/API/index.mjs +0 -24
- package/common/src/API/resolve-sns.cjs +0 -1
- package/common/src/API/resolve-sns.mjs +0 -1
- package/common/src/API/tenderly.api.cjs +0 -1
- package/common/src/API/tenderly.api.mjs +0 -4
- package/common/src/constants/activity.constants.cjs +0 -1
- package/common/src/constants/activity.constants.mjs +0 -4
- package/common/src/constants/assets.constants.cjs +0 -1
- package/common/src/constants/assets.constants.mjs +0 -4
- package/common/src/constants/coingecko.constants.cjs +0 -1
- package/common/src/constants/coingecko.constants.mjs +0 -6
- package/common/src/constants/events.constants.cjs +0 -1
- package/common/src/constants/events.constants.mjs +0 -12
- package/common/src/constants/index.cjs +0 -1
- package/common/src/constants/index.mjs +0 -34
- package/common/src/constants/presale.constants.cjs +0 -1
- package/common/src/constants/presale.constants.mjs +0 -3
- package/common/src/constants/schedule.constants.cjs +0 -1
- package/common/src/constants/schedule.constants.mjs +0 -3
- package/common/src/constants/tasks.constants.cjs +0 -1
- package/common/src/constants/tasks.constants.mjs +0 -124
- package/common/src/constants/token-data/arbMainnetRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/arbMainnetRegistryFixed.json.mjs +0 -1841
- package/common/src/constants/token-data/baseRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/baseRegistryFixed.json.mjs +0 -1142
- package/common/src/constants/token-data/ethMainnetRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -4274
- package/common/src/constants/token-data/index.cjs +0 -1
- package/common/src/constants/token-data/index.mjs +0 -17
- package/common/src/constants/token-data/optimismRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/optimismRegistryFixed.json.mjs +0 -709
- package/common/src/constants/token-data/polygonRegistryFixed.json.cjs +0 -1
- package/common/src/constants/token-data/polygonRegistryFixed.json.mjs +0 -2317
- package/common/src/constants/token.limits.constants.cjs +0 -1
- package/common/src/constants/token.limits.constants.mjs +0 -5
- package/common/src/constants/tokens.constants.cjs +0 -1
- package/common/src/constants/tokens.constants.mjs +0 -3
- package/common/src/crypto/index.cjs +0 -1
- package/common/src/crypto/index.mjs +0 -3
- package/common/src/data-structures/AccountActions/index.cjs +0 -1
- package/common/src/data-structures/AccountActions/index.mjs +0 -1
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.cjs +0 -1
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.d.ts +0 -19
- package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.mjs +0 -239
- package/common/src/data-structures/IndexedDB/balances-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/balances-db.mjs +0 -47
- package/common/src/data-structures/IndexedDB/contact-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/contact-db.mjs +0 -45
- package/common/src/data-structures/IndexedDB/index.cjs +0 -1
- package/common/src/data-structures/IndexedDB/index.mjs +0 -8
- package/common/src/data-structures/IndexedDB/key-val-store.cjs +0 -1
- package/common/src/data-structures/IndexedDB/key-val-store.d.ts +0 -6
- package/common/src/data-structures/IndexedDB/key-val-store.mjs +0 -41
- package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +0 -21
- package/common/src/data-structures/IndexedDB/prices-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/prices-db.mjs +0 -54
- package/common/src/data-structures/IndexedDB/private-balances-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.mjs +0 -21
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +0 -1
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +0 -40
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -168
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -144
- package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
- package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -29
- package/common/src/data-structures/TokenDBs/index.cjs +0 -1
- package/common/src/data-structures/TokenDBs/index.mjs +0 -4
- package/common/src/data-structures/cacheDevices/index.cjs +0 -1
- package/common/src/data-structures/cacheDevices/index.mjs +0 -2
- package/common/src/data-structures/crypto-keys/index.cjs +0 -1
- package/common/src/data-structures/crypto-keys/index.mjs +0 -4
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +0 -1
- package/common/src/data-structures/event-service/index.cjs +0 -1
- package/common/src/data-structures/event-service/index.mjs +0 -16
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +0 -1
- package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +0 -1
- package/common/src/data-structures/http/index.cjs +0 -1
- package/common/src/data-structures/http/index.mjs +0 -2
- package/common/src/data-structures/merkle-tree/index.cjs +0 -1
- package/common/src/data-structures/merkle-tree/index.mjs +0 -3
- package/common/src/data-structures/snapshot/index.cjs +0 -1
- package/common/src/data-structures/snapshot/index.mjs +0 -7
- package/common/src/error-handling/customErrors/index.cjs +0 -1
- package/common/src/error-handling/customErrors/index.mjs +0 -4
- package/common/src/error-handling/index.cjs +0 -1
- package/common/src/error-handling/index.mjs +0 -10
- package/common/src/functions/auto-deposit-back-helpers/index.cjs +0 -1
- package/common/src/functions/auto-deposit-back-helpers/index.mjs +0 -4
- package/common/src/functions/index.cjs +0 -1
- package/common/src/functions/index.mjs +0 -82
- package/common/src/functions/kyc/index.cjs +0 -1
- package/common/src/functions/kyc/index.mjs +0 -4
- package/common/src/functions/kyc/passportHelper.cjs +0 -1
- package/common/src/functions/kyc/passportHelper.mjs +0 -1
- package/common/src/functions/pre-transaction/addressTableLookup.cjs +0 -1
- package/common/src/functions/pre-transaction/addressTableLookup.mjs +0 -2
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +0 -1
- package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +0 -5
- package/common/src/functions/pre-transaction/getFlatFees.cjs +0 -1
- package/common/src/functions/pre-transaction/getFlatFees.mjs +0 -4
- package/common/src/functions/pre-transaction/index.cjs +0 -1
- package/common/src/functions/pre-transaction/index.mjs +0 -21
- package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.cjs +0 -1
- package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.mjs +0 -3
- package/common/src/functions/pre-transaction/interaction-to-action.cjs +0 -1
- package/common/src/functions/pre-transaction/interaction-to-action.mjs +0 -1
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.cjs +0 -1
- package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.mjs +0 -3
- package/common/src/functions/pre-transaction/store-instructions.cjs +0 -1
- package/common/src/functions/pre-transaction/store-instructions.mjs +0 -2
- package/common/src/functions/pre-transaction/store-proof.cjs +0 -1
- package/common/src/functions/pre-transaction/store-proof.mjs +0 -3
- package/common/src/functions/private-wallet/index.cjs +0 -1
- package/common/src/functions/private-wallet/index.mjs +0 -3
- package/common/src/functions/private-wallet/opProducer.cjs +0 -1
- package/common/src/functions/private-wallet/opProducer.mjs +0 -3
- package/common/src/functions/snarkjs/index.cjs +0 -1
- package/common/src/functions/snarkjs/index.mjs +0 -7
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.cjs +0 -1
- package/common/src/functions/snarkjs/verifyCommitmentValidationData.mjs +0 -6
- package/common/src/functions/utils/buildClaimableDepositPlan.cjs +0 -1
- package/common/src/functions/utils/buildClaimableDepositPlan.mjs +0 -3
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +0 -1
- package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +0 -4
- package/common/src/functions/utils/deposit-claimable.utils.cjs +0 -1
- package/common/src/functions/utils/deposit-claimable.utils.mjs +0 -12
- package/common/src/functions/utils/dispatchBalanceRefreshes.cjs +0 -1
- package/common/src/functions/utils/dispatchBalanceRefreshes.mjs +0 -4
- package/common/src/functions/utils/enclave-recipient-info-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-recipient-info-storage.mjs +0 -2
- package/common/src/functions/utils/enclave-signature-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-signature-storage.mjs +0 -2
- package/common/src/functions/utils/enclave-utxo-storage.cjs +0 -1
- package/common/src/functions/utils/enclave-utxo-storage.mjs +0 -4
- package/common/src/functions/utils/evmNetworkFunctions.cjs +0 -1
- package/common/src/functions/utils/evmNetworkFunctions.mjs +0 -1
- package/common/src/functions/utils/formatter.cjs +0 -1
- package/common/src/functions/utils/formatter.mjs +0 -1
- package/common/src/functions/utils/getBlockExplorerUrl.cjs +0 -1
- package/common/src/functions/utils/getBlockExplorerUrl.mjs +0 -1
- package/common/src/functions/utils/inLogicMetadata.cjs +0 -1
- package/common/src/functions/utils/inLogicMetadata.mjs +0 -1
- package/common/src/functions/utils/index.cjs +0 -1
- package/common/src/functions/utils/index.mjs +0 -68
- package/common/src/functions/utils/ipfs.cjs +0 -1
- package/common/src/functions/utils/ipfs.mjs +0 -1
- package/common/src/functions/utils/lifi.utils.cjs +0 -1
- package/common/src/functions/utils/lifi.utils.mjs +0 -4
- package/common/src/functions/utils/networks.utils.cjs +0 -1
- package/common/src/functions/utils/networks.utils.mjs +0 -1
- package/common/src/functions/utils/nftTokenFunctions.cjs +0 -1
- package/common/src/functions/utils/nftTokenFunctions.mjs +0 -2
- package/common/src/functions/utils/prepareHinkal.cjs +0 -1
- package/common/src/functions/utils/prepareHinkal.mjs +0 -7
- package/common/src/functions/utils/rpc-int-encode.cjs +0 -1
- package/common/src/functions/utils/rpc-int-encode.mjs +0 -1
- package/common/src/functions/utils/transfer-claimable.utils.cjs +0 -1
- package/common/src/functions/utils/transfer-claimable.utils.mjs +0 -12
- package/common/src/functions/utils/userAgent.cjs +0 -1
- package/common/src/functions/utils/userAgent.mjs +0 -3
- package/common/src/functions/utils/walletBalances.utils.cjs +0 -1
- package/common/src/functions/utils/walletBalances.utils.mjs +0 -1
- package/common/src/functions/web3/EIP-712.cjs +0 -1
- package/common/src/functions/web3/EIP-712.mjs +0 -1
- package/common/src/functions/web3/connectors.utils.cjs +0 -1
- package/common/src/functions/web3/connectors.utils.mjs +0 -1
- package/common/src/functions/web3/events/getTransactionLogEvents.cjs +0 -1
- package/common/src/functions/web3/events/getTransactionLogEvents.mjs +0 -2
- package/common/src/functions/web3/events/index.cjs +0 -1
- package/common/src/functions/web3/events/index.mjs +0 -4
- package/common/src/functions/web3/getTokenHolder.cjs +0 -1
- package/common/src/functions/web3/getTokenHolder.mjs +0 -7
- package/common/src/functions/web3/index.cjs +0 -1
- package/common/src/functions/web3/index.mjs +0 -16
- package/common/src/functions/web3/runContractFunction.cjs +0 -1
- package/common/src/functions/web3/runContractFunction.mjs +0 -1
- package/common/src/mutexes/mutex.cjs +0 -1
- package/common/src/mutexes/mutex.mjs +0 -3
- package/common/src/types/index.cjs +0 -1
- package/common/src/types/index.mjs +0 -19
- package/common/src/types/schedule.types.cjs +0 -1
- package/common/src/types/schedule.types.mjs +0 -6
- package/common/src/webworker/workerProxy-DPSmXOIl.js +0 -122
- package/functions/integrations/index.mjs +0 -5
- package/functions/utils/getFeeStructure.mjs +0 -1
- package/types/balances.types.cjs +0 -1
- package/types/balances.types.mjs +0 -2
- package/types/external-action.types.cjs +0 -1
- package/types/external-action.types.mjs +0 -2
- package/types/index.cjs +0 -1
- package/types/index.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`);require(`idb-keyval`);var n={encryptedOutputs:[],lastOutput:``},r=(e,t)=>({shortPublicKey:e.substring(0,25),shortHinkalAddress:t.substring(0,25)}),i=(e,t,n)=>`hinkalCache-${e}-${t}-${n}`,a=(a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`GetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);return JSON.parse(a.cacheDevice.get(i(o,l,u))??e.safeJsonStringify(n))},o=(n,a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`SetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);a.cacheDevice.set(i(o,l,u),e.safeJsonStringify(n))},s=(e,t,r)=>{o(n,e,t,r)};exports.
|
|
1
|
+
const e=require(`./serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`);require(`idb-keyval`);var n={encryptedOutputs:[],lastOutput:``},r=(e,t)=>({shortPublicKey:e.substring(0,25),shortHinkalAddress:t.substring(0,25)}),i=(e,t,n)=>`hinkalCache-${e}-${t}-${n}`,a=(a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`GetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);return JSON.parse(a.cacheDevice.get(i(o,l,u))??e.safeJsonStringify(n))},o=(n,a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`SetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);a.cacheDevice.set(i(o,l,u),e.safeJsonStringify(n))},s=(e,t,r)=>{o(n,e,t,r)};exports.getHinkalCache=a,exports.resetCache=s,exports.setHinkalCache=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);
|
|
1
|
+
const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`libsodium-wrappers`);a=e.__toESM(a);let o=require(`node-forge`);o=e.__toESM(o);var s=async()=>(await r.httpClient.get(`${n.ENCLAVE_URL}/handshake`)).public_key,c=e=>typeof e==`bigint`||typeof e==`number`?e.toString():e,l=e=>o.util.hexToBytes(e.replace(`0x`,``)),u=e=>{let t=structuredClone(e);return Object.entries(t).forEach(([e,n])=>{t[e]=c(n),Array.isArray(n)&&(Array.isArray(n[0])?t[e]=n.map(e=>e.map(c)):t[e]=n.map(c))}),t},d=(e,t)=>{let n=o.util.decode64(e),r=o.asn1.fromDer(o.util.createBuffer(n)),i=o.pki.publicKeyFromAsn1(r),a=o.util.binary.raw.encode(t),s=i.encrypt(a,`RSA-OAEP`,{md:o.md.sha1.create(),mgf1:{md:o.md.sha1.create()}});return o.util.encode64(s)},f=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_NONCEBYTES),r=a.default.crypto_secretbox_easy(t,n,e),s=l(i.ethers.hexlify(n)+i.ethers.hexlify(r).slice(2));return o.util.encode64(s)},p=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(t,n),inputCiphertext:f(n,e)}},m=(e,n)=>{let r=typeof e==`string`?e:t.safeJsonStringify(u(e));return p(new TextEncoder().encode(r),n)},h=async e=>m(e,await s()),g=async e=>p(e,await s());exports.makeEnclaveHandshakeAndEncryptInput=h,exports.makeEnclaveHandshakeAndEncryptUint8Array=g;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { safeJsonStringify as e } from "./serialize.utils.mjs";
|
|
2
2
|
import { ENCLAVE_URL as t } from "../snarkjs/constant.mjs";
|
|
3
3
|
import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
|
|
4
|
-
import "../../data-structures/http/index.mjs";
|
|
5
4
|
import { ethers as r } from "ethers";
|
|
6
5
|
import i from "libsodium-wrappers";
|
|
7
6
|
import * as a from "node-forge";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../constants/token-data/ERC20Registry.cjs`)
|
|
1
|
+
require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../constants/token-data/ERC20Registry.cjs`),n=require(`../../data-structures/custom-token-registry/CustomTokenRegistry.cjs`);var r=e=>{let r=t.getERC20Registry(e),i=n.customTokenRegistry.getCustomTokens(e);return[...r,...i]},i=(e,t,n)=>(n??r(t))?.find(t=>e===void 0?!1:t.erc20TokenAddress.toLowerCase()===e.toLowerCase()),a=(e,t)=>r(t)?.find(t=>e===void 0?!1:t.symbol.toLowerCase()===e.toLowerCase()),o=t=>t.nftTokenType===e.TokenType.ERC721||t.nftTokenType===e.TokenType.ERC1155||t.nftTokenType===e.TokenType.MetaplexNFT||t.nftTokenType===e.TokenType.Token2022NFT||t.nftTokenType===e.TokenType.CompressedNFT;exports.getERC20Token=i,exports.getERC20TokenBySymbol=a,exports.getErc20TokensForChain=r,exports.isNFTToken=o;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
2
|
import { TokenType as e } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { getERC20Registry as t } from "../../constants/token-data/ERC20Registry.mjs";
|
|
4
|
-
import "../../constants/token-data/index.mjs";
|
|
5
4
|
import { customTokenRegistry as n } from "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
|
|
6
|
-
import "../web3/etherFunctions.mjs";
|
|
7
|
-
import "../../constants/tokens.constants.mjs";
|
|
8
5
|
//#region libs/shared/common/src/functions/utils/erc20tokenFunctions.ts
|
|
9
6
|
var r = (e) => {
|
|
10
7
|
let r = t(e), i = n.getCustomTokens(e);
|
|
11
8
|
return [...r, ...i];
|
|
12
|
-
}, i = (e, t, n) => (n ?? r(t))?.find((t) => e === void 0 ? !1 : t.erc20TokenAddress.toLowerCase() === e.toLowerCase()), a = (e, t) =>
|
|
13
|
-
let n = i(e.erc20TokenAddress, t);
|
|
14
|
-
return n ? {
|
|
15
|
-
...e,
|
|
16
|
-
name: n.name,
|
|
17
|
-
symbol: n.symbol,
|
|
18
|
-
logoURI: n.logoURI,
|
|
19
|
-
decimals: n.decimals
|
|
20
|
-
} : e;
|
|
21
|
-
}, o = (e, t) => r(t)?.find((t) => e === void 0 ? !1 : t.symbol.toLowerCase() === e.toLowerCase()), s = (t) => t.nftTokenType === e.ERC721 || t.nftTokenType === e.ERC1155 || t.nftTokenType === e.MetaplexNFT || t.nftTokenType === e.Token2022NFT || t.nftTokenType === e.CompressedNFT;
|
|
9
|
+
}, i = (e, t, n) => (n ?? r(t))?.find((t) => e === void 0 ? !1 : t.erc20TokenAddress.toLowerCase() === e.toLowerCase()), a = (e, t) => r(t)?.find((t) => e === void 0 ? !1 : t.symbol.toLowerCase() === e.toLowerCase()), o = (t) => t.nftTokenType === e.ERC721 || t.nftTokenType === e.ERC1155 || t.nftTokenType === e.MetaplexNFT || t.nftTokenType === e.Token2022NFT || t.nftTokenType === e.CompressedNFT;
|
|
22
10
|
//#endregion
|
|
23
|
-
export { i as getERC20Token,
|
|
11
|
+
export { i as getERC20Token, a as getERC20TokenBySymbol, r as getErc20TokensForChain, o as isNFTToken };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../data-structures/crypto-keys/keys.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);
|
|
1
|
+
const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../data-structures/crypto-keys/keys.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);var r=r=>{let i=r.getShieldedPrivateKey(),a=t.UserKeys.getEncryptionKeyPair(i).publicKey,o=new n.Utxo({amount:0n,erc20TokenAddress:e.zeroAddress,shieldedPrivateKey:i}),{randomization:s}=o,c=o.getStealthAddress(),{h0:l,h1:u}=t.UserKeys.getStealthAddressCompressedPoints(s,i);return`${s},${c},${a},${l},${u}`};exports.getRecipientInfoFromUserKeys=r;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
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
|
-
import "../../data-structures/crypto-keys/index.mjs";
|
|
5
4
|
//#region libs/shared/common/src/functions/utils/getRecipientInfoFromUserKeys.ts
|
|
6
5
|
var r = (r) => {
|
|
7
6
|
let i = r.getShieldedPrivateKey(), a = t.getEncryptionKeyPair(i).publicKey, o = new n({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../constants/chains.constants.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`./amounts.utils.cjs`)
|
|
1
|
+
require(`../../constants/chains.constants.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`./amounts.utils.cjs`),n=require(`./caseInsensitive.utils.cjs`),r=require(`./getContractAddress.cjs`),i=require(`../../data-structures/crypto-keys/decodeUTXO.cjs`);require(`ethers`);var a=(a,o,s,c)=>{let l=o.getContractWithFetcher(s,e.ContractType.HinkalContract),u=l.interface,d=o.userKeys.getShieldedPrivateKey(),f=r.getContractAddress(l);return a.logs.filter(e=>n.caseInsensitiveEqual(e.address,f)).map(e=>{try{let r=u.parseLog(e);if(r?.name===`NewCommitment`){let{encryptedOutput:e,index:a}=r.args;if(t.toBigInt(a)<0n){let t=i.decodeUtxo(e,d,s);if(n.caseInsensitiveEqual(t.erc20TokenAddress,c))return t}}}catch{return null}return null}).filter(e=>e!==null)};exports.getOnChainUtxosFromReceipt=a;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
2
|
import { ContractType as e } from "../../types/ethereum-network.types.mjs";
|
|
3
3
|
import { toBigInt as t } from "./amounts.utils.mjs";
|
|
4
|
-
import "../../types/index.mjs";
|
|
5
4
|
import { caseInsensitiveEqual as n } from "./caseInsensitive.utils.mjs";
|
|
6
|
-
import "../../data-structures/crypto-keys/keys.mjs";
|
|
7
5
|
import { getContractAddress as r } from "./getContractAddress.mjs";
|
|
8
|
-
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
9
6
|
import { decodeUtxo as i } from "../../data-structures/crypto-keys/decodeUTXO.mjs";
|
|
10
7
|
import "ethers";
|
|
11
8
|
//#region libs/shared/common/src/functions/utils/getUtxosFromReceipt.utils.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../crypto/poseidon.cjs`),t=require(`./caseInsensitive.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`)
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../crypto/poseidon.cjs`),t=require(`./caseInsensitive.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`),r=require(`./bytes32.utils.cjs`);let i=require(`@coral-xyz/anchor`),a=require(`@solana/web3.js`);var o=(o,s,c,l)=>[...new i.EventParser(s.programId,new i.BorshCoder(s.idl)).parseLogs(o.meta?.logMessages??[])].filter(({name:e})=>t.caseInsensitiveEqual(e,`newCommitment`)).filter(({data:e})=>e.encryptedOutput.length===0).map(t=>{let{onChainData:i}=t.data,[o,s,l,u,,,,d]=i.map(r.convertBytes32ToBigInt),[,f,p]=i,m=new a.PublicKey([...f.slice(16),...p.slice(16)]),h=e.poseidonHash(s,l),g=new n.Utxo({amount:o,timeStamp:d.toString(),randomization:u,shieldedPrivateKey:c.getShieldedPrivateKey(),mintAddress:m.toBase58(),erc20TokenAddress:h});return g.getStealthAddress(),g}).filter(e=>t.caseInsensitiveEqual(e.erc20TokenAddress,l));exports.getOnChainUtxosFromReceiptSolana=o;
|
|
@@ -2,7 +2,6 @@ import "../../constants/chains.constants.mjs";
|
|
|
2
2
|
import { poseidonHash as e } from "../../crypto/poseidon.mjs";
|
|
3
3
|
import { caseInsensitiveEqual as t } from "./caseInsensitive.utils.mjs";
|
|
4
4
|
import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
|
|
5
|
-
import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
|
|
6
5
|
import { convertBytes32ToBigInt as r } from "./bytes32.utils.mjs";
|
|
7
6
|
import { BorshCoder as i, EventParser as a } from "@coral-xyz/anchor";
|
|
8
7
|
import { PublicKey as o } from "@solana/web3.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=e=>new Promise(t=>{setTimeout(t,e)}),t=async(t,n={})=>{let r=n.intervalMs??5e3,i=n.timeoutMs??6e4,a=Math.floor(i/r)+1;for(let n=0;n<a;n+=1){try{let e=await t();if(e!=null)return e}catch{}n<a-1&&await e(r)}};exports.pollForValue=t
|
|
1
|
+
var e=e=>new Promise(t=>{setTimeout(t,e)}),t=async(t,n={})=>{let r=n.intervalMs??5e3,i=n.timeoutMs??6e4,a=Math.floor(i/r)+1;for(let n=0;n<a;n+=1){try{let e=await t();if(e!=null)return e}catch{}n<a-1&&await e(r)}};exports.pollForValue=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`);require(`./erc20tokenFunctions.cjs`)
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`);require(`./erc20tokenFunctions.cjs`);const t=require(`../../externalABIs/swapAbi.cjs`);let n=require(`ethers`);require(`@solana/web3.js`),require(`@solana/spl-token`);var r=async(r,i,a)=>{try{let o=a.erc20TokenAddress,s,c=new n.ethers.Contract(a.erc20TokenAddress,t.ERC20ABI,r);s=o===e.zeroAddress?await r.getBalance(i):await c?.balanceOf(i);let l=s;return l<=0n?null:{token:a,balance:l}}catch{return null}};exports.getPublicBalance=r;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import "../../constants/chains.constants.mjs";
|
|
2
2
|
import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "./addresses.mjs";
|
|
6
|
-
import { Logger as t } from "../../error-handling/logger.mjs";
|
|
7
|
-
import { createJsonRpcProvider as n } from "./create-provider.mjs";
|
|
8
|
-
import "../../externalABIs/index.mjs";
|
|
9
|
-
import { ERC20ABI as r } from "../../externalABIs/swapAbi.mjs";
|
|
10
|
-
import "./ipfs.mjs";
|
|
11
|
-
import { ethers as i } from "ethers";
|
|
3
|
+
import { ERC20ABI as t } from "../../externalABIs/swapAbi.mjs";
|
|
4
|
+
import { ethers as n } from "ethers";
|
|
12
5
|
import "@solana/web3.js";
|
|
13
6
|
import "@solana/spl-token";
|
|
14
7
|
//#region libs/shared/common/src/functions/utils/publicBalance.utils.ts
|
|
15
|
-
var
|
|
8
|
+
var r = async (r, i, a) => {
|
|
16
9
|
try {
|
|
17
|
-
let o = a.erc20TokenAddress, s, c = new
|
|
18
|
-
s = o === e ? await
|
|
10
|
+
let o = a.erc20TokenAddress, s, c = new n.Contract(a.erc20TokenAddress, t, r);
|
|
11
|
+
s = o === e ? await r.getBalance(i) : await c?.balanceOf(i);
|
|
19
12
|
let l = s;
|
|
20
13
|
return l <= 0n ? null : {
|
|
21
14
|
token: a,
|
|
@@ -24,13 +17,6 @@ var a = async (t, n, a) => {
|
|
|
24
17
|
} catch {
|
|
25
18
|
return null;
|
|
26
19
|
}
|
|
27
|
-
}, o = async (a, o, s) => {
|
|
28
|
-
try {
|
|
29
|
-
let t = n(a), c = new i.Contract(s, r, t), l;
|
|
30
|
-
return l = s === e ? await t.getBalance(o) : await c?.balanceOf(o), l;
|
|
31
|
-
} catch {
|
|
32
|
-
return t.error(`Failed to fetch public balance for address ${o}`), null;
|
|
33
|
-
}
|
|
34
20
|
};
|
|
35
21
|
//#endregion
|
|
36
|
-
export {
|
|
22
|
+
export { r as getPublicBalance };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../crypto/poseidon.cjs`);let t=require(`ethers`),n=require(`@solana/web3.js`);var r=e=>{let n=e.toBytes();return BigInt(t.ethers.hexlify(n))},i=t=>{let i=typeof t==`string`?new n.PublicKey(t):t,a=r(i),o=a/2n**128n,s=a%2n**128n;return{mintAccountPart1:o,mintAccountPart2:s,compressedAddress:e.poseidonHash(o,s),mintPublicKey:i}};exports.
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../crypto/poseidon.cjs`);let t=require(`ethers`),n=require(`@solana/web3.js`);var r=e=>{let n=e.toBytes();return BigInt(t.ethers.hexlify(n))},i=t=>{let i=typeof t==`string`?new n.PublicKey(t):t,a=r(i),o=a/2n**128n,s=a%2n**128n;return{mintAccountPart1:o,mintAccountPart2:s,compressedAddress:e.poseidonHash(o,s),mintPublicKey:i}};exports.formatMintAddress=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`);var t=(t,n
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`);var t=(t,n,r=!1)=>{let i=`${t}-${n}`;if(r){let{hinkalAddress:t}=e.networkRegistry[n].contractData;return`${i}-${t}`.toLowerCase()}return i.toLowerCase()},n=(e,t,n)=>{if(!t||!n)throw Error(`oldPart and newPart must be provided`);return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase())};exports.getStateKey=t,exports.replaceAllInstances=n;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
//#region libs/shared/common/src/functions/utils/string.utils.ts
|
|
3
|
-
var
|
|
4
|
-
let i = `${
|
|
5
|
-
return e(r) || t(r) ? i : i.toLowerCase();
|
|
6
|
-
}, i = (e, t, r = !1) => {
|
|
7
|
-
let i = `${e}-${t}`;
|
|
3
|
+
var t = (t, n, r = !1) => {
|
|
4
|
+
let i = `${t}-${n}`;
|
|
8
5
|
if (r) {
|
|
9
|
-
let { hinkalAddress:
|
|
10
|
-
return `${i}-${
|
|
6
|
+
let { hinkalAddress: t } = e[n].contractData;
|
|
7
|
+
return `${i}-${t}`.toLowerCase();
|
|
11
8
|
}
|
|
12
9
|
return i.toLowerCase();
|
|
13
|
-
},
|
|
10
|
+
}, n = (e, t, n) => {
|
|
14
11
|
if (!t || !n) throw Error("oldPart and newPart must be provided");
|
|
15
12
|
return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase());
|
|
16
13
|
};
|
|
17
14
|
//#endregion
|
|
18
|
-
export {
|
|
15
|
+
export { t as getStateKey, n as replaceAllInstances };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`./caseInsensitive.utils.cjs`);var n=t=>{if(t.length===0)throw Error(`Token array cannot be empty`);let n=t.map(e=>e.chainId),r=n[0];if(!n.every(e=>e===r))throw Error(e.transactionErrorCodes.TOKENS_DO_NOT_BELONG_SAME_CHAIN);return r},r=(e,n)=>!e||!n?!1:t.caseInsensitiveEqual(e.erc20TokenAddress,n.erc20TokenAddress)&&e.chainId===n.chainId;exports.isSameERC20Token=r,exports.validateAndGetChainId=n;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import "../../constants/token-data/ERC20Registry.mjs";
|
|
2
1
|
import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
|
|
3
2
|
import { caseInsensitiveEqual as t } from "./caseInsensitive.utils.mjs";
|
|
4
|
-
import "../../API/API.mjs";
|
|
5
3
|
//#region libs/shared/common/src/functions/utils/token-check.utils.ts
|
|
6
4
|
var n = (t) => {
|
|
7
5
|
if (t.length === 0) throw Error("Token array cannot be empty");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`tronweb`);var o=1000n,s=(t,n)=>{let r=e.networkRegistry[t].fetchRpcUrl,i=n?new a.TronWeb({fullHost:r,privateKey:n}):new a.TronWeb({fullHost:r});return n||i.setAddress(`T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb`),i},c=e=>e?.startsWith(`T`)?e:a.TronWeb.address.fromHex(e),l=e=>{if(e.startsWith(`0x`))return e;if(e.startsWith(`41`))return e.replace(`41`,`0x`);if(e.startsWith(`T`))return l(a.TronWeb.address.toHex(e));throw Error(`Failed to convert address to hex format`)},u=t=>{if(t===e.chainIds.tronNile)return`https://nile.trongrid.io`;if(t===e.chainIds.tronMainnet)return`https://api.trongrid.io`;throw Error(`Unsupported Tron chain for wallet RPC: ${t}`)},d=(e,t)=>e.map(e=>Array.isArray(e)?d(e,t):t(e)),f=(e,t,n)=>{let r=new i.ethers.Interface(e);if(!r.getFunction(t))throw Error(`${t} ABI is missing for Tron call data creation`);let a=d(n,e=>typeof e==`string`&&e.startsWith(`T`)?l(e):e);return r.encodeFunctionData(t,a)},p=(e,t,n)=>e?BigInt(Math.max((e[t]??0)-(e[n]??0),0)):0n,m=(e,t)=>{let n=e.find(e=>e.key===t);if(!n||typeof n.value!=`number`)throw Error(`Missing Tron chain parameter: ${t}`);return BigInt(n.value)},h=async e=>{let t=`${u(e)}/wallet/getchainparameters`,n=await r.httpClient.post(t,{});if(!n?.chainParameter?.length)throw Error(`Failed to fetch Tron chain parameters from wallet RPC`);return n.chainParameter},g=async(e,t)=>{let n=`${u(e)}/wallet/getaccountresource`,i=l(t),a=i.startsWith(`0x`)?`41${i.slice(2)}`:i;return await r.httpClient.post(n,{address:a,visible:!1})},_=async(e,n,r,i,a,s)=>{let c={input:a,callValue:Number(s),feeLimit:t.TRON_DEFAULT_FEE_LIMIT_SUN},[l,u]=await Promise.all([e.transactionBuilder.estimateEnergy(r,``,c,[],i),e.transactionBuilder.triggerConstantContract(r,``,c,[],i)]),d=await h(n),f=m(d,`getEnergyFee`),_=m(d,`getTransactionFee`),v=await g(n,i),y=BigInt(l?.energy_required??u?.energy_used??0),b=p(v,`EnergyLimit`,`EnergyUsed`),x=(y>b?y-b:0n)*f,S=BigInt(Math.ceil((u?.transaction?.raw_data_hex?.length??0)/2)),C=p(v,`freeNetLimit`,`freeNetUsed`)+p(v,`NetLimit`,`NetUsed`),w=x+(S>C?S-C:0n)*_,T=w+w*o/10000n;return T>BigInt(1e9)?BigInt(t.TRON_DEFAULT_FEE_LIMIT_SUN):T},v=e=>{let t=e[0].map(BigInt),n=e[1][0].map(BigInt),r=e[1][1].map(BigInt),i=e[2].map(BigInt),a=e[3].map(BigInt);return{a:t,b:[[n[1],n[0]],[r[1],r[0]]],c:i,publicSignals:a}},y=(e,t)=>{let n=i.ethers.AbiCoder.defaultAbiCoder().encode([`uint16`,`uint16`,`uint16`,`uint256`],[e.tokenNumber,e.nullifierAmount,e.outputAmount,t]);return BigInt(i.ethers.keccak256(n))},b=async(e,t,a,o,s,c)=>{let l=y(s,c),u=e.map(String),d=a.map(String),f=o.map(String),p={a:u,b:[t[0].map(String),t[1].map(String)],c:d,inputs:f,verifier_id:String(l)},m=await r.httpClient.post(`${n.ENCLAVE_URL}/sign-proof`,p),{v:h,r:g,s:_}=i.ethers.Signature.from(m.signature.trim());return{v:h,r:g,s:_}},x=e=>[e.rootHashHinkal,e.erc20TokenAddresses,e.tokenIds,e.amountChanges,e.onChainCreation,e.slippageValues,e.inputNullifiers,e.outCommitments,e.encryptedOutputs,[e.feeStructure.feeToken,e.feeStructure.flatFee,e.feeStructure.variableRate],e.timeStamp,[e.stealthAddressStructure.extraRandomization,e.stealthAddressStructure.stealthAddress,e.stealthAddressStructure.H0,e.stealthAddressStructure.H1],e.rootHashAccessToken,e.calldataHash,e.publicSignalCount,e.relay,e.externalAddress,e.externalActionId,e.externalActionMetadata,[e.hinkalLogicArgs.hinkalLogicAction,e.hinkalLogicArgs.inHinkalAddress,e.hinkalLogicArgs.executeApprovalChanges,e.hinkalLogicArgs.doPreTxApproval,e.hinkalLogicArgs.useApprovalUtxoData.map(e=>[e.approvalChanges,e.externalApprovalAddresses,e.conversionInHinkalAddress])],[e.hookData.preHookContract,e.hookData.hookContract,e.hookData.preHookMetadata,e.hookData.postHookMetadata],[e.signatureData.v,e.signatureData.r,e.signatureData.s,e.signatureData.accessKey,e.signatureData.nonce,e.signatureData.ethereumAddress],e.originalSender],S=async(e,t,n,r,i=!0)=>{if(e){let{a:e,b:a,c:o,publicSignals:s}=v(t),c=await b(e,a,o,s,n,BigInt(r.externalActionId)),l={v:c.v,r:c.r,s:c.s};return i&&(t[1]=[[t[1][0][1],t[1][0][0]],[t[1][1][1],t[1][1][0]]]),l}};exports.addressToHexFormat=l,exports.circomDataToArray=x,exports.createTronCallData=f,exports.createTronWeb=s,exports.estimateTronFeeSunWithPadding=_,exports.evmHexToTronBase58Address=c,exports.
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`tronweb`);var o=1000n,s=(t,n)=>{let r=e.networkRegistry[t].fetchRpcUrl,i=n?new a.TronWeb({fullHost:r,privateKey:n}):new a.TronWeb({fullHost:r});return n||i.setAddress(`T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb`),i},c=e=>e?.startsWith(`T`)?e:a.TronWeb.address.fromHex(e),l=e=>{if(e.startsWith(`0x`))return e;if(e.startsWith(`41`))return e.replace(`41`,`0x`);if(e.startsWith(`T`))return l(a.TronWeb.address.toHex(e));throw Error(`Failed to convert address to hex format`)},u=t=>{if(t===e.chainIds.tronNile)return`https://nile.trongrid.io`;if(t===e.chainIds.tronMainnet)return`https://api.trongrid.io`;throw Error(`Unsupported Tron chain for wallet RPC: ${t}`)},d=(e,t)=>e.map(e=>Array.isArray(e)?d(e,t):t(e)),f=(e,t,n)=>{let r=new i.ethers.Interface(e);if(!r.getFunction(t))throw Error(`${t} ABI is missing for Tron call data creation`);let a=d(n,e=>typeof e==`string`&&e.startsWith(`T`)?l(e):e);return r.encodeFunctionData(t,a)},p=(e,t,n)=>e?BigInt(Math.max((e[t]??0)-(e[n]??0),0)):0n,m=(e,t)=>{let n=e.find(e=>e.key===t);if(!n||typeof n.value!=`number`)throw Error(`Missing Tron chain parameter: ${t}`);return BigInt(n.value)},h=async e=>{let t=`${u(e)}/wallet/getchainparameters`,n=await r.httpClient.post(t,{});if(!n?.chainParameter?.length)throw Error(`Failed to fetch Tron chain parameters from wallet RPC`);return n.chainParameter},g=async(e,t)=>{let n=`${u(e)}/wallet/getaccountresource`,i=l(t),a=i.startsWith(`0x`)?`41${i.slice(2)}`:i;return await r.httpClient.post(n,{address:a,visible:!1})},_=async(e,n,r,i,a,s)=>{let c={input:a,callValue:Number(s),feeLimit:t.TRON_DEFAULT_FEE_LIMIT_SUN},[l,u]=await Promise.all([e.transactionBuilder.estimateEnergy(r,``,c,[],i),e.transactionBuilder.triggerConstantContract(r,``,c,[],i)]),d=await h(n),f=m(d,`getEnergyFee`),_=m(d,`getTransactionFee`),v=await g(n,i),y=BigInt(l?.energy_required??u?.energy_used??0),b=p(v,`EnergyLimit`,`EnergyUsed`),x=(y>b?y-b:0n)*f,S=BigInt(Math.ceil((u?.transaction?.raw_data_hex?.length??0)/2)),C=p(v,`freeNetLimit`,`freeNetUsed`)+p(v,`NetLimit`,`NetUsed`),w=x+(S>C?S-C:0n)*_,T=w+w*o/10000n;return T>BigInt(1e9)?BigInt(t.TRON_DEFAULT_FEE_LIMIT_SUN):T},v=e=>{let t=e[0].map(BigInt),n=e[1][0].map(BigInt),r=e[1][1].map(BigInt),i=e[2].map(BigInt),a=e[3].map(BigInt);return{a:t,b:[[n[1],n[0]],[r[1],r[0]]],c:i,publicSignals:a}},y=(e,t)=>{let n=i.ethers.AbiCoder.defaultAbiCoder().encode([`uint16`,`uint16`,`uint16`,`uint256`],[e.tokenNumber,e.nullifierAmount,e.outputAmount,t]);return BigInt(i.ethers.keccak256(n))},b=async(e,t,a,o,s,c)=>{let l=y(s,c),u=e.map(String),d=a.map(String),f=o.map(String),p={a:u,b:[t[0].map(String),t[1].map(String)],c:d,inputs:f,verifier_id:String(l)},m=await r.httpClient.post(`${n.ENCLAVE_URL}/sign-proof`,p),{v:h,r:g,s:_}=i.ethers.Signature.from(m.signature.trim());return{v:h,r:g,s:_}},x=e=>[e.rootHashHinkal,e.erc20TokenAddresses,e.tokenIds,e.amountChanges,e.onChainCreation,e.slippageValues,e.inputNullifiers,e.outCommitments,e.encryptedOutputs,[e.feeStructure.feeToken,e.feeStructure.flatFee,e.feeStructure.variableRate],e.timeStamp,[e.stealthAddressStructure.extraRandomization,e.stealthAddressStructure.stealthAddress,e.stealthAddressStructure.H0,e.stealthAddressStructure.H1],e.rootHashAccessToken,e.calldataHash,e.publicSignalCount,e.relay,e.externalAddress,e.externalActionId,e.externalActionMetadata,[e.hinkalLogicArgs.hinkalLogicAction,e.hinkalLogicArgs.inHinkalAddress,e.hinkalLogicArgs.executeApprovalChanges,e.hinkalLogicArgs.doPreTxApproval,e.hinkalLogicArgs.useApprovalUtxoData.map(e=>[e.approvalChanges,e.externalApprovalAddresses,e.conversionInHinkalAddress])],[e.hookData.preHookContract,e.hookData.hookContract,e.hookData.preHookMetadata,e.hookData.postHookMetadata],[e.signatureData.v,e.signatureData.r,e.signatureData.s,e.signatureData.accessKey,e.signatureData.nonce,e.signatureData.ethereumAddress],e.originalSender],S=async(e,t,n,r,i=!0)=>{if(e){let{a:e,b:a,c:o,publicSignals:s}=v(t),c=await b(e,a,o,s,n,BigInt(r.externalActionId)),l={v:c.v,r:c.r,s:c.s};return i&&(t[1]=[[t[1][0][1],t[1][0][0]],[t[1][1][1],t[1][1][0]]]),l}};exports.addressToHexFormat=l,exports.circomDataToArray=x,exports.createTronCallData=f,exports.createTronWeb=s,exports.estimateTronFeeSunWithPadding=_,exports.evmHexToTronBase58Address=c,exports.parseZkCalldata=v,exports.reorderZkCallData=S;
|
|
@@ -146,4 +146,4 @@ var s = 1000n, c = (e, n) => {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
//#endregion
|
|
149
|
-
export { u as addressToHexFormat, S as circomDataToArray, p as createTronCallData, c as createTronWeb, v as estimateTronFeeSunWithPadding, l as evmHexToTronBase58Address,
|
|
149
|
+
export { u as addressToHexFormat, S as circomDataToArray, p as createTronCallData, c as createTronWeb, v as estimateTronFeeSunWithPadding, l as evmHexToTronBase58Address, y as parseZkCalldata, C as reorderZkCallData };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../error-handling/logger.cjs`),r=require(`./create-provider.cjs`),i=require(`../../constants/tx-confirmation.constants.cjs`);
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../error-handling/logger.cjs`),r=require(`./create-provider.cjs`),i=require(`../../constants/tx-confirmation.constants.cjs`);var a=`confirmed`,o=async(e,n,a={})=>{let{evmConfirmations:o=1,evmTimeoutMs:s=i.TX_CONFIRMATION_TIMEOUT_EXTENDED}=a,c=n.startsWith(`0x`)?n:`0x${n}`,l=await r.createJsonRpcProvider(e).waitForTransaction(c,o,s);if(!l||l.status!==1)throw Error(t.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED);return l},s=async(t,n,i={})=>{let{solanaCommitment:o=a}=i,{fetchRpcUrl:s}=e.networkRegistry[t];if(!s)throw Error(`RPC URL not found for the specified chain ID`);let c=await r.createCustomSolanaConnection(s,o).confirmTransaction(n,o);if(c.value.err)throw Error(`Transaction failed`);return c},c=async(t,r,i={})=>{try{if(e.isSolanaLike(t)){await s(t,r,i);return}await o(t,r.startsWith(`0x`)?r:`0x${r}`,i)}catch(e){throw n.Logger.error(`waitForTransactionConfirmation failed`,{chainId:t,txHash:r,error:e}),e}};exports.waitForEthereumTransactionConfirmation=o,exports.waitForTransactionConfirmation=c;
|
|
@@ -3,7 +3,6 @@ import { transactionErrorCodes as n } from "../../error-handling/error-codes.con
|
|
|
3
3
|
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
4
4
|
import { createCustomSolanaConnection as i, createJsonRpcProvider as a } from "./create-provider.mjs";
|
|
5
5
|
import { TX_CONFIRMATION_TIMEOUT_EXTENDED as o } from "../../constants/tx-confirmation.constants.mjs";
|
|
6
|
-
import "../../constants/index.mjs";
|
|
7
6
|
//#region libs/shared/common/src/functions/utils/tx-confirmation.utils.ts
|
|
8
7
|
var s = "confirmed", c = async (e, t, r = {}) => {
|
|
9
8
|
let { evmConfirmations: i = 1, evmTimeoutMs: s = o } = r, c = t.startsWith("0x") ? t : `0x${t}`, l = await a(e).waitForTransaction(c, i, s);
|
|
@@ -31,4 +30,4 @@ var s = "confirmed", c = async (e, t, r = {}) => {
|
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
32
|
//#endregion
|
|
34
|
-
export { c as waitForEthereumTransactionConfirmation,
|
|
33
|
+
export { c as waitForEthereumTransactionConfirmation, u as waitForTransactionConfirmation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../types/hinkal.types.cjs`);
|
|
1
|
+
const e=require(`../../../types/hinkal.types.cjs`);var t=new Set,n=n=>{if(typeof document<`u`){let t=e=>{e instanceof CustomEvent?n(e.detail??{}):n({})};return document.addEventListener(e.EventType.BalanceChange,t),()=>document.removeEventListener(e.EventType.BalanceChange,t)}return t.add(n),()=>{t.delete(n)}},r=n=>{let r=e.EventType.BalanceChange,i=new CustomEvent(r,{detail:n});typeof document<`u`?document.dispatchEvent(i):t.forEach(e=>{e(n)})};exports.balanceChangedHandler=r,exports.subscribeToBalanceChange=n;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PrivateBalanceUpdateEventType } from '../../../types';
|
|
2
|
-
type BalanceChangeListener = (detail
|
|
2
|
+
type BalanceChangeListener = (detail: PrivateBalanceUpdateEventType) => void;
|
|
3
3
|
export declare const subscribeToBalanceChange: (listener: BalanceChangeListener) => (() => void);
|
|
4
4
|
export declare const balanceChangedHandler: (detail: PrivateBalanceUpdateEventType) => void;
|
|
5
5
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../utils/caseInsensitive.utils.cjs`),n=require(`../../../data-structures/utxo/Utxo.cjs`),r=require(`../../utils/upToDateState.cjs`),i=require(`../../utils/cacheFunctions.cjs`),a=require(`../../utils/encodeTokenWithId.cjs`),o=require(`../../utils/solanaMint.utils.cjs`),s=require(`./getInputUtxosEnclave.cjs`),c=require(`../../utils/addresses.cjs`),l=require(`../../../API/scheduled-transactions-calls.cjs`),u=require(`../../utils/tron.utils.cjs`);var d=new(require(`async-mutex`)).Mutex,f=async(e,t,n,a,o,s,c,l,u)=>d.runExclusive(async()=>{u+=1;let d=s.slice(u),{lastOutput:f,additionalEncryptedOutputs:p}=await e.utxoUtils.batchProcess(d,l,t,n),m=[...c,...p];return await r.checkAddressNotUpdated(e,a),i.setHinkalCache({lastOutput:f,encryptedOutputs:m},e,n,o),await e.utxoUtils.buildBatchProcess(m,t,n)}),p=async(e,t,n,r)=>{let{utxos:a,encryptedOutputs:o,lastOutput:c}=await s.getInputUtxosEnclave(e,n,t);return i.setHinkalCache({encryptedOutputs:o,lastOutput:c},e,n,r),a},m=async(e,t,n,r,i,a,o,s,c)=>{try{return await p(e,t,n,i)}catch{return f(e,t,n,r,i,a,o,s,c)}},h=e=>{if(Array.isArray(e))return e;if(e!==void 0)return[e]},g=async(e,t,n)=>await e.utxoUtils.batchFilterUtxosWithNullifier(t,n),_=(e,t,r,i,a,o,s)=>{for(e.sort((e,t)=>e.amount<=t.amount?1:-1);e.length<t||e.length>t&&e.length<6;)if(e.push(new n.Utxo({amount:0n,erc20TokenAddress:a,mintAddress:s,shieldedPrivateKey:i,tokenId:o})),r)for(;e.length>6;)e.splice(e.length-1)},v=async({hinkal:e,chainId:t,passedShieldedPublicKey:n=void 0,ethAddress:a=void 0,resetCacheBefore:o=!1,allowRemoteDecryption:s=!1,useBlockedUtxos:c=!1})=>{let l=a??await e.getEthereumAddress(),u=n??e.userKeys.getShieldedPublicKey(),{userKeys:d}=e,p=e.encryptedOutputsByChain[t],h=e.nullifiersByChain[t],_=Array.from(p);o&&i.resetCache(e,t,u);let{encryptedOutputs:v,lastOutput:y}=i.getHinkalCache(e,t,u);await r.checkAddressNotUpdated(e,l);let b=y!==``,x=_.findIndex(e=>e.value===y),S=x>-1,C=!b&&x===-1,w=e.areMerkleTreeUpdatesDisabled(),T=!w&&(S||!s&&C),E=!w&&s&&C,D=!T&&!E,O=[];T?O=await f(e,d,t,l,u,_,v,y,x):E?O=await m(e,d,t,l,u,_,v,y,x):D&&(O=await e.utxoUtils.buildBatchProcess(v,d,t)),await r.checkAddressNotUpdated(e,l);let k=await g(e,O,h);return{inputUtxos:c?k.filter(e=>e.isBlocked):k.filter(e=>!e.isBlocked)}},y=async({hinkal:t,chainId:n,passedShieldedPublicKey:r=void 0,ethAddress:i=void 0,resetCacheBefore:a=!1,allowRemoteDecryption:o=!1})=>{let s=i??await t.getEthereumAddressByChain(n),d=c.hashEthereumAddress(e.isTronLike(n)?u.addressToHexFormat(s):s),{inputUtxos:f}=await v({hinkal:t,chainId:n,passedShieldedPublicKey:r,ethAddress:s,resetCacheBefore:a,allowRemoteDecryption:o,useBlockedUtxos:!0});if(!f.length)return{inputUtxos:[]};let{indexes:p}=await l.getScheduledTransactionsNullifierIndexes({hashedEthereumAddress:d,nullifiers:f.map(e=>e.getNullifier())});return{inputUtxos:p.map(e=>f[e]).filter(e=>!!e)}},b=async({hinkal:n,tokenWithId:r,minInput:i=2,sliceIfMore6:s=!0,chainId:c,passedShieldedPrivateKey:l=void 0,passedShieldedPublicKey:u=void 0,ethAddress:d=void 0,resetCacheBefore:f=!1,ensuredTokensWithId:p,allowRemoteDecryption:m=!1,useBlockedUtxos:g=!1})=>{let b=l??n.userKeys.getShieldedPrivateKey(),{inputUtxos:x}=g?await y({hinkal:n,chainId:c,ethAddress:d,passedShieldedPrivateKey:l,resetCacheBefore:f,allowRemoteDecryption:m}):await v({hinkal:n,tokenWithId:r,minInput:i,sliceIfMore6:s,chainId:c,passedShieldedPrivateKey:l,passedShieldedPublicKey:u,ethAddress:d,resetCacheBefore:f,allowRemoteDecryption:m}),S=h(r),C=new Map;x.forEach(e=>{let n=e.getTokenAddress(c);if(S&&!S.some(r=>t.caseInsensitiveEqual(r.erc20TokenAddress,n)&&r.tokenId===e.tokenId))return;let r=a.encodeTokenWithId(c,{erc20TokenAddress:n,tokenId:e.tokenId}),i=C.get(r)??[];C.set(r,[...i,e])}),p?.forEach(e=>{let t=a.encodeTokenWithId(c,{erc20TokenAddress:e.erc20TokenAddress,tokenId:e.tokenId});C.set(t,C.get(t)??[])});for(let[t,n]of C){let r=t.split(`-`)[0],a=Number(t.split(`-`)[1]),l=e.isSolanaLike(c),u=l?r:void 0;_(n,i,s,b,l?o.formatMintAddress(r).compressedAddress.toLowerCase():r.toLowerCase(),a,u)}return C};exports.
|
|
1
|
+
require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../utils/caseInsensitive.utils.cjs`),n=require(`../../../data-structures/utxo/Utxo.cjs`),r=require(`../../utils/upToDateState.cjs`),i=require(`../../utils/cacheFunctions.cjs`),a=require(`../../utils/encodeTokenWithId.cjs`),o=require(`../../utils/solanaMint.utils.cjs`),s=require(`./getInputUtxosEnclave.cjs`),c=require(`../../utils/addresses.cjs`),l=require(`../../../API/scheduled-transactions-calls.cjs`),u=require(`../../utils/tron.utils.cjs`);var d=new(require(`async-mutex`)).Mutex,f=async(e,t,n,a,o,s,c,l,u)=>d.runExclusive(async()=>{u+=1;let d=s.slice(u),{lastOutput:f,additionalEncryptedOutputs:p}=await e.utxoUtils.batchProcess(d,l,t,n),m=[...c,...p];return await r.checkAddressNotUpdated(e,a),i.setHinkalCache({lastOutput:f,encryptedOutputs:m},e,n,o),await e.utxoUtils.buildBatchProcess(m,t,n)}),p=async(e,t,n,r)=>{let{utxos:a,encryptedOutputs:o,lastOutput:c}=await s.getInputUtxosEnclave(e,n,t);return i.setHinkalCache({encryptedOutputs:o,lastOutput:c},e,n,r),a},m=async(e,t,n,r,i,a,o,s,c)=>{try{return await p(e,t,n,i)}catch{return f(e,t,n,r,i,a,o,s,c)}},h=e=>{if(Array.isArray(e))return e;if(e!==void 0)return[e]},g=async(e,t,n)=>await e.utxoUtils.batchFilterUtxosWithNullifier(t,n),_=(e,t,r,i,a,o,s)=>{for(e.sort((e,t)=>e.amount<=t.amount?1:-1);e.length<t||e.length>t&&e.length<6;)if(e.push(new n.Utxo({amount:0n,erc20TokenAddress:a,mintAddress:s,shieldedPrivateKey:i,tokenId:o})),r)for(;e.length>6;)e.splice(e.length-1)},v=async({hinkal:e,chainId:t,passedShieldedPublicKey:n=void 0,ethAddress:a=void 0,resetCacheBefore:o=!1,allowRemoteDecryption:s=!1,useBlockedUtxos:c=!1})=>{let l=a??await e.getEthereumAddress(),u=n??e.userKeys.getShieldedPublicKey(),{userKeys:d}=e,p=e.encryptedOutputsByChain[t],h=e.nullifiersByChain[t],_=Array.from(p);o&&i.resetCache(e,t,u);let{encryptedOutputs:v,lastOutput:y}=i.getHinkalCache(e,t,u);await r.checkAddressNotUpdated(e,l);let b=y!==``,x=_.findIndex(e=>e.value===y),S=x>-1,C=!b&&x===-1,w=e.areMerkleTreeUpdatesDisabled(),T=!w&&(S||!s&&C),E=!w&&s&&C,D=!T&&!E,O=[];T?O=await f(e,d,t,l,u,_,v,y,x):E?O=await m(e,d,t,l,u,_,v,y,x):D&&(O=await e.utxoUtils.buildBatchProcess(v,d,t)),await r.checkAddressNotUpdated(e,l);let k=await g(e,O,h);return{inputUtxos:c?k.filter(e=>e.isBlocked):k.filter(e=>!e.isBlocked)}},y=async({hinkal:t,chainId:n,passedShieldedPublicKey:r=void 0,ethAddress:i=void 0,resetCacheBefore:a=!1,allowRemoteDecryption:o=!1})=>{let s=i??await t.getEthereumAddressByChain(n),d=c.hashEthereumAddress(e.isTronLike(n)?u.addressToHexFormat(s):s),{inputUtxos:f}=await v({hinkal:t,chainId:n,passedShieldedPublicKey:r,ethAddress:s,resetCacheBefore:a,allowRemoteDecryption:o,useBlockedUtxos:!0});if(!f.length)return{inputUtxos:[]};let{indexes:p}=await l.getScheduledTransactionsNullifierIndexes({hashedEthereumAddress:d,nullifiers:f.map(e=>e.getNullifier())});return{inputUtxos:p.map(e=>f[e]).filter(e=>!!e)}},b=async({hinkal:n,tokenWithId:r,minInput:i=2,sliceIfMore6:s=!0,chainId:c,passedShieldedPrivateKey:l=void 0,passedShieldedPublicKey:u=void 0,ethAddress:d=void 0,resetCacheBefore:f=!1,ensuredTokensWithId:p,allowRemoteDecryption:m=!1,useBlockedUtxos:g=!1})=>{let b=l??n.userKeys.getShieldedPrivateKey(),{inputUtxos:x}=g?await y({hinkal:n,chainId:c,ethAddress:d,passedShieldedPrivateKey:l,resetCacheBefore:f,allowRemoteDecryption:m}):await v({hinkal:n,tokenWithId:r,minInput:i,sliceIfMore6:s,chainId:c,passedShieldedPrivateKey:l,passedShieldedPublicKey:u,ethAddress:d,resetCacheBefore:f,allowRemoteDecryption:m}),S=h(r),C=new Map;x.forEach(e=>{let n=e.getTokenAddress(c);if(S&&!S.some(r=>t.caseInsensitiveEqual(r.erc20TokenAddress,n)&&r.tokenId===e.tokenId))return;let r=a.encodeTokenWithId(c,{erc20TokenAddress:n,tokenId:e.tokenId}),i=C.get(r)??[];C.set(r,[...i,e])}),p?.forEach(e=>{let t=a.encodeTokenWithId(c,{erc20TokenAddress:e.erc20TokenAddress,tokenId:e.tokenId});C.set(t,C.get(t)??[])});for(let[t,n]of C){let r=t.split(`-`)[0],a=Number(t.split(`-`)[1]),l=e.isSolanaLike(c),u=l?r:void 0;_(n,i,s,b,l?o.formatMintAddress(r).compressedAddress.toLowerCase():r.toLowerCase(),a,u)}return C};exports.getInputUtxoAndBalance=v,exports.getInputUtxoAndBalanceOfStuckUtxos=y,exports.getInputUtxoAndBalancePerToken=b;
|
|
@@ -108,4 +108,4 @@ var h = new m(), g = async (e, t, n, r, a, o, c, l, u) => h.runExclusive(async (
|
|
|
108
108
|
return b;
|
|
109
109
|
};
|
|
110
110
|
//#endregion
|
|
111
|
-
export {
|
|
111
|
+
export { S as getInputUtxoAndBalance, C as getInputUtxoAndBalanceOfStuckUtxos, w as getInputUtxoAndBalancePerToken };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../../error-handling/error-codes.constants.cjs`),r=require(`../etherFunctions.cjs`),i=require(`../../utils/erc20tokenFunctions.cjs`),a=require(`../../utils/caseInsensitive.utils.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`)
|
|
1
|
+
const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../../error-handling/error-codes.constants.cjs`),r=require(`../etherFunctions.cjs`),i=require(`../../utils/erc20tokenFunctions.cjs`),a=require(`../../utils/caseInsensitive.utils.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`),c=require(`../../utils/encodeTokenWithId.cjs`),l=require(`../../utils/solanaMint.utils.cjs`),u=require(`./getInputUtxoAndBalance.cjs`),d=require(`../../../data-structures/TokenDBs/PrivateTokensDB.cjs`),f=require(`../../utils/mutexes.utils.cjs`);var p=async(t,n,r,o,s,c=!1,l,p=!1,m=!1)=>f.getChainBalanceFetchingMutex(n).runExclusive(async()=>{let{inputUtxos:f}=m?await u.getInputUtxoAndBalanceOfStuckUtxos({hinkal:t,chainId:n,ethAddress:s,passedShieldedPrivateKey:r,resetCacheBefore:c,allowRemoteDecryption:l}):await u.getInputUtxoAndBalance({hinkal:t,sliceIfMore6:!1,chainId:n,passedShieldedPrivateKey:r,passedShieldedPublicKey:o,ethAddress:s,resetCacheBefore:c,allowRemoteDecryption:l});p&&e.isExtension&&await d.privateTokensDB.fetchAndUpdatePrivateTokens(f.map(e=>e.getTokenAddress(n)).filter(e=>e!==void 0),n,s);let h=(e.isExtension?await d.privateTokensDB.getPrivateTokens(n,s):i.getErc20TokensForChain(n)).map(e=>({token:e,balance:f.reduce((t,r)=>{let i=e.erc20TokenAddress;return a.caseInsensitiveEqual(i,r.getTokenAddress(n))?t+r.amount:t},0n),timestamp:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress))[0]?.timeStamp,nfts:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress)&&t.tokenId!==0).map(e=>({tokenId:e.tokenId,timestamp:e.timeStamp}))})),g=new Map;return h.forEach(e=>{g.set(e.token.erc20TokenAddress.toLowerCase(),e)}),g}),m=async(e,a,d,f,p=6,m=d.map(()=>0),h=!1,g=!1)=>{let{userKeys:_}=e,v=[],y=[];if(d.length===0)return[];let b=await u.getInputUtxoAndBalancePerToken({hinkal:e,sliceIfMore6:!1,ensuredTokensWithId:d.map((e,t)=>({erc20TokenAddress:d[t],tokenId:m[t]})),allowRemoteDecryption:e.generateProofRemotely,useBlockedUtxos:g,chainId:a}),x=0;for(let e=0;e<d.length;e+=1)if(h===!1){let t=b.get(c.encodeTokenWithId(a,{erc20TokenAddress:d[e],tokenId:m[e]}))??[];if(!t)throw Error(`Missing utxos for token`);x=Math.max(t.length,x),y.push(t)}else y.push([]);return x===2?y:(y.forEach((e,c)=>{if(e.length>p){let t=e.slice(0,p),o=t.reduce((e,t)=>e+t.amount,0n);if(f[c]<0n&&o<-f[c]){let e=i.getERC20Token(d[c],a),t=e.decimals===18?6:2,l=Number(r.getAmountWithPrecision(o,e,t));throw new s.ErrorWithAmount(l,`${n.DIRECTLY_SHOW_MESSAGE_ERROR_CODES.UTXO_LIMITATIONS}. Please try again with ${l} ${e.symbol}, including gas fees.`)}v.push(t)}else if(e.length<=p){let n=[...e],r=p-e.length;for(;r>0;){--r;let e=t.isSolanaLike(a),i=e?d[c]:void 0,s=e?l.formatMintAddress(d[c]).compressedAddress:d[c];n.push(new o.Utxo({amount:0n,erc20TokenAddress:s,mintAddress:i,shieldedPrivateKey:_.getShieldedPrivateKey(),tokenId:m[c]}))}v.push(n)}}),v)};exports.addPaddingToUtxos=m,exports.getShieldedBalance=p;
|
|
@@ -6,7 +6,6 @@ import { getERC20Token as i, getErc20TokensForChain as a } from "../../utils/erc
|
|
|
6
6
|
import { caseInsensitiveEqual as o } from "../../utils/caseInsensitive.utils.mjs";
|
|
7
7
|
import { Utxo as s } from "../../../data-structures/utxo/Utxo.mjs";
|
|
8
8
|
import { ErrorWithAmount as c } from "../../../error-handling/customErrors/ErrorWithAmount.mjs";
|
|
9
|
-
import "../../../error-handling/customErrors/index.mjs";
|
|
10
9
|
import { encodeTokenWithId as l } from "../../utils/encodeTokenWithId.mjs";
|
|
11
10
|
import { formatMintAddress as u } from "../../utils/solanaMint.utils.mjs";
|
|
12
11
|
import { getInputUtxoAndBalance as d, getInputUtxoAndBalanceOfStuckUtxos as f, getInputUtxoAndBalancePerToken as p } from "./getInputUtxoAndBalance.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../utils/bytes32.utils.cjs`);
|
|
1
|
+
const e=require(`../utils/bytes32.utils.cjs`);var t=async(t,n)=>{let r=await t.account.merkle.fetch(n,`confirmed`),i=Number(e.convertBytes32ToBigInt(r.rootIndex));return e.convertBytes32ToBigInt(r.roots.at(i-1))};exports.fetchSolanaMerkleTreeRootHash=t;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { convertBytes32ToBigInt as e } from "../utils/bytes32.utils.mjs";
|
|
2
|
-
import "../utils/index.mjs";
|
|
3
2
|
//#region libs/shared/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.ts
|
|
4
3
|
var t = async (t, n) => {
|
|
5
4
|
let r = await t.account.merkle.fetch(n, "confirmed"), i = Number(e(r.rootIndex));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../../types/ethereum-network.types.cjs`),n=require(`../../pre-transaction/solana.cjs`);
|
|
1
|
+
require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../../types/ethereum-network.types.cjs`),n=require(`../../pre-transaction/solana.cjs`);let r=require(`@solana/web3.js`);var i=async(e,n,r)=>{let i=r??e.userKeys.getAccessKey();return(await e.getContractWithFetcher(n,t.ContractType.AccessTokenContract).hasToken(i))[0]},a=async(t,i,a)=>{let o=a??t.userKeys.getAccessKey(),{hinkalIdl:s,originalDeployer:c}=e.networkRegistry[i].contractData;if(!s||!c)throw Error(`missing hinkal data`);let l=new r.PublicKey(c),u=t.getSolanaProgram(s),d=n.getAccessTokenAccountPublicKey(BigInt(o),u.programId,l);if(!await u.provider.connection.getAccountInfo(d))return!1;let{isAdded:f}=await u.account.accesskeyAccount.fetch(d);return f},o=async(t,n,r)=>e.isTronLike(n)?!0:e.isSolanaLike(n)?a(t,n,r):i(t,n,r);exports.checkHinkalAccessToken=o;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../../constants/chains.constants.mjs";
|
|
2
2
|
import { ContractType as r } from "../../../types/ethereum-network.types.mjs";
|
|
3
3
|
import { getAccessTokenAccountPublicKey as i } from "../../pre-transaction/solana.mjs";
|
|
4
|
-
import "../../../types/index.mjs";
|
|
5
4
|
import { PublicKey as a } from "@solana/web3.js";
|
|
6
5
|
//#region libs/shared/common/src/functions/web3/functionCalls/accessTokenCalls.ts
|
|
7
6
|
var o = async (e, t, n) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../types/transactions.types.cjs`)
|
|
1
|
+
const e=require(`../../../types/transactions.types.cjs`),t=require(`../../utils/time.utils.cjs`);var n=1*1e3,r=30*1e3,i=async(i,a,o=0)=>{if((await i.getTransactionReceipt(a))?.status!==e.TransactionReceiptStatus.Succeeded)return;o>0&&await i.waitForTransaction(a,o);let s=r/n,c=null;for(let e=0;e<s;e+=1){try{if(c=await i.getTransaction(a),c)break}catch{}e<s-1&&await t.waitLittle(n)}return c??void 0};exports.recoverTransactionFromError=i;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TransactionReceiptStatus as e } from "../../../types/transactions.types.mjs";
|
|
2
|
-
import "../../../types/index.mjs";
|
|
3
2
|
import { waitLittle as t } from "../../utils/time.utils.mjs";
|
|
4
3
|
//#region libs/shared/common/src/functions/web3/functionCalls/recoverTransactionFromError.ts
|
|
5
4
|
var n = 1 * 1e3, r = 30 * 1e3, i = async (i, a, o = 0) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../../error-handling/customErrors/ErrorWithTx.cjs`),t=require(`../../../constants/server.constants.cjs`),n=require(`../../../API/getServerURL.cjs`),r=require(`../../../data-structures/http/HttpClient.cjs`),i=require(`../../../API/callRelayer.cjs`),a=require(`../../snarkjs/common.snarkjs.cjs`);
|
|
1
|
+
const e=require(`../../../error-handling/customErrors/ErrorWithTx.cjs`),t=require(`../../../constants/server.constants.cjs`),n=require(`../../../API/getServerURL.cjs`),r=require(`../../../data-structures/http/HttpClient.cjs`),i=require(`../../../API/callRelayer.cjs`),a=require(`../../snarkjs/common.snarkjs.cjs`);var o=t=>{if(t.status===`success`)return t.message;throw t.message&&t.error?new e.ErrorWithRelayerTransaction(t.error,t.message):Error(t.error)},s=async(e,t,n,r,s,c,l,u,d)=>{let f=a.serializeCircomData(r);return o(await i.callRelayerTransactAPI({chainId:e,a:t[0],b:t[1],c:t[2],dimData:n,circomData:f,withUniswapWorkAround:c,authorizationData:l,adminData:u,tronProofSignature:d,commitmentValidationData:s}))},c=async e=>o(await r.httpClient.post(`${n.RELAYER_URL}${t.RELAYER_CONFIG.SOLANA_TRANSACT}`,e)),l=e=>{if(e.status===`success`)return e.message.scheduleId;throw Error(e.error||`Batch transaction failed`)},u=async(e,t,n,r,o,s)=>{let c=t.map(e=>a.serializeCircomData(e.circomData));return l(await i.callRelayerTransactBatchAPI({chainId:e,transactions:t.map((t,n)=>({chainId:e,a:t.zkCallData[0],b:t.zkCallData[1],c:t.zkCallData[2],dimData:t.dimData,circomData:c[n],commitmentValidationData:t.commitmentValidationData,withUniswapWorkAround:t.withUniswapWorkAround,authorizationData:t.authorizationData,adminData:t.adminData,recipientAddress:t.recipientAddress,tronProofSignature:t.tronProofSignature})),txCompletionTime:r,hashedEthereumAddress:n,ref:o,hashedDashboardAccountId:s}))},d=async(e,t,n,r,a,o)=>l(await i.callRelayerSolanaTransactBatchAPI({chainId:e,transactions:t,hashedEthereumAddress:n,txCompletionTime:r,ref:a,hashedDashboardAccountId:o}));exports.solanaTransactCallRelayer=c,exports.solanaTransactCallRelayerBatch=d,exports.transactCallRelayer=s,exports.transactCallRelayerBatch=u;
|
|
@@ -4,8 +4,6 @@ import { RELAYER_URL as n } from "../../../API/getServerURL.mjs";
|
|
|
4
4
|
import { httpClient as r } from "../../../data-structures/http/HttpClient.mjs";
|
|
5
5
|
import { callRelayerSolanaTransactBatchAPI as i, callRelayerTransactAPI as a, callRelayerTransactBatchAPI as o } from "../../../API/callRelayer.mjs";
|
|
6
6
|
import { serializeCircomData as s } from "../../snarkjs/common.snarkjs.mjs";
|
|
7
|
-
import "../../../error-handling/index.mjs";
|
|
8
|
-
import "../../snarkjs/index.mjs";
|
|
9
7
|
//#region libs/shared/common/src/functions/web3/functionCalls/transactCallRelayer.ts
|
|
10
8
|
var c = (t) => {
|
|
11
9
|
if (t.status === "success") return t.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`)
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`),r=require(`../../error-handling/logger.cjs`),i=require(`../../types/fee.types.cjs`);var a=async(a,o=i.SolanaPriorityFeeMode.RECOMMENDED)=>{let s=a.map(e=>e.toBase58());try{let r=await n.httpClient.post(e.HELIUS_RPC_URL,{jsonrpc:`2.0`,id:`1`,method:`getPriorityFeeEstimate`,params:[{accountKeys:s,options:o===i.SolanaPriorityFeeMode.RECOMMENDED?{recommended:!0}:{includeAllPriorityFeeLevels:!0}}]}),a=o===i.SolanaPriorityFeeMode.RECOMMENDED?r.result?.priorityFeeEstimate:r.result?.priorityFeeLevels?.high;return Math.min(a??15e5,t.MAX_MICRO_LAMPORTS_PER_CU)}catch(e){return r.Logger.error(`Error getting solana priority fee:`,e),t.MAX_MICRO_LAMPORTS_PER_CU}};exports.getSolanaPriorityFee=a;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { HELIUS_RPC_URL as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { MAX_MICRO_LAMPORTS_PER_CU as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
|
|
4
|
-
import "../../data-structures/http/index.mjs";
|
|
5
4
|
import { Logger as r } from "../../error-handling/logger.mjs";
|
|
6
5
|
import { SolanaPriorityFeeMode as i } from "../../types/fee.types.mjs";
|
|
7
6
|
//#region libs/shared/common/src/functions/web3/getSolanaPriorityFee.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOdosAPI.cjs`);
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOdosAPI.cjs`);var a=async(a,o,s,c,l=.7)=>{try{let{odosResponse:n,status:u}=await i.callOdosAPI(a,{chainId:a===31337?e.localhostNetwork:a,inputTokens:[{tokenAddress:o?.wrappedErc20TokenAddress??o.erc20TokenAddress,amount:r.getAmountInWei(o,c).toString()}],outputTokens:[{tokenAddress:s?.wrappedErc20TokenAddress??s.erc20TokenAddress,proportion:1}],userAddr:e.networkRegistry[a].contractData.odosExternalActionInstanceAddress||t.zeroAddress,slippageLimitPercent:l,disableRFQs:!0});if(u!==`success`)throw Error(`Odos API Fetch Error`);return{outSwapAmountValue:BigInt(n.outputTokens[0].amount),odosDataValue:n.transaction.data}}catch(e){throw console.log({error:e}),Error(n.transactionErrorCodes.NO_ODOS_PRICE)}};exports.getOdosPrice=a;
|
|
@@ -3,8 +3,6 @@ import { zeroAddress as n } from "../../constants/protocol.constants.mjs";
|
|
|
3
3
|
import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
|
|
4
4
|
import { getAmountInWei as i } from "./etherFunctions.mjs";
|
|
5
5
|
import { callOdosAPI as a } from "../../API/callOdosAPI.mjs";
|
|
6
|
-
import "../../error-handling/index.mjs";
|
|
7
|
-
import "../../constants/index.mjs";
|
|
8
6
|
//#region libs/shared/common/src/functions/web3/odosAPI.ts
|
|
9
7
|
var o = async (o, s, c, l, u = .7) => {
|
|
10
8
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../pre-transaction/solana.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOkxAPI.cjs`);let a=require(`@solana/web3.js`);var o=(e,t,n,r,i=.7)=>({amount:`${n}`,chainIndex:`501`,fromTokenAddress:e.toString(),toTokenAddress:t.toString(),userWalletAddress:r,slippagePercent:`${i}`,directRoute:!0}),s=async(s,c,l,u,d=.5,f,p)=>{if(!t.isSolanaLike(s))throw Error(`OKX is only supported on Solana`);let m=r.randomBigInt(31),h=r.getAmountInWei(c,u),{hinkalAddress:g,originalDeployer:_}=t.networkRegistry[s].contractData;if(!_)throw Error(`No original deployer configured for Solana program`);if(p&&!f)throw Error(`Proxy wallet address is required`);let v=new a.PublicKey(g),y=new a.PublicKey(_),b=p&&f?new a.PublicKey(f):n.getSwapperAccountPublicKeyFromSalt(v,y,m),{okxResponse:x,status:S}=await i.callOkxAPI({quote:o(new a.PublicKey(c.erc20TokenAddress),new a.PublicKey(l.erc20TokenAddress),h,b.toString(),d)});if(S!==`success`)throw Error(`OKX API Fetch Error`);if(x.code!==`0`)throw Error(`OKX API error: ${x.msg}`);return{outSwapAmountValue:BigInt(x.data.routerResult.toTokenAmount),okxDataValue:e.safeJsonStringify({...x,swapperAccountSalt:m.toString()})}};exports.
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../pre-transaction/solana.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOkxAPI.cjs`);let a=require(`@solana/web3.js`);var o=(e,t,n,r,i=.7)=>({amount:`${n}`,chainIndex:`501`,fromTokenAddress:e.toString(),toTokenAddress:t.toString(),userWalletAddress:r,slippagePercent:`${i}`,directRoute:!0}),s=async(s,c,l,u,d=.5,f,p)=>{if(!t.isSolanaLike(s))throw Error(`OKX is only supported on Solana`);let m=r.randomBigInt(31),h=r.getAmountInWei(c,u),{hinkalAddress:g,originalDeployer:_}=t.networkRegistry[s].contractData;if(!_)throw Error(`No original deployer configured for Solana program`);if(p&&!f)throw Error(`Proxy wallet address is required`);let v=new a.PublicKey(g),y=new a.PublicKey(_),b=p&&f?new a.PublicKey(f):n.getSwapperAccountPublicKeyFromSalt(v,y,m),{okxResponse:x,status:S}=await i.callOkxAPI({quote:o(new a.PublicKey(c.erc20TokenAddress),new a.PublicKey(l.erc20TokenAddress),h,b.toString(),d)});if(S!==`success`)throw Error(`OKX API Fetch Error`);if(x.code!==`0`)throw Error(`OKX API error: ${x.msg}`);return{outSwapAmountValue:BigInt(x.data.routerResult.toTokenAmount),okxDataValue:e.safeJsonStringify({...x,swapperAccountSalt:m.toString()})}};exports.getOKXPrice=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`)
|
|
1
|
+
const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../error-handling/logger.cjs`),a=require(`./getContractMetadata.cjs`),o=require(`../../API/callOneInchAPI.cjs`);var s=async(s,c,l,u,d=.7)=>{try{let n=await o.callOneInchAPI(s,{fromTokenAddress:c.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:c.erc20TokenAddress,toTokenAddress:l.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:l.erc20TokenAddress,fromAddress:e.zeroAddress,destReceiver:a.getContractMetadata(t.ContractType.OneInchExternalActionContract,s).address,amount:r.getAmountInWei(c,u),slippage:d,disableEstimate:!0,allowPartialFill:!1});if(!n||!n.tx)throw Error(`OneInch API price fetch error`);return{outSwapAmountValue:BigInt(n.toAmount),oneInchDataValue:n.tx.data}}catch(e){throw i.Logger.log({error:e}),Error(n.transactionErrorCodes.NO_ONEINCH_PRICE)}};exports.getOneInchPrice=s;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { oneInchZeroAddress as e, zeroAddress as t } from "../../constants/protocol.constants.mjs";
|
|
2
2
|
import { ContractType as n } from "../../types/ethereum-network.types.mjs";
|
|
3
|
-
import "../../types/index.mjs";
|
|
4
3
|
import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
|
|
5
4
|
import { getAmountInWei as i } from "./etherFunctions.mjs";
|
|
6
5
|
import { Logger as a } from "../../error-handling/logger.mjs";
|
|
7
|
-
import "../../error-handling/index.mjs";
|
|
8
|
-
import "../../constants/index.mjs";
|
|
9
6
|
import { getContractMetadata as o } from "./getContractMetadata.mjs";
|
|
10
7
|
import { callOneInchAPI as s } from "../../API/callOneInchAPI.mjs";
|
|
11
8
|
//#region libs/shared/common/src/functions/web3/oneInchAPI.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`)
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`),r=require(`../../error-handling/error-codes.constants.cjs`),i=require(`./etherFunctions.cjs`),a=require(`../../error-handling/logError.cjs`);let o=require(`ethers`);var s=async(e,n,i,a)=>{let o=(await Promise.all([100,500,3e3,1e4].map(async e=>({poolAddress:await n.getPool(i,a,e),fee:e})))).filter(({poolAddress:e})=>e!==t.zeroAddress),s=await Promise.all(o.map(async t=>({poolAddress:t.poolAddress,fee:t.fee,token1Balance:await e.balanceOf(t.poolAddress)}))),c=s.map(e=>e.token1Balance).reduce((e,t)=>t>=e?t:e,0n);if(c===0n)throw Error(r.transactionErrorCodes.UNISWAP_NOT_ENOUGH_LIQUIDITY);return s.find(e=>e.token1Balance===c)},c=async(t,r,i,o,s,c)=>{try{if(!e.networkRegistry[r].quoterV2Address)throw Error(`No Quoter Contract Provided`);return(await t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3QuoterContract,e.networkRegistry[r].quoterV2Address).quoteExactInputSingle.staticCall({tokenIn:i.wrappedErc20TokenAddress??i.erc20TokenAddress,tokenOut:o.wrappedErc20TokenAddress??o.erc20TokenAddress,fee:s,amountIn:c,sqrtPriceLimitX96:0})).amountOut}catch(e){throw a.logError(e),e}},l=async(t,r,i,a)=>{try{let o=t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3FactoryContract,e.networkRegistry[r].uniswapV3FactoryAddress),{fee:c}=await s(t.getContractWithFetcherByChainId(r,n.ContractType.ERC20Contract,a.wrappedErc20TokenAddress??a.erc20TokenAddress),o,i.wrappedErc20TokenAddress??i.erc20TokenAddress,a.wrappedErc20TokenAddress??a.erc20TokenAddress);return c}catch(e){throw console.log(`Error in getUniswapFee`,e),e}},u=async(e,t,n,a,s)=>{try{let r=await l(e,t,a,s),u=o.ethers.AbiCoder.defaultAbiCoder().encode([`uint24`],[r]);return{tokenPrice:await c(e,t,a,s,r,i.getAmountInWei(a,n)),poolFee:u}}catch{throw Error(r.transactionErrorCodes.NO_UNISWAP_PRICE)}};exports.getUniswapPrice=u;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { networkRegistry as e } from "../../constants/chains.constants.mjs";
|
|
2
2
|
import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
|
|
3
3
|
import { ContractType as n } from "../../types/ethereum-network.types.mjs";
|
|
4
|
-
import "../../types/index.mjs";
|
|
5
4
|
import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
|
|
6
5
|
import { getAmountInWei as i } from "./etherFunctions.mjs";
|
|
7
6
|
import { logError as a } from "../../error-handling/logError.mjs";
|
|
8
|
-
import "../../error-handling/index.mjs";
|
|
9
|
-
import "../../constants/index.mjs";
|
|
10
7
|
import { ethers as o } from "ethers";
|
|
11
8
|
//#region libs/shared/common/src/functions/web3/uniswapAPI.ts
|
|
12
9
|
var s = async (e, n, i, a) => {
|
|
@@ -57,4 +54,4 @@ var s = async (e, n, i, a) => {
|
|
|
57
54
|
}
|
|
58
55
|
};
|
|
59
56
|
//#endregion
|
|
60
|
-
export {
|
|
57
|
+
export { u as getUniswapPrice };
|