@hinkal/common 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API/API.cjs +1 -1
- package/API/API.d.ts +8 -13
- package/API/API.mjs +86 -94
- package/API/admin-calls.cjs +1 -1
- package/API/admin-calls.d.ts +1 -1
- package/API/admin-calls.mjs +4 -4
- package/API/callLifiAPI.cjs +1 -1
- package/API/callLifiAPI.d.ts +1 -1
- package/API/callLifiAPI.mjs +5 -5
- package/API/callMonitor.cjs +1 -1
- package/API/callMonitor.d.ts +1 -1
- package/API/callMonitor.mjs +7 -7
- package/API/callOdosAPI.cjs +1 -1
- package/API/callOdosAPI.mjs +11 -11
- package/API/callOkxAPI.cjs +1 -1
- package/API/callOkxAPI.d.ts +1 -1
- package/API/callOkxAPI.mjs +5 -5
- package/API/callOneInchAPI.cjs +1 -1
- package/API/callOneInchAPI.mjs +10 -11
- package/API/callRelayer.cjs +1 -1
- package/API/callRelayer.d.ts +6 -3
- package/API/callRelayer.mjs +11 -11
- package/API/checkRisk.cjs +1 -1
- package/API/checkRisk.d.ts +1 -1
- package/API/checkRisk.mjs +4 -4
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.mjs +9 -9
- package/API/get-token-data.cjs +1 -1
- package/API/get-token-data.d.ts +1 -1
- package/API/get-token-data.mjs +5 -5
- package/API/get-token-price-chart-data.cjs +1 -0
- package/API/get-token-price-chart-data.d.ts +16 -0
- package/API/get-token-price-chart-data.mjs +13 -0
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.mjs +9 -9
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +3 -3
- package/API/getServerURL.mjs +51 -67
- package/API/getTokenPrice.cjs +1 -1
- package/API/getTokenPrice.d.ts +5 -0
- package/API/getTokenPrice.mjs +14 -7
- package/API/index.d.ts +0 -3
- package/API/is-tx-stateless.cjs +1 -1
- package/API/is-tx-stateless.d.ts +1 -1
- package/API/is-tx-stateless.mjs +10 -12
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +4 -8
- package/API/kycCalls.mjs +23 -26
- package/API/onrampCalls.cjs +1 -0
- package/API/onrampCalls.d.ts +20 -0
- package/API/onrampCalls.mjs +15 -0
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.d.ts +2 -2
- package/API/proxyAccountsCalls.mjs +19 -19
- package/API/relayCalls.cjs +1 -1
- package/API/relayCalls.mjs +4 -4
- package/API/scheduled-transactions-calls.cjs +1 -1
- package/API/scheduled-transactions-calls.d.ts +1 -1
- package/API/scheduled-transactions-calls.mjs +4 -4
- package/API/simulate-batch-tx.cjs +1 -1
- package/API/simulate-batch-tx.d.ts +2 -2
- package/API/simulate-batch-tx.mjs +7 -6
- package/API/solana-calls.cjs +1 -1
- package/API/solana-calls.d.ts +6 -3
- package/API/solana-calls.mjs +15 -15
- package/API/token-calls.cjs +1 -1
- package/API/token-calls.mjs +6 -5
- package/API/unspent-utxos-calls.cjs +1 -1
- package/API/unspent-utxos-calls.d.ts +1 -1
- package/API/unspent-utxos-calls.mjs +15 -18
- package/README.md +233 -64
- package/constants/addresses.constants.cjs +1 -1
- package/constants/addresses.constants.d.ts +0 -1
- package/constants/addresses.constants.mjs +7 -8
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +0 -5
- package/constants/chains.constants.mjs +19 -24
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +1 -0
- package/constants/coingecko.constants.mjs +11 -10
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +34 -41
- package/constants/function-signatures.constants.cjs +1 -1
- package/constants/function-signatures.constants.d.ts +0 -1
- package/constants/function-signatures.constants.mjs +3 -4
- package/constants/mystery-boxes.constants.d.ts +0 -0
- package/constants/permit2.constants.cjs +1 -1
- package/constants/permit2.constants.d.ts +0 -1
- package/constants/permit2.constants.mjs +10 -11
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +14 -122
- package/constants/server.constants.mjs +44 -152
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +0 -24
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -24
- package/constants/token-data/index.d.ts +32 -88
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +0 -26
- package/constants/token-data/popularTokens.constants.cjs +1 -1
- package/constants/token-data/popularTokens.constants.mjs +0 -1
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +33 -48
- package/data-structures/Hinkal/Hinkal.mjs +237 -300
- package/data-structures/Hinkal/IHinkal.d.ts +32 -47
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.d.ts +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +42 -42
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +25 -23
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +9 -9
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +95 -93
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +111 -115
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +1 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +107 -115
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +36 -34
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +34 -33
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +26 -24
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +1 -2
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +8 -9
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -3
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +86 -97
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +146 -146
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +2 -3
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +38 -38
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +57 -56
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +59 -58
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +83 -79
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +49 -48
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +67 -64
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +75 -87
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +55 -58
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +80 -82
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +98 -102
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.d.ts +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +105 -53
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.mjs +7 -7
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +8 -8
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +10 -10
- package/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/data-structures/IndexedDB/signatures-db.mjs +25 -40
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +10 -11
- package/data-structures/TokenDBs/token-visibility-db.cjs +1 -1
- package/data-structures/TokenDBs/token-visibility-db.mjs +22 -36
- package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +14 -14
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.d.ts +1 -0
- package/data-structures/event-service/evm/AbstractEventService.mjs +7 -4
- package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +0 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.mjs +3 -4
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +3 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +17 -14
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +1 -0
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +9 -6
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +0 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +1 -2
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +3 -2
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +42 -45
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +8 -13
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +3 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +3 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +2 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +3 -4
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +1 -7
- package/data-structures/utxo/Utxo.mjs +26 -36
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +1 -0
- package/error-handling/error-codes.constants.mjs +2 -1
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +21 -27
- package/error-handling/index.d.ts +0 -1
- package/functions/index.d.ts +0 -1
- package/functions/kyc/zkMeHelper.cjs +1 -1
- package/functions/kyc/zkMeHelper.mjs +18 -17
- package/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/functions/pre-transaction/constructAdminData.d.ts +2 -2
- package/functions/pre-transaction/constructAdminData.mjs +12 -18
- package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/functions/pre-transaction/getExternalSwapAddress.d.ts +1 -2
- package/functions/pre-transaction/getExternalSwapAddress.mjs +8 -8
- package/functions/pre-transaction/getFlatFees.cjs +1 -1
- package/functions/pre-transaction/getFlatFees.mjs +22 -30
- package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +21 -36
- package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +17 -17
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +1 -9
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +19 -34
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +4 -4
- package/functions/pre-transaction/solana-public-signals.cjs +1 -1
- package/functions/pre-transaction/solana-public-signals.d.ts +1 -0
- package/functions/pre-transaction/solana-public-signals.mjs +29 -26
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.d.ts +2 -1
- package/functions/pre-transaction/solana.mjs +60 -51
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +3 -5
- package/functions/private-wallet/emporium.helpers.mjs +95 -135
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.d.ts +1 -4
- package/functions/private-wallet/emporium.swap.helpers.mjs +100 -102
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +1 -1
- package/functions/snarkjs/common.snarkjs.mjs +64 -64
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.mjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +1 -2
- package/functions/snarkjs/constructGeneralZkProof.mjs +117 -121
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.d.ts +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +54 -59
- package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +11 -10
- package/functions/utils/addresses.cjs +1 -1
- package/functions/utils/addresses.d.ts +1 -0
- package/functions/utils/addresses.mjs +13 -12
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +2 -2
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +0 -1
- package/functions/utils/erc20tokenFunctions.mjs +22 -29
- package/functions/utils/get-hinkal-approvals.cjs +1 -1
- package/functions/utils/get-hinkal-approvals.d.ts +1 -1
- package/functions/utils/get-hinkal-approvals.mjs +16 -16
- package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.mjs +11 -11
- package/functions/utils/involves-permit2-op.cjs +1 -1
- package/functions/utils/involves-permit2-op.d.ts +0 -1
- package/functions/utils/involves-permit2-op.mjs +4 -6
- package/functions/utils/mutexes.utils.cjs +1 -1
- package/functions/utils/mutexes.utils.d.ts +1 -1
- package/functions/utils/mutexes.utils.mjs +3 -3
- package/functions/utils/nftTokenFunctions.cjs +1 -1
- package/functions/utils/nftTokenFunctions.mjs +8 -23
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.d.ts +0 -6
- package/functions/utils/prepareHinkal.mjs +41 -60
- package/functions/utils/token-check.utils.cjs +1 -1
- package/functions/utils/token-check.utils.d.ts +3 -0
- package/functions/utils/token-check.utils.mjs +18 -7
- package/functions/utils/upToDateState.cjs +1 -1
- package/functions/utils/upToDateState.d.ts +1 -1
- package/functions/utils/upToDateState.mjs +4 -4
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +1 -16
- package/functions/utils/walletBalances.utils.mjs +4 -35
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.d.ts +3 -4
- package/functions/web3/events/getApprovedBalance.mjs +39 -44
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +114 -121
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.ts +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +71 -70
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +7 -7
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +7 -7
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +1 -6
- package/functions/web3/functionCalls/accessTokenCalls.mjs +12 -21
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.d.ts +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +50 -46
- package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -1
- package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +1 -1
- package/functions/web3/functionCalls/approveTokensToHinkal.mjs +6 -6
- package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
- package/functions/web3/functionCalls/estimateGasRelayer.d.ts +1 -2
- package/functions/web3/functionCalls/estimateGasRelayer.mjs +10 -10
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +38 -42
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +34 -34
- package/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/functions/web3/getPublicAddressBalance.d.ts +1 -1
- package/functions/web3/getPublicAddressBalance.mjs +6 -6
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +8 -8
- package/functions/web3/lifiAPI.cjs +1 -1
- package/functions/web3/lifiAPI.d.ts +1 -1
- package/functions/web3/lifiAPI.mjs +12 -12
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.mjs +6 -19
- package/functions/web3/okxAPI.cjs +1 -1
- package/functions/web3/okxAPI.mjs +22 -22
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.mjs +7 -20
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +38 -56
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.mjs +22 -34
- package/index.cjs +1 -1
- package/index.mjs +939 -970
- package/package.json +1 -1
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +10 -17
- package/providers/EthersProviderAdapter.mjs +48 -76
- package/providers/SolanaProviderAdapter.cjs +1 -1
- package/providers/SolanaProviderAdapter.d.ts +7 -11
- package/providers/SolanaProviderAdapter.mjs +16 -31
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +11 -17
- package/providers/WagmiProviderAdapter.mjs +86 -117
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +6 -7
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +5 -5
- package/types/TransactionSimulator.types.d.ts +2 -9
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +0 -6
- package/types/admin.types.mjs +2 -2
- package/types/balances.types.d.ts +0 -1
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +2 -3
- package/types/cache.types.mjs +1 -1
- package/types/coingecko.types.d.ts +5 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +1 -8
- package/types/ethereum-network.types.mjs +1 -1
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +0 -1
- package/types/external-action.types.mjs +1 -1
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +1 -7
- package/types/hinkal.types.mjs +22 -23
- package/types/index.d.ts +1 -3
- package/types/onramp.types.cjs +1 -0
- package/types/onramp.types.d.ts +58 -0
- package/types/onramp.types.mjs +4 -0
- package/types/proxy.types.d.ts +1 -0
- package/types/sandbox.types.cjs +1 -1
- package/types/sandbox.types.d.ts +8 -39
- package/types/sandbox.types.mjs +2 -2
- package/types/session.types.d.ts +2 -0
- package/types/solana.types.d.ts +1 -0
- package/types/token-prices.types.cjs +1 -1
- package/types/token-prices.types.d.ts +7 -0
- package/types/token-prices.types.mjs +4 -2
- package/types/transactions.types.cjs +1 -1
- package/types/transactions.types.d.ts +2 -4
- package/types/transactions.types.mjs +3 -3
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +2 -2
- package/API/ai-calls.cjs +0 -1
- package/API/ai-calls.d.ts +0 -17
- package/API/ai-calls.mjs +0 -21
- package/API/duneAPI.cjs +0 -1
- package/API/duneAPI.d.ts +0 -11
- package/API/duneAPI.mjs +0 -25
- package/API/getBridgeProtocols.cjs +0 -1
- package/API/getBridgeProtocols.d.ts +0 -7
- package/API/getBridgeProtocols.mjs +0 -8
- package/API/getLifiStatus.cjs +0 -1
- package/API/getLifiStatus.d.ts +0 -24
- package/API/getLifiStatus.mjs +0 -15
- package/API/getRelayerURL.cjs +0 -1
- package/API/getRelayerURL.d.ts +0 -1
- package/API/getRelayerURL.mjs +0 -10
- package/API/passwordCalls.cjs +0 -1
- package/API/passwordCalls.d.ts +0 -9
- package/API/passwordCalls.mjs +0 -13
- package/API/restoreSnapshots.cjs +0 -1
- package/API/restoreSnapshots.d.ts +0 -1
- package/API/restoreSnapshots.mjs +0 -10
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +0 -7
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +0 -42
- package/data-structures/Hinkal/hinkalActionStake.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.cjs +0 -1
- package/data-structures/Hinkal/hinkalApprove.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.mjs +0 -115
- package/data-structures/Hinkal/hinkalInsideTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalInsideTransact.d.ts +0 -4
- package/data-structures/Hinkal/hinkalInsideTransact.mjs +0 -121
- package/error-handling/handleErrorRestore.cjs +0 -1
- package/error-handling/handleErrorRestore.d.ts +0 -2
- package/error-handling/handleErrorRestore.mjs +0 -11
- package/functions/staking/index.cjs +0 -1
- package/functions/staking/index.d.ts +0 -11
- package/functions/staking/index.mjs +0 -42
- package/functions/utils/replaceAddressInCalldata.cjs +0 -1
- package/functions/utils/replaceAddressInCalldata.d.ts +0 -1
- package/functions/utils/replaceAddressInCalldata.mjs +0 -7
- package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +0 -1
- package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +0 -5
- package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +0 -32
- package/types/bridging.types.d.ts +0 -29
- package/types/duneAPI.types.d.ts +0 -9
- package/types/hinkal.stake.types.cjs +0 -1
- package/types/hinkal.stake.types.d.ts +0 -11
- package/types/hinkal.stake.types.mjs +0 -4
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import { EventType as
|
|
2
|
-
import { ContractType as
|
|
3
|
-
import { hinkalCheckSolanaTokenRegistry as
|
|
4
|
-
import { checkHinkalAccessToken as
|
|
5
|
-
import { getShieldedBalance as
|
|
6
|
-
import { UserKeys as
|
|
7
|
-
import { hinkalDeposit as
|
|
1
|
+
import { EventType as E } from "../../types/hinkal.types.mjs";
|
|
2
|
+
import { ContractType as w } from "../../types/ethereum-network.types.mjs";
|
|
3
|
+
import { hinkalCheckSolanaTokenRegistry as H } from "./hinkalCheckSolanaTokenRegistry.mjs";
|
|
4
|
+
import { checkHinkalAccessToken as D } from "../../functions/web3/functionCalls/accessTokenCalls.mjs";
|
|
5
|
+
import { getShieldedBalance as F } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
6
|
+
import { UserKeys as S } from "../crypto-keys/keys.mjs";
|
|
7
|
+
import { hinkalDeposit as b, hinkalDepositForOther as W } from "./hinkalDeposit.mjs";
|
|
8
8
|
import { hinkalDepositAndWithdraw as U } from "./hinkalDepositAndWithdraw.mjs";
|
|
9
|
-
import { hinkalSolanaDeposit as
|
|
10
|
-
import { hinkalSwap as
|
|
11
|
-
import { hinkalWithdraw as
|
|
12
|
-
import { hinkalWithdrawStuckUtxos as
|
|
13
|
-
import { resetMerkleTrees as
|
|
14
|
-
import { MerkleTree as
|
|
9
|
+
import { hinkalSolanaDeposit as x, hinkalSolanaDepositForOther as K, hinkalSolanaMultiPaymentDeposit as L } from "./hinkalSolanaDeposit.mjs";
|
|
10
|
+
import { hinkalSwap as N } from "./hinkalSwap.mjs";
|
|
11
|
+
import { hinkalWithdraw as I } from "./hinkalWithdraw.mjs";
|
|
12
|
+
import { hinkalWithdrawStuckUtxos as O } from "./hinkalWithdrawStuckUtxos.mjs";
|
|
13
|
+
import { resetMerkleTrees as _ } from "./resetMerkleTrees.mjs";
|
|
14
|
+
import { MerkleTree as C } from "../merkle-tree/MerkleTree.mjs";
|
|
15
15
|
import "ethers";
|
|
16
|
-
import { transactionErrorCodes as
|
|
17
|
-
import { poseidonFunction as
|
|
18
|
-
import "
|
|
19
|
-
import "libsodium-wrappers";
|
|
20
|
-
import "process";
|
|
21
|
-
import "buffer";
|
|
22
|
-
import { networkRegistry as f, isSolanaLike as h } from "../../constants/chains.constants.mjs";
|
|
16
|
+
import { transactionErrorCodes as z } from "../../error-handling/error-codes.constants.mjs";
|
|
17
|
+
import { poseidonFunction as T } from "../../crypto/poseidon.mjs";
|
|
18
|
+
import { WALLET_SUPPORTED_CHAINS as u, networkRegistry as k, isSolanaLike as h } from "../../constants/chains.constants.mjs";
|
|
23
19
|
import "../../API/getServerURL.mjs";
|
|
24
20
|
import "axios";
|
|
25
21
|
import "../../constants/coingecko.constants.mjs";
|
|
26
22
|
import "../../constants/server.constants.mjs";
|
|
27
23
|
import "../http/HttpClient.mjs";
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
24
|
+
import { API as A } from "../../API/API.mjs";
|
|
25
|
+
import "../../API/tenderly.api.mjs";
|
|
30
26
|
import "../../constants/token-data/index.mjs";
|
|
31
27
|
import "../../constants/contracts.constants.mjs";
|
|
32
|
-
import { supportedPassportLinks as
|
|
28
|
+
import { supportedPassportLinks as j } from "../../constants/kyc.constants.mjs";
|
|
29
|
+
import { isExtension as $ } from "../../constants/vite.constants.mjs";
|
|
33
30
|
import "../../constants/reorg-depths.constants.mjs";
|
|
34
31
|
import "../../constants/addresses.constants.mjs";
|
|
35
32
|
import "../../constants/token.limits.constants.mjs";
|
|
@@ -37,73 +34,74 @@ import "../../constants/presale.constants.mjs";
|
|
|
37
34
|
import "../../constants/activity.constants.mjs";
|
|
38
35
|
import "../../constants/tasks.constants.mjs";
|
|
39
36
|
import "../../constants/events.constants.mjs";
|
|
40
|
-
import "../../API/tenderly.api.mjs";
|
|
41
37
|
import { reloadPage as q } from "../../functions/utils/reloadPage.mjs";
|
|
42
38
|
import { MultiThreadedUtxoUtils as J } from "../MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs";
|
|
43
39
|
import { hinkalPrivateWallet as Q } from "./hinkalPrivateWallet.mjs";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { hinkalSignSubAccount as ce } from "./hinkalSignSubAccount.mjs";
|
|
53
|
-
import { hinkalCheckTokenRegistry as he } from "./hinkalCheckTokenRegistry.mjs";
|
|
54
|
-
import { hinkalActionReceive as pe } from "./hinkalActionReceive.mjs";
|
|
55
|
-
import { hinkalActionFundApproveAndTransact as le } from "./hinkalActionFundApproveAndTransact.mjs";
|
|
56
|
-
import { privateTokensDB as de } from "../TokenDBs/PrivateTokensDB.mjs";
|
|
40
|
+
import { createCacheDevice as V } from "../../functions/utils/cacheDevice.utils.mjs";
|
|
41
|
+
import { getContractWithFetcherByChainId as X } from "../../functions/web3/getContractMetadata.mjs";
|
|
42
|
+
import { getRecipientInfo as Y } from "./hinkalGetRecipientInfo.mjs";
|
|
43
|
+
import { getApprovedBalance as Z, getApprovedUtxos as G, getApprovedUtxosForToken as ee } from "../../functions/web3/events/getApprovedBalance.mjs";
|
|
44
|
+
import { hinkalSignSubAccount as te } from "./hinkalSignSubAccount.mjs";
|
|
45
|
+
import { hinkalCheckTokenRegistry as re } from "./hinkalCheckTokenRegistry.mjs";
|
|
46
|
+
import { hinkalActionReceive as ie } from "./hinkalActionReceive.mjs";
|
|
47
|
+
import { privateTokensDB as ae } from "../TokenDBs/PrivateTokensDB.mjs";
|
|
57
48
|
import "idb-keyval";
|
|
58
|
-
import { getErc20TokensForChain as
|
|
49
|
+
import { getErc20TokensForChain as oe } from "../../functions/utils/erc20tokenFunctions.mjs";
|
|
59
50
|
import "multiformats";
|
|
60
|
-
import { PublicKey as
|
|
51
|
+
import { PublicKey as v } from "@solana/web3.js";
|
|
61
52
|
import "@solana/spl-token";
|
|
53
|
+
import { validateAndGetChainId as m } from "../../functions/utils/token-check.utils.mjs";
|
|
62
54
|
import "async-mutex";
|
|
63
55
|
import "../../functions/utils/convertIntegrationProviderToExternalActionId.mjs";
|
|
64
56
|
import "../../types/circom-data.types.mjs";
|
|
65
57
|
import "../../types/transactions.types.mjs";
|
|
66
58
|
import "../../types/activities.types.mjs";
|
|
67
|
-
import { getMerkleAccountPublicKey as
|
|
59
|
+
import { getMerkleAccountPublicKey as ne, getAccessTokenMerkleAccountPublicKey as se } from "../../functions/pre-transaction/solana.mjs";
|
|
68
60
|
import "@coral-xyz/anchor";
|
|
69
61
|
import "../../functions/utils/userAgent.mjs";
|
|
70
|
-
import "
|
|
62
|
+
import "libsodium-wrappers";
|
|
63
|
+
import "circomlibjs-hinkal-fork";
|
|
64
|
+
import "process";
|
|
65
|
+
import "buffer";
|
|
66
|
+
import "../../providers/EthersProviderAdapter.mjs";
|
|
71
67
|
import "node-forge";
|
|
72
68
|
import "../../functions/web3/getTokenHolder.mjs";
|
|
73
|
-
import { createTransaferEmporiumOpsBatch as
|
|
74
|
-
import { hinkalProoflessDeposit as
|
|
75
|
-
import { hinkalProxySwap as
|
|
76
|
-
import { hinkalMultiSendPrivateRecipients as
|
|
77
|
-
import { hinkalTransfer as
|
|
78
|
-
import { hinkalProxyToPrivate as
|
|
79
|
-
import { hinkalSolanaDepositAndWithdraw as
|
|
80
|
-
import { hinkalSolanaWithdraw as
|
|
81
|
-
import { hinkalSolanaTransfer as
|
|
82
|
-
import { hinkalSolanaSwap as
|
|
83
|
-
import { hinkalSolanaProxySend as
|
|
84
|
-
import { hinkalSolanaProxySwap as
|
|
85
|
-
import { hinkalSolanaProxyShield as
|
|
86
|
-
import { fetchSolanaMerkleTreeRootHash as
|
|
87
|
-
class
|
|
69
|
+
import { createTransaferEmporiumOpsBatch as pe } from "../../functions/private-wallet/emporium.helpers.mjs";
|
|
70
|
+
import { hinkalProoflessDeposit as he } from "./hinkalProoflessDeposit.mjs";
|
|
71
|
+
import { hinkalProxySwap as ce } from "./hinkalProxySwap.mjs";
|
|
72
|
+
import { hinkalMultiSendPrivateRecipients as le } from "./hinkalMultiSend.mjs";
|
|
73
|
+
import { hinkalTransfer as de } from "./hinkalTransfer.mjs";
|
|
74
|
+
import { hinkalProxyToPrivate as me } from "./hinkalProxyToPrivate.mjs";
|
|
75
|
+
import { hinkalSolanaDepositAndWithdraw as ge } from "./hinkalSolanaDepositAndWithdraw.mjs";
|
|
76
|
+
import { hinkalSolanaWithdraw as ye } from "./hinkalSolanaWithdraw.mjs";
|
|
77
|
+
import { hinkalSolanaTransfer as fe } from "./hinkalSolanaTransfer.mjs";
|
|
78
|
+
import { hinkalSolanaSwap as ve } from "./hinkalSolanaSwap.mjs";
|
|
79
|
+
import { hinkalSolanaProxySend as ue } from "./hinkalSolanaProxySend.mjs";
|
|
80
|
+
import { hinkalSolanaProxySwap as ke } from "./hinkalSolanaProxySwap.mjs";
|
|
81
|
+
import { hinkalSolanaProxyShield as B } from "./hinkalSolanaProxyShield.mjs";
|
|
82
|
+
import { fetchSolanaMerkleTreeRootHash as R } from "../../functions/web3/fetchSolanaMerkleTreeRootHash.mjs";
|
|
83
|
+
class Vt {
|
|
88
84
|
providerAdapter;
|
|
89
85
|
userKeys;
|
|
90
86
|
signingMessage = "Login to Hinkal Protocol";
|
|
91
87
|
privateTransferSigningMessage = "Login to Hinkal's Private Transfer App";
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
88
|
+
merkleTreeHinkalByChain = {};
|
|
89
|
+
merkleTreeAccessTokenByChain = {};
|
|
90
|
+
nullifiersByChain = {};
|
|
91
|
+
encryptedOutputsByChain = {};
|
|
92
|
+
approvalsByChain = {};
|
|
93
|
+
commitmentsSnapshotServiceByChain = {};
|
|
94
|
+
nullifierSnapshotServiceByChain = {};
|
|
95
|
+
accessTokenSnapshotServiceByChain = {};
|
|
96
|
+
approvalsSnapshotServiceByChain = {};
|
|
101
97
|
utxoUtils;
|
|
102
98
|
cacheDevice;
|
|
103
99
|
generateProofRemotely;
|
|
104
100
|
disableMerkleTreeUpdates;
|
|
105
101
|
constructor(e) {
|
|
106
|
-
this.userKeys = new
|
|
102
|
+
this.userKeys = new S(void 0), u.forEach((t) => {
|
|
103
|
+
this.merkleTreeHinkalByChain[t] = C.create(T, 0n), this.merkleTreeAccessTokenByChain[t] = C.create(T, 0n), this.nullifiersByChain[t] = /* @__PURE__ */ new Set(), this.encryptedOutputsByChain[t] = [], this.approvalsByChain[t] = /* @__PURE__ */ new Map();
|
|
104
|
+
}), this.generateProofRemotely = e?.generateProofRemotely ?? !1, this.utxoUtils = new J(), this.cacheDevice = V(e), this.disableMerkleTreeUpdates = e?.disableMerkleTreeUpdates ?? !1;
|
|
107
105
|
}
|
|
108
106
|
async initProviderAdapter(e, t) {
|
|
109
107
|
await this.updateProviderAdapter(t), this.providerAdapter?.initConnector(e);
|
|
@@ -112,30 +110,29 @@ class sr {
|
|
|
112
110
|
}
|
|
113
111
|
async initUserKeys(e = !1) {
|
|
114
112
|
const t = e ? this.privateTransferSigningMessage : this.signingMessage;
|
|
115
|
-
this.userKeys = new
|
|
113
|
+
this.userKeys = new S(await this.getProviderAdapter().signMessage(t));
|
|
116
114
|
}
|
|
117
115
|
async initUserKeysWithPassword(e) {
|
|
118
|
-
this.userKeys = new
|
|
116
|
+
this.userKeys = new S(e);
|
|
119
117
|
}
|
|
120
|
-
async resetMerkle() {
|
|
121
|
-
this.disableMerkleTreeUpdates
|
|
118
|
+
async resetMerkle(e) {
|
|
119
|
+
if (this.disableMerkleTreeUpdates)
|
|
120
|
+
return;
|
|
121
|
+
(e?.every((r) => this.isSelectedNetworkSupported(r)) ?? !0) && await _(this, e);
|
|
122
122
|
}
|
|
123
123
|
getProviderAdapter() {
|
|
124
124
|
if (!this.providerAdapter)
|
|
125
125
|
throw new Error("ProviderAdapter is not initialized");
|
|
126
126
|
return this.providerAdapter;
|
|
127
127
|
}
|
|
128
|
-
async waitForTransaction(e, t = 1) {
|
|
129
|
-
return !!await this.providerAdapter?.waitForTransaction(e, t);
|
|
130
|
-
}
|
|
131
|
-
getContractMetadata(e, t) {
|
|
132
|
-
return this.getProviderAdapter().getContractMetadata(e, t);
|
|
128
|
+
async waitForTransaction(e, t, r = 1) {
|
|
129
|
+
return !!await this.providerAdapter?.waitForTransaction(e, t, r);
|
|
133
130
|
}
|
|
134
|
-
getContract(e, t = void 0
|
|
131
|
+
getContract(e, t, r = void 0) {
|
|
135
132
|
return this.getProviderAdapter().getContract(e, t, r);
|
|
136
133
|
}
|
|
137
134
|
getContractWithFetcherByChainId(e, t, r = void 0) {
|
|
138
|
-
return
|
|
135
|
+
return X(e, t, r);
|
|
139
136
|
}
|
|
140
137
|
async signMessage(e) {
|
|
141
138
|
return await this.getProviderAdapter().signMessage(e);
|
|
@@ -143,40 +140,25 @@ class sr {
|
|
|
143
140
|
async signTypedData(e, t, r) {
|
|
144
141
|
return await this.getProviderAdapter().signTypedData(e, t, r);
|
|
145
142
|
}
|
|
146
|
-
async signWithSubAccount(e, t, r) {
|
|
147
|
-
return
|
|
143
|
+
async signWithSubAccount(e, t, r, i) {
|
|
144
|
+
return te(e, t, r, i);
|
|
148
145
|
}
|
|
149
|
-
getContractWithSigner(e, t = "") {
|
|
150
|
-
return this.getProviderAdapter().getContractWithSigner(e, t);
|
|
146
|
+
getContractWithSigner(e, t, r = "") {
|
|
147
|
+
return this.getProviderAdapter().getContractWithSigner(e, t, r);
|
|
151
148
|
}
|
|
152
|
-
getContractWithFetcher(e, t = "") {
|
|
153
|
-
return this.getProviderAdapter().getContractWithFetcher(e, t);
|
|
149
|
+
getContractWithFetcher(e, t, r = "") {
|
|
150
|
+
return this.getProviderAdapter().getContractWithFetcher(e, t, r);
|
|
154
151
|
}
|
|
155
|
-
|
|
156
|
-
return
|
|
157
|
-
}
|
|
158
|
-
isSelectedNetworkSupported() {
|
|
159
|
-
return !!f[this.getCurrentChainId()];
|
|
152
|
+
isSelectedNetworkSupported(e) {
|
|
153
|
+
return !!k[e];
|
|
160
154
|
}
|
|
161
155
|
async switchNetwork(e) {
|
|
162
156
|
try {
|
|
163
157
|
await this.getProviderAdapter().switchNetwork(e);
|
|
164
158
|
} catch {
|
|
165
|
-
throw new Error(
|
|
159
|
+
throw new Error(z.FAILED_TO_SWITCH_NETWORKS);
|
|
166
160
|
}
|
|
167
161
|
}
|
|
168
|
-
async switchAccount(e) {
|
|
169
|
-
await this.getProviderAdapter().switchAccount(e);
|
|
170
|
-
}
|
|
171
|
-
getCurrentChainId() {
|
|
172
|
-
const { chainId: e } = this.getProviderAdapter();
|
|
173
|
-
if (!e)
|
|
174
|
-
throw new Error("Illegal State: no chainId");
|
|
175
|
-
return e;
|
|
176
|
-
}
|
|
177
|
-
getSelectedNetwork() {
|
|
178
|
-
return this.providerAdapter?.getSelectedNetwork();
|
|
179
|
-
}
|
|
180
162
|
isPermitterAvailable() {
|
|
181
163
|
return this.getProviderAdapter().isPermitterAvailable();
|
|
182
164
|
}
|
|
@@ -205,23 +187,17 @@ class sr {
|
|
|
205
187
|
}
|
|
206
188
|
async onAccountChanged() {
|
|
207
189
|
await this.getProviderAdapter().onAccountChanged();
|
|
208
|
-
const e =
|
|
190
|
+
const e = E.AccountChanged;
|
|
209
191
|
typeof document < "u" ? document?.dispatchEvent(new Event(e)) : process?.emit("message", e, void 0);
|
|
210
192
|
}
|
|
211
193
|
async onChainChanged(e) {
|
|
212
|
-
|
|
213
|
-
await this.getProviderAdapter().onChainChanged(e);
|
|
214
|
-
const t = C.NetworkChange;
|
|
215
|
-
typeof document < "u" ? document.dispatchEvent(new Event(t)) : process?.emit("message", t, void 0);
|
|
216
|
-
} else
|
|
217
|
-
await this.disconnectFromConnector(), q();
|
|
194
|
+
e ? await this.getProviderAdapter().onChainChanged(e) : (await this.disconnectFromConnector(), q());
|
|
218
195
|
}
|
|
219
196
|
async monitorConnectedAddress() {
|
|
220
|
-
|
|
221
|
-
h(e) || await w.monitor(await this.getEthereumAddress(), e);
|
|
197
|
+
await A.monitor(await this.getEthereumAddress());
|
|
222
198
|
}
|
|
223
|
-
async getBalances(e, t, r, i, a = !1,
|
|
224
|
-
return
|
|
199
|
+
async getBalances(e, t, r, i, a = !1, o, n = !1) {
|
|
200
|
+
return F(
|
|
225
201
|
this,
|
|
226
202
|
e,
|
|
227
203
|
t,
|
|
@@ -229,152 +205,137 @@ class sr {
|
|
|
229
205
|
i,
|
|
230
206
|
a,
|
|
231
207
|
this.generateProofRemotely,
|
|
232
|
-
|
|
233
|
-
|
|
208
|
+
o,
|
|
209
|
+
n
|
|
234
210
|
);
|
|
235
211
|
}
|
|
236
|
-
async getApprovedBalances(e = !1,
|
|
237
|
-
return
|
|
212
|
+
async getApprovedBalances(e, t = !1, r = !1) {
|
|
213
|
+
return Z(this, e, t, r);
|
|
238
214
|
}
|
|
239
|
-
async getTotalBalance(e, t, r, i = !1, a,
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
215
|
+
async getTotalBalance(e, t, r, i = !1, a, o = !1) {
|
|
216
|
+
const n = r ?? await this.getEthereumAddress(), s = t ?? this.userKeys, p = await this.getBalances(
|
|
217
|
+
e,
|
|
218
|
+
s.getShieldedPrivateKey(),
|
|
219
|
+
s.getShieldedPublicKey(),
|
|
220
|
+
n,
|
|
245
221
|
i,
|
|
246
222
|
a,
|
|
247
|
-
|
|
248
|
-
),
|
|
249
|
-
return
|
|
250
|
-
const
|
|
251
|
-
token:
|
|
252
|
-
balance: (
|
|
253
|
-
timestamp:
|
|
254
|
-
nfts:
|
|
223
|
+
o
|
|
224
|
+
), c = !h(e) && !o ? await this.getApprovedBalances(e, i, a) : /* @__PURE__ */ new Map(), g = $ ? await ae.getPrivateTokens(e, n) : oe(e), d = [];
|
|
225
|
+
return g.forEach((l) => {
|
|
226
|
+
const y = l.erc20TokenAddress.toLowerCase(), f = p.get(y), P = c.get(y), M = {
|
|
227
|
+
token: l,
|
|
228
|
+
balance: (f?.balance ?? 0n) + (P?.balance ?? 0n),
|
|
229
|
+
timestamp: f?.timestamp || P?.timestamp || "0",
|
|
230
|
+
nfts: f?.nfts || []
|
|
255
231
|
};
|
|
256
|
-
|
|
257
|
-
}),
|
|
232
|
+
d.push(M);
|
|
233
|
+
}), d;
|
|
258
234
|
}
|
|
259
235
|
async getStuckShieldedBalances(e, t) {
|
|
260
236
|
return (await this.getTotalBalance(e, void 0, t, !1, !1, !0)).filter((i) => i.balance > 0n);
|
|
261
237
|
}
|
|
262
238
|
getSupportedPassportLinks() {
|
|
263
|
-
return
|
|
264
|
-
}
|
|
265
|
-
checkAccessToken() {
|
|
266
|
-
return H(this);
|
|
239
|
+
return j;
|
|
267
240
|
}
|
|
268
|
-
|
|
269
|
-
return D(this, e
|
|
241
|
+
checkAccessToken(e) {
|
|
242
|
+
return D(this, e);
|
|
270
243
|
}
|
|
271
|
-
async getHinkalTreeRootHash() {
|
|
272
|
-
const e = this.getCurrentChainId();
|
|
244
|
+
async getHinkalTreeRootHash(e) {
|
|
273
245
|
if (h(e)) {
|
|
274
|
-
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } =
|
|
246
|
+
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } = k[e].contractData;
|
|
275
247
|
if (!r || !i || !a)
|
|
276
248
|
throw new Error(`Missing Solana configuration for chain ${e}`);
|
|
277
|
-
const
|
|
278
|
-
return
|
|
249
|
+
const o = new v(a), n = new v(i), s = ne(n, o), p = this.getSolanaProgram(r);
|
|
250
|
+
return R(p, s);
|
|
279
251
|
}
|
|
280
|
-
return this.
|
|
252
|
+
return this.getContractWithFetcherByChainId(e, w.HinkalContract).getRootHash();
|
|
281
253
|
}
|
|
282
|
-
async getAccessTokenTreeRootHash() {
|
|
283
|
-
const e = this.getCurrentChainId();
|
|
254
|
+
async getAccessTokenTreeRootHash(e) {
|
|
284
255
|
if (h(e)) {
|
|
285
|
-
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } =
|
|
256
|
+
const { hinkalIdl: r, hinkalAddress: i, originalDeployer: a } = k[e].contractData;
|
|
286
257
|
if (!r || !i || !a)
|
|
287
258
|
throw new Error(`Missing Solana configuration for chain ${e}`);
|
|
288
|
-
const
|
|
289
|
-
return
|
|
259
|
+
const o = new v(a), n = new v(i), s = se(n, o), p = this.getSolanaProgram(r);
|
|
260
|
+
return R(p, s);
|
|
290
261
|
}
|
|
291
|
-
return this.
|
|
262
|
+
return this.getContractWithFetcherByChainId(e, w.AccessTokenContract).getRootHash();
|
|
292
263
|
}
|
|
293
264
|
async resetMerkleTreesIfNecessary() {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
265
|
+
const t = (await Promise.all(
|
|
266
|
+
u.map(async (r) => {
|
|
267
|
+
const [i, a] = await Promise.all([
|
|
268
|
+
this.getHinkalTreeRootHash(r),
|
|
269
|
+
this.getAccessTokenTreeRootHash(r)
|
|
270
|
+
]), o = i.toBigInt() !== this.merkleTreeHinkalByChain[r].getRootHash() || a.toBigInt() !== this.merkleTreeAccessTokenByChain[r].getRootHash();
|
|
271
|
+
return { chainId: r, needsReset: o };
|
|
272
|
+
})
|
|
273
|
+
)).filter((r) => r.needsReset).map((r) => r.chainId);
|
|
274
|
+
t.length > 0 && (console.log("resetting merkle tree in resetMerkleTreesIfNecessary for chains:", t), await this.resetMerkle(t));
|
|
301
275
|
}
|
|
302
276
|
async getEventsFromHinkal() {
|
|
303
|
-
|
|
304
|
-
this.
|
|
305
|
-
this.
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
277
|
+
const e = u.flatMap((t) => [
|
|
278
|
+
this.accessTokenSnapshotServiceByChain[t]?.retrieveEventsFromLatestBlock(),
|
|
279
|
+
this.commitmentsSnapshotServiceByChain[t]?.retrieveEventsFromLatestBlock(),
|
|
280
|
+
this.nullifierSnapshotServiceByChain[t]?.retrieveEventsFromLatestBlock(),
|
|
281
|
+
this.approvalsSnapshotServiceByChain[t]?.retrieveEventsFromLatestBlock()
|
|
308
282
|
]);
|
|
283
|
+
await Promise.all(e);
|
|
309
284
|
}
|
|
310
285
|
getEthereumAddress() {
|
|
311
286
|
return this.getProviderAdapter().getAddress();
|
|
312
287
|
}
|
|
313
|
-
async getRandomRelay(e = !1) {
|
|
314
|
-
|
|
315
|
-
return (await w.getIdleRelay(t, e)).relay;
|
|
288
|
+
async getRandomRelay(e, t = !1) {
|
|
289
|
+
return (await A.getIdleRelay(e, t)).relay;
|
|
316
290
|
}
|
|
317
|
-
getGasPrice() {
|
|
318
|
-
if (!this.providerAdapter
|
|
319
|
-
throw new Error("Illegal State of providerAdapter in Hinkal: no
|
|
320
|
-
return this.providerAdapter.getGasPrice();
|
|
291
|
+
getGasPrice(e) {
|
|
292
|
+
if (!this.providerAdapter)
|
|
293
|
+
throw new Error("Illegal State of providerAdapter in Hinkal: no providerAdapter initialized");
|
|
294
|
+
return this.providerAdapter.getGasPrice(e);
|
|
321
295
|
}
|
|
322
296
|
getAPI() {
|
|
323
|
-
return
|
|
324
|
-
}
|
|
325
|
-
resetCache() {
|
|
326
|
-
V(this, this.getCurrentChainId(), this.userKeys.getShieldedPublicKey());
|
|
297
|
+
return A;
|
|
327
298
|
}
|
|
328
299
|
snapshotsClearInterval() {
|
|
329
|
-
|
|
300
|
+
u.forEach((e) => {
|
|
301
|
+
this.commitmentsSnapshotServiceByChain[e]?.intervalClear(), this.accessTokenSnapshotServiceByChain[e]?.intervalClear(), this.nullifierSnapshotServiceByChain[e]?.intervalClear(), this.approvalsSnapshotServiceByChain[e]?.intervalClear();
|
|
302
|
+
});
|
|
330
303
|
}
|
|
331
|
-
checkTokenRegistry(e, t) {
|
|
332
|
-
|
|
333
|
-
if (h(r)) {
|
|
304
|
+
checkTokenRegistry(e, t, r) {
|
|
305
|
+
if (h(e)) {
|
|
334
306
|
const {
|
|
335
307
|
hinkalIdl: a,
|
|
336
|
-
hinkalAddress:
|
|
337
|
-
originalDeployer:
|
|
338
|
-
} =
|
|
339
|
-
if (!a || !
|
|
308
|
+
hinkalAddress: o,
|
|
309
|
+
originalDeployer: n
|
|
310
|
+
} = k[e].contractData;
|
|
311
|
+
if (!a || !o || !n)
|
|
340
312
|
throw new Error("missing solana data");
|
|
341
|
-
const s = this.getSolanaProgram(a),
|
|
342
|
-
return
|
|
313
|
+
const s = this.getSolanaProgram(a), p = new v(n);
|
|
314
|
+
return H(s, p, t, r);
|
|
343
315
|
}
|
|
344
|
-
const i = this.getContractWithFetcher(
|
|
345
|
-
return
|
|
316
|
+
const i = this.getContractWithFetcher(e, w.HinkalHelperContract);
|
|
317
|
+
return re(i, t, r);
|
|
346
318
|
}
|
|
347
319
|
getRecipientInfo() {
|
|
348
|
-
return
|
|
349
|
-
}
|
|
350
|
-
async getInteractionApprovals(e) {
|
|
351
|
-
return await oe(this, e);
|
|
352
|
-
}
|
|
353
|
-
getApprovedUtxos(e = !1) {
|
|
354
|
-
return re(this, e);
|
|
355
|
-
}
|
|
356
|
-
getApprovedUtxosForToken(e, t = !1) {
|
|
357
|
-
return ie(this, e, t);
|
|
320
|
+
return Y(this);
|
|
358
321
|
}
|
|
359
|
-
|
|
360
|
-
return
|
|
322
|
+
getApprovedUtxos(e, t = !1) {
|
|
323
|
+
return G(this, e, t);
|
|
361
324
|
}
|
|
362
|
-
|
|
363
|
-
return
|
|
364
|
-
}
|
|
365
|
-
async getBufferEntry(e, t, r) {
|
|
366
|
-
return se(this, e, t, r);
|
|
325
|
+
getApprovedUtxosForToken(e, t, r = !1) {
|
|
326
|
+
return ee(this, e, t, r);
|
|
367
327
|
}
|
|
368
328
|
async deposit(e, t) {
|
|
369
|
-
return
|
|
329
|
+
return b(this, e, t);
|
|
370
330
|
}
|
|
371
331
|
async depositForOther(e, t, r) {
|
|
372
|
-
return
|
|
332
|
+
return W(this, e, t, r);
|
|
373
333
|
}
|
|
374
334
|
async depositAndWithdraw(e, t, r, i, a) {
|
|
375
|
-
|
|
335
|
+
const o = m([e]);
|
|
336
|
+
return h(o) ? ge(
|
|
376
337
|
this,
|
|
377
|
-
e
|
|
338
|
+
e,
|
|
378
339
|
t,
|
|
379
340
|
r,
|
|
380
341
|
i,
|
|
@@ -389,7 +350,7 @@ class sr {
|
|
|
389
350
|
);
|
|
390
351
|
}
|
|
391
352
|
async prooflessDeposit(e, t, r) {
|
|
392
|
-
return
|
|
353
|
+
return he(this, e, t, r);
|
|
393
354
|
}
|
|
394
355
|
getSolanaProgram(e) {
|
|
395
356
|
if (!this.providerAdapter)
|
|
@@ -406,117 +367,105 @@ class sr {
|
|
|
406
367
|
return this.providerAdapter.getSolanaPublicKey();
|
|
407
368
|
}
|
|
408
369
|
async depositSolana(e, t) {
|
|
409
|
-
return
|
|
370
|
+
return x(this, e, t);
|
|
410
371
|
}
|
|
411
372
|
async depositSolanaForOther(e, t, r) {
|
|
412
373
|
return K(this, e, t, r);
|
|
413
374
|
}
|
|
414
375
|
async solanaMultiPaymentDeposit(e, t) {
|
|
415
|
-
return
|
|
376
|
+
return L(this, e, t);
|
|
416
377
|
}
|
|
417
|
-
async transfer(e, t, r, i, a,
|
|
418
|
-
|
|
378
|
+
async transfer(e, t, r, i, a, o, n = !1) {
|
|
379
|
+
const s = m(e);
|
|
380
|
+
return h(s) ? fe(
|
|
419
381
|
this,
|
|
420
382
|
e,
|
|
421
383
|
t,
|
|
422
384
|
r,
|
|
423
385
|
i,
|
|
424
386
|
a,
|
|
425
|
-
|
|
426
|
-
) :
|
|
387
|
+
n
|
|
388
|
+
) : de(
|
|
427
389
|
this,
|
|
428
390
|
e,
|
|
429
391
|
t,
|
|
430
392
|
r,
|
|
431
393
|
i,
|
|
432
394
|
a,
|
|
433
|
-
|
|
434
|
-
|
|
395
|
+
o,
|
|
396
|
+
n
|
|
435
397
|
);
|
|
436
398
|
}
|
|
437
|
-
async withdraw(e, t, r, i, a,
|
|
438
|
-
|
|
399
|
+
async withdraw(e, t, r, i, a, o, n, s = !1) {
|
|
400
|
+
const p = m(e);
|
|
401
|
+
return h(p) ? ye(
|
|
439
402
|
this,
|
|
440
|
-
e
|
|
403
|
+
e,
|
|
441
404
|
t,
|
|
442
405
|
r,
|
|
443
406
|
a,
|
|
444
|
-
|
|
407
|
+
o,
|
|
445
408
|
s
|
|
446
|
-
) :
|
|
409
|
+
) : I(
|
|
447
410
|
this,
|
|
448
411
|
e,
|
|
449
412
|
t,
|
|
450
413
|
r,
|
|
451
414
|
i,
|
|
452
415
|
a,
|
|
453
|
-
n,
|
|
454
416
|
o,
|
|
417
|
+
n,
|
|
455
418
|
s
|
|
456
419
|
);
|
|
457
420
|
}
|
|
458
421
|
async withdrawStuckUtxos(e, t) {
|
|
459
|
-
return
|
|
422
|
+
return O(this, e, t);
|
|
460
423
|
}
|
|
461
|
-
async swap(e, t, r, i, a,
|
|
462
|
-
|
|
424
|
+
async swap(e, t, r, i, a, o, n, s = !1, p = !1) {
|
|
425
|
+
const c = m(e);
|
|
426
|
+
return h(c) ? this.swapSolana(e, t, i, a, o, s) : N(
|
|
463
427
|
this,
|
|
464
428
|
e,
|
|
465
429
|
t,
|
|
466
430
|
r,
|
|
467
431
|
i,
|
|
468
432
|
a,
|
|
469
|
-
n,
|
|
470
433
|
o,
|
|
434
|
+
n,
|
|
471
435
|
s,
|
|
472
|
-
|
|
436
|
+
p
|
|
473
437
|
);
|
|
474
438
|
}
|
|
475
|
-
async swapSolana(e, t, r, i, a,
|
|
476
|
-
const
|
|
477
|
-
return
|
|
439
|
+
async swapSolana(e, t, r, i, a, o = !1) {
|
|
440
|
+
const n = JSON.parse(r), s = BigInt(n.swapperAccountSalt), { instructionLists: p, addressLookupTableAccount: c } = n.data;
|
|
441
|
+
return ve(
|
|
478
442
|
this,
|
|
479
443
|
e,
|
|
480
444
|
t,
|
|
481
445
|
s,
|
|
446
|
+
p,
|
|
482
447
|
c,
|
|
483
448
|
i,
|
|
484
449
|
a,
|
|
485
|
-
|
|
450
|
+
o
|
|
486
451
|
);
|
|
487
452
|
}
|
|
488
|
-
async actionReceive(e, t, r, i, a,
|
|
453
|
+
async actionReceive(e, t, r, i, a, o, n = !1) {
|
|
489
454
|
if (!a)
|
|
490
455
|
throw new Error("subAccount is required");
|
|
491
|
-
|
|
456
|
+
const s = m(e);
|
|
457
|
+
return h(s) ? B(this, e[0], t[0], a, void 0, n) : ie(
|
|
492
458
|
this,
|
|
493
459
|
e,
|
|
494
460
|
t,
|
|
495
461
|
r,
|
|
496
462
|
i,
|
|
497
463
|
a,
|
|
498
|
-
n,
|
|
499
|
-
o
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
async actionFundApproveAndTransact(e, t, r, i, a, n, o, s, c = !1, l, d, p) {
|
|
503
|
-
return le(
|
|
504
|
-
this,
|
|
505
|
-
e,
|
|
506
|
-
t,
|
|
507
|
-
r,
|
|
508
|
-
i,
|
|
509
|
-
a,
|
|
510
|
-
n,
|
|
511
464
|
o,
|
|
512
|
-
|
|
513
|
-
c,
|
|
514
|
-
l,
|
|
515
|
-
d,
|
|
516
|
-
p
|
|
465
|
+
n
|
|
517
466
|
);
|
|
518
467
|
}
|
|
519
|
-
async actionPrivateWallet(e, t, r, i, a,
|
|
468
|
+
async actionPrivateWallet(e, t, r, i, a, o, n, s, p, c, g = !1, d, l, y, f = !1) {
|
|
520
469
|
return Q(
|
|
521
470
|
this,
|
|
522
471
|
e,
|
|
@@ -524,112 +473,100 @@ class sr {
|
|
|
524
473
|
r,
|
|
525
474
|
i,
|
|
526
475
|
a,
|
|
527
|
-
n,
|
|
528
476
|
o,
|
|
477
|
+
n,
|
|
529
478
|
s,
|
|
479
|
+
p,
|
|
530
480
|
c,
|
|
531
|
-
|
|
481
|
+
g,
|
|
532
482
|
d,
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
483
|
+
l,
|
|
484
|
+
y,
|
|
485
|
+
f
|
|
536
486
|
);
|
|
537
487
|
}
|
|
538
|
-
async
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
async hinkalInsideTransact(e, t, r, i, a, n, o, s, c, l = !1) {
|
|
542
|
-
return ee(
|
|
488
|
+
async proxySwap(e, t, r, i, a, o, n, s, p = !1, c, g, d = !1) {
|
|
489
|
+
const l = m(e);
|
|
490
|
+
return h(l) ? ke(
|
|
543
491
|
this,
|
|
544
492
|
e,
|
|
545
493
|
t,
|
|
546
|
-
r,
|
|
547
494
|
i,
|
|
548
|
-
a,
|
|
549
|
-
n,
|
|
550
495
|
o,
|
|
551
|
-
s,
|
|
552
|
-
c,
|
|
553
|
-
l
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
|
-
async proxySwap(e, t, r, i, a, n, o, s, c = !1, l, d, p = !1) {
|
|
557
|
-
return h(this.getCurrentChainId()) ? Ee(
|
|
558
|
-
this,
|
|
559
|
-
e,
|
|
560
|
-
t,
|
|
561
|
-
i,
|
|
562
496
|
n,
|
|
563
|
-
o,
|
|
564
497
|
s,
|
|
565
|
-
|
|
566
|
-
) :
|
|
498
|
+
d
|
|
499
|
+
) : ce(
|
|
567
500
|
this,
|
|
568
501
|
e,
|
|
569
502
|
t,
|
|
570
503
|
r,
|
|
571
504
|
i,
|
|
572
505
|
a,
|
|
573
|
-
n,
|
|
574
506
|
o,
|
|
507
|
+
n,
|
|
575
508
|
s,
|
|
509
|
+
p,
|
|
576
510
|
c,
|
|
577
|
-
|
|
578
|
-
d
|
|
579
|
-
p
|
|
511
|
+
g,
|
|
512
|
+
d
|
|
580
513
|
);
|
|
581
514
|
}
|
|
582
|
-
async proxyToPrivate(e, t, r, i, a,
|
|
583
|
-
|
|
515
|
+
async proxyToPrivate(e, t, r, i, a, o, n, s = !1) {
|
|
516
|
+
const p = m(e);
|
|
517
|
+
return h(p) ? B(
|
|
584
518
|
this,
|
|
585
519
|
e[0],
|
|
586
520
|
t[0],
|
|
587
521
|
r,
|
|
588
522
|
i,
|
|
589
523
|
s
|
|
590
|
-
) :
|
|
524
|
+
) : me(
|
|
591
525
|
this,
|
|
592
526
|
e,
|
|
593
527
|
t,
|
|
594
528
|
i,
|
|
595
529
|
a,
|
|
596
|
-
n,
|
|
597
|
-
r,
|
|
598
530
|
o,
|
|
531
|
+
r,
|
|
532
|
+
n,
|
|
599
533
|
s
|
|
600
534
|
);
|
|
601
535
|
}
|
|
602
|
-
async proxySend(e, t, r, i, a,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
536
|
+
async proxySend(e, t, r, i, a, o, n, s = !1) {
|
|
537
|
+
const p = m(e);
|
|
538
|
+
if (h(p))
|
|
539
|
+
return ue(e[0], t[0], r, i, s);
|
|
540
|
+
const c = pe(
|
|
606
541
|
this,
|
|
607
|
-
|
|
542
|
+
p,
|
|
543
|
+
e.map((l) => l.erc20TokenAddress),
|
|
608
544
|
t,
|
|
609
545
|
i
|
|
610
|
-
),
|
|
611
|
-
token:
|
|
612
|
-
amount: -1n * t[
|
|
546
|
+
), g = e.map((l, y) => ({
|
|
547
|
+
token: l,
|
|
548
|
+
amount: -1n * t[y]
|
|
613
549
|
}));
|
|
614
550
|
return await this.actionPrivateWallet(
|
|
551
|
+
p,
|
|
615
552
|
[],
|
|
616
553
|
[],
|
|
617
554
|
[],
|
|
618
555
|
c,
|
|
619
|
-
|
|
556
|
+
g,
|
|
620
557
|
r,
|
|
621
558
|
a,
|
|
622
|
-
|
|
559
|
+
o,
|
|
623
560
|
void 0,
|
|
624
561
|
void 0,
|
|
625
562
|
void 0,
|
|
626
|
-
|
|
563
|
+
n,
|
|
627
564
|
void 0,
|
|
628
565
|
s
|
|
629
566
|
);
|
|
630
567
|
}
|
|
631
568
|
async multiSendPrivateRecipients(e, t, r) {
|
|
632
|
-
return
|
|
569
|
+
return le(this, e, t, r);
|
|
633
570
|
}
|
|
634
571
|
areMerkleTreeUpdatesDisabled() {
|
|
635
572
|
return this.disableMerkleTreeUpdates;
|
|
@@ -639,5 +576,5 @@ class sr {
|
|
|
639
576
|
}
|
|
640
577
|
}
|
|
641
578
|
export {
|
|
642
|
-
|
|
579
|
+
Vt as Hinkal
|
|
643
580
|
};
|