@hinkal/common 0.2.31 → 0.2.32
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 +26 -11
- package/API/API.mjs +103 -88
- package/API/callMonitor.cjs +1 -1
- package/API/callMonitor.d.ts +8 -0
- package/API/callMonitor.mjs +2 -2
- package/API/callRelayer.d.ts +4 -1
- package/API/dashboardAccountCalls.cjs +1 -0
- package/API/dashboardAccountCalls.d.ts +24 -0
- package/API/dashboardAccountCalls.mjs +10 -0
- package/API/dashboardAccountMemberCalls.cjs +1 -0
- package/API/dashboardAccountMemberCalls.d.ts +34 -0
- package/API/dashboardAccountMemberCalls.mjs +16 -0
- package/API/dashboardBalanceCalls.cjs +1 -0
- package/API/dashboardBalanceCalls.d.ts +12 -0
- package/API/dashboardBalanceCalls.mjs +13 -0
- package/API/dashboardContactCalls.cjs +1 -0
- package/API/dashboardContactCalls.d.ts +9 -0
- package/API/dashboardContactCalls.mjs +13 -0
- package/API/dashboardPayoutCalls.cjs +1 -0
- package/API/dashboardPayoutCalls.d.ts +14 -0
- package/API/dashboardPayoutCalls.mjs +13 -0
- package/API/dashboardTransactionCalls.cjs +1 -0
- package/API/dashboardTransactionCalls.d.ts +3 -0
- package/API/dashboardTransactionCalls.mjs +10 -0
- package/API/enclaveRecipientInfoCalls.cjs +1 -0
- package/API/enclaveRecipientInfoCalls.d.ts +14 -0
- package/API/enclaveRecipientInfoCalls.mjs +7 -0
- package/API/enclaveSignatureCalls.cjs +1 -1
- package/API/enclaveSignatureCalls.d.ts +3 -8
- package/API/enclaveSignatureCalls.mjs +6 -8
- package/API/enclaveUtxoCalls.cjs +1 -1
- package/API/enclaveUtxoCalls.d.ts +8 -2
- package/API/enclaveUtxoCalls.mjs +5 -3
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.d.ts +1 -19
- package/API/fetchCommitmentsCache.mjs +9 -22
- package/API/getAnyRecipientInfo.d.ts +1 -0
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +3 -0
- package/API/getServerURL.mjs +15 -32
- package/API/getWebsiteURL.cjs +1 -1
- package/API/getWebsiteURL.d.ts +3 -2
- package/API/getWebsiteURL.mjs +12 -5
- package/API/index.cjs +1 -1
- package/API/index.d.ts +2 -0
- package/API/index.mjs +2 -0
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +0 -5
- package/API/kycCalls.mjs +3 -10
- package/API/privateSendRecipientInfoCalls.cjs +1 -1
- package/API/privateSendRecipientInfoCalls.d.ts +0 -10
- package/API/privateSendRecipientInfoCalls.mjs +2 -2
- package/API/scheduled-transactions-calls.cjs +1 -1
- package/API/scheduled-transactions-calls.d.ts +8 -2
- package/API/scheduled-transactions-calls.mjs +5 -4
- package/API/tenderly.api.cjs +1 -1
- package/API/tenderly.api.d.ts +1 -1
- package/API/tenderly.api.mjs +1 -1
- package/constants/addresses.constants.cjs +1 -1
- package/constants/addresses.constants.d.ts +10 -7
- package/constants/addresses.constants.mjs +11 -8
- package/constants/assets.constants.cjs +1 -1
- package/constants/assets.constants.mjs +1 -1
- package/constants/auth.constants.cjs +1 -0
- package/constants/auth.constants.d.ts +2 -0
- package/constants/auth.constants.mjs +4 -0
- package/constants/backend.constants.cjs +1 -1
- package/constants/backend.constants.d.ts +0 -1
- package/constants/backend.constants.mjs +0 -1
- package/constants/bridging.constants.cjs +1 -1
- package/constants/bridging.constants.d.ts +2 -0
- package/constants/bridging.constants.mjs +7 -3
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +25 -8
- package/constants/chains.constants.mjs +168 -127
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +5 -3
- package/constants/coingecko.constants.mjs +8 -5
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +0 -4
- package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +125 -850
- package/constants/deploy-data/deploy-data-arcTestnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-arcTestnet.json.mjs +97 -1013
- package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-base.json.mjs +132 -869
- package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +132 -871
- package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-localhost.json.mjs +6 -808
- package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-optimism.json.mjs +132 -869
- package/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -0
- package/constants/deploy-data/deploy-data-optimismTest.json.mjs +3565 -0
- package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-polygon.json.mjs +132 -869
- package/constants/deploy-data/deploy-data-sepoliaTestnet.json.cjs +1 -0
- package/constants/deploy-data/deploy-data-sepoliaTestnet.json.mjs +3561 -0
- package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-solana.json.mjs +1 -1
- package/constants/deploy-data/deploy-data-tempo.json.cjs +1 -0
- package/constants/deploy-data/deploy-data-tempo.json.mjs +3563 -0
- package/constants/deploy-data/deploy-data-tronMainnet.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-tronMainnet.json.mjs +133 -870
- package/constants/deploy-data/deploy-data-tronNile.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-tronNile.json.mjs +133 -870
- package/constants/deploy-data/index.d.ts +4 -1
- package/constants/events.constants.cjs +1 -1
- package/constants/events.constants.mjs +4 -1
- package/constants/fees.constants.cjs +1 -1
- package/constants/fees.constants.d.ts +5 -1
- package/constants/fees.constants.mjs +9 -5
- package/constants/index.cjs +1 -1
- package/constants/index.d.ts +2 -1
- package/constants/index.mjs +6 -2
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.d.ts +1 -1
- package/constants/kyc.constants.mjs +38 -37
- package/constants/lifi.constants.cjs +1 -1
- package/constants/lifi.constants.d.ts +2 -0
- package/constants/lifi.constants.mjs +7 -2
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +7 -1
- package/constants/mediaUrls.constants.mjs +9 -3
- package/constants/price-impact.constants.cjs +1 -0
- package/constants/price-impact.constants.d.ts +2 -0
- package/constants/price-impact.constants.mjs +4 -0
- package/constants/protocol.constants.cjs +1 -1
- package/constants/protocol.constants.d.ts +4 -1
- package/constants/protocol.constants.mjs +2 -2
- package/constants/reorg-depths.constants.cjs +1 -1
- package/constants/reorg-depths.constants.d.ts +3 -1
- package/constants/reorg-depths.constants.mjs +3 -1
- package/constants/save-depths.cjs +1 -1
- package/constants/save-depths.d.ts +3 -1
- package/constants/save-depths.mjs +3 -1
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +33 -8
- package/constants/server.constants.mjs +44 -24
- package/constants/token-data/ERC20Registry.cjs +1 -1
- package/constants/token-data/ERC20Registry.mjs +20 -9
- package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistry.json.mjs +24 -24
- package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/arbMainnetRegistryFixed.json.mjs +24 -24
- package/constants/token-data/arcTestnetRegistry.json.cjs +1 -1
- package/constants/token-data/arcTestnetRegistry.json.mjs +3 -3
- package/constants/token-data/baseRegistry.json.cjs +1 -1
- package/constants/token-data/baseRegistry.json.mjs +20 -12
- package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
- package/constants/token-data/baseRegistryFixed.json.mjs +18 -10
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +38 -38
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +38 -38
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +211 -211
- package/constants/token-data/optimismRegistry.json.cjs +1 -1
- package/constants/token-data/optimismRegistry.json.mjs +36 -28
- package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
- package/constants/token-data/optimismRegistryFixed.json.mjs +36 -28
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +34 -26
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +34 -26
- package/constants/token-data/sepoliaTestnetRegistry.json.cjs +1 -0
- package/constants/token-data/sepoliaTestnetRegistry.json.mjs +21 -0
- package/constants/token-data/solanaMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/solanaMainnetRegistry.json.mjs +1 -1
- package/constants/token-data/tempoRegistry.json.cjs +1 -0
- package/constants/token-data/tempoRegistry.json.mjs +37 -0
- package/constants/token-data/tronMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/tronMainnetRegistry.json.mjs +26 -15
- package/constants/token-data/tronNileRegistry.json.cjs +1 -1
- package/constants/token-data/tronNileRegistry.json.mjs +2 -2
- package/constants/tokens.constants.cjs +1 -1
- package/constants/tokens.constants.d.ts +1 -0
- package/constants/tokens.constants.mjs +10 -3
- package/constants/vite.constants.cjs +1 -1
- package/constants/vite.constants.mjs +23 -5
- package/constants/wallet.constants.cjs +1 -1
- package/constants/wallet.constants.d.ts +1 -1
- package/constants/wallet.constants.mjs +2 -18
- package/crypto/babyJub.d.ts +1 -1
- package/crypto/ecdh-dual-path.cjs +1 -0
- package/crypto/ecdh-dual-path.d.ts +13 -0
- package/crypto/ecdh-dual-path.mjs +39 -0
- package/crypto/ecdh-sealed-keys.cjs +1 -0
- package/crypto/ecdh-sealed-keys.d.ts +22 -0
- package/crypto/ecdh-sealed-keys.mjs +33 -0
- package/crypto/ecdh.cjs +1 -0
- package/crypto/ecdh.d.ts +2 -0
- package/crypto/ecdh.mjs +9 -0
- package/crypto/eddsa.cjs +1 -0
- package/crypto/eddsa.d.ts +8 -0
- package/crypto/eddsa.mjs +12 -0
- package/crypto/index.cjs +1 -1
- package/crypto/index.d.ts +4 -0
- package/crypto/index.mjs +4 -0
- package/crypto/preProcessing.cjs +1 -1
- package/crypto/preProcessing.d.ts +1 -1
- package/crypto/preProcessing.mjs +10 -8
- package/data-structures/AccountActions/AccountActions.cjs +1 -1
- package/data-structures/AccountActions/AccountActions.mjs +3 -2
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +2 -3
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +16 -21
- package/data-structures/Hinkal/Hinkal.mjs +144 -160
- package/data-structures/Hinkal/IHinkal.d.ts +13 -19
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +15 -15
- package/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/data-structures/Hinkal/hinkalClaimUtxo.d.ts +1 -2
- package/data-structures/Hinkal/hinkalClaimUtxo.mjs +49 -47
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.d.ts +5 -3
- package/data-structures/Hinkal/hinkalDeposit.mjs +106 -50
- package/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndBridge.d.ts +1 -1
- package/data-structures/Hinkal/hinkalDepositAndBridge.mjs +94 -87
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +3 -2
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +48 -48
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +41 -63
- package/data-structures/Hinkal/hinkalPalEvmDeposit.cjs +1 -0
- package/data-structures/Hinkal/hinkalPalEvmDeposit.d.ts +9 -0
- package/data-structures/Hinkal/hinkalPalEvmDeposit.mjs +19 -0
- package/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.cjs +1 -0
- package/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.d.ts +9 -0
- package/data-structures/Hinkal/hinkalPalSolanaDepositPrepare.mjs +18 -0
- package/data-structures/Hinkal/hinkalPalTronDepositPrepare.cjs +1 -0
- package/data-structures/Hinkal/hinkalPalTronDepositPrepare.d.ts +9 -0
- package/data-structures/Hinkal/hinkalPalTronDepositPrepare.mjs +17 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +46 -50
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +4 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +84 -128
- package/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -0
- package/data-structures/Hinkal/hinkalProoflessDeposit.utils.d.ts +7 -0
- package/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +51 -0
- package/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +1 -0
- package/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.d.ts +6 -0
- package/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +128 -0
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.d.ts +2 -2
- package/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +68 -69
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -3
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +96 -57
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +20 -2
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +114 -122
- package/data-structures/Hinkal/hinkalSolanaProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProoflessDeposit.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +12 -17
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +38 -40
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +4 -3
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +68 -52
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +2 -2
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +67 -72
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +56 -61
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +38 -48
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +32 -42
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +41 -54
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +43 -56
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +87 -108
- package/data-structures/Hinkal/index.cjs +1 -1
- package/data-structures/Hinkal/index.d.ts +5 -0
- package/data-structures/Hinkal/index.mjs +5 -0
- package/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +1 -0
- package/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.d.ts +22 -0
- package/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +34 -0
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +33 -40
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.mjs +25 -24
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.d.ts +1 -0
- package/data-structures/IndexedDB/contact-db.mjs +30 -16
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.d.ts +1 -1
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +4 -4
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +37 -34
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.d.ts +2 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +65 -50
- package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/PrivateTokensDB.mjs +2 -1
- package/data-structures/WalletManager/WalletManager.cjs +1 -0
- package/data-structures/WalletManager/WalletManager.d.ts +51 -0
- package/data-structures/WalletManager/WalletManager.mjs +99 -0
- package/data-structures/WalletManager/index.cjs +1 -0
- package/data-structures/WalletManager/index.d.ts +1 -0
- package/data-structures/WalletManager/index.mjs +1 -0
- package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/data-structures/crypto-keys/decodeUTXO.d.ts +5 -3
- package/data-structures/crypto-keys/decodeUTXO.mjs +49 -46
- package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +32 -40
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +51 -24
- package/data-structures/crypto-keys/keys.mjs +104 -43
- package/data-structures/custom-token-registry/CustomTokenRegistry.cjs +1 -1
- package/data-structures/custom-token-registry/CustomTokenRegistry.mjs +2 -2
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +2 -2
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +4 -4
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -1
- package/data-structures/event-service/helpers/ClientEventHelper.mjs +3 -3
- package/data-structures/event-service/helpers/PollingEventHelper.cjs +1 -1
- package/data-structures/event-service/helpers/PollingEventHelper.d.ts +2 -0
- package/data-structures/event-service/helpers/PollingEventHelper.mjs +7 -3
- package/data-structures/event-service/index.cjs +1 -1
- package/data-structures/event-service/index.d.ts +0 -3
- package/data-structures/event-service/index.mjs +0 -3
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +2 -2
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +5 -5
- package/data-structures/index.cjs +1 -1
- package/data-structures/index.d.ts +1 -0
- package/data-structures/index.mjs +10 -10
- package/data-structures/merkle-tree/index.cjs +1 -1
- package/data-structures/merkle-tree/index.d.ts +0 -1
- package/data-structures/merkle-tree/index.mjs +0 -1
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +6 -0
- package/data-structures/snapshot/SnapshotFetcherService.cjs +1 -1
- package/data-structures/snapshot/SnapshotFetcherService.d.ts +0 -2
- package/data-structures/snapshot/SnapshotFetcherService.mjs +0 -6
- package/data-structures/snapshot/index.cjs +1 -1
- package/data-structures/snapshot/index.d.ts +0 -3
- package/data-structures/snapshot/index.mjs +0 -3
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +16 -10
- package/data-structures/utxo/Utxo.mjs +40 -38
- package/error-handling/customErrors/HttpError.cjs +1 -0
- package/error-handling/customErrors/HttpError.d.ts +4 -0
- package/error-handling/customErrors/HttpError.mjs +8 -0
- package/error-handling/customErrors/index.cjs +1 -1
- package/error-handling/customErrors/index.d.ts +1 -0
- package/error-handling/customErrors/index.mjs +1 -0
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +11 -0
- package/error-handling/error-codes.constants.mjs +13 -2
- package/error-handling/index.cjs +1 -1
- package/error-handling/index.mjs +1 -0
- package/error-handling/retrySolanaError.cjs +1 -0
- package/error-handling/retrySolanaError.d.ts +1 -0
- package/error-handling/retrySolanaError.mjs +4 -0
- package/externalABIs/index.cjs +1 -1
- package/externalABIs/index.d.ts +1 -16
- package/externalABIs/index.mjs +4 -5
- package/functions/auto-deposit-back-helpers/get-gas-token-records.d.ts +1 -1
- package/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.d.ts +1 -1
- package/functions/index.cjs +1 -1
- package/functions/index.mjs +28 -19
- package/functions/kyc/checkTokenLimitsUSD.cjs +1 -1
- package/functions/kyc/checkTokenLimitsUSD.mjs +15 -15
- package/functions/kyc/index.cjs +1 -1
- package/functions/kyc/index.d.ts +0 -1
- package/functions/kyc/index.mjs +0 -1
- package/functions/pre-transaction/addressTableLookup.cjs +1 -1
- package/functions/pre-transaction/addressTableLookup.mjs +21 -18
- package/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -0
- package/functions/pre-transaction/buildCommitmentValidationData.d.ts +4 -0
- package/functions/pre-transaction/buildCommitmentValidationData.mjs +58 -0
- package/functions/pre-transaction/calculateSolanaNullifierCount.cjs +1 -0
- package/functions/pre-transaction/calculateSolanaNullifierCount.d.ts +2 -0
- package/functions/pre-transaction/calculateSolanaNullifierCount.mjs +23 -0
- package/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/functions/pre-transaction/constructAdminData.mjs +4 -4
- package/functions/pre-transaction/index.cjs +1 -1
- package/functions/pre-transaction/index.d.ts +2 -3
- package/functions/pre-transaction/index.mjs +3 -4
- package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
- package/functions/pre-transaction/outputUtxoProcessing.mjs +22 -19
- package/functions/pre-transaction/recipientUtxoProcessing.cjs +1 -1
- package/functions/pre-transaction/recipientUtxoProcessing.mjs +11 -9
- package/functions/pre-transaction/sendInitNullifiersTransaction.cjs +1 -1
- package/functions/pre-transaction/sendInitNullifiersTransaction.mjs +9 -9
- package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/functions/pre-transaction/sendV0Transaction.mjs +45 -43
- package/functions/pre-transaction/solana-public-signals.cjs +1 -1
- package/functions/pre-transaction/solana-public-signals.d.ts +7 -6
- package/functions/pre-transaction/solana-public-signals.mjs +22 -19
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.d.ts +0 -4
- package/functions/pre-transaction/solana.mjs +7 -27
- package/functions/pre-transaction/store-proof.cjs +1 -1
- package/functions/pre-transaction/store-proof.mjs +3 -3
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +13 -3
- package/functions/private-wallet/emporium.helpers.mjs +84 -74
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.mjs +6 -6
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +8 -13
- package/functions/snarkjs/common.snarkjs.mjs +65 -74
- package/functions/snarkjs/constant.cjs +1 -1
- package/functions/snarkjs/constant.d.ts +146 -426
- package/functions/snarkjs/constant.mjs +149 -430
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +2 -3
- package/functions/snarkjs/constructGeneralZkProof.mjs +74 -57
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.d.ts +1 -2
- package/functions/snarkjs/constructSolanaZkProof.mjs +65 -37
- package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +6 -10
- package/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/functions/snarkjs/fetchOnChainRootHashes.d.ts +0 -1
- package/functions/snarkjs/fetchOnChainRootHashes.mjs +22 -7
- package/functions/snarkjs/generateCircomData.cjs +1 -1
- package/functions/snarkjs/generateCircomData.d.ts +2 -2
- package/functions/snarkjs/generateCircomData.mjs +29 -31
- package/functions/snarkjs/generateZkProof.cjs +1 -1
- package/functions/snarkjs/generateZkProof.mjs +20 -10
- package/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
- package/functions/snarkjs/generateZkProofEnclave.mjs +15 -18
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +2 -9
- package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +40 -94
- package/functions/snarkjs/getZKFiles.cjs +1 -1
- package/functions/snarkjs/getZKFiles.d.ts +1 -0
- package/functions/snarkjs/getZKFiles.mjs +2 -2
- package/functions/snarkjs/index.cjs +1 -1
- package/functions/snarkjs/index.d.ts +2 -1
- package/functions/snarkjs/index.mjs +2 -1
- package/functions/snarkjs/signedMessageHash.cjs +1 -0
- package/functions/snarkjs/signedMessageHash.d.ts +31 -0
- package/functions/snarkjs/signedMessageHash.mjs +49 -0
- package/functions/snarkjs/verifyCommitmentValidationData.cjs +1 -0
- package/functions/snarkjs/verifyCommitmentValidationData.d.ts +4 -0
- package/functions/snarkjs/verifyCommitmentValidationData.mjs +43 -0
- package/functions/utils/addresses.cjs +1 -1
- package/functions/utils/addresses.d.ts +2 -0
- package/functions/utils/addresses.mjs +12 -8
- package/functions/utils/aggregateTokenAmounts.cjs +1 -0
- package/functions/utils/aggregateTokenAmounts.d.ts +2 -0
- package/functions/utils/aggregateTokenAmounts.mjs +26 -0
- package/functions/utils/amounts.utils.cjs +1 -1
- package/functions/utils/amounts.utils.d.ts +0 -1
- package/functions/utils/amounts.utils.mjs +18 -18
- package/functions/utils/auth.utils.cjs +1 -0
- package/functions/utils/auth.utils.d.ts +5 -0
- package/functions/utils/auth.utils.mjs +7 -0
- package/functions/utils/bit.operations.cjs +1 -0
- package/functions/utils/bit.operations.d.ts +3 -0
- package/functions/utils/bit.operations.mjs +4 -0
- package/functions/utils/buildClaimableDepositPlan.cjs +1 -1
- package/functions/utils/buildClaimableDepositPlan.d.ts +3 -2
- package/functions/utils/buildClaimableDepositPlan.mjs +32 -24
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.d.ts +0 -4
- package/functions/utils/cacheFunctions.mjs +33 -47
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +2 -3
- package/functions/utils/create-provider.mjs +8 -10
- package/functions/utils/customEnclaveFunctionsRegister.cjs +1 -0
- package/functions/utils/customEnclaveFunctionsRegister.d.ts +18 -0
- package/functions/utils/customEnclaveFunctionsRegister.mjs +8 -0
- package/functions/utils/deposit-claimable.utils.cjs +1 -0
- package/functions/utils/deposit-claimable.utils.d.ts +6 -0
- package/functions/utils/deposit-claimable.utils.mjs +106 -0
- package/functions/utils/dispatchBalanceRefreshes.cjs +1 -0
- package/functions/utils/dispatchBalanceRefreshes.d.ts +4 -0
- package/functions/utils/dispatchBalanceRefreshes.mjs +44 -0
- package/functions/utils/enclave-recipient-info-storage.cjs +1 -0
- package/functions/utils/enclave-recipient-info-storage.d.ts +2 -0
- package/functions/utils/enclave-recipient-info-storage.mjs +17 -0
- package/functions/utils/enclave-signature-storage.cjs +1 -1
- package/functions/utils/enclave-signature-storage.d.ts +1 -2
- package/functions/utils/enclave-signature-storage.mjs +6 -9
- package/functions/utils/enclave-utxo-storage.cjs +1 -1
- package/functions/utils/enclave-utxo-storage.d.ts +3 -2
- package/functions/utils/enclave-utxo-storage.mjs +18 -21
- package/functions/utils/encodeTokenWithId.cjs +1 -1
- package/functions/utils/encodeTokenWithId.mjs +1 -1
- package/functions/utils/encryptInputForEnclave.cjs +1 -1
- package/functions/utils/encryptInputForEnclave.mjs +17 -23
- package/functions/utils/enum.utils.cjs +1 -0
- package/functions/utils/enum.utils.mjs +12 -0
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +2 -0
- package/functions/utils/erc20tokenFunctions.mjs +26 -16
- package/functions/utils/evmNetworkFunctions.d.ts +1 -2
- package/functions/utils/fees.utils.cjs +1 -1
- package/functions/utils/fees.utils.d.ts +2 -1
- package/functions/utils/fees.utils.mjs +30 -16
- package/functions/utils/formatter.cjs +1 -0
- package/functions/utils/formatter.d.ts +1 -0
- package/functions/utils/formatter.mjs +15 -0
- package/functions/utils/getBlockExplorerUrl.cjs +1 -1
- package/functions/utils/getBlockExplorerUrl.mjs +1 -1
- package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/functions/utils/getRecipientInfoFromUserKeys.d.ts +2 -0
- package/functions/utils/getRecipientInfoFromUserKeys.mjs +14 -9
- package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -0
- package/functions/utils/getUtxosFromReceipt.utils.mjs +43 -27
- package/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/functions/utils/getUtxosFromReceiptSolana.d.ts +1 -0
- package/functions/utils/getUtxosFromReceiptSolana.mjs +36 -21
- package/functions/utils/getWalletGroupKey.utils.cjs +1 -1
- package/functions/utils/getWalletGroupKey.utils.mjs +4 -1
- package/functions/utils/index.cjs +1 -1
- package/functions/utils/index.d.ts +14 -1
- package/functions/utils/index.mjs +21 -9
- package/functions/utils/lifi.utils.cjs +1 -0
- package/functions/utils/lifi.utils.d.ts +3 -0
- package/functions/utils/lifi.utils.mjs +30 -0
- package/functions/utils/mnemonics.cjs +1 -0
- package/functions/utils/mnemonics.d.ts +1 -0
- package/functions/utils/mnemonics.mjs +8 -0
- package/functions/utils/pay-routing.utils.cjs +1 -0
- package/functions/utils/pay-routing.utils.d.ts +4 -0
- package/functions/utils/pay-routing.utils.mjs +17 -0
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.mjs +29 -29
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.mjs +5 -5
- package/functions/utils/serialize-utxos.utils.cjs +1 -1
- package/functions/utils/serialize-utxos.utils.mjs +6 -2
- package/functions/utils/solana-memo.cjs +1 -0
- package/functions/utils/solana-memo.d.ts +3 -0
- package/functions/utils/solana-memo.mjs +15 -0
- package/functions/utils/solanaSendPreflight.utils.cjs +1 -0
- package/functions/utils/solanaSendPreflight.utils.d.ts +6 -0
- package/functions/utils/solanaSendPreflight.utils.mjs +21 -0
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.mjs +1 -1
- package/functions/utils/time.utils.cjs +1 -1
- package/functions/utils/time.utils.d.ts +6 -0
- package/functions/utils/time.utils.mjs +23 -16
- package/functions/utils/token-check.utils.cjs +1 -1
- package/functions/utils/token-check.utils.d.ts +1 -0
- package/functions/utils/token-check.utils.mjs +9 -8
- package/functions/utils/transfer-claimable.utils.cjs +1 -0
- package/functions/utils/transfer-claimable.utils.d.ts +9 -0
- package/functions/utils/transfer-claimable.utils.mjs +93 -0
- package/functions/utils/tron.utils.cjs +1 -1
- package/functions/utils/tron.utils.d.ts +11 -1
- package/functions/utils/tron.utils.mjs +85 -40
- package/functions/utils/tx-confirmation.utils.cjs +1 -1
- package/functions/utils/tx-confirmation.utils.mjs +5 -5
- package/functions/utils/userAgent.cjs +1 -1
- package/functions/utils/userAgent.d.ts +1 -0
- package/functions/utils/userAgent.mjs +4 -1
- package/functions/web3/connectors.utils.cjs +1 -1
- package/functions/web3/connectors.utils.d.ts +1 -0
- package/functions/web3/connectors.utils.mjs +5 -2
- package/functions/web3/events/balanceChangedHandler.cjs +1 -1
- package/functions/web3/events/balanceChangedHandler.d.ts +2 -1
- package/functions/web3/events/balanceChangedHandler.mjs +3 -3
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +21 -20
- package/functions/web3/events/getInputUtxosEnclave.cjs +1 -1
- package/functions/web3/events/getInputUtxosEnclave.d.ts +2 -1
- package/functions/web3/events/getInputUtxosEnclave.mjs +25 -18
- package/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +15 -17
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +1 -1
- package/functions/web3/events/index.cjs +1 -1
- package/functions/web3/events/index.d.ts +0 -2
- package/functions/web3/events/index.mjs +0 -2
- package/functions/web3/functionCalls/constructBatchCall.cjs +1 -1
- package/functions/web3/functionCalls/constructBatchCall.d.ts +1 -0
- package/functions/web3/functionCalls/constructBatchCall.mjs +10 -2
- package/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirectTron.d.ts +4 -1
- package/functions/web3/functionCalls/transactCallDirectTron.mjs +89 -55
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +5 -4
- package/functions/web3/functionCalls/transactCallRelayer.mjs +17 -13
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +1 -1
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +1 -1
- package/functions/web3/index.cjs +1 -1
- package/functions/web3/index.d.ts +0 -1
- package/functions/web3/index.mjs +0 -3
- package/functions/web3/lifiAPI.cjs +1 -1
- package/functions/web3/lifiAPI.mjs +28 -19
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +331 -309
- package/package.json +5 -2
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.mjs +1 -1
- package/providers/SolanaProviderAdapter.cjs +1 -1
- package/providers/SolanaProviderAdapter.d.ts +10 -1
- package/providers/SolanaProviderAdapter.mjs +38 -2
- package/providers/TronProviderAdapter.cjs +1 -1
- package/providers/TronProviderAdapter.mjs +2 -2
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +3 -1
- package/providers/WagmiProviderAdapter.mjs +62 -52
- package/providers/prepareSolanaHinkal.cjs +1 -1
- package/providers/prepareSolanaHinkal.mjs +3 -3
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +1 -8
- package/types/admin.types.mjs +1 -1
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +2 -1
- package/types/cache.types.mjs +1 -1
- package/types/chains.types.cjs +1 -0
- package/types/chains.types.d.ts +11 -0
- package/types/chains.types.mjs +8 -0
- package/types/circom-data.types.d.ts +13 -0
- package/types/commitments.types.d.ts +0 -6
- package/types/contacts.types.d.ts +1 -0
- package/types/dashboard-account.cjs +1 -0
- package/types/dashboard-account.d.ts +101 -0
- package/types/dashboard-account.mjs +8 -0
- package/types/dashboard-payout.types.cjs +1 -0
- package/types/dashboard-payout.types.d.ts +29 -0
- package/types/dashboard-payout.types.mjs +8 -0
- package/types/dashboard-transaction.types.d.ts +22 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +15 -18
- package/types/ethereum-network.types.mjs +1 -1
- package/types/events.types.cjs +1 -1
- package/types/events.types.d.ts +2 -3
- package/types/events.types.mjs +1 -1
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +2 -1
- package/types/external-action.types.mjs +1 -1
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +6 -17
- package/types/hinkal.types.mjs +16 -18
- package/types/index.cjs +1 -1
- package/types/index.d.ts +6 -0
- package/types/index.mjs +3 -0
- package/types/pay-activities.types.d.ts +3 -0
- package/types/pay-routing.types.d.ts +9 -0
- package/types/scheduled-transactions.types.d.ts +7 -0
- package/types/solana.types.d.ts +5 -6
- package/types/token-prices.types.d.ts +4 -0
- package/types/transaction.types.d.ts +1 -3
- package/webworker/WorkerWrapper.cjs +1 -0
- package/webworker/WorkerWrapper.d.ts +9 -0
- package/webworker/WorkerWrapper.mjs +22 -0
- package/webworker/logError-fCJ4HXQz.js +22 -0
- package/webworker/package.json +112 -0
- package/webworker/performTaskWithWorker.cjs +1 -1
- package/webworker/performTaskWithWorker.mjs +4 -4
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.d.ts +0 -3
- package/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +0 -0
- package/webworker/snarkjsWorkerNode.cjs +3 -0
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLogic.d.ts +0 -3
- package/webworker/utxoWorker/utxoWorkerNode.d.ts +0 -0
- package/webworker/utxoWorkerNode.cjs +1 -0
- package/webworker/viteWorkerURL.constant.cjs +4 -4
- package/webworker/viteWorkerURL.constant.mjs +4 -4
- package/webworker/worker.registry.cjs +1 -1
- package/webworker/worker.registry.mjs +6 -3
- package/webworker/workerFactory.cjs +1 -1
- package/webworker/workerFactory.d.ts +4 -1
- package/webworker/workerFactory.mjs +31 -17
- package/webworker/workerProxy-BNBqYien.js +130 -0
- package/webworker/workerProxy.d.ts +1 -1
- package/webworker/workerThreadsPatch.d.ts +1 -0
- package/webworker/zkProofWorker/zkProofWorker.types.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorker.types.d.ts +3 -13
- package/webworker/zkProofWorker/zkProofWorker.types.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLogic.d.ts +1 -5
- package/webworker/zkProofWorker/zkProofWorkerNode.d.ts +0 -0
- package/webworker/zkProofWorkerNode.cjs +1 -0
- package/API/solana-calls.cjs +0 -1
- package/API/solana-calls.d.ts +0 -38
- package/API/solana-calls.mjs +0 -8
- package/constants/non-circular-tokens.constants.cjs +0 -1
- package/constants/non-circular-tokens.constants.d.ts +0 -1
- package/constants/non-circular-tokens.constants.mjs +0 -4
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.cjs +0 -1
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.d.ts +0 -3
- package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +0 -15
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +0 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.d.ts +0 -4
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +0 -18
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +0 -35
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +0 -75
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +0 -1
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +0 -30
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +0 -81
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +0 -35
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +0 -76
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +0 -1
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +0 -2
- package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +0 -13
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.d.ts +0 -8
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +0 -29
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +0 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.d.ts +0 -8
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +0 -30
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +0 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.d.ts +0 -8
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +0 -26
- package/externalABIs/transactionsProver.json.cjs +0 -1
- package/externalABIs/transactionsProver.json.mjs +0 -43
- package/functions/pre-transaction/getKycAndSignatureData.cjs +0 -1
- package/functions/pre-transaction/getKycAndSignatureData.d.ts +0 -5
- package/functions/pre-transaction/getKycAndSignatureData.mjs +0 -12
- package/functions/pre-transaction/getSignatureDataForTransact.cjs +0 -1
- package/functions/pre-transaction/getSignatureDataForTransact.d.ts +0 -3
- package/functions/pre-transaction/getSignatureDataForTransact.mjs +0 -6
- package/functions/pre-transaction/initTokenLimitIfNeeded.cjs +0 -1
- package/functions/pre-transaction/initTokenLimitIfNeeded.d.ts +0 -3
- package/functions/pre-transaction/initTokenLimitIfNeeded.mjs +0 -17
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +0 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +0 -10
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +0 -22
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +0 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +0 -6
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +0 -11
- package/functions/snarkjs/constructEmporiumProof.cjs +0 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +0 -13
- package/functions/snarkjs/constructEmporiumProof.mjs +0 -74
- package/functions/utils/processUseApprovalUtxoData.cjs +0 -1
- package/functions/utils/processUseApprovalUtxoData.d.ts +0 -3
- package/functions/utils/processUseApprovalUtxoData.mjs +0 -13
- package/functions/web3/events/balanceChangedCustomHandler.cjs +0 -1
- package/functions/web3/events/balanceChangedCustomHandler.d.ts +0 -2
- package/functions/web3/events/balanceChangedCustomHandler.mjs +0 -9
- package/functions/web3/events/getApprovedBalance.cjs +0 -1
- package/functions/web3/events/getApprovedBalance.d.ts +0 -6
- package/functions/web3/events/getApprovedBalance.mjs +0 -37
- package/functions/web3/functionCalls/accessTokenCalls.cjs +0 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +0 -2
- package/functions/web3/functionCalls/accessTokenCalls.mjs +0 -19
- package/functions/web3/tron-wagmi-adapter.cjs +0 -1
- package/functions/web3/tron-wagmi-adapter.d.ts +0 -8
- package/functions/web3/tron-wagmi-adapter.mjs +0 -27
- package/providers/CustomEthersProvider.cjs +0 -1
- package/providers/CustomEthersProvider.d.ts +0 -10
- package/providers/CustomEthersProvider.mjs +0 -28
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +0 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +0 -30
- package/webworker/utxoWorker/utxoWorkerLogic.cjs +0 -1
- package/webworker/utxoWorker/utxoWorkerLogic.mjs +0 -69
- package/webworker/workerProxy.cjs +0 -1
- package/webworker/workerProxy.mjs +0 -33
- package/webworker/zkProofWorker/zkProofWorkerLogic.cjs +0 -1
- package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +0 -45
|
@@ -1,66 +1,63 @@
|
|
|
1
1
|
import { ContractType as e } from "../../types/ethereum-network.types.mjs";
|
|
2
2
|
import { CustomJSONStringify as t } from "../../functions/utils/serialize.utils.mjs";
|
|
3
3
|
import { isExtension as n } from "../../constants/vite.constants.mjs";
|
|
4
|
-
import { HINKAL_SUPPORTED_CHAINS as r, WALLET_SUPPORTED_CHAINS as i, chainIds as a,
|
|
5
|
-
import { EventType as
|
|
6
|
-
import { API as
|
|
7
|
-
import { supportedPassportLinks as
|
|
8
|
-
import { transactionErrorCodes as
|
|
9
|
-
import { getErc20TokensForChain as
|
|
4
|
+
import { HINKAL_SUPPORTED_CHAINS as r, WALLET_SUPPORTED_CHAINS as i, chainIds as a, currentSolanaChainId as o, currentTronChainId as s, isSameOnchainNetwork as c, isSolanaLike as l, isTronLike as u, networkRegistry as d, setHinkalTronChainId as f } from "../../constants/chains.constants.mjs";
|
|
5
|
+
import { EventType as p, LoginMessageMode as m } from "../../types/hinkal.types.mjs";
|
|
6
|
+
import { API as h } from "../../API/API.mjs";
|
|
7
|
+
import { supportedPassportLinks as ee } from "../../constants/kyc.constants.mjs";
|
|
8
|
+
import { transactionErrorCodes as te } from "../../error-handling/error-codes.constants.mjs";
|
|
9
|
+
import { getErc20TokensForChain as ne } from "../../functions/utils/erc20tokenFunctions.mjs";
|
|
10
10
|
import "../../API/index.mjs";
|
|
11
|
-
import { poseidonFunction as
|
|
12
|
-
import { UserKeys as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
11
|
+
import { poseidonFunction as re } from "../../crypto/poseidon.mjs";
|
|
12
|
+
import { UserKeys as g } from "../crypto-keys/keys.mjs";
|
|
13
|
+
import { validateAndGetChainId as _ } from "../../functions/utils/token-check.utils.mjs";
|
|
14
|
+
import { privateTokensDB as v } from "../TokenDBs/PrivateTokensDB.mjs";
|
|
15
|
+
import { getShieldedBalance as y } from "../../functions/web3/events/getShieldedBalance.mjs";
|
|
16
|
+
import { getMerkleAccountPublicKey as b } from "../../functions/pre-transaction/solana.mjs";
|
|
17
|
+
import { getContractWithFetcherByChainId as x } from "../../functions/web3/getContractMetadata.mjs";
|
|
18
|
+
import { reloadPage as S } from "../../functions/utils/reloadPage.mjs";
|
|
19
|
+
import { createCacheDevice as C } from "../../functions/utils/cacheDevice.utils.mjs";
|
|
20
|
+
import { SolanaProviderAdapter as w } from "../../providers/SolanaProviderAdapter.mjs";
|
|
21
|
+
import { storeAndGetSignatureFromEnclave as T } from "../../functions/utils/enclave-signature-storage.mjs";
|
|
22
|
+
import { generateHashFromSeedPhrases as E } from "../../functions/utils/mnemonics.mjs";
|
|
23
|
+
import { fetchSolanaMerkleTreeRootHash as D } from "../../functions/web3/fetchSolanaMerkleTreeRootHash.mjs";
|
|
24
|
+
import { createTransaferEmporiumOpsBatch as O } from "../../functions/private-wallet/emporium.helpers.mjs";
|
|
25
|
+
import { hinkalDeposit as k, hinkalDepositForOther as A } from "./hinkalDeposit.mjs";
|
|
26
|
+
import { checkTokenLimitsUSD as j } from "../../functions/kyc/checkTokenLimitsUSD.mjs";
|
|
27
|
+
import { hinkalDepositAndWithdraw as M } from "./hinkalDepositAndWithdraw.mjs";
|
|
28
|
+
import { hinkalSolanaDeposit as N, hinkalSolanaDepositForOther as P, hinkalSolanaProoflessDepositWithPublicFee as F } from "./hinkalSolanaDeposit.mjs";
|
|
29
|
+
import { hinkalSwap as I } from "./hinkalSwap.mjs";
|
|
30
|
+
import { hinkalWithdraw as L } from "./hinkalWithdraw.mjs";
|
|
31
|
+
import { MerkleTree as R } from "../merkle-tree/MerkleTree.mjs";
|
|
25
32
|
import "../merkle-tree/index.mjs";
|
|
26
|
-
import { hinkalDeposit as D, hinkalDepositForOther as O } from "./hinkalDeposit.mjs";
|
|
27
|
-
import { createTransaferEmporiumOpsBatch as k } from "../../functions/private-wallet/emporium.helpers.mjs";
|
|
28
|
-
import { getApprovedBalance as A, getApprovedUtxos as j, getApprovedUtxosForToken as M } from "../../functions/web3/events/getApprovedBalance.mjs";
|
|
29
|
-
import { checkTokenLimitsUSD as N } from "../../functions/kyc/checkTokenLimitsUSD.mjs";
|
|
30
|
-
import { hinkalDepositAndWithdraw as P } from "./hinkalDepositAndWithdraw.mjs";
|
|
31
|
-
import { hinkalSolanaDeposit as F, hinkalSolanaDepositForOther as I } from "./hinkalSolanaDeposit.mjs";
|
|
32
|
-
import { hinkalSwap as L } from "./hinkalSwap.mjs";
|
|
33
|
-
import { hinkalWithdraw as R } from "./hinkalWithdraw.mjs";
|
|
34
33
|
import { resetMerkleTrees as z } from "./resetMerkleTrees.mjs";
|
|
35
34
|
import { MultiThreadedUtxoUtils as B } from "../MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs";
|
|
36
35
|
import { hinkalPrivateWallet as V } from "./hinkalPrivateWallet.mjs";
|
|
37
|
-
import { getRecipientInfo as
|
|
38
|
-
import { hinkalSignSubAccount as
|
|
36
|
+
import { getRecipientInfo as ie } from "./hinkalGetRecipientInfo.mjs";
|
|
37
|
+
import { hinkalSignSubAccount as H } from "./hinkalSignSubAccount.mjs";
|
|
39
38
|
import { hinkalActionReceive as U } from "./hinkalActionReceive.mjs";
|
|
40
39
|
import "../TokenDBs/index.mjs";
|
|
41
|
-
import { hinkalProoflessDeposit as W } from "./hinkalProoflessDeposit.mjs";
|
|
42
|
-
import { hinkalProxySwap as
|
|
43
|
-
import { hinkalMultiSendPrivateRecipients as
|
|
44
|
-
import { hinkalTransfer as
|
|
45
|
-
import { hinkalProxyToPrivate as
|
|
46
|
-
import { TronProviderAdapter as
|
|
47
|
-
import { hinkalSolanaDepositAndWithdraw as
|
|
48
|
-
import { hinkalSolanaWithdraw as
|
|
49
|
-
import { hinkalSolanaTransfer as
|
|
50
|
-
import { hinkalSolanaSwap as
|
|
51
|
-
import { hinkalSolanaProxySend as
|
|
52
|
-
import { hinkalSolanaProxySwap as
|
|
53
|
-
import { hinkalSolanaProxyShield as
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { hinkalWithdrawStuckUtxos as ge } from "./hinkalWithdrawStuckUtxos.mjs";
|
|
60
|
-
import { ethers as Q } from "ethers";
|
|
40
|
+
import { hinkalProoflessDeposit as W, hinkalProoflessDepositWithPublicFee as G } from "./hinkalProoflessDeposit.mjs";
|
|
41
|
+
import { hinkalProxySwap as K } from "./hinkalProxySwap.mjs";
|
|
42
|
+
import { hinkalMultiSendPrivateRecipients as q } from "./hinkalMultiSend.mjs";
|
|
43
|
+
import { hinkalTransfer as J } from "./hinkalTransfer.mjs";
|
|
44
|
+
import { hinkalProxyToPrivate as Y } from "./hinkalProxyToPrivate.mjs";
|
|
45
|
+
import { TronProviderAdapter as X } from "../../providers/TronProviderAdapter.mjs";
|
|
46
|
+
import { hinkalSolanaDepositAndWithdraw as ae } from "./hinkalSolanaDepositAndWithdraw.mjs";
|
|
47
|
+
import { hinkalSolanaWithdraw as oe } from "./hinkalSolanaWithdraw.mjs";
|
|
48
|
+
import { hinkalSolanaTransfer as se } from "./hinkalSolanaTransfer.mjs";
|
|
49
|
+
import { hinkalSolanaSwap as ce } from "./hinkalSolanaSwap.mjs";
|
|
50
|
+
import { hinkalSolanaProxySend as Z } from "./hinkalSolanaProxySend.mjs";
|
|
51
|
+
import { hinkalSolanaProxySwap as le } from "./hinkalSolanaProxySwap.mjs";
|
|
52
|
+
import { hinkalSolanaProxyShield as Q } from "./hinkalSolanaProxyShield.mjs";
|
|
53
|
+
import { hinkalDepositAndBridge as ue } from "./hinkalDepositAndBridge.mjs";
|
|
54
|
+
import { hinkalClaimUtxo as de } from "./hinkalClaimUtxo.mjs";
|
|
55
|
+
import { hinkalSolanaProoflessDeposit as fe } from "./hinkalSolanaProoflessDeposit.mjs";
|
|
56
|
+
import { hinkalSolanaClaimUtxo as pe } from "./hinkalSolanaClaimUtxo.mjs";
|
|
57
|
+
import { hinkalWithdrawStuckUtxos as me } from "./hinkalWithdrawStuckUtxos.mjs";
|
|
61
58
|
import { PublicKey as $ } from "@solana/web3.js";
|
|
62
59
|
//#region libs/shared/common/src/data-structures/Hinkal/Hinkal.ts
|
|
63
|
-
var
|
|
60
|
+
var he = class {
|
|
64
61
|
ethereumProviderAdapter;
|
|
65
62
|
solanaProviderAdapter;
|
|
66
63
|
tronProviderAdapter;
|
|
@@ -68,23 +65,19 @@ var _e = class {
|
|
|
68
65
|
signingMessage = "Login to Hinkal Protocol";
|
|
69
66
|
privateTransferSigningMessage = "Login to Hinkal's Private Transfer App";
|
|
70
67
|
merkleTreeHinkalByChain = {};
|
|
71
|
-
merkleTreeAccessTokenByChain = {};
|
|
72
68
|
nullifiersByChain = {};
|
|
73
69
|
encryptedOutputsByChain = {};
|
|
74
|
-
approvalsByChain = {};
|
|
75
70
|
commitmentsSnapshotServiceByChain = {};
|
|
76
71
|
nullifierSnapshotServiceByChain = {};
|
|
77
|
-
accessTokenSnapshotServiceByChain = {};
|
|
78
|
-
approvalsSnapshotServiceByChain = {};
|
|
79
72
|
utxoUtils;
|
|
80
73
|
lastCallState = /* @__PURE__ */ new Map();
|
|
81
74
|
cacheDevice;
|
|
82
75
|
generateProofRemotely;
|
|
83
76
|
disableMerkleTreeUpdates;
|
|
84
77
|
constructor(e) {
|
|
85
|
-
this.userKeys = new
|
|
86
|
-
this.merkleTreeHinkalByChain[e] =
|
|
87
|
-
}), this.generateProofRemotely = e?.generateProofRemotely ?? !0, this.utxoUtils = new B(), this.cacheDevice =
|
|
78
|
+
this.userKeys = new g(void 0), e?.tronChainOverride && f(e.tronChainOverride), r.forEach((e) => {
|
|
79
|
+
this.merkleTreeHinkalByChain[e] = R.create(re, 0n), this.nullifiersByChain[e] = /* @__PURE__ */ new Set(), this.encryptedOutputsByChain[e] = [];
|
|
80
|
+
}), this.generateProofRemotely = e?.generateProofRemotely ?? !0, this.utxoUtils = new B(), this.cacheDevice = C(e), this.disableMerkleTreeUpdates = e?.disableMerkleTreeUpdates ?? !1;
|
|
88
81
|
}
|
|
89
82
|
enforceRateLimit(e, n, r = 1e3) {
|
|
90
83
|
let i = Date.now(), a = t(n), o = this.lastCallState.get(e);
|
|
@@ -96,34 +89,42 @@ var _e = class {
|
|
|
96
89
|
}
|
|
97
90
|
getProviderAdapter(e) {
|
|
98
91
|
let t = e;
|
|
99
|
-
t ||= this.ethereumProviderAdapter ? a.ethMainnet : this.solanaProviderAdapter ?
|
|
92
|
+
t ||= this.ethereumProviderAdapter ? a.ethMainnet : this.solanaProviderAdapter ? o : a.tronMainnet;
|
|
100
93
|
let n;
|
|
101
|
-
if (n =
|
|
94
|
+
if (n = l(t) ? this.solanaProviderAdapter : u(t) ? this.tronProviderAdapter : this.ethereumProviderAdapter, !n) throw Error("ProviderAdapter is not initialized");
|
|
102
95
|
return n;
|
|
103
96
|
}
|
|
104
97
|
async initProviderAdapter(e, t) {
|
|
105
98
|
let n = a.ethMainnet;
|
|
106
|
-
t instanceof
|
|
99
|
+
t instanceof w ? n = o : t instanceof X && (n = s), await this.updateProviderAdapter(n, t), t.initConnector(e);
|
|
107
100
|
let r = await t.connectAndPatchProvider(e);
|
|
108
101
|
await t.init(r), await this.setListeners();
|
|
109
102
|
}
|
|
110
|
-
getSigningMessage(e =
|
|
103
|
+
getSigningMessage(e = m.PROTOCOL) {
|
|
111
104
|
switch (e) {
|
|
112
|
-
case
|
|
113
|
-
case
|
|
105
|
+
case m.PRIVATE_TRANSFER: return this.privateTransferSigningMessage;
|
|
106
|
+
case m.PROTOCOL:
|
|
114
107
|
default: return this.signingMessage;
|
|
115
108
|
}
|
|
116
109
|
}
|
|
117
|
-
async
|
|
110
|
+
async signHinkalMessage(e = m.PROTOCOL) {
|
|
118
111
|
let t = this.getSigningMessage(e);
|
|
119
|
-
|
|
112
|
+
return this.getProviderAdapter().signMessage(t);
|
|
113
|
+
}
|
|
114
|
+
async initUserKeys(e = m.PROTOCOL) {
|
|
115
|
+
this.userKeys = new g(await this.signHinkalMessage(e));
|
|
120
116
|
}
|
|
121
117
|
initUserKeysWithSignature(e) {
|
|
122
|
-
this.userKeys = new
|
|
118
|
+
this.userKeys = new g(e);
|
|
123
119
|
}
|
|
124
120
|
async initUserKeysFromSeedPhrases(e) {
|
|
125
|
-
let t = e
|
|
126
|
-
this.userKeys = new
|
|
121
|
+
let t = E(e);
|
|
122
|
+
this.userKeys = new g(t);
|
|
123
|
+
}
|
|
124
|
+
async storeAndGetInitialSignature(e, t, n) {
|
|
125
|
+
let r = await this.getEthereumAddress();
|
|
126
|
+
if (!r) throw Error("Connected address not found");
|
|
127
|
+
return await T(r, e, t, n);
|
|
127
128
|
}
|
|
128
129
|
async resetMerkle(e) {
|
|
129
130
|
this.disableMerkleTreeUpdates || (e?.every((e) => this.isSelectedNetworkSupported(e)) ?? !0) && await z(this, e);
|
|
@@ -131,13 +132,13 @@ var _e = class {
|
|
|
131
132
|
getTronWeb() {
|
|
132
133
|
let e = this.tronProviderAdapter;
|
|
133
134
|
if (!e) throw Error("Tron provider adapter not initialized");
|
|
134
|
-
if (!(e instanceof
|
|
135
|
+
if (!(e instanceof X)) throw Error("Tron provider adapter is not a TronProviderAdapter");
|
|
135
136
|
let t = e.getTronWeb();
|
|
136
137
|
if (!t) throw Error("TronWeb not available");
|
|
137
138
|
return t;
|
|
138
139
|
}
|
|
139
140
|
getSupportedChains() {
|
|
140
|
-
return this.ethereumProviderAdapter && this.solanaProviderAdapter ? i : this.ethereumProviderAdapter ? r.filter((e) => !
|
|
141
|
+
return this.ethereumProviderAdapter && this.solanaProviderAdapter ? i : this.ethereumProviderAdapter ? r.filter((e) => !l(e) && !u(e)) : this.solanaProviderAdapter ? r.filter((e) => l(e)) : this.tronProviderAdapter ? [s] : [];
|
|
141
142
|
}
|
|
142
143
|
async waitForTransaction(e, t, n = 1) {
|
|
143
144
|
return !!await this.getProviderAdapter(e).waitForTransaction(e, t, n);
|
|
@@ -146,7 +147,7 @@ var _e = class {
|
|
|
146
147
|
return this.getProviderAdapter(e).getContract(e, t, n);
|
|
147
148
|
}
|
|
148
149
|
getContractWithFetcherByChainId(e, t, n = void 0) {
|
|
149
|
-
return
|
|
150
|
+
return x(e, t, n);
|
|
150
151
|
}
|
|
151
152
|
async signMessage(e) {
|
|
152
153
|
return await this.getProviderAdapter().signMessage(e);
|
|
@@ -155,7 +156,7 @@ var _e = class {
|
|
|
155
156
|
return await this.getProviderAdapter().signTypedData(e, t, n);
|
|
156
157
|
}
|
|
157
158
|
async signWithSubAccount(e, t, n, r) {
|
|
158
|
-
return
|
|
159
|
+
return H(e, t, n, r);
|
|
159
160
|
}
|
|
160
161
|
getContractWithSigner(e, t, n = "") {
|
|
161
162
|
return this.getProviderAdapter(e).getContractWithSigner(e, t, n);
|
|
@@ -164,13 +165,14 @@ var _e = class {
|
|
|
164
165
|
return this.getProviderAdapter(e).getContractWithFetcher(e, t, n);
|
|
165
166
|
}
|
|
166
167
|
isSelectedNetworkSupported(e) {
|
|
167
|
-
return !!
|
|
168
|
+
return !!d[e];
|
|
168
169
|
}
|
|
169
170
|
async switchNetwork(e) {
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
let t = this.getProviderAdapter(), n = t.getChainId(), r = n !== void 0 && c(e.chainId, n);
|
|
172
|
+
if (!(e.chainId === n || r)) try {
|
|
173
|
+
await t.switchNetwork(e);
|
|
172
174
|
} catch {
|
|
173
|
-
throw Error(
|
|
175
|
+
throw Error(te.FAILED_TO_SWITCH_NETWORKS);
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
isPermitterAvailable(e) {
|
|
@@ -184,7 +186,7 @@ var _e = class {
|
|
|
184
186
|
}
|
|
185
187
|
async updateProviderAdapter(e, t) {
|
|
186
188
|
try {
|
|
187
|
-
|
|
189
|
+
l(e) ? (this.solanaProviderAdapter && this.solanaProviderAdapter.release(), this.solanaProviderAdapter = t) : u(e) ? (this.tronProviderAdapter && this.tronProviderAdapter.release(), this.tronProviderAdapter = t) : (this.ethereumProviderAdapter && this.ethereumProviderAdapter.release(), this.ethereumProviderAdapter = t);
|
|
188
190
|
} catch (e) {
|
|
189
191
|
throw console.error(e), Error("updateProviderAdapter failed, please try again.");
|
|
190
192
|
}
|
|
@@ -215,69 +217,57 @@ var _e = class {
|
|
|
215
217
|
}
|
|
216
218
|
async onAccountChanged() {
|
|
217
219
|
await this.ethereumProviderAdapter?.onAccountChanged(), await this.solanaProviderAdapter?.onAccountChanged(), await this.tronProviderAdapter?.onAccountChanged();
|
|
218
|
-
let e =
|
|
220
|
+
let e = p.AccountChanged;
|
|
219
221
|
typeof document < "u" ? document?.dispatchEvent(new Event(e)) : process?.emit("message", e, void 0);
|
|
220
222
|
}
|
|
221
223
|
async onChainChanged(e) {
|
|
222
|
-
e ? await this.getProviderAdapter(e).onChainChanged(e) : (await this.disconnectFromConnector(),
|
|
224
|
+
e ? await this.getProviderAdapter(e).onChainChanged(e) : (await this.disconnectFromConnector(), S());
|
|
223
225
|
}
|
|
224
226
|
async monitorConnectedAddress(e) {
|
|
225
|
-
await
|
|
227
|
+
await h.monitor(await this.getEthereumAddressByChain(e));
|
|
226
228
|
}
|
|
227
229
|
async getBalances(e, t, n, r, i = !1, a, o = !1) {
|
|
228
|
-
return
|
|
229
|
-
}
|
|
230
|
-
async getApprovedBalances(e, t = !1, n = !1) {
|
|
231
|
-
return A(this, e, t, n);
|
|
230
|
+
return y(this, e, t, n, r, i, this.generateProofRemotely, a, o);
|
|
232
231
|
}
|
|
233
232
|
async getTotalBalance(e, t, r, i = !1, a, o = !1) {
|
|
234
|
-
let
|
|
235
|
-
return
|
|
236
|
-
let t = e.erc20TokenAddress.toLowerCase(), n =
|
|
233
|
+
let s = r ?? await this.getEthereumAddressByChain(e), c = t ?? this.userKeys, l = await this.getBalances(e, c.getShieldedPrivateKey(), c.getShieldedPublicKey(), s, i, a, o), u = n ? await v.getPrivateTokens(e, s) : ne(e), d = [];
|
|
234
|
+
return u.forEach((e) => {
|
|
235
|
+
let t = e.erc20TokenAddress.toLowerCase(), n = l.get(t), r = {
|
|
237
236
|
token: e,
|
|
238
|
-
balance:
|
|
239
|
-
timestamp: n?.timestamp ||
|
|
237
|
+
balance: n?.balance ?? 0n,
|
|
238
|
+
timestamp: n?.timestamp || "0",
|
|
240
239
|
nfts: n?.nfts || []
|
|
241
240
|
};
|
|
242
|
-
|
|
243
|
-
}),
|
|
241
|
+
d.push(r);
|
|
242
|
+
}), d;
|
|
244
243
|
}
|
|
245
244
|
async getStuckShieldedBalances(e, t, n) {
|
|
246
245
|
return (await this.getTotalBalance(e, t, n, !1, !1, !0)).filter((e) => e.balance > 0n);
|
|
247
246
|
}
|
|
248
247
|
getSupportedPassportLinks() {
|
|
249
|
-
return
|
|
248
|
+
return ee;
|
|
250
249
|
}
|
|
251
250
|
checkAccessToken(e, t) {
|
|
252
|
-
return
|
|
251
|
+
return Promise.resolve(!0);
|
|
253
252
|
}
|
|
254
253
|
checkExternalTokenLimitsUSD(e, t, n) {
|
|
255
|
-
return
|
|
254
|
+
return j(e, t, n);
|
|
256
255
|
}
|
|
257
256
|
async getHinkalTreeRootHash(t) {
|
|
258
|
-
if (
|
|
259
|
-
let { hinkalIdl: e, hinkalAddress: n, originalDeployer: r } =
|
|
257
|
+
if (l(t)) {
|
|
258
|
+
let { hinkalIdl: e, hinkalAddress: n, originalDeployer: r } = d[t].contractData;
|
|
260
259
|
if (!e || !n || !r) throw Error(`Missing Solana configuration for chain ${t}`);
|
|
261
|
-
let i = new $(r), a =
|
|
262
|
-
return
|
|
260
|
+
let i = new $(r), a = b(new $(n), i);
|
|
261
|
+
return D(this.getSolanaProgram(e), a);
|
|
263
262
|
}
|
|
264
263
|
return this.getContractWithFetcherByChainId(t, e.HinkalContract).getRootHash();
|
|
265
264
|
}
|
|
266
|
-
async getAccessTokenTreeRootHash(t) {
|
|
267
|
-
if (s(t)) {
|
|
268
|
-
let { hinkalIdl: e, hinkalAddress: n, originalDeployer: r } = l[t].contractData;
|
|
269
|
-
if (!e || !n || !r) throw Error(`Missing Solana configuration for chain ${t}`);
|
|
270
|
-
let i = new $(r), a = g(new $(n), i);
|
|
271
|
-
return Z(this.getSolanaProgram(e), a);
|
|
272
|
-
}
|
|
273
|
-
return this.getContractWithFetcherByChainId(t, e.AccessTokenContract).getRootHash();
|
|
274
|
-
}
|
|
275
265
|
async resetMerkleTreesIfNecessary(e) {
|
|
276
266
|
let t = (await Promise.all((e ?? this.getSupportedChains()).map(async (e) => {
|
|
277
|
-
let
|
|
267
|
+
let t = await this.getHinkalTreeRootHash(e);
|
|
278
268
|
return {
|
|
279
269
|
chainId: e,
|
|
280
|
-
needsReset: BigInt(t) !== this.merkleTreeHinkalByChain[e].getRootHash()
|
|
270
|
+
needsReset: BigInt(t) !== this.merkleTreeHinkalByChain[e].getRootHash()
|
|
281
271
|
};
|
|
282
272
|
}))).filter((e) => e.needsReset).map((e) => e.chainId);
|
|
283
273
|
t.length > 0 && (console.log("resetting merkle tree in resetMerkleTreesIfNecessary for chains:", t), await this.resetMerkle(t));
|
|
@@ -291,7 +281,7 @@ var _e = class {
|
|
|
291
281
|
return this.getProviderAdapter(e).getAddress();
|
|
292
282
|
}
|
|
293
283
|
async getRandomRelay(e, t = !1) {
|
|
294
|
-
return (await
|
|
284
|
+
return (await h.getIdleRelay(e, t)).relay;
|
|
295
285
|
}
|
|
296
286
|
getGasPrice(e) {
|
|
297
287
|
let t = this.getProviderAdapter(e);
|
|
@@ -299,61 +289,51 @@ var _e = class {
|
|
|
299
289
|
return t.getGasPrice(e);
|
|
300
290
|
}
|
|
301
291
|
getAPI() {
|
|
302
|
-
return
|
|
292
|
+
return h;
|
|
303
293
|
}
|
|
304
294
|
snapshotsClearInterval() {
|
|
305
295
|
this.getSupportedChains().forEach((e) => {
|
|
306
|
-
this.commitmentsSnapshotServiceByChain[e]?.intervalClear(), this.
|
|
296
|
+
this.commitmentsSnapshotServiceByChain[e]?.intervalClear(), this.nullifierSnapshotServiceByChain[e]?.intervalClear();
|
|
307
297
|
});
|
|
308
298
|
}
|
|
309
|
-
checkTokenRegistry(t, n, r) {
|
|
310
|
-
if (s(t)) {
|
|
311
|
-
let { hinkalIdl: e, hinkalAddress: i, originalDeployer: a } = l[t].contractData;
|
|
312
|
-
if (!e || !i || !a) throw Error("missing solana data");
|
|
313
|
-
return v(this.getSolanaProgram(e), new $(a), n, r);
|
|
314
|
-
}
|
|
315
|
-
return c(t) ? T(n, r, t) : w(this.getContractWithFetcher(t, e.HinkalHelperContract), n, r);
|
|
316
|
-
}
|
|
317
299
|
getRecipientInfo() {
|
|
318
|
-
return
|
|
319
|
-
}
|
|
320
|
-
getApprovedUtxos(e, t = !1) {
|
|
321
|
-
return j(this, e, t);
|
|
322
|
-
}
|
|
323
|
-
getApprovedUtxosForToken(e, t, n = !1) {
|
|
324
|
-
return M(this, e, t, n);
|
|
300
|
+
return ie(this);
|
|
325
301
|
}
|
|
326
302
|
async deposit(e, t, n = !0, r = !1) {
|
|
327
|
-
return
|
|
303
|
+
return k(this, e, t, n, r);
|
|
328
304
|
}
|
|
329
|
-
async depositSolana(e, t) {
|
|
330
|
-
return
|
|
305
|
+
async depositSolana(e, t, n = !1) {
|
|
306
|
+
return N(this, e, t, n);
|
|
331
307
|
}
|
|
332
|
-
async depositForOther(e, t, n, r = !0, i = !1) {
|
|
308
|
+
async depositForOther(e, t, n, r = !0, i = !1, a) {
|
|
333
309
|
return this.enforceRateLimit(this.depositForOther.name, [
|
|
334
310
|
e,
|
|
335
311
|
t,
|
|
336
312
|
n
|
|
337
|
-
]),
|
|
313
|
+
]), A(this, e, t, n, r, i, a);
|
|
338
314
|
}
|
|
339
|
-
async depositSolanaForOther(e, t, n) {
|
|
315
|
+
async depositSolanaForOther(e, t, n, r = !1, i) {
|
|
340
316
|
return this.enforceRateLimit(this.depositSolanaForOther.name, [
|
|
341
317
|
e,
|
|
342
318
|
t,
|
|
343
319
|
n
|
|
344
|
-
]),
|
|
320
|
+
]), P(this, e, t, n, r, i);
|
|
345
321
|
}
|
|
346
|
-
async depositAndWithdraw(e, t, n, r, i, a, o, c = !0) {
|
|
347
|
-
return
|
|
322
|
+
async depositAndWithdraw(e, t, n, r, i, a, o, s, c = !0) {
|
|
323
|
+
return l(_([e])) ? ae(this, e, t, n, r, i, a, o, s) : M(this, e, t, n, r, i, a, o, s, c);
|
|
348
324
|
}
|
|
349
325
|
async claimUtxo(e, t, n, r) {
|
|
350
|
-
return
|
|
326
|
+
return l(_([e])) ? pe(this, e, t, r, n) : de(this, e, t, r, n);
|
|
327
|
+
}
|
|
328
|
+
async depositAndBridge(e, t, n, r, i, a, o, s = !0) {
|
|
329
|
+
return ue(this, e, t, n, r, i, a, o, s);
|
|
351
330
|
}
|
|
352
|
-
async
|
|
353
|
-
return fe(this, e, t, n, r, i,
|
|
331
|
+
async prooflessDeposit(e, t, n, r, i = !1) {
|
|
332
|
+
return l(_(e)) ? fe(this, e, t, n, r, i) : W(this, e, t, n, r, i);
|
|
354
333
|
}
|
|
355
|
-
async
|
|
356
|
-
|
|
334
|
+
async prooflessDepositWithPublicFee(e, t, n, r, i) {
|
|
335
|
+
let a = _([e]);
|
|
336
|
+
return l(a) ? F(this, e, t, n, r, i) : G(this, a, e, t, n, r, i);
|
|
357
337
|
}
|
|
358
338
|
getSolanaProgram(e) {
|
|
359
339
|
if (!this.solanaProviderAdapter) throw Error("No provider adapter initialized");
|
|
@@ -366,24 +346,28 @@ var _e = class {
|
|
|
366
346
|
return this.solanaProviderAdapter.getSolanaPublicKey();
|
|
367
347
|
}
|
|
368
348
|
async transfer(e, t, n, r, i, a) {
|
|
369
|
-
return
|
|
349
|
+
return this.enforceRateLimit(this.transfer.name, [
|
|
350
|
+
e,
|
|
351
|
+
t,
|
|
352
|
+
n
|
|
353
|
+
]), l(_(e)) ? se(this, e, t, n, r, i, a) : J(this, e, t, n, r, i, a);
|
|
370
354
|
}
|
|
371
355
|
async withdraw(e, t, n, r, i, a, o) {
|
|
372
|
-
return
|
|
356
|
+
return l(_(e)) ? oe(this, e, t, n, i, a, o) : L(this, e, t, n, r, i, a, o);
|
|
373
357
|
}
|
|
374
358
|
async withdrawStuckUtxos(e, t) {
|
|
375
|
-
return
|
|
359
|
+
return me(this, e, t);
|
|
376
360
|
}
|
|
377
361
|
async swap(e, t, n, r, i, a, o) {
|
|
378
|
-
return
|
|
362
|
+
return l(_(e)) ? this.swapSolana(e, t, r, i, a, o) : I(this, e, t, n, r, i, a, o);
|
|
379
363
|
}
|
|
380
|
-
async swapSolana(e, t, n, r, i) {
|
|
381
|
-
let
|
|
382
|
-
return
|
|
364
|
+
async swapSolana(e, t, n, r, i, a) {
|
|
365
|
+
let o = JSON.parse(n), s = BigInt(o.swapperAccountSalt), { instructionLists: c, addressLookupTableAccount: l } = o.data;
|
|
366
|
+
return ce(this, e, t, s, c, l, r, i, a);
|
|
383
367
|
}
|
|
384
368
|
async actionReceive(e, t, n, r, i, a) {
|
|
385
369
|
if (!i) throw Error("subAccount is required");
|
|
386
|
-
return
|
|
370
|
+
return l(_(e)) ? Q(this, e[0], t[0], i, void 0, a) : U(this, e, t, n, r, i, a);
|
|
387
371
|
}
|
|
388
372
|
async actionPrivateWallet(e, t, n, r, i, a, o, s, c, l, u = !1, d, f, p) {
|
|
389
373
|
return this.enforceRateLimit(this.actionPrivateWallet.name, [
|
|
@@ -399,32 +383,32 @@ var _e = class {
|
|
|
399
383
|
p
|
|
400
384
|
]), V(this, e, t, n, r, i, a, o, s, c, l, u, d, f, p);
|
|
401
385
|
}
|
|
402
|
-
async proxySwap(e, t, n, r, i, a, o,
|
|
403
|
-
return
|
|
386
|
+
async proxySwap(e, t, n, r, i, a, o, s, c = !1, u, d) {
|
|
387
|
+
return l(_(e)) ? le(this, e, t, r, a, n, o, s, d) : K(this, e, t, n, r, i, a, o, s, c, u, d);
|
|
404
388
|
}
|
|
405
389
|
async proxyToPrivate(e, t, n, r, i, a, o) {
|
|
406
|
-
return
|
|
390
|
+
return l(_(e)) ? (this.enforceRateLimit(this.proxyToPrivate.name, [
|
|
407
391
|
e[0],
|
|
408
392
|
t[0],
|
|
409
393
|
n,
|
|
410
394
|
r
|
|
411
|
-
]),
|
|
395
|
+
]), Q(this, e[0], t[0], n, r, o)) : Y(this, e, t, r, i, a, n, o);
|
|
412
396
|
}
|
|
413
397
|
async proxySend(e, t, n, r, i, a, o) {
|
|
414
|
-
let
|
|
415
|
-
if (s
|
|
416
|
-
let
|
|
398
|
+
let s = _(e);
|
|
399
|
+
if (l(s)) return Z(this, e[0], t[0], n, r, o);
|
|
400
|
+
let c = O(this, s, e.map((e) => e.erc20TokenAddress), t, r), u = e.map((e, n) => ({
|
|
417
401
|
token: e,
|
|
418
402
|
amount: -1n * t[n]
|
|
419
403
|
}));
|
|
420
|
-
return await this.actionPrivateWallet(
|
|
404
|
+
return await this.actionPrivateWallet(s, [], [], [], c, u, n, i, a, void 0, void 0, void 0, o, void 0);
|
|
421
405
|
}
|
|
422
406
|
async multiSendPrivateRecipients(e, t, n) {
|
|
423
407
|
return this.enforceRateLimit(this.multiSendPrivateRecipients.name, [
|
|
424
408
|
e,
|
|
425
409
|
t,
|
|
426
410
|
n
|
|
427
|
-
]),
|
|
411
|
+
]), q(this, e, t, n);
|
|
428
412
|
}
|
|
429
413
|
areMerkleTreeUpdatesDisabled() {
|
|
430
414
|
return this.disableMerkleTreeUpdates;
|
|
@@ -434,4 +418,4 @@ var _e = class {
|
|
|
434
418
|
}
|
|
435
419
|
};
|
|
436
420
|
//#endregion
|
|
437
|
-
export {
|
|
421
|
+
export { he as Hinkal };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeeStructure, LoginMessageMode } from '../../types/hinkal.types';
|
|
2
2
|
import { ContractType, EthereumNetwork } from '../../types/ethereum-network.types';
|
|
3
3
|
import { EncryptedOutputWithSign } from '../../types/commitments.types';
|
|
4
4
|
import { ExternalActionId } from '../../types/external-action.types';
|
|
5
5
|
import { IMultiThreadedUtxoUtils } from '../../types/IMultiThreadedUtxoUtils';
|
|
6
6
|
import { ERC20Token, PrivateRecipientInfo, TokenBalance, TokenChanges } from '../../types/token.types';
|
|
7
7
|
import { ethers } from 'ethers';
|
|
8
|
+
import { Types as TronWebTypes, TronWeb } from 'tronweb';
|
|
8
9
|
import { UserKeys } from '../crypto-keys/keys';
|
|
9
10
|
import { IProviderAdapter } from '../provider-adapter/IProviderAdapter';
|
|
10
|
-
import {
|
|
11
|
+
import { ClientCommitmentsSnapshotService, ClientNullifierSnapshotService, ClientSolanaCommitmentsSnapshotService, ClientSolanaNullifierSnapshotService } from '../snapshot';
|
|
11
12
|
import { MerkleTree } from '../merkle-tree';
|
|
12
13
|
import { IAPI } from '../../API/API';
|
|
13
14
|
import { ICacheDevice } from '../../types/ICacheDevice';
|
|
@@ -18,25 +19,19 @@ import { Idl, Program } from '@coral-xyz/anchor';
|
|
|
18
19
|
import { PublicKey } from '@solana/web3.js';
|
|
19
20
|
import { BridgeRecipient } from '../../types/bridging-tx.types';
|
|
20
21
|
import { Utxo } from '../utxo/Utxo';
|
|
21
|
-
import { TronWeb } from 'tronweb';
|
|
22
22
|
export interface IHinkal<ConnectorType = unknown> {
|
|
23
23
|
userKeys: UserKeys;
|
|
24
24
|
readonly signingMessage: string;
|
|
25
25
|
readonly privateTransferSigningMessage: string;
|
|
26
26
|
merkleTreeHinkalByChain: Record<number, MerkleTree<bigint>>;
|
|
27
|
-
merkleTreeAccessTokenByChain: Record<number, MerkleTree<bigint>>;
|
|
28
27
|
nullifiersByChain: Record<number, Set<string>>;
|
|
29
28
|
encryptedOutputsByChain: Record<number, EncryptedOutputWithSign[]>;
|
|
30
|
-
approvalsByChain: Record<number, Map<string, ApprovedUtxo[]>>;
|
|
31
29
|
commitmentsSnapshotServiceByChain: Record<number, ClientCommitmentsSnapshotService | ClientSolanaCommitmentsSnapshotService | undefined>;
|
|
32
30
|
nullifierSnapshotServiceByChain: Record<number, ClientNullifierSnapshotService | ClientSolanaNullifierSnapshotService | undefined>;
|
|
33
|
-
accessTokenSnapshotServiceByChain: Record<number, ClientAccessTokenSnapshotService | ClientSolanaAccessTokenSnapshotService | undefined>;
|
|
34
|
-
approvalsSnapshotServiceByChain: Record<number, ClientApprovalsSnapshotService | undefined>;
|
|
35
31
|
generateProofRemotely: boolean;
|
|
36
32
|
utxoUtils: IMultiThreadedUtxoUtils;
|
|
37
33
|
cacheDevice: ICacheDevice;
|
|
38
34
|
getBalances(chainId: number, passedShieldedPrivateKey: string, passedShieldedPublicKey: string, ethAddress: string, resetCacheBefore?: boolean, updateTokensListBefore?: boolean): Promise<Map<string, TokenBalance>>;
|
|
39
|
-
getApprovedBalances(chainId: number, resetCacheBefore?: boolean, updateTokensListBefore?: boolean): Promise<Map<string, TokenBalance>>;
|
|
40
35
|
getTotalBalance(chainId: number, userKeys?: UserKeys, ethAddress?: string, resetCacheBefore?: boolean, updateTokensListBefore?: boolean, useBlockedUtxos?: boolean): Promise<TokenBalance[]>;
|
|
41
36
|
getStuckShieldedBalances(chainId: number, userKeys?: UserKeys, ethAddress?: string): Promise<TokenBalance[]>;
|
|
42
37
|
getSupportedPassportLinks(): string[];
|
|
@@ -46,27 +41,24 @@ export interface IHinkal<ConnectorType = unknown> {
|
|
|
46
41
|
getEthereumAddress(): Promise<string>;
|
|
47
42
|
getEthereumAddressByChain(chainId: number): Promise<string>;
|
|
48
43
|
getHinkalTreeRootHash(chainId: number): Promise<bigint>;
|
|
49
|
-
getAccessTokenTreeRootHash(chainId: number): Promise<bigint>;
|
|
50
44
|
resetMerkleTreesIfNecessary(chainIdsToCheck?: number[]): Promise<void>;
|
|
51
45
|
resetMerkle(chainIds?: number[]): Promise<void>;
|
|
52
46
|
getRandomRelay(chainId: number, markAsPending?: boolean): Promise<string | undefined>;
|
|
53
47
|
getGasPrice(chainId: number): Promise<bigint>;
|
|
54
48
|
getAPI(): IAPI;
|
|
55
49
|
snapshotsClearInterval(): void;
|
|
56
|
-
checkTokenRegistry(chainId: number, erc20Addresses: string[], amountChanges: bigint[]): Promise<boolean>;
|
|
57
50
|
getRecipientInfo(): string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
prooflessDeposit(erc20Tokens: ERC20Token[], amountChanges: bigint[], stealthAddressStructures?: StealthAddressStructure[], action?: AdminTransactionType): Promise<string>;
|
|
51
|
+
deposit(erc20Tokens: ERC20Token[], amountChanges: bigint[], preEstimateGas?: boolean, returnTxData?: boolean): Promise<ethers.TransactionResponse | ethers.TransactionRequest | string | TronWebTypes.Transaction<TronWebTypes.TriggerSmartContract>>;
|
|
52
|
+
depositForOther(erc20Tokens: ERC20Token[], amountChanges: bigint[], recepinetInfo: string, preEstimateGas?: boolean, returnTxData?: boolean, action?: AdminTransactionType): Promise<ethers.TransactionResponse | ethers.TransactionRequest | string | TronWebTypes.Transaction<TronWebTypes.TriggerSmartContract>>;
|
|
53
|
+
claimUtxo(erc20Token: ERC20Token, utxo: Utxo, claimableSignature?: string, feeStructureOverride?: FeeStructure): Promise<string>;
|
|
54
|
+
depositAndWithdraw(erc20Token: ERC20Token, recipientAmounts: bigint[], recipientAddresses: string[], txCompletionTime?: number, feeStructureOverride?: FeeStructure, ref?: string, action?: AdminTransactionType, dashboardAccountId?: string, preEstimateGas?: boolean): Promise<string>;
|
|
55
|
+
depositAndBridge(erc20Token: ERC20Token, recipientBridges: BridgeRecipient[], txCompletionTime?: number, feeStructureOverride?: FeeStructure, ref?: string, action?: AdminTransactionType, dashboardAccountId?: string, preEstimateGas?: boolean): Promise<string>;
|
|
56
|
+
prooflessDeposit(erc20Tokens: ERC20Token[], amountChanges: bigint[], stealthAddressStructures?: StealthAddressStructure[], action?: AdminTransactionType, returnTxData?: boolean): Promise<string | ethers.TransactionRequest | TronWebTypes.Transaction<TronWebTypes.TriggerSmartContract>>;
|
|
57
|
+
prooflessDepositWithPublicFee(erc20Token: ERC20Token, amounts: bigint[], stealthAddressStructures: StealthAddressStructure[], feeAmount: bigint, action?: AdminTransactionType): Promise<string>;
|
|
66
58
|
getSolanaProgram(idl: Idl): Program;
|
|
67
59
|
getSolanaPublicKey(): PublicKey;
|
|
68
60
|
depositSolana(amount: bigint, token: ERC20Token): Promise<string>;
|
|
69
|
-
depositSolanaForOther(amount: bigint, token: ERC20Token, recipientInfo: string): Promise<string>;
|
|
61
|
+
depositSolanaForOther(amount: bigint, token: ERC20Token, recipientInfo: string, returnTxData?: boolean, action?: AdminTransactionType): Promise<string>;
|
|
70
62
|
transfer(erc20Tokens: ERC20Token[], amountChanges: bigint[], recipientAddress: string, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType): Promise<string>;
|
|
71
63
|
withdraw(erc20Tokens: ERC20Token[], deltaAmounts: bigint[], recipientAddress: string, isRelayerOff: boolean, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType): Promise<ethers.TransactionResponse | string>;
|
|
72
64
|
withdrawStuckUtxos(erc20Token: ERC20Token, recipientAddress: string): Promise<string[]>;
|
|
@@ -74,9 +66,11 @@ export interface IHinkal<ConnectorType = unknown> {
|
|
|
74
66
|
getProviderAdapter(chainId?: number): IProviderAdapter;
|
|
75
67
|
getTronWeb(): TronWeb;
|
|
76
68
|
getSigningMessage(mode?: LoginMessageMode): string;
|
|
69
|
+
signHinkalMessage(mode?: LoginMessageMode): Promise<string>;
|
|
77
70
|
initUserKeys(mode?: LoginMessageMode): Promise<void>;
|
|
78
71
|
initUserKeysWithSignature(signature: string): void;
|
|
79
72
|
initUserKeysFromSeedPhrases(seedPhrases: string[]): Promise<void>;
|
|
73
|
+
storeAndGetInitialSignature(authSignature: string, isSolanaLedger: boolean, txMessageForSolanaLedger?: string): Promise<string>;
|
|
80
74
|
initProviderAdapter(connector: ConnectorType, providerAdapter: IProviderAdapter<ConnectorType>): Promise<void>;
|
|
81
75
|
disconnectFromConnector(): Promise<void>;
|
|
82
76
|
resetProviderAdapters(): Promise<void>;
|