h_test_1 0.0.46 → 0.0.48

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.
Files changed (429) hide show
  1. package/API/API.mjs +1 -1
  2. package/API/accessCodeCalls.mjs +1 -1
  3. package/API/admin-calls.mjs +1 -1
  4. package/API/brotherhoodCalls.mjs +1 -1
  5. package/API/callLifiAPI.mjs +1 -1
  6. package/API/callMonitor.mjs +1 -1
  7. package/API/callOdosAPI.mjs +1 -1
  8. package/API/callOkxAPI.mjs +1 -1
  9. package/API/callOneInchAPI.mjs +1 -1
  10. package/API/callRelayer.mjs +1 -1
  11. package/API/checkRisk.mjs +1 -1
  12. package/API/deposit-and-withdraw-status-calls.mjs +1 -1
  13. package/API/enclaveSignatureCalls.mjs +1 -1
  14. package/API/enclaveUtxoCalls.mjs +1 -1
  15. package/API/fetchCommitmentsCache.mjs +1 -1
  16. package/API/generate-trading-points.mjs +1 -1
  17. package/API/get-token-data.mjs +1 -1
  18. package/API/get-token-price-chart-data.mjs +1 -1
  19. package/API/getCoingeckoPrice.mjs +1 -1
  20. package/API/getGasEstimates.mjs +1 -1
  21. package/API/getServerURL.mjs +1 -1
  22. package/API/getTokenPrice.mjs +1 -1
  23. package/API/getWebsiteURL.mjs +1 -1
  24. package/API/kycCalls.mjs +1 -1
  25. package/API/leaderboardCalls.mjs +1 -1
  26. package/API/onrampCalls.mjs +1 -1
  27. package/API/privacy-score-calls.mjs +1 -1
  28. package/API/privateSendEmailNotificationsCalls.mjs +1 -1
  29. package/API/privateSendNonceCalls.mjs +1 -1
  30. package/API/privateSendRecipientInfoCalls.mjs +1 -1
  31. package/API/proxyAccountsCalls.mjs +1 -1
  32. package/API/referralsCalls.mjs +1 -1
  33. package/API/relayCalls.mjs +1 -1
  34. package/API/resolve-sns.mjs +1 -1
  35. package/API/rewardsUserCalls.mjs +1 -1
  36. package/API/scheduled-transactions-calls.mjs +1 -1
  37. package/API/seedless-calls.mjs +1 -1
  38. package/API/send-telegram-callback.mjs +1 -1
  39. package/API/simulate-batch-tx.mjs +1 -1
  40. package/API/simulate-transaction.mjs +1 -1
  41. package/API/snapshot-event-calls.mjs +1 -1
  42. package/API/solana-calls.mjs +1 -1
  43. package/API/temporaryWalletCalls.mjs +1 -1
  44. package/API/tenderly.api.mjs +1 -1
  45. package/API/token-calls.mjs +1 -1
  46. package/API/tronSubsidyCalls.mjs +1 -1
  47. package/API/weeklyAnalyticCalls.mjs +1 -1
  48. package/constants/activity.constants.mjs +1 -1
  49. package/constants/addresses.constants.mjs +1 -1
  50. package/constants/assets.constants.mjs +1 -1
  51. package/constants/backend.constants.mjs +1 -1
  52. package/constants/balance.constants.mjs +1 -1
  53. package/constants/bridging.constants.mjs +1 -1
  54. package/constants/chains.constants.cjs +1 -1
  55. package/constants/chains.constants.mjs +118 -120
  56. package/constants/coingecko.constants.mjs +1 -1
  57. package/constants/contracts.constants.mjs +1 -1
  58. package/constants/conversion.constants.mjs +1 -1
  59. package/constants/deploy-data/index.d.ts +1 -3
  60. package/constants/events.constants.mjs +1 -1
  61. package/constants/fees.constants.mjs +1 -1
  62. package/constants/function-signatures.constants.mjs +1 -1
  63. package/constants/images.constants.mjs +1 -1
  64. package/constants/index.cjs +1 -1
  65. package/constants/index.mjs +0 -2
  66. package/constants/kyc.constants.mjs +1 -1
  67. package/constants/lifi.constants.mjs +1 -1
  68. package/constants/link.constant.mjs +1 -1
  69. package/constants/mediaUrls.constants.mjs +1 -1
  70. package/constants/non-circular-tokens.constants.mjs +1 -1
  71. package/constants/oauthUrls.constants.mjs +1 -1
  72. package/constants/okx.constants.mjs +1 -1
  73. package/constants/pay.constants.mjs +1 -1
  74. package/constants/permit2.constants.mjs +1 -1
  75. package/constants/presale.constants.mjs +1 -1
  76. package/constants/protocol.constants.mjs +1 -1
  77. package/constants/reorg-depths.constants.mjs +1 -1
  78. package/constants/rewards.constants.mjs +1 -1
  79. package/constants/save-depths.mjs +1 -1
  80. package/constants/schedule.constants.mjs +1 -1
  81. package/constants/server.constants.mjs +1 -1
  82. package/constants/tasks.constants.mjs +1 -1
  83. package/constants/token-data/ERC20Registry.cjs +1 -1
  84. package/constants/token-data/ERC20Registry.mjs +39 -51
  85. package/constants/token-data/index.cjs +1 -1
  86. package/constants/token-data/index.d.ts +1 -233
  87. package/constants/token-data/index.mjs +14 -18
  88. package/constants/token.limits.constants.mjs +1 -1
  89. package/constants/tokens.constants.mjs +1 -1
  90. package/constants/tx-confirmation.constants.mjs +1 -1
  91. package/constants/vite.constants.mjs +1 -1
  92. package/constants/wallet.constants.mjs +1 -1
  93. package/crypto/preProcessing.mjs +1 -1
  94. package/data-structures/AccountActions/AccountActions.mjs +1 -1
  95. package/data-structures/ApprovalDBs/EventsPublicApprovalsDB.mjs +1 -1
  96. package/data-structures/BlockchainEvent/BlockchainEvent.mjs +1 -1
  97. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  98. package/data-structures/Hinkal/Hinkal.mjs +2 -2
  99. package/data-structures/Hinkal/handleAutoDepositBack.mjs +1 -1
  100. package/data-structures/Hinkal/hinkalActionReceive.mjs +1 -1
  101. package/data-structures/Hinkal/hinkalCheckSolanaTokenRegistry.mjs +1 -1
  102. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +1 -1
  103. package/data-structures/Hinkal/hinkalClaimUtxo.mjs +1 -1
  104. package/data-structures/Hinkal/hinkalDeposit.mjs +1 -1
  105. package/data-structures/Hinkal/hinkalDepositAndBridge.mjs +1 -1
  106. package/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +1 -1
  107. package/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +1 -1
  108. package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +1 -1
  109. package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +1 -1
  110. package/data-structures/Hinkal/hinkalMultiSend.mjs +1 -1
  111. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +1 -1
  112. package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +1 -1
  113. package/data-structures/Hinkal/hinkalProxySwap.mjs +1 -1
  114. package/data-structures/Hinkal/hinkalProxyToPrivate.mjs +1 -1
  115. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +1 -1
  116. package/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +1 -1
  117. package/data-structures/Hinkal/hinkalSolanaDeposit.mjs +1 -1
  118. package/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +1 -1
  119. package/data-structures/Hinkal/hinkalSolanaProoflessDeposit.mjs +1 -1
  120. package/data-structures/Hinkal/hinkalSolanaProxySend.mjs +1 -1
  121. package/data-structures/Hinkal/hinkalSolanaProxyShield.mjs +1 -1
  122. package/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +1 -1
  123. package/data-structures/Hinkal/hinkalSolanaSwap.mjs +1 -1
  124. package/data-structures/Hinkal/hinkalSolanaTransfer.mjs +1 -1
  125. package/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +1 -1
  126. package/data-structures/Hinkal/hinkalSwap.mjs +1 -1
  127. package/data-structures/Hinkal/hinkalTransfer.mjs +1 -1
  128. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  129. package/data-structures/Hinkal/hinkalWithdraw.mjs +3 -9
  130. package/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +1 -1
  131. package/data-structures/Hinkal/resetMerkleTrees.mjs +1 -1
  132. package/data-structures/IndexedDB/activity-db.mjs +1 -1
  133. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +1 -1
  134. package/data-structures/TokenDBs/ArcPublicTokensDB.mjs +1 -1
  135. package/data-structures/TokenDBs/PrivateTokensDB.mjs +1 -1
  136. package/data-structures/TokenDBs/PublicTokensDB.mjs +1 -1
  137. package/data-structures/ValueCache/ValueCache.mjs +1 -1
  138. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +1 -1
  139. package/data-structures/cacheDevices/BaseCacheDevice.mjs +1 -1
  140. package/data-structures/cacheDevices/FileCacheDevice.mjs +1 -1
  141. package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +1 -1
  142. package/data-structures/crypto-keys/decodeUTXO.mjs +1 -1
  143. package/data-structures/crypto-keys/encryptDecryptUtxo.mjs +1 -1
  144. package/data-structures/crypto-keys/keyUtils.mjs +1 -1
  145. package/data-structures/crypto-keys/keys.mjs +1 -1
  146. package/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +1 -1
  147. package/data-structures/event-service/evm/AbstractApprovalsSnapshotService.mjs +1 -1
  148. package/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +1 -1
  149. package/data-structures/event-service/evm/AbstractEventService.cjs +1 -1
  150. package/data-structures/event-service/evm/AbstractEventService.mjs +2 -2
  151. package/data-structures/event-service/evm/AbstractNullifierSnapshotService.mjs +1 -1
  152. package/data-structures/event-service/evm/AbstractSnapshotService.mjs +1 -1
  153. package/data-structures/event-service/evm/BlockchainEventEmitter.mjs +1 -1
  154. package/data-structures/event-service/evm/ClientBlockchainEventEmitter.mjs +1 -1
  155. package/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +1 -1
  156. package/data-structures/event-service/helpers/ClientEventHelper.mjs +1 -1
  157. package/data-structures/event-service/helpers/PollingEventHelper.mjs +1 -1
  158. package/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +1 -1
  159. package/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +1 -1
  160. package/data-structures/event-service/solana/AbstractSolanaEventService.mjs +1 -1
  161. package/data-structures/event-service/solana/AbstractSolanaNullifierSnapshotService.mjs +1 -1
  162. package/data-structures/event-service/solana/AbstractSolanaSnapshotService.mjs +1 -1
  163. package/data-structures/event-service/solana/ClientSolanaBlockchainEventEmitter.mjs +1 -1
  164. package/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +1 -1
  165. package/data-structures/event-service/solana/SolanaBlockchainEventEmitter.mjs +1 -1
  166. package/data-structures/http/BasicHttpClient.mjs +1 -1
  167. package/data-structures/http/HttpClient.mjs +1 -1
  168. package/data-structures/merkle-tree/MerkleTree.mjs +1 -1
  169. package/data-structures/merkle-tree/MerkleTreeIncompleteError.mjs +1 -1
  170. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +1 -1
  171. package/data-structures/presale/PresaleContractWrapper.mjs +1 -1
  172. package/data-structures/snapshot/SnapshotFetcherService.mjs +1 -1
  173. package/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +1 -1
  174. package/data-structures/snapshot/evm-snapshots/ClientApprovalsSnapshotService.mjs +1 -1
  175. package/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +1 -1
  176. package/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +1 -1
  177. package/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +1 -1
  178. package/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +1 -1
  179. package/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +1 -1
  180. package/data-structures/token-price-fetcher/TokenChecker.mjs +1 -1
  181. package/data-structures/transactions-manager/history/history.types.mjs +1 -1
  182. package/data-structures/utxo/Utxo.mjs +1 -1
  183. package/error-handling/customErrors/ErrorWithAmount.mjs +1 -1
  184. package/error-handling/customErrors/ErrorWithIndex.mjs +1 -1
  185. package/error-handling/customErrors/ErrorWithTx.mjs +1 -1
  186. package/error-handling/customErrors/FeeOverTransactionValueError.mjs +1 -1
  187. package/error-handling/customErrors/SimulationFailureError.mjs +1 -1
  188. package/error-handling/customErrors/customErrors.helpers.cjs +1 -1
  189. package/error-handling/customErrors/customErrors.helpers.mjs +2 -2
  190. package/error-handling/error-codes.constants.mjs +1 -1
  191. package/error-handling/get-error.message.cjs +1 -1
  192. package/error-handling/get-error.message.mjs +2 -2
  193. package/error-handling/isInsufficientFundsError.mjs +1 -1
  194. package/error-handling/logError.mjs +1 -1
  195. package/error-handling/logger.mjs +1 -1
  196. package/error-handling/types.mjs +1 -1
  197. package/externalABIs/BUSD.mjs +1 -1
  198. package/externalABIs/DAI.mjs +1 -1
  199. package/externalABIs/NodeInterfaceABI.json.mjs +1 -1
  200. package/externalABIs/OptimismGasPriceOracle.json.mjs +1 -1
  201. package/externalABIs/SanctionsList.mjs +1 -1
  202. package/externalABIs/USDC.mjs +1 -1
  203. package/externalABIs/USDR.mjs +1 -1
  204. package/externalABIs/USDR3CRV.mjs +1 -1
  205. package/externalABIs/USDT.mjs +1 -1
  206. package/externalABIs/WETH.mjs +1 -1
  207. package/externalABIs/amToken.mjs +1 -1
  208. package/externalABIs/index.mjs +1 -1
  209. package/externalABIs/swapAbi.mjs +1 -1
  210. package/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +1 -1
  211. package/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.mjs +1 -1
  212. package/functions/auto-deposit-back-helpers/select-gas-token.mjs +1 -1
  213. package/functions/auto-deposit-back-helpers/update-hinkal.mjs +1 -1
  214. package/functions/kyc/checkTokenLimitsUSD.mjs +1 -1
  215. package/functions/kyc/openDefaultPassportWindow.mjs +1 -1
  216. package/functions/kyc/passportHelper.mjs +1 -1
  217. package/functions/kyc/zkMeHelper.mjs +1 -1
  218. package/functions/pre-transaction/addressTableLookup.mjs +1 -1
  219. package/functions/pre-transaction/constructAdminData.mjs +1 -1
  220. package/functions/pre-transaction/convert-okx-instructions.mjs +1 -1
  221. package/functions/pre-transaction/ensureAmountChanges.mjs +1 -1
  222. package/functions/pre-transaction/getExternalSwapAddress.mjs +1 -1
  223. package/functions/pre-transaction/getFeeStructure.mjs +1 -1
  224. package/functions/pre-transaction/getFlatFees.mjs +1 -1
  225. package/functions/pre-transaction/getKycAndSignatureData.mjs +1 -1
  226. package/functions/pre-transaction/getSignatureDataForTransact.mjs +1 -1
  227. package/functions/pre-transaction/getSolanaCalldataHash.mjs +1 -1
  228. package/functions/pre-transaction/getVolatileTransferAmount.mjs +1 -1
  229. package/functions/pre-transaction/initTokenLimitIfNeeded.mjs +1 -1
  230. package/functions/pre-transaction/interaction-to-action.mjs +1 -1
  231. package/functions/pre-transaction/merge-with-fee-structure-emporium.mjs +1 -1
  232. package/functions/pre-transaction/merge-with-fee-structure.mjs +1 -1
  233. package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -1
  234. package/functions/pre-transaction/outputApprovalDataProcessing.mjs +3 -3
  235. package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
  236. package/functions/pre-transaction/outputUtxoProcessing.mjs +2 -5
  237. package/functions/pre-transaction/process-gas-estimates.mjs +1 -1
  238. package/functions/pre-transaction/recipientUtxoProcessing.mjs +1 -1
  239. package/functions/pre-transaction/sendInitNullifiersTransaction.mjs +1 -1
  240. package/functions/pre-transaction/sendV0Transaction.mjs +1 -1
  241. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +1 -1
  242. package/functions/pre-transaction/solana-public-signals.mjs +1 -1
  243. package/functions/pre-transaction/solana.mjs +1 -1
  244. package/functions/pre-transaction/solanaTransfer.utils.mjs +1 -1
  245. package/functions/pre-transaction/store-instructions.mjs +1 -1
  246. package/functions/pre-transaction/store-proof.mjs +1 -1
  247. package/functions/pre-transaction/waitForDepositedUtxosInMerkleTree.mjs +1 -1
  248. package/functions/private-wallet/emporium.helpers.mjs +1 -1
  249. package/functions/private-wallet/emporium.swap.helpers.mjs +1 -1
  250. package/functions/private-wallet/opProducer.mjs +1 -1
  251. package/functions/snarkjs/common.snarkjs.mjs +1 -1
  252. package/functions/snarkjs/constant.mjs +1 -1
  253. package/functions/snarkjs/constructEmporiumProof.mjs +1 -1
  254. package/functions/snarkjs/constructGeneralZkProof.mjs +1 -1
  255. package/functions/snarkjs/constructSolanaZkProof.mjs +1 -1
  256. package/functions/snarkjs/fetchMerkleTreeSiblings.mjs +1 -1
  257. package/functions/snarkjs/fetchOnChainRootHashes.mjs +1 -1
  258. package/functions/snarkjs/generateCircomData.mjs +1 -1
  259. package/functions/snarkjs/generateZkProof.mjs +1 -1
  260. package/functions/snarkjs/generateZkProofEnclave.mjs +1 -1
  261. package/functions/snarkjs/generateZkProofSelf.mjs +1 -1
  262. package/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +1 -1
  263. package/functions/snarkjs/getOriginalSender.mjs +1 -1
  264. package/functions/snarkjs/getZKFiles.mjs +1 -1
  265. package/functions/utils/addresses.mjs +1 -1
  266. package/functions/utils/amounts.utils.mjs +1 -1
  267. package/functions/utils/arraysMatch.mjs +1 -1
  268. package/functions/utils/buildClaimableDepositPlan.mjs +1 -1
  269. package/functions/utils/bytes32.utils.mjs +1 -1
  270. package/functions/utils/cacheDevice.utils.mjs +1 -1
  271. package/functions/utils/cacheFunctions.mjs +1 -1
  272. package/functions/utils/caseInsensitive.utils.mjs +1 -1
  273. package/functions/utils/convertEmporiumOpToCallInfo.mjs +1 -1
  274. package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +1 -1
  275. package/functions/utils/create-provider.mjs +1 -1
  276. package/functions/utils/enclave-signature-storage.mjs +1 -1
  277. package/functions/utils/enclave-utxo-storage.mjs +1 -1
  278. package/functions/utils/encodeTokenWithId.mjs +1 -1
  279. package/functions/utils/encryptInputForEnclave.mjs +1 -1
  280. package/functions/utils/erc20tokenFunctions.mjs +1 -1
  281. package/functions/utils/evmNetworkFunctions.mjs +1 -1
  282. package/functions/utils/external-action.utils.mjs +1 -1
  283. package/functions/utils/fees.utils.mjs +1 -1
  284. package/functions/utils/get-signature-header.mjs +1 -1
  285. package/functions/utils/getBlockExplorerUrl.mjs +1 -1
  286. package/functions/utils/getContractAddress.mjs +1 -1
  287. package/functions/utils/getDataFromTransaction.mjs +1 -1
  288. package/functions/utils/getRecipientInfoFromUserKeys.mjs +1 -1
  289. package/functions/utils/getSignerFromContract.mjs +1 -1
  290. package/functions/utils/getUtxosFromReceipt.utils.mjs +1 -1
  291. package/functions/utils/getUtxosFromReceiptSolana.mjs +1 -1
  292. package/functions/utils/getWalletGroupKey.utils.mjs +1 -1
  293. package/functions/utils/inLogicMetadata.mjs +1 -1
  294. package/functions/utils/involves-permit2-op.mjs +1 -1
  295. package/functions/utils/ipfs.mjs +1 -1
  296. package/functions/utils/is-valid-url.mjs +1 -1
  297. package/functions/utils/merkleTree.utils.mjs +1 -1
  298. package/functions/utils/mutexes.utils.mjs +1 -1
  299. package/functions/utils/networks.utils.mjs +1 -1
  300. package/functions/utils/nftTokenFunctions.mjs +1 -1
  301. package/functions/utils/nickname.utils.mjs +1 -1
  302. package/functions/utils/postToOffscreen.mjs +1 -1
  303. package/functions/utils/prepareHinkal.mjs +1 -1
  304. package/functions/utils/process.utils.mjs +1 -1
  305. package/functions/utils/processUseApprovalUtxoData.mjs +1 -1
  306. package/functions/utils/proxyAvatar.utils.mjs +1 -1
  307. package/functions/utils/publicBalance.utils.mjs +1 -1
  308. package/functions/utils/reloadPage.mjs +1 -1
  309. package/functions/utils/requireEnv.mjs +1 -1
  310. package/functions/utils/resolve-sync.utils.mjs +1 -1
  311. package/functions/utils/rpc-int-encode.mjs +1 -1
  312. package/functions/utils/serialize-utxos.utils.mjs +1 -1
  313. package/functions/utils/serialize.utils.mjs +1 -1
  314. package/functions/utils/solanaMint.utils.mjs +1 -1
  315. package/functions/utils/string.utils.mjs +1 -1
  316. package/functions/utils/time.utils.mjs +1 -1
  317. package/functions/utils/token-check.utils.mjs +1 -1
  318. package/functions/utils/trimFieldValues.mjs +1 -1
  319. package/functions/utils/tron.utils.mjs +1 -1
  320. package/functions/utils/tronSimulation.utils.mjs +1 -1
  321. package/functions/utils/tx-confirmation.utils.mjs +1 -1
  322. package/functions/utils/upToDateState.mjs +1 -1
  323. package/functions/utils/userAgent.mjs +1 -1
  324. package/functions/utils/validateUsername.mjs +1 -1
  325. package/functions/utils/walletBalances.utils.mjs +1 -1
  326. package/functions/web3/EIP-712.mjs +1 -1
  327. package/functions/web3/connectors.utils.mjs +1 -1
  328. package/functions/web3/crypto.mjs +1 -1
  329. package/functions/web3/etherFunctions.mjs +1 -1
  330. package/functions/web3/events/balanceChangedCustomHandler.mjs +1 -1
  331. package/functions/web3/events/balanceChangedHandler.mjs +1 -1
  332. package/functions/web3/events/getApprovedBalance.mjs +1 -1
  333. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  334. package/functions/web3/events/getInputUtxoAndBalance.mjs +13 -60
  335. package/functions/web3/events/getInputUtxosEnclave.mjs +1 -1
  336. package/functions/web3/events/getShieldedBalance.cjs +1 -1
  337. package/functions/web3/events/getShieldedBalance.mjs +3 -13
  338. package/functions/web3/events/getTransactionLogEvents.mjs +1 -1
  339. package/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +1 -1
  340. package/functions/web3/functionCalls/accessTokenCalls.mjs +1 -1
  341. package/functions/web3/functionCalls/approveToken.mjs +1 -1
  342. package/functions/web3/functionCalls/approveTokensToHinkal.mjs +1 -1
  343. package/functions/web3/functionCalls/constructBatchCall.mjs +1 -1
  344. package/functions/web3/functionCalls/recoverTransactionFromError.mjs +1 -1
  345. package/functions/web3/functionCalls/transactCallDirect.mjs +1 -1
  346. package/functions/web3/functionCalls/transactCallDirectTron.mjs +1 -1
  347. package/functions/web3/functionCalls/transactCallRelayer.mjs +1 -1
  348. package/functions/web3/functionCalls/waitForErc20Approvals.mjs +1 -1
  349. package/functions/web3/getContractMetadata.mjs +1 -1
  350. package/functions/web3/getPublicAddressBalance.mjs +1 -1
  351. package/functions/web3/getSolanaPriorityFee.mjs +1 -1
  352. package/functions/web3/getTokenHolder.mjs +1 -1
  353. package/functions/web3/lifiAPI.mjs +1 -1
  354. package/functions/web3/odosAPI.mjs +1 -1
  355. package/functions/web3/okxAPI.mjs +1 -1
  356. package/functions/web3/oneInchAPI.mjs +1 -1
  357. package/functions/web3/runContractFunction.mjs +1 -1
  358. package/functions/web3/signAndSendSerializedTransaction.mjs +1 -1
  359. package/functions/web3/tron-wagmi-adapter.mjs +1 -1
  360. package/functions/web3/uniswapAPI.mjs +1 -1
  361. package/index.cjs +1 -1
  362. package/index.mjs +308 -310
  363. package/mutexes/mutex.mjs +1 -1
  364. package/package.json +1 -1
  365. package/providers/CustomEthersProvider.mjs +1 -1
  366. package/providers/CustomSolanaConnection.mjs +1 -1
  367. package/providers/EthersProviderAdapter.mjs +1 -1
  368. package/providers/SolanaProviderAdapter.mjs +1 -1
  369. package/providers/TronProviderAdapter.mjs +1 -1
  370. package/providers/WagmiProviderAdapter.mjs +1 -1
  371. package/providers/prepareEthersHinkal.mjs +1 -1
  372. package/providers/prepareSolanaHinkal.mjs +1 -1
  373. package/providers/prepareTronHinkal.mjs +1 -1
  374. package/providers/prepareWagmiHinkal.mjs +1 -1
  375. package/types/RewardUserEnums.mjs +1 -1
  376. package/types/activities.types.mjs +1 -1
  377. package/types/admin.types.mjs +1 -1
  378. package/types/approvals.types.mjs +1 -1
  379. package/types/balances.types.mjs +1 -1
  380. package/types/cache.types.mjs +1 -1
  381. package/types/circom-data.types.mjs +1 -1
  382. package/types/confirmation-request.types.mjs +1 -1
  383. package/types/eip5792.types.mjs +1 -1
  384. package/types/ethereum-network.types.mjs +1 -1
  385. package/types/events.types.mjs +1 -1
  386. package/types/external-action.types.mjs +1 -1
  387. package/types/fee.types.mjs +1 -1
  388. package/types/generatePoints.mjs +1 -1
  389. package/types/hinkal.types.mjs +1 -1
  390. package/types/kyc.types.mjs +1 -1
  391. package/types/new-rewards.type.mjs +1 -1
  392. package/types/offscreen.types.mjs +1 -1
  393. package/types/onramp.types.mjs +1 -1
  394. package/types/pay-activities.types.mjs +1 -1
  395. package/types/rewards.types.mjs +1 -1
  396. package/types/schedule.types.mjs +1 -1
  397. package/types/scheduled-transactions.types.mjs +1 -1
  398. package/types/slippage.types.mjs +1 -1
  399. package/types/token-prices.types.mjs +1 -1
  400. package/types/token.types.mjs +1 -1
  401. package/types/transaction.types.mjs +1 -1
  402. package/webworker/performTaskWithWorker.mjs +1 -1
  403. package/webworker/snarkjsWorker/snarkjsWorker.types.mjs +1 -1
  404. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.cjs +1 -1
  405. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.ts?worker&url.mjs +2 -2
  406. package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +1 -1
  407. package/webworker/utxoWorker/utxoWorker.types.mjs +1 -1
  408. package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
  409. package/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +2 -2
  410. package/webworker/utxoWorker/utxoWorkerLogic.mjs +1 -1
  411. package/webworker/worker.registry.mjs +1 -1
  412. package/webworker/workerFactory.mjs +1 -1
  413. package/webworker/workerProxy.mjs +1 -1
  414. package/webworker/zkProofWorker/zkProofWorker.types.mjs +1 -1
  415. package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
  416. package/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +2 -2
  417. package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +1 -1
  418. package/constants/deploy-data/deploy-data-avalanche.json.cjs +0 -1
  419. package/constants/deploy-data/deploy-data-avalanche.json.mjs +0 -5352
  420. package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +0 -1
  421. package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +0 -5352
  422. package/constants/token-data/avalancheRegistry.json.cjs +0 -1
  423. package/constants/token-data/avalancheRegistry.json.mjs +0 -729
  424. package/constants/token-data/avalancheRegistryFixed.json.cjs +0 -1
  425. package/constants/token-data/avalancheRegistryFixed.json.mjs +0 -729
  426. package/constants/token-data/bnbMainnetRegistry.json.cjs +0 -1
  427. package/constants/token-data/bnbMainnetRegistry.json.mjs +0 -900
  428. package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +0 -1
  429. package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +0 -900
