@kapa123456789/sdk 0.0.25 → 0.0.36

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 (509) hide show
  1. package/common/src/API/accessCodeCalls.cjs +1 -1
  2. package/common/src/API/accessCodeCalls.mjs +0 -1
  3. package/common/src/API/admin-calls.cjs +1 -1
  4. package/common/src/API/admin-calls.mjs +0 -1
  5. package/common/src/API/brotherhoodCalls.cjs +1 -1
  6. package/common/src/API/brotherhoodCalls.mjs +0 -1
  7. package/common/src/API/callLifiAPI.cjs +1 -1
  8. package/common/src/API/callLifiAPI.mjs +0 -1
  9. package/common/src/API/callMonitor.cjs +1 -1
  10. package/common/src/API/callMonitor.mjs +0 -1
  11. package/common/src/API/callOdosAPI.cjs +1 -1
  12. package/common/src/API/callOdosAPI.mjs +0 -1
  13. package/common/src/API/callOkxAPI.cjs +1 -1
  14. package/common/src/API/callOkxAPI.mjs +0 -1
  15. package/common/src/API/callOneInchAPI.cjs +1 -1
  16. package/common/src/API/callOneInchAPI.mjs +0 -1
  17. package/common/src/API/callRelayer.cjs +1 -1
  18. package/common/src/API/callRelayer.mjs +0 -1
  19. package/common/src/API/dashboardAccountCalls.cjs +1 -1
  20. package/common/src/API/dashboardAccountCalls.mjs +0 -1
  21. package/common/src/API/dashboardAccountMemberCalls.cjs +1 -1
  22. package/common/src/API/dashboardAccountMemberCalls.mjs +0 -1
  23. package/common/src/API/dashboardBalanceCalls.cjs +1 -1
  24. package/common/src/API/dashboardBalanceCalls.mjs +0 -1
  25. package/common/src/API/dashboardContactCalls.cjs +1 -1
  26. package/common/src/API/dashboardContactCalls.mjs +0 -1
  27. package/common/src/API/dashboardPayoutCalls.cjs +1 -1
  28. package/common/src/API/dashboardPayoutCalls.mjs +0 -1
  29. package/common/src/API/dashboardTransactionCalls.cjs +1 -1
  30. package/common/src/API/dashboardTransactionCalls.mjs +0 -1
  31. package/common/src/API/enclaveSignatureCalls.cjs +1 -1
  32. package/common/src/API/enclaveSignatureCalls.mjs +0 -1
  33. package/common/src/API/enclaveUtxoCalls.cjs +1 -1
  34. package/common/src/API/enclaveUtxoCalls.mjs +0 -1
  35. package/common/src/API/fetchCommitmentsCache.cjs +1 -1
  36. package/common/src/API/fetchCommitmentsCache.mjs +0 -1
  37. package/common/src/API/generate-trading-points.cjs +1 -1
  38. package/common/src/API/generate-trading-points.mjs +0 -1
  39. package/common/src/API/get-token-data.cjs +1 -1
  40. package/common/src/API/get-token-data.mjs +0 -1
  41. package/common/src/API/getGasEstimates.cjs +1 -1
  42. package/common/src/API/getGasEstimates.mjs +0 -1
  43. package/common/src/API/getTokenPrice.cjs +1 -1
  44. package/common/src/API/getTokenPrice.mjs +0 -1
  45. package/common/src/API/kycCalls.cjs +1 -1
  46. package/common/src/API/kycCalls.mjs +0 -1
  47. package/common/src/API/leaderboardCalls.cjs +1 -1
  48. package/common/src/API/leaderboardCalls.mjs +0 -1
  49. package/common/src/API/onrampCalls.cjs +1 -1
  50. package/common/src/API/onrampCalls.mjs +0 -1
  51. package/common/src/API/privacy-score-calls.cjs +1 -1
  52. package/common/src/API/privacy-score-calls.mjs +0 -1
  53. package/common/src/API/privateSendEmailNotificationsCalls.cjs +1 -1
  54. package/common/src/API/privateSendEmailNotificationsCalls.mjs +0 -1
  55. package/common/src/API/privateSendNonceCalls.cjs +1 -1
  56. package/common/src/API/privateSendNonceCalls.mjs +0 -1
  57. package/common/src/API/privateSendRecipientInfoCalls.cjs +1 -1
  58. package/common/src/API/privateSendRecipientInfoCalls.mjs +0 -1
  59. package/common/src/API/proxyAccountsCalls.cjs +1 -1
  60. package/common/src/API/proxyAccountsCalls.mjs +0 -1
  61. package/common/src/API/referralsCalls.cjs +1 -1
  62. package/common/src/API/referralsCalls.mjs +0 -1
  63. package/common/src/API/relayCalls.cjs +1 -1
  64. package/common/src/API/relayCalls.mjs +0 -1
  65. package/common/src/API/rewardsUserCalls.cjs +1 -1
  66. package/common/src/API/rewardsUserCalls.mjs +0 -1
  67. package/common/src/API/seedless-calls.cjs +1 -1
  68. package/common/src/API/seedless-calls.mjs +0 -1
  69. package/common/src/API/send-telegram-callback.cjs +1 -1
  70. package/common/src/API/send-telegram-callback.mjs +0 -1
  71. package/common/src/API/simulate-batch-tx.cjs +1 -1
  72. package/common/src/API/simulate-batch-tx.mjs +0 -1
  73. package/common/src/API/simulate-transaction.cjs +1 -1
  74. package/common/src/API/simulate-transaction.mjs +0 -1
  75. package/common/src/API/snapshot-event-calls.cjs +1 -1
  76. package/common/src/API/snapshot-event-calls.mjs +0 -1
  77. package/common/src/API/solana-calls.cjs +1 -1
  78. package/common/src/API/solana-calls.mjs +0 -1
  79. package/common/src/API/temporaryWalletCalls.cjs +1 -1
  80. package/common/src/API/temporaryWalletCalls.mjs +0 -1
  81. package/common/src/API/token-calls.cjs +1 -1
  82. package/common/src/API/token-calls.mjs +0 -1
  83. package/common/src/API/tronSubsidyCalls.cjs +1 -1
  84. package/common/src/API/tronSubsidyCalls.mjs +0 -1
  85. package/common/src/API/weeklyAnalyticCalls.cjs +1 -1
  86. package/common/src/API/weeklyAnalyticCalls.mjs +0 -1
  87. package/common/src/constants/addresses.constants.cjs +1 -1
  88. package/common/src/constants/addresses.constants.mjs +0 -1
  89. package/common/src/constants/chains.constants.cjs +1 -1
  90. package/common/src/constants/chains.constants.mjs +30 -30
  91. package/common/src/constants/contracts.constants.cjs +1 -1
  92. package/common/src/constants/contracts.constants.mjs +1 -1
  93. package/common/src/constants/kyc.constants.cjs +1 -1
  94. package/common/src/constants/kyc.constants.mjs +1 -1
  95. package/common/src/constants/lifi.constants.cjs +1 -1
  96. package/common/src/constants/lifi.constants.mjs +1 -1
  97. package/common/src/constants/permit2.constants.cjs +1 -1
  98. package/common/src/constants/permit2.constants.mjs +7 -8
  99. package/common/src/constants/protocol.constants.cjs +1 -1
  100. package/common/src/constants/protocol.constants.mjs +3 -8
  101. package/common/src/constants/server.constants.cjs +1 -1
  102. package/common/src/constants/server.constants.mjs +1 -2
  103. package/common/src/constants/vite.constants.cjs +1 -1
  104. package/common/src/constants/vite.constants.mjs +2 -2
  105. package/common/src/crypto/babyJub.cjs +1 -1
  106. package/common/src/crypto/babyJub.mjs +6 -5
  107. package/common/src/crypto/poseidon.cjs +1 -1
  108. package/common/src/crypto/poseidon.mjs +11 -10
  109. package/common/src/data-structures/Hinkal/Hinkal.cjs +1 -1
  110. package/common/src/data-structures/Hinkal/Hinkal.d.ts +0 -4
  111. package/common/src/data-structures/Hinkal/Hinkal.mjs +2 -13
  112. package/common/src/data-structures/Hinkal/IHinkal.d.ts +0 -3
  113. package/common/src/data-structures/Hinkal/handleAutoDepositBack.cjs +1 -1
  114. package/common/src/data-structures/Hinkal/handleAutoDepositBack.mjs +0 -4
  115. package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -1
  116. package/common/src/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +0 -1
  117. package/common/src/data-structures/Hinkal/hinkalClaimUtxo.cjs +1 -1
  118. package/common/src/data-structures/Hinkal/hinkalClaimUtxo.mjs +0 -1
  119. package/common/src/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  120. package/common/src/data-structures/Hinkal/hinkalDeposit.mjs +0 -1
  121. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.cjs +1 -1
  122. package/common/src/data-structures/Hinkal/hinkalDepositAndBridge.mjs +0 -4
  123. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.cjs +1 -1
  124. package/common/src/data-structures/Hinkal/hinkalDepositAndWithdraw.mjs +0 -3
  125. package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.cjs +1 -1
  126. package/common/src/data-structures/Hinkal/hinkalDepositOnChainUtxos.mjs +0 -1
  127. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  128. package/common/src/data-structures/Hinkal/hinkalPrivateWallet.mjs +0 -2
  129. package/common/src/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -1
  130. package/common/src/data-structures/Hinkal/hinkalSignSubAccount.mjs +0 -1
  131. package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.cjs +1 -1
  132. package/common/src/data-structures/Hinkal/hinkalSolanaClaimUtxo.mjs +0 -2
  133. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.cjs +1 -1
  134. package/common/src/data-structures/Hinkal/hinkalSolanaDeposit.mjs +0 -1
  135. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.cjs +1 -1
  136. package/common/src/data-structures/Hinkal/hinkalSolanaDepositAndWithdraw.mjs +0 -4
  137. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.cjs +1 -1
  138. package/common/src/data-structures/Hinkal/hinkalSolanaProxySwap.mjs +0 -3
  139. package/common/src/data-structures/Hinkal/hinkalSolanaSwap.cjs +1 -1
  140. package/common/src/data-structures/Hinkal/hinkalSolanaSwap.mjs +0 -1
  141. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.cjs +1 -1
  142. package/common/src/data-structures/Hinkal/hinkalSolanaTransfer.mjs +0 -2
  143. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.cjs +1 -1
  144. package/common/src/data-structures/Hinkal/hinkalSolanaWithdraw.mjs +0 -3
  145. package/common/src/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  146. package/common/src/data-structures/Hinkal/hinkalSwap.mjs +0 -1
  147. package/common/src/data-structures/Hinkal/hinkalTransfer.cjs +1 -1
  148. package/common/src/data-structures/Hinkal/hinkalTransfer.mjs +0 -2
  149. package/common/src/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  150. package/common/src/data-structures/Hinkal/hinkalWithdraw.mjs +0 -2
  151. package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.cjs +1 -1
  152. package/common/src/data-structures/Hinkal/hinkalWithdrawStuckUtxos.mjs +0 -2
  153. package/common/src/data-structures/Hinkal/index.d.ts +0 -1
  154. package/common/src/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  155. package/common/src/data-structures/Hinkal/resetMerkleTrees.mjs +0 -3
  156. package/common/src/data-structures/IndexedDB/activity-db.cjs +1 -1
  157. package/common/src/data-structures/IndexedDB/activity-db.mjs +3 -7
  158. package/common/src/data-structures/IndexedDB/index.d.ts +0 -1
  159. package/common/src/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -1
  160. package/common/src/data-structures/TokenDBs/PrivateTokensDB.mjs +3 -4
  161. package/common/src/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
  162. package/common/src/data-structures/crypto-keys/decodeUTXO.mjs +1 -2
  163. package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.cjs +1 -1
  164. package/common/src/data-structures/crypto-keys/encryptDecryptUtxo.mjs +0 -2
  165. package/common/src/data-structures/crypto-keys/keyUtils.cjs +1 -1
  166. package/common/src/data-structures/crypto-keys/keyUtils.mjs +1 -1
  167. package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.cjs +1 -1
  168. package/common/src/data-structures/event-service/evm/AbstractAccessTokenSnapshotService.mjs +0 -2
  169. package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.cjs +1 -1
  170. package/common/src/data-structures/event-service/evm/AbstractCommitmentsSnapshotService.mjs +0 -2
  171. package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.cjs +1 -1
  172. package/common/src/data-structures/event-service/solana/AbstractSolanaAccessTokenSnapshotService.mjs +0 -2
  173. package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.cjs +1 -1
  174. package/common/src/data-structures/event-service/solana/AbstractSolanaCommitmentsSnapshotService.mjs +0 -2
  175. package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.cjs +1 -1
  176. package/common/src/data-structures/snapshot/evm-snapshots/ClientAccessTokenSnapshotService.mjs +0 -1
  177. package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.cjs +1 -1
  178. package/common/src/data-structures/snapshot/evm-snapshots/ClientCommitmentsSnapshotService.mjs +0 -1
  179. package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.cjs +1 -1
  180. package/common/src/data-structures/snapshot/evm-snapshots/ClientNullifierSnapshotService.mjs +0 -1
  181. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs +1 -1
  182. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs +0 -1
  183. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs +1 -1
  184. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs +0 -1
  185. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.cjs +1 -1
  186. package/common/src/data-structures/snapshot/solana-snapshots/ClientSolanaNullifierSnapshotService.mjs +0 -1
  187. package/common/src/error-handling/customErrors/customErrors.helpers.cjs +1 -1
  188. package/common/src/error-handling/customErrors/customErrors.helpers.mjs +0 -2
  189. package/common/src/error-handling/get-error.message.cjs +1 -1
  190. package/common/src/error-handling/get-error.message.mjs +1 -3
  191. package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.cjs +1 -1
  192. package/common/src/functions/auto-deposit-back-helpers/get-gas-token-records.mjs +0 -2
  193. package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs +1 -1
  194. package/common/src/functions/auto-deposit-back-helpers/get-tokens-to-deposit-back.mjs +0 -1
  195. package/common/src/functions/auto-deposit-back-helpers/select-gas-token.cjs +1 -1
  196. package/common/src/functions/auto-deposit-back-helpers/select-gas-token.mjs +0 -4
  197. package/common/src/functions/kyc/checkTokenLimitsUSD.cjs +1 -1
  198. package/common/src/functions/kyc/checkTokenLimitsUSD.mjs +0 -5
  199. package/common/src/functions/pre-transaction/getVolatileTransferAmount.cjs +1 -1
  200. package/common/src/functions/pre-transaction/getVolatileTransferAmount.mjs +0 -1
  201. package/common/src/functions/pre-transaction/sendV0Transaction.cjs +1 -1
  202. package/common/src/functions/pre-transaction/sendV0Transaction.mjs +1 -1
  203. package/common/src/functions/pre-transaction/solana.cjs +1 -1
  204. package/common/src/functions/pre-transaction/solana.mjs +1 -1
  205. package/common/src/functions/private-wallet/emporium.helpers.cjs +1 -1
  206. package/common/src/functions/private-wallet/emporium.helpers.mjs +1 -2
  207. package/common/src/functions/private-wallet/emporium.swap.helpers.cjs +1 -1
  208. package/common/src/functions/private-wallet/emporium.swap.helpers.mjs +1 -2
  209. package/common/src/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  210. package/common/src/functions/snarkjs/constructEmporiumProof.mjs +0 -1
  211. package/common/src/functions/snarkjs/constructSolanaZkProof.cjs +1 -1
  212. package/common/src/functions/snarkjs/constructSolanaZkProof.mjs +0 -1
  213. package/common/src/functions/snarkjs/generateZkProofEnclave.cjs +1 -1
  214. package/common/src/functions/snarkjs/generateZkProofEnclave.mjs +0 -1
  215. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.cjs +1 -1
  216. package/common/src/functions/snarkjs/getMerkleTreeSiblingsAndRootHashes.mjs +0 -1
  217. package/common/src/functions/utils/addresses.cjs +1 -1
  218. package/common/src/functions/utils/addresses.mjs +0 -1
  219. package/common/src/functions/utils/cacheDevice.utils.cjs +1 -1
  220. package/common/src/functions/utils/cacheDevice.utils.mjs +0 -2
  221. package/common/src/functions/utils/cacheFunctions.cjs +1 -1
  222. package/common/src/functions/utils/cacheFunctions.mjs +1 -1
  223. package/common/src/functions/utils/encryptInputForEnclave.cjs +1 -1
  224. package/common/src/functions/utils/encryptInputForEnclave.mjs +0 -1
  225. package/common/src/functions/utils/erc20tokenFunctions.cjs +1 -1
  226. package/common/src/functions/utils/erc20tokenFunctions.mjs +2 -14
  227. package/common/src/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -1
  228. package/common/src/functions/utils/getRecipientInfoFromUserKeys.mjs +0 -1
  229. package/common/src/functions/utils/getUtxosFromReceipt.utils.cjs +1 -1
  230. package/common/src/functions/utils/getUtxosFromReceipt.utils.mjs +0 -3
  231. package/common/src/functions/utils/getUtxosFromReceiptSolana.cjs +1 -1
  232. package/common/src/functions/utils/getUtxosFromReceiptSolana.mjs +0 -1
  233. package/common/src/functions/utils/process.utils.cjs +1 -1
  234. package/common/src/functions/utils/process.utils.mjs +1 -1
  235. package/common/src/functions/utils/publicBalance.utils.cjs +1 -1
  236. package/common/src/functions/utils/publicBalance.utils.mjs +6 -20
  237. package/common/src/functions/utils/solanaMint.utils.cjs +1 -1
  238. package/common/src/functions/utils/solanaMint.utils.mjs +1 -1
  239. package/common/src/functions/utils/string.utils.cjs +1 -1
  240. package/common/src/functions/utils/string.utils.mjs +7 -10
  241. package/common/src/functions/utils/token-check.utils.cjs +1 -1
  242. package/common/src/functions/utils/token-check.utils.mjs +0 -2
  243. package/common/src/functions/utils/tron.utils.cjs +1 -1
  244. package/common/src/functions/utils/tron.utils.mjs +1 -1
  245. package/common/src/functions/utils/tx-confirmation.utils.cjs +1 -1
  246. package/common/src/functions/utils/tx-confirmation.utils.mjs +1 -2
  247. package/common/src/functions/web3/events/balanceChangedHandler.cjs +1 -1
  248. package/common/src/functions/web3/events/balanceChangedHandler.d.ts +1 -1
  249. package/common/src/functions/web3/events/balanceChangedHandler.mjs +0 -1
  250. package/common/src/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  251. package/common/src/functions/web3/events/getInputUtxoAndBalance.mjs +1 -1
  252. package/common/src/functions/web3/events/getShieldedBalance.cjs +1 -1
  253. package/common/src/functions/web3/events/getShieldedBalance.mjs +0 -1
  254. package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.cjs +1 -1
  255. package/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.mjs +0 -1
  256. package/common/src/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
  257. package/common/src/functions/web3/functionCalls/accessTokenCalls.mjs +0 -1
  258. package/common/src/functions/web3/functionCalls/recoverTransactionFromError.cjs +1 -1
  259. package/common/src/functions/web3/functionCalls/recoverTransactionFromError.mjs +0 -1
  260. package/common/src/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  261. package/common/src/functions/web3/functionCalls/transactCallRelayer.mjs +0 -2
  262. package/common/src/functions/web3/getSolanaPriorityFee.cjs +1 -1
  263. package/common/src/functions/web3/getSolanaPriorityFee.mjs +0 -1
  264. package/common/src/functions/web3/odosAPI.cjs +1 -1
  265. package/common/src/functions/web3/odosAPI.mjs +0 -2
  266. package/common/src/functions/web3/okxAPI.cjs +1 -1
  267. package/common/src/functions/web3/okxAPI.mjs +1 -1
  268. package/common/src/functions/web3/oneInchAPI.cjs +1 -1
  269. package/common/src/functions/web3/oneInchAPI.mjs +0 -3
  270. package/common/src/functions/web3/uniswapAPI.cjs +1 -1
  271. package/common/src/functions/web3/uniswapAPI.mjs +1 -4
  272. package/common/src/providers/TronProviderAdapter.cjs +1 -1
  273. package/common/src/providers/TronProviderAdapter.mjs +0 -1
  274. package/common/src/types/balances.types.d.ts +0 -22
  275. package/common/src/types/hinkal.types.cjs +1 -1
  276. package/common/src/types/hinkal.types.mjs +1 -1
  277. package/common/src/types/kyc.types.cjs +1 -1
  278. package/common/src/types/kyc.types.mjs +1 -1
  279. package/common/src/types/new-rewards.type.cjs +1 -1
  280. package/common/src/types/new-rewards.type.mjs +1 -5
  281. package/common/src/webworker/logError-FeCdVeea.js +1 -0
  282. package/common/src/webworker/package.json +1 -1
  283. package/common/src/webworker/snarkjsWorker/snarkjsWorkerNode.d.ts +1 -0
  284. package/common/src/webworker/snarkjsWorkerNode.cjs +122 -11
  285. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.cjs +1 -1
  286. package/common/src/webworker/utxoWorker/utxoWorkerLauncher.ts?worker&url.mjs +1 -1
  287. package/common/src/webworker/utxoWorker/utxoWorkerNode.d.ts +1 -0
  288. package/common/src/webworker/utxoWorkerNode.cjs +1 -1
  289. package/common/src/webworker/workerProxy-5NFtWSKK.js +1 -0
  290. package/common/src/webworker/workerThreadsPatch.d.ts +2 -1
  291. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.cjs +1 -1
  292. package/common/src/webworker/zkProofWorker/zkProofWorkerLauncher.ts?worker&url.mjs +1 -1
  293. package/common/src/webworker/zkProofWorker/zkProofWorkerNode.d.ts +1 -0
  294. package/common/src/webworker/zkProofWorkerNode.cjs +1 -1
  295. package/functions/index.mjs +0 -1
  296. package/functions/utils/index.mjs +0 -1
  297. package/index.cjs +1 -1
  298. package/index.mjs +0 -1
  299. package/package.json +1 -1
  300. package/services/Hinkal.cjs +1 -1
  301. package/services/Hinkal.d.ts +3 -3
  302. package/services/Hinkal.mjs +7 -10
  303. package/types/IHinkal.d.ts +3 -4
  304. package/types/balances.types.d.ts +1 -1
  305. package/common/src/API/checkRisk.cjs +0 -1
  306. package/common/src/API/checkRisk.mjs +0 -3
  307. package/common/src/API/enclaveRecipientInfoCalls.cjs +0 -1
  308. package/common/src/API/enclaveRecipientInfoCalls.mjs +0 -2
  309. package/common/src/API/getCoingeckoPrice.cjs +0 -1
  310. package/common/src/API/getCoingeckoPrice.mjs +0 -2
  311. package/common/src/API/getWebsiteURL.cjs +0 -1
  312. package/common/src/API/getWebsiteURL.mjs +0 -1
  313. package/common/src/API/index.cjs +0 -1
  314. package/common/src/API/index.mjs +0 -24
  315. package/common/src/API/resolve-sns.cjs +0 -1
  316. package/common/src/API/resolve-sns.mjs +0 -1
  317. package/common/src/API/tenderly.api.cjs +0 -1
  318. package/common/src/API/tenderly.api.mjs +0 -4
  319. package/common/src/constants/activity.constants.cjs +0 -1
  320. package/common/src/constants/activity.constants.mjs +0 -4
  321. package/common/src/constants/assets.constants.cjs +0 -1
  322. package/common/src/constants/assets.constants.mjs +0 -4
  323. package/common/src/constants/coingecko.constants.cjs +0 -1
  324. package/common/src/constants/coingecko.constants.mjs +0 -6
  325. package/common/src/constants/events.constants.cjs +0 -1
  326. package/common/src/constants/events.constants.mjs +0 -12
  327. package/common/src/constants/index.cjs +0 -1
  328. package/common/src/constants/index.mjs +0 -34
  329. package/common/src/constants/presale.constants.cjs +0 -1
  330. package/common/src/constants/presale.constants.mjs +0 -3
  331. package/common/src/constants/schedule.constants.cjs +0 -1
  332. package/common/src/constants/schedule.constants.mjs +0 -3
  333. package/common/src/constants/tasks.constants.cjs +0 -1
  334. package/common/src/constants/tasks.constants.mjs +0 -124
  335. package/common/src/constants/token-data/arbMainnetRegistryFixed.json.cjs +0 -1
  336. package/common/src/constants/token-data/arbMainnetRegistryFixed.json.mjs +0 -1841
  337. package/common/src/constants/token-data/baseRegistryFixed.json.cjs +0 -1
  338. package/common/src/constants/token-data/baseRegistryFixed.json.mjs +0 -1142
  339. package/common/src/constants/token-data/ethMainnetRegistryFixed.json.cjs +0 -1
  340. package/common/src/constants/token-data/ethMainnetRegistryFixed.json.mjs +0 -4274
  341. package/common/src/constants/token-data/index.cjs +0 -1
  342. package/common/src/constants/token-data/index.mjs +0 -17
  343. package/common/src/constants/token-data/optimismRegistryFixed.json.cjs +0 -1
  344. package/common/src/constants/token-data/optimismRegistryFixed.json.mjs +0 -709
  345. package/common/src/constants/token-data/polygonRegistryFixed.json.cjs +0 -1
  346. package/common/src/constants/token-data/polygonRegistryFixed.json.mjs +0 -2317
  347. package/common/src/constants/token.limits.constants.cjs +0 -1
  348. package/common/src/constants/token.limits.constants.mjs +0 -5
  349. package/common/src/constants/tokens.constants.cjs +0 -1
  350. package/common/src/constants/tokens.constants.mjs +0 -3
  351. package/common/src/crypto/index.cjs +0 -1
  352. package/common/src/crypto/index.mjs +0 -3
  353. package/common/src/data-structures/AccountActions/index.cjs +0 -1
  354. package/common/src/data-structures/AccountActions/index.mjs +0 -1
  355. package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.cjs +0 -1
  356. package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.d.ts +0 -19
  357. package/common/src/data-structures/Hinkal/HinkalPrivateBalanceController.mjs +0 -239
  358. package/common/src/data-structures/IndexedDB/balances-db.cjs +0 -1
  359. package/common/src/data-structures/IndexedDB/balances-db.mjs +0 -47
  360. package/common/src/data-structures/IndexedDB/contact-db.cjs +0 -1
  361. package/common/src/data-structures/IndexedDB/contact-db.mjs +0 -45
  362. package/common/src/data-structures/IndexedDB/index.cjs +0 -1
  363. package/common/src/data-structures/IndexedDB/index.mjs +0 -8
  364. package/common/src/data-structures/IndexedDB/key-val-store.cjs +0 -1
  365. package/common/src/data-structures/IndexedDB/key-val-store.d.ts +0 -6
  366. package/common/src/data-structures/IndexedDB/key-val-store.mjs +0 -41
  367. package/common/src/data-structures/IndexedDB/pay-activity-db.cjs +0 -1
  368. package/common/src/data-structures/IndexedDB/pay-activity-db.mjs +0 -21
  369. package/common/src/data-structures/IndexedDB/prices-db.cjs +0 -1
  370. package/common/src/data-structures/IndexedDB/prices-db.mjs +0 -54
  371. package/common/src/data-structures/IndexedDB/private-balances-db.cjs +0 -1
  372. package/common/src/data-structures/IndexedDB/private-balances-db.mjs +0 -21
  373. package/common/src/data-structures/IndexedDB/signatures-db.cjs +0 -1
  374. package/common/src/data-structures/IndexedDB/signatures-db.mjs +0 -40
  375. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.cjs +0 -1
  376. package/common/src/data-structures/TokenDBs/AlchemyPublicTokensDB.mjs +0 -168
  377. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.cjs +0 -1
  378. package/common/src/data-structures/TokenDBs/ArcPublicTokensDB.mjs +0 -94
  379. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.cjs +0 -1
  380. package/common/src/data-structures/TokenDBs/EventsPublicTokensDB.mjs +0 -144
  381. package/common/src/data-structures/TokenDBs/PublicTokensDB.cjs +0 -1
  382. package/common/src/data-structures/TokenDBs/PublicTokensDB.mjs +0 -29
  383. package/common/src/data-structures/TokenDBs/index.cjs +0 -1
  384. package/common/src/data-structures/TokenDBs/index.mjs +0 -4
  385. package/common/src/data-structures/cacheDevices/index.cjs +0 -1
  386. package/common/src/data-structures/cacheDevices/index.mjs +0 -2
  387. package/common/src/data-structures/crypto-keys/index.cjs +0 -1
  388. package/common/src/data-structures/crypto-keys/index.mjs +0 -4
  389. package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.cjs +0 -1
  390. package/common/src/data-structures/event-service/evm/PollingBlockchainEventEmitter.mjs +0 -1
  391. package/common/src/data-structures/event-service/index.cjs +0 -1
  392. package/common/src/data-structures/event-service/index.mjs +0 -16
  393. package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.cjs +0 -1
  394. package/common/src/data-structures/event-service/solana/PollingSolanaBlockchainEventEmitter.mjs +0 -1
  395. package/common/src/data-structures/http/index.cjs +0 -1
  396. package/common/src/data-structures/http/index.mjs +0 -2
  397. package/common/src/data-structures/merkle-tree/index.cjs +0 -1
  398. package/common/src/data-structures/merkle-tree/index.mjs +0 -3
  399. package/common/src/data-structures/snapshot/index.cjs +0 -1
  400. package/common/src/data-structures/snapshot/index.mjs +0 -7
  401. package/common/src/error-handling/customErrors/index.cjs +0 -1
  402. package/common/src/error-handling/customErrors/index.mjs +0 -4
  403. package/common/src/error-handling/index.cjs +0 -1
  404. package/common/src/error-handling/index.mjs +0 -10
  405. package/common/src/functions/auto-deposit-back-helpers/index.cjs +0 -1
  406. package/common/src/functions/auto-deposit-back-helpers/index.mjs +0 -4
  407. package/common/src/functions/index.cjs +0 -1
  408. package/common/src/functions/index.mjs +0 -82
  409. package/common/src/functions/kyc/index.cjs +0 -1
  410. package/common/src/functions/kyc/index.mjs +0 -4
  411. package/common/src/functions/kyc/passportHelper.cjs +0 -1
  412. package/common/src/functions/kyc/passportHelper.mjs +0 -1
  413. package/common/src/functions/pre-transaction/addressTableLookup.cjs +0 -1
  414. package/common/src/functions/pre-transaction/addressTableLookup.mjs +0 -2
  415. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.cjs +0 -1
  416. package/common/src/functions/pre-transaction/calculateSolanaNullifierCount.mjs +0 -5
  417. package/common/src/functions/pre-transaction/getFlatFees.cjs +0 -1
  418. package/common/src/functions/pre-transaction/getFlatFees.mjs +0 -4
  419. package/common/src/functions/pre-transaction/index.cjs +0 -1
  420. package/common/src/functions/pre-transaction/index.mjs +0 -21
  421. package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.cjs +0 -1
  422. package/common/src/functions/pre-transaction/initTokenLimitIfNeeded.mjs +0 -3
  423. package/common/src/functions/pre-transaction/interaction-to-action.cjs +0 -1
  424. package/common/src/functions/pre-transaction/interaction-to-action.mjs +0 -1
  425. package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.cjs +0 -1
  426. package/common/src/functions/pre-transaction/sendInitNullifiersTransaction.mjs +0 -3
  427. package/common/src/functions/pre-transaction/store-instructions.cjs +0 -1
  428. package/common/src/functions/pre-transaction/store-instructions.mjs +0 -2
  429. package/common/src/functions/pre-transaction/store-proof.cjs +0 -1
  430. package/common/src/functions/pre-transaction/store-proof.mjs +0 -3
  431. package/common/src/functions/private-wallet/index.cjs +0 -1
  432. package/common/src/functions/private-wallet/index.mjs +0 -3
  433. package/common/src/functions/private-wallet/opProducer.cjs +0 -1
  434. package/common/src/functions/private-wallet/opProducer.mjs +0 -3
  435. package/common/src/functions/snarkjs/index.cjs +0 -1
  436. package/common/src/functions/snarkjs/index.mjs +0 -7
  437. package/common/src/functions/snarkjs/verifyCommitmentValidationData.cjs +0 -1
  438. package/common/src/functions/snarkjs/verifyCommitmentValidationData.mjs +0 -6
  439. package/common/src/functions/utils/buildClaimableDepositPlan.cjs +0 -1
  440. package/common/src/functions/utils/buildClaimableDepositPlan.mjs +0 -3
  441. package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.cjs +0 -1
  442. package/common/src/functions/utils/convertIntegrationProviderToExternalActionId.mjs +0 -4
  443. package/common/src/functions/utils/deposit-claimable.utils.cjs +0 -1
  444. package/common/src/functions/utils/deposit-claimable.utils.mjs +0 -12
  445. package/common/src/functions/utils/dispatchBalanceRefreshes.cjs +0 -1
  446. package/common/src/functions/utils/dispatchBalanceRefreshes.mjs +0 -4
  447. package/common/src/functions/utils/enclave-recipient-info-storage.cjs +0 -1
  448. package/common/src/functions/utils/enclave-recipient-info-storage.mjs +0 -2
  449. package/common/src/functions/utils/enclave-signature-storage.cjs +0 -1
  450. package/common/src/functions/utils/enclave-signature-storage.mjs +0 -2
  451. package/common/src/functions/utils/enclave-utxo-storage.cjs +0 -1
  452. package/common/src/functions/utils/enclave-utxo-storage.mjs +0 -4
  453. package/common/src/functions/utils/evmNetworkFunctions.cjs +0 -1
  454. package/common/src/functions/utils/evmNetworkFunctions.mjs +0 -1
  455. package/common/src/functions/utils/formatter.cjs +0 -1
  456. package/common/src/functions/utils/formatter.mjs +0 -1
  457. package/common/src/functions/utils/getBlockExplorerUrl.cjs +0 -1
  458. package/common/src/functions/utils/getBlockExplorerUrl.mjs +0 -1
  459. package/common/src/functions/utils/inLogicMetadata.cjs +0 -1
  460. package/common/src/functions/utils/inLogicMetadata.mjs +0 -1
  461. package/common/src/functions/utils/index.cjs +0 -1
  462. package/common/src/functions/utils/index.mjs +0 -68
  463. package/common/src/functions/utils/ipfs.cjs +0 -1
  464. package/common/src/functions/utils/ipfs.mjs +0 -1
  465. package/common/src/functions/utils/lifi.utils.cjs +0 -1
  466. package/common/src/functions/utils/lifi.utils.mjs +0 -4
  467. package/common/src/functions/utils/networks.utils.cjs +0 -1
  468. package/common/src/functions/utils/networks.utils.mjs +0 -1
  469. package/common/src/functions/utils/nftTokenFunctions.cjs +0 -1
  470. package/common/src/functions/utils/nftTokenFunctions.mjs +0 -2
  471. package/common/src/functions/utils/prepareHinkal.cjs +0 -1
  472. package/common/src/functions/utils/prepareHinkal.mjs +0 -7
  473. package/common/src/functions/utils/rpc-int-encode.cjs +0 -1
  474. package/common/src/functions/utils/rpc-int-encode.mjs +0 -1
  475. package/common/src/functions/utils/transfer-claimable.utils.cjs +0 -1
  476. package/common/src/functions/utils/transfer-claimable.utils.mjs +0 -12
  477. package/common/src/functions/utils/userAgent.cjs +0 -1
  478. package/common/src/functions/utils/userAgent.mjs +0 -3
  479. package/common/src/functions/utils/walletBalances.utils.cjs +0 -1
  480. package/common/src/functions/utils/walletBalances.utils.mjs +0 -1
  481. package/common/src/functions/web3/EIP-712.cjs +0 -1
  482. package/common/src/functions/web3/EIP-712.mjs +0 -1
  483. package/common/src/functions/web3/connectors.utils.cjs +0 -1
  484. package/common/src/functions/web3/connectors.utils.mjs +0 -1
  485. package/common/src/functions/web3/events/getTransactionLogEvents.cjs +0 -1
  486. package/common/src/functions/web3/events/getTransactionLogEvents.mjs +0 -2
  487. package/common/src/functions/web3/events/index.cjs +0 -1
  488. package/common/src/functions/web3/events/index.mjs +0 -4
  489. package/common/src/functions/web3/getTokenHolder.cjs +0 -1
  490. package/common/src/functions/web3/getTokenHolder.mjs +0 -7
  491. package/common/src/functions/web3/index.cjs +0 -1
  492. package/common/src/functions/web3/index.mjs +0 -16
  493. package/common/src/functions/web3/runContractFunction.cjs +0 -1
  494. package/common/src/functions/web3/runContractFunction.mjs +0 -1
  495. package/common/src/mutexes/mutex.cjs +0 -1
  496. package/common/src/mutexes/mutex.mjs +0 -3
  497. package/common/src/types/index.cjs +0 -1
  498. package/common/src/types/index.mjs +0 -19
  499. package/common/src/types/schedule.types.cjs +0 -1
  500. package/common/src/types/schedule.types.mjs +0 -6
  501. package/common/src/webworker/workerProxy-DPSmXOIl.js +0 -122
  502. package/functions/integrations/index.mjs +0 -5
  503. package/functions/utils/getFeeStructure.mjs +0 -1
  504. package/types/balances.types.cjs +0 -1
  505. package/types/balances.types.mjs +0 -2
  506. package/types/external-action.types.cjs +0 -1
  507. package/types/external-action.types.mjs +0 -2
  508. package/types/index.cjs +0 -1
  509. package/types/index.mjs +0 -4
