@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,11 +1,10 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import { type ApprovedUtxo, ApprovedUtxoWithInteractionAddress, FeeStructure, HinkalConfig
|
|
3
|
-
import {
|
|
2
|
+
import { type ApprovedUtxo, ApprovedUtxoWithInteractionAddress, FeeStructure, HinkalConfig } from '../../types/hinkal.types';
|
|
3
|
+
import { ContractType, EthereumNetwork } from '../../types/ethereum-network.types';
|
|
4
4
|
import type { EncryptedOutputWithSign } from '../../types/commitments.types';
|
|
5
5
|
import { ExternalActionId } from '../../types/external-action.types';
|
|
6
6
|
import { type IMultiThreadedUtxoUtils } from '../../types/IMultiThreadedUtxoUtils';
|
|
7
7
|
import { type RelayerTransaction } from '../../types/relayer.types';
|
|
8
|
-
import { type SignatureData } from '../../types/crypto.types';
|
|
9
8
|
import type { ERC20Token, PrivateRecipientInfo, TokenBalance, TokenChanges } from '../../types/token.types';
|
|
10
9
|
import { UserKeys } from '../crypto-keys/keys';
|
|
11
10
|
import { type IProviderAdapter } from '../provider-adapter/IProviderAdapter';
|
|
@@ -24,15 +23,15 @@ export declare class Hinkal<ConnectorType> implements IHinkal {
|
|
|
24
23
|
userKeys: UserKeys;
|
|
25
24
|
readonly signingMessage: string;
|
|
26
25
|
readonly privateTransferSigningMessage: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
merkleTreeHinkalByChain: Record<number, MerkleTree<bigint>>;
|
|
27
|
+
merkleTreeAccessTokenByChain: Record<number, MerkleTree<bigint>>;
|
|
28
|
+
nullifiersByChain: Record<number, Set<string>>;
|
|
29
|
+
encryptedOutputsByChain: Record<number, EncryptedOutputWithSign[]>;
|
|
30
|
+
approvalsByChain: Record<number, Map<string, ApprovedUtxo[]>>;
|
|
31
|
+
commitmentsSnapshotServiceByChain: Record<number, ClientCommitmentsSnapshotService | ClientSolanaCommitmentsSnapshotService | undefined>;
|
|
32
|
+
nullifierSnapshotServiceByChain: Record<number, ClientNullifierSnapshotService | ClientSolanaNullifierSnapshotService | undefined>;
|
|
33
|
+
accessTokenSnapshotServiceByChain: Record<number, ClientAccessTokenSnapshotService | ClientSolanaAccessTokenSnapshotService | undefined>;
|
|
34
|
+
approvalsSnapshotServiceByChain: Record<number, ClientApprovalsSnapshotService | undefined>;
|
|
36
35
|
utxoUtils: IMultiThreadedUtxoUtils;
|
|
37
36
|
cacheDevice: ICacheDevice;
|
|
38
37
|
generateProofRemotely: boolean;
|
|
@@ -41,23 +40,18 @@ export declare class Hinkal<ConnectorType> implements IHinkal {
|
|
|
41
40
|
initProviderAdapter(connector: ConnectorType, providerAdapter: IProviderAdapter<ConnectorType>): Promise<void>;
|
|
42
41
|
initUserKeys(isPrivateTransfer?: boolean): Promise<void>;
|
|
43
42
|
initUserKeysWithPassword(password: string): Promise<void>;
|
|
44
|
-
resetMerkle(): Promise<void>;
|
|
43
|
+
resetMerkle(chainIds?: number[]): Promise<void>;
|
|
45
44
|
getProviderAdapter(): IProviderAdapter<ConnectorType>;
|
|
46
|
-
waitForTransaction(transactionHash: string, confirmations?: number): Promise<boolean>;
|
|
47
|
-
|
|
48
|
-
getContract(contractType: ContractType, contractAddress?: undefined, chainId?: number): ethers.Contract;
|
|
45
|
+
waitForTransaction(chainId: number, transactionHash: string, confirmations?: number): Promise<boolean>;
|
|
46
|
+
getContract(chainId: number, contractType: ContractType, contractAddress?: undefined): ethers.Contract;
|
|
49
47
|
getContractWithFetcherByChainId(chainId: number, contractType: ContractType, contractAddress?: undefined): ethers.Contract;
|
|
50
48
|
signMessage(message: string): Promise<string>;
|
|
51
49
|
signTypedData(domain: ethers.TypedDataDomain, types: Record<string, ethers.TypedDataField[]>, value: Record<string, unknown>): Promise<string>;
|
|
52
|
-
signWithSubAccount(messageToSign: string | undefined, typedData: TypedData | undefined, subAccount: SubAccount): Promise<string>;
|
|
53
|
-
getContractWithSigner(
|
|
54
|
-
getContractWithFetcher(
|
|
55
|
-
|
|
56
|
-
isSelectedNetworkSupported(): boolean;
|
|
50
|
+
signWithSubAccount(chainId: number, messageToSign: string | undefined, typedData: TypedData | undefined, subAccount: SubAccount): Promise<string>;
|
|
51
|
+
getContractWithSigner(chainId: number, contractType: ContractType, contractAddress?: string): ethers.Contract;
|
|
52
|
+
getContractWithFetcher(chainId: number, contractType: ContractType, contractAddress?: string): ethers.Contract;
|
|
53
|
+
isSelectedNetworkSupported(chainId: number): boolean;
|
|
57
54
|
switchNetwork(network: EthereumNetwork): Promise<void>;
|
|
58
|
-
switchAccount(signer: ethers.Signer): Promise<void>;
|
|
59
|
-
getCurrentChainId(): number;
|
|
60
|
-
getSelectedNetwork(): EthereumNetwork | undefined;
|
|
61
55
|
isPermitterAvailable(): boolean;
|
|
62
56
|
connectAndPatchProvider(connector: ConnectorType): Promise<number>;
|
|
63
57
|
disconnectFromConnector(): Promise<void>;
|
|
@@ -67,49 +61,40 @@ export declare class Hinkal<ConnectorType> implements IHinkal {
|
|
|
67
61
|
private onChainChanged;
|
|
68
62
|
monitorConnectedAddress(): Promise<void>;
|
|
69
63
|
getBalances(chainId: number, passedShieldedPrivateKey: string, passedShieldedPublicKey: string, ethAddress: string, resetCacheBefore?: boolean, updateTokensListBefore?: boolean, useBlockedUtxos?: boolean): Promise<Map<string, TokenBalance>>;
|
|
70
|
-
getApprovedBalances(resetCacheBefore?: boolean, updateTokensListBefore?: boolean): Promise<Map<string, TokenBalance>>;
|
|
71
|
-
getTotalBalance(
|
|
72
|
-
getStuckShieldedBalances(
|
|
64
|
+
getApprovedBalances(chainId: number, resetCacheBefore?: boolean, updateTokensListBefore?: boolean): Promise<Map<string, TokenBalance>>;
|
|
65
|
+
getTotalBalance(chainId: number, _userKeys?: UserKeys, _ethAddress?: string, resetCacheBefore?: boolean, updateTokensListBefore?: boolean, useBlockedUtxos?: boolean): Promise<TokenBalance[]>;
|
|
66
|
+
getStuckShieldedBalances(chainId: number, _ethAddress?: string): Promise<TokenBalance[]>;
|
|
73
67
|
getSupportedPassportLinks(): string[];
|
|
74
|
-
checkAccessToken(): Promise<boolean>;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
getAccessTokenTreeRootHash(): Promise<any>;
|
|
68
|
+
checkAccessToken(chainId: number): Promise<boolean>;
|
|
69
|
+
getHinkalTreeRootHash(chainId: number): Promise<any>;
|
|
70
|
+
getAccessTokenTreeRootHash(chainId: number): Promise<any>;
|
|
78
71
|
resetMerkleTreesIfNecessary(): Promise<void>;
|
|
79
72
|
getEventsFromHinkal(): Promise<void>;
|
|
80
73
|
getEthereumAddress(): Promise<string>;
|
|
81
|
-
getRandomRelay(markAsPending?: boolean): Promise<string | undefined>;
|
|
82
|
-
getGasPrice(): Promise<bigint>;
|
|
74
|
+
getRandomRelay(chainId: number, markAsPending?: boolean): Promise<string | undefined>;
|
|
75
|
+
getGasPrice(chainId: number): Promise<bigint>;
|
|
83
76
|
getAPI(): IAPI;
|
|
84
|
-
resetCache(): void;
|
|
85
77
|
snapshotsClearInterval(): void;
|
|
86
|
-
checkTokenRegistry(erc20Addresses: string[], amountChanges: bigint[]): Promise<boolean>;
|
|
78
|
+
checkTokenRegistry(chainId: number, erc20Addresses: string[], amountChanges: bigint[]): Promise<boolean>;
|
|
87
79
|
getRecipientInfo(): string;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
getApprovedUtxosForToken(erc20Address: string, resetCacheBefore?: boolean): ApprovedUtxoWithInteractionAddress[];
|
|
91
|
-
getMyApprovalAmountForInteraction(interactionAddress: string, tokenAddress: string): bigint;
|
|
92
|
-
checkExistingApprovalFromHinkal(erc20Address: string, interactionAddress: string): Promise<bigint>;
|
|
93
|
-
getBufferEntry(approveTo: string, tokenAddress: string, inHinkalAddress: bigint): Promise<bigint>;
|
|
80
|
+
getApprovedUtxos(chainId: number, resetCacheBefore?: boolean): ApprovedUtxoWithInteractionAddress[];
|
|
81
|
+
getApprovedUtxosForToken(erc20Address: string, chainId: number, resetCacheBefore?: boolean): ApprovedUtxoWithInteractionAddress[];
|
|
94
82
|
deposit(erc20Tokens: ERC20Token[], amountChanges: bigint[]): Promise<ethers.ContractTransaction>;
|
|
95
83
|
depositForOther(erc20Tokens: ERC20Token[], amountChanges: bigint[], recipientInfo: string): Promise<ethers.ContractTransaction>;
|
|
96
84
|
depositAndWithdraw(erc20Token: ERC20Token, recipientAmounts: bigint[], recipientAddresses: string[], txCompletionTime?: number, feeStructureOverride?: FeeStructure): Promise<string>;
|
|
97
85
|
prooflessDeposit(erc20Tokens: ERC20Token[], amountChanges: bigint[], stealthAddressStructures?: StealthAddressStructure[]): Promise<ethers.ContractTransaction>;
|
|
98
86
|
getSolanaProgram(idl: Idl): Program;
|
|
99
87
|
getSolanaPublicKey(): PublicKey;
|
|
100
|
-
depositSolana(amount: bigint,
|
|
101
|
-
depositSolanaForOther(amount: bigint,
|
|
102
|
-
solanaMultiPaymentDeposit(amounts: bigint[],
|
|
88
|
+
depositSolana(amount: bigint, token: ERC20Token): Promise<string>;
|
|
89
|
+
depositSolanaForOther(amount: bigint, token: ERC20Token, recipientInfo: string): Promise<string>;
|
|
90
|
+
solanaMultiPaymentDeposit(amounts: bigint[], token: ERC20Token): Promise<string>;
|
|
103
91
|
transfer(erc20Tokens: ERC20Token[], amountChanges: bigint[], recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
104
92
|
withdraw(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], recipientAddress: string, isRelayerOff: boolean, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<ethers.ContractTransaction | RelayerTransaction | bigint>;
|
|
105
93
|
withdrawStuckUtxos(erc20Token: ERC20Token, recipientAddress: string): Promise<RelayerTransaction[]>;
|
|
106
94
|
swap(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], externalActionId: ExternalActionId, swapData: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean, withPrivateMempool?: boolean): Promise<RelayerTransaction | bigint>;
|
|
107
95
|
swapSolana(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], swapData: string, feeToken?: string, feeStructureOverride?: FeeStructure, onlyGasEstimate?: boolean): Promise<RelayerTransaction>;
|
|
108
96
|
actionReceive(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], feeToken?: string, feeStructureOverride?: FeeStructure, subAccount?: SubAccount, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
109
|
-
|
|
110
|
-
actionPrivateWallet(erc20Addresses: string[], deltaAmounts: bigint[], onChainCreation: boolean[], ops: string[], emporiumTokenChanges: TokenChanges<bigint>[], subAccount: SubAccount, feeToken?: string, feeStructureOverride?: FeeStructure, relayOverride?: string, autoDepositBack?: boolean, maxGasInDollar?: string, action?: AdminTransactionType, privateRecipientInfo?: PrivateRecipientInfo, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
111
|
-
approve(erc20Addresses: string[], amount: bigint, approveTo: string, feeToken?: string, feeStructureOverride?: FeeStructure, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
112
|
-
hinkalInsideTransact(erc20Addresses: string[], deltaChanges: bigint[], approvalChanges: bigint[], externalAddress: string, externalActionMetadata: string, parsedInLogicMetadata: ParsedInLogicMetadata, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
97
|
+
actionPrivateWallet(chainId: number, erc20Addresses: string[], deltaAmounts: bigint[], onChainCreation: boolean[], ops: string[], emporiumTokenChanges: TokenChanges<bigint>[], subAccount: SubAccount, feeToken?: string, feeStructureOverride?: FeeStructure, relayOverride?: string, autoDepositBack?: boolean, maxGasInDollar?: string, action?: AdminTransactionType, privateRecipientInfo?: PrivateRecipientInfo, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
113
98
|
proxySwap(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], externalActionId: ExternalActionId, swapData: string, isTheSameChainSwap: boolean, subAccount: SubAccount, feeToken?: string, feeStructureOverride?: FeeStructure, autoDepositBack?: boolean, maxGasInDollar?: string, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
114
99
|
proxyToPrivate(erc20Tokens: ERC20Token[], deltaAmountsBase: bigint[], subAccount: SubAccount, recipientInfo: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|
|
115
100
|
proxySend(erc20Tokens: ERC20Token[], amounts: bigint[], subAccount: SubAccount, recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType, onlyGasEstimate?: boolean): Promise<RelayerTransaction | bigint>;
|