@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,168 +0,0 @@
1
- import { ALCHEMY_API_KEY as e, chainIds as t, isSolanaLike as n, networkRegistry as r } from "../../constants/chains.constants.mjs";
2
- import { SOLANA_NFT_INTERFACES as i, TokenType as a, solanaNativeAddress as o, zeroAddress as s } from "../../constants/protocol.constants.mjs";
3
- import { StorageKeys as c } from "../../types/cache.types.mjs";
4
- import { overlayTokenWithRegistryData as l } from "../../functions/utils/erc20tokenFunctions.mjs";
5
- import { caseInsensitiveEqual as u, lowerCaseIncludes as d } from "../../functions/utils/caseInsensitive.utils.mjs";
6
- import { httpClient as f } from "../http/HttpClient.mjs";
7
- import "../http/index.mjs";
8
- import { API as p } from "../../API/API.mjs";
9
- import { Logger as m } from "../../error-handling/logger.mjs";
10
- import { getStateKey as h } from "../../functions/utils/string.utils.mjs";
11
- import { tokenVisibilityStorage as g } from "./token-visibility-db.mjs";
12
- import { createCustomSolanaConnection as _ } from "../../functions/utils/create-provider.mjs";
13
- import { getPublicBalanceByTokenAddress as v } from "../../functions/utils/publicBalance.utils.mjs";
14
- import { PublicKey as y } from "@solana/web3.js";
15
- import { get as b, update as x } from "idb-keyval";
16
- import { TOKEN_2022_PROGRAM_ID as S, TOKEN_PROGRAM_ID as C } from "@solana/spl-token";
17
- var w = new class {
18
- fetchedTokens = {};
19
- ALCHEMY_URLS = {
20
- [t.ethMainnet]: "eth-mainnet",
21
- [t.polygon]: "polygon-mainnet",
22
- [t.arbMainnet]: "arb-mainnet",
23
- [t.optimism]: "opt-mainnet",
24
- [t.base]: "base-mainnet",
25
- [t.solanaMainnet]: "solana-mainnet"
26
- };
27
- KNOWN_GOOD_NFTS = {
28
- [t.base]: ["0x20bc8d248fe9c18a947406cea50d716828ab821f"],
29
- [t.optimism]: ["0x3c3e0e73b53a19bcaf4178b8f9c9428fd2a2775e"]
30
- };
31
- isWhitelistedNFT(e, t) {
32
- return this.KNOWN_GOOD_NFTS[t] ? this.KNOWN_GOOD_NFTS[t].some((t) => u(e, t)) : !1;
33
- }
34
- async getPublicTokens(e, t) {
35
- let n = h(t, e);
36
- return ((await b(c.ALCHEMY_PUBLIC_TOKENS))?.[n] || []).map((t) => l(t, e));
37
- }
38
- getFetchedTokens(e, t) {
39
- let n = h(t, e);
40
- return (this.fetchedTokens[n] || []).map((t) => l(t, e));
41
- }
42
- fetchAndUpdatePublicTokens(e, t) {
43
- return n(t) ? this.fetchAndUpdateSolanaTokens(e, t) : this.fetchAndUpdateEVMTokens(e, t);
44
- }
45
- async fetchAndUpdateSolanaTokens(e, t) {
46
- let n = h(e, t), [r, i] = await Promise.all([this.getSolanaTokenAddresses(t, e), this.getNFTAddresses(t, e)]), a = Array.from(new Set([...r, ...i]));
47
- if (!a.length) return;
48
- let o = (await p.tokensInfoCall(t, a)).filter((e) => !!e), s = await g.hideSpamsAndFetchHiddenTokensAddresses(t, o), l = o.filter((e) => !d(s, e.erc20TokenAddress));
49
- await x(c.ALCHEMY_PUBLIC_TOKENS, (e = {}) => {
50
- let t = {
51
- ...e,
52
- [n]: l
53
- };
54
- return this.fetchedTokens = t, t;
55
- });
56
- }
57
- async getWalletTokenAddresses(e, t) {
58
- return n(e) ? this.getSolanaTokenAddresses(e, t) : this.getEVMTokenAddresses(e, t);
59
- }
60
- async fetchAndUpdateEVMTokens(e, t) {
61
- let n = h(e, t), r = await this.getEVMTokenAddresses(t, e), i = await this.getNFTTokens(t, e), o = i.map((e) => e.contractAddress), s = [...r, ...o];
62
- if (!s.length) return;
63
- let l = (await p.tokensInfoCall(t, s)).map((e, n) => {
64
- if (e) return e;
65
- let r = s[n], o = i.find((e) => u(e.contractAddress, r));
66
- return o && o.tokenIds && o.tokenIds.length > 0 && this.isWhitelistedNFT(r, t) ? {
67
- chainId: t,
68
- name: "Unknown NFT",
69
- symbol: "NFT",
70
- erc20TokenAddress: r,
71
- decimals: 0,
72
- nftTokenType: a.ERC721,
73
- tokenIds: o.tokenIds
74
- } : null;
75
- }).filter((e) => !!e), f = await g.hideSpamsAndFetchHiddenTokensAddresses(t, l), m = l.filter((e) => !d(f, e.erc20TokenAddress)).map((e) => ({
76
- ...e,
77
- tokenIds: i.find((t) => u(t.contractAddress, e.erc20TokenAddress))?.tokenIds
78
- }));
79
- await x(c.ALCHEMY_PUBLIC_TOKENS, (e = {}) => {
80
- let t = {
81
- ...e,
82
- [n]: m
83
- };
84
- return this.fetchedTokens = t, t;
85
- });
86
- }
87
- async getSolanaTokenAddresses(e, t) {
88
- let { fetchRpcUrl: n } = r[e];
89
- if (!n) throw Error("RPC URL not found for the specified chain ID");
90
- let i = _(n), a = await i.getBalance(new y(t)), [s, c] = await Promise.all([i.getParsedTokenAccountsByOwner(new y(t), { programId: C }), i.getParsedTokenAccountsByOwner(new y(t), { programId: S })]), l = [...s.value, ...c.value].filter((e) => {
91
- let { amount: t } = e.account.data.parsed.info.tokenAmount;
92
- return BigInt(t) > 0n;
93
- }).map((e) => e.account.data.parsed.info.mint);
94
- return a > 0 && l.unshift(o), Array.from(new Set(l));
95
- }
96
- async getNFTAddresses(e, t) {
97
- let { fetchRpcUrl: n } = r[e];
98
- if (!n) throw Error("RPC URL not found for the specified chain ID");
99
- try {
100
- let e = [], r = 1;
101
- do {
102
- let { items: a = [], page: o } = (await f.post(n, {
103
- jsonrpc: "2.0",
104
- id: 1,
105
- method: "getAssetsByOwner",
106
- params: {
107
- ownerAddress: t,
108
- page: r,
109
- limit: 1e3,
110
- displayOptions: {
111
- showFungible: !1,
112
- showCollectionMetadata: !0
113
- }
114
- }
115
- })).result || {}, s = a.filter((e) => e.interface && i.includes(e.interface)).map((e) => e.id);
116
- e.push(...s), r = o && o > r ? o : 0;
117
- } while (r > 0);
118
- return e;
119
- } catch (e) {
120
- return m.error("Failed to fetch NFTs from DAS API", e), [];
121
- }
122
- }
123
- async getEVMTokenAddresses(t, n) {
124
- let r = await v(t, n, s), i = `https://${this.ALCHEMY_URLS[t]}.g.alchemy.com/v2/${e}`, a = [], o;
125
- do {
126
- let e = [n, "erc20"];
127
- o && e.push({ pageKey: o });
128
- let { result: t } = await f.post(i, {
129
- jsonrpc: "2.0",
130
- id: 1,
131
- method: "alchemy_getTokenBalances",
132
- params: e
133
- });
134
- a.push(...t?.tokenBalances ?? []), o = t?.pageKey;
135
- } while (o);
136
- r && r > 0n && a.push({
137
- contractAddress: s,
138
- tokenBalance: r.toString()
139
- });
140
- let c = {};
141
- return a.forEach((e) => {
142
- (!c[e.contractAddress] || BigInt(e.tokenBalance) > 0n) && (c[e.contractAddress] = e);
143
- }), Object.keys(c);
144
- }
145
- async getNFTTokens(t, n) {
146
- let r = `https://${this.ALCHEMY_URLS[t]}.g.alchemy.com/nft/v3/${e}/getNFTsForOwner`, i = [], a;
147
- do {
148
- let e = new URLSearchParams({
149
- owner: n,
150
- withMetadata: "false",
151
- pageSize: "100"
152
- });
153
- a && e.append("pageKey", a);
154
- let { ownedNfts: t = [], pageKey: o } = await f.get(`${r}?${e.toString()}`);
155
- i.push(...t), a = o;
156
- } while (a);
157
- let o = i.filter(({ contractAddress: e, tokenId: t }) => e && t).reduce((e, { contractAddress: t, tokenId: n }) => {
158
- let r = t.toLowerCase();
159
- return e.has(r) || e.set(r, []), e.get(r)?.push(n), e;
160
- }, /* @__PURE__ */ new Map());
161
- return Array.from(o.entries()).map(([e, t]) => ({
162
- contractAddress: e,
163
- tokenIds: t
164
- }));
165
- }
166
- }();
167
- //#endregion
168
- export { w as alchemyPublicTokensDB };
@@ -1 +0,0 @@
1
- const e=require(`../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../constants/chains.constants.cjs`),n=require(`../../constants/protocol.constants.cjs`),r=require(`../../types/ethereum-network.types.cjs`),i=require(`../../types/cache.types.cjs`),a=require(`../../functions/utils/caseInsensitive.utils.cjs`),o=require(`../../API/API.cjs`),s=require(`../../error-handling/logger.cjs`),c=require(`../../functions/utils/string.utils.cjs`),l=require(`./token-visibility-db.cjs`),u=require(`../../functions/web3/getContractMetadata.cjs`);let d=require(`idb-keyval`),f=require(`axios`);f=e.__toESM(f);var p=class{API_BASE=`https://testnet.arcscan.app/api`;fetchedTokens={};async getPublicTokens(e){let n=c.getStateKey(e,t.chainIds.arcTestnet);return(await(0,d.get)(i.StorageKeys.ARC_PUBLIC_TOKENS))?.[n]||[]}getFetchedTokens(e){let n=c.getStateKey(e,t.chainIds.arcTestnet);return this.fetchedTokens[n]||[]}async fetchAndUpdatePublicTokens(e){let r=c.getStateKey(e,t.chainIds.arcTestnet),s=await this.getERC20TokenAddresses(e),u=await this.getNFTTokens(e),f=u.map(e=>e.contractAddress),p=[...s,...f];if(!p.length)return;let m=(await o.API.tokensInfoCall(t.chainIds.arcTestnet,p)).map((e,r)=>{if(e)return e;let i=p[r],o=u.find(e=>a.caseInsensitiveEqual(e.contractAddress,i));return o&&o.tokenIds&&o.tokenIds.length>0?{chainId:t.chainIds.arcTestnet,name:`Unknown NFT`,symbol:`NFT`,erc20TokenAddress:i,decimals:0,nftTokenType:n.TokenType.ERC721,tokenIds:o.tokenIds}:null}).filter(e=>!!e),h=await l.tokenVisibilityStorage.hideSpamsAndFetchHiddenTokensAddresses(t.chainIds.arcTestnet,m),g=m.filter(e=>!a.lowerCaseIncludes(h,e.erc20TokenAddress)).map(e=>({...e,tokenIds:u.find(t=>a.caseInsensitiveEqual(t.contractAddress,e.erc20TokenAddress))?.tokenIds}));await(0,d.update)(i.StorageKeys.ARC_PUBLIC_TOKENS,(e={})=>{let t={...e,[r]:g};return this.fetchedTokens=t,t})}async getERC20TokenAddresses(e){let n=[];try{let i=(await f.default.post(`${this.API_BASE}?module=account&action=tokentx&address=${e}`)).data;if(i.status===`1`&&i.result){let a=[...new Set(i.result.map(({contractAddress:e})=>e))];for(let i of a)try{let a=u.getContractWithFetcherByChainId(t.chainIds.arcTestnet,r.ContractType.ERC20Contract,i),o=BigInt(await a.balanceOf(e));o>0n&&n.push({contractAddress:i,tokenBalance:o.toString()})}catch(e){s.Logger.error(`Error fetching ARC testnet token balance:`,e)}}}catch(e){s.Logger.error(`Error fetching ARC testnet token transactions:`,e)}return n.filter(({tokenBalance:e})=>Number(e)!==0).map(({contractAddress:e})=>e)}async getNFTTokens(e){let t=`${this.API_BASE}/v2/addresses/${e}/nft?type=ERC-721,ERC-1155`,n=[],r;do{let e=r?`&${new URLSearchParams(r)}`:``,{data:i}=await f.default.get(`${t}${e}`),{items:a=[],next_page_params:o}=i;n.push(...a),r=o?{token_contract_address_hash:o.token_contract_address_hash,token_id:o.token_id,token_type:o.token_type}:void 0}while(r);let i=n.reduce((e,t)=>{let n=t.token.address_hash.toLowerCase(),r=t.id;return e.has(n)||e.set(n,[]),e.get(n)?.push(r),e},new Map);return Array.from(i.entries()).map(([e,t])=>({contractAddress:e,tokenIds:t}))}},m=new p;exports.ArcPublicTokensDB=p,exports.arcPublicTokensDB=m;
@@ -1,94 +0,0 @@
1
- import { chainIds as e } from "../../constants/chains.constants.mjs";
2
- import { TokenType as t } from "../../constants/protocol.constants.mjs";
3
- import { ContractType as n } from "../../types/ethereum-network.types.mjs";
4
- import { StorageKeys as r } from "../../types/cache.types.mjs";
5
- import { caseInsensitiveEqual as i, lowerCaseIncludes as a } from "../../functions/utils/caseInsensitive.utils.mjs";
6
- import { API as o } from "../../API/API.mjs";
7
- import { Logger as s } from "../../error-handling/logger.mjs";
8
- import { getStateKey as c } from "../../functions/utils/string.utils.mjs";
9
- import { tokenVisibilityStorage as l } from "./token-visibility-db.mjs";
10
- import { getContractWithFetcherByChainId as u } from "../../functions/web3/getContractMetadata.mjs";
11
- import { get as d, update as f } from "idb-keyval";
12
- import p from "axios";
13
- //#region libs/shared/common/src/data-structures/TokenDBs/ArcPublicTokensDB.ts
14
- var m = class {
15
- API_BASE = "https://testnet.arcscan.app/api";
16
- fetchedTokens = {};
17
- async getPublicTokens(t) {
18
- let n = c(t, e.arcTestnet);
19
- return (await d(r.ARC_PUBLIC_TOKENS))?.[n] || [];
20
- }
21
- getFetchedTokens(t) {
22
- let n = c(t, e.arcTestnet);
23
- return this.fetchedTokens[n] || [];
24
- }
25
- async fetchAndUpdatePublicTokens(n) {
26
- let s = c(n, e.arcTestnet), u = await this.getERC20TokenAddresses(n), d = await this.getNFTTokens(n), p = d.map((e) => e.contractAddress), m = [...u, ...p];
27
- if (!m.length) return;
28
- let h = (await o.tokensInfoCall(e.arcTestnet, m)).map((n, r) => {
29
- if (n) return n;
30
- let a = m[r], o = d.find((e) => i(e.contractAddress, a));
31
- return o && o.tokenIds && o.tokenIds.length > 0 ? {
32
- chainId: e.arcTestnet,
33
- name: "Unknown NFT",
34
- symbol: "NFT",
35
- erc20TokenAddress: a,
36
- decimals: 0,
37
- nftTokenType: t.ERC721,
38
- tokenIds: o.tokenIds
39
- } : null;
40
- }).filter((e) => !!e), g = await l.hideSpamsAndFetchHiddenTokensAddresses(e.arcTestnet, h), _ = h.filter((e) => !a(g, e.erc20TokenAddress)).map((e) => ({
41
- ...e,
42
- tokenIds: d.find((t) => i(t.contractAddress, e.erc20TokenAddress))?.tokenIds
43
- }));
44
- await f(r.ARC_PUBLIC_TOKENS, (e = {}) => {
45
- let t = {
46
- ...e,
47
- [s]: _
48
- };
49
- return this.fetchedTokens = t, t;
50
- });
51
- }
52
- async getERC20TokenAddresses(t) {
53
- let r = [];
54
- try {
55
- let i = (await p.post(`${this.API_BASE}?module=account&action=tokentx&address=${t}`)).data;
56
- if (i.status === "1" && i.result) {
57
- let a = [...new Set(i.result.map(({ contractAddress: e }) => e))];
58
- for (let i of a) try {
59
- let a = u(e.arcTestnet, n.ERC20Contract, i), o = BigInt(await a.balanceOf(t));
60
- o > 0n && r.push({
61
- contractAddress: i,
62
- tokenBalance: o.toString()
63
- });
64
- } catch (e) {
65
- s.error("Error fetching ARC testnet token balance:", e);
66
- }
67
- }
68
- } catch (e) {
69
- s.error("Error fetching ARC testnet token transactions:", e);
70
- }
71
- return r.filter(({ tokenBalance: e }) => Number(e) !== 0).map(({ contractAddress: e }) => e);
72
- }
73
- async getNFTTokens(e) {
74
- let t = `${this.API_BASE}/v2/addresses/${e}/nft?type=ERC-721,ERC-1155`, n = [], r;
75
- do {
76
- let e = r ? `&${new URLSearchParams(r)}` : "", { data: i } = await p.get(`${t}${e}`), { items: a = [], next_page_params: o } = i;
77
- n.push(...a), r = o ? {
78
- token_contract_address_hash: o.token_contract_address_hash,
79
- token_id: o.token_id,
80
- token_type: o.token_type
81
- } : void 0;
82
- } while (r);
83
- let i = n.reduce((e, t) => {
84
- let n = t.token.address_hash.toLowerCase(), r = t.id;
85
- return e.has(n) || e.set(n, []), e.get(n)?.push(r), e;
86
- }, /* @__PURE__ */ new Map());
87
- return Array.from(i.entries()).map(([e, t]) => ({
88
- contractAddress: e,
89
- tokenIds: t
90
- }));
91
- }
92
- }, h = new m();
93
- //#endregion
94
- export { m as ArcPublicTokensDB, h as arcPublicTokensDB };
@@ -1 +0,0 @@
1
- require(`../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../types/cache.types.cjs`),n=require(`../../functions/utils/erc20tokenFunctions.cjs`),r=require(`../../functions/utils/caseInsensitive.utils.cjs`),i=require(`../../API/API.cjs`),a=require(`../../error-handling/logger.cjs`),o=require(`../../functions/utils/string.utils.cjs`),s=require(`./token-visibility-db.cjs`),c=require(`../../functions/utils/create-provider.cjs`),l=require(`../../constants/events.constants.cjs`);require(`../../constants/index.cjs`),require(`../../functions/index.cjs`);let u=require(`ethers`),d=require(`idb-keyval`),f=require(`async-mutex`);var p=new class{fetchedTokens={};updateMutexes={};transferEventTopic=u.ethers.id(`Transfer(address,address,uint256)`);chunkSize=2e3;getMutex(e){return this.updateMutexes[e]||(this.updateMutexes[e]=new f.Mutex),this.updateMutexes[e]}withRegistryOverlay(e,t){let r=n.getERC20Token(e.erc20TokenAddress,t);return r?{...e,name:r.name,symbol:r.symbol,logoURI:r.logoURI,decimals:r.decimals}:e}async getPublicTokens(e,r){let i=o.getStateKey(r,e);return((await(0,d.get)(t.StorageKeys.EVENTS_PUBLIC_TOKENS))?.[i]||[]).map(t=>n.overlayTokenWithRegistryData(t,e))}getFetchedTokens(e,t){let r=o.getStateKey(t,e);return(this.fetchedTokens[r]||[]).map(t=>n.overlayTokenWithRegistryData(t,e))}async fetchAndUpdatePublicTokens(e,n){let i=o.getStateKey(e,n);await this.getMutex(i).runExclusive(async()=>{try{let a=(await this.getPublicTokens(n,e)).map(e=>e.erc20TokenAddress),{toEvents:o,fromEvents:c,latestBlock:l}=await this.getEvents(e,n),u=[...o,...c],{erc20Tokens:f}=await this.fetchPublicTokens(u,n,a),p=await s.tokenVisibilityStorage.hideSpamsAndFetchHiddenTokensAddresses(n,f),m=f.filter(e=>!r.lowerCaseIncludes(p,e.erc20TokenAddress));await(0,d.update)(t.StorageKeys.EVENTS_PUBLIC_TOKENS,(e={})=>{let t=e[i]||[],n=t.map(e=>e.erc20TokenAddress),a=m.filter(e=>!r.lowerCaseIncludes(n,e.erc20TokenAddress));t.push(...a);let s=this.updateTokenIds(c,o,t),l={...e,[i]:s};return this.fetchedTokens=l,l}),l&&await this.updateLastProcessedBlock(n,e,l)}catch(e){a.Logger.error(`public tokens db error`,e)}})}async getLastProcessedBlock(e,n){return(await(0,d.get)(t.StorageKeys.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS)||{})[o.getStateKey(n,e)]||l.EVENTS_INITIAL_BLOCKS[e]}async updateLastProcessedBlock(e,n,r){await(0,d.update)(t.StorageKeys.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS,(t={})=>{let i=o.getStateKey(n,e);return{...t,[i]:r}})}async getEvents(e,t){try{let n=c.createJsonRpcProvider(t),r=await this.getLastProcessedBlock(t,e)+1,i=await n.getBlockNumber(),a=u.ethers.zeroPadValue(e.toLowerCase(),32),o=[],s=[];for(let e=r;e<=i;e+=this.chunkSize){let t=Math.min(e+this.chunkSize-1,i),r={topics:[this.transferEventTopic,null,a],fromBlock:e,toBlock:t},c={topics:[this.transferEventTopic,a,null],fromBlock:e,toBlock:t},[l,u]=await Promise.all([n.getLogs(r),n.getLogs(c)]);o.push(...l),s.push(...u)}return{toEvents:o,fromEvents:s,latestBlock:i}}catch(n){return a.Logger.error(`Error fetching events:`,n,`chainId`,t,`walletAddress`,e),{toEvents:[],fromEvents:[],latestBlock:void 0}}}updateTokenIds(e,t,r){let i=new Map;return r.forEach(e=>{if(n.isNFTToken(e)&&e.tokenIds){let t=e.erc20TokenAddress.toLowerCase();i.set(t,[...e.tokenIds])}}),t.forEach(e=>{if(e.topics.length<=3)return;let t=e.address.toLowerCase(),n=BigInt(e.topics[3]).toString();i.has(t)||i.set(t,[]),i.get(t)?.push(n)}),e.forEach(e=>{if(e.topics.length<=3)return;let t=e.address.toLowerCase(),n=i.get(t);if(n?.length){let t=BigInt(e.topics[3]).toString(),r=n.indexOf(t);r!==-1&&n.splice(r,1)}}),r.forEach(e=>{if(n.isNFTToken(e)){let t=e.erc20TokenAddress.toLowerCase(),n=i.get(t);e.tokenIds=n?.length&&n.length>0?n:void 0}}),r}async fetchPublicTokens(t,n,o){try{let a=[e.zeroAddress,...new Set(t.map(e=>e.address))].filter(e=>e&&!r.lowerCaseIncludes(o,e));return a.length?{erc20Tokens:(await i.API.tokensInfoCall(n,a)).filter(e=>!!e)}:{erc20Tokens:[]}}catch(e){return a.Logger.error(`Error fetching public tokens:`,e),{erc20Tokens:[]}}}};exports.eventsPublicTokensDB=p;
@@ -1,144 +0,0 @@
1
- import { zeroAddress as e } from "../../constants/protocol.constants.mjs";
2
- import { StorageKeys as t } from "../../types/cache.types.mjs";
3
- import { getERC20Token as n, isNFTToken as r, overlayTokenWithRegistryData as i } from "../../functions/utils/erc20tokenFunctions.mjs";
4
- import { lowerCaseIncludes as a } from "../../functions/utils/caseInsensitive.utils.mjs";
5
- import { API as o } from "../../API/API.mjs";
6
- import { Logger as s } from "../../error-handling/logger.mjs";
7
- import { getStateKey as c } from "../../functions/utils/string.utils.mjs";
8
- import { tokenVisibilityStorage as l } from "./token-visibility-db.mjs";
9
- import { createJsonRpcProvider as u } from "../../functions/utils/create-provider.mjs";
10
- import { EVENTS_INITIAL_BLOCKS as d } from "../../constants/events.constants.mjs";
11
- import "../../constants/index.mjs";
12
- import "../../functions/index.mjs";
13
- import { ethers as f } from "ethers";
14
- import { get as p, update as m } from "idb-keyval";
15
- import { Mutex as h } from "async-mutex";
16
- var g = new class {
17
- fetchedTokens = {};
18
- updateMutexes = {};
19
- transferEventTopic = f.id("Transfer(address,address,uint256)");
20
- chunkSize = 2e3;
21
- getMutex(e) {
22
- return this.updateMutexes[e] || (this.updateMutexes[e] = new h()), this.updateMutexes[e];
23
- }
24
- withRegistryOverlay(e, t) {
25
- let r = n(e.erc20TokenAddress, t);
26
- return r ? {
27
- ...e,
28
- name: r.name,
29
- symbol: r.symbol,
30
- logoURI: r.logoURI,
31
- decimals: r.decimals
32
- } : e;
33
- }
34
- async getPublicTokens(e, n) {
35
- let r = c(n, e);
36
- return ((await p(t.EVENTS_PUBLIC_TOKENS))?.[r] || []).map((t) => i(t, e));
37
- }
38
- getFetchedTokens(e, t) {
39
- let n = c(t, e);
40
- return (this.fetchedTokens[n] || []).map((t) => i(t, e));
41
- }
42
- async fetchAndUpdatePublicTokens(e, n) {
43
- let r = c(e, n);
44
- await this.getMutex(r).runExclusive(async () => {
45
- try {
46
- let i = (await this.getPublicTokens(n, e)).map((e) => e.erc20TokenAddress), { toEvents: o, fromEvents: s, latestBlock: c } = await this.getEvents(e, n), u = [...o, ...s], { erc20Tokens: d } = await this.fetchPublicTokens(u, n, i), f = await l.hideSpamsAndFetchHiddenTokensAddresses(n, d), p = d.filter((e) => !a(f, e.erc20TokenAddress));
47
- await m(t.EVENTS_PUBLIC_TOKENS, (e = {}) => {
48
- let t = e[r] || [], n = t.map((e) => e.erc20TokenAddress), i = p.filter((e) => !a(n, e.erc20TokenAddress));
49
- t.push(...i);
50
- let c = this.updateTokenIds(s, o, t), l = {
51
- ...e,
52
- [r]: c
53
- };
54
- return this.fetchedTokens = l, l;
55
- }), c && await this.updateLastProcessedBlock(n, e, c);
56
- } catch (e) {
57
- s.error("public tokens db error", e);
58
- }
59
- });
60
- }
61
- async getLastProcessedBlock(e, n) {
62
- return (await p(t.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS) || {})[c(n, e)] || d[e];
63
- }
64
- async updateLastProcessedBlock(e, n, r) {
65
- await m(t.PUBLIC_TOKENS_LAST_PROCESSED_BLOCKS, (t = {}) => {
66
- let i = c(n, e);
67
- return {
68
- ...t,
69
- [i]: r
70
- };
71
- });
72
- }
73
- async getEvents(e, t) {
74
- try {
75
- let n = u(t), r = await this.getLastProcessedBlock(t, e) + 1, i = await n.getBlockNumber(), a = f.zeroPadValue(e.toLowerCase(), 32), o = [], s = [];
76
- for (let e = r; e <= i; e += this.chunkSize) {
77
- let t = Math.min(e + this.chunkSize - 1, i), r = {
78
- topics: [
79
- this.transferEventTopic,
80
- null,
81
- a
82
- ],
83
- fromBlock: e,
84
- toBlock: t
85
- }, c = {
86
- topics: [
87
- this.transferEventTopic,
88
- a,
89
- null
90
- ],
91
- fromBlock: e,
92
- toBlock: t
93
- }, [l, u] = await Promise.all([n.getLogs(r), n.getLogs(c)]);
94
- o.push(...l), s.push(...u);
95
- }
96
- return {
97
- toEvents: o,
98
- fromEvents: s,
99
- latestBlock: i
100
- };
101
- } catch (n) {
102
- return s.error("Error fetching events:", n, "chainId", t, "walletAddress", e), {
103
- toEvents: [],
104
- fromEvents: [],
105
- latestBlock: void 0
106
- };
107
- }
108
- }
109
- updateTokenIds(e, t, n) {
110
- let i = /* @__PURE__ */ new Map();
111
- return n.forEach((e) => {
112
- if (r(e) && e.tokenIds) {
113
- let t = e.erc20TokenAddress.toLowerCase();
114
- i.set(t, [...e.tokenIds]);
115
- }
116
- }), t.forEach((e) => {
117
- if (e.topics.length <= 3) return;
118
- let t = e.address.toLowerCase(), n = BigInt(e.topics[3]).toString();
119
- i.has(t) || i.set(t, []), i.get(t)?.push(n);
120
- }), e.forEach((e) => {
121
- if (e.topics.length <= 3) return;
122
- let t = e.address.toLowerCase(), n = i.get(t);
123
- if (n?.length) {
124
- let t = BigInt(e.topics[3]).toString(), r = n.indexOf(t);
125
- r !== -1 && n.splice(r, 1);
126
- }
127
- }), n.forEach((e) => {
128
- if (r(e)) {
129
- let t = e.erc20TokenAddress.toLowerCase(), n = i.get(t);
130
- e.tokenIds = n?.length && n.length > 0 ? n : void 0;
131
- }
132
- }), n;
133
- }
134
- async fetchPublicTokens(t, n, r) {
135
- try {
136
- let i = [e, ...new Set(t.map((e) => e.address))].filter((e) => e && !a(r, e));
137
- return i.length ? { erc20Tokens: (await o.tokensInfoCall(n, i)).filter((e) => !!e) } : { erc20Tokens: [] };
138
- } catch (e) {
139
- return s.error("Error fetching public tokens:", e), { erc20Tokens: [] };
140
- }
141
- }
142
- }();
143
- //#endregion
144
- export { g as eventsPublicTokensDB };
@@ -1 +0,0 @@
1
- const e=require(`../../constants/chains.constants.cjs`),t=require(`../../functions/utils/string.utils.cjs`),n=require(`./AlchemyPublicTokensDB.cjs`),r=require(`./EventsPublicTokensDB.cjs`),i=require(`./ArcPublicTokensDB.cjs`);var a=class{useAlternativeDB={};async getPublicTokens(a,o){let s=t.getStateKey(o,a);return a===e.chainIds.arcTestnet?i.arcPublicTokensDB.getPublicTokens(o):this.useAlternativeDB[s]?r.eventsPublicTokensDB.getPublicTokens(a,o):n.alchemyPublicTokensDB.getPublicTokens(a,o)}getFetchedTokens(a,o){let s=t.getStateKey(o,a);return a===e.chainIds.arcTestnet?i.arcPublicTokensDB.getFetchedTokens(o):this.useAlternativeDB[s]?r.eventsPublicTokensDB.getFetchedTokens(a,o):n.alchemyPublicTokensDB.getFetchedTokens(a,o)}async fetchAndUpdatePublicTokens(a,o){let s=t.getStateKey(a,o);try{o===e.chainIds.arcTestnet?await i.arcPublicTokensDB.fetchAndUpdatePublicTokens(a):(await n.alchemyPublicTokensDB.fetchAndUpdatePublicTokens(a,o),this.useAlternativeDB[s]=!1)}catch{if(e.isSolanaLike(o))return;await r.eventsPublicTokensDB.fetchAndUpdatePublicTokens(a,o),this.useAlternativeDB[s]=!0}}};new a,exports.PublicTokensDB=a;
@@ -1,29 +0,0 @@
1
- import { chainIds as e, isSolanaLike as t } from "../../constants/chains.constants.mjs";
2
- import { getStateKey as n } from "../../functions/utils/string.utils.mjs";
3
- import { alchemyPublicTokensDB as r } from "./AlchemyPublicTokensDB.mjs";
4
- import { eventsPublicTokensDB as i } from "./EventsPublicTokensDB.mjs";
5
- import { arcPublicTokensDB as a } from "./ArcPublicTokensDB.mjs";
6
- //#region libs/shared/common/src/data-structures/TokenDBs/PublicTokensDB.ts
7
- var o = class {
8
- useAlternativeDB = {};
9
- async getPublicTokens(t, o) {
10
- let s = n(o, t);
11
- return t === e.arcTestnet ? a.getPublicTokens(o) : this.useAlternativeDB[s] ? i.getPublicTokens(t, o) : r.getPublicTokens(t, o);
12
- }
13
- getFetchedTokens(t, o) {
14
- let s = n(o, t);
15
- return t === e.arcTestnet ? a.getFetchedTokens(o) : this.useAlternativeDB[s] ? i.getFetchedTokens(t, o) : r.getFetchedTokens(t, o);
16
- }
17
- async fetchAndUpdatePublicTokens(o, s) {
18
- let c = n(o, s);
19
- try {
20
- s === e.arcTestnet ? await a.fetchAndUpdatePublicTokens(o) : (await r.fetchAndUpdatePublicTokens(o, s), this.useAlternativeDB[c] = !1);
21
- } catch {
22
- if (t(s)) return;
23
- await i.fetchAndUpdatePublicTokens(o, s), this.useAlternativeDB[c] = !0;
24
- }
25
- }
26
- };
27
- new o();
28
- //#endregion
29
- export { o as PublicTokensDB };
@@ -1 +0,0 @@
1
- require(`./token-visibility-db.cjs`),require(`./PrivateTokensDB.cjs`),require(`./ArcPublicTokensDB.cjs`),require(`./PublicTokensDB.cjs`);
@@ -1,4 +0,0 @@
1
- import "./token-visibility-db.mjs";
2
- import "./PrivateTokensDB.mjs";
3
- import "./ArcPublicTokensDB.mjs";
4
- import "./PublicTokensDB.mjs";
@@ -1 +0,0 @@
1
- require(`./FileCacheDevice.cjs`),require(`./LocalStorageCacheDevice.cjs`);
@@ -1,2 +0,0 @@
1
- import "./FileCacheDevice.mjs";
2
- import "./LocalStorageCacheDevice.mjs";
@@ -1 +0,0 @@
1
- require(`./keyUtils.cjs`),require(`./keys.cjs`),require(`./encryptDecryptUtxo.cjs`),require(`./decodeUTXO.cjs`);
@@ -1,4 +0,0 @@
1
- import "./keyUtils.mjs";
2
- import "./keys.mjs";
3
- import "./encryptDecryptUtxo.mjs";
4
- import "./decodeUTXO.mjs";
@@ -1 +0,0 @@
1
- require(`./BlockchainEventEmitter.cjs`);
@@ -1 +0,0 @@
1
- import "./BlockchainEventEmitter.mjs";
@@ -1 +0,0 @@
1
- require(`./evm/AbstractEventService.cjs`),require(`./evm/AbstractSnapshotService.cjs`),require(`./evm/AbstractAccessTokenSnapshotService.cjs`),require(`./evm/AbstractCommitmentsSnapshotService.cjs`),require(`./evm/AbstractNullifierSnapshotService.cjs`),require(`./evm/BlockchainEventEmitter.cjs`),require(`./evm/PollingBlockchainEventEmitter.cjs`),require(`./evm/ClientBlockchainEventEmitter.cjs`),require(`./solana/SolanaBlockchainEventEmitter.cjs`),require(`./solana/ClientSolanaBlockchainEventEmitter.cjs`),require(`./solana/PollingSolanaBlockchainEventEmitter.cjs`),require(`./solana/AbstractSolanaEventService.cjs`),require(`./solana/AbstractSolanaSnapshotService.cjs`),require(`./solana/AbstractSolanaNullifierSnapshotService.cjs`),require(`./solana/AbstractSolanaCommitmentsSnapshotService.cjs`),require(`./solana/AbstractSolanaAccessTokenSnapshotService.cjs`);
@@ -1,16 +0,0 @@
1
- import "./evm/AbstractEventService.mjs";
2
- import "./evm/AbstractSnapshotService.mjs";
3
- import "./evm/AbstractAccessTokenSnapshotService.mjs";
4
- import "./evm/AbstractCommitmentsSnapshotService.mjs";
5
- import "./evm/AbstractNullifierSnapshotService.mjs";
6
- import "./evm/BlockchainEventEmitter.mjs";
7
- import "./evm/PollingBlockchainEventEmitter.mjs";
8
- import "./evm/ClientBlockchainEventEmitter.mjs";
9
- import "./solana/SolanaBlockchainEventEmitter.mjs";
10
- import "./solana/ClientSolanaBlockchainEventEmitter.mjs";
11
- import "./solana/PollingSolanaBlockchainEventEmitter.mjs";
12
- import "./solana/AbstractSolanaEventService.mjs";
13
- import "./solana/AbstractSolanaSnapshotService.mjs";
14
- import "./solana/AbstractSolanaNullifierSnapshotService.mjs";
15
- import "./solana/AbstractSolanaCommitmentsSnapshotService.mjs";
16
- import "./solana/AbstractSolanaAccessTokenSnapshotService.mjs";
@@ -1 +0,0 @@
1
- require(`./SolanaBlockchainEventEmitter.cjs`);
@@ -1 +0,0 @@
1
- import "./SolanaBlockchainEventEmitter.mjs";
@@ -1 +0,0 @@
1
- require(`./BasicHttpClient.cjs`),require(`./HttpClient.cjs`);
@@ -1,2 +0,0 @@
1
- import "./BasicHttpClient.mjs";
2
- import "./HttpClient.mjs";
@@ -1 +0,0 @@
1
- require(`./MerkleTreeIncompleteError.cjs`),require(`./MerkleTree.cjs`),require(`./getPatchedAccessTokenMerkleTree.cjs`);
@@ -1,3 +0,0 @@
1
- import "./MerkleTreeIncompleteError.mjs";
2
- import "./MerkleTree.mjs";
3
- import "./getPatchedAccessTokenMerkleTree.mjs";
@@ -1 +0,0 @@
1
- require(`./SnapshotFetcherService.cjs`),require(`./solana-snapshots/ClientSolanaCommitmentsSnapshotService.cjs`),require(`./solana-snapshots/ClientSolanaNullifierSnapshotService.cjs`),require(`./solana-snapshots/ClientSolanaAccessTokenSnapshotService.cjs`),require(`./evm-snapshots/ClientAccessTokenSnapshotService.cjs`),require(`./evm-snapshots/ClientCommitmentsSnapshotService.cjs`),require(`./evm-snapshots/ClientNullifierSnapshotService.cjs`);
@@ -1,7 +0,0 @@
1
- import "./SnapshotFetcherService.mjs";
2
- import "./solana-snapshots/ClientSolanaCommitmentsSnapshotService.mjs";
3
- import "./solana-snapshots/ClientSolanaNullifierSnapshotService.mjs";
4
- import "./solana-snapshots/ClientSolanaAccessTokenSnapshotService.mjs";
5
- import "./evm-snapshots/ClientAccessTokenSnapshotService.mjs";
6
- import "./evm-snapshots/ClientCommitmentsSnapshotService.mjs";
7
- import "./evm-snapshots/ClientNullifierSnapshotService.mjs";
@@ -1 +0,0 @@
1
- require(`./ErrorWithAmount.cjs`),require(`./FeeOverTransactionValueError.cjs`),require(`./customErrors.helpers.cjs`),require(`./ErrorWithTx.cjs`);
@@ -1,4 +0,0 @@
1
- import "./ErrorWithAmount.mjs";
2
- import "./FeeOverTransactionValueError.mjs";
3
- import "./customErrors.helpers.mjs";
4
- import "./ErrorWithTx.mjs";
@@ -1 +0,0 @@
1
- require(`./error-codes.constants.cjs`),require(`./customErrors/ErrorWithAmount.cjs`),require(`./customErrors/FeeOverTransactionValueError.cjs`),require(`./types.cjs`),require(`./customErrors/customErrors.helpers.cjs`),require(`./customErrors/ErrorWithTx.cjs`),require(`./customErrors/index.cjs`),require(`./logError.cjs`),require(`./logger.cjs`),require(`./get-error.message.cjs`);
@@ -1,10 +0,0 @@
1
- import "./error-codes.constants.mjs";
2
- import "./customErrors/ErrorWithAmount.mjs";
3
- import "./customErrors/FeeOverTransactionValueError.mjs";
4
- import "./types.mjs";
5
- import "./customErrors/customErrors.helpers.mjs";
6
- import "./customErrors/ErrorWithTx.mjs";
7
- import "./customErrors/index.mjs";
8
- import "./logError.mjs";
9
- import "./logger.mjs";
10
- import "./get-error.message.mjs";
@@ -1 +0,0 @@
1
- require(`./get-tokens-to-deposit-back.cjs`),require(`./get-gas-token-records.cjs`),require(`./select-gas-token.cjs`),require(`./update-hinkal.cjs`);
@@ -1,4 +0,0 @@
1
- import "./get-tokens-to-deposit-back.mjs";
2
- import "./get-gas-token-records.mjs";
3
- import "./select-gas-token.mjs";
4
- import "./update-hinkal.mjs";
@@ -1 +0,0 @@
1
- require(`./utils/serialize.utils.cjs`),require(`./utils/amounts.utils.cjs`),require(`./pre-transaction/solana.cjs`),require(`./web3/functionCalls/accessTokenCalls.cjs`),require(`./web3/etherFunctions.cjs`),require(`./utils/erc20tokenFunctions.cjs`),require(`./utils/caseInsensitive.utils.cjs`),require(`./utils/time.utils.cjs`),require(`./utils/upToDateState.cjs`),require(`./utils/getContractAddress.cjs`),require(`./utils/cacheFunctions.cjs`),require(`./utils/encryptInputForEnclave.cjs`),require(`./utils/solanaMint.utils.cjs`),require(`./utils/addresses.cjs`),require(`./utils/tron.utils.cjs`),require(`./web3/events/getInputUtxoAndBalance.cjs`),require(`./utils/get-signature-header.cjs`),require(`./utils/auth.utils.cjs`),require(`./utils/string.utils.cjs`),require(`./utils/token-check.utils.cjs`),require(`./utils/mutexes.utils.cjs`),require(`./web3/events/getShieldedBalance.cjs`),require(`./pre-transaction/outputUtxoProcessing.cjs`),require(`./utils/external-action.utils.cjs`),require(`./snarkjs/common.snarkjs.cjs`),require(`./snarkjs/generateZkProof.cjs`),require(`./utils/fees.utils.cjs`),require(`./utils/create-provider.cjs`),require(`./utils/resolve-sync.utils.cjs`),require(`./pre-transaction/process-gas-estimates.cjs`),require(`./pre-transaction/getFlatFees.cjs`),require(`./pre-transaction/getVolatileTransferAmount.cjs`),require(`./pre-transaction/constructAdminData.cjs`),require(`./pre-transaction/convert-okx-instructions.cjs`),require(`./web3/getSolanaPriorityFee.cjs`),require(`./utils/process.utils.cjs`),require(`./pre-transaction/sendV0Transaction.cjs`),require(`./utils/bytes32.utils.cjs`),require(`./pre-transaction/recipientUtxoProcessing.cjs`),require(`./pre-transaction/ensureAmountChanges.cjs`),require(`./pre-transaction/getFeeStructure.cjs`),require(`./pre-transaction/getKycAndSignatureData.cjs`),require(`./pre-transaction/waitForDepositedUtxosInMerkleTree.cjs`),require(`./pre-transaction/buildCommitmentValidationData.cjs`),require(`./pre-transaction/index.cjs`),require(`./kyc/openDefaultPassportWindow.cjs`),require(`./utils/reloadPage.cjs`),require(`./utils/cacheDevice.utils.cjs`),require(`./utils/involves-permit2-op.cjs`),require(`./utils/convertEmporiumOpToCallInfo.cjs`),require(`./utils/getRecipientInfoFromUserKeys.cjs`),require(`./utils/publicBalance.utils.cjs`),require(`./utils/postToOffscreen.cjs`),require(`./utils/getUtxosFromReceipt.utils.cjs`),require(`./utils/getUtxosFromReceiptSolana.cjs`),require(`./utils/tx-confirmation.utils.cjs`),require(`./utils/tronSimulation.utils.cjs`),require(`./utils/getSignerFromContract.cjs`),require(`./web3/events/balanceChangedHandler.cjs`),require(`./utils/index.cjs`),require(`./snarkjs/fetchOnChainRootHashes.cjs`),require(`./snarkjs/constructGeneralZkProof.cjs`),require(`./private-wallet/emporium.helpers.cjs`),require(`./snarkjs/constructEmporiumProof.cjs`),require(`./snarkjs/constructSolanaZkProof.cjs`),require(`./snarkjs/index.cjs`),require(`./web3/uniswapAPI.cjs`),require(`./web3/odosAPI.cjs`),require(`./web3/oneInchAPI.cjs`),require(`./web3/lifiAPI.cjs`),require(`./web3/okxAPI.cjs`),require(`./web3/signAndSendSerializedTransaction.cjs`),require(`./web3/index.cjs`),require(`./kyc/checkTokenLimitsUSD.cjs`),require(`./kyc/index.cjs`),require(`./private-wallet/emporium.swap.helpers.cjs`),require(`./private-wallet/index.cjs`),require(`./auto-deposit-back-helpers/get-tokens-to-deposit-back.cjs`),require(`./auto-deposit-back-helpers/get-gas-token-records.cjs`),require(`./auto-deposit-back-helpers/select-gas-token.cjs`),require(`./auto-deposit-back-helpers/update-hinkal.cjs`),require(`./auto-deposit-back-helpers/index.cjs`);