@@ -1 +1 @@
1
- const e=require(`./serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`);require(`idb-keyval`);var n={encryptedOutputs:[],lastOutput:``},r=(e,t)=>({shortPublicKey:e.substring(0,25),shortHinkalAddress:t.substring(0,25)}),i=(e,t,n)=>`hinkalCache-${e}-${t}-${n}`,a=(a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`GetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);return JSON.parse(a.cacheDevice.get(i(o,l,u))??e.safeJsonStringify(n))},o=(n,a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`SetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);a.cacheDevice.set(i(o,l,u),e.safeJsonStringify(n))},s=(e,t,r)=>{o(n,e,t,r)};exports.getFilePath=i,exports.getHinkalCache=a,exports.resetCache=s,exports.setHinkalCache=o;
1
+ const e=require(`./serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`);require(`idb-keyval`);var n={encryptedOutputs:[],lastOutput:``},r=(e,t)=>({shortPublicKey:e.substring(0,25),shortHinkalAddress:t.substring(0,25)}),i=(e,t,n)=>`hinkalCache-${e}-${t}-${n}`,a=(a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`GetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);return JSON.parse(a.cacheDevice.get(i(o,l,u))??e.safeJsonStringify(n))},o=(n,a,o,s)=>{let{hinkalAddress:c}=t.networkRegistry[o].contractData;if(!o||!s||!c)throw Error(`SetHinkalCache: incorrect arguments`);let{shortPublicKey:l,shortHinkalAddress:u}=r(s,c);a.cacheDevice.set(i(o,l,u),e.safeJsonStringify(n))},s=(e,t,r)=>{o(n,e,t,r)};exports.getHinkalCache=a,exports.resetCache=s,exports.setHinkalCache=o;
@@ -22,4 +22,4 @@ var n = {
22
22
  o(n, e, t, r);
23
23
  };
24
24
  //#endregion
25
- export { i as getFilePath, a as getHinkalCache, s as resetCache, o as setHinkalCache };
25
+ export { a as getHinkalCache, s as resetCache, o as setHinkalCache };
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);require(`../../data-structures/http/index.cjs`);let i=require(`ethers`),a=require(`libsodium-wrappers`);a=e.__toESM(a);let o=require(`node-forge`);o=e.__toESM(o);var s=async()=>(await r.httpClient.get(`${n.ENCLAVE_URL}/handshake`)).public_key,c=e=>typeof e==`bigint`||typeof e==`number`?e.toString():e,l=e=>o.util.hexToBytes(e.replace(`0x`,``)),u=e=>{let t=structuredClone(e);return Object.entries(t).forEach(([e,n])=>{t[e]=c(n),Array.isArray(n)&&(Array.isArray(n[0])?t[e]=n.map(e=>e.map(c)):t[e]=n.map(c))}),t},d=(e,t)=>{let n=o.util.decode64(e),r=o.asn1.fromDer(o.util.createBuffer(n)),i=o.pki.publicKeyFromAsn1(r),a=o.util.binary.raw.encode(t),s=i.encrypt(a,`RSA-OAEP`,{md:o.md.sha1.create(),mgf1:{md:o.md.sha1.create()}});return o.util.encode64(s)},f=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_NONCEBYTES),r=a.default.crypto_secretbox_easy(t,n,e),s=l(i.ethers.hexlify(n)+i.ethers.hexlify(r).slice(2));return o.util.encode64(s)},p=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(t,n),inputCiphertext:f(n,e)}},m=(e,n)=>{let r=typeof e==`string`?e:t.safeJsonStringify(u(e));return p(new TextEncoder().encode(r),n)},h=async e=>m(e,await s()),g=async e=>p(e,await s());exports.makeEnclaveHandshakeAndEncryptInput=h,exports.makeEnclaveHandshakeAndEncryptUint8Array=g;
1
+ const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`./serialize.utils.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`libsodium-wrappers`);a=e.__toESM(a);let o=require(`node-forge`);o=e.__toESM(o);var s=async()=>(await r.httpClient.get(`${n.ENCLAVE_URL}/handshake`)).public_key,c=e=>typeof e==`bigint`||typeof e==`number`?e.toString():e,l=e=>o.util.hexToBytes(e.replace(`0x`,``)),u=e=>{let t=structuredClone(e);return Object.entries(t).forEach(([e,n])=>{t[e]=c(n),Array.isArray(n)&&(Array.isArray(n[0])?t[e]=n.map(e=>e.map(c)):t[e]=n.map(c))}),t},d=(e,t)=>{let n=o.util.decode64(e),r=o.asn1.fromDer(o.util.createBuffer(n)),i=o.pki.publicKeyFromAsn1(r),a=o.util.binary.raw.encode(t),s=i.encrypt(a,`RSA-OAEP`,{md:o.md.sha1.create(),mgf1:{md:o.md.sha1.create()}});return o.util.encode64(s)},f=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_NONCEBYTES),r=a.default.crypto_secretbox_easy(t,n,e),s=l(i.ethers.hexlify(n)+i.ethers.hexlify(r).slice(2));return o.util.encode64(s)},p=(e,t)=>{let n=a.default.randombytes_buf(a.default.crypto_secretbox_KEYBYTES);return{keyCiphertext:d(t,n),inputCiphertext:f(n,e)}},m=(e,n)=>{let r=typeof e==`string`?e:t.safeJsonStringify(u(e));return p(new TextEncoder().encode(r),n)},h=async e=>m(e,await s()),g=async e=>p(e,await s());exports.makeEnclaveHandshakeAndEncryptInput=h,exports.makeEnclaveHandshakeAndEncryptUint8Array=g;
@@ -1,7 +1,6 @@
1
1
  import { safeJsonStringify as e } from "./serialize.utils.mjs";
