@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
|
@@ -3,166 +3,158 @@ import { networkRegistry as t } from "../../constants/chains.constants.mjs";
|
|
|
3
3
|
import { solanaNativeAddress as n } from "../../constants/protocol.constants.mjs";
|
|
4
4
|
import { DepositAndWithdrawPhase as r } from "../../types/scheduled-transactions.types.mjs";
|
|
5
5
|
import "../../types/index.mjs";
|
|
6
|
-
import { hashEthereumAddress as i } from "../../functions/utils/addresses.mjs";
|
|
7
|
-
import { API as a } from "../../API/API.mjs";
|
|
6
|
+
import { hashEthereumAddress as i, hashString as a } from "../../functions/utils/addresses.mjs";
|
|
8
7
|
import { transactionErrorCodes as o } from "../../error-handling/error-codes.constants.mjs";
|
|
9
8
|
import { randomBigInt as s } from "../../functions/web3/etherFunctions.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
9
|
+
import { UserKeys as c } from "../crypto-keys/keys.mjs";
|
|
10
|
+
import { getCurrentTimeInSeconds as l } from "../../functions/utils/time.utils.mjs";
|
|
11
|
+
import { Utxo as u } from "../utxo/Utxo.mjs";
|
|
12
|
+
import { formatMintAddress as d } from "../../functions/utils/solanaMint.utils.mjs";
|
|
13
|
+
import { validateAndGetChainId as f } from "../../functions/utils/token-check.utils.mjs";
|
|
14
|
+
import { calcEncryptedOutputs as p, calcStealthAddressStructure as m } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
15
|
+
import { buildAnchorStealthAddressStructure as h, getMerkleAccountPublicKey as g, getStorageAccountPublicKey as _, getStorageVaultPublicKey as v } from "../../functions/pre-transaction/solana.mjs";
|
|
16
|
+
import { constructAdminData as y } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
17
|
+
import { fetchSolanaTransaction as b } from "../../functions/pre-transaction/sendV0Transaction.mjs";
|
|
18
|
+
import { getFeeStructure as x } from "../../functions/pre-transaction/getFeeStructure.mjs";
|
|
19
|
+
import { waitForDepositedUtxosInMerkleTree as S } from "../../functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs";
|
|
20
|
+
import { buildCommitmentValidationData as C } from "../../functions/pre-transaction/buildCommitmentValidationData.mjs";
|
|
22
21
|
import "../../functions/pre-transaction/index.mjs";
|
|
23
|
-
import { getOnChainUtxosFromReceiptSolana as
|
|
24
|
-
import {
|
|
25
|
-
import { solanaTransactCallRelayerBatch as D } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
26
|
-
import { safeUpdateDepositAndWithdrawStatus as O, updateDepositAndWithdrawStatus as k } from "../../API/deposit-and-withdraw-status-calls.mjs";
|
|
27
|
-
import { signAndSendSerializedTransaction as A } from "../../functions/web3/signAndSendSerializedTransaction.mjs";
|
|
22
|
+
import { getOnChainUtxosFromReceiptSolana as w } from "../../functions/utils/getUtxosFromReceiptSolana.mjs";
|
|
23
|
+
import { calculateModifiedFeeStructure as T, calculateTotalFee as E } from "../../functions/utils/fees.utils.mjs";
|
|
28
24
|
import "../../functions/web3/index.mjs";
|
|
25
|
+
import { constructSolanaZkProof as D } from "../../functions/snarkjs/constructSolanaZkProof.mjs";
|
|
26
|
+
import { solanaTransactCallRelayerBatch as O } from "../../functions/web3/functionCalls/transactCallRelayer.mjs";
|
|
27
|
+
import { safeUpdateDepositAndWithdrawStatus as k, updateDepositAndWithdrawStatus as A } from "../../API/deposit-and-withdraw-status-calls.mjs";
|
|
29
28
|
import "../../functions/index.mjs";
|
|
30
29
|
import { ethers as j } from "ethers";
|
|
31
30
|
import { PublicKey as M } from "@solana/web3.js";
|
|
32
31
|
import { BN as N } from "@coral-xyz/anchor";
|
|
33
32
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.ts
|
|
34
|
-
var P =
|
|
35
|
-
let
|
|
36
|
-
if (!
|
|
37
|
-
if (!
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
var P = (e, r, i, a) => {
|
|
34
|
+
let { hinkalIdl: o, hinkalAddress: l, originalDeployer: u } = t[r].contractData;
|
|
35
|
+
if (!o) throw Error("No IDL configured for Solana program on this network");
|
|
36
|
+
if (!u) throw Error("missing original deployer");
|
|
37
|
+
let f = e.userKeys.getShieldedPrivateKey(), p = e.getSolanaProgram(o), y = e.getSolanaPublicKey(), b = new M(u), x = new M(l), { mintPublicKey: S } = d(i.erc20TokenAddress), C = S.toString(), w = _(x, b), T = v(x, b), E = g(x, b), D = a.map(() => h(m(c.findCorrectRandomization(s(31), f), f, e.userKeys.getSpendingKeyPair().pubSpendingBJJPoint))), O = C === n;
|
|
38
|
+
return {
|
|
39
|
+
program: p,
|
|
40
|
+
publicKey: y,
|
|
41
|
+
originalDeployer: b,
|
|
42
|
+
mint: O ? null : S,
|
|
43
|
+
atasValue: O ? null : void 0,
|
|
44
|
+
storageAccount: w,
|
|
45
|
+
storageVault: T,
|
|
46
|
+
merkleAccount: E,
|
|
47
|
+
amounts: a,
|
|
48
|
+
anchorStealthStructures: D
|
|
49
|
+
};
|
|
50
|
+
}, F = (e) => e.program.methods.multiPaymentDeposit(e.amounts.map((e) => new N(e.toString())), e.anchorStealthStructures, !0).accounts({
|
|
51
|
+
mint: e.mint,
|
|
52
|
+
signer: e.publicKey,
|
|
53
|
+
signerAta: e.atasValue,
|
|
54
|
+
originalDeployer: e.originalDeployer,
|
|
55
|
+
storageAccount: e.storageAccount,
|
|
56
|
+
storageVault: e.storageVault,
|
|
57
|
+
merkleAccount: e.merkleAccount,
|
|
58
|
+
storageVaultAta: e.atasValue
|
|
59
|
+
}), I = async (e, t, n, i, a, o, s) => {
|
|
60
|
+
let c = i.map((e) => e + E(e, o)), l = P(e, t, n, c), u = (await A({
|
|
61
|
+
chainId: t,
|
|
62
|
+
hashedEthereumAddress: s,
|
|
41
63
|
phase: r.BEFORE_DEPOSIT
|
|
42
|
-
})).id ?? void 0;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
q = await A(P.provider, t, r, i);
|
|
55
|
-
} else {
|
|
56
|
-
let e = m(P.programId, I, R), t = z === "11111111111111111111111111111111" ? null : R, n = z === "11111111111111111111111111111111" ? null : void 0;
|
|
57
|
-
q = await P.methods.multiPaymentDeposit(K.map((e) => new N(e)), U, !0).accounts({
|
|
58
|
-
mint: t,
|
|
59
|
-
signer: F,
|
|
60
|
-
signerAta: n,
|
|
61
|
-
originalDeployer: I,
|
|
62
|
-
storageAccount: B,
|
|
63
|
-
storageVault: V,
|
|
64
|
-
merkleAccount: H,
|
|
65
|
-
tokenLimitStorage: e,
|
|
66
|
-
storageVaultAta: n,
|
|
67
|
-
accessTokenOwner: null
|
|
68
|
-
}).rpc();
|
|
69
|
-
let r = await P.provider.connection.getLatestBlockhash();
|
|
70
|
-
await P.provider.connection.confirmTransaction({
|
|
71
|
-
blockhash: r.blockhash,
|
|
72
|
-
lastValidBlockHeight: r.lastValidBlockHeight,
|
|
73
|
-
signature: q
|
|
74
|
-
}, "finalized");
|
|
75
|
-
}
|
|
76
|
-
let Y = await S(P.provider.connection, q, "finalized");
|
|
77
|
-
if (!Y) throw Error("Transaction missing");
|
|
78
|
-
await O({
|
|
79
|
-
id: J,
|
|
80
|
-
chainId: n,
|
|
81
|
-
hashedEthereumAddress: v,
|
|
64
|
+
})).id ?? void 0, f = await F(l).rpc(), p = await l.program.provider.connection.getLatestBlockhash();
|
|
65
|
+
await l.program.provider.connection.confirmTransaction({
|
|
66
|
+
blockhash: p.blockhash,
|
|
67
|
+
lastValidBlockHeight: p.lastValidBlockHeight,
|
|
68
|
+
signature: f
|
|
69
|
+
}, "finalized");
|
|
70
|
+
let m = await b(l.program.provider.connection, f, "finalized");
|
|
71
|
+
if (!m) throw Error("Transaction missing");
|
|
72
|
+
await k({
|
|
73
|
+
id: u,
|
|
74
|
+
chainId: t,
|
|
75
|
+
hashedEthereumAddress: s,
|
|
82
76
|
phase: r.AFTER_DEPOSIT,
|
|
83
|
-
depositTxHash:
|
|
77
|
+
depositTxHash: f
|
|
84
78
|
});
|
|
85
|
-
let { compressedAddress:
|
|
86
|
-
return
|
|
87
|
-
let n =
|
|
79
|
+
let { compressedAddress: h } = d(n.erc20TokenAddress), g = w(m, l.program, e.userKeys, h), _ = [], v = [...g];
|
|
80
|
+
return a.forEach((e, t) => {
|
|
81
|
+
let n = c[t], r = v.find((e) => e.amount === n);
|
|
88
82
|
if (!r) throw Error(`Could not find newly created UTXO with amount ${n} for recipient ${e}.`);
|
|
89
|
-
|
|
83
|
+
_.push({
|
|
90
84
|
recipientAddress: e,
|
|
91
85
|
utxo: r
|
|
92
|
-
});
|
|
93
|
-
let i = $.indexOf(r);
|
|
94
|
-
$.splice(i, 1);
|
|
86
|
+
}), v.splice(v.indexOf(r), 1);
|
|
95
87
|
}), {
|
|
96
|
-
userDepositedUtxos:
|
|
97
|
-
depositTxHash:
|
|
98
|
-
statusId:
|
|
88
|
+
userDepositedUtxos: _,
|
|
89
|
+
depositTxHash: f,
|
|
90
|
+
statusId: u
|
|
99
91
|
};
|
|
100
|
-
},
|
|
101
|
-
let
|
|
102
|
-
if (
|
|
103
|
-
let {
|
|
104
|
-
if (!
|
|
105
|
-
let
|
|
106
|
-
if (!
|
|
107
|
-
let
|
|
108
|
-
for (let t = 0; t <
|
|
109
|
-
let r =
|
|
110
|
-
let { compressedAddress:
|
|
92
|
+
}, L = async (e, i, a, f, m, h, g, _, v, b, x, S) => {
|
|
93
|
+
let w = a.erc20TokenAddress;
|
|
94
|
+
if (f.length === 0) throw Error("userDepositedUtxos must not be empty");
|
|
95
|
+
let { originalDeployer: E } = t[i].contractData;
|
|
96
|
+
if (!E) throw Error("missing data");
|
|
97
|
+
let A = await e.getRandomRelay(i, !0);
|
|
98
|
+
if (!A) throw Error(o.RELAYER_NOT_AVAILABLE);
|
|
99
|
+
let M = l().toString(), N = e.generateProofRemotely ? 5 : 1, P = [];
|
|
100
|
+
for (let t = 0; t < f.length; t += N) {
|
|
101
|
+
let r = f.slice(t, t + N), o = await Promise.all(r.map(async ({ recipientAddress: t, utxo: r }, o) => {
|
|
102
|
+
let { compressedAddress: l } = d(n), f = new u({
|
|
111
103
|
amount: 0n,
|
|
112
|
-
mintAddress:
|
|
113
|
-
erc20TokenAddress:
|
|
114
|
-
|
|
115
|
-
timeStamp:
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
mintAddress: w,
|
|
105
|
+
erc20TokenAddress: l,
|
|
106
|
+
nullifyingKey: e.userKeys.getShieldedPrivateKey(),
|
|
107
|
+
timeStamp: M,
|
|
108
|
+
...r.isNewStyle ? {
|
|
109
|
+
spendingPublicKey: e.userKeys.getSpendingKeyPair().pubSpendingBJJPoint,
|
|
110
|
+
isNewStyle: !0
|
|
111
|
+
} : { isNewStyle: !1 }
|
|
112
|
+
}), h = [r, f], _ = [f], v = c.findCorrectRandomization(s(31), e.userKeys.getShieldedPrivateKey()), b = {
|
|
118
113
|
tokenNumber: 1,
|
|
119
|
-
nullifierAmount:
|
|
120
|
-
outputAmount:
|
|
121
|
-
},
|
|
122
|
-
feeToken: d.feeToken,
|
|
123
|
-
flatFee: D,
|
|
124
|
-
variableRate: 0n
|
|
125
|
-
}, M = x(y, i, [S], [p[a]], await e.getEthereumAddress()), { proofAArr: N, proofBArr: P, proofCArr: F, publicInputsArr: I } = await E(e.generateProofRemotely, w, e.merkleTreeHinkalByChain[i], e.merkleTreeAccessTokenByChain[i], e.userKeys, T, [S], [u], [f], m, O.flatFee, O.variableRate, t, k, h, [C], i), L = {
|
|
114
|
+
nullifierAmount: h.length,
|
|
115
|
+
outputAmount: _.length
|
|
116
|
+
}, S = p([_])[0][0], E = Array.from(j.getBytes(S)), O = await T(i, a, g[o], m), k = y(x, i, [w], [g[o]], await e.getEthereumAddress()), [{ proofAArr: N, proofBArr: P, proofCArr: F, publicInputsArr: I }, L] = await Promise.all([D(e.generateProofRemotely, e.merkleTreeHinkalByChain[i], e.userKeys, [w], [h], [_], v, O.flatFee, O.variableRate, t, A, b, [E], i), C(i, e.userKeys, [w], [h])]), R = {
|
|
126
117
|
recipient: t,
|
|
127
|
-
mint:
|
|
118
|
+
mint: w === "11111111111111111111111111111111" ? void 0 : w
|
|
128
119
|
};
|
|
129
120
|
return {
|
|
130
|
-
relayAddress:
|
|
121
|
+
relayAddress: A,
|
|
131
122
|
functionName: "transact",
|
|
132
123
|
chainId: i,
|
|
133
|
-
recipientAmount:
|
|
124
|
+
recipientAmount: g[o].toString(),
|
|
134
125
|
args: {
|
|
135
126
|
proofAArr: N,
|
|
136
127
|
proofBArr: P,
|
|
137
128
|
proofCArr: F,
|
|
138
129
|
publicInputsArr: I,
|
|
139
|
-
encryptedOutputs: [
|
|
130
|
+
encryptedOutputs: [E],
|
|
140
131
|
relayerFee: O.flatFee.toString(),
|
|
141
|
-
dimensions:
|
|
132
|
+
dimensions: b
|
|
142
133
|
},
|
|
143
|
-
accounts:
|
|
144
|
-
adminData:
|
|
134
|
+
accounts: R,
|
|
135
|
+
adminData: k,
|
|
136
|
+
commitmentValidationData: L
|
|
145
137
|
};
|
|
146
138
|
}));
|
|
147
|
-
|
|
139
|
+
P.push(...o);
|
|
148
140
|
}
|
|
149
|
-
await
|
|
150
|
-
id:
|
|
141
|
+
await k({
|
|
142
|
+
id: _,
|
|
151
143
|
chainId: i,
|
|
152
|
-
hashedEthereumAddress:
|
|
144
|
+
hashedEthereumAddress: h,
|
|
153
145
|
phase: r.BEFORE_SCHEDULE_WITHDRAW
|
|
154
146
|
});
|
|
155
|
-
let
|
|
156
|
-
return await
|
|
157
|
-
id:
|
|
147
|
+
let F = await O(i, P, h, v, b, S);
|
|
148
|
+
return await k({
|
|
149
|
+
id: _,
|
|
158
150
|
chainId: i,
|
|
159
|
-
hashedEthereumAddress:
|
|
151
|
+
hashedEthereumAddress: h,
|
|
160
152
|
phase: r.AFTER_SCHEDULE_WITHDRAW,
|
|
161
|
-
scheduleId:
|
|
162
|
-
}),
|
|
163
|
-
},
|
|
164
|
-
let
|
|
165
|
-
return await
|
|
153
|
+
scheduleId: F
|
|
154
|
+
}), F;
|
|
155
|
+
}, R = async (t, n, r, o, s, c, l, u, d) => {
|
|
156
|
+
let p = f([n]), m = n.erc20TokenAddress, h = i(await t.getEthereumAddressByChain(p)), g = d ? a(d) : void 0, _ = c ?? await x(p, m, [m], e.Transact, [], 5n), { userDepositedUtxos: v, depositTxHash: y, statusId: b } = await I(t, p, n, r, o, _, h);
|
|
157
|
+
return await S(t, p, v), await L(t, p, n, v, _, h, r, b, s, l, u, g), y;
|
|
166
158
|
};
|
|
167
159
|
//#endregion
|
|
168
|
-
export {
|
|
160
|
+
export { F as buildMultiPaymentDepositBuilder, P as buildMultiPaymentDepositSetup, R as hinkalSolanaDepositAndWithdraw, L as hinkalSolanaWithdrawBatch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../functions/
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../functions/utils/token-check.utils.cjs`),n=require(`../../functions/utils/getRecipientInfoFromUserKeys.cjs`),r=require(`./hinkalSolanaDeposit.cjs`);var i=async(i,a,o,s,c,l=!1)=>{if(a.length===0)throw Error(`erc20Tokens must not be empty`);if(a.length!==o.length)throw Error(`erc20Tokens and amountChanges length mismatch`);if(!e.isSolanaLike(t.validateAndGetChainId(a)))throw Error(`hinkalSolanaProoflessDepositHash: non-Solana chain`);let u=a[0];if(!a.every(e=>e.erc20TokenAddress===u.erc20TokenAddress))throw Error(`Solana prooflessDeposit supports one mint per transaction`);if(s&&s.length!==o.length)throw Error(`Stealth address structures length mismatch`);return r.submitSolanaProoflessDeposit(i,u,o,s??o.map(()=>n.getStealthAddressStructureFromUserKeys(i.userKeys)),c,l)};exports.hinkalSolanaProoflessDeposit=i;
|
|
@@ -2,4 +2,4 @@ import { StealthAddressStructure } from '../../types/circom-data.types';
|
|
|
2
2
|
import { ERC20Token } from '../../types/token.types';
|
|
3
3
|
import { IHinkal } from './IHinkal';
|
|
4
4
|
import { AdminTransactionType } from '../../types/admin.types';
|
|
5
|
-
export declare const hinkalSolanaProoflessDeposit: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChanges: bigint[], stealthAddressStructuresOverride?: StealthAddressStructure[], action?: AdminTransactionType) => Promise<string>;
|
|
5
|
+
export declare const hinkalSolanaProoflessDeposit: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChanges: bigint[], stealthAddressStructuresOverride?: StealthAddressStructure[], action?: AdminTransactionType, returnTxData?: boolean) => Promise<string>;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { isSolanaLike as e } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { calcStealthAddressStructure as i } from "../../functions/snarkjs/common.snarkjs.mjs";
|
|
6
|
-
import { submitSolanaProoflessDeposit as a } from "./hinkalSolanaDeposit.mjs";
|
|
2
|
+
import { validateAndGetChainId as t } from "../../functions/utils/token-check.utils.mjs";
|
|
3
|
+
import { getStealthAddressStructureFromUserKeys as n } from "../../functions/utils/getRecipientInfoFromUserKeys.mjs";
|
|
4
|
+
import { submitSolanaProoflessDeposit as r } from "./hinkalSolanaDeposit.mjs";
|
|
7
5
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaProoflessDeposit.ts
|
|
8
|
-
var
|
|
9
|
-
if (
|
|
10
|
-
if (
|
|
11
|
-
if (!e(
|
|
12
|
-
let
|
|
13
|
-
if (!
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
let e = o.userKeys.getShieldedPrivateKey();
|
|
17
|
-
return i(n.findCorrectRandomization(t(31), e), e);
|
|
18
|
-
}), u);
|
|
6
|
+
var i = async (i, a, o, s, c, l = !1) => {
|
|
7
|
+
if (a.length === 0) throw Error("erc20Tokens must not be empty");
|
|
8
|
+
if (a.length !== o.length) throw Error("erc20Tokens and amountChanges length mismatch");
|
|
9
|
+
if (!e(t(a))) throw Error("hinkalSolanaProoflessDepositHash: non-Solana chain");
|
|
10
|
+
let u = a[0];
|
|
11
|
+
if (!a.every((e) => e.erc20TokenAddress === u.erc20TokenAddress)) throw Error("Solana prooflessDeposit supports one mint per transaction");
|
|
12
|
+
if (s && s.length !== o.length) throw Error("Stealth address structures length mismatch");
|
|
13
|
+
return r(i, u, o, s ?? o.map(() => n(i.userKeys)), c, l);
|
|
19
14
|
};
|
|
20
15
|
//#endregion
|
|
21
|
-
export {
|
|
16
|
+
export { i as hinkalSolanaProoflessDeposit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../functions/utils/addresses.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../../API/admin-calls.cjs`),i=require(`../../functions/
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`);require(`../../constants/protocol.constants.cjs`);const t=require(`../../functions/utils/addresses.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`../../API/admin-calls.cjs`),i=require(`../../functions/utils/solanaMint.utils.cjs`),a=require(`../../functions/utils/token-check.utils.cjs`),o=require(`../../functions/pre-transaction/solana.cjs`),s=require(`../../functions/utils/create-provider.cjs`),c=require(`../../functions/pre-transaction/constructAdminData.cjs`),l=require(`../AccountActions/AccountActions.cjs`),u=require(`../../functions/pre-transaction/sendV0Transaction.cjs`);let d=require(`@solana/web3.js`),f=require(`@coral-xyz/anchor`),p=require(`@solana/spl-token`);var m=async({program:e,mintPublicKey:t,mintAddressString:n,tokenAmount:r,anchorStealthStructure:i,senderPublickey:a,originalDeployer:o,storageAccount:s,storageVault:c})=>{let l=new f.BN(r.toString()),u=n===`11111111111111111111111111111111`?null:t,d=n===`11111111111111111111111111111111`?null:void 0;return e.methods.prooflessDeposit(l,i).accounts({mint:u,signer:a,signerAta:d,originalDeployer:o,storageAccount:s,storageVault:c,storageVaultAta:d}).instruction()},h=async(r,a,c,u,f,h)=>{let g=h??r.getRecipientInfo();if(!t.isValidPrivateAddress(g))throw Error(n.transactionErrorCodes.RECIPIENT_FORMAT_INCORRECT);let _=l.AccountActions.getAddressFromSubAccount(a,f);if(!_)throw Error(`Public account address is not available`);let{hinkalIdl:v,hinkalAddress:y,originalDeployer:b}=e.networkRegistry[a].contractData;if(!v)throw Error(`No IDL configured for Solana program on this network`);if(!b)throw Error(`missing original deployer`);let x=r.getSolanaProgram(v),S=new d.PublicKey(b),C=new d.PublicKey(y),w=new d.PublicKey(_),{erc20TokenAddress:T}=c,{fetchRpcUrl:E}=e.networkRegistry[a];if(!E)throw Error(`RPC URL not found for the specified chain ID`);let D=s.createCustomSolanaConnection(E),{mintPublicKey:O}=i.formatMintAddress(T),k=O.toString(),A=o.getStorageAccountPublicKey(C,S),j=o.getStorageVaultPublicKey(C,S),M=await m({program:x,mintPublicKey:O,mintAddressString:k,tokenAmount:u,anchorStealthStructure:o.buildAnchorStealthAddressStructure(t.constructStealthAddressStructure(g)),senderPublickey:w,originalDeployer:S,storageAccount:A,storageVault:j}),N=c.is2022Program?p.TOKEN_2022_PROGRAM_ID:p.TOKEN_PROGRAM_ID;return{connection:D,senderAddress:_,senderPublickey:w,instructions:[M],storageAccount:A,programId:N}},g=async(e,t,n,i,o,s)=>{if(!i)throw Error(`subAccount is required`);let l=a.validateAndGetChainId([t]),[{connection:d,senderPublickey:f,instructions:p},m]=await Promise.all([h(e,l,t,n,i,o),e.getEthereumAddress()]),g=await u.sendProxyV0Transaction({connection:d,chainId:l,subAccount:i,payerPublicKey:f,instructions:p});return r.emitTxPublicData(c.constructAdminData(s,l,[t.erc20TokenAddress],[n],m)),g},_=async(e,t,n,r,i)=>{let{connection:o,senderPublickey:s,instructions:c}=await h(e,a.validateAndGetChainId([t]),t,n,r,i);return u.serializeProxyV0Transaction(o,s,c)};exports.getSolanaProxyShieldSerializedTransaction=_,exports.hinkalSolanaProxyShield=g;
|
|
@@ -3,51 +3,49 @@ import "../../constants/protocol.constants.mjs";
|
|
|
3
3
|
import { constructStealthAddressStructure as t, isValidPrivateAddress as n } from "../../functions/utils/addresses.mjs";
|
|
4
4
|
import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
|
|
5
5
|
import { emitTxPublicData as i } from "../../API/admin-calls.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { createCustomSolanaConnection as
|
|
10
|
-
import { constructAdminData as
|
|
11
|
-
import { AccountActions as
|
|
12
|
-
import { sendProxyV0Transaction as
|
|
13
|
-
import { PublicKey as
|
|
14
|
-
import { BN as
|
|
15
|
-
import { TOKEN_2022_PROGRAM_ID as
|
|
6
|
+
import { formatMintAddress as a } from "../../functions/utils/solanaMint.utils.mjs";
|
|
7
|
+
import { validateAndGetChainId as o } from "../../functions/utils/token-check.utils.mjs";
|
|
8
|
+
import { buildAnchorStealthAddressStructure as s, getStorageAccountPublicKey as c, getStorageVaultPublicKey as l } from "../../functions/pre-transaction/solana.mjs";
|
|
9
|
+
import { createCustomSolanaConnection as u } from "../../functions/utils/create-provider.mjs";
|
|
10
|
+
import { constructAdminData as d } from "../../functions/pre-transaction/constructAdminData.mjs";
|
|
11
|
+
import { AccountActions as f } from "../AccountActions/AccountActions.mjs";
|
|
12
|
+
import { sendProxyV0Transaction as p, serializeProxyV0Transaction as m } from "../../functions/pre-transaction/sendV0Transaction.mjs";
|
|
13
|
+
import { PublicKey as h } from "@solana/web3.js";
|
|
14
|
+
import { BN as g } from "@coral-xyz/anchor";
|
|
15
|
+
import { TOKEN_2022_PROGRAM_ID as _, TOKEN_PROGRAM_ID as v } from "@solana/spl-token";
|
|
16
16
|
//#region libs/shared/common/src/data-structures/Hinkal/hinkalSolanaProxyShield.ts
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
return e.methods.prooflessDeposit(
|
|
20
|
-
mint:
|
|
17
|
+
var y = async ({ program: e, mintPublicKey: t, mintAddressString: n, tokenAmount: r, anchorStealthStructure: i, senderPublickey: a, originalDeployer: o, storageAccount: s, storageVault: c }) => {
|
|
18
|
+
let l = new g(r.toString()), u = n === "11111111111111111111111111111111" ? null : t, d = n === "11111111111111111111111111111111" ? null : void 0;
|
|
19
|
+
return e.methods.prooflessDeposit(l, i).accounts({
|
|
20
|
+
mint: u,
|
|
21
21
|
signer: a,
|
|
22
|
-
signerAta:
|
|
22
|
+
signerAta: d,
|
|
23
23
|
originalDeployer: o,
|
|
24
24
|
storageAccount: s,
|
|
25
|
-
storageVault:
|
|
26
|
-
|
|
27
|
-
storageVaultAta: p,
|
|
28
|
-
accessTokenOwner: null
|
|
25
|
+
storageVault: c,
|
|
26
|
+
storageVaultAta: d
|
|
29
27
|
}).instruction();
|
|
30
|
-
},
|
|
31
|
-
let
|
|
32
|
-
if (!n(
|
|
33
|
-
let x =
|
|
28
|
+
}, b = async (i, o, d, p, m, g) => {
|
|
29
|
+
let b = g ?? i.getRecipientInfo();
|
|
30
|
+
if (!n(b)) throw Error(r.RECIPIENT_FORMAT_INCORRECT);
|
|
31
|
+
let x = f.getAddressFromSubAccount(o, m);
|
|
34
32
|
if (!x) throw Error("Public account address is not available");
|
|
35
|
-
let { hinkalIdl: S, hinkalAddress: C, originalDeployer: w } = e[
|
|
33
|
+
let { hinkalIdl: S, hinkalAddress: C, originalDeployer: w } = e[o].contractData;
|
|
36
34
|
if (!S) throw Error("No IDL configured for Solana program on this network");
|
|
37
35
|
if (!w) throw Error("missing original deployer");
|
|
38
|
-
let T = i.getSolanaProgram(S), E = new
|
|
36
|
+
let T = i.getSolanaProgram(S), E = new h(w), D = new h(C), O = new h(x), { erc20TokenAddress: k } = d, { fetchRpcUrl: A } = e[o];
|
|
39
37
|
if (!A) throw Error("RPC URL not found for the specified chain ID");
|
|
40
|
-
let j =
|
|
38
|
+
let j = u(A), { mintPublicKey: M } = a(k), N = M.toString(), P = c(D, E), F = l(D, E), I = await y({
|
|
41
39
|
program: T,
|
|
42
40
|
mintPublicKey: M,
|
|
43
41
|
mintAddressString: N,
|
|
44
|
-
tokenAmount:
|
|
45
|
-
anchorStealthStructure:
|
|
42
|
+
tokenAmount: p,
|
|
43
|
+
anchorStealthStructure: s(t(b)),
|
|
46
44
|
senderPublickey: O,
|
|
47
45
|
originalDeployer: E,
|
|
48
46
|
storageAccount: P,
|
|
49
47
|
storageVault: F
|
|
50
|
-
}), L =
|
|
48
|
+
}), L = d.is2022Program ? _ : v;
|
|
51
49
|
return {
|
|
52
50
|
connection: j,
|
|
53
51
|
senderAddress: x,
|
|
@@ -56,19 +54,19 @@ var b = async ({ program: e, mintPublicKey: t, mintAddressString: n, tokenAmount
|
|
|
56
54
|
storageAccount: P,
|
|
57
55
|
programId: L
|
|
58
56
|
};
|
|
59
|
-
},
|
|
57
|
+
}, x = async (e, t, n, r, a, s) => {
|
|
60
58
|
if (!r) throw Error("subAccount is required");
|
|
61
|
-
let
|
|
62
|
-
connection:
|
|
63
|
-
chainId:
|
|
59
|
+
let c = o([t]), [{ connection: l, senderPublickey: u, instructions: f }, m] = await Promise.all([b(e, c, t, n, r, a), e.getEthereumAddress()]), h = await p({
|
|
60
|
+
connection: l,
|
|
61
|
+
chainId: c,
|
|
64
62
|
subAccount: r,
|
|
65
|
-
payerPublicKey:
|
|
66
|
-
instructions:
|
|
63
|
+
payerPublicKey: u,
|
|
64
|
+
instructions: f
|
|
67
65
|
});
|
|
68
|
-
return i(
|
|
69
|
-
},
|
|
70
|
-
let { connection: a, senderPublickey:
|
|
71
|
-
return
|
|
66
|
+
return i(d(s, c, [t.erc20TokenAddress], [n], m)), h;
|
|
67
|
+
}, S = async (e, t, n, r, i) => {
|
|
68
|
+
let { connection: a, senderPublickey: s, instructions: c } = await b(e, o([t]), t, n, r, i);
|
|
69
|
+
return m(a, s, c);
|
|
72
70
|
};
|
|
73
71
|
//#endregion
|
|
74
|
-
export {
|
|
72
|
+
export { S as getSolanaProxyShieldSerializedTransaction, x as hinkalSolanaProxyShield };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/external-action.types.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../../
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/external-action.types.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`);require(`../../constants/index.cjs`);const r=require(`../../API/admin-calls.cjs`),i=require(`../../functions/utils/token-check.utils.cjs`),a=require(`../../functions/utils/create-provider.cjs`),o=require(`../../functions/pre-transaction/constructAdminData.cjs`),s=require(`../AccountActions/AccountActions.cjs`),c=require(`../../functions/pre-transaction/sendV0Transaction.cjs`),l=require(`../../functions/pre-transaction/getFeeStructure.cjs`),u=require(`../../functions/pre-transaction/solanaTransfer.utils.cjs`);require(`../AccountActions/index.cjs`);let d=require(`@solana/web3.js`);var f=async(e,t)=>{let{addressLookupTableAccount:n,instructionLists:r}=JSON.parse(t).data,i=await Promise.all(n.map(async t=>{let n=await e.getAddressLookupTable(new d.PublicKey(t));if(!n.value)throw Error(`Failed to fetch lookup table: ${t}`);return n.value}));if(r.length===0)throw Error(`No instructions found`);return{instructions:r.map(e=>new d.TransactionInstruction({keys:e.accounts.map(e=>({pubkey:new d.PublicKey(e.pubkey),isSigner:e.isSigner,isWritable:e.isWritable})),programId:new d.PublicKey(e.programId),data:Buffer.from(e.data,`base64`)})),lookupTableAccounts:i}},p=async(e,t)=>{let n=d.VersionedTransaction.deserialize(Buffer.from(t,`base64`)),r=await Promise.all(n.message.addressTableLookups.map(async({accountKey:t})=>{let n=await e.getAddressLookupTable(t);if(!n.value)throw Error(`Failed to fetch lookup table: ${t.toBase58()}`);return n.value})),{instructions:i}=d.TransactionMessage.decompile(n.message,{addressLookupTableAccounts:r});return{instructions:i,lookupTableAccounts:r}},m=async(n,r,i,o)=>{let c=s.AccountActions.getAddressFromSubAccount(n,i);if(!c)throw Error(`Public account address is not available`);let{fetchRpcUrl:l}=t.networkRegistry[n];if(!l)throw Error(`RPC URL not found for the specified chain ID`);let u=a.createCustomSolanaConnection(l),m=new d.PublicKey(c),{instructions:h,lookupTableAccounts:g}=o===e.ExternalActionId.Lifi?await p(u,r):await f(u,r);return{connection:u,walletPublicKey:m,instructions:h,lookupTableAccounts:g}},h=async(t,a,s,f,p,h,g,_,v)=>{let y=i.validateAndGetChainId(a),b=h===e.ExternalActionId.Lifi,[{connection:x,walletPublicKey:S,instructions:C,lookupTableAccounts:w},T,E]=await Promise.all([m(y,f,p,h),b?Promise.resolve(null):t.getRandomRelay(y),t.getEthereumAddressByChain(y)]),D=C;if(!b){if(!T)throw Error(n.transactionErrorCodes.RELAYER_NOT_AVAILABLE);let t=a[1],r=s[1]*(_??await l.getFeeStructure(y,g,a.map(e=>e.erc20TokenAddress),e.ExternalActionId.Emporium)).variableRate/10000n,{instructions:i}=await u.buildSolanaTransferInstructions(x,S,new d.PublicKey(T),t,r);D=[...C,...i]}let O=await c.sendProxyV0Transaction({connection:x,chainId:y,subAccount:p,payerPublicKey:S,instructions:D,lookupTableAccounts:w});return r.emitTxPublicData(o.constructAdminData(v,y,a.map(e=>e.erc20TokenAddress),s,E,a)),O},g=async(t,n,r,i)=>{if(i===e.ExternalActionId.Lifi)return n;let{connection:a,walletPublicKey:o,instructions:s,lookupTableAccounts:l}=await m(t,n,r,i);return c.serializeProxyV0Transaction(a,o,s,l)};exports.getSolanaProxySwapSerializedTransaction=g,exports.hinkalSolanaProxySwap=h;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ERC20Token, SubAccount } from '../../types';
|
|
1
|
+
import { AdminTransactionType, ERC20Token, SubAccount } from '../../types';
|
|
2
2
|
import { IHinkal } from './IHinkal';
|
|
3
3
|
import { FeeStructure } from '../../types/hinkal.types';
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
4
|
+
import { ExternalActionId } from '../../types/external-action.types';
|
|
5
|
+
export declare const hinkalSolanaProxySwap: (hinkal: IHinkal, erc20Tokens: ERC20Token[], amountChanges: bigint[], data: string, subAccount: SubAccount, externalActionId: ExternalActionId, feeToken?: string, feeStructureOverride?: FeeStructure, action?: AdminTransactionType) => Promise<string>;
|
|
6
|
+
export declare const getSolanaProxySwapSerializedTransaction: (chainId: number, data: string, subAccount: SubAccount, externalActionId: ExternalActionId) => Promise<string>;
|