@hinkal/common 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/src/API/API.cjs +1 -1
- package/common/src/API/API.d.ts +9 -34
- package/common/src/API/API.mjs +75 -100
- package/common/src/API/callOneInchAPI.cjs +1 -1
- package/common/src/API/callOneInchAPI.d.ts +6 -0
- package/common/src/API/callOneInchAPI.mjs +5 -2
- package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
- package/common/src/API/dashboardAccountMemberCalls.d.ts +15 -0
- package/common/src/API/dashboardAccountMemberCalls.mjs +5 -2
- package/common/src/API/dashboardPayoutCalls.cjs +1 -1
- package/common/src/API/dashboardPayoutCalls.d.ts +2 -1
- package/common/src/API/dashboardPayoutCalls.mjs +4 -1
- package/common/src/API/enclaveUtxoCalls.d.ts +9 -1
- package/common/src/API/getWebsiteURL.d.ts +1 -2
- package/common/src/API/index.cjs +1 -1
- package/common/src/API/index.d.ts +1 -2
- package/common/src/API/index.mjs +2 -3
- package/common/src/API/payoutNotificationStateCalls.cjs +1 -0
- package/common/src/API/payoutNotificationStateCalls.d.ts +10 -0
- package/common/src/API/payoutNotificationStateCalls.mjs +10 -0
- package/common/src/API/proxyAccountsCalls.cjs +1 -1
- package/common/src/API/proxyAccountsCalls.d.ts +2 -3
- package/common/src/API/proxyAccountsCalls.mjs +11 -10
- package/common/src/API/rewardsUserCalls.cjs +1 -1
- package/common/src/API/rewardsUserCalls.d.ts +1 -38
- package/common/src/API/rewardsUserCalls.mjs +2 -9
- package/common/src/API/scheduled-transactions-calls.d.ts +1 -0
- package/common/src/API/temporaryWalletCalls.cjs +1 -1
- package/common/src/API/temporaryWalletCalls.mjs +8 -8
- package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
- package/common/src/API/weeklyAnalyticCalls.d.ts +1 -11
- package/common/src/API/weeklyAnalyticCalls.mjs +2 -5
- package/common/src/constants/chains.constants.cjs +1 -1
- package/common/src/constants/chains.constants.mjs +3 -10
- package/common/src/constants/contracts.constants.cjs +1 -1
- package/common/src/constants/contracts.constants.mjs +19 -32
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-arbMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-base.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-base.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-ethMainnet.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimism.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-optimismTest.json.mjs +8 -9
- package/common/src/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
- package/common/src/constants/deploy-data/deploy-data-polygon.json.mjs +8 -9
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-evm.json.mjs +19 -45
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-solana.json.mjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.cjs +1 -1
- package/common/src/constants/deploy-data/shared-deploy-data-tron.json.mjs +7 -18
- package/common/src/constants/enclaveAuth.constants.d.ts +5 -0
- package/common/src/constants/index.cjs +1 -1
- package/common/src/constants/index.d.ts +1 -2
- package/common/src/constants/index.mjs +0 -1
- package/common/src/constants/mediaUrls.constants.d.ts +0 -1
- package/common/src/constants/pay.constants.d.ts +1 -0
- package/common/src/constants/protocol.constants.cjs +2 -1
- package/common/src/constants/protocol.constants.d.ts +7 -5
- package/common/src/constants/protocol.constants.mjs +4 -11
- package/common/src/constants/rewards.constants.d.ts +0 -13
- package/common/src/constants/server.constants.cjs +1 -1
- package/common/src/constants/server.constants.d.ts +5 -28
- package/common/src/constants/server.constants.mjs +10 -41
- package/common/src/crypto/ecdh.cjs +1 -1
- package/common/src/crypto/ecdh.mjs +2 -9
- package/common/src/crypto/index.cjs +1 -1
- package/common/src/crypto/index.mjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/common/src/data-structures/Hinkal/Hinkal.d.ts +4 -8
- package/common/src/data-structures/Hinkal/Hinkal.mjs +83 -99
- package/common/src/data-structures/Hinkal/IHinkal.d.ts +5 -9
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +22 -22
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalBridgePrivateToPrivate.mjs +21 -21
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +6 -9
- package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +4 -7
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +64 -66
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +47 -51
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +33 -43
- package/common/src/data-structures/Hinkal/hinkalPalEvmDeposit.d.ts +1 -1
- package/common/src/data-structures/Hinkal/hinkalPalTronDepositPrepare.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +6 -6
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +2 -2
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.mjs +107 -94
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.d.ts +3 -0
- package/common/src/data-structures/Hinkal/hinkalProoflessDeposit.utils.mjs +26 -14
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalProxyToPrivate.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +4 -9
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +26 -32
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +43 -42
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +4 -4
- package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +6 -6
- package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +22 -26
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +21 -24
- package/common/src/data-structures/Hinkal/index.d.ts +0 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +4 -4
- package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/activity-db.mjs +34 -34
- package/common/src/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/contact-db.d.ts +0 -1
- package/common/src/data-structures/IndexedDB/contact-db.mjs +14 -28
- package/common/src/data-structures/IndexedDB/key-val-store.cjs +1 -1
- package/common/src/data-structures/IndexedDB/key-val-store.d.ts +2 -0
- package/common/src/data-structures/IndexedDB/key-val-store.mjs +14 -0
- package/common/src/data-structures/IndexedDB/private-balances-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/private-balances-db.d.ts +1 -0
- package/common/src/data-structures/IndexedDB/private-balances-db.mjs +3 -0
- package/common/src/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/common/src/data-structures/IndexedDB/signatures-db.mjs +11 -11
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
- package/common/src/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +25 -25
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +12 -12
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +12 -12
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +24 -24
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +14 -14
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.cjs +1 -1
- package/common/src/data-structures/TokenDBs/TronPublicTokensDB.mjs +14 -14
- package/common/src/data-structures/WalletManager/WalletManager.d.ts +1 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.d.ts +1 -0
- package/common/src/data-structures/cacheDevices/BaseCacheDevice.mjs +3 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
- package/common/src/data-structures/cacheDevices/FileCacheDevice.d.ts +3 -0
- package/common/src/data-structures/cacheDevices/FileCacheDevice.mjs +12 -3
- package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
- package/common/src/data-structures/crypto-keys/decodeUTXO.d.ts +8 -9
- package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +38 -48
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +2 -3
- package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +26 -22
- package/common/src/data-structures/crypto-keys/keys.cjs +1 -1
- package/common/src/data-structures/crypto-keys/keys.d.ts +12 -27
- package/common/src/data-structures/crypto-keys/keys.mjs +61 -79
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +1 -2
- package/common/src/data-structures/event-service/evm/BlockchainEventEmitter.mjs +4 -10
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +1 -1
- package/common/src/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +2 -2
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.cjs +1 -1
- package/common/src/data-structures/private-balances/HinkalPrivateBalanceController.mjs +40 -40
- package/common/src/data-structures/provider-adapter/IProviderAdapter.d.ts +0 -1
- package/common/src/data-structures/utxo/Utxo.cjs +1 -1
- package/common/src/data-structures/utxo/Utxo.d.ts +1 -4
- package/common/src/data-structures/utxo/Utxo.mjs +7 -17
- package/common/src/error-handling/error-codes.constants.cjs +2 -2
- package/common/src/error-handling/error-codes.constants.d.ts +0 -3
- package/common/src/error-handling/error-codes.constants.mjs +13 -18
- package/common/src/error-handling/index.cjs +1 -1
- package/common/src/error-handling/index.d.ts +1 -0
- package/common/src/error-handling/index.mjs +1 -0
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
- package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +8 -8
- package/common/src/functions/index.cjs +1 -1
- package/common/src/functions/index.mjs +1 -1
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.cjs +1 -1
- package/common/src/functions/pre-transaction/buildCommitmentValidationData.mjs +36 -38
- package/common/src/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
- package/common/src/functions/pre-transaction/outputUtxoProcessing.mjs +3 -5
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.cjs +1 -1
- package/common/src/functions/pre-transaction/recipientUtxoProcessing.mjs +3 -5
- package/common/src/functions/pre-transaction/solana-public-signals.d.ts +1 -0
- package/common/src/functions/pre-transaction/solana.cjs +1 -1
- package/common/src/functions/pre-transaction/solana.mjs +5 -4
- package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.helpers.d.ts +1 -2
- package/common/src/functions/private-wallet/emporium.helpers.mjs +83 -57
- package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +19 -19
- package/common/src/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/common/src/functions/snarkjs/common.snarkjs.d.ts +2 -3
- package/common/src/functions/snarkjs/common.snarkjs.mjs +45 -47
- package/common/src/functions/snarkjs/constant.cjs +1 -1
- package/common/src/functions/snarkjs/constant.d.ts +151 -144
- package/common/src/functions/snarkjs/constant.mjs +151 -145
- package/common/src/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.d.ts +1 -1
- package/common/src/functions/snarkjs/constructGeneralZkProof.mjs +59 -60
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.cjs +1 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.d.ts +7 -0
- package/common/src/functions/snarkjs/constructSignatureFromMnemonicProofInput.mjs +2 -0
- package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +54 -58
- package/common/src/functions/snarkjs/fetchMerkleTreeSiblings.d.ts +1 -3
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.d.ts +1 -0
- package/common/src/functions/snarkjs/fetchOnChainRootHashes.mjs +14 -5
- package/common/src/functions/snarkjs/generateCircomData.cjs +1 -1
- package/common/src/functions/snarkjs/generateCircomData.d.ts +1 -1
- package/common/src/functions/snarkjs/generateCircomData.mjs +35 -31
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.cjs +1 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.d.ts +2 -0
- package/common/src/functions/snarkjs/generateSignatureFromMnemonicProof.mjs +3 -0
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.d.ts +2 -0
- package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +18 -12
- package/common/src/functions/snarkjs/getZKFiles.cjs +1 -1
- package/common/src/functions/snarkjs/getZKFiles.mjs +9 -3
- package/common/src/functions/snarkjs/index.cjs +1 -1
- package/common/src/functions/snarkjs/index.d.ts +2 -0
- package/common/src/functions/snarkjs/index.mjs +2 -0
- package/common/src/functions/snarkjs/signedMessageHash.cjs +1 -1
- package/common/src/functions/snarkjs/signedMessageHash.d.ts +1 -0
- package/common/src/functions/snarkjs/signedMessageHash.mjs +2 -0
- package/common/src/functions/utils/addresses.cjs +1 -1
- package/common/src/functions/utils/addresses.d.ts +0 -1
- package/common/src/functions/utils/addresses.mjs +10 -13
- package/common/src/functions/utils/bridge-flow.utils.d.ts +1 -1
- package/common/src/functions/utils/buildClaimableDepositPlan.d.ts +1 -0
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -1
- package/common/src/functions/utils/convertEmporiumOpToCallInfo.mjs +5 -10
- package/common/src/functions/utils/enclave-utxo-storage.d.ts +3 -0
- package/common/src/functions/utils/enclaveSessionSigning.cjs +1 -0
- package/common/src/functions/utils/enclaveSessionSigning.d.ts +16 -0
- package/common/src/functions/utils/enclaveSessionSigning.mjs +2 -0
- package/common/src/functions/utils/encodeTokenWithId.cjs +1 -1
- package/common/src/functions/utils/encodeTokenWithId.d.ts +1 -2
- package/common/src/functions/utils/encodeTokenWithId.mjs +2 -5
- package/common/src/functions/utils/fees.utils.cjs +1 -1
- package/common/src/functions/utils/fees.utils.d.ts +1 -0
- package/common/src/functions/utils/fees.utils.mjs +5 -1
- package/common/src/functions/utils/getDataFromTransaction.d.ts +4 -3
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
- package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +2 -3
- package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
- package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +16 -18
- package/common/src/functions/utils/index.cjs +1 -1
- package/common/src/functions/utils/index.d.ts +5 -1
- package/common/src/functions/utils/index.mjs +5 -1
- package/common/src/functions/utils/legacyKeys.cjs +1 -0
- package/common/src/functions/utils/legacyKeys.d.ts +10 -0
- package/common/src/functions/utils/legacyKeys.mjs +8 -0
- package/common/src/functions/utils/mnemonics.cjs +1 -1
- package/common/src/functions/utils/mnemonics.mjs +4 -6
- package/common/src/functions/utils/nearIntents.utils.cjs +1 -1
- package/common/src/functions/utils/nearIntents.utils.mjs +1 -1
- package/common/src/functions/utils/networks.utils.d.ts +1 -0
- package/common/src/functions/utils/prepareHinkal.cjs +1 -1
- package/common/src/functions/utils/prepareHinkal.d.ts +1 -3
- package/common/src/functions/utils/prepareHinkal.mjs +2 -1
- package/common/src/functions/utils/resolve-domain-address.cjs +1 -0
- package/common/src/functions/utils/resolve-domain-address.d.ts +4 -0
- package/common/src/functions/utils/resolve-domain-address.mjs +3 -0
- package/common/src/functions/utils/serialize-utxos.utils.cjs +1 -1
- package/common/src/functions/utils/serialize-utxos.utils.mjs +6 -4
- package/common/src/functions/utils/tron.utils.cjs +1 -1
- package/common/src/functions/utils/tron.utils.d.ts +1 -1
- package/common/src/functions/utils/tron.utils.mjs +14 -29
- package/common/src/functions/utils/validateWalletAddress.cjs +1 -0
- package/common/src/functions/utils/validateWalletAddress.d.ts +1 -0
- package/common/src/functions/utils/validateWalletAddress.mjs +2 -0
- package/common/src/functions/utils/voidWallets.utils.cjs +1 -0
- package/common/src/functions/utils/voidWallets.utils.d.ts +4 -0
- package/common/src/functions/utils/voidWallets.utils.mjs +1 -0
- package/common/src/functions/web3/etherFunctions.d.ts +1 -0
- package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/common/src/functions/web3/events/getInputUtxoAndBalance.d.ts +2 -4
- package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +9 -16
- package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.d.ts +1 -1
- package/common/src/functions/web3/events/getShieldedBalance.mjs +21 -29
- package/common/src/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/common/src/functions/web3/functionCalls/approveToken.d.ts +1 -1
- package/common/src/functions/web3/functionCalls/approveToken.mjs +21 -107
- package/common/src/functions/web3/functionCalls/constructBatchCall.cjs +1 -1
- package/common/src/functions/web3/functionCalls/constructBatchCall.d.ts +2 -2
- package/common/src/functions/web3/functionCalls/constructBatchCall.mjs +23 -18
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.cjs +1 -1
- package/common/src/functions/web3/functionCalls/transactCallDirectTron.mjs +37 -3
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.cjs +1 -1
- package/common/src/functions/web3/functionCalls/waitForErc20Approvals.mjs +6 -6
- package/common/src/functions/web3/oneInchAPI.cjs +1 -1
- package/common/src/functions/web3/oneInchAPI.mjs +31 -21
- package/common/src/functions/web3/uniswapAPI.cjs +1 -1
- package/common/src/functions/web3/uniswapAPI.mjs +6 -6
- package/common/src/providers/EthersProviderAdapter.cjs +1 -1
- package/common/src/providers/EthersProviderAdapter.d.ts +0 -1
- package/common/src/providers/EthersProviderAdapter.mjs +0 -3
- package/common/src/providers/SolanaProviderAdapter.cjs +1 -1
- package/common/src/providers/SolanaProviderAdapter.d.ts +0 -1
- package/common/src/providers/SolanaProviderAdapter.mjs +0 -3
- package/common/src/providers/TronProviderAdapter.cjs +1 -1
- package/common/src/providers/TronProviderAdapter.d.ts +0 -1
- package/common/src/providers/TronProviderAdapter.mjs +0 -3
- package/common/src/providers/WagmiProviderAdapter.cjs +1 -1
- package/common/src/providers/WagmiProviderAdapter.d.ts +0 -1
- package/common/src/providers/WagmiProviderAdapter.mjs +5 -9
- package/common/src/types/API.types.d.ts +0 -4
- package/common/src/types/WeeklyAnalytics.types.d.ts +1 -26
- package/common/src/types/cache.types.cjs +1 -1
- package/common/src/types/cache.types.d.ts +2 -2
- package/common/src/types/cache.types.mjs +1 -1
- package/common/src/types/circom-data.types.cjs +1 -1
- package/common/src/types/circom-data.types.d.ts +26 -27
- package/common/src/types/circom-data.types.mjs +1 -1
- package/common/src/types/dashboard-account.d.ts +15 -0
- package/common/src/types/dashboard-payout.types.d.ts +1 -0
- package/common/src/types/enclaveApi.types.d.ts +78 -0
- package/common/src/types/ethereum-network.types.cjs +1 -1
- package/common/src/types/ethereum-network.types.d.ts +13 -23
- package/common/src/types/ethereum-network.types.mjs +1 -1
- package/common/src/types/external-action.types.cjs +1 -1
- package/common/src/types/external-action.types.d.ts +2 -3
- package/common/src/types/external-action.types.mjs +1 -1
- package/common/src/types/hinkal.types.cjs +1 -1
- package/common/src/types/hinkal.types.d.ts +8 -22
- package/common/src/types/hinkal.types.mjs +11 -19
- package/common/src/types/index.cjs +1 -1
- package/common/src/types/index.d.ts +3 -5
- package/common/src/types/index.mjs +0 -1
- package/common/src/types/new-rewards.type.d.ts +0 -70
- package/common/src/types/payout-notification.types.d.ts +11 -0
- package/common/src/types/proxy-progress.types.d.ts +5 -0
- package/common/src/types/snark.types.d.ts +1 -3
- package/common/src/types/token.types.cjs +1 -1
- package/common/src/types/token.types.mjs +1 -3
- package/common/src/types/transaction.types.d.ts +0 -1
- package/common/src/types/transactions.types.d.ts +0 -1
- package/common/src/webworker/logError-uy41lNp1.js +2 -0
- package/common/src/webworker/package.json +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/snarkjsWorkerNode.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/utxoWorkerNode.cjs +1 -1
- package/common/src/webworker/viteWorkerURL.constant.cjs +3 -3
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/common/src/webworker/workerProxy-MheXtWa4.js +1 -0
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
- package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
- package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
- package/package.json +1 -1
- package/services/Hinkal.cjs +1 -1
- package/services/Hinkal.d.ts +1 -2
- package/services/Hinkal.mjs +4 -7
- package/types/IHinkal.d.ts +1 -2
- package/common/src/API/accessCodeCalls.cjs +0 -1
- package/common/src/API/accessCodeCalls.d.ts +0 -23
- package/common/src/API/accessCodeCalls.mjs +0 -13
- package/common/src/API/brotherhoodCalls.cjs +0 -1
- package/common/src/API/brotherhoodCalls.d.ts +0 -82
- package/common/src/API/brotherhoodCalls.mjs +0 -17
- package/common/src/API/generate-trading-points.cjs +0 -1
- package/common/src/API/generate-trading-points.d.ts +0 -27
- package/common/src/API/generate-trading-points.mjs +0 -23
- package/common/src/API/leaderboardCalls.cjs +0 -1
- package/common/src/API/leaderboardCalls.d.ts +0 -14
- package/common/src/API/leaderboardCalls.mjs +0 -8
- package/common/src/API/referralsCalls.cjs +0 -1
- package/common/src/API/referralsCalls.d.ts +0 -22
- package/common/src/API/referralsCalls.mjs +0 -11
- package/common/src/API/send-telegram-callback.cjs +0 -1
- package/common/src/API/send-telegram-callback.d.ts +0 -7
- package/common/src/API/send-telegram-callback.mjs +0 -11
- package/common/src/constants/mystery-boxes.constants.d.ts +0 -0
- package/common/src/constants/price-impact.constants.d.ts +0 -2
- package/common/src/constants/tasks.constants.cjs +0 -1
- package/common/src/constants/tasks.constants.d.ts +0 -9
- package/common/src/constants/tasks.constants.mjs +0 -124
- package/common/src/data-structures/Hinkal/hinkalMultiSend.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalMultiSend.d.ts +0 -3
- package/common/src/data-structures/Hinkal/hinkalMultiSend.mjs +0 -12
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.cjs +0 -1
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.d.ts +0 -6
- package/common/src/data-structures/Hinkal/hinkalProoflessDepositViaWrapper.mjs +0 -128
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.cjs +0 -1
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.d.ts +0 -22
- package/common/src/data-structures/Hinkal/prepareDepositOnChainUtxosZkProof.mjs +0 -34
- package/common/src/functions/utils/bit.operations.cjs +0 -1
- package/common/src/functions/utils/bit.operations.d.ts +0 -3
- package/common/src/functions/utils/bit.operations.mjs +0 -4
- package/common/src/types/brotherhood-user.types.d.ts +0 -11
- package/common/src/types/crypto.types.d.ts +0 -8
- package/common/src/types/generatePoints.d.ts +0 -14
- package/common/src/types/new-rewards.type.cjs +0 -1
- package/common/src/types/new-rewards.type.mjs +0 -10
- package/common/src/types/referral.types.d.ts +0 -12
- package/common/src/types/rewards.types.d.ts +0 -34
- package/common/src/types/token-with-id.types.d.ts +0 -4
- package/common/src/webworker/logError-BR5TJP6T.js +0 -2
- package/common/src/webworker/workerProxy-Ddzxn23N.js +0 -1
|
@@ -1,152 +1,158 @@
|
|
|
1
1
|
import { isNotProduction as e } from "../../constants/vite.constants.mjs";
|
|
2
2
|
import { BACK_END_URL as t } from "../../API/getServerURL.mjs";
|
|
3
3
|
//#region libs/shared/common/src/functions/snarkjs/constant.ts
|
|
4
|
-
var n = e ? "https://enclave-staging-v2.hinkal.io" : "https://enclave-server.hinkal.io", r = `${t}/verifiers-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
4
|
+
var n = e ? "https://enclave-staging-v2.hinkal.io" : "https://enclave-server.hinkal.io", r = `${t}/verifiers-v4/`, i = {
|
|
5
|
+
mainEVMCircuit1x2x1v4Wasm: `${r}mainEVMCircuit1x2x1-4.wasm`,
|
|
6
|
+
mainEVMCircuit1x2x1v4Zkey: `${r}mainEVMCircuit1x2x1_final-4.zkey`,
|
|
7
|
+
mainEVMCircuit1x6x1v4Wasm: `${r}mainEVMCircuit1x6x1-4.wasm`,
|
|
8
|
+
mainEVMCircuit1x6x1v4Zkey: `${r}mainEVMCircuit1x6x1_final-4.zkey`,
|
|
9
|
+
mainEVMCircuit2x2x1v4Wasm: `${r}mainEVMCircuit2x2x1-4.wasm`,
|
|
10
|
+
mainEVMCircuit2x2x1v4Zkey: `${r}mainEVMCircuit2x2x1_final-4.zkey`,
|
|
11
|
+
mainEVMCircuit2x6x1v4Wasm: `${r}mainEVMCircuit2x6x1-4.wasm`,
|
|
12
|
+
mainEVMCircuit2x6x1v4Zkey: `${r}mainEVMCircuit2x6x1_final-4.zkey`,
|
|
13
|
+
mainEVMCircuit3x2x1v4Wasm: `${r}mainEVMCircuit3x2x1-4.wasm`,
|
|
14
|
+
mainEVMCircuit3x2x1v4Zkey: `${r}mainEVMCircuit3x2x1_final-4.zkey`,
|
|
15
|
+
mainEVMCircuit3x6x1v4Wasm: `${r}mainEVMCircuit3x6x1-4.wasm`,
|
|
16
|
+
mainEVMCircuit3x6x1v4Zkey: `${r}mainEVMCircuit3x6x1_final-4.zkey`,
|
|
17
|
+
mainEVMCircuit4x2x1v4Wasm: `${r}mainEVMCircuit4x2x1-4.wasm`,
|
|
18
|
+
mainEVMCircuit4x2x1v4Zkey: `${r}mainEVMCircuit4x2x1_final-4.zkey`,
|
|
19
|
+
mainEVMCircuit4x6x1v4Wasm: `${r}mainEVMCircuit4x6x1-4.wasm`,
|
|
20
|
+
mainEVMCircuit4x6x1v4Zkey: `${r}mainEVMCircuit4x6x1_final-4.zkey`,
|
|
21
|
+
mainEVMCircuit5x2x1v4Wasm: `${r}mainEVMCircuit5x2x1-4.wasm`,
|
|
22
|
+
mainEVMCircuit5x2x1v4Zkey: `${r}mainEVMCircuit5x2x1_final-4.zkey`,
|
|
23
|
+
mainEVMCircuit5x6x1v4Wasm: `${r}mainEVMCircuit5x6x1-4.wasm`,
|
|
24
|
+
mainEVMCircuit5x6x1v4Zkey: `${r}mainEVMCircuit5x6x1_final-4.zkey`,
|
|
25
|
+
mainEVMCircuit1x2x2v4Wasm: `${r}mainEVMCircuit1x2x2-4.wasm`,
|
|
26
|
+
mainEVMCircuit1x2x2v4Zkey: `${r}mainEVMCircuit1x2x2_final-4.zkey`,
|
|
27
|
+
mainEVMCircuit1x6x2v4Wasm: `${r}mainEVMCircuit1x6x2-4.wasm`,
|
|
28
|
+
mainEVMCircuit1x6x2v4Zkey: `${r}mainEVMCircuit1x6x2_final-4.zkey`,
|
|
29
|
+
mainEVMCircuit2x2x2v4Wasm: `${r}mainEVMCircuit2x2x2-4.wasm`,
|
|
30
|
+
mainEVMCircuit2x2x2v4Zkey: `${r}mainEVMCircuit2x2x2_final-4.zkey`,
|
|
31
|
+
mainEVMCircuit2x6x2v4Wasm: `${r}mainEVMCircuit2x6x2-4.wasm`,
|
|
32
|
+
mainEVMCircuit2x6x2v4Zkey: `${r}mainEVMCircuit2x6x2_final-4.zkey`,
|
|
33
|
+
mainEVMCircuitMin0v4Wasm: `${r}mainEVMCircuitMin0-4.wasm`,
|
|
34
|
+
mainEVMCircuitMin0v4Zkey: `${r}mainEVMCircuitMin0_final-4.zkey`,
|
|
35
|
+
mainSolanaCircuit1x2x1v4Zkey: `${r}mainSolanaCircuit1x2x1_final-4.zkey`,
|
|
36
|
+
mainSolanaCircuit1x2x1v4Wasm: `${r}mainSolanaCircuit1x2x1-4.wasm`,
|
|
37
|
+
mainSolanaCircuit1x2x2v4Zkey: `${r}mainSolanaCircuit1x2x2_final-4.zkey`,
|
|
38
|
+
mainSolanaCircuit1x2x2v4Wasm: `${r}mainSolanaCircuit1x2x2-4.wasm`,
|
|
39
|
+
mainSolanaCircuit1x6x1v4Zkey: `${r}mainSolanaCircuit1x6x1_final-4.zkey`,
|
|
40
|
+
mainSolanaCircuit1x6x1v4Wasm: `${r}mainSolanaCircuit1x6x1-4.wasm`,
|
|
41
|
+
mainSolanaCircuit1x6x2v4Zkey: `${r}mainSolanaCircuit1x6x2_final-4.zkey`,
|
|
42
|
+
mainSolanaCircuit1x6x2v4Wasm: `${r}mainSolanaCircuit1x6x2-4.wasm`,
|
|
43
|
+
mainSolanaCircuit2x2x1v4Zkey: `${r}mainSolanaCircuit2x2x1_final-4.zkey`,
|
|
44
|
+
mainSolanaCircuit2x2x1v4Wasm: `${r}mainSolanaCircuit2x2x1-4.wasm`,
|
|
45
|
+
mainSolanaCircuit2x6x1v4Zkey: `${r}mainSolanaCircuit2x6x1_final-4.zkey`,
|
|
46
|
+
mainSolanaCircuit2x6x1v4Wasm: `${r}mainSolanaCircuit2x6x1-4.wasm`,
|
|
47
|
+
commitmentCalculator1x2v4Wasm: `${r}commitmentCalculator1x2-4.wasm`,
|
|
48
|
+
commitmentCalculator1x2v4Zkey: `${r}commitmentCalculator1x2_final-4.zkey`,
|
|
49
|
+
commitmentCalculator1x2v4VK: `${r}commitmentCalculator1x2_final-4_verification_key.json`,
|
|
50
|
+
commitmentCalculator1x6v4Wasm: `${r}commitmentCalculator1x6-4.wasm`,
|
|
51
|
+
commitmentCalculator1x6v4Zkey: `${r}commitmentCalculator1x6_final-4.zkey`,
|
|
52
|
+
commitmentCalculator1x6v4VK: `${r}commitmentCalculator1x6_final-4_verification_key.json`,
|
|
53
|
+
commitmentCalculator2x2v4Wasm: `${r}commitmentCalculator2x2-4.wasm`,
|
|
54
|
+
commitmentCalculator2x2v4Zkey: `${r}commitmentCalculator2x2_final-4.zkey`,
|
|
55
|
+
commitmentCalculator2x2v4VK: `${r}commitmentCalculator2x2_final-4_verification_key.json`,
|
|
56
|
+
commitmentCalculator2x6v4Wasm: `${r}commitmentCalculator2x6-4.wasm`,
|
|
57
|
+
commitmentCalculator2x6v4Zkey: `${r}commitmentCalculator2x6_final-4.zkey`,
|
|
58
|
+
commitmentCalculator2x6v4VK: `${r}commitmentCalculator2x6_final-4_verification_key.json`,
|
|
59
|
+
commitmentCalculator3x2v4Wasm: `${r}commitmentCalculator3x2-4.wasm`,
|
|
60
|
+
commitmentCalculator3x2v4Zkey: `${r}commitmentCalculator3x2_final-4.zkey`,
|
|
61
|
+
commitmentCalculator3x2v4VK: `${r}commitmentCalculator3x2_final-4_verification_key.json`,
|
|
62
|
+
commitmentCalculator3x6v4Wasm: `${r}commitmentCalculator3x6-4.wasm`,
|
|
63
|
+
commitmentCalculator3x6v4Zkey: `${r}commitmentCalculator3x6_final-4.zkey`,
|
|
64
|
+
commitmentCalculator3x6v4VK: `${r}commitmentCalculator3x6_final-4_verification_key.json`,
|
|
65
|
+
commitmentCalculator4x2v4Wasm: `${r}commitmentCalculator4x2-4.wasm`,
|
|
66
|
+
commitmentCalculator4x2v4Zkey: `${r}commitmentCalculator4x2_final-4.zkey`,
|
|
67
|
+
commitmentCalculator4x2v4VK: `${r}commitmentCalculator4x2_final-4_verification_key.json`,
|
|
68
|
+
commitmentCalculator4x6v4Wasm: `${r}commitmentCalculator4x6-4.wasm`,
|
|
69
|
+
commitmentCalculator4x6v4Zkey: `${r}commitmentCalculator4x6_final-4.zkey`,
|
|
70
|
+
commitmentCalculator4x6v4VK: `${r}commitmentCalculator4x6_final-4_verification_key.json`,
|
|
71
|
+
commitmentCalculator5x2v4Wasm: `${r}commitmentCalculator5x2-4.wasm`,
|
|
72
|
+
commitmentCalculator5x2v4Zkey: `${r}commitmentCalculator5x2_final-4.zkey`,
|
|
73
|
+
commitmentCalculator5x2v4VK: `${r}commitmentCalculator5x2_final-4_verification_key.json`,
|
|
74
|
+
commitmentCalculator5x6v4Wasm: `${r}commitmentCalculator5x6-4.wasm`,
|
|
75
|
+
commitmentCalculator5x6v4Zkey: `${r}commitmentCalculator5x6_final-4.zkey`,
|
|
76
|
+
commitmentCalculator5x6v4VK: `${r}commitmentCalculator5x6_final-4_verification_key.json`,
|
|
77
|
+
SignatureFromMnemonicv1x1Wasm: `${r}SignatureFromMnemonic-1.1.wasm`,
|
|
78
|
+
SignatureFromMnemonicv1x1Zkey: `${r}SignatureFromMnemonic_final-1.1.zkey`,
|
|
79
|
+
SignatureFromMnemonicv1x1VK: `${r}SignatureFromMnemonic_final-1.1_verification_key.json`
|
|
77
80
|
}, a = {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
81
|
+
mainEVMCircuit1x2x1v4Wasm: "mainEVMCircuit1x2x1-4.wasm",
|
|
82
|
+
mainEVMCircuit1x2x1v4Zkey: "mainEVMCircuit1x2x1_final-4.zkey",
|
|
83
|
+
mainEVMCircuit1x6x1v4Wasm: "mainEVMCircuit1x6x1-4.wasm",
|
|
84
|
+
mainEVMCircuit1x6x1v4Zkey: "mainEVMCircuit1x6x1_final-4.zkey",
|
|
85
|
+
mainEVMCircuit2x2x1v4Wasm: "mainEVMCircuit2x2x1-4.wasm",
|
|
86
|
+
mainEVMCircuit2x2x1v4Zkey: "mainEVMCircuit2x2x1_final-4.zkey",
|
|
87
|
+
mainEVMCircuit2x6x1v4Wasm: "mainEVMCircuit2x6x1-4.wasm",
|
|
88
|
+
mainEVMCircuit2x6x1v4Zkey: "mainEVMCircuit2x6x1_final-4.zkey",
|
|
89
|
+
mainEVMCircuit3x2x1v4Wasm: "mainEVMCircuit3x2x1-4.wasm",
|
|
90
|
+
mainEVMCircuit3x2x1v4Zkey: "mainEVMCircuit3x2x1_final-4.zkey",
|
|
91
|
+
mainEVMCircuit3x6x1v4Wasm: "mainEVMCircuit3x6x1-4.wasm",
|
|
92
|
+
mainEVMCircuit3x6x1v4Zkey: "mainEVMCircuit3x6x1_final-4.zkey",
|
|
93
|
+
mainEVMCircuit4x2x1v4Wasm: "mainEVMCircuit4x2x1-4.wasm",
|
|
94
|
+
mainEVMCircuit4x2x1v4Zkey: "mainEVMCircuit4x2x1_final-4.zkey",
|
|
95
|
+
mainEVMCircuit4x6x1v4Wasm: "mainEVMCircuit4x6x1-4.wasm",
|
|
96
|
+
mainEVMCircuit4x6x1v4Zkey: "mainEVMCircuit4x6x1_final-4.zkey",
|
|
97
|
+
mainEVMCircuit5x2x1v4Wasm: "mainEVMCircuit5x2x1-4.wasm",
|
|
98
|
+
mainEVMCircuit5x2x1v4Zkey: "mainEVMCircuit5x2x1_final-4.zkey",
|
|
99
|
+
mainEVMCircuit5x6x1v4Wasm: "mainEVMCircuit5x6x1-4.wasm",
|
|
100
|
+
mainEVMCircuit5x6x1v4Zkey: "mainEVMCircuit5x6x1_final-4.zkey",
|
|
101
|
+
mainEVMCircuit1x2x2v4Wasm: "mainEVMCircuit1x2x2-4.wasm",
|
|
102
|
+
mainEVMCircuit1x2x2v4Zkey: "mainEVMCircuit1x2x2_final-4.zkey",
|
|
103
|
+
mainEVMCircuit1x6x2v4Wasm: "mainEVMCircuit1x6x2-4.wasm",
|
|
104
|
+
mainEVMCircuit1x6x2v4Zkey: "mainEVMCircuit1x6x2_final-4.zkey",
|
|
105
|
+
mainEVMCircuit2x2x2v4Wasm: "mainEVMCircuit2x2x2-4.wasm",
|
|
106
|
+
mainEVMCircuit2x2x2v4Zkey: "mainEVMCircuit2x2x2_final-4.zkey",
|
|
107
|
+
mainEVMCircuit2x6x2v4Wasm: "mainEVMCircuit2x6x2-4.wasm",
|
|
108
|
+
mainEVMCircuit2x6x2v4Zkey: "mainEVMCircuit2x6x2_final-4.zkey",
|
|
109
|
+
mainEVMCircuitMin0v4Wasm: "mainEVMCircuitMin0-4.wasm",
|
|
110
|
+
mainEVMCircuitMin0v4Zkey: "mainEVMCircuitMin0_final-4.zkey",
|
|
111
|
+
mainSolanaCircuit1x2x1v4Zkey: "mainSolanaCircuit1x2x1_final-4.zkey",
|
|
112
|
+
mainSolanaCircuit1x2x1v4Wasm: "mainSolanaCircuit1x2x1-4.wasm",
|
|
113
|
+
mainSolanaCircuit1x2x2v4Zkey: "mainSolanaCircuit1x2x2_final-4.zkey",
|
|
114
|
+
mainSolanaCircuit1x2x2v4Wasm: "mainSolanaCircuit1x2x2-4.wasm",
|
|
115
|
+
mainSolanaCircuit1x6x1v4Zkey: "mainSolanaCircuit1x6x1_final-4.zkey",
|
|
116
|
+
mainSolanaCircuit1x6x1v4Wasm: "mainSolanaCircuit1x6x1-4.wasm",
|
|
117
|
+
mainSolanaCircuit1x6x2v4Zkey: "mainSolanaCircuit1x6x2_final-4.zkey",
|
|
118
|
+
mainSolanaCircuit1x6x2v4Wasm: "mainSolanaCircuit1x6x2-4.wasm",
|
|
119
|
+
mainSolanaCircuit2x2x1v4Zkey: "mainSolanaCircuit2x2x1_final-4.zkey",
|
|
120
|
+
mainSolanaCircuit2x2x1v4Wasm: "mainSolanaCircuit2x2x1-4.wasm",
|
|
121
|
+
mainSolanaCircuit2x6x1v4Zkey: "mainSolanaCircuit2x6x1_final-4.zkey",
|
|
122
|
+
mainSolanaCircuit2x6x1v4Wasm: "mainSolanaCircuit2x6x1-4.wasm",
|
|
123
|
+
commitmentCalculator1x2v4Zkey: "commitmentCalculator1x2_final-4.zkey",
|
|
124
|
+
commitmentCalculator1x2v4Wasm: "commitmentCalculator1x2-4.wasm",
|
|
125
|
+
commitmentCalculator1x2v4VK: "commitmentCalculator1x2_final-4_verification_key.json",
|
|
126
|
+
commitmentCalculator1x6v4Zkey: "commitmentCalculator1x6_final-4.zkey",
|
|
127
|
+
commitmentCalculator1x6v4Wasm: "commitmentCalculator1x6-4.wasm",
|
|
128
|
+
commitmentCalculator1x6v4VK: "commitmentCalculator1x6_final-4_verification_key.json",
|
|
129
|
+
commitmentCalculator2x2v4Zkey: "commitmentCalculator2x2_final-4.zkey",
|
|
130
|
+
commitmentCalculator2x2v4Wasm: "commitmentCalculator2x2-4.wasm",
|
|
131
|
+
commitmentCalculator2x2v4VK: "commitmentCalculator2x2_final-4_verification_key.json",
|
|
132
|
+
commitmentCalculator2x6v4Zkey: "commitmentCalculator2x6_final-4.zkey",
|
|
133
|
+
commitmentCalculator2x6v4Wasm: "commitmentCalculator2x6-4.wasm",
|
|
134
|
+
commitmentCalculator2x6v4VK: "commitmentCalculator2x6_final-4_verification_key.json",
|
|
135
|
+
commitmentCalculator3x2v4Zkey: "commitmentCalculator3x2_final-4.zkey",
|
|
136
|
+
commitmentCalculator3x2v4Wasm: "commitmentCalculator3x2-4.wasm",
|
|
137
|
+
commitmentCalculator3x2v4VK: "commitmentCalculator3x2_final-4_verification_key.json",
|
|
138
|
+
commitmentCalculator3x6v4Zkey: "commitmentCalculator3x6_final-4.zkey",
|
|
139
|
+
commitmentCalculator3x6v4Wasm: "commitmentCalculator3x6-4.wasm",
|
|
140
|
+
commitmentCalculator3x6v4VK: "commitmentCalculator3x6_final-4_verification_key.json",
|
|
141
|
+
commitmentCalculator4x2v4Zkey: "commitmentCalculator4x2_final-4.zkey",
|
|
142
|
+
commitmentCalculator4x2v4Wasm: "commitmentCalculator4x2-4.wasm",
|
|
143
|
+
commitmentCalculator4x2v4VK: "commitmentCalculator4x2_final-4_verification_key.json",
|
|
144
|
+
commitmentCalculator4x6v4Zkey: "commitmentCalculator4x6_final-4.zkey",
|
|
145
|
+
commitmentCalculator4x6v4Wasm: "commitmentCalculator4x6-4.wasm",
|
|
146
|
+
commitmentCalculator4x6v4VK: "commitmentCalculator4x6_final-4_verification_key.json",
|
|
147
|
+
commitmentCalculator5x2v4Zkey: "commitmentCalculator5x2_final-4.zkey",
|
|
148
|
+
commitmentCalculator5x2v4Wasm: "commitmentCalculator5x2-4.wasm",
|
|
149
|
+
commitmentCalculator5x2v4VK: "commitmentCalculator5x2_final-4_verification_key.json",
|
|
150
|
+
commitmentCalculator5x6v4Zkey: "commitmentCalculator5x6_final-4.zkey",
|
|
151
|
+
commitmentCalculator5x6v4Wasm: "commitmentCalculator5x6-4.wasm",
|
|
152
|
+
commitmentCalculator5x6v4VK: "commitmentCalculator5x6_final-4_verification_key.json",
|
|
153
|
+
SignatureFromMnemonicv1x1Wasm: "SignatureFromMnemonic-1.1.wasm",
|
|
154
|
+
SignatureFromMnemonicv1x1Zkey: "SignatureFromMnemonic_final-1.1.zkey",
|
|
155
|
+
SignatureFromMnemonicv1x1VK: "SignatureFromMnemonic_final-1.1_verification_key.json"
|
|
150
156
|
};
|
|
151
157
|
//#endregion
|
|
152
158
|
export { n as ENCLAVE_URL, a as localVerifiers, i as prodVerifiers };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),
|
|
1
|
+
const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),ee=require(`../../crypto/poseidon.cjs`),n=require(`../web3/etherFunctions.cjs`),r=require(`../../data-structures/crypto-keys/keys.cjs`),i=require(`../utils/time.utils.cjs`),a=require(`../../error-handling/logger.cjs`);require(`../../types/circom-data.types.cjs`);const te=require(`../../types/external-action.types.cjs`),o=require(`./common.snarkjs.cjs`),s=require(`./signedMessageHash.cjs`),c=require(`./generateCircomData.cjs`),l=require(`../../data-structures/AccountActions/AccountActions.cjs`),u=require(`./generateMainAndCommitmentZkProof.cjs`),d=require(`./getMerkleTreeSiblingsAndRootHashes.cjs`),f=require(`../private-wallet/emporium.helpers.cjs`);var p=async(p,m,h,g,_,v,y,b,x,S=t.zeroAddress,C=e.chainIds.localhost,w=m.map(()=>!1),T=void 0,E,D,O=`0x`)=>{let k=o.getZkProofVerifierName(m,h),A=o.calcAmountChanges(m,h),j=m.map(e=>e[0].erc20TokenAddress),M=o.calcEncryptedOutputs(h),N=g.getShieldedPrivateKey(),{pubSpendingBJJPoint:P}=g.getSpendingKeyPair(),F=o.calcStealthAddressStructure(r.UserKeys.findCorrectRandomization(n.randomBigInt(31),N),N,g.getSpendingKeyPair().pubSpendingBJJPoint),I=o.calcOnchainEncryptedOutput(r.UserKeys.getEncryptionKeyPair(N).publicKey,F),{inCommitmentSiblings:ne,inCommitmentSiblingSides:re,rootHashHinkal:L,rootHashHinkalIndex:R,inNullifiers:z}=await d.getDataFromWorkers(C,p,m.map(e=>e.map(e=>e.getConstructableParams()))),B=o.buildOutCommitments(h),V=n.randomBigInt(31),H=ee.poseidonFunction(V),U=BigInt(h.length>0?h[0][0].timeStamp:i.getCurrentTimeInSeconds()),W={rootHashHinkal:L,spendingPublicKey:P,nullifyingPrivateKey:N,erc20TokenAddresses:j,amountChanges:A,inAmounts:m.map(e=>e.map(e=>e.amount.toString())),inH0Ax:m.map(e=>e.map(e=>o.getUtxoCircuitH0Coords(e)[0].toString())),inH0Ay:m.map(e=>e.map(e=>o.getUtxoCircuitH0Coords(e)[1].toString())),inTimeStamps:m.map(e=>e.map(e=>e.timeStamp)),inNullifiers:z,inCommitmentSiblings:ne,inCommitmentSiblingSides:re,outAmounts:h.map(e=>e.map(e=>e.amount.toString())),outTimeStamp:U,outPublicKeys:h.map(e=>e.map(e=>e.getStealthAddress())),outCommitments:B,calldataHash:0n,messageSeed:V,H0Ax:F.H0x,H0Ay:F.H0y},G=o.calcPublicSignalCount(k,W.erc20TokenAddresses,W.amountChanges,W.inNullifiers,W.outCommitments),K=o.calcAmountChanges(m,h,!0),q=o.getSlippageValues(K);a.Logger.log({publicSignalCount:G});let J=Array.isArray(y)?y:[y],Y=e.getOnchainChainId(C),ie=D?l.AccountActions.getSignerAddressFromPrivateKey(Y,D):void 0,X;X=_===te.ExternalActionId.Emporium?await f.encodeEmporiumMetadata(C,v??t.zeroAddress,D,J,H,ie):_===0n?`0x`:J[0]??`0x`,W.calldataHash=o.createCallDataHash(G,S,v,_,H,X,M,I,T,q,w,x,E,O);let Z=s.computeSignedMessageHashEvm({rootHashHinkal:L,erc20TokenAddresses:j,amountChanges:A,outTimeStamp:U,inNullifiers:z,outCommitments:B,calldataHash:W.calldataHash,message:H,outH1Ax:F.H1x,outH1Ay:F.H1y,H0Ax:W.H0Ax,H0Ay:F.H0y}),{R8:Q,S:ae}=g.signEddsa(Z);W.eddsaSignature=[Q[0],Q[1],ae],W.signedMessageHash=Z;let $=k.startsWith(`mainEVMCircuitMin0`),oe={outTimeStamp:U,calldataHash:W.calldataHash,messageSeed:V},{zkCallData:se,commitmentValidationData:ce}=await u.generateMainAndCommitmentZkProof(C,g,j,m,k,$?oe:W,b);return{zkCallData:se,circomData:c.generateCircomData(B,z,L,R,K,j,h,M,I,G,_,v,H,X,S,W.calldataHash,F,w,T,$?Number(U):void 0,q,x,E,O),dimData:{tokenNumber:m.length,nullifierAmount:m.length>0?m[0].length:0,outputAmount:h.length>0?h[0].length:0},encryptedOutputs:M,commitmentValidationData:ce}};exports.constructZkProof=p;
|
|
@@ -4,7 +4,7 @@ import { Utxo } from '../../data-structures/utxo/Utxo';
|
|
|
4
4
|
import { CircomDataType, DimDataType, HookDataType } from '../../types/circom-data.types';
|
|
5
5
|
import { ExternalActionId } from '../../types/external-action.types';
|
|
6
6
|
import { FeeStructure } from '../../types/hinkal.types';
|
|
7
|
-
export declare const constructZkProof: <T = CircomDataType>(merkleTree: MerkleTree<bigint>, inputUtxos: Utxo[][], outputUtxos: Utxo[][], userKeys: UserKeys, externalActionId: ExternalActionId | 0n, externalAddress: string | undefined, externalActionMetadata: string | string[], generateProofRemotely: boolean, feeStructure: FeeStructure, relay?: string, chainId?: number, onChainCreation?: boolean[], hookData?: HookDataType | undefined, originalSender?: string, subAccountPrivateKey?: string) => Promise<{
|
|
7
|
+
export declare const constructZkProof: <T = CircomDataType>(merkleTree: MerkleTree<bigint>, inputUtxos: Utxo[][], outputUtxos: Utxo[][], userKeys: UserKeys, externalActionId: ExternalActionId | 0n, externalAddress: string | undefined, externalActionMetadata: string | string[], generateProofRemotely: boolean, feeStructure: FeeStructure, relay?: string, chainId?: number, onChainCreation?: boolean[], hookData?: HookDataType | undefined, originalSender?: string, subAccountPrivateKey?: string, extraData?: string) => Promise<{
|
|
8
8
|
zkCallData: import('../..').NewZkCallDataType;
|
|
9
9
|
circomData: T;
|
|
10
10
|
dimData: DimDataType;
|
|
@@ -1,82 +1,81 @@
|
|
|
1
1
|
import { chainIds as e, getOnchainChainId as t } from "../../constants/chains.constants.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { poseidonFunction as
|
|
2
|
+
import { zeroAddress as n } from "../../constants/protocol.constants.mjs";
|
|
3
|
+
import { poseidonFunction as ee } from "../../crypto/poseidon.mjs";
|
|
4
4
|
import { randomBigInt as r } from "../web3/etherFunctions.mjs";
|
|
5
5
|
import { UserKeys as i } from "../../data-structures/crypto-keys/keys.mjs";
|
|
6
|
-
import { getCurrentTimeInSeconds as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import { buildOutCommitments as re, calcAmountChanges as
|
|
11
|
-
import { computeSignedMessageHashEvm as
|
|
12
|
-
import { generateCircomData as
|
|
13
|
-
import { AccountActions as
|
|
14
|
-
import { generateMainAndCommitmentZkProof as
|
|
15
|
-
import { getDataFromWorkers as
|
|
16
|
-
import { encodeEmporiumMetadata as
|
|
6
|
+
import { getCurrentTimeInSeconds as te } from "../utils/time.utils.mjs";
|
|
7
|
+
import { Logger as a } from "../../error-handling/logger.mjs";
|
|
8
|
+
import "../../types/circom-data.types.mjs";
|
|
9
|
+
import { ExternalActionId as ne } from "../../types/external-action.types.mjs";
|
|
10
|
+
import { buildOutCommitments as re, calcAmountChanges as o, calcEncryptedOutputs as ie, calcOnchainEncryptedOutput as s, calcPublicSignalCount as c, calcStealthAddressStructure as l, createCallDataHash as u, getSlippageValues as d, getUtxoCircuitH0Coords as f, getZkProofVerifierName as ae } from "./common.snarkjs.mjs";
|
|
11
|
+
import { computeSignedMessageHashEvm as oe } from "./signedMessageHash.mjs";
|
|
12
|
+
import { generateCircomData as se } from "./generateCircomData.mjs";
|
|
13
|
+
import { AccountActions as ce } from "../../data-structures/AccountActions/AccountActions.mjs";
|
|
14
|
+
import { generateMainAndCommitmentZkProof as le } from "./generateMainAndCommitmentZkProof.mjs";
|
|
15
|
+
import { getDataFromWorkers as ue } from "./getMerkleTreeSiblingsAndRootHashes.mjs";
|
|
16
|
+
import { encodeEmporiumMetadata as de } from "../private-wallet/emporium.helpers.mjs";
|
|
17
17
|
//#region libs/shared/common/src/functions/snarkjs/constructGeneralZkProof.ts
|
|
18
|
-
var
|
|
19
|
-
let O =
|
|
18
|
+
var p = async (p, m, h, g, _, v, y, fe, b, x = n, S = e.localhost, C = m.map(() => !1), w = void 0, T, E, D = "0x") => {
|
|
19
|
+
let O = ae(m, h), k = o(m, h), A = m.map((e) => e[0].erc20TokenAddress), j = ie(h), M = g.getShieldedPrivateKey(), { pubSpendingBJJPoint: N } = g.getSpendingKeyPair(), P = l(i.findCorrectRandomization(r(31), M), M, g.getSpendingKeyPair().pubSpendingBJJPoint), F = s(i.getEncryptionKeyPair(M).publicKey, P), { inCommitmentSiblings: I, inCommitmentSiblingSides: L, rootHashHinkal: R, rootHashHinkalIndex: z, inNullifiers: B } = await ue(S, p, m.map((e) => e.map((e) => e.getConstructableParams()))), V = re(h), H = r(31), U = ee(H), W = BigInt(h.length > 0 ? h[0][0].timeStamp : te()), G = {
|
|
20
20
|
rootHashHinkal: R,
|
|
21
|
-
spendingPublicKey:
|
|
22
|
-
nullifyingPrivateKey:
|
|
21
|
+
spendingPublicKey: N,
|
|
22
|
+
nullifyingPrivateKey: M,
|
|
23
23
|
erc20TokenAddresses: A,
|
|
24
24
|
amountChanges: k,
|
|
25
|
-
inAmounts:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
inTimeStamps: h.map((e) => e.map((e) => e.timeStamp)),
|
|
31
|
-
inNullifiers: z,
|
|
25
|
+
inAmounts: m.map((e) => e.map((e) => e.amount.toString())),
|
|
26
|
+
inH0Ax: m.map((e) => e.map((e) => f(e)[0].toString())),
|
|
27
|
+
inH0Ay: m.map((e) => e.map((e) => f(e)[1].toString())),
|
|
28
|
+
inTimeStamps: m.map((e) => e.map((e) => e.timeStamp)),
|
|
29
|
+
inNullifiers: B,
|
|
32
30
|
inCommitmentSiblings: I,
|
|
33
31
|
inCommitmentSiblingSides: L,
|
|
34
|
-
outAmounts:
|
|
35
|
-
outTimeStamp:
|
|
36
|
-
outPublicKeys:
|
|
37
|
-
outCommitments:
|
|
32
|
+
outAmounts: h.map((e) => e.map((e) => e.amount.toString())),
|
|
33
|
+
outTimeStamp: W,
|
|
34
|
+
outPublicKeys: h.map((e) => e.map((e) => e.getStealthAddress())),
|
|
35
|
+
outCommitments: V,
|
|
38
36
|
calldataHash: 0n,
|
|
39
|
-
messageSeed:
|
|
40
|
-
H0Ax:
|
|
41
|
-
H0Ay:
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
37
|
+
messageSeed: H,
|
|
38
|
+
H0Ax: P.H0x,
|
|
39
|
+
H0Ay: P.H0y
|
|
40
|
+
}, K = c(O, G.erc20TokenAddresses, G.amountChanges, G.inNullifiers, G.outCommitments), q = o(m, h, !0), J = d(q);
|
|
41
|
+
a.log({ publicSignalCount: K });
|
|
42
|
+
let Y = Array.isArray(y) ? y : [y], pe = t(S), me = E ? ce.getSignerAddressFromPrivateKey(pe, E) : void 0, X;
|
|
43
|
+
X = _ === ne.Emporium ? await de(S, v ?? n, E, Y, U, me) : _ === 0n ? "0x" : Y[0] ?? "0x", G.calldataHash = u(K, x, v, _, U, X, j, F, w, J, C, b, T, D);
|
|
44
|
+
let Z = oe({
|
|
47
45
|
rootHashHinkal: R,
|
|
48
46
|
erc20TokenAddresses: A,
|
|
49
47
|
amountChanges: k,
|
|
50
|
-
outTimeStamp:
|
|
51
|
-
inNullifiers:
|
|
52
|
-
outCommitments:
|
|
53
|
-
calldataHash:
|
|
54
|
-
message:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
48
|
+
outTimeStamp: W,
|
|
49
|
+
inNullifiers: B,
|
|
50
|
+
outCommitments: V,
|
|
51
|
+
calldataHash: G.calldataHash,
|
|
52
|
+
message: U,
|
|
53
|
+
outH1Ax: P.H1x,
|
|
54
|
+
outH1Ay: P.H1y,
|
|
55
|
+
H0Ax: G.H0Ax,
|
|
56
|
+
H0Ay: P.H0y
|
|
57
|
+
}), { R8: Q, S: he } = g.signEddsa(Z);
|
|
58
|
+
G.eddsaSignature = [
|
|
59
|
+
Q[0],
|
|
60
|
+
Q[1],
|
|
61
|
+
he
|
|
62
|
+
], G.signedMessageHash = Z;
|
|
63
|
+
let $ = O.startsWith("mainEVMCircuitMin0"), ge = {
|
|
64
|
+
outTimeStamp: W,
|
|
65
|
+
calldataHash: G.calldataHash,
|
|
66
|
+
messageSeed: H
|
|
67
|
+
}, { zkCallData: _e, commitmentValidationData: ve } = await le(S, g, A, m, O, $ ? ge : G, fe);
|
|
69
68
|
return {
|
|
70
69
|
zkCallData: _e,
|
|
71
|
-
circomData:
|
|
70
|
+
circomData: se(V, B, R, z, q, A, h, j, F, K, _, v, U, X, x, G.calldataHash, P, C, w, $ ? Number(W) : void 0, J, b, T, D),
|
|
72
71
|
dimData: {
|
|
73
|
-
tokenNumber:
|
|
74
|
-
nullifierAmount:
|
|
75
|
-
outputAmount:
|
|
72
|
+
tokenNumber: m.length,
|
|
73
|
+
nullifierAmount: m.length > 0 ? m[0].length : 0,
|
|
74
|
+
outputAmount: h.length > 0 ? h[0].length : 0
|
|
76
75
|
},
|
|
77
76
|
encryptedOutputs: j,
|
|
78
77
|
commitmentValidationData: ve
|
|
79
78
|
};
|
|
80
79
|
};
|
|
81
80
|
//#endregion
|
|
82
|
-
export {
|
|
81
|
+
export { p as constructZkProof };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`../../constants/protocol.constants.cjs`),require(`ethers`);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface SignatureFromMnemonicProofInput {
|
|
2
|
+
mnemonicBytes: string[];
|
|
3
|
+
actualLen: string;
|
|
4
|
+
withdrawalAddress: string;
|
|
5
|
+
signature: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const constructSignatureFromMnemonicProofInput: (mnemonic: string[], withdrawalAddress: string) => SignatureFromMnemonicProofInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../crypto/poseidon.cjs`),n=require(`../web3/etherFunctions.cjs`),r=require(`../utils/solanaMint.utils.cjs`),i=require(
|
|
1
|
+
require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../crypto/poseidon.cjs`),n=require(`../web3/etherFunctions.cjs`),r=require(`../utils/solanaMint.utils.cjs`),i=require(`./common.snarkjs.cjs`),a=require(`../pre-transaction/solana.cjs`),o=require(`./signedMessageHash.cjs`);require(`../pre-transaction/index.cjs`);const s=require(`./generateMainAndCommitmentZkProof.cjs`),c=require(`./getMerkleTreeSiblingsAndRootHashes.cjs`),l=require(`../pre-transaction/getSolanaCalldataHash.cjs`);require(`../web3/index.cjs`);let u=require(`@solana/web3.js`);var d=async(d,f,p,m,h,g,_,v,y,b,x,S,C,w=e.chainIds.solanaLocalnet,T=[],E=[],D=0n)=>{let O=new u.PublicKey(b),k=new u.PublicKey(x),A=p.getShieldedPrivateKey(),{pubSpendingBJJPoint:j}=p.getSpendingKeyPair(),M=i.calcStealthAddressStructure(_,A,p.getSpendingKeyPair().pubSpendingBJJPoint),N=n.randomBigInt(31),P=t.poseidonFunction(N),F=t.poseidonFunction(D),I=m.map(e=>r.formatMintAddress(e)),L=I.map(e=>e.mintAccountPart1),R=I.map(e=>e.mintAccountPart2),z=l.getSolanaCalldataHash(S,O,k,C,v,y,T,E),B=`${S.tokenNumber}x${S.nullifierAmount}x${S.outputAmount}`,V=i.calcAmountChanges(h,g),{inCommitmentSiblings:H,inCommitmentSiblingSides:U,rootHashHinkal:W,inNullifiers:G}=await c.getDataFromWorkers(w,f,h.map(e=>e.map(e=>e.getConstructableParams()))),K=i.buildOutCommitments(g),q=M.H0x,J=M.H0y,Y=o.computeSignedMessageHashSolana({rootHashHinkal:W,mintAccountPart1:L,mintAccountPart2:R,amountChanges:V,outTimeStamp:BigInt(g[0][0].timeStamp),inNullifiers:G,outCommitments:K,calldataHash:z,message:P,swapperAccountAdditionalSeed:F,outH1Ay:M.H1y,H0Ax:q,H0Ay:J}),{R8:X,S:Z}=p.signEddsa(Y),Q={rootHashHinkal:W,spendingPublicKey:j,eddsaSignature:[X[0],X[1],Z],signedMessageHash:Y,nullifyingPrivateKey:A,mintAccountPart1:L,mintAccountPart2:R,amountChanges:V,inAmounts:h.map(e=>e.map(e=>e.amount.toString())),inH0Ax:h.map(e=>e.map(e=>i.getUtxoCircuitH0Coords(e)[0].toString())),inH0Ay:h.map(e=>e.map(e=>i.getUtxoCircuitH0Coords(e)[1].toString())),inTimeStamps:h.map(e=>e.map(e=>e.timeStamp)),inNullifiers:G,inCommitmentSiblings:H,inCommitmentSiblingSides:U,outAmounts:g.map(e=>e.map(e=>e.amount.toString())),outTimeStamp:BigInt(g[0][0].timeStamp),outPublicKeys:g.map(e=>e.map(e=>e.getStealthAddress())),outCommitments:K,calldataHash:z,messageSeed:N,swapperAccountSalt:D,H0Ax:q,H0Ay:J},{zkCallData:$,publicSignals:ee,commitmentValidationData:te}=await s.generateMainAndCommitmentZkProof(w,p,m,h,`mainSolanaCircuit${B}`,Q,d),[ne,re,ie]=$;return{proofAArr:ne.map(BigInt).map(a.encodeToByte32Array).flat(),proofBArr:re.flat().map(BigInt).map(a.encodeToByte32Array).flat(),proofCArr:ie.map(BigInt).map(a.encodeToByte32Array).flat(),publicInputsArr:ee.map(BigInt).map(a.encodeToByte32Array),commitmentValidationData:te}};exports.constructSolanaZkProof=d;
|