2
2
  import { ENCLAVE_URL as t } from "../snarkjs/constant.mjs";
3
3
  import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
4
- import "../../data-structures/http/index.mjs";
5
4
  import { ethers as r } from "ethers";
6
5
  import i from "libsodium-wrappers";
7
6
  import * as a from "node-forge";
@@ -1 +1 @@
1
- require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../constants/token-data/ERC20Registry.cjs`);require(`../../constants/token-data/index.cjs`);const n=require(`../../data-structures/custom-token-registry/CustomTokenRegistry.cjs`);require(`../web3/etherFunctions.cjs`),require(`../../constants/tokens.constants.cjs`);var r=e=>{let r=t.getERC20Registry(e),i=n.customTokenRegistry.getCustomTokens(e);return[...r,...i]},i=(e,t,n)=>(n??r(t))?.find(t=>e===void 0?!1:t.erc20TokenAddress.toLowerCase()===e.toLowerCase()),a=(e,t)=>{let n=i(e.erc20TokenAddress,t);return n?{...e,name:n.name,symbol:n.symbol,logoURI:n.logoURI,decimals:n.decimals}:e},o=(e,t)=>r(t)?.find(t=>e===void 0?!1:t.symbol.toLowerCase()===e.toLowerCase()),s=t=>t.nftTokenType===e.TokenType.ERC721||t.nftTokenType===e.TokenType.ERC1155||t.nftTokenType===e.TokenType.MetaplexNFT||t.nftTokenType===e.TokenType.Token2022NFT||t.nftTokenType===e.TokenType.CompressedNFT;exports.getERC20Token=i,exports.getERC20TokenBySymbol=o,exports.getErc20TokensForChain=r,exports.isNFTToken=s,exports.overlayTokenWithRegistryData=a;
1
+ require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../constants/token-data/ERC20Registry.cjs`),n=require(`../../data-structures/custom-token-registry/CustomTokenRegistry.cjs`);var r=e=>{let r=t.getERC20Registry(e),i=n.customTokenRegistry.getCustomTokens(e);return[...r,...i]},i=(e,t,n)=>(n??r(t))?.find(t=>e===void 0?!1:t.erc20TokenAddress.toLowerCase()===e.toLowerCase()),a=(e,t)=>r(t)?.find(t=>e===void 0?!1:t.symbol.toLowerCase()===e.toLowerCase()),o=t=>t.nftTokenType===e.TokenType.ERC721||t.nftTokenType===e.TokenType.ERC1155||t.nftTokenType===e.TokenType.MetaplexNFT||t.nftTokenType===e.TokenType.Token2022NFT||t.nftTokenType===e.TokenType.CompressedNFT;exports.getERC20Token=i,exports.getERC20TokenBySymbol=a,exports.getErc20TokensForChain=r,exports.isNFTToken=o;
@@ -1,23 +1,11 @@
1
1
  import "../../constants/chains.constants.mjs";
2
2
  import { TokenType as e } from "../../constants/protocol.constants.mjs";
3
3
  import { getERC20Registry as t } from "../../constants/token-data/ERC20Registry.mjs";
4
- import "../../constants/token-data/index.mjs";
5
4
  import { customTokenRegistry as n } from "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
6
- import "../web3/etherFunctions.mjs";
7
- import "../../constants/tokens.constants.mjs";
8
5
  //#region libs/shared/common/src/functions/utils/erc20tokenFunctions.ts
9
6
  var r = (e) => {
10
7
  let r = t(e), i = n.getCustomTokens(e);
11
8
  return [...r, ...i];
12
- }, i = (e, t, n) => (n ?? r(t))?.find((t) => e === void 0 ? !1 : t.erc20TokenAddress.toLowerCase() === e.toLowerCase()), a = (e, t) => {
13
- let n = i(e.erc20TokenAddress, t);
14
- return n ? {
15
- ...e,
16
- name: n.name,
17
- symbol: n.symbol,
18
- logoURI: n.logoURI,
19
- decimals: n.decimals
20
- } : e;
21
- }, o = (e, t) => r(t)?.find((t) => e === void 0 ? !1 : t.symbol.toLowerCase() === e.toLowerCase()), s = (t) => t.nftTokenType === e.ERC721 || t.nftTokenType === e.ERC1155 || t.nftTokenType === e.MetaplexNFT || t.nftTokenType === e.Token2022NFT || t.nftTokenType === e.CompressedNFT;
9
+ }, i = (e, t, n) => (n ?? r(t))?.find((t) => e === void 0 ? !1 : t.erc20TokenAddress.toLowerCase() === e.toLowerCase()), a = (e, t) => r(t)?.find((t) => e === void 0 ? !1 : t.symbol.toLowerCase() === e.toLowerCase()), o = (t) => t.nftTokenType === e.ERC721 || t.nftTokenType === e.ERC1155 || t.nftTokenType === e.MetaplexNFT || t.nftTokenType === e.Token2022NFT || t.nftTokenType === e.CompressedNFT;
22
10
  //#endregion
23
- export { i as getERC20Token, o as getERC20TokenBySymbol, r as getErc20TokensForChain, s as isNFTToken, a as overlayTokenWithRegistryData };
11
+ export { i as getERC20Token, a as getERC20TokenBySymbol, r as getErc20TokensForChain, o as isNFTToken };
@@ -1 +1 @@
1
- const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../data-structures/crypto-keys/keys.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);require(`../../data-structures/crypto-keys/index.cjs`);var r=r=>{let i=r.getShieldedPrivateKey(),a=t.UserKeys.getEncryptionKeyPair(i).publicKey,o=new n.Utxo({amount:0n,erc20TokenAddress:e.zeroAddress,shieldedPrivateKey:i}),{randomization:s}=o,c=o.getStealthAddress(),{h0:l,h1:u}=t.UserKeys.getStealthAddressCompressedPoints(s,i);return`${s},${c},${a},${l},${u}`};exports.getRecipientInfoFromUserKeys=r;
1
+ const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../data-structures/crypto-keys/keys.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);var r=r=>{let i=r.getShieldedPrivateKey(),a=t.UserKeys.getEncryptionKeyPair(i).publicKey,o=new n.Utxo({amount:0n,erc20TokenAddress:e.zeroAddress,shieldedPrivateKey:i}),{randomization:s}=o,c=o.getStealthAddress(),{h0:l,h1:u}=t.UserKeys.getStealthAddressCompressedPoints(s,i);return`${s},${c},${a},${l},${u}`};exports.getRecipientInfoFromUserKeys=r;
@@ -1,7 +1,6 @@
1
1
  import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
2
2
  import { UserKeys as t } from "../../data-structures/crypto-keys/keys.mjs";
3
3
  import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
4
- import "../../data-structures/crypto-keys/index.mjs";
5
4
  //#region libs/shared/common/src/functions/utils/getRecipientInfoFromUserKeys.ts