@@ -2,82 +2,70 @@ import { chainIds as e } from "../chains.constants.mjs";
2
2
  import t from "./arcTestnetRegistry.json.mjs";
3
3
  import n from "./ethMainnetRegistryFixed.json.mjs";
4
4
  import r from "./arbMainnetRegistryFixed.json.mjs";
5
- import i from "./bnbMainnetRegistryFixed.json.mjs";
6
- import a from "./polygonRegistryFixed.json.mjs";
7
- import o from "./avalancheRegistryFixed.json.mjs";
8
- import s from "./optimismRegistryFixed.json.mjs";
9
- import c from "./baseRegistryFixed.json.mjs";
10
- import l from "./ethMainnetRegistry.json.mjs";
11
- import u from "./arbMainnetRegistry.json.mjs";
12
- import d from "./bnbMainnetRegistry.json.mjs";
13
- import f from "./polygonRegistry.json.mjs";
14
- import p from "./avalancheRegistry.json.mjs";
15
- import m from "./optimismRegistry.json.mjs";
16
- import h from "./baseRegistry.json.mjs";
17
- import g from "./localhostRegistry.json.mjs";
18
- import _ from "./solanaMainnetRegistry.json.mjs";
19
- import v from "./solanaLocalnetRegistry.json.mjs";
20
- import y from "./tronNileRegistry.json.mjs";
21
- import b from "./tronMainnetRegistry.json.mjs";
22
- //#region libs/shared/common/src/constants/token-data/ERC20Registry.ts
23
- var x = (n) => {
24
- let r = g.networkRegistry.slice(0, 10);
5
+ import i from "./polygonRegistryFixed.json.mjs";
6
+ import a from "./optimismRegistryFixed.json.mjs";
7
+ import o from "./baseRegistryFixed.json.mjs";
8
+ import s from "./ethMainnetRegistry.json.mjs";
9
+ import c from "./arbMainnetRegistry.json.mjs";
10
+ import l from "./polygonRegistry.json.mjs";
11
+ import u from "./optimismRegistry.json.mjs";
12
+ import d from "./baseRegistry.json.mjs";
13
+ import f from "./localhostRegistry.json.mjs";
14
+ import p from "./solanaMainnetRegistry.json.mjs";
15
+ import m from "./solanaLocalnetRegistry.json.mjs";
16
+ import h from "./tronNileRegistry.json.mjs";
17
+ import g from "./tronMainnetRegistry.json.mjs";
18
+ //#region ../shared/common/src/constants/token-data/ERC20Registry.ts
19
+ var _ = (n) => {
20
+ let r = f.networkRegistry.slice(0, 10);
25
21
  switch (n) {
26
- case e.polygon: return f.networkRegistry;
27
- case e.arbMainnet: return u.networkRegistry;
28
- case e.ethMainnet: return l.networkRegistry;
29
- case e.bnbMainnet: return d.networkRegistry;
30
- case e.avalanche: return p.networkRegistry;
31
- case e.optimism: return m.networkRegistry;
32
- case e.base: return h.networkRegistry;
22
+ case e.polygon: return l.networkRegistry;
23
+ case e.arbMainnet: return c.networkRegistry;
24
+ case e.ethMainnet: return s.networkRegistry;
25
+ case e.optimism: return u.networkRegistry;
26
+ case e.base: return d.networkRegistry;
33
27
  case e.arcTestnet: return t.networkRegistry;
34
- case e.solanaMainnet: return _.networkRegistry;
35
- case e.solanaLocalnet: return v.networkRegistry;
36
- case e.tronNile: return y.networkRegistry;
37
- case e.tronMainnet: return b.networkRegistry;
28
+ case e.solanaMainnet: return p.networkRegistry;
29
+ case e.solanaLocalnet: return m.networkRegistry;
30
+ case e.tronNile: return h.networkRegistry;
31
+ case e.tronMainnet: return g.networkRegistry;
38
32
  default: return r;
39
33
  }
40
- }, S = (t) => {
41
- let l;
34
+ }, v = (t) => {
35
+ let s;
42
36
  switch (t) {
43
37
  case e.polygon:
44
- l = a;
38
+ s = i;
45
39
  break;
46
40
  case e.arbMainnet:
47
- l = r;
41
+ s = r;
48
42
  break;
49
43
  case e.ethMainnet:
50
- l = n;
51
- break;
52
- case e.avalanche:
53
- l = o;
54
- break;
55
- case e.bnbMainnet:
56
- l = i;
44
+ s = n;
57
45
  break;
58
46
  case e.optimism:
59
- l = s;
47
+ s = a;
60
48
  break;
61
49
  case e.base:
62
- l = c;
50
+ s = o;
63
51
  break;
64
52
  case e.solanaMainnet:
65
- l = _;
53
+ s = p;
66
54
  break;
67
55
  case e.solanaLocalnet:
68
- l = v;
56
+ s = m;
69
57
  break;
70
58
  case e.tronNile:
71
- l = y;
59
+ s = h;
72
60
  break;
73
61
  case e.tronMainnet:
74
- l = b;
62
+ s = g;
75
63
  break;
76
64
  default:
77
- l = n;
65
+ s = n;
78
66
  break;
79
67
  }
80
- return l.networkRegistry;
68
+ return s.networkRegistry;
81
69
  };
82
70
  //#endregion
83
- export { x as getERC20Registry, S as getFixedRegistry };
71
+ export { _ as getERC20Registry, v as getFixedRegistry };
@@ -1 +1 @@
1
- const e=require(`./arcTestnetRegistry.json.cjs`),t=require(`./ethMainnetRegistryFixed.json.cjs`),n=require(`./arbMainnetRegistryFixed.json.cjs`),r=require(`./bnbMainnetRegistryFixed.json.cjs`),i=require(`./polygonRegistryFixed.json.cjs`),a=require(`./avalancheRegistryFixed.json.cjs`),o=require(`./optimismRegistryFixed.json.cjs`),s=require(`./baseRegistryFixed.json.cjs`),c=require(`./ethMainnetRegistry.json.cjs`),l=require(`./arbMainnetRegistry.json.cjs`),u=require(`./bnbMainnetRegistry.json.cjs`),d=require(`./polygonRegistry.json.cjs`),f=require(`./avalancheRegistry.json.cjs`),p=require(`./optimismRegistry.json.cjs`),m=require(`./baseRegistry.json.cjs`),h=require(`./localhostRegistry.json.cjs`),g=require(`./solanaMainnetRegistry.json.cjs`),_=require(`./solanaLocalnetRegistry.json.cjs`);require(`./ERC20Registry.cjs`);var v=t.default.networkRegistry,y=n.default.networkRegistry,b=r.default.networkRegistry,x=i.default.networkRegistry,S=a.default.networkRegistry,C=o.default.networkRegistry,w=s.default.networkRegistry,T=c.default.networkRegistry,E=l.default.networkRegistry,D=u.default.networkRegistry,O=d.default.networkRegistry,k=f.default.networkRegistry,A=p.default.networkRegistry,j=m.default.networkRegistry,M=h.default.networkRegistry,N=e.default.networkRegistry,P=g.default.networkRegistry,F=_.default.networkRegistry;exports.arbMainnetRegistry=E,exports.arbMainnetRegistryFixed=y,exports.arcTestnetRegistry=N,exports.avalancheRegistry=k,exports.avalancheRegistryFixed=S,exports.baseRegistry=j,exports.baseRegistryFixed=w,exports.bnbMainnetRegistry=D,exports.bnbMainnetRegistryFixed=b,exports.ethMainnetRegistry=T,exports.ethMainnetRegistryFixed=v,exports.localhostRegistry=M,exports.optimismRegistry=A,exports.optimismRegistryFixed=C,exports.polygonRegistry=O,exports.polygonRegistryFixed=x,exports.solanaLocalnetRegistry=F,exports.solanaMainnetRegistry=P;
1
+ const e=require(`./arcTestnetRegistry.json.cjs`),t=require(`./ethMainnetRegistryFixed.json.cjs`),n=require(`./arbMainnetRegistryFixed.json.cjs`),r=require(`./polygonRegistryFixed.json.cjs`),i=require(`./optimismRegistryFixed.json.cjs`),a=require(`./baseRegistryFixed.json.cjs`),o=require(`./ethMainnetRegistry.json.cjs`),s=require(`./arbMainnetRegistry.json.cjs`),c=require(`./polygonRegistry.json.cjs`),l=require(`./optimismRegistry.json.cjs`),u=require(`./baseRegistry.json.cjs`),d=require(`./localhostRegistry.json.cjs`),f=require(`./solanaMainnetRegistry.json.cjs`),p=require(`./solanaLocalnetRegistry.json.cjs`);require(`./ERC20Registry.cjs`);var m=t.default.networkRegistry,h=n.default.networkRegistry,g=r.default.networkRegistry,_=i.default.networkRegistry,v=a.default.networkRegistry,y=o.default.networkRegistry,b=s.default.networkRegistry,x=c.default.networkRegistry,S=l.default.networkRegistry,C=u.default.networkRegistry,w=d.default.networkRegistry,T=e.default.networkRegistry,E=f.default.networkRegistry,D=p.default.networkRegistry;exports.arbMainnetRegistry=b,exports.arbMainnetRegistryFixed=h,exports.arcTestnetRegistry=T,exports.baseRegistry=C,exports.baseRegistryFixed=v,exports.ethMainnetRegistry=y,exports.ethMainnetRegistryFixed=m,exports.localhostRegistry=w,exports.optimismRegistry=S,exports.optimismRegistryFixed=_,exports.polygonRegistry=x,exports.polygonRegistryFixed=g,exports.solanaLocalnetRegistry=D,exports.solanaMainnetRegistry=E;
@@ -227,51 +227,6 @@ declare const arbMainnetRegistryFixed: ({
227
227
  isVyper?: undefined;
228
228
  balanceStorageOffset?: undefined;
229
229
  })[];
230
- declare const bnbMainnetRegistryFixed: ({
231
- chainId: number;
232
- erc20TokenAddress: string;
233
- wrappedErc20TokenAddress: string;
234
- name: string;
235
- symbol: string;
236
- decimals: number;
237
- logoURI: string;
238
- underlyingErc20TokenAddress?: undefined;
239
- isVolatile?: undefined;
240
- aaveToken?: undefined;
241
- } | {
242
- chainId: number;
243
- erc20TokenAddress: string;
244
- name: string;
245
- symbol: string;
246
- decimals: number;
247
- logoURI: string;
248
- wrappedErc20TokenAddress?: undefined;
249
- underlyingErc20TokenAddress?: undefined;
250
- isVolatile?: undefined;
251
- aaveToken?: undefined;
252
- } | {
253
- chainId: number;
254
- erc20TokenAddress: string;
255
- underlyingErc20TokenAddress: string;
256
- name: string;
257
- symbol: string;
258
- decimals: number;
259
- logoURI: string;
260
- isVolatile: boolean;
261
- aaveToken: boolean;
262
- wrappedErc20TokenAddress?: undefined;
263
- } | {
264
- chainId: number;
265
- erc20TokenAddress: string;
266
- underlyingErc20TokenAddress: string;
267
- name: string;
268
- symbol: string;
269
- decimals: number;
270
- logoURI: string;
271
- isVolatile: boolean;
272
- wrappedErc20TokenAddress?: undefined;
273
- aaveToken?: undefined;
274
- })[];
275
230
  declare const polygonRegistryFixed: ({
276
231
  chainId: number;
277
232
  erc20TokenAddress: string;
@@ -363,77 +318,6 @@ declare const polygonRegistryFixed: ({
363
318
  isVolatile?: undefined;
364
319
  aaveToken?: undefined;
365
320
  })[];
366
- declare const avalancheRegistryFixed: ({
367
- chainId: number;
368
- erc20TokenAddress: string;
369
- wrappedErc20TokenAddress: string;
370
- name: string;
371
- symbol: string;
372
- decimals: number;
373
- logoURI: string;
374
- allowanceStorageOffset?: undefined;
375
- isVyper?: undefined;
376
- balanceStorageOffset?: undefined;
377
- underlyingErc20TokenAddress?: undefined;
378
- isVolatile?: undefined;
379
- aaveToken?: undefined;
380
- } | {
381
- chainId: number;
382
- erc20TokenAddress: string;
383
- name: string;
384
- symbol: string;
385
- decimals: number;
386
- logoURI: string;
387
- allowanceStorageOffset: number;
388
- isVyper: boolean;
389
- balanceStorageOffset: number;
390
- wrappedErc20TokenAddress?: undefined;
391
- underlyingErc20TokenAddress?: undefined;
392
- isVolatile?: undefined;
393
- aaveToken?: undefined;
394
- } | {
395
- chainId: number;
396
- erc20TokenAddress: string;
397
- name: string;
398
- symbol: string;
399
- decimals: number;
400
- logoURI: string;
401
- wrappedErc20TokenAddress?: undefined;
402
- allowanceStorageOffset?: undefined;
403
- isVyper?: undefined;
404
- balanceStorageOffset?: undefined;
405
- underlyingErc20TokenAddress?: undefined;
406
- isVolatile?: undefined;
407
- aaveToken?: undefined;
408
- } | {
409
- chainId: number;
410
- erc20TokenAddress: string;
411
- underlyingErc20TokenAddress: string;
412
- name: string;
413
- symbol: string;
414
- decimals: number;
415
- logoURI: string;
416
- isVolatile: boolean;
417
- aaveToken: boolean;
418
- wrappedErc20TokenAddress?: undefined;
419
- allowanceStorageOffset?: undefined;
420
- isVyper?: undefined;
421
- balanceStorageOffset?: undefined;
422
- } | {
423
- chainId: number;
424
- erc20TokenAddress: string;
425
- name: string;
426
- symbol: string;
427
- decimals: number;
428
- logoURI: string;
429
- allowanceStorageOffset: number;
430
- isVyper: boolean;
431
- wrappedErc20TokenAddress?: undefined;
432
- balanceStorageOffset?: undefined;
433
- underlyingErc20TokenAddress?: undefined;
434
- isVolatile?: undefined;
435
- aaveToken?: undefined;
436
- })[];
437
321
  declare const optimismRegistryFixed: ({
438
322
  chainId: number;
439
323
  erc20TokenAddress: string;
@@ -804,51 +688,6 @@ declare const arbMainnetRegistry: ({
804
688
  isVyper?: undefined;
805
689
  balanceStorageOffset?: undefined;
806
690
  })[];
807
- declare const bnbMainnetRegistry: ({
808
- chainId: number;
809
- erc20TokenAddress: string;
810
- wrappedErc20TokenAddress: string;
811
- name: string;
812
- symbol: string;
813
- decimals: number;
814
- logoURI: string;
815
- underlyingErc20TokenAddress?: undefined;
816
- isVolatile?: undefined;
817
- aaveToken?: undefined;
818
- } | {
819
- chainId: number;
820
- erc20TokenAddress: string;
821
- name: string;
822
- symbol: string;
823
- decimals: number;
824
- logoURI: string;
825
- wrappedErc20TokenAddress?: undefined;
826
- underlyingErc20TokenAddress?: undefined;
827
- isVolatile?: undefined;
828
- aaveToken?: undefined;
829
- } | {
830
- chainId: number;
831
- erc20TokenAddress: string;
832
- underlyingErc20TokenAddress: string;
833
- name: string;
834
- symbol: string;
835
- decimals: number;
836
- logoURI: string;
837
- isVolatile: boolean;
838
- aaveToken: boolean;
839
- wrappedErc20TokenAddress?: undefined;
840
- } | {
841
- chainId: number;
842
- erc20TokenAddress: string;
843
- underlyingErc20TokenAddress: string;
844
- name: string;
845
- symbol: string;
846
- decimals: number;
847
- logoURI: string;
848
- isVolatile: boolean;
849
- wrappedErc20TokenAddress?: undefined;
850
- aaveToken?: undefined;
851
- })[];
852
691
  declare const polygonRegistry: ({
853
692
  chainId: number;
854
693
  erc20TokenAddress: string;
@@ -940,77 +779,6 @@ declare const polygonRegistry: ({
940
779
  isVolatile?: undefined;
941
780
  aaveToken?: undefined;
942
781
  })[];
943
- declare const avalancheRegistry: ({
944
- chainId: number;
945
- erc20TokenAddress: string;
946
- wrappedErc20TokenAddress: string;
947
- name: string;
948
- symbol: string;
949
- decimals: number;
950
- logoURI: string;
951
- allowanceStorageOffset?: undefined;
952
- isVyper?: undefined;
953
- balanceStorageOffset?: undefined;
954
- underlyingErc20TokenAddress?: undefined;
955
- isVolatile?: undefined;
956
- aaveToken?: undefined;
957
- } | {
958
- chainId: number;
959
- erc20TokenAddress: string;
960
- name: string;
961
- symbol: string;
962
- decimals: number;
963
- logoURI: string;
964
- allowanceStorageOffset: number;
965
- isVyper: boolean;
966
- balanceStorageOffset: number;
967
- wrappedErc20TokenAddress?: undefined;
968
- underlyingErc20TokenAddress?: undefined;
969
- isVolatile?: undefined;
970
- aaveToken?: undefined;
971
- } | {
972
- chainId: number;
973
- erc20TokenAddress: string;
974
- name: string;
975
- symbol: string;
976
- decimals: number;
977
- logoURI: string;
978
- wrappedErc20TokenAddress?: undefined;
979
- allowanceStorageOffset?: undefined;
980
- isVyper?: undefined;
981
- balanceStorageOffset?: undefined;
982
- underlyingErc20TokenAddress?: undefined;
983
- isVolatile?: undefined;
984
- aaveToken?: undefined;
985
- } | {
986
- chainId: number;
987
- erc20TokenAddress: string;
988
- underlyingErc20TokenAddress: string;
989
- name: string;
990
- symbol: string;
991
- decimals: number;
992
- logoURI: string;
993
- isVolatile: boolean;
994
- aaveToken: boolean;
995
- wrappedErc20TokenAddress?: undefined;
996
- allowanceStorageOffset?: undefined;
997
- isVyper?: undefined;
998
- balanceStorageOffset?: undefined;
999
- } | {
1000
- chainId: number;
1001
- erc20TokenAddress: string;
1002
- name: string;
1003
- symbol: string;
1004
- decimals: number;
1005
- logoURI: string;
1006
- allowanceStorageOffset: number;
1007
- isVyper: boolean;
1008
- wrappedErc20TokenAddress?: undefined;
1009
- balanceStorageOffset?: undefined;
1010
- underlyingErc20TokenAddress?: undefined;
1011
- isVolatile?: undefined;
1012
- aaveToken?: undefined;
1013
- })[];
1014
782
  declare const optimismRegistry: ({
1015
783
  chainId: number;
1016
784
  erc20TokenAddress: string;
@@ -1378,4 +1146,4 @@ declare const solanaLocalnetRegistry: {
1378
1146
  decimals: number;
1379
1147
  logoURI: string;
1380
1148
  }[];
1381
- export { ethMainnetRegistryFixed, arbMainnetRegistryFixed, bnbMainnetRegistryFixed, polygonRegistryFixed, avalancheRegistryFixed, optimismRegistryFixed, baseRegistryFixed, ethMainnetRegistry, arbMainnetRegistry, bnbMainnetRegistry, polygonRegistry, avalancheRegistry, optimismRegistry, baseRegistry, localhostRegistry, solanaMainnetRegistry, solanaLocalnetRegistry, arcTestnetRegistry, };
1149
+ export { ethMainnetRegistryFixed, arbMainnetRegistryFixed, polygonRegistryFixed, optimismRegistryFixed, baseRegistryFixed, ethMainnetRegistry, arbMainnetRegistry, polygonRegistry, optimismRegistry, baseRegistry, localhostRegistry, solanaMainnetRegistry, solanaLocalnetRegistry, arcTestnetRegistry, };
@@ -1,23 +1,19 @@
1
1
  import e from "./arcTestnetRegistry.json.mjs";
2
2
  import t from "./ethMainnetRegistryFixed.json.mjs";
3
3
  import n from "./arbMainnetRegistryFixed.json.mjs";
4
- import r from "./bnbMainnetRegistryFixed.json.mjs";
5
- import i from "./polygonRegistryFixed.json.mjs";
6
- import a from "./avalancheRegistryFixed.json.mjs";
7
- import o from "./optimismRegistryFixed.json.mjs";
8
- import s from "./baseRegistryFixed.json.mjs";
9
- import c from "./ethMainnetRegistry.json.mjs";
10
- import l from "./arbMainnetRegistry.json.mjs";
11
- import u from "./bnbMainnetRegistry.json.mjs";
12
- import d from "./polygonRegistry.json.mjs";
13
- import f from "./avalancheRegistry.json.mjs";
14
- import p from "./optimismRegistry.json.mjs";
15
- import m from "./baseRegistry.json.mjs";
16
- import h from "./localhostRegistry.json.mjs";
17
- import g from "./solanaMainnetRegistry.json.mjs";
18
- import _ from "./solanaLocalnetRegistry.json.mjs";
4
+ import r from "./polygonRegistryFixed.json.mjs";
5
+ import i from "./optimismRegistryFixed.json.mjs";
6
+ import a from "./baseRegistryFixed.json.mjs";
7
+ import o from "./ethMainnetRegistry.json.mjs";
8
+ import s from "./arbMainnetRegistry.json.mjs";
9
+ import c from "./polygonRegistry.json.mjs";
10
+ import l from "./optimismRegistry.json.mjs";
11
+ import u from "./baseRegistry.json.mjs";
12
+ import d from "./localhostRegistry.json.mjs";
13
+ import f from "./solanaMainnetRegistry.json.mjs";
14
+ import p from "./solanaLocalnetRegistry.json.mjs";
19
15
  import "./ERC20Registry.mjs";
20
- //#region libs/shared/common/src/constants/token-data/index.ts
21
- var v = t.networkRegistry, y = n.networkRegistry, b = r.networkRegistry, x = i.networkRegistry, S = a.networkRegistry, C = o.networkRegistry, w = s.networkRegistry, T = c.networkRegistry, E = l.networkRegistry, D = u.networkRegistry, O = d.networkRegistry, k = f.networkRegistry, A = p.networkRegistry, j = m.networkRegistry, M = h.networkRegistry, N = e.networkRegistry, P = g.networkRegistry, F = _.networkRegistry;
16
+ //#region ../shared/common/src/constants/token-data/index.ts
17
+ var m = t.networkRegistry, h = n.networkRegistry, g = r.networkRegistry, _ = i.networkRegistry, v = a.networkRegistry, y = o.networkRegistry, b = s.networkRegistry, x = c.networkRegistry, S = l.networkRegistry, C = u.networkRegistry, w = d.networkRegistry, T = e.networkRegistry, E = f.networkRegistry, D = p.networkRegistry;
22
18
  //#endregion
23
- export { E as arbMainnetRegistry, y as arbMainnetRegistryFixed, N as arcTestnetRegistry, k as avalancheRegistry, S as avalancheRegistryFixed, j as baseRegistry, w as baseRegistryFixed, D as bnbMainnetRegistry, b as bnbMainnetRegistryFixed, T as ethMainnetRegistry, v as ethMainnetRegistryFixed, M as localhostRegistry, A as optimismRegistry, C as optimismRegistryFixed, O as polygonRegistry, x as polygonRegistryFixed, F as solanaLocalnetRegistry, P as solanaMainnetRegistry };
19
+ export { b as arbMainnetRegistry, h as arbMainnetRegistryFixed, T as arcTestnetRegistry, C as baseRegistry, v as baseRegistryFixed, y as ethMainnetRegistry, m as ethMainnetRegistryFixed, w as localhostRegistry, S as optimismRegistry, _ as optimismRegistryFixed, x as polygonRegistry, g as polygonRegistryFixed, D as solanaLocalnetRegistry, E as solanaMainnetRegistry };
@@ -1,7 +1,7 @@
1
1
  import { chainIds as e } from "./chains.constants.mjs";
2
2
  import { getAmountInWei as t } from "../functions/web3/etherFunctions.mjs";
3
3
  import { getERC20TokenBySymbol as n } from "../functions/utils/erc20tokenFunctions.mjs";
4
- //#region libs/shared/common/src/constants/token.limits.constants.ts
4
+ //#region ../shared/common/src/constants/token.limits.constants.ts
5
5
  var r = { [e.optimism]: {
6
6
  ETH: "0.5",
7
7
  WETH: "0.5",
@@ -1,5 +1,5 @@
1
1
  import { chainIds as e } from "./chains.constants.mjs";
2
- //#region libs/shared/common/src/constants/tokens.constants.ts
2
+ //#region ../shared/common/src/constants/tokens.constants.ts
3
3
  var t = [
4
4
  "DAI",
5
5
  "MATIC",
@@ -1,4 +1,4 @@
1
- //#region libs/shared/common/src/constants/tx-confirmation.constants.ts
1
+ //#region ../shared/common/src/constants/tx-confirmation.constants.ts
2
2
  var e = 30 * 1e3, t = 50 * 1e3, n = 120 * 1e3, r = 1;
3
3
  //#endregion
4
4
  export { t as RELAYER_TX_CONFIRMATION_TIMEOUT, r as TX_CONFIRMATION_CONFIRMATIONS_COUNT, e as TX_CONFIRMATION_TIMEOUT, n as TX_CONFIRMATION_TIMEOUT_EXTENDED };
@@ -1,4 +1,4 @@
1
- //#region libs/shared/common/src/constants/vite.constants.ts
1
+ //#region ../shared/common/src/constants/vite.constants.ts
2
2
  var e = /* @__PURE__ */ function(e) {
3
3
  return e.DEVELOPMENT = "development", e.PLAYGROUND = "playground", e.PRODUCTION = "production", e.STAGING = "staging", e;
4
4
  }({});
@@ -1,4 +1,4 @@
1
- //#region libs/shared/common/src/constants/wallet.constants.ts
1
+ //#region ../shared/common/src/constants/wallet.constants.ts
2
2
  var e = new Set([
3
3
  "io.metamask",
4
4
  "solana-metamask",
@@ -3,7 +3,7 @@ import { jubHolder as t } from "./babyJub.mjs";
3
3
  import n from "libsodium-wrappers";
4
4
  import r from "process";
5
5
  import { Buffer as i } from "buffer";
6
- //#region libs/shared/common/src/crypto/preProcessing.ts
6
+ //#region ../shared/common/src/crypto/preProcessing.ts
7
7
  var a = async () => {
8
8
  (typeof window < "u" || typeof self < "u") && (typeof window < "u" && (window.global = window), globalThis.Buffer = i, globalThis.process = r), await Promise.all([
9
9
  n.ready,
@@ -3,7 +3,7 @@ import { ethers as n } from "ethers";
3
3
  import { Keypair as r } from "@solana/web3.js";
4
4
  import i from "bs58";
5
5
  import a from "tweetnacl";
6
- //#region libs/shared/common/src/data-structures/AccountActions/AccountActions.ts
6
+ //#region ../shared/common/src/data-structures/AccountActions/AccountActions.ts
7
7
  var o = class {
8
8
  static getEvmPrivateKeyFromSolanaPrivateKey = (e) => {
9
9
  let t = i.decode(e).slice(0, 32);
@@ -13,7 +13,7 @@ import { createCustomRpcProvider as f } from "../../functions/utils/create-provi
13
13
  import { Mutex as p } from "async-mutex";
14
14
  import { ethers as m } from "ethers";
15
15
  import { get as h, update as g } from "idb-keyval";
16
- //#region libs/shared/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.ts
16
+ //#region ../shared/common/src/data-structures/ApprovalDBs/EventsPublicApprovalsDB.ts
17
17
  var _ = class {
18
18
  updateMutexes = {};
19
19
  approvalTopic = m.id("Approval(address,address,uint256)");
@@ -1,5 +1,5 @@
1
1
  import { safeJsonStringify as e } from "../../functions/utils/serialize.utils.mjs";
2
- //#region libs/shared/common/src/data-structures/BlockchainEvent/BlockchainEvent.ts
2
+ //#region ../shared/common/src/data-structures/BlockchainEvent/BlockchainEvent.ts
3
3
  var t = class t {
4
4
  eventName;
5
5
  transactionHash;
@@ -1 +1 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`../../functions/utils/serialize.utils.cjs`),n=require(`../../constants/vite.constants.cjs`),r=require(`../../constants/chains.constants.cjs`),i=require(`../../types/hinkal.types.cjs`),a=require(`../../API/API.cjs`),o=require(`../../constants/kyc.constants.cjs`),s=require(`../../error-handling/error-codes.constants.cjs`),c=require(`../../functions/utils/erc20tokenFunctions.cjs`);require(`../../API/index.cjs`);const l=require(`../../crypto/poseidon.cjs`),u=require(`../crypto-keys/keys.cjs`),d=require(`../../functions/pre-transaction/solana.cjs`),f=require(`./hinkalCheckSolanaTokenRegistry.cjs`),p=require(`../../functions/web3/functionCalls/accessTokenCalls.cjs`),m=require(`../../functions/utils/token-check.utils.cjs`),h=require(`../TokenDBs/PrivateTokensDB.cjs`),g=require(`../../functions/web3/events/getShieldedBalance.cjs`),ee=require(`../../functions/utils/reloadPage.cjs`),_=require(`../../functions/utils/cacheDevice.utils.cjs`),v=require(`../../functions/web3/getContractMetadata.cjs`),y=require(`../../providers/SolanaProviderAdapter.cjs`),b=require(`./hinkalCheckTokenRegistry.cjs`),x=require(`../merkle-tree/MerkleTree.cjs`);require(`../merkle-tree/index.cjs`);const S=require(`./hinkalDeposit.cjs`),te=require(`../../functions/private-wallet/emporium.helpers.cjs`),C=require(`../../functions/web3/events/getApprovedBalance.cjs`),ne=require(`../../functions/kyc/checkTokenLimitsUSD.cjs`),w=require(`./hinkalDepositAndWithdraw.cjs`),T=require(`./hinkalSolanaDeposit.cjs`),E=require(`./hinkalSwap.cjs`),D=require(`./hinkalWithdraw.cjs`),O=require(`./resetMerkleTrees.cjs`),k=require(`../MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs`),A=require(`./hinkalPrivateWallet.cjs`),j=require(`./hinkalGetRecipientInfo.cjs`),M=require(`./hinkalSignSubAccount.cjs`),N=require(`./hinkalActionReceive.cjs`);require(`../TokenDBs/index.cjs`);const P=require(`./hinkalProoflessDeposit.cjs`),F=require(`./hinkalProxySwap.cjs`),I=require(`./hinkalMultiSend.cjs`),L=require(`./hinkalTransfer.cjs`),R=require(`./hinkalProxyToPrivate.cjs`),z=require(`../../providers/TronProviderAdapter.cjs`),B=require(`./hinkalSolanaDepositAndWithdraw.cjs`),V=require(`./hinkalSolanaWithdraw.cjs`),H=require(`./hinkalSolanaTransfer.cjs`),U=require(`./hinkalSolanaSwap.cjs`),W=require(`./hinkalSolanaProxySend.cjs`),G=require(`./hinkalSolanaProxySwap.cjs`),K=require(`./hinkalSolanaProxyShield.cjs`),q=require(`../../functions/web3/fetchSolanaMerkleTreeRootHash.cjs`),J=require(`./hinkalDepositAndBridge.cjs`),Y=require(`./hinkalClaimUtxo.cjs`),X=require(`./hinkalSolanaProoflessDeposit.cjs`),Z=require(`./hinkalSolanaClaimUtxo.cjs`),re=require(`./hinkalWithdrawStuckUtxos.cjs`);let Q=require(`ethers`),$=require(`@solana/web3.js`);var ie=class{ethereumProviderAdapter;solanaProviderAdapter;tronProviderAdapter;userKeys;signingMessage=`Login to Hinkal Protocol`;privateTransferSigningMessage=`Login to Hinkal's Private Transfer App`;merkleTreeHinkalByChain={};merkleTreeAccessTokenByChain={};nullifiersByChain={};encryptedOutputsByChain={};approvalsByChain={};commitmentsSnapshotServiceByChain={};nullifierSnapshotServiceByChain={};accessTokenSnapshotServiceByChain={};approvalsSnapshotServiceByChain={};utxoUtils;lastCallState=new Map;cacheDevice;generateProofRemotely;disableMerkleTreeUpdates;constructor(e){this.userKeys=new u.UserKeys(void 0),r.HINKAL_SUPPORTED_CHAINS.forEach(e=>{this.merkleTreeHinkalByChain[e]=x.MerkleTree.create(l.poseidonFunction,0n),this.merkleTreeAccessTokenByChain[e]=x.MerkleTree.create(l.poseidonFunction,0n),this.nullifiersByChain[e]=new Set,this.encryptedOutputsByChain[e]=[],this.approvalsByChain[e]=new Map}),this.generateProofRemotely=e?.generateProofRemotely??!1,this.utxoUtils=new k.MultiThreadedUtxoUtils,this.cacheDevice=_.createCacheDevice(e),this.disableMerkleTreeUpdates=e?.disableMerkleTreeUpdates??!1}enforceRateLimit(e,n,r=1e3){let i=Date.now(),a=t.CustomJSONStringify(n),o=this.lastCallState.get(e);if(o&&o.argsKey===a&&i-o.timestamp<r)throw Error(`${e} was already called with the same arguments`);this.lastCallState.set(e,{timestamp:i,argsKey:a})}getProviderAdapter(e){let t=e;t||=this.ethereumProviderAdapter?r.chainIds.ethMainnet:this.solanaProviderAdapter?r.chainIds.solanaMainnet:r.chainIds.tronMainnet;let n;if(n=r.isSolanaLike(t)?this.solanaProviderAdapter:r.isTronLike(t)?this.tronProviderAdapter:this.ethereumProviderAdapter,!n)throw Error(`ProviderAdapter is not initialized`);return n}async initProviderAdapter(e,t){let n=r.chainIds.ethMainnet;t instanceof y.SolanaProviderAdapter?n=r.chainIds.solanaMainnet:t instanceof z.TronProviderAdapter&&(n=r.currentTronChainId),await this.updateProviderAdapter(n,t),t.initConnector(e);let i=await t.connectAndPatchProvider(e);await t.init(i),await this.setListeners()}getSigningMessage(e=i.LoginMessageMode.PROTOCOL){switch(e){case i.LoginMessageMode.PRIVATE_TRANSFER:return this.privateTransferSigningMessage;case i.LoginMessageMode.PROTOCOL:default:return this.signingMessage}}async initUserKeys(e=i.LoginMessageMode.PROTOCOL){let t=this.getSigningMessage(e);this.userKeys=new u.UserKeys(await this.getProviderAdapter().signMessage(t))}initUserKeysWithSignature(e){this.userKeys=new u.UserKeys(e)}async initUserKeysFromSeedPhrases(e){let t=e.join(` `),n=Q.ethers.toUtf8Bytes(t);this.userKeys=new u.UserKeys(Q.ethers.keccak256(n))}async resetMerkle(e){this.disableMerkleTreeUpdates||(e?.every(e=>this.isSelectedNetworkSupported(e))??!0)&&await O.resetMerkleTrees(this,e)}getTronWeb(){let e=this.tronProviderAdapter;if(!e)throw Error(`Tron provider adapter not initialized`);if(!(e instanceof z.TronProviderAdapter))throw Error(`Tron provider adapter is not a TronProviderAdapter`);let t=e.getTronWeb();if(!t)throw Error(`TronWeb not available`);return t}getSupportedChains(){return this.ethereumProviderAdapter&&this.solanaProviderAdapter?r.WALLET_SUPPORTED_CHAINS:this.ethereumProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>!r.isSolanaLike(e)&&!r.isTronLike(e)):this.solanaProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>r.isSolanaLike(e)):this.tronProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>r.isTronLike(e)):[]}async waitForTransaction(e,t,n=1){return!!await this.getProviderAdapter(e).waitForTransaction(e,t,n)}getContract(e,t,n=void 0){return this.getProviderAdapter(e).getContract(e,t,n)}getContractWithFetcherByChainId(e,t,n=void 0){return v.getContractWithFetcherByChainId(e,t,n)}async signMessage(e){return await this.getProviderAdapter().signMessage(e)}async signTypedData(e,t,n){return await this.getProviderAdapter().signTypedData(e,t,n)}async signWithSubAccount(e,t,n,r){return M.hinkalSignSubAccount(e,t,n,r)}getContractWithSigner(e,t,n=``){return this.getProviderAdapter(e).getContractWithSigner(e,t,n)}getContractWithFetcher(e,t,n=``){return this.getProviderAdapter(e).getContractWithFetcher(e,t,n)}isSelectedNetworkSupported(e){return!!r.networkRegistry[e]}async switchNetwork(e){try{await this.getProviderAdapter().switchNetwork(e)}catch{throw Error(s.transactionErrorCodes.FAILED_TO_SWITCH_NETWORKS)}}isPermitterAvailable(e){return this.getProviderAdapter(e).isPermitterAvailable()}async disconnectFromConnector(){await this.ethereumProviderAdapter?.disconnectFromConnector(),await this.solanaProviderAdapter?.disconnectFromConnector(),await this.tronProviderAdapter?.disconnectFromConnector()}async resetProviderAdapters(){this.ethereumProviderAdapter=void 0,this.solanaProviderAdapter=void 0,this.tronProviderAdapter=void 0}async updateProviderAdapter(e,t){try{r.isSolanaLike(e)?(this.solanaProviderAdapter&&this.solanaProviderAdapter.release(),this.solanaProviderAdapter=t):r.isTronLike(e)?(this.tronProviderAdapter&&this.tronProviderAdapter.release(),this.tronProviderAdapter=t):(this.ethereumProviderAdapter&&this.ethereumProviderAdapter.release(),this.ethereumProviderAdapter=t)}catch(e){throw console.error(e),Error(`updateProviderAdapter failed, please try again.`)}}async setListeners(){this.ethereumProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}}),this.solanaProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}}),this.tronProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}})}async onAccountChanged(){await this.ethereumProviderAdapter?.onAccountChanged(),await this.solanaProviderAdapter?.onAccountChanged(),await this.tronProviderAdapter?.onAccountChanged();let e=i.EventType.AccountChanged;typeof document<`u`?document?.dispatchEvent(new Event(e)):process?.emit(`message`,e,void 0)}async onChainChanged(e){e?await this.getProviderAdapter(e).onChainChanged(e):(await this.disconnectFromConnector(),ee.reloadPage())}async monitorConnectedAddress(e){await a.API.monitor(await this.getEthereumAddressByChain(e))}async getBalances(e,t,n,r,i=!1,a,o=!1){return g.getShieldedBalance(this,e,t,n,r,i,this.generateProofRemotely,a,o)}async getApprovedBalances(e,t=!1,n=!1){return C.getApprovedBalance(this,e,t,n)}async getTotalBalance(e,t,i,a=!1,o,s=!1){let l=i??await this.getEthereumAddressByChain(e),u=t??this.userKeys,d=await this.getBalances(e,u.getShieldedPrivateKey(),u.getShieldedPublicKey(),l,a,o,s),f=!r.isSolanaLike(e)&&!s?await this.getApprovedBalances(e,a,o):new Map,p=n.isExtension?await h.privateTokensDB.getPrivateTokens(e,l):c.getErc20TokensForChain(e),m=[];return p.forEach(e=>{let t=e.erc20TokenAddress.toLowerCase(),n=d.get(t),r=f.get(t),i={token:e,balance:(n?.balance??0n)+(r?.balance??0n),timestamp:n?.timestamp||r?.timestamp||`0`,nfts:n?.nfts||[]};m.push(i)}),m}async getStuckShieldedBalances(e,t,n){return(await this.getTotalBalance(e,t,n,!1,!1,!0)).filter(e=>e.balance>0n)}getSupportedPassportLinks(){return o.supportedPassportLinks}checkAccessToken(e,t){return p.checkHinkalAccessToken(this,e,t)}checkExternalTokenLimitsUSD(e,t,n){return ne.checkTokenLimitsUSD(e,t,n)}async getHinkalTreeRootHash(t){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:n,originalDeployer:i}=r.networkRegistry[t].contractData;if(!e||!n||!i)throw Error(`Missing Solana configuration for chain ${t}`);let a=new $.PublicKey(i),o=d.getMerkleAccountPublicKey(new $.PublicKey(n),a);return q.fetchSolanaMerkleTreeRootHash(this.getSolanaProgram(e),o)}return this.getContractWithFetcherByChainId(t,e.ContractType.HinkalContract).getRootHash()}async getAccessTokenTreeRootHash(t){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:n,originalDeployer:i}=r.networkRegistry[t].contractData;if(!e||!n||!i)throw Error(`Missing Solana configuration for chain ${t}`);let a=new $.PublicKey(i),o=d.getAccessTokenMerkleAccountPublicKey(new $.PublicKey(n),a);return q.fetchSolanaMerkleTreeRootHash(this.getSolanaProgram(e),o)}return this.getContractWithFetcherByChainId(t,e.ContractType.AccessTokenContract).getRootHash()}async resetMerkleTreesIfNecessary(e){let t=(await Promise.all((e??this.getSupportedChains()).map(async e=>{let[t,n]=await Promise.all([this.getHinkalTreeRootHash(e),this.getAccessTokenTreeRootHash(e)]);return{chainId:e,needsReset:BigInt(t)!==this.merkleTreeHinkalByChain[e].getRootHash()||BigInt(n)!==this.merkleTreeAccessTokenByChain[e].getRootHash()}}))).filter(e=>e.needsReset).map(e=>e.chainId);t.length>0&&(console.log(`resetting merkle tree in resetMerkleTreesIfNecessary for chains:`,t),await this.resetMerkle(t))}async getEthereumAddress(){let e=this.ethereumProviderAdapter??this.solanaProviderAdapter??this.tronProviderAdapter;if(!e)throw Error(`No provider adapter initialized`);return e.getAddress()}getEthereumAddressByChain(e){return this.getProviderAdapter(e).getAddress()}async getRandomRelay(e,t=!1){return(await a.API.getIdleRelay(e,t)).relay}getGasPrice(e){let t=this.getProviderAdapter(e);if(!t)throw Error(`Illegal State of providerAdapter in Hinkal: no providerAdapter initialized`);return t.getGasPrice(e)}getAPI(){return a.API}snapshotsClearInterval(){this.getSupportedChains().forEach(e=>{this.commitmentsSnapshotServiceByChain[e]?.intervalClear(),this.accessTokenSnapshotServiceByChain[e]?.intervalClear(),this.nullifierSnapshotServiceByChain[e]?.intervalClear(),this.approvalsSnapshotServiceByChain[e]?.intervalClear()})}checkTokenRegistry(t,n,i){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:a,originalDeployer:o}=r.networkRegistry[t].contractData;if(!e||!a||!o)throw Error(`missing solana data`);return f.hinkalCheckSolanaTokenRegistry(this.getSolanaProgram(e),new $.PublicKey(o),n,i)}return r.isTronLike(t)?b.hinkalCheckTronTokenRegistry(n,i,t):b.hinkalCheckTokenRegistry(this.getContractWithFetcher(t,e.ContractType.HinkalHelperContract),n,i)}getRecipientInfo(){return j.getRecipientInfo(this)}getApprovedUtxos(e,t=!1){return C.getApprovedUtxos(this,e,t)}getApprovedUtxosForToken(e,t,n=!1){return C.getApprovedUtxosForToken(this,e,t,n)}async deposit(e,t,n=!0,r=!1){return S.hinkalDeposit(this,e,t,n,r)}async depositSolana(e,t){return T.hinkalSolanaDeposit(this,e,t)}async depositForOther(e,t,n,r=!0,i=!1){return this.enforceRateLimit(this.depositForOther.name,[e,t,n]),S.hinkalDepositForOther(this,e,t,n,r,i)}async depositSolanaForOther(e,t,n){return this.enforceRateLimit(this.depositSolanaForOther.name,[e,t,n]),T.hinkalSolanaDepositForOther(this,e,t,n)}async depositAndWithdraw(e,t,n,i,a,o,s,c=!0){return r.isSolanaLike(m.validateAndGetChainId([e]))?B.hinkalSolanaDepositAndWithdraw(this,e,t,n,i,a,o,s):w.hinkalDepositAndWithdraw(this,e,t,n,i,a,o,s,c)}async claimUtxo(e,t,n,i){return r.isSolanaLike(m.validateAndGetChainId([e]))?Z.hinkalSolanaClaimUtxo(this,e,t,n,i):Y.hinkalClaimUtxo(this,e,t,n,i)}async depositAndBridge(e,t,n,r,i,a,o=!0){return J.hinkalDepositAndBridge(this,e,t,n,r,i,a,o)}async prooflessDeposit(e,t,n,i){return r.isSolanaLike(m.validateAndGetChainId(e))?X.hinkalSolanaProoflessDeposit(this,e,t,n,i):P.hinkalProoflessDeposit(this,e,t,n,i)}getSolanaProgram(e){if(!this.solanaProviderAdapter)throw Error(`No provider adapter initialized`);if(!(`getSolanaProgram`in this.solanaProviderAdapter))throw Error(`Current provider adapter is not a Solana provider adapter`);return this.solanaProviderAdapter.getSolanaProgram(e)}getSolanaPublicKey(){if(!this.solanaProviderAdapter)throw Error(`No provider adapter initialized`);if(!(`getSolanaPublicKey`in this.solanaProviderAdapter))throw Error(`Current provider adapter is not a Solana provider adapter`);return this.solanaProviderAdapter.getSolanaPublicKey()}async transfer(e,t,n,i,a,o){return r.isSolanaLike(m.validateAndGetChainId(e))?H.hinkalSolanaTransfer(this,e,t,n,i,a,o):L.hinkalTransfer(this,e,t,n,i,a,o)}async withdraw(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?V.hinkalSolanaWithdraw(this,e,t,n,a,o,s):D.hinkalWithdraw(this,e,t,n,i,a,o,s)}async withdrawStuckUtxos(e,t){return re.hinkalWithdrawStuckUtxos(this,e,t)}async swap(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?this.swapSolana(e,t,i,a,o):E.hinkalSwap(this,e,t,n,i,a,o,s)}async swapSolana(e,t,n,r,i){let a=JSON.parse(n),o=BigInt(a.swapperAccountSalt),{instructionLists:s,addressLookupTableAccount:c}=a.data;return U.hinkalSolanaSwap(this,e,t,o,s,c,r,i)}async actionReceive(e,t,n,i,a,o){if(!a)throw Error(`subAccount is required`);return r.isSolanaLike(m.validateAndGetChainId(e))?K.hinkalSolanaProxyShield(this,e[0],t[0],a,void 0,o):N.hinkalActionReceive(this,e,t,n,i,a,o)}async actionPrivateWallet(e,t,n,r,i,a,o,s,c,l,u=!1,d,f,p){return this.enforceRateLimit(this.actionPrivateWallet.name,[e,t,n,r,i,a,o,s,c,p]),A.hinkalPrivateWallet(this,e,t,n,r,i,a,o,s,c,l,u,d,f,p)}async proxySwap(e,t,n,i,a,o,s,c,l=!1,u,d){return r.isSolanaLike(m.validateAndGetChainId(e))?G.hinkalSolanaProxySwap(this,e,t,i,o,s,c):F.hinkalProxySwap(this,e,t,n,i,a,o,s,c,l,u,d)}async proxyToPrivate(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?(this.enforceRateLimit(this.proxyToPrivate.name,[e[0],t[0],n,i]),K.hinkalSolanaProxyShield(this,e[0],t[0],n,i,s)):R.hinkalProxyToPrivate(this,e,t,i,a,o,n,s)}async proxySend(e,t,n,i,a,o,s){let c=m.validateAndGetChainId(e);if(r.isSolanaLike(c))return W.hinkalSolanaProxySend(this,e[0],t[0],n,i,s);let l=te.createTransaferEmporiumOpsBatch(this,c,e.map(e=>e.erc20TokenAddress),t,i),u=e.map((e,n)=>({token:e,amount:-1n*t[n]}));return await this.actionPrivateWallet(c,[],[],[],l,u,n,a,o,void 0,void 0,void 0,s,void 0)}async multiSendPrivateRecipients(e,t,n){return this.enforceRateLimit(this.multiSendPrivateRecipients.name,[e,t,n]),I.hinkalMultiSendPrivateRecipients(this,e,t,n)}areMerkleTreeUpdatesDisabled(){return this.disableMerkleTreeUpdates}updateMerkleTreeUpdates(e){this.disableMerkleTreeUpdates=e}};exports.Hinkal=ie;
1
+ require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`../../functions/utils/serialize.utils.cjs`),n=require(`../../constants/vite.constants.cjs`),r=require(`../../constants/chains.constants.cjs`),i=require(`../../types/hinkal.types.cjs`),a=require(`../../API/API.cjs`),o=require(`../../constants/kyc.constants.cjs`),s=require(`../../error-handling/error-codes.constants.cjs`),c=require(`../../functions/utils/erc20tokenFunctions.cjs`);require(`../../API/index.cjs`);const l=require(`../../crypto/poseidon.cjs`),u=require(`../crypto-keys/keys.cjs`),d=require(`../../functions/pre-transaction/solana.cjs`),f=require(`./hinkalCheckSolanaTokenRegistry.cjs`),p=require(`../../functions/web3/functionCalls/accessTokenCalls.cjs`),m=require(`../../functions/utils/token-check.utils.cjs`),h=require(`../TokenDBs/PrivateTokensDB.cjs`),g=require(`../../functions/web3/events/getShieldedBalance.cjs`),ee=require(`../../functions/utils/reloadPage.cjs`),_=require(`../../functions/utils/cacheDevice.utils.cjs`),v=require(`../../functions/web3/getContractMetadata.cjs`),y=require(`../../providers/SolanaProviderAdapter.cjs`),b=require(`./hinkalCheckTokenRegistry.cjs`),x=require(`../merkle-tree/MerkleTree.cjs`);require(`../merkle-tree/index.cjs`);const S=require(`./hinkalDeposit.cjs`),te=require(`../../functions/private-wallet/emporium.helpers.cjs`),C=require(`../../functions/web3/events/getApprovedBalance.cjs`),ne=require(`../../functions/kyc/checkTokenLimitsUSD.cjs`),w=require(`./hinkalDepositAndWithdraw.cjs`),T=require(`./hinkalSolanaDeposit.cjs`),E=require(`./hinkalSwap.cjs`),D=require(`./hinkalWithdraw.cjs`),O=require(`./resetMerkleTrees.cjs`),k=require(`../MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs`),A=require(`./hinkalPrivateWallet.cjs`),j=require(`./hinkalGetRecipientInfo.cjs`),M=require(`./hinkalSignSubAccount.cjs`),N=require(`./hinkalActionReceive.cjs`);require(`../TokenDBs/index.cjs`);const P=require(`./hinkalProoflessDeposit.cjs`),F=require(`./hinkalProxySwap.cjs`),I=require(`./hinkalMultiSend.cjs`),L=require(`./hinkalTransfer.cjs`),R=require(`./hinkalProxyToPrivate.cjs`),z=require(`../../providers/TronProviderAdapter.cjs`),B=require(`./hinkalSolanaDepositAndWithdraw.cjs`),V=require(`./hinkalSolanaWithdraw.cjs`),H=require(`./hinkalSolanaTransfer.cjs`),U=require(`./hinkalSolanaSwap.cjs`),W=require(`./hinkalSolanaProxySend.cjs`),G=require(`./hinkalSolanaProxySwap.cjs`),K=require(`./hinkalSolanaProxyShield.cjs`),q=require(`../../functions/web3/fetchSolanaMerkleTreeRootHash.cjs`),J=require(`./hinkalDepositAndBridge.cjs`),Y=require(`./hinkalClaimUtxo.cjs`),X=require(`./hinkalSolanaProoflessDeposit.cjs`),Z=require(`./hinkalSolanaClaimUtxo.cjs`),re=require(`./hinkalWithdrawStuckUtxos.cjs`);let Q=require(`ethers`),$=require(`@solana/web3.js`);var ie=class{ethereumProviderAdapter;solanaProviderAdapter;tronProviderAdapter;userKeys;signingMessage=`Login to Hinkal Protocol`;privateTransferSigningMessage=`Login to Hinkal's Private Transfer App`;merkleTreeHinkalByChain={};merkleTreeAccessTokenByChain={};nullifiersByChain={};encryptedOutputsByChain={};approvalsByChain={};commitmentsSnapshotServiceByChain={};nullifierSnapshotServiceByChain={};accessTokenSnapshotServiceByChain={};approvalsSnapshotServiceByChain={};utxoUtils;lastCallState=new Map;cacheDevice;generateProofRemotely;disableMerkleTreeUpdates;constructor(e){this.userKeys=new u.UserKeys(void 0),r.HINKAL_SUPPORTED_CHAINS.forEach(e=>{this.merkleTreeHinkalByChain[e]=x.MerkleTree.create(l.poseidonFunction,0n),this.merkleTreeAccessTokenByChain[e]=x.MerkleTree.create(l.poseidonFunction,0n),this.nullifiersByChain[e]=new Set,this.encryptedOutputsByChain[e]=[],this.approvalsByChain[e]=new Map}),this.generateProofRemotely=e?.generateProofRemotely??!0,this.utxoUtils=new k.MultiThreadedUtxoUtils,this.cacheDevice=_.createCacheDevice(e),this.disableMerkleTreeUpdates=e?.disableMerkleTreeUpdates??!1}enforceRateLimit(e,n,r=1e3){let i=Date.now(),a=t.CustomJSONStringify(n),o=this.lastCallState.get(e);if(o&&o.argsKey===a&&i-o.timestamp<r)throw Error(`${e} was already called with the same arguments`);this.lastCallState.set(e,{timestamp:i,argsKey:a})}getProviderAdapter(e){let t=e;t||=this.ethereumProviderAdapter?r.chainIds.ethMainnet:this.solanaProviderAdapter?r.chainIds.solanaMainnet:r.chainIds.tronMainnet;let n;if(n=r.isSolanaLike(t)?this.solanaProviderAdapter:r.isTronLike(t)?this.tronProviderAdapter:this.ethereumProviderAdapter,!n)throw Error(`ProviderAdapter is not initialized`);return n}async initProviderAdapter(e,t){let n=r.chainIds.ethMainnet;t instanceof y.SolanaProviderAdapter?n=r.chainIds.solanaMainnet:t instanceof z.TronProviderAdapter&&(n=r.currentTronChainId),await this.updateProviderAdapter(n,t),t.initConnector(e);let i=await t.connectAndPatchProvider(e);await t.init(i),await this.setListeners()}getSigningMessage(e=i.LoginMessageMode.PROTOCOL){switch(e){case i.LoginMessageMode.PRIVATE_TRANSFER:return this.privateTransferSigningMessage;case i.LoginMessageMode.PROTOCOL:default:return this.signingMessage}}async initUserKeys(e=i.LoginMessageMode.PROTOCOL){let t=this.getSigningMessage(e);this.userKeys=new u.UserKeys(await this.getProviderAdapter().signMessage(t))}initUserKeysWithSignature(e){this.userKeys=new u.UserKeys(e)}async initUserKeysFromSeedPhrases(e){let t=e.join(` `),n=Q.ethers.toUtf8Bytes(t);this.userKeys=new u.UserKeys(Q.ethers.keccak256(n))}async resetMerkle(e){this.disableMerkleTreeUpdates||(e?.every(e=>this.isSelectedNetworkSupported(e))??!0)&&await O.resetMerkleTrees(this,e)}getTronWeb(){let e=this.tronProviderAdapter;if(!e)throw Error(`Tron provider adapter not initialized`);if(!(e instanceof z.TronProviderAdapter))throw Error(`Tron provider adapter is not a TronProviderAdapter`);let t=e.getTronWeb();if(!t)throw Error(`TronWeb not available`);return t}getSupportedChains(){return this.ethereumProviderAdapter&&this.solanaProviderAdapter?r.WALLET_SUPPORTED_CHAINS:this.ethereumProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>!r.isSolanaLike(e)&&!r.isTronLike(e)):this.solanaProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>r.isSolanaLike(e)):this.tronProviderAdapter?r.HINKAL_SUPPORTED_CHAINS.filter(e=>r.isTronLike(e)):[]}async waitForTransaction(e,t,n=1){return!!await this.getProviderAdapter(e).waitForTransaction(e,t,n)}getContract(e,t,n=void 0){return this.getProviderAdapter(e).getContract(e,t,n)}getContractWithFetcherByChainId(e,t,n=void 0){return v.getContractWithFetcherByChainId(e,t,n)}async signMessage(e){return await this.getProviderAdapter().signMessage(e)}async signTypedData(e,t,n){return await this.getProviderAdapter().signTypedData(e,t,n)}async signWithSubAccount(e,t,n,r){return M.hinkalSignSubAccount(e,t,n,r)}getContractWithSigner(e,t,n=``){return this.getProviderAdapter(e).getContractWithSigner(e,t,n)}getContractWithFetcher(e,t,n=``){return this.getProviderAdapter(e).getContractWithFetcher(e,t,n)}isSelectedNetworkSupported(e){return!!r.networkRegistry[e]}async switchNetwork(e){try{await this.getProviderAdapter().switchNetwork(e)}catch{throw Error(s.transactionErrorCodes.FAILED_TO_SWITCH_NETWORKS)}}isPermitterAvailable(e){return this.getProviderAdapter(e).isPermitterAvailable()}async disconnectFromConnector(){await this.ethereumProviderAdapter?.disconnectFromConnector(),await this.solanaProviderAdapter?.disconnectFromConnector(),await this.tronProviderAdapter?.disconnectFromConnector()}async resetProviderAdapters(){this.ethereumProviderAdapter=void 0,this.solanaProviderAdapter=void 0,this.tronProviderAdapter=void 0}async updateProviderAdapter(e,t){try{r.isSolanaLike(e)?(this.solanaProviderAdapter&&this.solanaProviderAdapter.release(),this.solanaProviderAdapter=t):r.isTronLike(e)?(this.tronProviderAdapter&&this.tronProviderAdapter.release(),this.tronProviderAdapter=t):(this.ethereumProviderAdapter&&this.ethereumProviderAdapter.release(),this.ethereumProviderAdapter=t)}catch(e){throw console.error(e),Error(`updateProviderAdapter failed, please try again.`)}}async setListeners(){this.ethereumProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}}),this.solanaProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}}),this.tronProviderAdapter?.setChainEventListener({onAccountChanged:()=>{this.onAccountChanged()},onChainChanged:e=>{this.onChainChanged(e)}})}async onAccountChanged(){await this.ethereumProviderAdapter?.onAccountChanged(),await this.solanaProviderAdapter?.onAccountChanged(),await this.tronProviderAdapter?.onAccountChanged();let e=i.EventType.AccountChanged;typeof document<`u`?document?.dispatchEvent(new Event(e)):process?.emit(`message`,e,void 0)}async onChainChanged(e){e?await this.getProviderAdapter(e).onChainChanged(e):(await this.disconnectFromConnector(),ee.reloadPage())}async monitorConnectedAddress(e){await a.API.monitor(await this.getEthereumAddressByChain(e))}async getBalances(e,t,n,r,i=!1,a,o=!1){return g.getShieldedBalance(this,e,t,n,r,i,this.generateProofRemotely,a,o)}async getApprovedBalances(e,t=!1,n=!1){return C.getApprovedBalance(this,e,t,n)}async getTotalBalance(e,t,i,a=!1,o,s=!1){let l=i??await this.getEthereumAddressByChain(e),u=t??this.userKeys,d=await this.getBalances(e,u.getShieldedPrivateKey(),u.getShieldedPublicKey(),l,a,o,s),f=!r.isSolanaLike(e)&&!s?await this.getApprovedBalances(e,a,o):new Map,p=n.isExtension?await h.privateTokensDB.getPrivateTokens(e,l):c.getErc20TokensForChain(e),m=[];return p.forEach(e=>{let t=e.erc20TokenAddress.toLowerCase(),n=d.get(t),r=f.get(t),i={token:e,balance:(n?.balance??0n)+(r?.balance??0n),timestamp:n?.timestamp||r?.timestamp||`0`,nfts:n?.nfts||[]};m.push(i)}),m}async getStuckShieldedBalances(e,t,n){return(await this.getTotalBalance(e,t,n,!1,!1,!0)).filter(e=>e.balance>0n)}getSupportedPassportLinks(){return o.supportedPassportLinks}checkAccessToken(e,t){return p.checkHinkalAccessToken(this,e,t)}checkExternalTokenLimitsUSD(e,t,n){return ne.checkTokenLimitsUSD(e,t,n)}async getHinkalTreeRootHash(t){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:n,originalDeployer:i}=r.networkRegistry[t].contractData;if(!e||!n||!i)throw Error(`Missing Solana configuration for chain ${t}`);let a=new $.PublicKey(i),o=d.getMerkleAccountPublicKey(new $.PublicKey(n),a);return q.fetchSolanaMerkleTreeRootHash(this.getSolanaProgram(e),o)}return this.getContractWithFetcherByChainId(t,e.ContractType.HinkalContract).getRootHash()}async getAccessTokenTreeRootHash(t){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:n,originalDeployer:i}=r.networkRegistry[t].contractData;if(!e||!n||!i)throw Error(`Missing Solana configuration for chain ${t}`);let a=new $.PublicKey(i),o=d.getAccessTokenMerkleAccountPublicKey(new $.PublicKey(n),a);return q.fetchSolanaMerkleTreeRootHash(this.getSolanaProgram(e),o)}return this.getContractWithFetcherByChainId(t,e.ContractType.AccessTokenContract).getRootHash()}async resetMerkleTreesIfNecessary(e){let t=(await Promise.all((e??this.getSupportedChains()).map(async e=>{let[t,n]=await Promise.all([this.getHinkalTreeRootHash(e),this.getAccessTokenTreeRootHash(e)]);return{chainId:e,needsReset:BigInt(t)!==this.merkleTreeHinkalByChain[e].getRootHash()||BigInt(n)!==this.merkleTreeAccessTokenByChain[e].getRootHash()}}))).filter(e=>e.needsReset).map(e=>e.chainId);t.length>0&&(console.log(`resetting merkle tree in resetMerkleTreesIfNecessary for chains:`,t),await this.resetMerkle(t))}async getEthereumAddress(){let e=this.ethereumProviderAdapter??this.solanaProviderAdapter??this.tronProviderAdapter;if(!e)throw Error(`No provider adapter initialized`);return e.getAddress()}getEthereumAddressByChain(e){return this.getProviderAdapter(e).getAddress()}async getRandomRelay(e,t=!1){return(await a.API.getIdleRelay(e,t)).relay}getGasPrice(e){let t=this.getProviderAdapter(e);if(!t)throw Error(`Illegal State of providerAdapter in Hinkal: no providerAdapter initialized`);return t.getGasPrice(e)}getAPI(){return a.API}snapshotsClearInterval(){this.getSupportedChains().forEach(e=>{this.commitmentsSnapshotServiceByChain[e]?.intervalClear(),this.accessTokenSnapshotServiceByChain[e]?.intervalClear(),this.nullifierSnapshotServiceByChain[e]?.intervalClear(),this.approvalsSnapshotServiceByChain[e]?.intervalClear()})}checkTokenRegistry(t,n,i){if(r.isSolanaLike(t)){let{hinkalIdl:e,hinkalAddress:a,originalDeployer:o}=r.networkRegistry[t].contractData;if(!e||!a||!o)throw Error(`missing solana data`);return f.hinkalCheckSolanaTokenRegistry(this.getSolanaProgram(e),new $.PublicKey(o),n,i)}return r.isTronLike(t)?b.hinkalCheckTronTokenRegistry(n,i,t):b.hinkalCheckTokenRegistry(this.getContractWithFetcher(t,e.ContractType.HinkalHelperContract),n,i)}getRecipientInfo(){return j.getRecipientInfo(this)}getApprovedUtxos(e,t=!1){return C.getApprovedUtxos(this,e,t)}getApprovedUtxosForToken(e,t,n=!1){return C.getApprovedUtxosForToken(this,e,t,n)}async deposit(e,t,n=!0,r=!1){return S.hinkalDeposit(this,e,t,n,r)}async depositSolana(e,t){return T.hinkalSolanaDeposit(this,e,t)}async depositForOther(e,t,n,r=!0,i=!1){return this.enforceRateLimit(this.depositForOther.name,[e,t,n]),S.hinkalDepositForOther(this,e,t,n,r,i)}async depositSolanaForOther(e,t,n){return this.enforceRateLimit(this.depositSolanaForOther.name,[e,t,n]),T.hinkalSolanaDepositForOther(this,e,t,n)}async depositAndWithdraw(e,t,n,i,a,o,s,c=!0){return r.isSolanaLike(m.validateAndGetChainId([e]))?B.hinkalSolanaDepositAndWithdraw(this,e,t,n,i,a,o,s):w.hinkalDepositAndWithdraw(this,e,t,n,i,a,o,s,c)}async claimUtxo(e,t,n,i){return r.isSolanaLike(m.validateAndGetChainId([e]))?Z.hinkalSolanaClaimUtxo(this,e,t,n,i):Y.hinkalClaimUtxo(this,e,t,n,i)}async depositAndBridge(e,t,n,r,i,a,o=!0){return J.hinkalDepositAndBridge(this,e,t,n,r,i,a,o)}async prooflessDeposit(e,t,n,i){return r.isSolanaLike(m.validateAndGetChainId(e))?X.hinkalSolanaProoflessDeposit(this,e,t,n,i):P.hinkalProoflessDeposit(this,e,t,n,i)}getSolanaProgram(e){if(!this.solanaProviderAdapter)throw Error(`No provider adapter initialized`);if(!(`getSolanaProgram`in this.solanaProviderAdapter))throw Error(`Current provider adapter is not a Solana provider adapter`);return this.solanaProviderAdapter.getSolanaProgram(e)}getSolanaPublicKey(){if(!this.solanaProviderAdapter)throw Error(`No provider adapter initialized`);if(!(`getSolanaPublicKey`in this.solanaProviderAdapter))throw Error(`Current provider adapter is not a Solana provider adapter`);return this.solanaProviderAdapter.getSolanaPublicKey()}async transfer(e,t,n,i,a,o){return r.isSolanaLike(m.validateAndGetChainId(e))?H.hinkalSolanaTransfer(this,e,t,n,i,a,o):L.hinkalTransfer(this,e,t,n,i,a,o)}async withdraw(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?V.hinkalSolanaWithdraw(this,e,t,n,a,o,s):D.hinkalWithdraw(this,e,t,n,i,a,o,s)}async withdrawStuckUtxos(e,t){return re.hinkalWithdrawStuckUtxos(this,e,t)}async swap(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?this.swapSolana(e,t,i,a,o):E.hinkalSwap(this,e,t,n,i,a,o,s)}async swapSolana(e,t,n,r,i){let a=JSON.parse(n),o=BigInt(a.swapperAccountSalt),{instructionLists:s,addressLookupTableAccount:c}=a.data;return U.hinkalSolanaSwap(this,e,t,o,s,c,r,i)}async actionReceive(e,t,n,i,a,o){if(!a)throw Error(`subAccount is required`);return r.isSolanaLike(m.validateAndGetChainId(e))?K.hinkalSolanaProxyShield(this,e[0],t[0],a,void 0,o):N.hinkalActionReceive(this,e,t,n,i,a,o)}async actionPrivateWallet(e,t,n,r,i,a,o,s,c,l,u=!1,d,f,p){return this.enforceRateLimit(this.actionPrivateWallet.name,[e,t,n,r,i,a,o,s,c,p]),A.hinkalPrivateWallet(this,e,t,n,r,i,a,o,s,c,l,u,d,f,p)}async proxySwap(e,t,n,i,a,o,s,c,l=!1,u,d){return r.isSolanaLike(m.validateAndGetChainId(e))?G.hinkalSolanaProxySwap(this,e,t,i,o,s,c):F.hinkalProxySwap(this,e,t,n,i,a,o,s,c,l,u,d)}async proxyToPrivate(e,t,n,i,a,o,s){return r.isSolanaLike(m.validateAndGetChainId(e))?(this.enforceRateLimit(this.proxyToPrivate.name,[e[0],t[0],n,i]),K.hinkalSolanaProxyShield(this,e[0],t[0],n,i,s)):R.hinkalProxyToPrivate(this,e,t,i,a,o,n,s)}async proxySend(e,t,n,i,a,o,s){let c=m.validateAndGetChainId(e);if(r.isSolanaLike(c))return W.hinkalSolanaProxySend(this,e[0],t[0],n,i,s);let l=te.createTransaferEmporiumOpsBatch(this,c,e.map(e=>e.erc20TokenAddress),t,i),u=e.map((e,n)=>({token:e,amount:-1n*t[n]}));return await this.actionPrivateWallet(c,[],[],[],l,u,n,a,o,void 0,void 0,void 0,s,void 0)}async multiSendPrivateRecipients(e,t,n){return this.enforceRateLimit(this.multiSendPrivateRecipients.name,[e,t,n]),I.hinkalMultiSendPrivateRecipients(this,e,t,n)}areMerkleTreeUpdatesDisabled(){return this.disableMerkleTreeUpdates}updateMerkleTreeUpdates(e){this.disableMerkleTreeUpdates=e}};exports.Hinkal=ie;
@@ -59,7 +59,7 @@ import { hinkalSolanaClaimUtxo as he } from "./hinkalSolanaClaimUtxo.mjs";
59
59
  import { hinkalWithdrawStuckUtxos as ge } from "./hinkalWithdrawStuckUtxos.mjs";
