@hinkal/common 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API/API.cjs +1 -1
- package/API/API.d.ts +8 -13
- package/API/API.mjs +86 -94
- package/API/admin-calls.cjs +1 -1
- package/API/admin-calls.d.ts +1 -1
- package/API/admin-calls.mjs +4 -4
- package/API/callLifiAPI.cjs +1 -1
- package/API/callLifiAPI.d.ts +1 -1
- package/API/callLifiAPI.mjs +5 -5
- package/API/callMonitor.cjs +1 -1
- package/API/callMonitor.d.ts +1 -1
- package/API/callMonitor.mjs +7 -7
- package/API/callOdosAPI.cjs +1 -1
- package/API/callOdosAPI.mjs +11 -11
- package/API/callOkxAPI.cjs +1 -1
- package/API/callOkxAPI.d.ts +1 -1
- package/API/callOkxAPI.mjs +5 -5
- package/API/callOneInchAPI.cjs +1 -1
- package/API/callOneInchAPI.mjs +10 -11
- package/API/callRelayer.cjs +1 -1
- package/API/callRelayer.d.ts +6 -3
- package/API/callRelayer.mjs +11 -11
- package/API/checkRisk.cjs +1 -1
- package/API/checkRisk.d.ts +1 -1
- package/API/checkRisk.mjs +4 -4
- package/API/fetchCommitmentsCache.cjs +1 -1
- package/API/fetchCommitmentsCache.mjs +9 -9
- package/API/get-token-data.cjs +1 -1
- package/API/get-token-data.d.ts +1 -1
- package/API/get-token-data.mjs +5 -5
- package/API/get-token-price-chart-data.cjs +1 -0
- package/API/get-token-price-chart-data.d.ts +16 -0
- package/API/get-token-price-chart-data.mjs +13 -0
- package/API/getGasEstimates.cjs +1 -1
- package/API/getGasEstimates.mjs +9 -9
- package/API/getServerURL.cjs +1 -1
- package/API/getServerURL.d.ts +3 -3
- package/API/getServerURL.mjs +51 -67
- package/API/getTokenPrice.cjs +1 -1
- package/API/getTokenPrice.d.ts +5 -0
- package/API/getTokenPrice.mjs +14 -7
- package/API/getWebsiteURL.d.ts +1 -1
- package/API/index.d.ts +0 -3
- package/API/is-tx-stateless.cjs +1 -1
- package/API/is-tx-stateless.d.ts +1 -1
- package/API/is-tx-stateless.mjs +10 -12
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +4 -8
- package/API/kycCalls.mjs +23 -26
- package/API/onrampCalls.cjs +1 -0
- package/API/onrampCalls.d.ts +20 -0
- package/API/onrampCalls.mjs +15 -0
- package/API/proxyAccountsCalls.cjs +1 -1
- package/API/proxyAccountsCalls.d.ts +2 -2
- package/API/proxyAccountsCalls.mjs +19 -19
- package/API/relayCalls.cjs +1 -1
- package/API/relayCalls.mjs +4 -4
- package/API/scheduled-transactions-calls.cjs +1 -1
- package/API/scheduled-transactions-calls.d.ts +1 -1
- package/API/scheduled-transactions-calls.mjs +4 -4
- package/API/simulate-batch-tx.cjs +1 -1
- package/API/simulate-batch-tx.d.ts +2 -2
- package/API/simulate-batch-tx.mjs +7 -6
- package/API/solana-calls.cjs +1 -1
- package/API/solana-calls.d.ts +6 -3
- package/API/solana-calls.mjs +15 -15
- package/API/token-calls.cjs +1 -1
- package/API/token-calls.mjs +6 -5
- package/API/unspent-utxos-calls.cjs +1 -1
- package/API/unspent-utxos-calls.d.ts +1 -1
- package/API/unspent-utxos-calls.mjs +15 -18
- package/README.md +237 -61
- package/constants/addresses.constants.cjs +1 -1
- package/constants/addresses.constants.d.ts +0 -1
- package/constants/addresses.constants.mjs +7 -8
- package/constants/chains.constants.cjs +1 -1
- package/constants/chains.constants.d.ts +0 -5
- package/constants/chains.constants.mjs +21 -26
- package/constants/coingecko.constants.cjs +1 -1
- package/constants/coingecko.constants.d.ts +1 -0
- package/constants/coingecko.constants.mjs +11 -10
- package/constants/contracts.constants.cjs +1 -1
- package/constants/contracts.constants.mjs +34 -41
- package/constants/function-signatures.constants.cjs +1 -1
- package/constants/function-signatures.constants.d.ts +0 -1
- package/constants/function-signatures.constants.mjs +3 -4
- package/constants/mediaUrls.constants.cjs +1 -1
- package/constants/mediaUrls.constants.d.ts +2 -0
- package/constants/mediaUrls.constants.mjs +3 -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 +14 -122
- package/constants/server.constants.mjs +44 -152
- package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistry.json.mjs +0 -24
- package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
- package/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -24
- package/constants/token-data/index.d.ts +32 -88
- package/constants/token-data/localhostRegistry.json.cjs +1 -1
- package/constants/token-data/localhostRegistry.json.mjs +0 -26
- package/constants/token-data/popularTokens.constants.cjs +1 -1
- package/constants/token-data/popularTokens.constants.mjs +0 -1
- package/constants/vite.constants.cjs +1 -1
- package/constants/vite.constants.mjs +36 -13
- package/data-structures/Hinkal/Hinkal.cjs +1 -1
- package/data-structures/Hinkal/Hinkal.d.ts +34 -49
- package/data-structures/Hinkal/Hinkal.mjs +238 -301
- package/data-structures/Hinkal/IHinkal.d.ts +33 -48
- package/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.d.ts +1 -1
- package/data-structures/Hinkal/handleAutoDepositBack.mjs +42 -42
- package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -1
- package/data-structures/Hinkal/hinkalActionReceive.mjs +25 -23
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
- package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +9 -9
- package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalDeposit.mjs +95 -93
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +147 -133
- package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +1 -2
- package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +1 -1
- package/data-structures/Hinkal/hinkalPrivateWallet.mjs +107 -115
- package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +36 -34
- package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxySwap.mjs +34 -33
- package/data-structures/Hinkal/hinkalProxyToPrivate.cjs +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.d.ts +1 -1
- package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +26 -24
- package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
- package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +1 -2
- package/data-structures/Hinkal/hinkalSignSubAccount.mjs +8 -9
- package/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDeposit.d.ts +4 -3
- package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +86 -97
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +146 -146
- package/data-structures/Hinkal/hinkalSolanaProxySend.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySend.d.ts +2 -3
- package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +38 -38
- package/data-structures/Hinkal/hinkalSolanaProxyShield.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +57 -56
- package/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +59 -58
- package/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaSwap.mjs +83 -79
- package/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +49 -48
- package/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.d.ts +2 -1
- package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +67 -64
- package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
- package/data-structures/Hinkal/hinkalSwap.d.ts +1 -1
- package/data-structures/Hinkal/hinkalSwap.mjs +75 -87
- package/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
- package/data-structures/Hinkal/hinkalTransfer.d.ts +1 -1
- package/data-structures/Hinkal/hinkalTransfer.mjs +55 -58
- package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdraw.mjs +80 -82
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.d.ts +2 -2
- package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +87 -90
- package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.d.ts +1 -1
- package/data-structures/Hinkal/resetMerkleTrees.mjs +105 -53
- package/data-structures/IndexedDB/activity-db.cjs +1 -1
- package/data-structures/IndexedDB/activity-db.mjs +7 -7
- package/data-structures/IndexedDB/balances-db.cjs +1 -1
- package/data-structures/IndexedDB/balances-db.mjs +8 -8
- package/data-structures/IndexedDB/contact-db.cjs +1 -1
- package/data-structures/IndexedDB/contact-db.mjs +10 -10
- package/data-structures/IndexedDB/signatures-db.cjs +1 -1
- package/data-structures/IndexedDB/signatures-db.mjs +25 -40
- package/data-structures/TokenDBs/EventsPublicTokensDB.cjs +1 -1
- package/data-structures/TokenDBs/EventsPublicTokensDB.mjs +10 -11
- package/data-structures/TokenDBs/token-visibility-db.cjs +1 -1
- package/data-structures/TokenDBs/token-visibility-db.mjs +22 -36
- package/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.d.ts +1 -1
- package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +14 -14
- package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractEventService.d.ts +1 -0
- package/data-structures/event-service/evm/AbstractEventService.mjs +7 -4
- package/data-structures/event-service/evm/AbstractSnapshotService.cjs +1 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.d.ts +0 -1
- package/data-structures/event-service/evm/AbstractSnapshotService.mjs +3 -4
- package/data-structures/event-service/evm/BlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.d.ts +3 -1
- package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +17 -14
- package/data-structures/event-service/solana/AbstractSolanaEventService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaEventService.d.ts +1 -0
- package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +9 -6
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.cjs +1 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.d.ts +0 -1
- package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +1 -2
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.cjs +1 -1
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.d.ts +3 -2
- package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +42 -45
- package/data-structures/provider-adapter/IProviderAdapter.d.ts +8 -13
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +3 -4
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +3 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +3 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +2 -4
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
- package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +3 -4
- package/data-structures/utxo/Utxo.cjs +1 -1
- package/data-structures/utxo/Utxo.d.ts +1 -7
- package/data-structures/utxo/Utxo.mjs +26 -36
- package/error-handling/error-codes.constants.cjs +1 -1
- package/error-handling/error-codes.constants.d.ts +3 -0
- package/error-handling/error-codes.constants.mjs +5 -2
- package/error-handling/get-error.message.cjs +1 -1
- package/error-handling/get-error.message.mjs +21 -27
- package/error-handling/index.d.ts +0 -1
- package/functions/index.d.ts +0 -1
- package/functions/kyc/zkMeHelper.cjs +1 -1
- package/functions/kyc/zkMeHelper.mjs +18 -17
- package/functions/pre-transaction/constructAdminData.cjs +1 -1
- package/functions/pre-transaction/constructAdminData.d.ts +2 -2
- package/functions/pre-transaction/constructAdminData.mjs +12 -18
- package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -1
- package/functions/pre-transaction/getExternalSwapAddress.d.ts +1 -2
- package/functions/pre-transaction/getExternalSwapAddress.mjs +8 -8
- package/functions/pre-transaction/getFlatFees.cjs +1 -1
- package/functions/pre-transaction/getFlatFees.mjs +22 -30
- package/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
- package/functions/pre-transaction/getVolatileTransferAmount.mjs +21 -36
- package/functions/pre-transaction/merge-with-fee-structure-emporium.cjs +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.d.ts +1 -1
- package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +17 -17
- package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
- package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +1 -9
- package/functions/pre-transaction/outputApprovalDataProcessing.mjs +19 -34
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +1 -1
- package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +4 -4
- package/functions/pre-transaction/solana-public-signals.cjs +1 -1
- package/functions/pre-transaction/solana-public-signals.d.ts +1 -0
- package/functions/pre-transaction/solana-public-signals.mjs +29 -26
- package/functions/pre-transaction/solana.cjs +1 -1
- package/functions/pre-transaction/solana.d.ts +2 -1
- package/functions/pre-transaction/solana.mjs +60 -51
- package/functions/private-wallet/emporium.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.helpers.d.ts +3 -5
- package/functions/private-wallet/emporium.helpers.mjs +95 -135
- package/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
- package/functions/private-wallet/emporium.swap.helpers.d.ts +1 -4
- package/functions/private-wallet/emporium.swap.helpers.mjs +100 -102
- package/functions/snarkjs/common.snarkjs.cjs +1 -1
- package/functions/snarkjs/common.snarkjs.d.ts +1 -1
- package/functions/snarkjs/common.snarkjs.mjs +64 -64
- package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
- package/functions/snarkjs/constructEmporiumProof.d.ts +2 -2
- package/functions/snarkjs/constructEmporiumProof.mjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
- package/functions/snarkjs/constructGeneralZkProof.d.ts +2 -3
- package/functions/snarkjs/constructGeneralZkProof.mjs +117 -121
- package/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
- package/functions/snarkjs/constructSolanaZkProof.d.ts +1 -1
- package/functions/snarkjs/constructSolanaZkProof.mjs +54 -59
- package/functions/snarkjs/fetchMerkleTreeSiblings.cjs +1 -1
- package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +11 -10
- package/functions/snarkjs/generateCircomData.d.ts +1 -1
- package/functions/utils/addresses.cjs +1 -1
- package/functions/utils/addresses.d.ts +1 -0
- package/functions/utils/addresses.mjs +13 -12
- package/functions/utils/cacheFunctions.cjs +1 -1
- package/functions/utils/cacheFunctions.mjs +2 -2
- package/functions/utils/enum.utils.cjs +1 -0
- package/functions/utils/enum.utils.mjs +14 -0
- package/functions/utils/erc20tokenFunctions.cjs +1 -1
- package/functions/utils/erc20tokenFunctions.d.ts +0 -1
- package/functions/utils/erc20tokenFunctions.mjs +22 -29
- package/functions/utils/get-hinkal-approvals.cjs +1 -1
- package/functions/utils/get-hinkal-approvals.d.ts +1 -1
- package/functions/utils/get-hinkal-approvals.mjs +16 -16
- package/functions/utils/getDataFromTransaction.d.ts +3 -3
- package/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.d.ts +1 -1
- package/functions/utils/getUtxosFromReceipt.utils.mjs +11 -11
- package/functions/utils/involves-permit2-op.cjs +1 -1
- package/functions/utils/involves-permit2-op.d.ts +0 -1
- package/functions/utils/involves-permit2-op.mjs +4 -6
- package/functions/utils/mutexes.utils.cjs +1 -1
- package/functions/utils/mutexes.utils.d.ts +1 -1
- package/functions/utils/mutexes.utils.mjs +3 -3
- package/functions/utils/nftTokenFunctions.cjs +1 -1
- package/functions/utils/nftTokenFunctions.mjs +8 -23
- package/functions/utils/prepareHinkal.cjs +1 -1
- package/functions/utils/prepareHinkal.d.ts +0 -6
- package/functions/utils/prepareHinkal.mjs +41 -60
- package/functions/utils/token-check.utils.cjs +1 -1
- package/functions/utils/token-check.utils.d.ts +3 -0
- package/functions/utils/token-check.utils.mjs +18 -7
- package/functions/utils/upToDateState.cjs +1 -1
- package/functions/utils/upToDateState.d.ts +1 -1
- package/functions/utils/upToDateState.mjs +4 -4
- package/functions/utils/walletBalances.utils.cjs +1 -1
- package/functions/utils/walletBalances.utils.d.ts +1 -16
- package/functions/utils/walletBalances.utils.mjs +4 -35
- package/functions/web3/events/getApprovedBalance.cjs +1 -1
- package/functions/web3/events/getApprovedBalance.d.ts +3 -4
- package/functions/web3/events/getApprovedBalance.mjs +39 -44
- package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.d.ts +1 -1
- package/functions/web3/events/getInputUtxoAndBalance.mjs +114 -121
- package/functions/web3/events/getInputUtxosEnclave.d.ts +1 -1
- package/functions/web3/events/getShieldedBalance.cjs +2 -2
- package/functions/web3/events/getShieldedBalance.d.ts +1 -1
- package/functions/web3/events/getShieldedBalance.mjs +71 -70
- package/functions/web3/events/getTransactionLogEvents.cjs +1 -1
- package/functions/web3/events/getTransactionLogEvents.mjs +7 -7
- package/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
- package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +7 -7
- package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
- package/functions/web3/functionCalls/accessTokenCalls.d.ts +1 -6
- package/functions/web3/functionCalls/accessTokenCalls.mjs +12 -21
- package/functions/web3/functionCalls/approveToken.cjs +1 -1
- package/functions/web3/functionCalls/approveToken.d.ts +1 -1
- package/functions/web3/functionCalls/approveToken.mjs +71 -63
- 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/recoverTransactionFromError.cjs +1 -0
- package/functions/web3/functionCalls/recoverTransactionFromError.d.ts +2 -0
- package/functions/web3/functionCalls/recoverTransactionFromError.mjs +23 -0
- package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
- package/functions/web3/functionCalls/transactCallDirect.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallDirect.mjs +45 -36
- package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.d.ts +1 -1
- package/functions/web3/functionCalls/transactCallRelayer.mjs +44 -43
- package/functions/web3/getPublicAddressBalance.cjs +1 -1
- package/functions/web3/getPublicAddressBalance.d.ts +1 -1
- package/functions/web3/getPublicAddressBalance.mjs +6 -6
- package/functions/web3/getTokenHolder.cjs +1 -1
- package/functions/web3/getTokenHolder.mjs +8 -8
- package/functions/web3/lifiAPI.cjs +1 -1
- package/functions/web3/lifiAPI.d.ts +1 -1
- package/functions/web3/lifiAPI.mjs +12 -12
- package/functions/web3/odosAPI.cjs +1 -1
- package/functions/web3/odosAPI.mjs +6 -19
- package/functions/web3/okxAPI.cjs +1 -1
- package/functions/web3/okxAPI.mjs +22 -22
- package/functions/web3/oneInchAPI.cjs +1 -1
- package/functions/web3/oneInchAPI.mjs +7 -20
- package/functions/web3/runContractFunction.cjs +1 -1
- package/functions/web3/runContractFunction.mjs +38 -56
- package/functions/web3/uniswapAPI.cjs +1 -1
- package/functions/web3/uniswapAPI.mjs +22 -34
- package/index.cjs +1 -1
- package/index.mjs +937 -967
- package/package.json +2 -2
- package/providers/EthersProviderAdapter.cjs +1 -1
- package/providers/EthersProviderAdapter.d.ts +10 -17
- package/providers/EthersProviderAdapter.mjs +48 -76
- package/providers/SolanaProviderAdapter.cjs +1 -1
- package/providers/SolanaProviderAdapter.d.ts +7 -11
- package/providers/SolanaProviderAdapter.mjs +16 -31
- package/providers/WagmiProviderAdapter.cjs +1 -1
- package/providers/WagmiProviderAdapter.d.ts +11 -17
- package/providers/WagmiProviderAdapter.mjs +86 -117
- package/providers/prepareEthersHinkal.cjs +1 -1
- package/providers/prepareEthersHinkal.mjs +6 -7
- package/providers/prepareWagmiHinkal.cjs +1 -1
- package/providers/prepareWagmiHinkal.mjs +5 -5
- package/types/TransactionSimulator.types.d.ts +2 -9
- package/types/admin.types.cjs +1 -1
- package/types/admin.types.d.ts +3 -7
- package/types/admin.types.mjs +2 -2
- package/types/balances.types.d.ts +0 -1
- package/types/cache.types.cjs +1 -1
- package/types/cache.types.d.ts +2 -3
- package/types/cache.types.mjs +1 -1
- package/types/coingecko.types.d.ts +5 -0
- package/types/ethereum-network.types.cjs +1 -1
- package/types/ethereum-network.types.d.ts +1 -8
- package/types/ethereum-network.types.mjs +1 -1
- package/types/external-action.types.cjs +1 -1
- package/types/external-action.types.d.ts +0 -1
- package/types/external-action.types.mjs +1 -1
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +1 -7
- package/types/hinkal.types.mjs +22 -23
- package/types/index.d.ts +1 -3
- package/types/onramp.types.cjs +1 -0
- package/types/onramp.types.d.ts +58 -0
- package/types/onramp.types.mjs +4 -0
- package/types/proxy.types.d.ts +1 -0
- package/types/sandbox.types.cjs +1 -1
- package/types/sandbox.types.d.ts +8 -39
- package/types/sandbox.types.mjs +2 -2
- package/types/session.types.d.ts +2 -0
- package/types/solana.types.d.ts +3 -0
- package/types/token-prices.types.cjs +1 -1
- package/types/token-prices.types.d.ts +7 -0
- package/types/token-prices.types.mjs +4 -2
- package/types/transactions.types.cjs +1 -1
- package/types/transactions.types.d.ts +6 -4
- package/types/transactions.types.mjs +4 -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 +1 -1
- package/API/ai-calls.cjs +0 -1
- package/API/ai-calls.d.ts +0 -17
- package/API/ai-calls.mjs +0 -21
- package/API/duneAPI.cjs +0 -1
- package/API/duneAPI.d.ts +0 -11
- package/API/duneAPI.mjs +0 -25
- package/API/getBridgeProtocols.cjs +0 -1
- package/API/getBridgeProtocols.d.ts +0 -7
- package/API/getBridgeProtocols.mjs +0 -8
- package/API/getLifiStatus.cjs +0 -1
- package/API/getLifiStatus.d.ts +0 -24
- package/API/getLifiStatus.mjs +0 -15
- package/API/getRelayerURL.cjs +0 -1
- package/API/getRelayerURL.d.ts +0 -1
- package/API/getRelayerURL.mjs +0 -10
- package/API/passwordCalls.cjs +0 -1
- package/API/passwordCalls.d.ts +0 -9
- package/API/passwordCalls.mjs +0 -13
- package/API/restoreSnapshots.cjs +0 -1
- package/API/restoreSnapshots.d.ts +0 -1
- package/API/restoreSnapshots.mjs +0 -10
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +0 -7
- package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +0 -42
- package/data-structures/Hinkal/hinkalActionStake.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.cjs +0 -1
- package/data-structures/Hinkal/hinkalApprove.d.ts +0 -3
- package/data-structures/Hinkal/hinkalApprove.mjs +0 -115
- package/data-structures/Hinkal/hinkalInsideTransact.cjs +0 -1
- package/data-structures/Hinkal/hinkalInsideTransact.d.ts +0 -4
- package/data-structures/Hinkal/hinkalInsideTransact.mjs +0 -121
- package/error-handling/handleErrorRestore.cjs +0 -1
- package/error-handling/handleErrorRestore.d.ts +0 -2
- package/error-handling/handleErrorRestore.mjs +0 -11
- package/functions/staking/index.cjs +0 -1
- package/functions/staking/index.d.ts +0 -11
- package/functions/staking/index.mjs +0 -42
- package/functions/utils/replaceAddressInCalldata.cjs +0 -1
- package/functions/utils/replaceAddressInCalldata.d.ts +0 -1
- package/functions/utils/replaceAddressInCalldata.mjs +0 -7
- package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +0 -1
- package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +0 -5
- package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +0 -32
- package/types/bridging.types.d.ts +0 -29
- package/types/duneAPI.types.d.ts +0 -9
- package/types/hinkal.stake.types.cjs +0 -1
- package/types/hinkal.stake.types.d.ts +0 -11
- package/types/hinkal.stake.types.mjs +0 -4
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
1
|
+
import { API_CONFIG as p } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SNAPSHOT_SERVER_URL as h } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as e } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
6
|
-
const { commitments: a, accessTokens: o, nullifiers:
|
|
7
|
-
`${h
|
|
8
|
-
), [i, m, l,
|
|
5
|
+
const T = async (r) => {
|
|
6
|
+
const { commitments: a, accessTokens: o, nullifiers: n, approvals: s } = await e.get(
|
|
7
|
+
`${h}${p.ROUTES.getSnapshots(r)}`
|
|
8
|
+
), [i, m, l, c] = await Promise.all([
|
|
9
9
|
e.get(a.url).then((t) => ({ ...t, ...a })),
|
|
10
10
|
e.get(o.url).then((t) => ({ ...t, ...o })),
|
|
11
|
-
e.get(
|
|
11
|
+
e.get(n.url).then((t) => ({ ...t, ...n })),
|
|
12
12
|
s ? e.get(s.url).then((t) => ({ ...t, ...s })) : void 0
|
|
13
13
|
]);
|
|
14
14
|
return {
|
|
15
15
|
commitments: i,
|
|
16
16
|
accessTokens: m,
|
|
17
17
|
nullifiers: l,
|
|
18
|
-
approvals:
|
|
18
|
+
approvals: c
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
T as fetchSnapshots
|
|
23
23
|
};
|
package/API/get-token-data.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("../constants/server.constants.cjs"),r=require("./getServerURL.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const o=async e=>n.httpClient.get(`${r.SERVER_URL}${t.API_CONFIG.ROUTES.getTokenData(e)}`);exports.getTokenData=o;
|
package/API/get-token-data.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ interface TokenDataResponse {
|
|
|
2
2
|
totalSupply: number;
|
|
3
3
|
marketCap: number;
|
|
4
4
|
}
|
|
5
|
-
export declare const getTokenData: (
|
|
5
|
+
export declare const getTokenData: (tokenSymbol: string) => Promise<TokenDataResponse>;
|
|
6
6
|
export {};
|
package/API/get-token-data.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
3
|
-
import { httpClient as
|
|
1
|
+
import { API_CONFIG as o } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SERVER_URL as r } from "./getServerURL.mjs";
|
|
3
|
+
import { httpClient as e } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
5
|
+
const i = async (t) => e.get(`${r}${o.ROUTES.getTokenData(t)}`);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
i as getTokenData
|
|
8
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs"),o=require("./getServerURL.cjs"),s=async(e,t)=>await n.httpClient.post(`${o.RELAYER_URL}${r.RELAYER_CONFIG.getTokenPriceChartData}`,{chainId:e,erc20Address:t});exports.getTokenPriceChartData=s;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TokenPriceTimeframe } from '../types/token-prices.types';
|
|
2
|
+
export interface TimeframeSeries {
|
|
3
|
+
pricesData: number[][];
|
|
4
|
+
priceChange: number;
|
|
5
|
+
}
|
|
6
|
+
export interface GetTokenPriceChartDataResponse {
|
|
7
|
+
status: 'success' | 'failed';
|
|
8
|
+
tokenPriceChartData: {
|
|
9
|
+
[TokenPriceTimeframe.ONE_WEEK]: TimeframeSeries;
|
|
10
|
+
[TokenPriceTimeframe.ONE_MONTH]: TimeframeSeries;
|
|
11
|
+
[TokenPriceTimeframe.THREE_MONTHS]: TimeframeSeries;
|
|
12
|
+
[TokenPriceTimeframe.ONE_YEAR]: TimeframeSeries;
|
|
13
|
+
[TokenPriceTimeframe.ALL_TIME]: TimeframeSeries;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare const getTokenPriceChartData: (chainId: number, erc20Address: string) => Promise<GetTokenPriceChartDataResponse>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RELAYER_CONFIG as o } from "../constants/server.constants.mjs";
|
|
2
|
+
import { httpClient as e } from "../data-structures/http/HttpClient.mjs";
|
|
3
|
+
import { RELAYER_URL as a } from "./getServerURL.mjs";
|
|
4
|
+
const m = async (t, r) => await e.post(
|
|
5
|
+
`${a}${o.getTokenPriceChartData}`,
|
|
6
|
+
{
|
|
7
|
+
chainId: t,
|
|
8
|
+
erc20Address: r
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
export {
|
|
12
|
+
m as getTokenPriceChartData
|
|
13
|
+
};
|
package/API/getGasEstimates.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../constants/server.constants.cjs"),c=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../constants/server.constants.cjs"),c=require("./getServerURL.cjs"),u=require("../data-structures/http/HttpClient.cjs");require("axios");const E=async(t,e,s,r,i,n,a)=>u.httpClient.post(`${c.RELAYER_URL}${o.RELAYER_CONFIG.getGasEstimate(e,s,r,n)}`,{calls:i,solanaTransactionParams:a,chainId:t});exports.getGasEstimates=E;
|
package/API/getGasEstimates.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { RELAYER_CONFIG as p } from "../constants/server.constants.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { httpClient as
|
|
2
|
+
import { RELAYER_URL as E } from "./getServerURL.mjs";
|
|
3
|
+
import { httpClient as a } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
6
|
-
`${
|
|
7
|
-
r,
|
|
8
|
-
e,
|
|
5
|
+
const L = async (t, o, r, m, s, e, i) => a.post(
|
|
6
|
+
`${E}${p.getGasEstimate(
|
|
9
7
|
o,
|
|
10
|
-
|
|
8
|
+
r,
|
|
9
|
+
m,
|
|
10
|
+
e
|
|
11
11
|
)}`,
|
|
12
|
-
{ calls:
|
|
12
|
+
{ calls: s, solanaTransactionParams: i, chainId: t }
|
|
13
13
|
);
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
L as getGasEstimates
|
|
16
16
|
};
|
package/API/getServerURL.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 E=require("../constants/server.constants.cjs"),R=require("../constants/vite.constants.cjs"),N=()=>{switch(R.deploymentMode){case R.DEPLOYMENT_MODE.DEVELOPMENT:return`${E.STAGING_URL}${E.SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PLAYGROUND:return`${E.PLAYGROUND_URL}${E.SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.STAGING:return`${E.STAGING_URL}${E.SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PRODUCTION:return`${E.PRODUCTION_URL}${E.SERVER_URL_ENDPOINT}`;default:return`${E.PRODUCTION_URL}${E.SERVER_URL_ENDPOINT}`}},_=()=>{switch(R.deploymentMode){case R.DEPLOYMENT_MODE.DEVELOPMENT:return`${E.STAGING_URL}${E.RELAYER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PLAYGROUND:return`${E.PLAYGROUND_URL}${E.RELAYER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.STAGING:return`${E.STAGING_URL}${E.RELAYER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PRODUCTION:return`${E.PRODUCTION_URL}${E.RELAYER_URL_ENDPOINT}`;default:return`${E.PRODUCTION_URL}${E.RELAYER_URL_ENDPOINT}`}},O=()=>{switch(R.deploymentMode){case R.DEPLOYMENT_MODE.DEVELOPMENT:return`${E.STAGING_URL}${E.SNAPSHOT_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PLAYGROUND:return`${E.PLAYGROUND_URL}${E.SNAPSHOT_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.STAGING:return`${E.STAGING_URL}${E.SNAPSHOT_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PRODUCTION:return`${E.PRODUCTION_URL}${E.SNAPSHOT_SERVER_URL_ENDPOINT}`;default:return`${E.PRODUCTION_URL}${E.SNAPSHOT_SERVER_URL_ENDPOINT}`}},L=()=>{switch(R.deploymentMode){case R.DEPLOYMENT_MODE.DEVELOPMENT:return`${E.STAGING_URL}${E.DATA_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PLAYGROUND:return`${E.PLAYGROUND_URL}${E.DATA_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.STAGING:return`${E.STAGING_URL}${E.DATA_SERVER_URL_ENDPOINT}`;case R.DEPLOYMENT_MODE.PRODUCTION:default:return`${E.PRODUCTION_URL}${E.DATA_SERVER_URL_ENDPOINT}`}},D=N(),e=_(),T=O(),U=L();exports.DATA_SERVER_URL=U;exports.RELAYER_URL=e;exports.SERVER_URL=D;exports.SNAPSHOT_SERVER_URL=T;
|
package/API/getServerURL.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const SERVER_URL: string;
|
|
2
|
+
export declare const RELAYER_URL: string;
|
|
3
|
+
export declare const SNAPSHOT_SERVER_URL: string;
|
|
4
4
|
export declare const DATA_SERVER_URL: string;
|
package/API/getServerURL.mjs
CHANGED
|
@@ -1,76 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
case
|
|
8
|
-
return
|
|
9
|
-
case
|
|
10
|
-
return
|
|
11
|
-
case
|
|
12
|
-
return
|
|
13
|
-
case a.avalanche:
|
|
14
|
-
return e.avalanche;
|
|
15
|
-
case a.bnbMainnet:
|
|
16
|
-
return e.bnbMainnet;
|
|
17
|
-
case a.optimism:
|
|
18
|
-
return e.optimism;
|
|
19
|
-
case a.base:
|
|
20
|
-
return e.base;
|
|
21
|
-
case a.arcTestnet:
|
|
22
|
-
return e.arcTestnet;
|
|
23
|
-
case a.solanaMainnet:
|
|
24
|
-
return e.solanaMainnet;
|
|
25
|
-
case a.localhost:
|
|
26
|
-
case a.solanaLocalnet:
|
|
27
|
-
return e.localhost;
|
|
1
|
+
import { PRODUCTION_URL as t, SERVER_URL_ENDPOINT as R, STAGING_URL as r, PLAYGROUND_URL as n, RELAYER_URL_ENDPOINT as $, SNAPSHOT_SERVER_URL_ENDPOINT as E, DATA_SERVER_URL_ENDPOINT as N } from "../constants/server.constants.mjs";
|
|
2
|
+
import { deploymentMode as s, DEPLOYMENT_MODE as e } from "../constants/vite.constants.mjs";
|
|
3
|
+
const c = () => {
|
|
4
|
+
switch (s) {
|
|
5
|
+
case e.DEVELOPMENT:
|
|
6
|
+
return `${r}${R}`;
|
|
7
|
+
case e.PLAYGROUND:
|
|
8
|
+
return `${n}${R}`;
|
|
9
|
+
case e.STAGING:
|
|
10
|
+
return `${r}${R}`;
|
|
11
|
+
case e.PRODUCTION:
|
|
12
|
+
return `${t}${R}`;
|
|
28
13
|
default:
|
|
29
|
-
return
|
|
14
|
+
return `${t}${R}`;
|
|
30
15
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return e.avalanche;
|
|
42
|
-
case a.bnbMainnet:
|
|
43
|
-
return e.bnbMainnet;
|
|
44
|
-
case a.optimism:
|
|
45
|
-
return e.optimism;
|
|
46
|
-
case a.base:
|
|
47
|
-
return e.base;
|
|
48
|
-
case a.arcTestnet:
|
|
49
|
-
return e.arcTestnet;
|
|
50
|
-
case a.solanaMainnet:
|
|
51
|
-
return e.solanaMainnet;
|
|
52
|
-
case a.localhost:
|
|
53
|
-
case a.solanaLocalnet:
|
|
54
|
-
return e.localhost;
|
|
16
|
+
}, L = () => {
|
|
17
|
+
switch (s) {
|
|
18
|
+
case e.DEVELOPMENT:
|
|
19
|
+
return `${r}${$}`;
|
|
20
|
+
case e.PLAYGROUND:
|
|
21
|
+
return `${n}${$}`;
|
|
22
|
+
case e.STAGING:
|
|
23
|
+
return `${r}${$}`;
|
|
24
|
+
case e.PRODUCTION:
|
|
25
|
+
return `${t}${$}`;
|
|
55
26
|
default:
|
|
56
|
-
return
|
|
27
|
+
return `${t}${$}`;
|
|
28
|
+
}
|
|
29
|
+
}, O = () => {
|
|
30
|
+
switch (s) {
|
|
31
|
+
case e.DEVELOPMENT:
|
|
32
|
+
return `${r}${E}`;
|
|
33
|
+
case e.PLAYGROUND:
|
|
34
|
+
return `${n}${E}`;
|
|
35
|
+
case e.STAGING:
|
|
36
|
+
return `${r}${E}`;
|
|
37
|
+
case e.PRODUCTION:
|
|
38
|
+
return `${t}${E}`;
|
|
39
|
+
default:
|
|
40
|
+
return `${t}${E}`;
|
|
57
41
|
}
|
|
58
42
|
}, U = () => {
|
|
59
|
-
switch (
|
|
60
|
-
case
|
|
61
|
-
return `${
|
|
62
|
-
case
|
|
63
|
-
return `${
|
|
64
|
-
case
|
|
65
|
-
return `${
|
|
66
|
-
case
|
|
43
|
+
switch (s) {
|
|
44
|
+
case e.DEVELOPMENT:
|
|
45
|
+
return `${r}${N}`;
|
|
46
|
+
case e.PLAYGROUND:
|
|
47
|
+
return `${n}${N}`;
|
|
48
|
+
case e.STAGING:
|
|
49
|
+
return `${r}${N}`;
|
|
50
|
+
case e.PRODUCTION:
|
|
67
51
|
default:
|
|
68
|
-
return `${
|
|
52
|
+
return `${t}${N}`;
|
|
69
53
|
}
|
|
70
|
-
}, D = U();
|
|
54
|
+
}, D = c(), T = L(), P = O(), _ = U();
|
|
71
55
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
56
|
+
_ as DATA_SERVER_URL,
|
|
57
|
+
T as RELAYER_URL,
|
|
58
|
+
D as SERVER_URL,
|
|
59
|
+
P as SNAPSHOT_SERVER_URL
|
|
76
60
|
};
|
package/API/getTokenPrice.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/server.constants.cjs"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/server.constants.cjs"),s=require("./getServerURL.cjs"),i=require("../data-structures/http/HttpClient.cjs");require("axios");const n=async(e,t)=>await i.httpClient.post(`${s.RELAYER_URL}${r.RELAYER_CONFIG.getTokenPrices}`,{erc20Addresses:t,chainId:e}),o=async e=>await i.httpClient.post(`${s.RELAYER_URL}${r.RELAYER_CONFIG.getTokenPreviousDayPrices}`,{uniqueErc20TokensByChain:e});exports.getTokenPreviousDayPrices=o;exports.getTokenPrices=n;
|
package/API/getTokenPrice.d.ts
CHANGED
|
@@ -2,4 +2,9 @@ interface IGetPrices {
|
|
|
2
2
|
prices: number[];
|
|
3
3
|
}
|
|
4
4
|
export declare const getTokenPrices: (chainId: number, erc20Addresses: string[]) => Promise<IGetPrices>;
|
|
5
|
+
interface GetPreviousDayPricesResponse {
|
|
6
|
+
status: 'success' | 'failed';
|
|
7
|
+
tokenPreviousDayPrices: Record<string, number>;
|
|
8
|
+
}
|
|
9
|
+
export declare const getTokenPreviousDayPrices: (uniqueErc20TokensByChain: Record<number, string[]>) => Promise<GetPreviousDayPricesResponse>;
|
|
5
10
|
export {};
|
package/API/getTokenPrice.mjs
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { RELAYER_CONFIG as
|
|
2
|
-
import {
|
|
3
|
-
import { httpClient as
|
|
1
|
+
import { RELAYER_CONFIG as t } from "../constants/server.constants.mjs";
|
|
2
|
+
import { RELAYER_URL as o } from "./getServerURL.mjs";
|
|
3
|
+
import { httpClient as s } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
6
|
-
erc20Addresses: r
|
|
7
|
-
|
|
5
|
+
const m = async (e, r) => await s.post(`${o}${t.getTokenPrices}`, {
|
|
6
|
+
erc20Addresses: r,
|
|
7
|
+
chainId: e
|
|
8
|
+
}), P = async (e) => await s.post(
|
|
9
|
+
`${o}${t.getTokenPreviousDayPrices}`,
|
|
10
|
+
{
|
|
11
|
+
uniqueErc20TokensByChain: e
|
|
12
|
+
}
|
|
13
|
+
);
|
|
8
14
|
export {
|
|
9
|
-
|
|
15
|
+
P as getTokenPreviousDayPrices,
|
|
16
|
+
m as getTokenPrices
|
|
10
17
|
};
|
package/API/getWebsiteURL.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const getHinkalLandingURL: () => "
|
|
1
|
+
export declare const getHinkalLandingURL: () => "http://localhost:4230" | "https://hinkal-playground-landing.netlify.app" | "https://staging-hinkal-landing.netlify.app" | "https://hinkal.pro";
|
|
2
2
|
export declare const getWalletOnboardingURL: () => "http://localhost:4118" | "https://hinkal-playground-onboarding.netlify.app" | "https://staging-hinkal-onboarding.netlify.app" | "https://onboarding.hinkal.pro";
|
|
3
3
|
export declare const getRewardsURL: () => "http://localhost:4117" | "https://hinkal-playground.netlify.app" | "https://staging-hinkal-rewards.netlify.app" | "https://rewards.hinkal.pro";
|
package/API/index.d.ts
CHANGED
|
@@ -7,12 +7,9 @@ export * from './getTokenPrice';
|
|
|
7
7
|
export * from './checkRisk';
|
|
8
8
|
export * from './relayCalls';
|
|
9
9
|
export * from './API';
|
|
10
|
-
export * from './getRelayerURL';
|
|
11
|
-
export * from './duneAPI';
|
|
12
10
|
export * from './tenderly.api';
|
|
13
11
|
export * from './token-calls';
|
|
14
12
|
export * from './callLifiAPI';
|
|
15
|
-
export * from './getLifiStatus';
|
|
16
13
|
export * from './generate-trading-points';
|
|
17
14
|
export * from './brotherhoodCalls';
|
|
18
15
|
export * from './getWebsiteURL';
|
package/API/is-tx-stateless.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 s=require("./getServerURL.cjs"),r=require("../constants/server.constants.cjs"),n=require("../data-structures/http/HttpClient.cjs");require("axios");const i=async(e,t)=>n.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.isTxStateless}`,{chainId:e,txParameters:t}),l=async(e,t)=>n.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.simulateVolatileTokenTransfer}`,{chainId:e,tokenTransfers:t});exports.isTxStateless=i;exports.simulateVolatileTokenTransfer=l;
|
package/API/is-tx-stateless.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TxParametersBase } from '../types/wc.types';
|
|
2
2
|
import { TransactionSimulatorResult, VolatileTokenTransferResult } from '../types/TransactionSimulator.types';
|
|
3
3
|
import { VolatileTokenChange } from '../types';
|
|
4
|
-
export declare const isTxStateless: (chainId: number, txParameters: TxParametersBase
|
|
4
|
+
export declare const isTxStateless: (chainId: number, txParameters: TxParametersBase) => Promise<TransactionSimulatorResult<string>>;
|
|
5
5
|
export declare const simulateVolatileTokenTransfer: (chainId: number, tokenTransfers: VolatileTokenChange[]) => Promise<VolatileTokenTransferResult[]>;
|
package/API/is-tx-stateless.mjs
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { API_CONFIG as
|
|
1
|
+
import { SERVER_URL as o } from "./getServerURL.mjs";
|
|
2
|
+
import { API_CONFIG as r } from "../constants/server.constants.mjs";
|
|
3
3
|
import { httpClient as s } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
), T = async (t, e) => s.post(
|
|
12
|
-
`${r(t)}${o.ROUTES.simulateVolatileTokenTransfer}`,
|
|
5
|
+
const m = async (t, e) => s.post(`${o}${r.ROUTES.isTxStateless}`, {
|
|
6
|
+
chainId: t,
|
|
7
|
+
txParameters: e
|
|
8
|
+
}), p = async (t, e) => s.post(
|
|
9
|
+
`${o}${r.ROUTES.simulateVolatileTokenTransfer}`,
|
|
13
10
|
{
|
|
11
|
+
chainId: t,
|
|
14
12
|
tokenTransfers: e
|
|
15
13
|
}
|
|
16
14
|
);
|
|
17
15
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
m as isTxStateless,
|
|
17
|
+
p as simulateVolatileTokenTransfer
|
|
20
18
|
};
|
package/API/kycCalls.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"),i=require("../data-structures/http/HttpClient.cjs");require("axios");async function o(e){return i.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.checkKycStatus}`,{ethereumAddress:e})}async function a(e,t,n){return i.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.startUserVerification}`,{ethereumAddress:e,verificationSessionId:t,verificationType:n})}async function R(e,t,n){return i.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.getUserSignature}`,{chainId:e,ethereumAddress:t,accessKey:n})}async function u(e,t,n,c){return i.httpClient.post(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.startReclaimVerification}`,{ethereumAddress:t,providerId:e,userSignature:n,withSignature:c})}const S=async()=>(await i.httpClient.get(`${s.SERVER_URL}${r.API_CONFIG.ROUTES.zkMeAccessToken}`)).accessToken;exports.getAccessTokenSignature=R;exports.getReclaimVerificationRequest=u;exports.getUserKycStatus=o;exports.getZkMeAccessToken=S;exports.setAiPriseVerificationUrl=a;
|
package/API/kycCalls.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ interface IGetKycStatus {
|
|
|
4
4
|
verificationResult: KycVerificationResult;
|
|
5
5
|
passportIds?: Passports[];
|
|
6
6
|
}
|
|
7
|
-
export declare function getUserKycStatus(
|
|
8
|
-
export declare function setAiPriseVerificationUrl(
|
|
7
|
+
export declare function getUserKycStatus(ethereumOrSolanaAddress: string): Promise<IGetKycStatus>;
|
|
8
|
+
export declare function setAiPriseVerificationUrl(ethereumAddress: string, verificationSessionId: string, verificationType: VERIFICATION_TYPE): Promise<any>;
|
|
9
9
|
interface AccessTokenSignatureResponse {
|
|
10
10
|
signatureData: SignatureData;
|
|
11
11
|
}
|
|
@@ -14,10 +14,6 @@ interface ReclaimVerificationRequestResponse {
|
|
|
14
14
|
reclaimProofRequestConfig: string;
|
|
15
15
|
message?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare function getReclaimVerificationRequest(
|
|
18
|
-
export declare const getZkMeAccessToken: (
|
|
19
|
-
type IUserHasKyc = {
|
|
20
|
-
updated: boolean;
|
|
21
|
-
};
|
|
22
|
-
export declare const userHasKyc: (chainId: number, ethereumAddress: string, hasKyc: boolean) => Promise<IUserHasKyc>;
|
|
17
|
+
export declare function getReclaimVerificationRequest(providerId: string, ethereumAddress: string, userSignature: string, withSignature: boolean): Promise<ReclaimVerificationRequestResponse>;
|
|
18
|
+
export declare const getZkMeAccessToken: () => Promise<any>;
|
|
23
19
|
export {};
|
package/API/kycCalls.mjs
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
1
|
+
import { API_CONFIG as n } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SERVER_URL as s } from "./getServerURL.mjs";
|
|
3
3
|
import { httpClient as c } from "../data-structures/http/HttpClient.mjs";
|
|
4
4
|
import "axios";
|
|
5
|
-
async function
|
|
6
|
-
return c.post(`${
|
|
5
|
+
async function R(t) {
|
|
6
|
+
return c.post(`${s}${n.ROUTES.checkKycStatus}`, {
|
|
7
7
|
ethereumAddress: t
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
async function
|
|
11
|
-
return c.post(`${
|
|
10
|
+
async function m(t, e, r) {
|
|
11
|
+
return c.post(`${s}${n.ROUTES.startUserVerification}`, {
|
|
12
12
|
ethereumAddress: t,
|
|
13
|
-
verificationSessionId:
|
|
14
|
-
verificationType:
|
|
13
|
+
verificationSessionId: e,
|
|
14
|
+
verificationType: r
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
async function
|
|
18
|
-
return c.post(`${
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
async function p(t, e, r) {
|
|
18
|
+
return c.post(`${s}${n.ROUTES.getUserSignature}`, {
|
|
19
|
+
chainId: t,
|
|
20
|
+
ethereumAddress: e,
|
|
21
|
+
accessKey: r
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
async function
|
|
24
|
-
return c.post(`${
|
|
25
|
-
ethereumAddress:
|
|
24
|
+
async function S(t, e, r, i) {
|
|
25
|
+
return c.post(`${s}${n.ROUTES.startReclaimVerification}`, {
|
|
26
|
+
ethereumAddress: e,
|
|
26
27
|
providerId: t,
|
|
27
|
-
userSignature:
|
|
28
|
+
userSignature: r,
|
|
28
29
|
withSignature: i
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
ethereumAddress: t,
|
|
33
|
-
hasKyc: s
|
|
34
|
-
});
|
|
32
|
+
const U = async () => (await c.get(`${s}${n.ROUTES.zkMeAccessToken}`)).accessToken;
|
|
35
33
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
R as userHasKyc
|
|
34
|
+
p as getAccessTokenSignature,
|
|
35
|
+
S as getReclaimVerificationRequest,
|
|
36
|
+
R as getUserKycStatus,
|
|
37
|
+
U as getZkMeAccessToken,
|
|
38
|
+
m as setAiPriseVerificationUrl
|
|
42
39
|
};
|
|
@@ -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 r=require("./getServerURL.cjs"),u=async e=>{const{url:t}=await n.httpClient.post(`${r.SERVER_URL}${o.API_CONFIG.ROUTES.encodeMoonPayBuyUrl}`,e);return t},a=async e=>await n.httpClient.post(`${r.SERVER_URL}${o.API_CONFIG.ROUTES.getMoonPayQuote}`,e);exports.encodeMoonPayBuyUrl=u;exports.generateMoonPayQuote=a;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MoonPayQuote } from '../types';
|
|
2
|
+
interface MoonPayBuyUrlRequest {
|
|
3
|
+
currencyCode: string;
|
|
4
|
+
walletAddress: string;
|
|
5
|
+
paymentMethod: string;
|
|
6
|
+
redirectURL: string;
|
|
7
|
+
baseCurrencyAmount?: string;
|
|
8
|
+
quoteCurrencyAmount?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const encodeMoonPayBuyUrl: (params: MoonPayBuyUrlRequest) => Promise<string>;
|
|
11
|
+
interface MoonPayQuoteRequest {
|
|
12
|
+
baseCurrencyCode: string;
|
|
13
|
+
quoteCurrencyCode: string;
|
|
14
|
+
baseCurrencyAmount?: number;
|
|
15
|
+
quoteCurrencyAmount?: number;
|
|
16
|
+
areFeesIncluded?: boolean;
|
|
17
|
+
paymentMethod?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const generateMoonPayQuote: (params: MoonPayQuoteRequest) => Promise<MoonPayQuote>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { API_CONFIG as e } from "../constants/server.constants.mjs";
|
|
2
|
+
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
|
|
3
|
+
import "axios";
|
|
4
|
+
import { SERVER_URL as r } from "./getServerURL.mjs";
|
|
5
|
+
const s = async (o) => {
|
|
6
|
+
const { url: t } = await n.post(
|
|
7
|
+
`${r}${e.ROUTES.encodeMoonPayBuyUrl}`,
|
|
8
|
+
o
|
|
9
|
+
);
|
|
10
|
+
return t;
|
|
11
|
+
}, y = async (o) => await n.post(`${r}${e.ROUTES.getMoonPayQuote}`, o);
|
|
12
|
+
export {
|
|
13
|
+
s as encodeMoonPayBuyUrl,
|
|
14
|
+
y as generateMoonPayQuote
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../constants/server.constants.cjs"),c=require("./getServerURL.cjs"),o=require("ethers"),y=require("../functions/utils/addresses.cjs"),u=require("../data-structures/http/HttpClient.cjs");require("axios");const i=(e,t)=>{const s=t.getShieldedPrivateKey(),r=`HinkalProxyAccounts|${e.toLowerCase()}|${s}`;return o.ethers.utils.keccak256(o.ethers.utils.toUtf8Bytes(r))},d=async(e,t)=>{const s=i(e,t);return await u.httpClient.get(`${c.SERVER_URL}${n.API_CONFIG.ROUTES.getProxyAccounts(s)}`)},P=async(e,t,s)=>{const r=i(e,t),a=y.hashEthereumAddress(e);return await u.httpClient.post(`${c.SERVER_URL}${n.API_CONFIG.ROUTES.updateProxyAccounts}`,{secureKey:r,hashedEthereumAddress:a,proxyAccounts:s})};exports.getProxyAccounts=d;exports.updateProxyAccounts=P;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubAccountLight } from '../types/proxy.types';
|
|
2
2
|
import { UserKeys } from '../data-structures/crypto-keys';
|
|
3
|
-
export declare const getProxyAccounts: (
|
|
4
|
-
export declare const updateProxyAccounts: (
|
|
3
|
+
export declare const getProxyAccounts: (ethereumAddress: string, userKeys: UserKeys) => Promise<SubAccountLight[]>;
|
|
4
|
+
export declare const updateProxyAccounts: (ethereumAddress: string, userKeys: UserKeys, proxyAccounts: SubAccountLight[]) => Promise<any>;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { API_CONFIG as
|
|
2
|
-
import {
|
|
3
|
-
import { ethers as
|
|
4
|
-
import { hashEthereumAddress as
|
|
5
|
-
import { httpClient as
|
|
1
|
+
import { API_CONFIG as n } from "../constants/server.constants.mjs";
|
|
2
|
+
import { SERVER_URL as c } from "./getServerURL.mjs";
|
|
3
|
+
import { ethers as s } from "ethers";
|
|
4
|
+
import { hashEthereumAddress as p } from "../functions/utils/addresses.mjs";
|
|
5
|
+
import { httpClient as i } from "../data-structures/http/HttpClient.mjs";
|
|
6
6
|
import "axios";
|
|
7
|
-
const
|
|
8
|
-
const o =
|
|
9
|
-
return
|
|
10
|
-
}, f = async (
|
|
11
|
-
const
|
|
12
|
-
return await
|
|
13
|
-
`${
|
|
7
|
+
const a = (e, t) => {
|
|
8
|
+
const o = t.getShieldedPrivateKey(), r = `HinkalProxyAccounts|${e.toLowerCase()}|${o}`;
|
|
9
|
+
return s.utils.keccak256(s.utils.toUtf8Bytes(r));
|
|
10
|
+
}, f = async (e, t) => {
|
|
11
|
+
const o = a(e, t);
|
|
12
|
+
return await i.get(
|
|
13
|
+
`${c}${n.ROUTES.getProxyAccounts(o)}`
|
|
14
14
|
);
|
|
15
|
-
},
|
|
16
|
-
const
|
|
17
|
-
return await
|
|
18
|
-
secureKey:
|
|
19
|
-
hashedEthereumAddress:
|
|
20
|
-
proxyAccounts:
|
|
15
|
+
}, g = async (e, t, o) => {
|
|
16
|
+
const r = a(e, t), u = p(e);
|
|
17
|
+
return await i.post(`${c}${n.ROUTES.updateProxyAccounts}`, {
|
|
18
|
+
secureKey: r,
|
|
19
|
+
hashedEthereumAddress: u,
|
|
20
|
+
proxyAccounts: o
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
24
|
f as getProxyAccounts,
|
|
25
|
-
|
|
25
|
+
g as updateProxyAccounts
|
|
26
26
|
};
|
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;
|