6
5
  var r = (r) => {
7
6
  let i = r.getShieldedPrivateKey(), a = t.getEncryptionKeyPair(i).publicKey, o = new n({
@@ -1 +1 @@
1
- require(`../../constants/chains.constants.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`./amounts.utils.cjs`);require(`../../types/index.cjs`);const n=require(`./caseInsensitive.utils.cjs`);require(`../../data-structures/crypto-keys/keys.cjs`);const r=require(`./getContractAddress.cjs`);require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`);const i=require(`../../data-structures/crypto-keys/decodeUTXO.cjs`);require(`ethers`);var a=(a,o,s,c)=>{let l=o.getContractWithFetcher(s,e.ContractType.HinkalContract),u=l.interface,d=o.userKeys.getShieldedPrivateKey(),f=r.getContractAddress(l);return a.logs.filter(e=>n.caseInsensitiveEqual(e.address,f)).map(e=>{try{let r=u.parseLog(e);if(r?.name===`NewCommitment`){let{encryptedOutput:e,index:a}=r.args;if(t.toBigInt(a)<0n){let t=i.decodeUtxo(e,d,s);if(n.caseInsensitiveEqual(t.erc20TokenAddress,c))return t}}}catch{return null}return null}).filter(e=>e!==null)};exports.getOnChainUtxosFromReceipt=a;
1
+ require(`../../constants/chains.constants.cjs`);const e=require(`../../types/ethereum-network.types.cjs`),t=require(`./amounts.utils.cjs`),n=require(`./caseInsensitive.utils.cjs`),r=require(`./getContractAddress.cjs`),i=require(`../../data-structures/crypto-keys/decodeUTXO.cjs`);require(`ethers`);var a=(a,o,s,c)=>{let l=o.getContractWithFetcher(s,e.ContractType.HinkalContract),u=l.interface,d=o.userKeys.getShieldedPrivateKey(),f=r.getContractAddress(l);return a.logs.filter(e=>n.caseInsensitiveEqual(e.address,f)).map(e=>{try{let r=u.parseLog(e);if(r?.name===`NewCommitment`){let{encryptedOutput:e,index:a}=r.args;if(t.toBigInt(a)<0n){let t=i.decodeUtxo(e,d,s);if(n.caseInsensitiveEqual(t.erc20TokenAddress,c))return t}}}catch{return null}return null}).filter(e=>e!==null)};exports.getOnChainUtxosFromReceipt=a;
@@ -1,11 +1,8 @@
1
1
  import "../../constants/chains.constants.mjs";
2
2
  import { ContractType as e } from "../../types/ethereum-network.types.mjs";
3
3
  import { toBigInt as t } from "./amounts.utils.mjs";
4
- import "../../types/index.mjs";
5
4
  import { caseInsensitiveEqual as n } from "./caseInsensitive.utils.mjs";
6
- import "../../data-structures/crypto-keys/keys.mjs";
7
5
  import { getContractAddress as r } from "./getContractAddress.mjs";
8
- import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
9
6
  import { decodeUtxo as i } from "../../data-structures/crypto-keys/decodeUTXO.mjs";
10
7
  import "ethers";
11
8
  //#region libs/shared/common/src/functions/utils/getUtxosFromReceipt.utils.ts
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../crypto/poseidon.cjs`),t=require(`./caseInsensitive.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`);require(`../../data-structures/crypto-keys/encryptDecryptUtxo.cjs`);const r=require(`./bytes32.utils.cjs`);let i=require(`@coral-xyz/anchor`),a=require(`@solana/web3.js`);var o=(o,s,c,l)=>[...new i.EventParser(s.programId,new i.BorshCoder(s.idl)).parseLogs(o.meta?.logMessages??[])].filter(({name:e})=>t.caseInsensitiveEqual(e,`newCommitment`)).filter(({data:e})=>e.encryptedOutput.length===0).map(t=>{let{onChainData:i}=t.data,[o,s,l,u,,,,d]=i.map(r.convertBytes32ToBigInt),[,f,p]=i,m=new a.PublicKey([...f.slice(16),...p.slice(16)]),h=e.poseidonHash(s,l),g=new n.Utxo({amount:o,timeStamp:d.toString(),randomization:u,shieldedPrivateKey:c.getShieldedPrivateKey(),mintAddress:m.toBase58(),erc20TokenAddress:h});return g.getStealthAddress(),g}).filter(e=>t.caseInsensitiveEqual(e.erc20TokenAddress,l));exports.getOnChainUtxosFromReceiptSolana=o;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../crypto/poseidon.cjs`),t=require(`./caseInsensitive.utils.cjs`),n=require(`../../data-structures/utxo/Utxo.cjs`),r=require(`./bytes32.utils.cjs`);let i=require(`@coral-xyz/anchor`),a=require(`@solana/web3.js`);var o=(o,s,c,l)=>[...new i.EventParser(s.programId,new i.BorshCoder(s.idl)).parseLogs(o.meta?.logMessages??[])].filter(({name:e})=>t.caseInsensitiveEqual(e,`newCommitment`)).filter(({data:e})=>e.encryptedOutput.length===0).map(t=>{let{onChainData:i}=t.data,[o,s,l,u,,,,d]=i.map(r.convertBytes32ToBigInt),[,f,p]=i,m=new a.PublicKey([...f.slice(16),...p.slice(16)]),h=e.poseidonHash(s,l),g=new n.Utxo({amount:o,timeStamp:d.toString(),randomization:u,shieldedPrivateKey:c.getShieldedPrivateKey(),mintAddress:m.toBase58(),erc20TokenAddress:h});return g.getStealthAddress(),g}).filter(e=>t.caseInsensitiveEqual(e.erc20TokenAddress,l));exports.getOnChainUtxosFromReceiptSolana=o;
@@ -2,7 +2,6 @@ import "../../constants/chains.constants.mjs";
2
2
  import { poseidonHash as e } from "../../crypto/poseidon.mjs";
3
3
  import { caseInsensitiveEqual as t } from "./caseInsensitive.utils.mjs";
4
4
  import { Utxo as n } from "../../data-structures/utxo/Utxo.mjs";
5
- import "../../data-structures/crypto-keys/encryptDecryptUtxo.mjs";
6
5
  import { convertBytes32ToBigInt as r } from "./bytes32.utils.mjs";
7
6
  import { BorshCoder as i, EventParser as a } from "@coral-xyz/anchor";
8
7
  import { PublicKey as o } from "@solana/web3.js";
@@ -1 +1 @@
1
- var e=e=>new Promise(t=>{setTimeout(t,e)}),t=async(t,n={})=>{let r=n.intervalMs??5e3,i=n.timeoutMs??6e4,a=Math.floor(i/r)+1;for(let n=0;n<a;n+=1){try{let e=await t();if(e!=null)return e}catch{}n<a-1&&await e(r)}};exports.pollForValue=t,exports.wait=e;
1
+ var e=e=>new Promise(t=>{setTimeout(t,e)}),t=async(t,n={})=>{let r=n.intervalMs??5e3,i=n.timeoutMs??6e4,a=Math.floor(i/r)+1;for(let n=0;n<a;n+=1){try{let e=await t();if(e!=null)return e}catch{}n<a-1&&await e(r)}};exports.pollForValue=t;
@@ -12,4 +12,4 @@ var e = (e) => new Promise((t) => {
12
12
  }
13
13
  };
14
14
  //#endregion
15
- export { t as pollForValue, e as wait };
15
+ export { t as pollForValue };
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`);require(`./erc20tokenFunctions.cjs`),require(`../../data-structures/http/index.cjs`),require(`./addresses.cjs`);const t=require(`../../error-handling/logger.cjs`),n=require(`./create-provider.cjs`);require(`../../externalABIs/index.cjs`);const r=require(`../../externalABIs/swapAbi.cjs`);require(`./ipfs.cjs`);let i=require(`ethers`);require(`@solana/web3.js`),require(`@solana/spl-token`);var a=async(t,n,a)=>{try{let o=a.erc20TokenAddress,s,c=new i.ethers.Contract(a.erc20TokenAddress,r.ERC20ABI,t);s=o===e.zeroAddress?await t.getBalance(n):await c?.balanceOf(n);let l=s;return l<=0n?null:{token:a,balance:l}}catch{return null}},o=async(a,o,s)=>{try{let t=n.createJsonRpcProvider(a),c=new i.ethers.Contract(s,r.ERC20ABI,t),l;return l=s===e.zeroAddress?await t.getBalance(o):await c?.balanceOf(o),l}catch{return t.Logger.error(`Failed to fetch public balance for address ${o}`),null}};exports.getPublicBalance=a,exports.getPublicBalanceByTokenAddress=o;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`),require(`../../constants/chains.constants.cjs`);const e=require(`../../constants/protocol.constants.cjs`);require(`./erc20tokenFunctions.cjs`);const t=require(`../../externalABIs/swapAbi.cjs`);let n=require(`ethers`);require(`@solana/web3.js`),require(`@solana/spl-token`);var r=async(r,i,a)=>{try{let o=a.erc20TokenAddress,s,c=new n.ethers.Contract(a.erc20TokenAddress,t.ERC20ABI,r);s=o===e.zeroAddress?await r.getBalance(i):await c?.balanceOf(i);let l=s;return l<=0n?null:{token:a,balance:l}}catch{return null}};exports.getPublicBalance=r;
@@ -1,21 +1,14 @@
1
1
  import "../../constants/chains.constants.mjs";
2
2
  import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
3
- import "./erc20tokenFunctions.mjs";
4
- import "../../data-structures/http/index.mjs";
5
- import "./addresses.mjs";
6
- import { Logger as t } from "../../error-handling/logger.mjs";
7
- import { createJsonRpcProvider as n } from "./create-provider.mjs";
8
- import "../../externalABIs/index.mjs";
9
- import { ERC20ABI as r } from "../../externalABIs/swapAbi.mjs";
10
- import "./ipfs.mjs";
11
- import { ethers as i } from "ethers";
3
+ import { ERC20ABI as t } from "../../externalABIs/swapAbi.mjs";
4
+ import { ethers as n } from "ethers";
12
5
  import "@solana/web3.js";
13
6
  import "@solana/spl-token";
14
7
  //#region libs/shared/common/src/functions/utils/publicBalance.utils.ts
15
- var a = async (t, n, a) => {
8
+ var r = async (r, i, a) => {
16
9
  try {
17
- let o = a.erc20TokenAddress, s, c = new i.Contract(a.erc20TokenAddress, r, t);
18
- s = o === e ? await t.getBalance(n) : await c?.balanceOf(n);
10
+ let o = a.erc20TokenAddress, s, c = new n.Contract(a.erc20TokenAddress, t, r);
11
+ s = o === e ? await r.getBalance(i) : await c?.balanceOf(i);
19
12
  let l = s;
20
13
  return l <= 0n ? null : {
21
14
  token: a,
@@ -24,13 +17,6 @@ var a = async (t, n, a) => {
24
17
  } catch {
25
18
  return null;
26
19
  }
27
- }, o = async (a, o, s) => {
28
- try {
29
- let t = n(a), c = new i.Contract(s, r, t), l;
30
- return l = s === e ? await t.getBalance(o) : await c?.balanceOf(o), l;
31
- } catch {
32
- return t.error(`Failed to fetch public balance for address ${o}`), null;
33
- }
34
20
  };
35
21
  //#endregion
36
- export { a as getPublicBalance, o as getPublicBalanceByTokenAddress };
22
+ export { r as getPublicBalance };
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../crypto/poseidon.cjs`);let t=require(`ethers`),n=require(`@solana/web3.js`);var r=e=>{let n=e.toBytes();return BigInt(t.ethers.hexlify(n))},i=t=>{let i=typeof t==`string`?new n.PublicKey(t):t,a=r(i),o=a/2n**128n,s=a%2n**128n;return{mintAccountPart1:o,mintAccountPart2:s,compressedAddress:e.poseidonHash(o,s),mintPublicKey:i}};exports.convertPublicKeyToBigint=r,exports.formatMintAddress=i;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../crypto/poseidon.cjs`);let t=require(`ethers`),n=require(`@solana/web3.js`);var r=e=>{let n=e.toBytes();return BigInt(t.ethers.hexlify(n))},i=t=>{let i=typeof t==`string`?new n.PublicKey(t):t,a=r(i),o=a/2n**128n,s=a%2n**128n;return{mintAccountPart1:o,mintAccountPart2:s,compressedAddress:e.poseidonHash(o,s),mintPublicKey:i}};exports.formatMintAddress=i;
@@ -15,4 +15,4 @@ var r = (e) => {
15
15
  };
16
16
  };
17
17
  //#endregion
18
- export { r as convertPublicKeyToBigint, i as formatMintAddress };
18
+ export { i as formatMintAddress };
@@ -1 +1 @@
1
- const e=require(`../../constants/chains.constants.cjs`);var t=(t,n)=>{let r=`${t}-${n}`;return e.isSolanaLike(n)||e.isTronLike(n)?r:r.toLowerCase()},n=(t,n,r=!1)=>{let i=`${t}-${n}`;if(r){let{hinkalAddress:t}=e.networkRegistry[n].contractData;return`${i}-${t}`.toLowerCase()}return i.toLowerCase()},r=(e,t,n)=>{if(!t||!n)throw Error(`oldPart and newPart must be provided`);return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase())};exports.getStateKey=n,exports.getTokenStateKey=t,exports.replaceAllInstances=r;
1
+ const e=require(`../../constants/chains.constants.cjs`);var t=(t,n,r=!1)=>{let i=`${t}-${n}`;if(r){let{hinkalAddress:t}=e.networkRegistry[n].contractData;return`${i}-${t}`.toLowerCase()}return i.toLowerCase()},n=(e,t,n)=>{if(!t||!n)throw Error(`oldPart and newPart must be provided`);return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase())};exports.getStateKey=t,exports.replaceAllInstances=n;
@@ -1,18 +1,15 @@
1
- import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../constants/chains.constants.mjs";
1
+ import { networkRegistry as e } from "../../constants/chains.constants.mjs";
2
2
  //#region libs/shared/common/src/functions/utils/string.utils.ts
3
- var r = (n, r) => {
4
- let i = `${n}-${r}`;
5
- return e(r) || t(r) ? i : i.toLowerCase();
6
- }, i = (e, t, r = !1) => {
7
- let i = `${e}-${t}`;
3
+ var t = (t, n, r = !1) => {
4
+ let i = `${t}-${n}`;
8
5
  if (r) {
9
- let { hinkalAddress: e } = n[t].contractData;
10
- return `${i}-${e}`.toLowerCase();
6
+ let { hinkalAddress: t } = e[n].contractData;
7
+ return `${i}-${t}`.toLowerCase();
11
8
  }
12
9
  return i.toLowerCase();
13
- }, a = (e, t, n) => {
10
+ }, n = (e, t, n) => {
14
11
  if (!t || !n) throw Error("oldPart and newPart must be provided");
15
12
  return e.toLowerCase().split(t.toLowerCase()).join(n.toLowerCase());
16
13
  };
17
14
  //#endregion
18
- export { i as getStateKey, r as getTokenStateKey, a as replaceAllInstances };
15
+ export { t as getStateKey, n as replaceAllInstances };
@@ -1 +1 @@
1
- require(`../../constants/token-data/ERC20Registry.cjs`);const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`./caseInsensitive.utils.cjs`);require(`../../API/API.cjs`);var n=t=>{if(t.length===0)throw Error(`Token array cannot be empty`);let n=t.map(e=>e.chainId),r=n[0];if(!n.every(e=>e===r))throw Error(e.transactionErrorCodes.TOKENS_DO_NOT_BELONG_SAME_CHAIN);return r},r=(e,n)=>!e||!n?!1:t.caseInsensitiveEqual(e.erc20TokenAddress,n.erc20TokenAddress)&&e.chainId===n.chainId;exports.isSameERC20Token=r,exports.validateAndGetChainId=n;
1
+ const e=require(`../../error-handling/error-codes.constants.cjs`),t=require(`./caseInsensitive.utils.cjs`);var n=t=>{if(t.length===0)throw Error(`Token array cannot be empty`);let n=t.map(e=>e.chainId),r=n[0];if(!n.every(e=>e===r))throw Error(e.transactionErrorCodes.TOKENS_DO_NOT_BELONG_SAME_CHAIN);return r},r=(e,n)=>!e||!n?!1:t.caseInsensitiveEqual(e.erc20TokenAddress,n.erc20TokenAddress)&&e.chainId===n.chainId;exports.isSameERC20Token=r,exports.validateAndGetChainId=n;
@@ -1,7 +1,5 @@
1
- import "../../constants/token-data/ERC20Registry.mjs";
2
1
  import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
3
2
  import { caseInsensitiveEqual as t } from "./caseInsensitive.utils.mjs";
4
- import "../../API/API.mjs";
5
3
  //#region libs/shared/common/src/functions/utils/token-check.utils.ts
