@hinkal/common 0.2.18 → 0.2.20
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 +14 -14
- package/API/API.mjs +92 -93
- package/API/admin-calls.cjs +1 -1
- package/API/admin-calls.d.ts +1 -1
- package/API/admin-calls.mjs +4 -4
- package/API/callLifiAPI.cjs +1 -1
- package/API/callLifiAPI.d.ts +1 -1
- package/API/callLifiAPI.mjs +5 -5
- package/API/callMonitor.cjs +1 -1
- package/API/callMonitor.d.ts +1 -1
- package/API/callMonitor.mjs +7 -7
- package/API/callOdosAPI.cjs +1 -1
- package/API/callOdosAPI.mjs +11 -11
- package/API/callOkxAPI.cjs +1 -1
- package/API/callOkxAPI.d.ts +1 -1
- package/API/callOkxAPI.mjs +5 -5
- package/API/callOneInchAPI.cjs +1 -1
- package/API/callOneInchAPI.mjs +10 -11
- package/API/callRelayer.cjs +1 -1
- package/API/callRelayer.d.ts +6 -3
- package/API/callRelayer.mjs +11 -11
- package/API/checkRisk.cjs +1 -1
- package/API/checkRisk.d.ts +1 -1
- package/API/checkRisk.mjs +4 -4
- package/API/enclaveCalls.cjs +1 -1
- package/API/enclaveCalls.mjs +5 -4
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.mjs +9 -9
- package/API/get-token-data.cjs +1 -1
- package/API/get-token-data.d.ts +1 -1
- package/API/get-token-data.mjs +5 -5
- package/API/get-token-price-chart-data.cjs +1 -0
- package/API/get-token-price-chart-data.d.ts +16 -0
- package/API/get-token-price-chart-data.mjs +13 -0
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.mjs +9 -9
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +3 -3
- package/API/getServerURL.mjs +51 -67
- package/API/getTokenPrice.cjs +1 -1
- package/API/getTokenPrice.d.ts +5 -0
- package/API/getTokenPrice.mjs +14 -7
- package/API/index.d.ts +1 -3
- package/API/is-tx-stateless.cjs +1 -1
- package/API/is-tx-stateless.d.ts +1 -1
- package/API/is-tx-stateless.mjs +10 -12
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +4 -8
- package/API/kycCalls.mjs +23 -26
- package/API/onrampCalls.cjs +1 -0
- package/API/onrampCalls.d.ts +20 -0
- package/API/onrampCalls.mjs +15 -0
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.d.ts +7 -2
- package/API/proxyAccountsCalls.mjs +27 -21
- package/API/relayCalls.cjs +1 -1
- package/API/relayCalls.mjs +4 -4
- package/API/scheduled-transactions-calls.cjs +1 -1
- package/API/scheduled-transactions-calls.d.ts +1 -1
- package/API/scheduled-transactions-calls.mjs +4 -4
- package/API/simulate-batch-tx.cjs +1 -1
- package/API/simulate-batch-tx.d.ts +2 -2
- package/API/simulate-batch-tx.mjs +7 -6
- package/API/solana-calls.cjs +1 -1
- package/API/solana-calls.d.ts +6 -3
- package/API/solana-calls.mjs +15 -15
- package/API/temporaryWalletCalls.cjs +1 -0
- package/API/temporaryWalletCalls.d.ts +13 -0
- package/API/temporaryWalletCalls.mjs +20 -0
- package/API/token-calls.cjs +1 -1
- package/API/token-calls.mjs +6 -5
- package/API/unspent-utxos-calls.cjs +1 -1
- package/API/unspent-utxos-calls.d.ts +2 -2
- package/API/unspent-utxos-calls.mjs +17 -18
- package/README.md +239 -64
- package/constants/addresses.constants.cjs +1 -1
- package/constants/addresses.constants.d.ts +0 -1
- package/constants/addresses.constants.mjs +7 -8
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +1 -6
- package/constants/chains.constants.mjs +63 -50
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +1 -0
- package/constants/coingecko.constants.mjs +11 -10
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +34 -41
- package/constants/deploy-data/deploy-data-solana.json.cjs +1 -1
- package/constants/deploy-data/deploy-data-solana.json.mjs +28 -2
- package/constants/function-signatures.constants.cjs +1 -1
- package/constants/function-signatures.constants.d.ts +0 -1
- package/constants/function-signatures.constants.mjs +3 -4
- package/constants/kyc.constants.cjs +1 -1
- package/constants/kyc.constants.mjs +39 -40
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +1 -0
- package/constants/mediaUrls.constants.mjs +2 -1
- package/constants/mystery-boxes.constants.d.ts +0 -0
- package/constants/permit2.constants.cjs +1 -1
- package/constants/permit2.constants.d.ts +0 -1
- package/constants/permit2.constants.mjs +10 -11
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +20 -123
- package/constants/server.constants.mjs +39 -142
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +0 -24
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -24
- package/constants/token-data/index.d.ts +32 -88
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +0 -26
- package/constants/token-data/polygonRegistry.json.cjs +1 -1
- package/constants/token-data/polygonRegistry.json.mjs +4 -4
- package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
- package/constants/token-data/polygonRegistryFixed.json.mjs +4 -4
- package/constants/token-data/popularTokens.constants.cjs +1 -1
- package/constants/token-data/popularTokens.constants.mjs +0 -1
- package/data-structures/AccountActions/AccountActions.cjs +1 -0
- package/data-structures/AccountActions/AccountActions.d.ts +18 -0
- package/data-structures/AccountActions/AccountActions.mjs +78 -0
- package/data-structures/AccountActions/index.d.ts +1 -0
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.cjs +1 -1
- package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +68 -71
- package/data-structures/BlockchainEvent/BlockchainEvent.cjs +1 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.d.ts +14 -0
- package/data-structures/BlockchainEvent/BlockchainEvent.mjs +41 -0
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +45 -54
- package/data-structures/Hinkal/Hinkal.mjs +314 -341
- package/data-structures/Hinkal/IHinkal.d.ts +40 -52
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.d.ts +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +49 -50
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +29 -24
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +20 -20
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +87 -85
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +78 -169
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +103 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.cjs +1 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.d.ts +4 -0
- package/data-structures/Hinkal/hinkalDepostAndBridge.mjs +214 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +4 -5
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +113 -117
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +36 -34
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +40 -36
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +37 -32
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +1 -2
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +17 -15
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -3
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +84 -95
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +157 -155
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +2 -3
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +43 -40
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +71 -67
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +63 -59
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +81 -77
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +49 -48
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +71 -68
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +71 -79
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +72 -71
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +81 -79
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +108 -108
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.d.ts +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +107 -53
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.d.ts +1 -0
- package/data-structures/IndexedDB/activity-db.mjs +92 -76
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +40 -37
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +18 -15
- package/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/data-structures/IndexedDB/signatures-db.mjs +25 -40
- package/data-structures/PublicBalance/PublicBalanceWatcher.cjs +1 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.d.ts +20 -0
- package/data-structures/PublicBalance/PublicBalanceWatcher.mjs +124 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.cjs +1 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.d.ts +15 -0
- package/data-structures/PublicBalance/SolanaPublicBalancerWatcher.mjs +64 -0
- package/data-structures/PublicBalance/index.d.ts +2 -0
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +83 -85
- package/data-structures/TokenDBs/token-visibility-db.cjs +1 -1
- package/data-structures/TokenDBs/token-visibility-db.mjs +22 -36
- package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +14 -14
- package/data-structures/crypto-keys/keys.cjs +1 -1
- package/data-structures/crypto-keys/keys.d.ts +0 -11
- package/data-structures/crypto-keys/keys.mjs +47 -107
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +9 -9
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +5 -5
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.d.ts +3 -2
- package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +6 -6
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.d.ts +4 -2
- package/data-structures/event-service/evm/AbstractEventService.mjs +19 -19
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.d.ts +3 -3
- package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +6 -5
- package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +1 -2
- package/data-structures/event-service/evm/AbstractSnapshotService.mjs +3 -4
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +10 -5
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +39 -35
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +21 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/helpers/ClientEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/ClientEventHelper.d.ts +11 -0
- package/data-structures/event-service/helpers/ClientEventHelper.mjs +26 -0
- package/data-structures/event-service/helpers/PollingEventHelper.cjs +1 -0
- package/data-structures/event-service/helpers/PollingEventHelper.d.ts +5 -0
- package/data-structures/event-service/helpers/PollingEventHelper.mjs +14 -0
- package/data-structures/event-service/index.d.ts +4 -0
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +6 -6
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.d.ts +4 -3
- package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +8 -8
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +4 -10
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +10 -7
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.d.ts +3 -2
- package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +1 -2
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +1 -2
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.d.ts +11 -0
- package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +22 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +1 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.d.ts +6 -0
- package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +16 -0
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +11 -16
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +64 -66
- package/data-structures/index.d.ts +3 -0
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +8 -13
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +6 -4
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +6 -4
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +6 -4
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +6 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +6 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +5 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +6 -4
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +2 -7
- package/data-structures/utxo/Utxo.mjs +40 -36
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +1 -0
- package/error-handling/error-codes.constants.mjs +4 -3
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +21 -27
- package/error-handling/index.d.ts +0 -1
- package/functions/index.d.ts +0 -1
- package/functions/kyc/zkMeHelper.cjs +1 -1
- package/functions/kyc/zkMeHelper.mjs +18 -17
- package/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/functions/pre-transaction/constructAdminData.d.ts +2 -2
- package/functions/pre-transaction/constructAdminData.mjs +12 -18
- package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/functions/pre-transaction/getExternalSwapAddress.d.ts +1 -2
- package/functions/pre-transaction/getExternalSwapAddress.mjs +8 -8
- package/functions/pre-transaction/getFlatFees.cjs +1 -1
- package/functions/pre-transaction/getFlatFees.mjs +22 -30
- package/functions/pre-transaction/getSolanaCalldataHash.cjs +1 -1
- package/functions/pre-transaction/getSolanaCalldataHash.mjs +22 -22
- package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +21 -36
- package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +17 -17
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +1 -9
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +19 -34
- package/functions/pre-transaction/sendV0Transaction.cjs +1 -1
- package/functions/pre-transaction/sendV0Transaction.mjs +53 -50
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +4 -4
- package/functions/pre-transaction/solana-public-signals.cjs +1 -1
- package/functions/pre-transaction/solana-public-signals.d.ts +1 -0
- package/functions/pre-transaction/solana-public-signals.mjs +29 -26
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.d.ts +2 -1
- package/functions/pre-transaction/solana.mjs +89 -80
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +4 -5
- package/functions/private-wallet/emporium.helpers.mjs +94 -109
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.d.ts +1 -4
- package/functions/private-wallet/emporium.swap.helpers.mjs +100 -102
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +1 -1
- package/functions/snarkjs/common.snarkjs.mjs +64 -64
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +1 -2
- package/functions/snarkjs/constructEmporiumProof.mjs +89 -89
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +1 -2
- package/functions/snarkjs/constructGeneralZkProof.mjs +117 -121
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.d.ts +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +58 -59
- package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +11 -10
- package/functions/utils/addresses.cjs +1 -1
- package/functions/utils/addresses.d.ts +1 -0
- package/functions/utils/addresses.mjs +13 -12
- package/functions/utils/bytes32.utils.cjs +1 -1
- package/functions/utils/bytes32.utils.mjs +8 -7
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +2 -2
- package/functions/utils/create-provider.cjs +1 -1
- package/functions/utils/create-provider.d.ts +1 -1
- package/functions/utils/create-provider.mjs +13 -9
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +0 -1
- package/functions/utils/erc20tokenFunctions.mjs +22 -29
- package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.mjs +11 -11
- package/functions/utils/index.d.ts +0 -1
- package/functions/utils/involves-permit2-op.cjs +1 -1
- package/functions/utils/involves-permit2-op.d.ts +0 -1
- package/functions/utils/involves-permit2-op.mjs +4 -6
- package/functions/utils/mutexes.utils.cjs +1 -1
- package/functions/utils/mutexes.utils.d.ts +1 -1
- package/functions/utils/mutexes.utils.mjs +3 -3
- package/functions/utils/nftTokenFunctions.cjs +1 -1
- package/functions/utils/nftTokenFunctions.mjs +8 -23
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.d.ts +6 -13
- package/functions/utils/prepareHinkal.mjs +45 -72
- package/functions/utils/publicBalance.utils.cjs +1 -1
- package/functions/utils/publicBalance.utils.mjs +49 -54
- package/functions/utils/socket.utils.cjs +1 -0
- package/functions/utils/socket.utils.d.ts +1 -0
- package/functions/utils/socket.utils.mjs +12 -0
- package/functions/utils/string.utils.cjs +1 -1
- package/functions/utils/string.utils.d.ts +1 -0
- package/functions/utils/string.utils.mjs +18 -14
- package/functions/utils/token-check.utils.cjs +1 -1
- package/functions/utils/token-check.utils.d.ts +3 -0
- package/functions/utils/token-check.utils.mjs +18 -7
- package/functions/utils/upToDateState.cjs +1 -1
- package/functions/utils/upToDateState.d.ts +1 -1
- package/functions/utils/upToDateState.mjs +4 -4
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +2 -17
- package/functions/utils/walletBalances.utils.mjs +5 -36
- package/functions/web3/crypto.cjs +1 -0
- package/functions/web3/crypto.d.ts +1 -0
- package/functions/web3/crypto.mjs +7 -0
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.d.ts +3 -4
- package/functions/web3/events/getApprovedBalance.mjs +39 -44
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +107 -112
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.ts +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +71 -70
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +38 -38
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +13 -10
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +1 -6
- package/functions/web3/functionCalls/accessTokenCalls.mjs +12 -21
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.d.ts +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +50 -46
- package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -1
- package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +1 -1
- package/functions/web3/functionCalls/approveTokensToHinkal.mjs +6 -6
- package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
- package/functions/web3/functionCalls/estimateGasRelayer.d.ts +1 -2
- package/functions/web3/functionCalls/estimateGasRelayer.mjs +10 -10
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +36 -40
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +36 -34
- package/functions/web3/getContractMetadata.cjs +1 -1
- package/functions/web3/getContractMetadata.mjs +17 -22
- package/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/functions/web3/getPublicAddressBalance.d.ts +1 -1
- package/functions/web3/getPublicAddressBalance.mjs +6 -6
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +27 -27
- package/functions/web3/index.d.ts +1 -0
- package/functions/web3/lifiAPI.cjs +1 -1
- package/functions/web3/lifiAPI.d.ts +1 -1
- package/functions/web3/lifiAPI.mjs +12 -12
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.mjs +6 -19
- package/functions/web3/okxAPI.cjs +1 -1
- package/functions/web3/okxAPI.mjs +22 -22
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.mjs +7 -20
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +38 -56
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.mjs +22 -34
- package/index.cjs +1 -1
- package/index.mjs +941 -949
- package/package.json +3 -2
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +10 -17
- package/providers/EthersProviderAdapter.mjs +45 -76
- package/providers/SolanaProviderAdapter.cjs +1 -1
- package/providers/SolanaProviderAdapter.d.ts +7 -11
- package/providers/SolanaProviderAdapter.mjs +16 -31
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +11 -17
- package/providers/WagmiProviderAdapter.mjs +86 -117
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +15 -9
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +16 -9
- package/types/TransactionSimulator.types.d.ts +2 -9
- package/types/activities.types.d.ts +2 -0
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +0 -6
- package/types/admin.types.mjs +2 -2
- package/types/balances.types.d.ts +0 -1
- package/types/bridging-tx.types.d.ts +17 -0
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +6 -3
- package/types/cache.types.mjs +1 -1
- package/types/coingecko.types.d.ts +5 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +2 -8
- package/types/ethereum-network.types.mjs +1 -1
- package/types/events.types.cjs +1 -0
- package/types/events.types.d.ts +9 -0
- package/types/events.types.mjs +5 -0
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +0 -1
- package/types/external-action.types.mjs +1 -1
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +1 -7
- package/types/hinkal.types.mjs +22 -23
- package/types/index.d.ts +3 -3
- package/types/onramp.types.cjs +1 -0
- package/types/onramp.types.d.ts +58 -0
- package/types/onramp.types.mjs +4 -0
- package/types/proxy.types.d.ts +11 -3
- package/types/sandbox.types.cjs +1 -1
- package/types/sandbox.types.d.ts +10 -39
- package/types/sandbox.types.mjs +2 -2
- package/types/session.types.d.ts +2 -0
- package/types/solana.types.d.ts +9 -0
- package/types/token-prices.types.cjs +1 -1
- package/types/token-prices.types.d.ts +7 -0
- package/types/token-prices.types.mjs +4 -2
- package/types/token.types.d.ts +5 -0
- package/types/transactions.types.cjs +1 -1
- package/types/transactions.types.d.ts +2 -4
- package/types/transactions.types.mjs +3 -3
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
- package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
- package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +2 -2
- package/API/ai-calls.cjs +0 -1
- package/API/ai-calls.d.ts +0 -17
- package/API/ai-calls.mjs +0 -21
- package/API/duneAPI.cjs +0 -1
- package/API/duneAPI.d.ts +0 -11
- package/API/duneAPI.mjs +0 -25
- package/API/getBridgeProtocols.cjs +0 -1
- package/API/getBridgeProtocols.d.ts +0 -7
- package/API/getBridgeProtocols.mjs +0 -8
- package/API/getLifiStatus.cjs +0 -1
- package/API/getLifiStatus.d.ts +0 -24
- package/API/getLifiStatus.mjs +0 -15
- package/API/getRelayerURL.cjs +0 -1
- package/API/getRelayerURL.d.ts +0 -1
- package/API/getRelayerURL.mjs +0 -10
- package/API/passwordCalls.cjs +0 -1
- package/API/passwordCalls.d.ts +0 -9
- package/API/passwordCalls.mjs +0 -13
- package/API/restoreSnapshots.cjs +0 -1
- package/API/restoreSnapshots.d.ts +0 -1
- package/API/restoreSnapshots.mjs +0 -10
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +0 -7
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +0 -42
- package/data-structures/Hinkal/hinkalActionStake.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.cjs +0 -1
- package/data-structures/Hinkal/hinkalApprove.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.mjs +0 -115
- package/data-structures/Hinkal/hinkalInsideTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalInsideTransact.d.ts +0 -4
- package/data-structures/Hinkal/hinkalInsideTransact.mjs +0 -121
- package/error-handling/handleErrorRestore.cjs +0 -1
- package/error-handling/handleErrorRestore.d.ts +0 -2
- package/error-handling/handleErrorRestore.mjs +0 -11
- package/functions/kyc/authentoHelper.cjs +0 -1
- package/functions/kyc/authentoHelper.d.ts +0 -12
- package/functions/kyc/authentoHelper.mjs +0 -30
- package/functions/staking/index.cjs +0 -1
- package/functions/staking/index.d.ts +0 -11
- package/functions/staking/index.mjs +0 -42
- package/functions/utils/get-hinkal-approvals.cjs +0 -1
- package/functions/utils/get-hinkal-approvals.d.ts +0 -3
- package/functions/utils/get-hinkal-approvals.mjs +0 -38
- package/functions/utils/replaceAddressInCalldata.cjs +0 -1
- package/functions/utils/replaceAddressInCalldata.d.ts +0 -1
- package/functions/utils/replaceAddressInCalldata.mjs +0 -7
- package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +0 -1
- package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +0 -5
- package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +0 -32
- package/types/bridging.types.d.ts +0 -29
- package/types/duneAPI.types.d.ts +0 -9
- package/types/hinkal.stake.types.cjs +0 -1
- package/types/hinkal.stake.types.d.ts +0 -11
- package/types/hinkal.stake.types.mjs +0 -4
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
3
|
-
import { ethers as
|
|
4
|
-
import { hashEthereumAddress as
|
|
5
|
-
import { httpClient as
|
|
1
|
+
import { API_CONFIG as r } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SERVER_URL as n } from "./getServerURL.mjs";
|
|
3
|
+
import { ethers as a } from "ethers";
|
|
4
|
+
import { hashEthereumAddress as d } from "../functions/utils/addresses.mjs";
|
|
5
|
+
import { httpClient as c } from "../data-structures/http/HttpClient.mjs";
|
|
6
6
|
import "axios";
|
|
7
|
-
const
|
|
8
|
-
const o = e.getShieldedPrivateKey(),
|
|
9
|
-
return
|
|
10
|
-
},
|
|
11
|
-
const
|
|
12
|
-
return await
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
const i = (t, e) => {
|
|
8
|
+
const o = e.getShieldedPrivateKey(), s = `HinkalProxyAccounts|${t.toLowerCase()}|${o}`;
|
|
9
|
+
return a.utils.keccak256(a.utils.toUtf8Bytes(s));
|
|
10
|
+
}, S = async (t, e) => {
|
|
11
|
+
const o = i(t, e);
|
|
12
|
+
return await c.get(`${n}${r.ROUTES.getProxyAccounts(o)}`);
|
|
13
|
+
}, g = async (t, e, o, s, u) => {
|
|
14
|
+
const p = i(t, e), y = d(t);
|
|
15
|
+
return await c.post(`${n}${r.ROUTES.updateProxyAccounts}`, {
|
|
16
|
+
secureKey: p,
|
|
17
|
+
hashedEthereumAddress: y,
|
|
18
|
+
proxyAccounts: o,
|
|
19
|
+
...s !== void 0 && { username: s },
|
|
20
|
+
...u !== void 0 && { profileImage: u }
|
|
21
21
|
});
|
|
22
|
+
}, K = async (t, e) => {
|
|
23
|
+
const o = i(t, e);
|
|
24
|
+
return (await c.get(
|
|
25
|
+
`${n}${r.ROUTES.isVersion1Account(o)}`
|
|
26
|
+
)).isVersion1Account;
|
|
22
27
|
};
|
|
23
28
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
S as getProxyAccounts,
|
|
30
|
+
K as isVersion1Account,
|
|
31
|
+
g as updateProxyAccounts
|
|
26
32
|
};
|
package/API/relayCalls.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getServerURL.cjs"),n=require("../constants/server.constants.cjs"),s=require("../data-structures/http/HttpClient.cjs");require("axios");const a=async(e,t=!1)=>await s.httpClient.get(`${r.RELAYER_URL}${n.RELAYER_CONFIG.getIdleRelay}?markAsPending=${t}&chainId=${e}`);exports.getIdleRelay=a;
|
package/API/relayCalls.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RELAYER_URL as r } from "./getServerURL.mjs";
|
|
2
2
|
import { RELAYER_CONFIG as o } from "../constants/server.constants.mjs";
|
|
3
3
|
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
6
|
-
`${r
|
|
5
|
+
const R = async (e, t = !1) => await n.get(
|
|
6
|
+
`${r}${o.getIdleRelay}?markAsPending=${t}&chainId=${e}`
|
|
7
7
|
);
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
R as getIdleRelay
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../constants/server.constants.cjs"),r=require("../data-structures/http/HttpClient.cjs"),n=require("./getServerURL.cjs"),s=e=>r.httpClient.get(`${n.RELAYER_URL}${t.RELAYER_CONFIG.getScheduledTransactions(e)}`);exports.getScheduledTransactions=s;
|
|
@@ -2,5 +2,5 @@ import { ScheduledTransactionResponseItem } from '../types';
|
|
|
2
2
|
interface ScheduledTransactionResponseInterface {
|
|
3
3
|
transactions: ScheduledTransactionResponseItem[];
|
|
4
4
|
}
|
|
5
|
-
export declare const getScheduledTransactions: (
|
|
5
|
+
export declare const getScheduledTransactions: (hashedEthereumAddress: string) => Promise<ScheduledTransactionResponseInterface>;
|
|
6
6
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RELAYER_CONFIG as r } from "../constants/server.constants.mjs";
|
|
2
|
-
import { httpClient as
|
|
3
|
-
import {
|
|
4
|
-
const c = (t
|
|
5
|
-
`${
|
|
2
|
+
import { httpClient as e } from "../data-structures/http/HttpClient.mjs";
|
|
3
|
+
import { RELAYER_URL as o } from "./getServerURL.mjs";
|
|
4
|
+
const c = (t) => e.get(
|
|
5
|
+
`${o}${r.getScheduledTransactions(t)}`
|
|
6
6
|
);
|
|
7
7
|
export {
|
|
8
8
|
c as getScheduledTransactions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getServerURL.cjs"),s=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const i=async(e,t)=>await n.httpClient.post(`${r.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./getServerURL.cjs"),s=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const i=async(e,t)=>await n.httpClient.post(`${r.SERVER_URL}${s.API_CONFIG.ROUTES.simulateBatchTx}`,{chainId:e,batchCalls:t});exports.simulateBatchTx=i;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSimulatorResult } from '../types/TransactionSimulator.types';
|
|
2
2
|
import { WCTransactionParameters } from '../types';
|
|
3
|
-
export declare const simulateBatchTx: (chainId: number, batchCalls: WCTransactionParameters[]) => Promise<
|
|
3
|
+
export declare const simulateBatchTx: (chainId: number, batchCalls: WCTransactionParameters[]) => Promise<TransactionSimulatorResult<string>>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { API_CONFIG as
|
|
3
|
-
import { httpClient as
|
|
1
|
+
import { SERVER_URL as r } from "./getServerURL.mjs";
|
|
2
|
+
import { API_CONFIG as s } from "../constants/server.constants.mjs";
|
|
3
|
+
import { httpClient as e } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const c = async (t,
|
|
6
|
-
`${
|
|
5
|
+
const c = async (t, o) => await e.post(
|
|
6
|
+
`${r}${s.ROUTES.simulateBatchTx}`,
|
|
7
7
|
{
|
|
8
|
-
|
|
8
|
+
chainId: t,
|
|
9
|
+
batchCalls: o
|
|
9
10
|
}
|
|
10
11
|
);
|
|
11
12
|
export {
|
package/API/solana-calls.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../data-structures/http/HttpClient.cjs");require("axios");const s=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),r=async e=>t.httpClient.post(`${n.SERVER_URL}${s.API_CONFIG.ROUTES.generateProoflessDepositLimitless}`,e),i=async e=>t.httpClient.post(`${n.SERVER_URL}${s.API_CONFIG.ROUTES.generateMultiPaymentDepositLimitless}`,e),o=async e=>t.httpClient.post(`${n.SERVER_URL}${s.API_CONFIG.ROUTES.generateAddAccessToken}`,e);exports.generateAddAccessToken=o;exports.generateMultiPaymentDepositLimitless=i;exports.generateProoflessDepositLimitless=r;
|
package/API/solana-calls.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ interface GenerateProoflessDepositLimitlessInput {
|
|
|
5
5
|
mint: string;
|
|
6
6
|
amount: string;
|
|
7
7
|
stealthAddressStructure: AnchorStealthAddressStructure;
|
|
8
|
+
chainId: number;
|
|
8
9
|
}
|
|
9
10
|
interface GenerateMultiPaymentDepositLimitlessInput {
|
|
10
11
|
payer: string;
|
|
@@ -12,23 +13,25 @@ interface GenerateMultiPaymentDepositLimitlessInput {
|
|
|
12
13
|
mint: string;
|
|
13
14
|
amounts: string[];
|
|
14
15
|
stealthAddressStructure: AnchorStealthAddressStructure;
|
|
16
|
+
chainId: number;
|
|
15
17
|
}
|
|
16
18
|
interface GenerateProoflessDepositLimitlessOutput {
|
|
17
19
|
serializedTransaction: string;
|
|
18
20
|
blockhash: string;
|
|
19
21
|
lastValidBlockHeight: number;
|
|
20
22
|
}
|
|
21
|
-
export declare const generateProoflessDepositLimitless: (
|
|
22
|
-
export declare const generateMultiPaymentDepositLimitless: (
|
|
23
|
+
export declare const generateProoflessDepositLimitless: (input: GenerateProoflessDepositLimitlessInput) => Promise<GenerateProoflessDepositLimitlessOutput>;
|
|
24
|
+
export declare const generateMultiPaymentDepositLimitless: (input: GenerateMultiPaymentDepositLimitlessInput) => Promise<GenerateProoflessDepositLimitlessOutput>;
|
|
23
25
|
interface GenerateAddTokenPublicKeyInput {
|
|
24
26
|
payer: string;
|
|
25
27
|
accessKey: string;
|
|
26
28
|
ethereumAddress: string;
|
|
29
|
+
chainId: number;
|
|
27
30
|
}
|
|
28
31
|
interface GenerateAddAccessTokenOutput {
|
|
29
32
|
serializedTransaction: string;
|
|
30
33
|
blockhash: string;
|
|
31
34
|
lastValidBlockHeight: number;
|
|
32
35
|
}
|
|
33
|
-
export declare const generateAddAccessToken: (
|
|
36
|
+
export declare const generateAddAccessToken: (input: GenerateAddTokenPublicKeyInput) => Promise<GenerateAddAccessTokenOutput>;
|
|
34
37
|
export {};
|
package/API/solana-calls.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { httpClient as
|
|
1
|
+
import { httpClient as t } from "../data-structures/http/HttpClient.mjs";
|
|
2
2
|
import "axios";
|
|
3
|
-
import { API_CONFIG as
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
`${
|
|
7
|
-
|
|
8
|
-
),
|
|
9
|
-
`${
|
|
10
|
-
|
|
11
|
-
),
|
|
12
|
-
`${
|
|
13
|
-
|
|
3
|
+
import { API_CONFIG as s } from "../constants/server.constants.mjs";
|
|
4
|
+
import { SERVER_URL as o } from "./getServerURL.mjs";
|
|
5
|
+
const p = async (e) => t.post(
|
|
6
|
+
`${o}${s.ROUTES.generateProoflessDepositLimitless}`,
|
|
7
|
+
e
|
|
8
|
+
), a = async (e) => t.post(
|
|
9
|
+
`${o}${s.ROUTES.generateMultiPaymentDepositLimitless}`,
|
|
10
|
+
e
|
|
11
|
+
), c = async (e) => t.post(
|
|
12
|
+
`${o}${s.ROUTES.generateAddAccessToken}`,
|
|
13
|
+
e
|
|
14
14
|
);
|
|
15
15
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
c as generateAddAccessToken,
|
|
17
|
+
a as generateMultiPaymentDepositLimitless,
|
|
18
|
+
p as generateProoflessDepositLimitless
|
|
19
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const a=require("./getServerURL.cjs"),l=async(e,t)=>n.httpClient.get(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.getTemporaryWalletNonces(t,e)}`),c=async(e,t,r)=>n.httpClient.post(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.addTemporaryWalletNonce}`,{hashedEthereumAddress:t,chainId:e,nonce:r}),s=async(e,t,r)=>n.httpClient.post(`${a.SERVER_URL}${o.API_CONFIG.ROUTES.removeTemporaryWalletNonce}`,{hashedEthereumAddress:t,chainId:e,nonce:r});exports.addTemporaryWalletNonce=c;exports.getTemporaryWalletNonces=l;exports.removeTemporaryWalletNonce=s;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface IGetTemporaryWalletNonces {
|
|
2
|
+
nonces: number[];
|
|
3
|
+
}
|
|
4
|
+
export declare const getTemporaryWalletNonces: (chainId: number, hashedEthereumAddress: string) => Promise<IGetTemporaryWalletNonces>;
|
|
5
|
+
interface IAddTemporaryWalletNonce {
|
|
6
|
+
success: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const addTemporaryWalletNonce: (chainId: number, hashedEthereumAddress: string, nonce: number) => Promise<IAddTemporaryWalletNonce>;
|
|
9
|
+
interface IRemoveTemporaryWalletNonce {
|
|
10
|
+
success: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const removeTemporaryWalletNonce: (chainId: number, hashedEthereumAddress: string, nonce: number) => Promise<IRemoveTemporaryWalletNonce>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { API_CONFIG as t } from "../constants/server.constants.mjs";
|
|
2
|
+
import { httpClient as a } from "../data-structures/http/HttpClient.mjs";
|
|
3
|
+
import "axios";
|
|
4
|
+
import { SERVER_URL as n } from "./getServerURL.mjs";
|
|
5
|
+
const s = async (e, r) => a.get(
|
|
6
|
+
`${n}${t.ROUTES.getTemporaryWalletNonces(r, e)}`
|
|
7
|
+
), y = async (e, r, o) => a.post(`${n}${t.ROUTES.addTemporaryWalletNonce}`, {
|
|
8
|
+
hashedEthereumAddress: r,
|
|
9
|
+
chainId: e,
|
|
10
|
+
nonce: o
|
|
11
|
+
}), T = async (e, r, o) => a.post(`${n}${t.ROUTES.removeTemporaryWalletNonce}`, {
|
|
12
|
+
hashedEthereumAddress: r,
|
|
13
|
+
chainId: e,
|
|
14
|
+
nonce: o
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
y as addTemporaryWalletNonce,
|
|
18
|
+
s as getTemporaryWalletNonces,
|
|
19
|
+
T as removeTemporaryWalletNonce
|
|
20
|
+
};
|
package/API/token-calls.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/server.constants.cjs"),s=require("./getServerURL.cjs"),o=require("../data-structures/http/HttpClient.cjs");require("axios");const i=async(e,t,n=!1)=>await o.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.getTokensInfo}`,{chainId:e,tokenAddresses:t,waitForOffsetUpdate:n});exports.tokensInfoCall=i;
|
package/API/token-calls.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
1
|
+
import { API_CONFIG as e } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SERVER_URL as n } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as s } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const l = async (o, t,
|
|
6
|
-
`${n
|
|
5
|
+
const l = async (o, t, r = !1) => await s.post(
|
|
6
|
+
`${n}${e.ROUTES.getTokensInfo}`,
|
|
7
7
|
{
|
|
8
|
+
chainId: o,
|
|
8
9
|
tokenAddresses: t,
|
|
9
|
-
waitForOffsetUpdate:
|
|
10
|
+
waitForOffsetUpdate: r
|
|
10
11
|
}
|
|
11
12
|
);
|
|
12
13
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/server.constants.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/server.constants.cjs"),o=require("./getServerURL.cjs"),r=require("../data-structures/http/HttpClient.cjs"),U=t=>{const e=t.getBasicUtxoParams(),n=t.getCommitment(),i=t.getNullifier();return{...e,amount:e.amount.toString(),randomization:e.randomization?.toString(),commitment:n,nullifier:i}},a=t=>r.httpClient.post(`${o.RELAYER_URL}${s.RELAYER_CONFIG.storeUnspentUtxos}`,{hashedEthereumAddress:t.hashedEthereumAddress,chainId:t.chainId,utxos:t.utxos.map(e=>U(e))}),p=(t,e)=>r.httpClient.get(`${o.RELAYER_URL}${s.RELAYER_CONFIG.getUnspentUtxos(t,e)}`),c=(t,e,n)=>r.httpClient.delete(`${o.RELAYER_URL}${s.RELAYER_CONFIG.deleteUnspentUtxos}`,{data:{hashedEthereumAddress:e,nullifiers:n,chainId:t}});exports.deleteUnspentUtxos=c;exports.getUnspentUtxos=p;exports.storeUnspentUtxos=a;
|
|
@@ -8,10 +8,10 @@ interface StoreUnspentUtxosResponse {
|
|
|
8
8
|
status: string;
|
|
9
9
|
message: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const storeUnspentUtxos: (
|
|
11
|
+
export declare const storeUnspentUtxos: (body: StoreUnspentUtxosRequestBody) => Promise<StoreUnspentUtxosResponse>;
|
|
12
12
|
interface UnspentUtxo {
|
|
13
13
|
id: string;
|
|
14
|
-
utxo: IUtxoConstructor<string>;
|
|
14
|
+
utxo: Omit<IUtxoConstructor<string>, 'shieldedPrivateKey' | 'encryptionKey'>;
|
|
15
15
|
}
|
|
16
16
|
interface GetUnspentUtxosResponse {
|
|
17
17
|
status: string;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { RELAYER_CONFIG as o } from "../constants/server.constants.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { RELAYER_URL as s } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as r } from "../data-structures/http/HttpClient.mjs";
|
|
4
|
-
const
|
|
5
|
-
const t =
|
|
4
|
+
const m = (t) => {
|
|
5
|
+
const e = t.getBasicUtxoParams(), n = t.getCommitment(), i = t.getNullifier();
|
|
6
6
|
return {
|
|
7
|
-
...
|
|
8
|
-
amount:
|
|
9
|
-
randomization:
|
|
7
|
+
...e,
|
|
8
|
+
amount: e.amount.toString(),
|
|
9
|
+
randomization: e.randomization?.toString(),
|
|
10
|
+
commitment: n,
|
|
11
|
+
nullifier: i
|
|
10
12
|
};
|
|
11
|
-
},
|
|
13
|
+
}, d = (t) => r.post(`${s}${o.storeUnspentUtxos}`, {
|
|
12
14
|
hashedEthereumAddress: t.hashedEthereumAddress,
|
|
13
15
|
chainId: t.chainId,
|
|
14
|
-
utxos: t.utxos.map((
|
|
15
|
-
}),
|
|
16
|
-
`${s
|
|
17
|
-
), u = (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
data: { hashedEthereumAddress: t, nullifiers: n }
|
|
21
|
-
}
|
|
22
|
-
);
|
|
16
|
+
utxos: t.utxos.map((e) => m(e))
|
|
17
|
+
}), c = (t, e) => r.get(
|
|
18
|
+
`${s}${o.getUnspentUtxos(t, e)}`
|
|
19
|
+
), u = (t, e, n) => r.delete(`${s}${o.deleteUnspentUtxos}`, {
|
|
20
|
+
data: { hashedEthereumAddress: e, nullifiers: n, chainId: t }
|
|
21
|
+
});
|
|
23
22
|
export {
|
|
24
23
|
u as deleteUnspentUtxos,
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
c as getUnspentUtxos,
|
|
25
|
+
d as storeUnspentUtxos
|
|
27
26
|
};
|