60
60
  import { ethers as Q } from "ethers";
61
61
  import { PublicKey as $ } from "@solana/web3.js";
62
- //#region libs/shared/common/src/data-structures/Hinkal/Hinkal.ts
62
+ //#region ../shared/common/src/data-structures/Hinkal/Hinkal.ts
63
63
  var _e = class {
64
64
  ethereumProviderAdapter;
65
65
  solanaProviderAdapter;
@@ -84,7 +84,7 @@ var _e = class {
84
84
  constructor(e) {
85
85
  this.userKeys = new h(void 0), r.forEach((e) => {
86
86
  this.merkleTreeHinkalByChain[e] = E.create(m, 0n), this.merkleTreeAccessTokenByChain[e] = E.create(m, 0n), this.nullifiersByChain[e] = /* @__PURE__ */ new Set(), this.encryptedOutputsByChain[e] = [], this.approvalsByChain[e] = /* @__PURE__ */ new Map();
87
- }), this.generateProofRemotely = e?.generateProofRemotely ?? !1, this.utxoUtils = new B(), this.cacheDevice = x(e), this.disableMerkleTreeUpdates = e?.disableMerkleTreeUpdates ?? !1;
87
+ }), this.generateProofRemotely = e?.generateProofRemotely ?? !0, this.utxoUtils = new B(), this.cacheDevice = x(e), this.disableMerkleTreeUpdates = e?.disableMerkleTreeUpdates ?? !1;
88
88
  }