6
4
  var n = (t) => {
7
5
  if (t.length === 0) throw Error("Token array cannot be empty");
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`tronweb`);var o=1000n,s=(t,n)=>{let r=e.networkRegistry[t].fetchRpcUrl,i=n?new a.TronWeb({fullHost:r,privateKey:n}):new a.TronWeb({fullHost:r});return n||i.setAddress(`T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb`),i},c=e=>e?.startsWith(`T`)?e:a.TronWeb.address.fromHex(e),l=e=>{if(e.startsWith(`0x`))return e;if(e.startsWith(`41`))return e.replace(`41`,`0x`);if(e.startsWith(`T`))return l(a.TronWeb.address.toHex(e));throw Error(`Failed to convert address to hex format`)},u=t=>{if(t===e.chainIds.tronNile)return`https://nile.trongrid.io`;if(t===e.chainIds.tronMainnet)return`https://api.trongrid.io`;throw Error(`Unsupported Tron chain for wallet RPC: ${t}`)},d=(e,t)=>e.map(e=>Array.isArray(e)?d(e,t):t(e)),f=(e,t,n)=>{let r=new i.ethers.Interface(e);if(!r.getFunction(t))throw Error(`${t} ABI is missing for Tron call data creation`);let a=d(n,e=>typeof e==`string`&&e.startsWith(`T`)?l(e):e);return r.encodeFunctionData(t,a)},p=(e,t,n)=>e?BigInt(Math.max((e[t]??0)-(e[n]??0),0)):0n,m=(e,t)=>{let n=e.find(e=>e.key===t);if(!n||typeof n.value!=`number`)throw Error(`Missing Tron chain parameter: ${t}`);return BigInt(n.value)},h=async e=>{let t=`${u(e)}/wallet/getchainparameters`,n=await r.httpClient.post(t,{});if(!n?.chainParameter?.length)throw Error(`Failed to fetch Tron chain parameters from wallet RPC`);return n.chainParameter},g=async(e,t)=>{let n=`${u(e)}/wallet/getaccountresource`,i=l(t),a=i.startsWith(`0x`)?`41${i.slice(2)}`:i;return await r.httpClient.post(n,{address:a,visible:!1})},_=async(e,n,r,i,a,s)=>{let c={input:a,callValue:Number(s),feeLimit:t.TRON_DEFAULT_FEE_LIMIT_SUN},[l,u]=await Promise.all([e.transactionBuilder.estimateEnergy(r,``,c,[],i),e.transactionBuilder.triggerConstantContract(r,``,c,[],i)]),d=await h(n),f=m(d,`getEnergyFee`),_=m(d,`getTransactionFee`),v=await g(n,i),y=BigInt(l?.energy_required??u?.energy_used??0),b=p(v,`EnergyLimit`,`EnergyUsed`),x=(y>b?y-b:0n)*f,S=BigInt(Math.ceil((u?.transaction?.raw_data_hex?.length??0)/2)),C=p(v,`freeNetLimit`,`freeNetUsed`)+p(v,`NetLimit`,`NetUsed`),w=x+(S>C?S-C:0n)*_,T=w+w*o/10000n;return T>BigInt(1e9)?BigInt(t.TRON_DEFAULT_FEE_LIMIT_SUN):T},v=e=>{let t=e[0].map(BigInt),n=e[1][0].map(BigInt),r=e[1][1].map(BigInt),i=e[2].map(BigInt),a=e[3].map(BigInt);return{a:t,b:[[n[1],n[0]],[r[1],r[0]]],c:i,publicSignals:a}},y=(e,t)=>{let n=i.ethers.AbiCoder.defaultAbiCoder().encode([`uint16`,`uint16`,`uint16`,`uint256`],[e.tokenNumber,e.nullifierAmount,e.outputAmount,t]);return BigInt(i.ethers.keccak256(n))},b=async(e,t,a,o,s,c)=>{let l=y(s,c),u=e.map(String),d=a.map(String),f=o.map(String),p={a:u,b:[t[0].map(String),t[1].map(String)],c:d,inputs:f,verifier_id:String(l)},m=await r.httpClient.post(`${n.ENCLAVE_URL}/sign-proof`,p),{v:h,r:g,s:_}=i.ethers.Signature.from(m.signature.trim());return{v:h,r:g,s:_}},x=e=>[e.rootHashHinkal,e.erc20TokenAddresses,e.tokenIds,e.amountChanges,e.onChainCreation,e.slippageValues,e.inputNullifiers,e.outCommitments,e.encryptedOutputs,[e.feeStructure.feeToken,e.feeStructure.flatFee,e.feeStructure.variableRate],e.timeStamp,[e.stealthAddressStructure.extraRandomization,e.stealthAddressStructure.stealthAddress,e.stealthAddressStructure.H0,e.stealthAddressStructure.H1],e.rootHashAccessToken,e.calldataHash,e.publicSignalCount,e.relay,e.externalAddress,e.externalActionId,e.externalActionMetadata,[e.hinkalLogicArgs.hinkalLogicAction,e.hinkalLogicArgs.inHinkalAddress,e.hinkalLogicArgs.executeApprovalChanges,e.hinkalLogicArgs.doPreTxApproval,e.hinkalLogicArgs.useApprovalUtxoData.map(e=>[e.approvalChanges,e.externalApprovalAddresses,e.conversionInHinkalAddress])],[e.hookData.preHookContract,e.hookData.hookContract,e.hookData.preHookMetadata,e.hookData.postHookMetadata],[e.signatureData.v,e.signatureData.r,e.signatureData.s,e.signatureData.accessKey,e.signatureData.nonce,e.signatureData.ethereumAddress],e.originalSender],S=async(e,t,n,r,i=!0)=>{if(e){let{a:e,b:a,c:o,publicSignals:s}=v(t),c=await b(e,a,o,s,n,BigInt(r.externalActionId)),l={v:c.v,r:c.r,s:c.s};return i&&(t[1]=[[t[1][0][1],t[1][0][0]],[t[1][1][1],t[1][1][0]]]),l}};exports.addressToHexFormat=l,exports.circomDataToArray=x,exports.createTronCallData=f,exports.createTronWeb=s,exports.estimateTronFeeSunWithPadding=_,exports.evmHexToTronBase58Address=c,exports.fetchTronAccountResources=g,exports.fetchTronChainParameters=h,exports.generateProofSignatureRemotely=b,exports.getAvailableResource=p,exports.getChainParameterValue=m,exports.getVerifierId=y,exports.parseZkCalldata=v,exports.reorderZkCallData=S;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../snarkjs/constant.cjs`),r=require(`../../data-structures/http/HttpClient.cjs`);let i=require(`ethers`),a=require(`tronweb`);var o=1000n,s=(t,n)=>{let r=e.networkRegistry[t].fetchRpcUrl,i=n?new a.TronWeb({fullHost:r,privateKey:n}):new a.TronWeb({fullHost:r});return n||i.setAddress(`T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb`),i},c=e=>e?.startsWith(`T`)?e:a.TronWeb.address.fromHex(e),l=e=>{if(e.startsWith(`0x`))return e;if(e.startsWith(`41`))return e.replace(`41`,`0x`);if(e.startsWith(`T`))return l(a.TronWeb.address.toHex(e));throw Error(`Failed to convert address to hex format`)},u=t=>{if(t===e.chainIds.tronNile)return`https://nile.trongrid.io`;if(t===e.chainIds.tronMainnet)return`https://api.trongrid.io`;throw Error(`Unsupported Tron chain for wallet RPC: ${t}`)},d=(e,t)=>e.map(e=>Array.isArray(e)?d(e,t):t(e)),f=(e,t,n)=>{let r=new i.ethers.Interface(e);if(!r.getFunction(t))throw Error(`${t} ABI is missing for Tron call data creation`);let a=d(n,e=>typeof e==`string`&&e.startsWith(`T`)?l(e):e);return r.encodeFunctionData(t,a)},p=(e,t,n)=>e?BigInt(Math.max((e[t]??0)-(e[n]??0),0)):0n,m=(e,t)=>{let n=e.find(e=>e.key===t);if(!n||typeof n.value!=`number`)throw Error(`Missing Tron chain parameter: ${t}`);return BigInt(n.value)},h=async e=>{let t=`${u(e)}/wallet/getchainparameters`,n=await r.httpClient.post(t,{});if(!n?.chainParameter?.length)throw Error(`Failed to fetch Tron chain parameters from wallet RPC`);return n.chainParameter},g=async(e,t)=>{let n=`${u(e)}/wallet/getaccountresource`,i=l(t),a=i.startsWith(`0x`)?`41${i.slice(2)}`:i;return await r.httpClient.post(n,{address:a,visible:!1})},_=async(e,n,r,i,a,s)=>{let c={input:a,callValue:Number(s),feeLimit:t.TRON_DEFAULT_FEE_LIMIT_SUN},[l,u]=await Promise.all([e.transactionBuilder.estimateEnergy(r,``,c,[],i),e.transactionBuilder.triggerConstantContract(r,``,c,[],i)]),d=await h(n),f=m(d,`getEnergyFee`),_=m(d,`getTransactionFee`),v=await g(n,i),y=BigInt(l?.energy_required??u?.energy_used??0),b=p(v,`EnergyLimit`,`EnergyUsed`),x=(y>b?y-b:0n)*f,S=BigInt(Math.ceil((u?.transaction?.raw_data_hex?.length??0)/2)),C=p(v,`freeNetLimit`,`freeNetUsed`)+p(v,`NetLimit`,`NetUsed`),w=x+(S>C?S-C:0n)*_,T=w+w*o/10000n;return T>BigInt(1e9)?BigInt(t.TRON_DEFAULT_FEE_LIMIT_SUN):T},v=e=>{let t=e[0].map(BigInt),n=e[1][0].map(BigInt),r=e[1][1].map(BigInt),i=e[2].map(BigInt),a=e[3].map(BigInt);return{a:t,b:[[n[1],n[0]],[r[1],r[0]]],c:i,publicSignals:a}},y=(e,t)=>{let n=i.ethers.AbiCoder.defaultAbiCoder().encode([`uint16`,`uint16`,`uint16`,`uint256`],[e.tokenNumber,e.nullifierAmount,e.outputAmount,t]);return BigInt(i.ethers.keccak256(n))},b=async(e,t,a,o,s,c)=>{let l=y(s,c),u=e.map(String),d=a.map(String),f=o.map(String),p={a:u,b:[t[0].map(String),t[1].map(String)],c:d,inputs:f,verifier_id:String(l)},m=await r.httpClient.post(`${n.ENCLAVE_URL}/sign-proof`,p),{v:h,r:g,s:_}=i.ethers.Signature.from(m.signature.trim());return{v:h,r:g,s:_}},x=e=>[e.rootHashHinkal,e.erc20TokenAddresses,e.tokenIds,e.amountChanges,e.onChainCreation,e.slippageValues,e.inputNullifiers,e.outCommitments,e.encryptedOutputs,[e.feeStructure.feeToken,e.feeStructure.flatFee,e.feeStructure.variableRate],e.timeStamp,[e.stealthAddressStructure.extraRandomization,e.stealthAddressStructure.stealthAddress,e.stealthAddressStructure.H0,e.stealthAddressStructure.H1],e.rootHashAccessToken,e.calldataHash,e.publicSignalCount,e.relay,e.externalAddress,e.externalActionId,e.externalActionMetadata,[e.hinkalLogicArgs.hinkalLogicAction,e.hinkalLogicArgs.inHinkalAddress,e.hinkalLogicArgs.executeApprovalChanges,e.hinkalLogicArgs.doPreTxApproval,e.hinkalLogicArgs.useApprovalUtxoData.map(e=>[e.approvalChanges,e.externalApprovalAddresses,e.conversionInHinkalAddress])],[e.hookData.preHookContract,e.hookData.hookContract,e.hookData.preHookMetadata,e.hookData.postHookMetadata],[e.signatureData.v,e.signatureData.r,e.signatureData.s,e.signatureData.accessKey,e.signatureData.nonce,e.signatureData.ethereumAddress],e.originalSender],S=async(e,t,n,r,i=!0)=>{if(e){let{a:e,b:a,c:o,publicSignals:s}=v(t),c=await b(e,a,o,s,n,BigInt(r.externalActionId)),l={v:c.v,r:c.r,s:c.s};return i&&(t[1]=[[t[1][0][1],t[1][0][0]],[t[1][1][1],t[1][1][0]]]),l}};exports.addressToHexFormat=l,exports.circomDataToArray=x,exports.createTronCallData=f,exports.createTronWeb=s,exports.estimateTronFeeSunWithPadding=_,exports.evmHexToTronBase58Address=c,exports.parseZkCalldata=v,exports.reorderZkCallData=S;
@@ -146,4 +146,4 @@ var s = 1000n, c = (e, n) => {
146
146
  }
147
147
  };
148
148
  //#endregion
149
- export { u as addressToHexFormat, S as circomDataToArray, p as createTronCallData, c as createTronWeb, v as estimateTronFeeSunWithPadding, l as evmHexToTronBase58Address, _ as fetchTronAccountResources, g as fetchTronChainParameters, x as generateProofSignatureRemotely, m as getAvailableResource, h as getChainParameterValue, b as getVerifierId, y as parseZkCalldata, C as reorderZkCallData };
149
+ export { u as addressToHexFormat, S as circomDataToArray, p as createTronCallData, c as createTronWeb, v as estimateTronFeeSunWithPadding, l as evmHexToTronBase58Address, y as parseZkCalldata, C as reorderZkCallData };
@@ -1 +1 @@
1
- const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../error-handling/logger.cjs`),r=require(`./create-provider.cjs`),i=require(`../../constants/tx-confirmation.constants.cjs`);require(`../../constants/index.cjs`);var a=`confirmed`,o=async(e,n,a={})=>{let{evmConfirmations:o=1,evmTimeoutMs:s=i.TX_CONFIRMATION_TIMEOUT_EXTENDED}=a,c=n.startsWith(`0x`)?n:`0x${n}`,l=await r.createJsonRpcProvider(e).waitForTransaction(c,o,s);if(!l||l.status!==1)throw Error(t.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED);return l},s=async(t,n,i={})=>{let{solanaCommitment:o=a}=i,{fetchRpcUrl:s}=e.networkRegistry[t];if(!s)throw Error(`RPC URL not found for the specified chain ID`);let c=await r.createCustomSolanaConnection(s,o).confirmTransaction(n,o);if(c.value.err)throw Error(`Transaction failed`);return c},c=async(t,r,i={})=>{try{if(e.isSolanaLike(t)){await s(t,r,i);return}await o(t,r.startsWith(`0x`)?r:`0x${r}`,i)}catch(e){throw n.Logger.error(`waitForTransactionConfirmation failed`,{chainId:t,txHash:r,error:e}),e}};exports.waitForEthereumTransactionConfirmation=o,exports.waitForSolanaTransactionConfirmation=s,exports.waitForTransactionConfirmation=c;
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../error-handling/error-codes.constants.cjs`),n=require(`../../error-handling/logger.cjs`),r=require(`./create-provider.cjs`),i=require(`../../constants/tx-confirmation.constants.cjs`);var a=`confirmed`,o=async(e,n,a={})=>{let{evmConfirmations:o=1,evmTimeoutMs:s=i.TX_CONFIRMATION_TIMEOUT_EXTENDED}=a,c=n.startsWith(`0x`)?n:`0x${n}`,l=await r.createJsonRpcProvider(e).waitForTransaction(c,o,s);if(!l||l.status!==1)throw Error(t.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED);return l},s=async(t,n,i={})=>{let{solanaCommitment:o=a}=i,{fetchRpcUrl:s}=e.networkRegistry[t];if(!s)throw Error(`RPC URL not found for the specified chain ID`);let c=await r.createCustomSolanaConnection(s,o).confirmTransaction(n,o);if(c.value.err)throw Error(`Transaction failed`);return c},c=async(t,r,i={})=>{try{if(e.isSolanaLike(t)){await s(t,r,i);return}await o(t,r.startsWith(`0x`)?r:`0x${r}`,i)}catch(e){throw n.Logger.error(`waitForTransactionConfirmation failed`,{chainId:t,txHash:r,error:e}),e}};exports.waitForEthereumTransactionConfirmation=o,exports.waitForTransactionConfirmation=c;
@@ -3,7 +3,6 @@ import { transactionErrorCodes as n } from "../../error-handling/error-codes.con
3
3
  import { Logger as r } from "../../error-handling/logger.mjs";
4
4
  import { createCustomSolanaConnection as i, createJsonRpcProvider as a } from "./create-provider.mjs";
5
5
  import { TX_CONFIRMATION_TIMEOUT_EXTENDED as o } from "../../constants/tx-confirmation.constants.mjs";
6
- import "../../constants/index.mjs";
7
6
  //#region libs/shared/common/src/functions/utils/tx-confirmation.utils.ts
8
7
  var s = "confirmed", c = async (e, t, r = {}) => {
9
8
  let { evmConfirmations: i = 1, evmTimeoutMs: s = o } = r, c = t.startsWith("0x") ? t : `0x${t}`, l = await a(e).waitForTransaction(c, i, s);
@@ -31,4 +30,4 @@ var s = "confirmed", c = async (e, t, r = {}) => {
31
30
  }
32
31
  };
33
32
  //#endregion
34
- export { c as waitForEthereumTransactionConfirmation, l as waitForSolanaTransactionConfirmation, u as waitForTransactionConfirmation };
33
+ export { c as waitForEthereumTransactionConfirmation, u as waitForTransactionConfirmation };
@@ -1 +1 @@
1
- const e=require(`../../../types/hinkal.types.cjs`);require(`../../../types/index.cjs`);var t=new Set,n=n=>{if(typeof document<`u`){let t=e=>{e instanceof CustomEvent?n(e.detail??{}):n({})};return document.addEventListener(e.EventType.BalanceChange,t),()=>document.removeEventListener(e.EventType.BalanceChange,t)}return t.add(n),()=>{t.delete(n)}},r=n=>{let r=e.EventType.BalanceChange,i=new CustomEvent(r,{detail:n});typeof document<`u`?document.dispatchEvent(i):t.forEach(e=>{e(n)})};exports.balanceChangedHandler=r,exports.subscribeToBalanceChange=n;
1
+ const e=require(`../../../types/hinkal.types.cjs`);var t=new Set,n=n=>{if(typeof document<`u`){let t=e=>{e instanceof CustomEvent?n(e.detail??{}):n({})};return document.addEventListener(e.EventType.BalanceChange,t),()=>document.removeEventListener(e.EventType.BalanceChange,t)}return t.add(n),()=>{t.delete(n)}},r=n=>{let r=e.EventType.BalanceChange,i=new CustomEvent(r,{detail:n});typeof document<`u`?document.dispatchEvent(i):t.forEach(e=>{e(n)})};exports.balanceChangedHandler=r,exports.subscribeToBalanceChange=n;
@@ -1,5 +1,5 @@
1
1
  import { PrivateBalanceUpdateEventType } from '../../../types';
2
- type BalanceChangeListener = (detail?: PrivateBalanceUpdateEventType) => void;
2
+ type BalanceChangeListener = (detail: PrivateBalanceUpdateEventType) => void;
3
3
  export declare const subscribeToBalanceChange: (listener: BalanceChangeListener) => (() => void);
4
4
  export declare const balanceChangedHandler: (detail: PrivateBalanceUpdateEventType) => void;
5
5
  export {};
@@ -1,5 +1,4 @@
1
1
  import { EventType as e } from "../../../types/hinkal.types.mjs";
2
- import "../../../types/index.mjs";
3
2
  //#region libs/shared/common/src/functions/web3/events/balanceChangedHandler.ts
4
3
  var t = /* @__PURE__ */ new Set(), n = (n) => {
5
4
  if (typeof document < "u") {
@@ -1 +1 @@
1
- require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../utils/caseInsensitive.utils.cjs`),n=require(`../../../data-structures/utxo/Utxo.cjs`),r=require(`../../utils/upToDateState.cjs`),i=require(`../../utils/cacheFunctions.cjs`),a=require(`../../utils/encodeTokenWithId.cjs`),o=require(`../../utils/solanaMint.utils.cjs`),s=require(`./getInputUtxosEnclave.cjs`),c=require(`../../utils/addresses.cjs`),l=require(`../../../API/scheduled-transactions-calls.cjs`),u=require(`../../utils/tron.utils.cjs`);var d=new(require(`async-mutex`)).Mutex,f=async(e,t,n,a,o,s,c,l,u)=>d.runExclusive(async()=>{u+=1;let d=s.slice(u),{lastOutput:f,additionalEncryptedOutputs:p}=await e.utxoUtils.batchProcess(d,l,t,n),m=[...c,...p];return await r.checkAddressNotUpdated(e,a),i.setHinkalCache({lastOutput:f,encryptedOutputs:m},e,n,o),await e.utxoUtils.buildBatchProcess(m,t,n)}),p=async(e,t,n,r)=>{let{utxos:a,encryptedOutputs:o,lastOutput:c}=await s.getInputUtxosEnclave(e,n,t);return i.setHinkalCache({encryptedOutputs:o,lastOutput:c},e,n,r),a},m=async(e,t,n,r,i,a,o,s,c)=>{try{return await p(e,t,n,i)}catch{return f(e,t,n,r,i,a,o,s,c)}},h=e=>{if(Array.isArray(e))return e;if(e!==void 0)return[e]},g=async(e,t,n)=>await e.utxoUtils.batchFilterUtxosWithNullifier(t,n),_=(e,t,r,i,a,o,s)=>{for(e.sort((e,t)=>e.amount<=t.amount?1:-1);e.length<t||e.length>t&&e.length<6;)if(e.push(new n.Utxo({amount:0n,erc20TokenAddress:a,mintAddress:s,shieldedPrivateKey:i,tokenId:o})),r)for(;e.length>6;)e.splice(e.length-1)},v=async({hinkal:e,chainId:t,passedShieldedPublicKey:n=void 0,ethAddress:a=void 0,resetCacheBefore:o=!1,allowRemoteDecryption:s=!1,useBlockedUtxos:c=!1})=>{let l=a??await e.getEthereumAddress(),u=n??e.userKeys.getShieldedPublicKey(),{userKeys:d}=e,p=e.encryptedOutputsByChain[t],h=e.nullifiersByChain[t],_=Array.from(p);o&&i.resetCache(e,t,u);let{encryptedOutputs:v,lastOutput:y}=i.getHinkalCache(e,t,u);await r.checkAddressNotUpdated(e,l);let b=y!==``,x=_.findIndex(e=>e.value===y),S=x>-1,C=!b&&x===-1,w=e.areMerkleTreeUpdatesDisabled(),T=!w&&(S||!s&&C),E=!w&&s&&C,D=!T&&!E,O=[];T?O=await f(e,d,t,l,u,_,v,y,x):E?O=await m(e,d,t,l,u,_,v,y,x):D&&(O=await e.utxoUtils.buildBatchProcess(v,d,t)),await r.checkAddressNotUpdated(e,l);let k=await g(e,O,h);return{inputUtxos:c?k.filter(e=>e.isBlocked):k.filter(e=>!e.isBlocked)}},y=async({hinkal:t,chainId:n,passedShieldedPublicKey:r=void 0,ethAddress:i=void 0,resetCacheBefore:a=!1,allowRemoteDecryption:o=!1})=>{let s=i??await t.getEthereumAddressByChain(n),d=c.hashEthereumAddress(e.isTronLike(n)?u.addressToHexFormat(s):s),{inputUtxos:f}=await v({hinkal:t,chainId:n,passedShieldedPublicKey:r,ethAddress:s,resetCacheBefore:a,allowRemoteDecryption:o,useBlockedUtxos:!0});if(!f.length)return{inputUtxos:[]};let{indexes:p}=await l.getScheduledTransactionsNullifierIndexes({hashedEthereumAddress:d,nullifiers:f.map(e=>e.getNullifier())});return{inputUtxos:p.map(e=>f[e]).filter(e=>!!e)}},b=async({hinkal:n,tokenWithId:r,minInput:i=2,sliceIfMore6:s=!0,chainId:c,passedShieldedPrivateKey:l=void 0,passedShieldedPublicKey:u=void 0,ethAddress:d=void 0,resetCacheBefore:f=!1,ensuredTokensWithId:p,allowRemoteDecryption:m=!1,useBlockedUtxos:g=!1})=>{let b=l??n.userKeys.getShieldedPrivateKey(),{inputUtxos:x}=g?await y({hinkal:n,chainId:c,ethAddress:d,passedShieldedPrivateKey:l,resetCacheBefore:f,allowRemoteDecryption:m}):await v({hinkal:n,tokenWithId:r,minInput:i,sliceIfMore6:s,chainId:c,passedShieldedPrivateKey:l,passedShieldedPublicKey:u,ethAddress:d,resetCacheBefore:f,allowRemoteDecryption:m}),S=h(r),C=new Map;x.forEach(e=>{let n=e.getTokenAddress(c);if(S&&!S.some(r=>t.caseInsensitiveEqual(r.erc20TokenAddress,n)&&r.tokenId===e.tokenId))return;let r=a.encodeTokenWithId(c,{erc20TokenAddress:n,tokenId:e.tokenId}),i=C.get(r)??[];C.set(r,[...i,e])}),p?.forEach(e=>{let t=a.encodeTokenWithId(c,{erc20TokenAddress:e.erc20TokenAddress,tokenId:e.tokenId});C.set(t,C.get(t)??[])});for(let[t,n]of C){let r=t.split(`-`)[0],a=Number(t.split(`-`)[1]),l=e.isSolanaLike(c),u=l?r:void 0;_(n,i,s,b,l?o.formatMintAddress(r).compressedAddress.toLowerCase():r.toLowerCase(),a,u)}return C};exports.attemptGetInputUtxosRemotely=m,exports.getInputUtxoAndBalance=v,exports.getInputUtxoAndBalanceOfStuckUtxos=y,exports.getInputUtxoAndBalancePerToken=b,exports.getInputUtxosRemotely=p;
1
+ require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../utils/caseInsensitive.utils.cjs`),n=require(`../../../data-structures/utxo/Utxo.cjs`),r=require(`../../utils/upToDateState.cjs`),i=require(`../../utils/cacheFunctions.cjs`),a=require(`../../utils/encodeTokenWithId.cjs`),o=require(`../../utils/solanaMint.utils.cjs`),s=require(`./getInputUtxosEnclave.cjs`),c=require(`../../utils/addresses.cjs`),l=require(`../../../API/scheduled-transactions-calls.cjs`),u=require(`../../utils/tron.utils.cjs`);var d=new(require(`async-mutex`)).Mutex,f=async(e,t,n,a,o,s,c,l,u)=>d.runExclusive(async()=>{u+=1;let d=s.slice(u),{lastOutput:f,additionalEncryptedOutputs:p}=await e.utxoUtils.batchProcess(d,l,t,n),m=[...c,...p];return await r.checkAddressNotUpdated(e,a),i.setHinkalCache({lastOutput:f,encryptedOutputs:m},e,n,o),await e.utxoUtils.buildBatchProcess(m,t,n)}),p=async(e,t,n,r)=>{let{utxos:a,encryptedOutputs:o,lastOutput:c}=await s.getInputUtxosEnclave(e,n,t);return i.setHinkalCache({encryptedOutputs:o,lastOutput:c},e,n,r),a},m=async(e,t,n,r,i,a,o,s,c)=>{try{return await p(e,t,n,i)}catch{return f(e,t,n,r,i,a,o,s,c)}},h=e=>{if(Array.isArray(e))return e;if(e!==void 0)return[e]},g=async(e,t,n)=>await e.utxoUtils.batchFilterUtxosWithNullifier(t,n),_=(e,t,r,i,a,o,s)=>{for(e.sort((e,t)=>e.amount<=t.amount?1:-1);e.length<t||e.length>t&&e.length<6;)if(e.push(new n.Utxo({amount:0n,erc20TokenAddress:a,mintAddress:s,shieldedPrivateKey:i,tokenId:o})),r)for(;e.length>6;)e.splice(e.length-1)},v=async({hinkal:e,chainId:t,passedShieldedPublicKey:n=void 0,ethAddress:a=void 0,resetCacheBefore:o=!1,allowRemoteDecryption:s=!1,useBlockedUtxos:c=!1})=>{let l=a??await e.getEthereumAddress(),u=n??e.userKeys.getShieldedPublicKey(),{userKeys:d}=e,p=e.encryptedOutputsByChain[t],h=e.nullifiersByChain[t],_=Array.from(p);o&&i.resetCache(e,t,u);let{encryptedOutputs:v,lastOutput:y}=i.getHinkalCache(e,t,u);await r.checkAddressNotUpdated(e,l);let b=y!==``,x=_.findIndex(e=>e.value===y),S=x>-1,C=!b&&x===-1,w=e.areMerkleTreeUpdatesDisabled(),T=!w&&(S||!s&&C),E=!w&&s&&C,D=!T&&!E,O=[];T?O=await f(e,d,t,l,u,_,v,y,x):E?O=await m(e,d,t,l,u,_,v,y,x):D&&(O=await e.utxoUtils.buildBatchProcess(v,d,t)),await r.checkAddressNotUpdated(e,l);let k=await g(e,O,h);return{inputUtxos:c?k.filter(e=>e.isBlocked):k.filter(e=>!e.isBlocked)}},y=async({hinkal:t,chainId:n,passedShieldedPublicKey:r=void 0,ethAddress:i=void 0,resetCacheBefore:a=!1,allowRemoteDecryption:o=!1})=>{let s=i??await t.getEthereumAddressByChain(n),d=c.hashEthereumAddress(e.isTronLike(n)?u.addressToHexFormat(s):s),{inputUtxos:f}=await v({hinkal:t,chainId:n,passedShieldedPublicKey:r,ethAddress:s,resetCacheBefore:a,allowRemoteDecryption:o,useBlockedUtxos:!0});if(!f.length)return{inputUtxos:[]};let{indexes:p}=await l.getScheduledTransactionsNullifierIndexes({hashedEthereumAddress:d,nullifiers:f.map(e=>e.getNullifier())});return{inputUtxos:p.map(e=>f[e]).filter(e=>!!e)}},b=async({hinkal:n,tokenWithId:r,minInput:i=2,sliceIfMore6:s=!0,chainId:c,passedShieldedPrivateKey:l=void 0,passedShieldedPublicKey:u=void 0,ethAddress:d=void 0,resetCacheBefore:f=!1,ensuredTokensWithId:p,allowRemoteDecryption:m=!1,useBlockedUtxos:g=!1})=>{let b=l??n.userKeys.getShieldedPrivateKey(),{inputUtxos:x}=g?await y({hinkal:n,chainId:c,ethAddress:d,passedShieldedPrivateKey:l,resetCacheBefore:f,allowRemoteDecryption:m}):await v({hinkal:n,tokenWithId:r,minInput:i,sliceIfMore6:s,chainId:c,passedShieldedPrivateKey:l,passedShieldedPublicKey:u,ethAddress:d,resetCacheBefore:f,allowRemoteDecryption:m}),S=h(r),C=new Map;x.forEach(e=>{let n=e.getTokenAddress(c);if(S&&!S.some(r=>t.caseInsensitiveEqual(r.erc20TokenAddress,n)&&r.tokenId===e.tokenId))return;let r=a.encodeTokenWithId(c,{erc20TokenAddress:n,tokenId:e.tokenId}),i=C.get(r)??[];C.set(r,[...i,e])}),p?.forEach(e=>{let t=a.encodeTokenWithId(c,{erc20TokenAddress:e.erc20TokenAddress,tokenId:e.tokenId});C.set(t,C.get(t)??[])});for(let[t,n]of C){let r=t.split(`-`)[0],a=Number(t.split(`-`)[1]),l=e.isSolanaLike(c),u=l?r:void 0;_(n,i,s,b,l?o.formatMintAddress(r).compressedAddress.toLowerCase():r.toLowerCase(),a,u)}return C};exports.getInputUtxoAndBalance=v,exports.getInputUtxoAndBalanceOfStuckUtxos=y,exports.getInputUtxoAndBalancePerToken=b;
@@ -108,4 +108,4 @@ var h = new m(), g = async (e, t, n, r, a, o, c, l, u) => h.runExclusive(async (
108
108
  return b;
109
109
  };
110
110
  //#endregion
111
- export { v as attemptGetInputUtxosRemotely, S as getInputUtxoAndBalance, C as getInputUtxoAndBalanceOfStuckUtxos, w as getInputUtxoAndBalancePerToken, _ as getInputUtxosRemotely };
111
+ export { S as getInputUtxoAndBalance, C as getInputUtxoAndBalanceOfStuckUtxos, w as getInputUtxoAndBalancePerToken };
@@ -1 +1 @@
1
- const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../../error-handling/error-codes.constants.cjs`),r=require(`../etherFunctions.cjs`),i=require(`../../utils/erc20tokenFunctions.cjs`),a=require(`../../utils/caseInsensitive.utils.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`);require(`../../../error-handling/customErrors/index.cjs`);const c=require(`../../utils/encodeTokenWithId.cjs`),l=require(`../../utils/solanaMint.utils.cjs`),u=require(`./getInputUtxoAndBalance.cjs`),d=require(`../../../data-structures/TokenDBs/PrivateTokensDB.cjs`),f=require(`../../utils/mutexes.utils.cjs`);var p=async(t,n,r,o,s,c=!1,l,p=!1,m=!1)=>f.getChainBalanceFetchingMutex(n).runExclusive(async()=>{let{inputUtxos:f}=m?await u.getInputUtxoAndBalanceOfStuckUtxos({hinkal:t,chainId:n,ethAddress:s,passedShieldedPrivateKey:r,resetCacheBefore:c,allowRemoteDecryption:l}):await u.getInputUtxoAndBalance({hinkal:t,sliceIfMore6:!1,chainId:n,passedShieldedPrivateKey:r,passedShieldedPublicKey:o,ethAddress:s,resetCacheBefore:c,allowRemoteDecryption:l});p&&e.isExtension&&await d.privateTokensDB.fetchAndUpdatePrivateTokens(f.map(e=>e.getTokenAddress(n)).filter(e=>e!==void 0),n,s);let h=(e.isExtension?await d.privateTokensDB.getPrivateTokens(n,s):i.getErc20TokensForChain(n)).map(e=>({token:e,balance:f.reduce((t,r)=>{let i=e.erc20TokenAddress;return a.caseInsensitiveEqual(i,r.getTokenAddress(n))?t+r.amount:t},0n),timestamp:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress))[0]?.timeStamp,nfts:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress)&&t.tokenId!==0).map(e=>({tokenId:e.tokenId,timestamp:e.timeStamp}))})),g=new Map;return h.forEach(e=>{g.set(e.token.erc20TokenAddress.toLowerCase(),e)}),g}),m=async(e,a,d,f,p=6,m=d.map(()=>0),h=!1,g=!1)=>{let{userKeys:_}=e,v=[],y=[];if(d.length===0)return[];let b=await u.getInputUtxoAndBalancePerToken({hinkal:e,sliceIfMore6:!1,ensuredTokensWithId:d.map((e,t)=>({erc20TokenAddress:d[t],tokenId:m[t]})),allowRemoteDecryption:e.generateProofRemotely,useBlockedUtxos:g,chainId:a}),x=0;for(let e=0;e<d.length;e+=1)if(h===!1){let t=b.get(c.encodeTokenWithId(a,{erc20TokenAddress:d[e],tokenId:m[e]}))??[];if(!t)throw Error(`Missing utxos for token`);x=Math.max(t.length,x),y.push(t)}else y.push([]);return x===2?y:(y.forEach((e,c)=>{if(e.length>p){let t=e.slice(0,p),o=t.reduce((e,t)=>e+t.amount,0n);if(f[c]<0n&&o<-f[c]){let e=i.getERC20Token(d[c],a),t=e.decimals===18?6:2,l=Number(r.getAmountWithPrecision(o,e,t));throw new s.ErrorWithAmount(l,`${n.DIRECTLY_SHOW_MESSAGE_ERROR_CODES.UTXO_LIMITATIONS}. Please try again with ${l} ${e.symbol}, including gas fees.`)}v.push(t)}else if(e.length<=p){let n=[...e],r=p-e.length;for(;r>0;){--r;let e=t.isSolanaLike(a),i=e?d[c]:void 0,s=e?l.formatMintAddress(d[c]).compressedAddress:d[c];n.push(new o.Utxo({amount:0n,erc20TokenAddress:s,mintAddress:i,shieldedPrivateKey:_.getShieldedPrivateKey(),tokenId:m[c]}))}v.push(n)}}),v)};exports.addPaddingToUtxos=m,exports.getShieldedBalance=p;
1
+ const e=require(`../../../constants/vite.constants.cjs`),t=require(`../../../constants/chains.constants.cjs`),n=require(`../../../error-handling/error-codes.constants.cjs`),r=require(`../etherFunctions.cjs`),i=require(`../../utils/erc20tokenFunctions.cjs`),a=require(`../../utils/caseInsensitive.utils.cjs`),o=require(`../../../data-structures/utxo/Utxo.cjs`),s=require(`../../../error-handling/customErrors/ErrorWithAmount.cjs`),c=require(`../../utils/encodeTokenWithId.cjs`),l=require(`../../utils/solanaMint.utils.cjs`),u=require(`./getInputUtxoAndBalance.cjs`),d=require(`../../../data-structures/TokenDBs/PrivateTokensDB.cjs`),f=require(`../../utils/mutexes.utils.cjs`);var p=async(t,n,r,o,s,c=!1,l,p=!1,m=!1)=>f.getChainBalanceFetchingMutex(n).runExclusive(async()=>{let{inputUtxos:f}=m?await u.getInputUtxoAndBalanceOfStuckUtxos({hinkal:t,chainId:n,ethAddress:s,passedShieldedPrivateKey:r,resetCacheBefore:c,allowRemoteDecryption:l}):await u.getInputUtxoAndBalance({hinkal:t,sliceIfMore6:!1,chainId:n,passedShieldedPrivateKey:r,passedShieldedPublicKey:o,ethAddress:s,resetCacheBefore:c,allowRemoteDecryption:l});p&&e.isExtension&&await d.privateTokensDB.fetchAndUpdatePrivateTokens(f.map(e=>e.getTokenAddress(n)).filter(e=>e!==void 0),n,s);let h=(e.isExtension?await d.privateTokensDB.getPrivateTokens(n,s):i.getErc20TokensForChain(n)).map(e=>({token:e,balance:f.reduce((t,r)=>{let i=e.erc20TokenAddress;return a.caseInsensitiveEqual(i,r.getTokenAddress(n))?t+r.amount:t},0n),timestamp:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress))[0]?.timeStamp,nfts:f.filter(t=>a.caseInsensitiveEqual(t.getTokenAddress(n),e.erc20TokenAddress)&&t.tokenId!==0).map(e=>({tokenId:e.tokenId,timestamp:e.timeStamp}))})),g=new Map;return h.forEach(e=>{g.set(e.token.erc20TokenAddress.toLowerCase(),e)}),g}),m=async(e,a,d,f,p=6,m=d.map(()=>0),h=!1,g=!1)=>{let{userKeys:_}=e,v=[],y=[];if(d.length===0)return[];let b=await u.getInputUtxoAndBalancePerToken({hinkal:e,sliceIfMore6:!1,ensuredTokensWithId:d.map((e,t)=>({erc20TokenAddress:d[t],tokenId:m[t]})),allowRemoteDecryption:e.generateProofRemotely,useBlockedUtxos:g,chainId:a}),x=0;for(let e=0;e<d.length;e+=1)if(h===!1){let t=b.get(c.encodeTokenWithId(a,{erc20TokenAddress:d[e],tokenId:m[e]}))??[];if(!t)throw Error(`Missing utxos for token`);x=Math.max(t.length,x),y.push(t)}else y.push([]);return x===2?y:(y.forEach((e,c)=>{if(e.length>p){let t=e.slice(0,p),o=t.reduce((e,t)=>e+t.amount,0n);if(f[c]<0n&&o<-f[c]){let e=i.getERC20Token(d[c],a),t=e.decimals===18?6:2,l=Number(r.getAmountWithPrecision(o,e,t));throw new s.ErrorWithAmount(l,`${n.DIRECTLY_SHOW_MESSAGE_ERROR_CODES.UTXO_LIMITATIONS}. Please try again with ${l} ${e.symbol}, including gas fees.`)}v.push(t)}else if(e.length<=p){let n=[...e],r=p-e.length;for(;r>0;){--r;let e=t.isSolanaLike(a),i=e?d[c]:void 0,s=e?l.formatMintAddress(d[c]).compressedAddress:d[c];n.push(new o.Utxo({amount:0n,erc20TokenAddress:s,mintAddress:i,shieldedPrivateKey:_.getShieldedPrivateKey(),tokenId:m[c]}))}v.push(n)}}),v)};exports.addPaddingToUtxos=m,exports.getShieldedBalance=p;
@@ -6,7 +6,6 @@ import { getERC20Token as i, getErc20TokensForChain as a } from "../../utils/erc
6
6
  import { caseInsensitiveEqual as o } from "../../utils/caseInsensitive.utils.mjs";
7
7
  import { Utxo as s } from "../../../data-structures/utxo/Utxo.mjs";
8
8
  import { ErrorWithAmount as c } from "../../../error-handling/customErrors/ErrorWithAmount.mjs";
9
- import "../../../error-handling/customErrors/index.mjs";
10
9
  import { encodeTokenWithId as l } from "../../utils/encodeTokenWithId.mjs";
11
10
  import { formatMintAddress as u } from "../../utils/solanaMint.utils.mjs";
12
11
  import { getInputUtxoAndBalance as d, getInputUtxoAndBalanceOfStuckUtxos as f, getInputUtxoAndBalancePerToken as p } from "./getInputUtxoAndBalance.mjs";
@@ -1 +1 @@
1
- const e=require(`../utils/bytes32.utils.cjs`);require(`../utils/index.cjs`);var t=async(t,n)=>{let r=await t.account.merkle.fetch(n,`confirmed`),i=Number(e.convertBytes32ToBigInt(r.rootIndex));return e.convertBytes32ToBigInt(r.roots.at(i-1))};exports.fetchSolanaMerkleTreeRootHash=t;
1
+ const e=require(`../utils/bytes32.utils.cjs`);var t=async(t,n)=>{let r=await t.account.merkle.fetch(n,`confirmed`),i=Number(e.convertBytes32ToBigInt(r.rootIndex));return e.convertBytes32ToBigInt(r.roots.at(i-1))};exports.fetchSolanaMerkleTreeRootHash=t;
@@ -1,5 +1,4 @@
1
1
  import { convertBytes32ToBigInt as e } from "../utils/bytes32.utils.mjs";
2
- import "../utils/index.mjs";
3
2
  //#region libs/shared/common/src/functions/web3/fetchSolanaMerkleTreeRootHash.ts
4
3
  var t = async (t, n) => {
5
4
  let r = await t.account.merkle.fetch(n, "confirmed"), i = Number(e(r.rootIndex));
@@ -1 +1 @@
1
- require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../../types/ethereum-network.types.cjs`),n=require(`../../pre-transaction/solana.cjs`);require(`../../../types/index.cjs`);let r=require(`@solana/web3.js`);var i=async(e,n,r)=>{let i=r??e.userKeys.getAccessKey();return(await e.getContractWithFetcher(n,t.ContractType.AccessTokenContract).hasToken(i))[0]},a=async(t,i,a)=>{let o=a??t.userKeys.getAccessKey(),{hinkalIdl:s,originalDeployer:c}=e.networkRegistry[i].contractData;if(!s||!c)throw Error(`missing hinkal data`);let l=new r.PublicKey(c),u=t.getSolanaProgram(s),d=n.getAccessTokenAccountPublicKey(BigInt(o),u.programId,l);if(!await u.provider.connection.getAccountInfo(d))return!1;let{isAdded:f}=await u.account.accesskeyAccount.fetch(d);return f},o=async(t,n,r)=>e.isTronLike(n)?!0:e.isSolanaLike(n)?a(t,n,r):i(t,n,r);exports.checkHinkalAccessToken=o;
1
+ require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../constants/chains.constants.cjs`),t=require(`../../../types/ethereum-network.types.cjs`),n=require(`../../pre-transaction/solana.cjs`);let r=require(`@solana/web3.js`);var i=async(e,n,r)=>{let i=r??e.userKeys.getAccessKey();return(await e.getContractWithFetcher(n,t.ContractType.AccessTokenContract).hasToken(i))[0]},a=async(t,i,a)=>{let o=a??t.userKeys.getAccessKey(),{hinkalIdl:s,originalDeployer:c}=e.networkRegistry[i].contractData;if(!s||!c)throw Error(`missing hinkal data`);let l=new r.PublicKey(c),u=t.getSolanaProgram(s),d=n.getAccessTokenAccountPublicKey(BigInt(o),u.programId,l);if(!await u.provider.connection.getAccountInfo(d))return!1;let{isAdded:f}=await u.account.accesskeyAccount.fetch(d);return f},o=async(t,n,r)=>e.isTronLike(n)?!0:e.isSolanaLike(n)?a(t,n,r):i(t,n,r);exports.checkHinkalAccessToken=o;
@@ -1,7 +1,6 @@
1
1
  import { isSolanaLike as e, isTronLike as t, networkRegistry as n } from "../../../constants/chains.constants.mjs";
2
2
  import { ContractType as r } from "../../../types/ethereum-network.types.mjs";
3
3
  import { getAccessTokenAccountPublicKey as i } from "../../pre-transaction/solana.mjs";
4
- import "../../../types/index.mjs";
5
4
  import { PublicKey as a } from "@solana/web3.js";
6
5
  //#region libs/shared/common/src/functions/web3/functionCalls/accessTokenCalls.ts
7
6
  var o = async (e, t, n) => {
@@ -1 +1 @@
1
- const e=require(`../../../types/transactions.types.cjs`);require(`../../../types/index.cjs`);const t=require(`../../utils/time.utils.cjs`);var n=1*1e3,r=30*1e3,i=async(i,a,o=0)=>{if((await i.getTransactionReceipt(a))?.status!==e.TransactionReceiptStatus.Succeeded)return;o>0&&await i.waitForTransaction(a,o);let s=r/n,c=null;for(let e=0;e<s;e+=1){try{if(c=await i.getTransaction(a),c)break}catch{}e<s-1&&await t.waitLittle(n)}return c??void 0};exports.recoverTransactionFromError=i;
1
+ const e=require(`../../../types/transactions.types.cjs`),t=require(`../../utils/time.utils.cjs`);var n=1*1e3,r=30*1e3,i=async(i,a,o=0)=>{if((await i.getTransactionReceipt(a))?.status!==e.TransactionReceiptStatus.Succeeded)return;o>0&&await i.waitForTransaction(a,o);let s=r/n,c=null;for(let e=0;e<s;e+=1){try{if(c=await i.getTransaction(a),c)break}catch{}e<s-1&&await t.waitLittle(n)}return c??void 0};exports.recoverTransactionFromError=i;
@@ -1,5 +1,4 @@
1
1
  import { TransactionReceiptStatus as e } from "../../../types/transactions.types.mjs";
2
- import "../../../types/index.mjs";
3
2
  import { waitLittle as t } from "../../utils/time.utils.mjs";
4
3
  //#region libs/shared/common/src/functions/web3/functionCalls/recoverTransactionFromError.ts
5
4
  var n = 1 * 1e3, r = 30 * 1e3, i = async (i, a, o = 0) => {
@@ -1 +1 @@
1
- const e=require(`../../../error-handling/customErrors/ErrorWithTx.cjs`),t=require(`../../../constants/server.constants.cjs`),n=require(`../../../API/getServerURL.cjs`),r=require(`../../../data-structures/http/HttpClient.cjs`),i=require(`../../../API/callRelayer.cjs`),a=require(`../../snarkjs/common.snarkjs.cjs`);require(`../../../error-handling/index.cjs`),require(`../../snarkjs/index.cjs`);var o=t=>{if(t.status===`success`)return t.message;throw t.message&&t.error?new e.ErrorWithRelayerTransaction(t.error,t.message):Error(t.error)},s=async(e,t,n,r,s,c,l,u,d)=>{let f=a.serializeCircomData(r);return o(await i.callRelayerTransactAPI({chainId:e,a:t[0],b:t[1],c:t[2],dimData:n,circomData:f,withUniswapWorkAround:c,authorizationData:l,adminData:u,tronProofSignature:d,commitmentValidationData:s}))},c=async e=>o(await r.httpClient.post(`${n.RELAYER_URL}${t.RELAYER_CONFIG.SOLANA_TRANSACT}`,e)),l=e=>{if(e.status===`success`)return e.message.scheduleId;throw Error(e.error||`Batch transaction failed`)},u=async(e,t,n,r,o,s)=>{let c=t.map(e=>a.serializeCircomData(e.circomData));return l(await i.callRelayerTransactBatchAPI({chainId:e,transactions:t.map((t,n)=>({chainId:e,a:t.zkCallData[0],b:t.zkCallData[1],c:t.zkCallData[2],dimData:t.dimData,circomData:c[n],commitmentValidationData:t.commitmentValidationData,withUniswapWorkAround:t.withUniswapWorkAround,authorizationData:t.authorizationData,adminData:t.adminData,recipientAddress:t.recipientAddress,tronProofSignature:t.tronProofSignature})),txCompletionTime:r,hashedEthereumAddress:n,ref:o,hashedDashboardAccountId:s}))},d=async(e,t,n,r,a,o)=>l(await i.callRelayerSolanaTransactBatchAPI({chainId:e,transactions:t,hashedEthereumAddress:n,txCompletionTime:r,ref:a,hashedDashboardAccountId:o}));exports.solanaTransactCallRelayer=c,exports.solanaTransactCallRelayerBatch=d,exports.transactCallRelayer=s,exports.transactCallRelayerBatch=u;
1
+ const e=require(`../../../error-handling/customErrors/ErrorWithTx.cjs`),t=require(`../../../constants/server.constants.cjs`),n=require(`../../../API/getServerURL.cjs`),r=require(`../../../data-structures/http/HttpClient.cjs`),i=require(`../../../API/callRelayer.cjs`),a=require(`../../snarkjs/common.snarkjs.cjs`);var o=t=>{if(t.status===`success`)return t.message;throw t.message&&t.error?new e.ErrorWithRelayerTransaction(t.error,t.message):Error(t.error)},s=async(e,t,n,r,s,c,l,u,d)=>{let f=a.serializeCircomData(r);return o(await i.callRelayerTransactAPI({chainId:e,a:t[0],b:t[1],c:t[2],dimData:n,circomData:f,withUniswapWorkAround:c,authorizationData:l,adminData:u,tronProofSignature:d,commitmentValidationData:s}))},c=async e=>o(await r.httpClient.post(`${n.RELAYER_URL}${t.RELAYER_CONFIG.SOLANA_TRANSACT}`,e)),l=e=>{if(e.status===`success`)return e.message.scheduleId;throw Error(e.error||`Batch transaction failed`)},u=async(e,t,n,r,o,s)=>{let c=t.map(e=>a.serializeCircomData(e.circomData));return l(await i.callRelayerTransactBatchAPI({chainId:e,transactions:t.map((t,n)=>({chainId:e,a:t.zkCallData[0],b:t.zkCallData[1],c:t.zkCallData[2],dimData:t.dimData,circomData:c[n],commitmentValidationData:t.commitmentValidationData,withUniswapWorkAround:t.withUniswapWorkAround,authorizationData:t.authorizationData,adminData:t.adminData,recipientAddress:t.recipientAddress,tronProofSignature:t.tronProofSignature})),txCompletionTime:r,hashedEthereumAddress:n,ref:o,hashedDashboardAccountId:s}))},d=async(e,t,n,r,a,o)=>l(await i.callRelayerSolanaTransactBatchAPI({chainId:e,transactions:t,hashedEthereumAddress:n,txCompletionTime:r,ref:a,hashedDashboardAccountId:o}));exports.solanaTransactCallRelayer=c,exports.solanaTransactCallRelayerBatch=d,exports.transactCallRelayer=s,exports.transactCallRelayerBatch=u;
@@ -4,8 +4,6 @@ import { RELAYER_URL as n } from "../../../API/getServerURL.mjs";
4
4
  import { httpClient as r } from "../../../data-structures/http/HttpClient.mjs";
5
5
  import { callRelayerSolanaTransactBatchAPI as i, callRelayerTransactAPI as a, callRelayerTransactBatchAPI as o } from "../../../API/callRelayer.mjs";
6
6
  import { serializeCircomData as s } from "../../snarkjs/common.snarkjs.mjs";
7
- import "../../../error-handling/index.mjs";
8
- import "../../snarkjs/index.mjs";
9
7
  //#region libs/shared/common/src/functions/web3/functionCalls/transactCallRelayer.ts
10
8
  var c = (t) => {
11
9
  if (t.status === "success") return t.message;
@@ -1 +1 @@
1
- const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`);require(`../../data-structures/http/index.cjs`);const r=require(`../../error-handling/logger.cjs`),i=require(`../../types/fee.types.cjs`);var a=async(a,o=i.SolanaPriorityFeeMode.RECOMMENDED)=>{let s=a.map(e=>e.toBase58());try{let r=await n.httpClient.post(e.HELIUS_RPC_URL,{jsonrpc:`2.0`,id:`1`,method:`getPriorityFeeEstimate`,params:[{accountKeys:s,options:o===i.SolanaPriorityFeeMode.RECOMMENDED?{recommended:!0}:{includeAllPriorityFeeLevels:!0}}]}),a=o===i.SolanaPriorityFeeMode.RECOMMENDED?r.result?.priorityFeeEstimate:r.result?.priorityFeeLevels?.high;return Math.min(a??15e5,t.MAX_MICRO_LAMPORTS_PER_CU)}catch(e){return r.Logger.error(`Error getting solana priority fee:`,e),t.MAX_MICRO_LAMPORTS_PER_CU}};exports.getSolanaPriorityFee=a;
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../data-structures/http/HttpClient.cjs`),r=require(`../../error-handling/logger.cjs`),i=require(`../../types/fee.types.cjs`);var a=async(a,o=i.SolanaPriorityFeeMode.RECOMMENDED)=>{let s=a.map(e=>e.toBase58());try{let r=await n.httpClient.post(e.HELIUS_RPC_URL,{jsonrpc:`2.0`,id:`1`,method:`getPriorityFeeEstimate`,params:[{accountKeys:s,options:o===i.SolanaPriorityFeeMode.RECOMMENDED?{recommended:!0}:{includeAllPriorityFeeLevels:!0}}]}),a=o===i.SolanaPriorityFeeMode.RECOMMENDED?r.result?.priorityFeeEstimate:r.result?.priorityFeeLevels?.high;return Math.min(a??15e5,t.MAX_MICRO_LAMPORTS_PER_CU)}catch(e){return r.Logger.error(`Error getting solana priority fee:`,e),t.MAX_MICRO_LAMPORTS_PER_CU}};exports.getSolanaPriorityFee=a;
@@ -1,7 +1,6 @@
1
1
  import { HELIUS_RPC_URL as e } from "../../constants/chains.constants.mjs";
2
2
  import { MAX_MICRO_LAMPORTS_PER_CU as t } from "../../constants/protocol.constants.mjs";
3
3
  import { httpClient as n } from "../../data-structures/http/HttpClient.mjs";
4
- import "../../data-structures/http/index.mjs";
5
4
  import { Logger as r } from "../../error-handling/logger.mjs";
6
5
  import { SolanaPriorityFeeMode as i } from "../../types/fee.types.mjs";
7
6
  //#region libs/shared/common/src/functions/web3/getSolanaPriorityFee.ts
@@ -1 +1 @@
1
- const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOdosAPI.cjs`);require(`../../error-handling/index.cjs`),require(`../../constants/index.cjs`);var a=async(a,o,s,c,l=.7)=>{try{let{odosResponse:n,status:u}=await i.callOdosAPI(a,{chainId:a===31337?e.localhostNetwork:a,inputTokens:[{tokenAddress:o?.wrappedErc20TokenAddress??o.erc20TokenAddress,amount:r.getAmountInWei(o,c).toString()}],outputTokens:[{tokenAddress:s?.wrappedErc20TokenAddress??s.erc20TokenAddress,proportion:1}],userAddr:e.networkRegistry[a].contractData.odosExternalActionInstanceAddress||t.zeroAddress,slippageLimitPercent:l,disableRFQs:!0});if(u!==`success`)throw Error(`Odos API Fetch Error`);return{outSwapAmountValue:BigInt(n.outputTokens[0].amount),odosDataValue:n.transaction.data}}catch(e){throw console.log({error:e}),Error(n.transactionErrorCodes.NO_ODOS_PRICE)}};exports.getOdosPrice=a;
1
+ const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOdosAPI.cjs`);var a=async(a,o,s,c,l=.7)=>{try{let{odosResponse:n,status:u}=await i.callOdosAPI(a,{chainId:a===31337?e.localhostNetwork:a,inputTokens:[{tokenAddress:o?.wrappedErc20TokenAddress??o.erc20TokenAddress,amount:r.getAmountInWei(o,c).toString()}],outputTokens:[{tokenAddress:s?.wrappedErc20TokenAddress??s.erc20TokenAddress,proportion:1}],userAddr:e.networkRegistry[a].contractData.odosExternalActionInstanceAddress||t.zeroAddress,slippageLimitPercent:l,disableRFQs:!0});if(u!==`success`)throw Error(`Odos API Fetch Error`);return{outSwapAmountValue:BigInt(n.outputTokens[0].amount),odosDataValue:n.transaction.data}}catch(e){throw console.log({error:e}),Error(n.transactionErrorCodes.NO_ODOS_PRICE)}};exports.getOdosPrice=a;
@@ -3,8 +3,6 @@ import { zeroAddress as n } from "../../constants/protocol.constants.mjs";
3
3
  import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
4
4
  import { getAmountInWei as i } from "./etherFunctions.mjs";
5
5
  import { callOdosAPI as a } from "../../API/callOdosAPI.mjs";
6
- import "../../error-handling/index.mjs";
7
- import "../../constants/index.mjs";
8
6
  //#region libs/shared/common/src/functions/web3/odosAPI.ts
9
7
  var o = async (o, s, c, l, u = .7) => {
10
8
  try {
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../pre-transaction/solana.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOkxAPI.cjs`);let a=require(`@solana/web3.js`);var o=(e,t,n,r,i=.7)=>({amount:`${n}`,chainIndex:`501`,fromTokenAddress:e.toString(),toTokenAddress:t.toString(),userWalletAddress:r,slippagePercent:`${i}`,directRoute:!0}),s=async(s,c,l,u,d=.5,f,p)=>{if(!t.isSolanaLike(s))throw Error(`OKX is only supported on Solana`);let m=r.randomBigInt(31),h=r.getAmountInWei(c,u),{hinkalAddress:g,originalDeployer:_}=t.networkRegistry[s].contractData;if(!_)throw Error(`No original deployer configured for Solana program`);if(p&&!f)throw Error(`Proxy wallet address is required`);let v=new a.PublicKey(g),y=new a.PublicKey(_),b=p&&f?new a.PublicKey(f):n.getSwapperAccountPublicKeyFromSalt(v,y,m),{okxResponse:x,status:S}=await i.callOkxAPI({quote:o(new a.PublicKey(c.erc20TokenAddress),new a.PublicKey(l.erc20TokenAddress),h,b.toString(),d)});if(S!==`success`)throw Error(`OKX API Fetch Error`);if(x.code!==`0`)throw Error(`OKX API error: ${x.msg}`);return{outSwapAmountValue:BigInt(x.data.routerResult.toTokenAmount),okxDataValue:e.safeJsonStringify({...x,swapperAccountSalt:m.toString()})}};exports.createOKXQuote=o,exports.getOKXPrice=s;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/serialize.utils.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../pre-transaction/solana.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../API/callOkxAPI.cjs`);let a=require(`@solana/web3.js`);var o=(e,t,n,r,i=.7)=>({amount:`${n}`,chainIndex:`501`,fromTokenAddress:e.toString(),toTokenAddress:t.toString(),userWalletAddress:r,slippagePercent:`${i}`,directRoute:!0}),s=async(s,c,l,u,d=.5,f,p)=>{if(!t.isSolanaLike(s))throw Error(`OKX is only supported on Solana`);let m=r.randomBigInt(31),h=r.getAmountInWei(c,u),{hinkalAddress:g,originalDeployer:_}=t.networkRegistry[s].contractData;if(!_)throw Error(`No original deployer configured for Solana program`);if(p&&!f)throw Error(`Proxy wallet address is required`);let v=new a.PublicKey(g),y=new a.PublicKey(_),b=p&&f?new a.PublicKey(f):n.getSwapperAccountPublicKeyFromSalt(v,y,m),{okxResponse:x,status:S}=await i.callOkxAPI({quote:o(new a.PublicKey(c.erc20TokenAddress),new a.PublicKey(l.erc20TokenAddress),h,b.toString(),d)});if(S!==`success`)throw Error(`OKX API Fetch Error`);if(x.code!==`0`)throw Error(`OKX API error: ${x.msg}`);return{outSwapAmountValue:BigInt(x.data.routerResult.toTokenAmount),okxDataValue:e.safeJsonStringify({...x,swapperAccountSalt:m.toString()})}};exports.getOKXPrice=s;
@@ -30,4 +30,4 @@ var c = (e, t, n, r, i = .7) => ({
30
30
  };
31
31
  };
32
32
  //#endregion
33
- export { c as createOKXQuote, l as getOKXPrice };
33
+ export { l as getOKXPrice };
@@ -1 +1 @@
1
- const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`);require(`../../types/index.cjs`);const n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../error-handling/logger.cjs`);require(`../../error-handling/index.cjs`),require(`../../constants/index.cjs`);const a=require(`./getContractMetadata.cjs`),o=require(`../../API/callOneInchAPI.cjs`);var s=async(s,c,l,u,d=.7)=>{try{let n=await o.callOneInchAPI(s,{fromTokenAddress:c.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:c.erc20TokenAddress,toTokenAddress:l.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:l.erc20TokenAddress,fromAddress:e.zeroAddress,destReceiver:a.getContractMetadata(t.ContractType.OneInchExternalActionContract,s).address,amount:r.getAmountInWei(c,u),slippage:d,disableEstimate:!0,allowPartialFill:!1});if(!n||!n.tx)throw Error(`OneInch API price fetch error`);return{outSwapAmountValue:BigInt(n.toAmount),oneInchDataValue:n.tx.data}}catch(e){throw i.Logger.log({error:e}),Error(n.transactionErrorCodes.NO_ONEINCH_PRICE)}};exports.getOneInchPrice=s;
1
+ const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../types/ethereum-network.types.cjs`),n=require(`../../error-handling/error-codes.constants.cjs`),r=require(`./etherFunctions.cjs`),i=require(`../../error-handling/logger.cjs`),a=require(`./getContractMetadata.cjs`),o=require(`../../API/callOneInchAPI.cjs`);var s=async(s,c,l,u,d=.7)=>{try{let n=await o.callOneInchAPI(s,{fromTokenAddress:c.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:c.erc20TokenAddress,toTokenAddress:l.erc20TokenAddress===e.zeroAddress?e.oneInchZeroAddress:l.erc20TokenAddress,fromAddress:e.zeroAddress,destReceiver:a.getContractMetadata(t.ContractType.OneInchExternalActionContract,s).address,amount:r.getAmountInWei(c,u),slippage:d,disableEstimate:!0,allowPartialFill:!1});if(!n||!n.tx)throw Error(`OneInch API price fetch error`);return{outSwapAmountValue:BigInt(n.toAmount),oneInchDataValue:n.tx.data}}catch(e){throw i.Logger.log({error:e}),Error(n.transactionErrorCodes.NO_ONEINCH_PRICE)}};exports.getOneInchPrice=s;
@@ -1,11 +1,8 @@
1
1
  import { oneInchZeroAddress as e, zeroAddress as t } from "../../constants/protocol.constants.mjs";