89
89
  enforceRateLimit(e, n, r = 1e3) {
90
90
  let i = Date.now(), a = t(n), o = this.lastCallState.get(e);
@@ -30,7 +30,7 @@ import { updateHinkal as O } from "../../functions/auto-deposit-back-helpers/upd
30
30
  import "../../functions/index.mjs";
31
31
  import { activityStorage as k } from "../IndexedDB/activity-db.mjs";
32
32
  import "../IndexedDB/index.mjs";
33
- //#region libs/shared/common/src/data-structures/Hinkal/handleAutoDepositBack.ts
33
+ //#region ../shared/common/src/data-structures/Hinkal/handleAutoDepositBack.ts
34
34
  var te = 3 * 1e3, ne = 13 * 1e3, A = async (A, j, M, N, P, F, I, L) => {
35
35
  if (!M || I.length === 0) return;
36
36
  let R;
@@ -5,7 +5,7 @@ import { AccountActions as r } from "../AccountActions/AccountActions.mjs";
5
5
  import { getFeeStructure as i } from "../../functions/pre-transaction/getFeeStructure.mjs";
6
6
  import { convertEmporiumOpToCallInfo as a } from "../../functions/utils/convertEmporiumOpToCallInfo.mjs";
7
7
  import { createTransaferEmporiumOpsBatch as o } from "../../functions/private-wallet/emporium.helpers.mjs";
8
- //#region libs/shared/common/src/data-structures/Hinkal/hinkalActionReceive.ts
8
+ //#region ../shared/common/src/data-structures/Hinkal/hinkalActionReceive.ts
9
9
  var s = async (s, c, l, u, d, f, p) => {
10
10
  if (!f) throw Error("hinkalActionReceive: subAccount should be provided");
11
11
  if (!u) throw Error("Fee token is required in hinkalActionReceive");