2
2
  import { ContractType as n } from "../../types/ethereum-network.types.mjs";
3
- import "../../types/index.mjs";
4
3
  import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
5
4
  import { getAmountInWei as i } from "./etherFunctions.mjs";
6
5
  import { Logger as a } from "../../error-handling/logger.mjs";
7
- import "../../error-handling/index.mjs";
8
- import "../../constants/index.mjs";
9
6
  import { getContractMetadata as o } from "./getContractMetadata.mjs";
10
7
  import { callOneInchAPI as s } from "../../API/callOneInchAPI.mjs";
11
8
  //#region libs/shared/common/src/functions/web3/oneInchAPI.ts
@@ -1 +1 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`);require(`../../types/index.cjs`);const r=require(`../../error-handling/error-codes.constants.cjs`),i=require(`./etherFunctions.cjs`),a=require(`../../error-handling/logError.cjs`);require(`../../error-handling/index.cjs`),require(`../../constants/index.cjs`);let o=require(`ethers`);var s=async(e,n,i,a)=>{let o=(await Promise.all([100,500,3e3,1e4].map(async e=>({poolAddress:await n.getPool(i,a,e),fee:e})))).filter(({poolAddress:e})=>e!==t.zeroAddress),s=await Promise.all(o.map(async t=>({poolAddress:t.poolAddress,fee:t.fee,token1Balance:await e.balanceOf(t.poolAddress)}))),c=s.map(e=>e.token1Balance).reduce((e,t)=>t>=e?t:e,0n);if(c===0n)throw Error(r.transactionErrorCodes.UNISWAP_NOT_ENOUGH_LIQUIDITY);return s.find(e=>e.token1Balance===c)},c=async(t,r,i,o,s,c)=>{try{if(!e.networkRegistry[r].quoterV2Address)throw Error(`No Quoter Contract Provided`);return(await t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3QuoterContract,e.networkRegistry[r].quoterV2Address).quoteExactInputSingle.staticCall({tokenIn:i.wrappedErc20TokenAddress??i.erc20TokenAddress,tokenOut:o.wrappedErc20TokenAddress??o.erc20TokenAddress,fee:s,amountIn:c,sqrtPriceLimitX96:0})).amountOut}catch(e){throw a.logError(e),e}},l=async(t,r,i,a)=>{try{let o=t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3FactoryContract,e.networkRegistry[r].uniswapV3FactoryAddress),{fee:c}=await s(t.getContractWithFetcherByChainId(r,n.ContractType.ERC20Contract,a.wrappedErc20TokenAddress??a.erc20TokenAddress),o,i.wrappedErc20TokenAddress??i.erc20TokenAddress,a.wrappedErc20TokenAddress??a.erc20TokenAddress);return c}catch(e){throw console.log(`Error in getUniswapFee`,e),e}},u=async(e,t,n,a,s)=>{try{let r=await l(e,t,a,s),u=o.ethers.AbiCoder.defaultAbiCoder().encode([`uint24`],[r]);return{tokenPrice:await c(e,t,a,s,r,i.getAmountInWei(a,n)),poolFee:u}}catch{throw Error(r.transactionErrorCodes.NO_UNISWAP_PRICE)}};exports.getUniswapFee=l,exports.getUniswapPrice=u,exports.getUniswapPriceHelper=c,exports.searchPoolAndFee=s;
1
+ require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/chains.constants.cjs`),t=require(`../../constants/protocol.constants.cjs`),n=require(`../../types/ethereum-network.types.cjs`),r=require(`../../error-handling/error-codes.constants.cjs`),i=require(`./etherFunctions.cjs`),a=require(`../../error-handling/logError.cjs`);let o=require(`ethers`);var s=async(e,n,i,a)=>{let o=(await Promise.all([100,500,3e3,1e4].map(async e=>({poolAddress:await n.getPool(i,a,e),fee:e})))).filter(({poolAddress:e})=>e!==t.zeroAddress),s=await Promise.all(o.map(async t=>({poolAddress:t.poolAddress,fee:t.fee,token1Balance:await e.balanceOf(t.poolAddress)}))),c=s.map(e=>e.token1Balance).reduce((e,t)=>t>=e?t:e,0n);if(c===0n)throw Error(r.transactionErrorCodes.UNISWAP_NOT_ENOUGH_LIQUIDITY);return s.find(e=>e.token1Balance===c)},c=async(t,r,i,o,s,c)=>{try{if(!e.networkRegistry[r].quoterV2Address)throw Error(`No Quoter Contract Provided`);return(await t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3QuoterContract,e.networkRegistry[r].quoterV2Address).quoteExactInputSingle.staticCall({tokenIn:i.wrappedErc20TokenAddress??i.erc20TokenAddress,tokenOut:o.wrappedErc20TokenAddress??o.erc20TokenAddress,fee:s,amountIn:c,sqrtPriceLimitX96:0})).amountOut}catch(e){throw a.logError(e),e}},l=async(t,r,i,a)=>{try{let o=t.getContractWithFetcherByChainId(r,n.ContractType.UniswapV3FactoryContract,e.networkRegistry[r].uniswapV3FactoryAddress),{fee:c}=await s(t.getContractWithFetcherByChainId(r,n.ContractType.ERC20Contract,a.wrappedErc20TokenAddress??a.erc20TokenAddress),o,i.wrappedErc20TokenAddress??i.erc20TokenAddress,a.wrappedErc20TokenAddress??a.erc20TokenAddress);return c}catch(e){throw console.log(`Error in getUniswapFee`,e),e}},u=async(e,t,n,a,s)=>{try{let r=await l(e,t,a,s),u=o.ethers.AbiCoder.defaultAbiCoder().encode([`uint24`],[r]);return{tokenPrice:await c(e,t,a,s,r,i.getAmountInWei(a,n)),poolFee:u}}catch{throw Error(r.transactionErrorCodes.NO_UNISWAP_PRICE)}};exports.getUniswapPrice=u;
@@ -1,12 +1,9 @@
1
1
  import { networkRegistry as e } from "../../constants/chains.constants.mjs";
2
2
  import { zeroAddress as t } from "../../constants/protocol.constants.mjs";
3
3
  import { ContractType as n } from "../../types/ethereum-network.types.mjs";
4
- import "../../types/index.mjs";
5
4
  import { transactionErrorCodes as r } from "../../error-handling/error-codes.constants.mjs";
6
5
  import { getAmountInWei as i } from "./etherFunctions.mjs";
7
6
  import { logError as a } from "../../error-handling/logError.mjs";
8
- import "../../error-handling/index.mjs";
9
- import "../../constants/index.mjs";
10
7
  import { ethers as o } from "ethers";
11
8
  //#region libs/shared/common/src/functions/web3/uniswapAPI.ts
12
9
  var s = async (e, n, i, a) => {
@@ -57,4 +54,4 @@ var s = async (e, n, i, a) => {
57
54
  }
58
55
  };
59
56
  //#endregion
60
- export { l as getUniswapFee, u as getUniswapPrice, c as getUniswapPriceHelper, s as searchPoolAndFee };
57
+ export { u as getUniswapPrice };