@hinkal/common 0.2.13 → 0.2.15

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 (664) hide show
  1. package/API/API.cjs +1 -1
  2. package/API/API.d.ts +10 -3
  3. package/API/API.mjs +42 -31
  4. package/API/ai-calls.cjs +1 -0
  5. package/API/ai-calls.d.ts +9 -0
  6. package/API/ai-calls.mjs +13 -0
  7. package/API/callCurveAPI.cjs +1 -1
  8. package/API/callCurveAPI.mjs +28 -22
  9. package/API/callRelayer.d.ts +3 -2
  10. package/API/dataServerCalls.cjs +1 -1
  11. package/API/dataServerCalls.d.ts +4 -0
  12. package/API/dataServerCalls.mjs +11 -7
  13. package/API/duneAPI.cjs +1 -1
  14. package/API/duneAPI.mjs +7 -4
  15. package/API/fetchCommitmentsCache.cjs +1 -1
  16. package/API/fetchCommitmentsCache.d.ts +9 -1
  17. package/API/fetchCommitmentsCache.mjs +6 -5
  18. package/API/getGasEstimates.cjs +1 -1
  19. package/API/getGasEstimates.d.ts +2 -1
  20. package/API/getGasEstimates.mjs +10 -9
  21. package/API/getRelayerURL.cjs +1 -1
  22. package/API/getRelayerURL.mjs +4 -4
  23. package/API/getServerURL.cjs +1 -1
  24. package/API/getServerURL.d.ts +1 -1
  25. package/API/getServerURL.mjs +14 -12
  26. package/API/index.d.ts +2 -0
  27. package/API/is-tx-stateless.cjs +1 -0
  28. package/API/is-tx-stateless.d.ts +3 -0
  29. package/API/is-tx-stateless.mjs +9 -0
  30. package/API/rewardsPointsCalls.cjs +1 -1
  31. package/API/rewardsPointsCalls.d.ts +3 -3
  32. package/API/rewardsPointsCalls.mjs +1 -3
  33. package/API/tenderly.api.cjs +1 -0
  34. package/API/tenderly.api.d.ts +14 -0
  35. package/API/tenderly.api.mjs +55 -0
  36. package/API/token-calls.cjs +1 -0
  37. package/API/token-calls.d.ts +2 -0
  38. package/API/token-calls.mjs +9 -0
  39. package/API/userVerifyTransactions.cjs +1 -1
  40. package/API/userVerifyTransactions.d.ts +6 -7
  41. package/API/userVerifyTransactions.mjs +13 -14
  42. package/constants/addresses.constants.cjs +1 -0
  43. package/constants/addresses.constants.d.ts +16 -0
  44. package/constants/addresses.constants.mjs +50 -0
  45. package/constants/assets.constants.cjs +1 -1
  46. package/constants/assets.constants.mjs +13 -13
  47. package/constants/axelar.constants.cjs +1 -1
  48. package/constants/axelar.constants.mjs +11 -11
  49. package/constants/balance.constants.cjs +1 -0
  50. package/constants/balance.constants.d.ts +1 -0
  51. package/constants/balance.constants.mjs +4 -0
  52. package/constants/chains.constants.cjs +1 -1
  53. package/constants/chains.constants.d.ts +2 -2
  54. package/constants/chains.constants.mjs +32 -35
  55. package/constants/contracts.constants.cjs +1 -1
  56. package/constants/contracts.constants.mjs +144 -140
  57. package/constants/conversion.constants.cjs +1 -0
  58. package/constants/conversion.constants.d.ts +1 -0
  59. package/constants/conversion.constants.mjs +4 -0
  60. package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
  61. package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +10115 -3422
  62. package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
  63. package/constants/deploy-data/deploy-data-avalanche.json.mjs +10112 -3415
  64. package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
  65. package/constants/deploy-data/deploy-data-base.json.mjs +9408 -3725
  66. package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
  67. package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +9893 -3194
  68. package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
  69. package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +6318 -3587
  70. package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
  71. package/constants/deploy-data/deploy-data-localhost.json.mjs +3208 -1550
  72. package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
  73. package/constants/deploy-data/deploy-data-optimism.json.mjs +10113 -3422
  74. package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
  75. package/constants/deploy-data/deploy-data-polygon.json.mjs +10092 -3423
  76. package/constants/fees.constants.cjs +1 -1
  77. package/constants/fees.constants.d.ts +5 -3
  78. package/constants/fees.constants.mjs +22 -19
  79. package/constants/index.d.ts +6 -0
  80. package/constants/kyc.constants.cjs +1 -1
  81. package/constants/kyc.constants.mjs +30 -18
  82. package/constants/mediaUrls.constants.cjs +1 -0
  83. package/constants/mediaUrls.constants.d.ts +23 -0
  84. package/constants/mediaUrls.constants.mjs +26 -0
  85. package/constants/permit2.constants.cjs +1 -0
  86. package/constants/permit2.constants.d.ts +2 -0
  87. package/constants/permit2.constants.mjs +5 -0
  88. package/constants/protocol.constants.cjs +1 -1
  89. package/constants/protocol.constants.d.ts +8 -0
  90. package/constants/protocol.constants.mjs +29 -15
  91. package/constants/rewards.constants.cjs +1 -1
  92. package/constants/rewards.constants.mjs +14 -12
  93. package/constants/server.constants.cjs +1 -1
  94. package/constants/server.constants.d.ts +34 -6
  95. package/constants/server.constants.mjs +48 -20
  96. package/constants/token-data/ERC20Registry.cjs +1 -1
  97. package/constants/token-data/ERC20Registry.mjs +49 -48
  98. package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
  99. package/constants/token-data/arbMainnetRegistry.json.mjs +350 -110
  100. package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
  101. package/constants/token-data/arbMainnetRegistryFixed.json.mjs +334 -100
  102. package/constants/token-data/avalancheRegistry.json.cjs +1 -1
  103. package/constants/token-data/avalancheRegistry.json.mjs +236 -68
  104. package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
  105. package/constants/token-data/avalancheRegistryFixed.json.mjs +236 -68
  106. package/constants/token-data/baseRegistry.json.cjs +1 -1
  107. package/constants/token-data/baseRegistry.json.mjs +224 -59
  108. package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
  109. package/constants/token-data/baseRegistryFixed.json.mjs +212 -56
  110. package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
  111. package/constants/token-data/bnbMainnetRegistry.json.mjs +67 -64
  112. package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
  113. package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +67 -64
  114. package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
  115. package/constants/token-data/ethMainnetRegistry.json.mjs +1017 -344
  116. package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
  117. package/constants/token-data/ethMainnetRegistryFixed.json.mjs +946 -303
  118. package/constants/token-data/index.cjs +1 -0
  119. package/constants/token-data/index.d.ts +1496 -15
  120. package/constants/token-data/index.mjs +34 -0
  121. package/constants/token-data/localhostRegistry.json.cjs +1 -1
  122. package/constants/token-data/localhostRegistry.json.mjs +296 -276
  123. package/constants/token-data/optimismRegistry.json.cjs +1 -1
  124. package/constants/token-data/optimismRegistry.json.mjs +703 -180
  125. package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
  126. package/constants/token-data/optimismRegistryFixed.json.mjs +679 -173
  127. package/constants/token-data/polygonRegistry.json.cjs +1 -1
  128. package/constants/token-data/polygonRegistry.json.mjs +530 -155
  129. package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
  130. package/constants/token-data/polygonRegistryFixed.json.mjs +504 -147
  131. package/constants/token.limits.constants.cjs +1 -0
  132. package/constants/token.limits.constants.d.ts +5 -0
  133. package/constants/token.limits.constants.mjs +30 -0
  134. package/constants/vite.constants.cjs +1 -1
  135. package/constants/vite.constants.d.ts +7 -1
  136. package/constants/vite.constants.mjs +27 -22
  137. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  138. package/data-structures/Hinkal/Hinkal.d.ts +48 -20
  139. package/data-structures/Hinkal/Hinkal.mjs +264 -85
  140. package/data-structures/Hinkal/IHinkal.d.ts +37 -10
  141. package/data-structures/Hinkal/hinkalActionBeefy.cjs +1 -1
  142. package/data-structures/Hinkal/hinkalActionBeefy.mjs +25 -23
  143. package/data-structures/Hinkal/hinkalActionConvex.cjs +1 -1
  144. package/data-structures/Hinkal/hinkalActionConvex.mjs +11 -9
  145. package/data-structures/Hinkal/hinkalActionCurve.cjs +1 -1
  146. package/data-structures/Hinkal/hinkalActionCurve.mjs +18 -16
  147. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -0
  148. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +3 -0
  149. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +61 -0
  150. package/data-structures/Hinkal/hinkalActionLidoEth.cjs +1 -1
  151. package/data-structures/Hinkal/hinkalActionLidoEth.mjs +24 -22
  152. package/data-structures/Hinkal/hinkalActionPendle.cjs +1 -1
  153. package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
  154. package/data-structures/Hinkal/hinkalActionPendle.mjs +17 -15
  155. package/data-structures/Hinkal/hinkalActionPendleLP.cjs +1 -1
  156. package/data-structures/Hinkal/hinkalActionPendleLP.mjs +29 -26
  157. package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -0
  158. package/data-structures/Hinkal/hinkalActionReceive.d.ts +4 -0
  159. package/data-structures/Hinkal/hinkalActionReceive.mjs +39 -0
  160. package/data-structures/Hinkal/hinkalActionStake.cjs +1 -1
  161. package/data-structures/Hinkal/hinkalActionStake.d.ts +1 -1
  162. package/data-structures/Hinkal/hinkalActionStake.mjs +15 -11
  163. package/data-structures/Hinkal/hinkalActionVolatile.cjs +1 -1
  164. package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
  165. package/data-structures/Hinkal/hinkalActionVolatile.mjs +31 -26
  166. package/data-structures/Hinkal/hinkalApprove.cjs +1 -0
  167. package/data-structures/Hinkal/hinkalApprove.d.ts +2 -0
  168. package/data-structures/Hinkal/hinkalApprove.mjs +120 -0
  169. package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -0
  170. package/data-structures/Hinkal/hinkalCheckTokenRegistry.d.ts +3 -0
  171. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -0
  172. package/data-structures/Hinkal/hinkalDeploySubAccount.cjs +1 -0
  173. package/data-structures/Hinkal/hinkalDeploySubAccount.d.ts +3 -0
  174. package/data-structures/Hinkal/hinkalDeploySubAccount.mjs +15 -0
  175. package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  176. package/data-structures/Hinkal/hinkalDeposit.d.ts +3 -2
  177. package/data-structures/Hinkal/hinkalDeposit.mjs +116 -52
  178. package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -0
  179. package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
  180. package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +10 -0
  181. package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
  182. package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +6 -17
  183. package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -0
  184. package/data-structures/Hinkal/hinkalInsideTransact.d.ts +2 -0
  185. package/data-structures/Hinkal/hinkalInsideTransact.mjs +111 -0
  186. package/data-structures/Hinkal/hinkalMultiSend.cjs +1 -0
  187. package/data-structures/Hinkal/hinkalMultiSend.d.ts +3 -0
  188. package/data-structures/Hinkal/hinkalMultiSend.mjs +13 -0
  189. package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  190. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -1
  191. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +83 -37
  192. package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -0
  193. package/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +4 -0
  194. package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +46 -0
  195. package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -0
  196. package/data-structures/Hinkal/hinkalProxySwap.d.ts +5 -0
  197. package/data-structures/Hinkal/hinkalProxySwap.mjs +36 -0
  198. package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -0
  199. package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +3 -0
  200. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +20 -0
  201. package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  202. package/data-structures/Hinkal/hinkalSwap.d.ts +2 -1
  203. package/data-structures/Hinkal/hinkalSwap.mjs +69 -60
  204. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  205. package/data-structures/Hinkal/hinkalWithdraw.d.ts +3 -1
  206. package/data-structures/Hinkal/hinkalWithdraw.mjs +77 -50
  207. package/data-structures/Hinkal/index.d.ts +1 -0
  208. package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  209. package/data-structures/Hinkal/resetMerkleTrees.mjs +18 -11
  210. package/data-structures/IndexedDB/activity-db.cjs +1 -0
  211. package/data-structures/IndexedDB/activity-db.d.ts +16 -0
  212. package/data-structures/IndexedDB/activity-db.mjs +124 -0
  213. package/data-structures/IndexedDB/balances-db.cjs +1 -0
  214. package/data-structures/IndexedDB/balances-db.d.ts +13 -0
  215. package/data-structures/IndexedDB/balances-db.mjs +75 -0
  216. package/data-structures/IndexedDB/contact-db.cjs +1 -0
  217. package/data-structures/IndexedDB/contact-db.d.ts +11 -0
  218. package/data-structures/IndexedDB/contact-db.mjs +44 -0
  219. package/data-structures/IndexedDB/index.d.ts +5 -0
  220. package/data-structures/IndexedDB/prices-db.cjs +1 -0
  221. package/data-structures/IndexedDB/prices-db.d.ts +9 -0
  222. package/data-structures/IndexedDB/prices-db.mjs +62 -0
  223. package/data-structures/IndexedDB/private-balances-db.cjs +1 -0
  224. package/data-structures/IndexedDB/private-balances-db.d.ts +9 -0
  225. package/data-structures/IndexedDB/private-balances-db.mjs +28 -0
  226. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
  227. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +47 -44
  228. package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -0
  229. package/data-structures/TokenDBs/PrivateTokensDB.d.ts +11 -0
  230. package/data-structures/TokenDBs/PrivateTokensDB.mjs +53 -0
  231. package/data-structures/TokenDBs/PublicTokensDB.cjs +1 -0
  232. package/data-structures/TokenDBs/PublicTokensDB.d.ts +13 -0
  233. package/data-structures/TokenDBs/PublicTokensDB.mjs +86 -0
  234. package/data-structures/TokenDBs/index.d.ts +2 -0
  235. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.cjs +1 -0
  236. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +8 -0
  237. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +28 -0
  238. package/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
  239. package/data-structures/cacheDevices/BaseCacheDevice.d.ts +9 -6
  240. package/data-structures/cacheDevices/BaseCacheDevice.mjs +13 -4
  241. package/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
  242. package/data-structures/cacheDevices/FileCacheDevice.d.ts +1 -0
  243. package/data-structures/cacheDevices/FileCacheDevice.mjs +7 -3
  244. package/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +1 -1
  245. package/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +2 -1
  246. package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +10 -5
  247. package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
  248. package/data-structures/crypto-keys/decodeUTXO.mjs +13 -12
  249. package/data-structures/crypto-keys/keys.cjs +1 -1
  250. package/data-structures/crypto-keys/keys.d.ts +13 -3
  251. package/data-structures/crypto-keys/keys.mjs +45 -34
  252. package/data-structures/custom-token-registry/CustomTokenRegistry.cjs +1 -1
  253. package/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +2 -3
  254. package/data-structures/custom-token-registry/CustomTokenRegistry.mjs +17 -21
  255. package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +1 -1
  256. package/data-structures/event-service/AbstractAccessTokenSnapshotService.mjs +15 -29
  257. package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +1 -0
  258. package/data-structures/event-service/AbstractApprovalsSnapshotService.d.ts +30 -0
  259. package/data-structures/event-service/AbstractApprovalsSnapshotService.mjs +104 -0
  260. package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +1 -1
  261. package/data-structures/event-service/AbstractCommitmentsSnapshotService.mjs +24 -37
  262. package/data-structures/event-service/AbstractEventService.cjs +1 -1
  263. package/data-structures/event-service/AbstractEventService.d.ts +1 -1
  264. package/data-structures/event-service/AbstractEventService.mjs +15 -15
  265. package/data-structures/event-service/index.d.ts +1 -0
  266. package/data-structures/index.d.ts +2 -0
  267. package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
  268. package/data-structures/merkle-tree/MerkleTree.d.ts +7 -2
  269. package/data-structures/merkle-tree/MerkleTree.mjs +85 -70
  270. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +1 -0
  271. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +3 -0
  272. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +13 -0
  273. package/data-structures/merkle-tree/index.d.ts +1 -0
  274. package/data-structures/provider-adapter/IProviderAdapter.d.ts +2 -0
  275. package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +1 -1
  276. package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +3 -2
  277. package/data-structures/snapshot/ClientApprovalsSnapshotService.cjs +1 -0
  278. package/data-structures/snapshot/ClientApprovalsSnapshotService.d.ts +8 -0
  279. package/data-structures/snapshot/ClientApprovalsSnapshotService.mjs +23 -0
  280. package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +1 -1
  281. package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +3 -2
  282. package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +1 -1
  283. package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +6 -5
  284. package/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
  285. package/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -0
  286. package/data-structures/token-price-fetcher/TokenChecker.mjs +4 -2
  287. package/data-structures/transactions-manager/TransactionsManager.cjs +1 -1
  288. package/data-structures/transactions-manager/TransactionsManager.d.ts +8 -6
  289. package/data-structures/transactions-manager/TransactionsManager.mjs +124 -122
  290. package/data-structures/transactions-manager/history/getBeefyData.cjs +1 -1
  291. package/data-structures/transactions-manager/history/getBeefyData.mjs +3 -2
  292. package/data-structures/transactions-manager/history/getConvexData.cjs +1 -1
  293. package/data-structures/transactions-manager/history/getConvexData.mjs +3 -2
  294. package/data-structures/transactions-manager/history/getCurveData.cjs +1 -1
  295. package/data-structures/transactions-manager/history/getCurveData.mjs +3 -2
  296. package/data-structures/transactions-manager/history/getLidoData.cjs +1 -1
  297. package/data-structures/transactions-manager/history/getLidoData.mjs +3 -2
  298. package/data-structures/transactions-manager/history/getPendleData.cjs +1 -1
  299. package/data-structures/transactions-manager/history/getPendleData.mjs +13 -12
  300. package/data-structures/transactions-manager/history/getTxDetails.cjs +1 -1
  301. package/data-structures/transactions-manager/history/getTxDetails.mjs +22 -20
  302. package/data-structures/transactions-manager/history/getVolatileData.cjs +1 -1
  303. package/data-structures/transactions-manager/history/getVolatileData.mjs +11 -10
  304. package/data-structures/transactions-manager/history/history.types.cjs +1 -1
  305. package/data-structures/transactions-manager/history/history.types.mjs +4 -2
  306. package/data-structures/utxo/Utxo.cjs +1 -1
  307. package/data-structures/utxo/Utxo.d.ts +3 -3
  308. package/data-structures/utxo/Utxo.mjs +8 -7
  309. package/error-handling/error-codes.constants.cjs +2 -2
  310. package/error-handling/error-codes.constants.d.ts +22 -1
  311. package/error-handling/error-codes.constants.mjs +129 -112
  312. package/error-handling/get-error.message.cjs +1 -1
  313. package/error-handling/get-error.message.mjs +29 -25
  314. package/error-handling/index.d.ts +1 -0
  315. package/error-handling/logger.cjs +1 -0
  316. package/error-handling/logger.d.ts +5 -0
  317. package/error-handling/logger.mjs +16 -0
  318. package/error-handling/types.cjs +1 -1
  319. package/error-handling/types.d.ts +3 -1
  320. package/error-handling/types.mjs +2 -2
  321. package/externalABIs/BabPassport.json.cjs +1 -1
  322. package/externalABIs/BabPassport.json.mjs +8 -3
  323. package/externalABIs/BeefyRouterAbi.json.cjs +1 -1
  324. package/externalABIs/BeefyRouterAbi.json.mjs +5 -2
  325. package/externalABIs/BeefyStrategyAbi.json.cjs +1 -1
  326. package/externalABIs/BeefyStrategyAbi.json.mjs +5 -2
  327. package/externalABIs/BeefyVaultAbi.json.cjs +1 -1
  328. package/externalABIs/BeefyVaultAbi.json.mjs +5 -2
  329. package/externalABIs/BeefyZapAbi.json.cjs +1 -1
  330. package/externalABIs/BeefyZapAbi.json.mjs +5 -2
  331. package/externalABIs/BeefyZapOneInchAbi.json.cjs +1 -1
  332. package/externalABIs/BeefyZapOneInchAbi.json.mjs +5 -2
  333. package/externalABIs/ConvexBoosterAbi.json.cjs +1 -1
  334. package/externalABIs/ConvexBoosterAbi.json.mjs +5 -2
  335. package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +1 -1
  336. package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +5 -2
  337. package/externalABIs/ConvexRewardPoolAbi.json.cjs +1 -1
  338. package/externalABIs/ConvexRewardPoolAbi.json.mjs +5 -2
  339. package/externalABIs/CurveReadingWrapperAbi.json.cjs +1 -1
  340. package/externalABIs/CurveReadingWrapperAbi.json.mjs +5 -2
  341. package/externalABIs/CurveWrappedMainPool.json.cjs +1 -1
  342. package/externalABIs/CurveWrappedMainPool.json.mjs +5 -2
  343. package/externalABIs/CurveZap.json.cjs +1 -1
  344. package/externalABIs/CurveZap.json.mjs +5 -2
  345. package/externalABIs/CvxCrvUtilities.json.cjs +1 -1
  346. package/externalABIs/CvxCrvUtilities.json.mjs +5 -2
  347. package/externalABIs/ERC20.json.cjs +1 -1
  348. package/externalABIs/ERC20.json.mjs +20 -3
  349. package/externalABIs/GalxePassport.json.cjs +1 -1
  350. package/externalABIs/GalxePassport.json.mjs +8 -3
  351. package/externalABIs/IQuoterV2.json.cjs +1 -1
  352. package/externalABIs/IQuoterV2.json.mjs +20 -3
  353. package/externalABIs/ISwapRouter.json.cjs +1 -1
  354. package/externalABIs/ISwapRouter.json.mjs +5 -2
  355. package/externalABIs/IUniswapV3Factory.json.cjs +1 -1
  356. package/externalABIs/IUniswapV3Factory.json.mjs +20 -3
  357. package/externalABIs/IUniswapV3Pool.json.cjs +1 -1
  358. package/externalABIs/IUniswapV3Pool.json.mjs +20 -3
  359. package/externalABIs/PendleRouterAbi.json.cjs +1 -1
  360. package/externalABIs/PendleRouterAbi.json.mjs +5 -2
  361. package/externalABIs/UniswapV2PoolAbi.json.cjs +1 -1
  362. package/externalABIs/UniswapV2PoolAbi.json.mjs +16 -3
  363. package/externalABIs/index.cjs +1 -0
  364. package/externalABIs/index.d.ts +307 -11
  365. package/externalABIs/index.mjs +23 -0
  366. package/externalABIs/transactionsProver.json.cjs +1 -1
  367. package/externalABIs/transactionsProver.json.mjs +20 -3
  368. package/functions/kyc/zkMeHelper.cjs +1 -1
  369. package/functions/kyc/zkMeHelper.d.ts +0 -1
  370. package/functions/kyc/zkMeHelper.mjs +8 -11
  371. package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -0
  372. package/functions/pre-transaction/getExternalSwapAddress.d.ts +3 -0
  373. package/functions/pre-transaction/getExternalSwapAddress.mjs +26 -0
  374. package/functions/pre-transaction/getFeeStructure.cjs +1 -0
  375. package/functions/pre-transaction/getFeeStructure.d.ts +4 -0
  376. package/functions/pre-transaction/getFeeStructure.mjs +30 -0
  377. package/functions/pre-transaction/getFlatFees.cjs +1 -1
  378. package/functions/pre-transaction/getFlatFees.d.ts +3 -7
  379. package/functions/pre-transaction/getFlatFees.mjs +52 -46
  380. package/functions/pre-transaction/getSignatureDataForTransact.cjs +1 -0
  381. package/functions/pre-transaction/getSignatureDataForTransact.d.ts +3 -0
  382. package/functions/pre-transaction/getSignatureDataForTransact.mjs +6 -0
  383. package/functions/pre-transaction/index.d.ts +1 -0
  384. package/functions/pre-transaction/interaction-to-action.cjs +1 -1
  385. package/functions/pre-transaction/interaction-to-action.mjs +3 -2
  386. package/functions/pre-transaction/merge-with-fee-structure.cjs +1 -0
  387. package/functions/pre-transaction/merge-with-fee-structure.d.ts +2 -0
  388. package/functions/pre-transaction/merge-with-fee-structure.mjs +25 -0
  389. package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -0
  390. package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +16 -0
  391. package/functions/pre-transaction/outputApprovalDataProcessing.mjs +42 -0
  392. package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
  393. package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
  394. package/functions/pre-transaction/outputUtxoProcessing.mjs +19 -30
  395. package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
  396. package/functions/pre-transaction/process-gas-estimates.d.ts +2 -2
  397. package/functions/pre-transaction/process-gas-estimates.mjs +17 -27
  398. package/functions/pre-transaction/processAmountChanges.cjs +1 -1
  399. package/functions/pre-transaction/processAmountChanges.mjs +34 -23
  400. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -0
  401. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +6 -0
  402. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +7 -0
  403. package/functions/private-wallet/emporium.helpers.cjs +1 -1
  404. package/functions/private-wallet/emporium.helpers.d.ts +9 -1
  405. package/functions/private-wallet/emporium.helpers.mjs +117 -22
  406. package/functions/private-wallet/emporium.swap.helpers.cjs +1 -0
  407. package/functions/private-wallet/emporium.swap.helpers.d.ts +5 -0
  408. package/functions/private-wallet/emporium.swap.helpers.mjs +92 -0
  409. package/functions/private-wallet/index.d.ts +1 -0
  410. package/functions/private-wallet/opProducer.cjs +1 -1
  411. package/functions/private-wallet/opProducer.mjs +9 -10
  412. package/functions/private-wallet/smartContractWalletCalculator.cjs +1 -1
  413. package/functions/private-wallet/smartContractWalletCalculator.d.ts +5 -1
  414. package/functions/private-wallet/smartContractWalletCalculator.mjs +22 -17
  415. package/functions/protocols/convex.protocols.cjs +1 -1
  416. package/functions/protocols/convex.protocols.mjs +11 -8
  417. package/functions/protocols/pendle.helpers.cjs +1 -1
  418. package/functions/protocols/pendle.helpers.mjs +20 -15
  419. package/functions/snarkjs/common.snarkjs.cjs +1 -1
  420. package/functions/snarkjs/common.snarkjs.d.ts +8 -5
  421. package/functions/snarkjs/common.snarkjs.mjs +177 -87
  422. package/functions/snarkjs/constant.cjs +1 -1
  423. package/functions/snarkjs/constant.d.ts +223 -1
  424. package/functions/snarkjs/constant.mjs +315 -94
  425. package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  426. package/functions/snarkjs/constructEmporiumProof.d.ts +6 -3
  427. package/functions/snarkjs/constructEmporiumProof.mjs +148 -84
  428. package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
  429. package/functions/snarkjs/constructGeneralZkProof.d.ts +5 -3
  430. package/functions/snarkjs/constructGeneralZkProof.mjs +142 -86
  431. package/functions/snarkjs/generateCircomData.cjs +1 -1
  432. package/functions/snarkjs/generateCircomData.d.ts +3 -2
  433. package/functions/snarkjs/generateCircomData.mjs +33 -35
  434. package/functions/snarkjs/generateZkProof.cjs +1 -1
  435. package/functions/snarkjs/generateZkProof.d.ts +2 -2
  436. package/functions/snarkjs/generateZkProof.mjs +4 -15
  437. package/functions/snarkjs/generateZkProofEnclave.cjs +1 -0
  438. package/functions/snarkjs/generateZkProofEnclave.d.ts +6 -0
  439. package/functions/snarkjs/generateZkProofEnclave.mjs +26 -0
  440. package/functions/snarkjs/generateZkProofSelf.cjs +1 -0
  441. package/functions/snarkjs/generateZkProofSelf.d.ts +5 -0
  442. package/functions/snarkjs/generateZkProofSelf.mjs +17 -0
  443. package/functions/snarkjs/getOriginalSender.cjs +1 -0
  444. package/functions/snarkjs/getOriginalSender.d.ts +1 -0
  445. package/functions/snarkjs/getOriginalSender.mjs +5 -0
  446. package/functions/snarkjs/getZKFiles.cjs +1 -1
  447. package/functions/snarkjs/getZKFiles.d.ts +3 -2
  448. package/functions/snarkjs/getZKFiles.mjs +14 -5
  449. package/functions/utils/addresses.cjs +1 -0
  450. package/functions/utils/addresses.d.ts +4 -0
  451. package/functions/utils/addresses.mjs +20 -0
  452. package/functions/utils/amounts.utils.cjs +1 -1
  453. package/functions/utils/amounts.utils.d.ts +4 -1
  454. package/functions/utils/amounts.utils.mjs +29 -27
  455. package/functions/utils/arraysMatch.cjs +1 -0
  456. package/functions/utils/arraysMatch.d.ts +1 -0
  457. package/functions/utils/arraysMatch.mjs +4 -0
  458. package/functions/utils/axelar.utils.cjs +1 -1
  459. package/functions/utils/axelar.utils.d.ts +1 -0
  460. package/functions/utils/axelar.utils.mjs +32 -9
  461. package/functions/utils/cacheDevice.utils.cjs +1 -1
  462. package/functions/utils/cacheDevice.utils.mjs +11 -8
  463. package/functions/utils/cacheFunctions.cjs +1 -1
  464. package/functions/utils/cacheFunctions.d.ts +10 -7
  465. package/functions/utils/cacheFunctions.mjs +62 -39
  466. package/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -0
  467. package/functions/utils/convertEmporiumOpToCallInfo.d.ts +2 -0
  468. package/functions/utils/convertEmporiumOpToCallInfo.mjs +10 -0
  469. package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
  470. package/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +2 -1
  471. package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +7 -10
  472. package/functions/utils/encodeTokenWithId.cjs +1 -0
  473. package/functions/utils/encodeTokenWithId.d.ts +2 -0
  474. package/functions/utils/encodeTokenWithId.mjs +4 -0
  475. package/functions/utils/encryptInputForEnclave.cjs +1 -0
  476. package/functions/utils/encryptInputForEnclave.d.ts +8 -0
  477. package/functions/utils/encryptInputForEnclave.mjs +43 -0
  478. package/functions/utils/erc20tokenFunctions.cjs +1 -1
  479. package/functions/utils/erc20tokenFunctions.d.ts +8 -2
  480. package/functions/utils/erc20tokenFunctions.mjs +23 -14
  481. package/functions/utils/evmNetworkFunctions.cjs +1 -1
  482. package/functions/utils/evmNetworkFunctions.mjs +7 -4
  483. package/functions/utils/external-action.utils.d.ts +2 -2
  484. package/functions/utils/fees.utils.cjs +1 -0
  485. package/functions/utils/fees.utils.d.ts +2 -0
  486. package/functions/utils/fees.utils.mjs +14 -0
  487. package/functions/utils/getBlockExplorerUrl.cjs +1 -0
  488. package/functions/utils/getBlockExplorerUrl.d.ts +1 -0
  489. package/functions/utils/getBlockExplorerUrl.mjs +6 -0
  490. package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -0
  491. package/functions/utils/getRecipientInfoFromUserKeys.d.ts +3 -0
  492. package/functions/utils/getRecipientInfoFromUserKeys.mjs +18 -0
  493. package/functions/utils/index.d.ts +12 -0
  494. package/functions/utils/involves-permit2-op.cjs +1 -0
  495. package/functions/utils/involves-permit2-op.d.ts +1 -0
  496. package/functions/utils/involves-permit2-op.mjs +5 -0
  497. package/functions/utils/merkleTree.utils.cjs +1 -0
  498. package/functions/utils/merkleTree.utils.d.ts +2 -0
  499. package/functions/utils/merkleTree.utils.mjs +20 -0
  500. package/functions/utils/prepareHinkal.d.ts +6 -0
  501. package/functions/utils/processUseApprovalUtxoData.cjs +1 -0
  502. package/functions/utils/processUseApprovalUtxoData.d.ts +3 -0
  503. package/functions/utils/processUseApprovalUtxoData.mjs +19 -0
  504. package/functions/utils/publicBalance.utils.cjs +1 -0
  505. package/functions/utils/publicBalance.utils.d.ts +5 -0
  506. package/functions/utils/publicBalance.utils.mjs +25 -0
  507. package/functions/utils/replaceAddressInCalldata.cjs +1 -0
  508. package/functions/utils/replaceAddressInCalldata.d.ts +1 -0
  509. package/functions/utils/replaceAddressInCalldata.mjs +7 -0
  510. package/functions/utils/rpc-int-encode.cjs +1 -0
  511. package/functions/utils/rpc-int-encode.d.ts +2 -0
  512. package/functions/utils/rpc-int-encode.mjs +8 -0
  513. package/functions/utils/serialize.utils.cjs +1 -1
  514. package/functions/utils/serialize.utils.d.ts +1 -0
  515. package/functions/utils/serialize.utils.mjs +3 -2
  516. package/functions/utils/string.utils.cjs +1 -1
  517. package/functions/utils/string.utils.d.ts +2 -0
  518. package/functions/utils/string.utils.mjs +28 -14
  519. package/functions/utils/time.utils.cjs +1 -1
  520. package/functions/utils/time.utils.d.ts +1 -0
  521. package/functions/utils/time.utils.mjs +4 -3
  522. package/functions/utils/token-check.utils.cjs +1 -0
  523. package/functions/utils/token-check.utils.d.ts +1 -0
  524. package/functions/utils/token-check.utils.mjs +10 -0
  525. package/functions/utils/upToDateState.cjs +1 -0
  526. package/functions/utils/upToDateState.d.ts +2 -0
  527. package/functions/utils/upToDateState.mjs +11 -0
  528. package/functions/utils/userAgent.cjs +1 -1
  529. package/functions/utils/userAgent.mjs +8 -8
  530. package/functions/web3/events/balanceChangedCustomHandler.cjs +1 -0
  531. package/functions/web3/events/balanceChangedCustomHandler.d.ts +2 -0
  532. package/functions/web3/events/balanceChangedCustomHandler.mjs +14 -0
  533. package/functions/web3/events/balanceChangedHandler.cjs +1 -1
  534. package/functions/web3/events/balanceChangedHandler.mjs +5 -4
  535. package/functions/web3/events/getApprovedBalance.cjs +1 -0
  536. package/functions/web3/events/getApprovedBalance.d.ts +7 -0
  537. package/functions/web3/events/getApprovedBalance.mjs +80 -0
  538. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  539. package/functions/web3/events/getInputUtxoAndBalance.d.ts +16 -3
  540. package/functions/web3/events/getInputUtxoAndBalance.mjs +128 -46
  541. package/functions/web3/events/getShieldedBalance.cjs +2 -2
  542. package/functions/web3/events/getShieldedBalance.d.ts +1 -1
  543. package/functions/web3/events/getShieldedBalance.mjs +70 -65
  544. package/functions/web3/events/index.d.ts +2 -0
  545. package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
  546. package/functions/web3/functionCalls/accessTokenCalls.d.ts +2 -2
  547. package/functions/web3/functionCalls/accessTokenCalls.mjs +20 -18
  548. package/functions/web3/functionCalls/approveToken.cjs +1 -1
  549. package/functions/web3/functionCalls/approveToken.mjs +8 -7
  550. package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -0
  551. package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +4 -0
  552. package/functions/web3/functionCalls/approveTokensToHinkal.mjs +11 -0
  553. package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
  554. package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -2
  555. package/functions/web3/functionCalls/estimateGasRelayer.mjs +14 -8
  556. package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +1 -0
  557. package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +5 -0
  558. package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +32 -0
  559. package/functions/web3/functionCalls/relayFunctions.d.ts +1 -15
  560. package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  561. package/functions/web3/functionCalls/transactCallDirect.d.ts +2 -2
  562. package/functions/web3/functionCalls/transactCallDirect.mjs +31 -30
  563. package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  564. package/functions/web3/functionCalls/transactCallRelayer.d.ts +2 -2
  565. package/functions/web3/functionCalls/transactCallRelayer.mjs +32 -9
  566. package/functions/web3/getContractMetadata.cjs +1 -0
  567. package/functions/web3/getContractMetadata.d.ts +5 -0
  568. package/functions/web3/getContractMetadata.mjs +30 -0
  569. package/functions/web3/getTokenHolder.cjs +1 -0
  570. package/functions/web3/getTokenHolder.d.ts +1 -0
  571. package/functions/web3/getTokenHolder.mjs +12 -0
  572. package/functions/web3/index.d.ts +1 -0
  573. package/functions/web3/odosAPI.cjs +1 -1
  574. package/functions/web3/odosAPI.d.ts +1 -2
  575. package/functions/web3/odosAPI.mjs +23 -19
  576. package/functions/web3/oneInchAPI.cjs +1 -1
  577. package/functions/web3/oneInchAPI.d.ts +1 -2
  578. package/functions/web3/oneInchAPI.mjs +20 -15
  579. package/functions/web3/runContractFunction.cjs +1 -1
  580. package/functions/web3/runContractFunction.mjs +3 -2
  581. package/functions/web3/uniswapAPI.cjs +1 -1
  582. package/functions/web3/uniswapAPI.d.ts +4 -4
  583. package/functions/web3/uniswapAPI.mjs +57 -43
  584. package/index.cjs +1 -1
  585. package/index.mjs +739 -609
  586. package/package.json +19 -8
  587. package/providers/EthersProviderAdapter.cjs +1 -1
  588. package/providers/EthersProviderAdapter.d.ts +8 -3
  589. package/providers/EthersProviderAdapter.mjs +52 -43
  590. package/providers/WagmiProviderAdapter.cjs +1 -1
  591. package/providers/WagmiProviderAdapter.d.ts +4 -1
  592. package/providers/WagmiProviderAdapter.mjs +53 -56
  593. package/providers/prepareEthersHinkal.cjs +1 -1
  594. package/providers/prepareEthersHinkal.mjs +18 -10
  595. package/providers/prepareWagmiHinkal.cjs +1 -1
  596. package/providers/prepareWagmiHinkal.mjs +18 -10
  597. package/types/API.types.d.ts +21 -0
  598. package/types/ICacheDevice.d.ts +4 -3
  599. package/types/TransactionSimulator.types.d.ts +9 -0
  600. package/types/activities.types.cjs +1 -0
  601. package/types/activities.types.d.ts +45 -0
  602. package/types/activities.types.mjs +13 -0
  603. package/types/balances.types.cjs +1 -0
  604. package/types/balances.types.d.ts +17 -0
  605. package/types/balances.types.mjs +4 -0
  606. package/types/cache.types.cjs +1 -0
  607. package/types/cache.types.d.ts +27 -0
  608. package/types/cache.types.mjs +4 -0
  609. package/types/circom-data.types.d.ts +29 -9
  610. package/types/commitments.types.d.ts +6 -0
  611. package/types/contacts.types.d.ts +5 -0
  612. package/types/crypto.types.d.ts +1 -0
  613. package/types/earlyAccessCode.types.d.ts +4 -0
  614. package/types/ethereum-network.types.cjs +1 -1
  615. package/types/ethereum-network.types.d.ts +8 -3
  616. package/types/ethereum-network.types.mjs +1 -1
  617. package/types/external-action.types.cjs +1 -1
  618. package/types/external-action.types.d.ts +2 -1
  619. package/types/external-action.types.mjs +1 -1
  620. package/types/fee.types.d.ts +9 -0
  621. package/types/hinkal.types.cjs +1 -1
  622. package/types/hinkal.types.d.ts +48 -0
  623. package/types/hinkal.types.mjs +38 -13
  624. package/types/index.d.ts +9 -0
  625. package/types/kyc.types.cjs +1 -1
  626. package/types/kyc.types.d.ts +1 -1
  627. package/types/kyc.types.mjs +1 -1
  628. package/types/remote-proof.types.d.ts +15 -0
  629. package/types/rewards.types.d.ts +9 -0
  630. package/types/sandbox.types.cjs +1 -0
  631. package/types/sandbox.types.d.ts +157 -0
  632. package/types/sandbox.types.mjs +4 -0
  633. package/types/tenderly.api.types.d.ts +180 -0
  634. package/types/time.types.cjs +1 -1
  635. package/types/time.types.mjs +1 -1
  636. package/types/token-with-id.types.d.ts +4 -0
  637. package/types/token.types.d.ts +23 -0
  638. package/types/transactions.types.cjs +1 -1
  639. package/types/transactions.types.d.ts +31 -0
  640. package/types/transactions.types.mjs +8 -5
  641. package/types/wc.types.d.ts +89 -0
  642. package/types/with-id.types.d.ts +3 -0
  643. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
  644. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
  645. package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
  646. package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +26 -26
  647. package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
  648. package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
  649. package/webworker/utxoWorker/utxoWorkerLogic.cjs +1 -1
  650. package/webworker/utxoWorker/utxoWorkerLogic.mjs +58 -50
  651. package/webworker/viteWorkerURL.constant.cjs +3 -3
  652. package/webworker/viteWorkerURL.constant.mjs +3 -3
  653. package/webworker/workerFactory.cjs +1 -1
  654. package/webworker/workerFactory.mjs +2 -2
  655. package/webworker/workerProxy.cjs +1 -1
  656. package/webworker/workerProxy.d.ts +11 -11
  657. package/webworker/workerProxy.mjs +24 -26
  658. package/webworker/zkProofWorker/zkProofWorker.types.d.ts +2 -0
  659. package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
  660. package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
  661. package/webworker/zkProofWorker/zkProofWorkerLogic.cjs +1 -1
  662. package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +47 -61
  663. package/functions/utils/memoize.utils.cjs +0 -1
  664. package/functions/utils/memoize.utils.mjs +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hinkal/common",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "homepage": "hinkal.pro",
5
5
  "author": {
6
6
  "name": "Hinkal Protocol"
@@ -13,26 +13,32 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
+ "types": "./index.d.ts",
16
17
  "import": "./index.mjs",
17
- "require": "./index.cjs"
18
+ "default": "./index.cjs"
18
19
  },
19
20
  "./providers/EthersProviderAdapter": {
21
+ "types": "./providers/EthersProviderAdapter.d.ts",
20
22
  "import": "./providers/EthersProviderAdapter.mjs",
21
- "require": "./providers/EthersProviderAdapter.cjs"
23
+ "default": "./providers/EthersProviderAdapter.cjs"
22
24
  },
23
25
  "./providers/WagmiProviderAdapter": {
26
+ "types": "./providers/WagmiProviderAdapter.d.ts",
24
27
  "import": "./providers/WagmiProviderAdapter.mjs",
25
- "require": "./providers/WagmiProviderAdapter.cjs"
28
+ "default": "./providers/WagmiProviderAdapter.cjs"
26
29
  },
27
30
  "./providers/prepareEthersHinkal": {
31
+ "types": "./providers/prepareEthersHinkal.d.ts",
28
32
  "import": "./providers/prepareEthersHinkal.mjs",
29
- "require": "./providers/prepareEthersHinkal.cjs"
33
+ "default": "./providers/prepareEthersHinkal.cjs"
30
34
  },
31
35
  "./providers/prepareWagmiHinkal": {
36
+ "types": "./providers/prepareWagmiHinkal.d.ts",
32
37
  "import": "./providers/prepareWagmiHinkal.mjs",
33
- "require": "./providers/prepareWagmiHinkal.cjs"
38
+ "default": "./providers/prepareWagmiHinkal.cjs"
34
39
  }
35
40
  },
41
+ "types": "./index.d.ts",
36
42
  "scripts": {
37
43
  "prebuild": "nx prebuild:workers",
38
44
  "build": "nx build",
@@ -57,15 +63,20 @@
57
63
  "libsodium-wrappers": "^0.7.10",
58
64
  "process": "0.11.10",
59
65
  "ua-parser-js": "^1.0.37",
60
- "uuid": "^9.0.1"
66
+ "uuid": "^9.0.1",
67
+ "node-forge": "^1.3.1"
61
68
  },
62
69
  "peerDependencies": {
63
70
  "wagmi": "2.13.3",
64
- "ethers": "5.x"
71
+ "ethers": "5.x",
72
+ "@walletconnect/utils": "^2.17.2"
65
73
  },
66
74
  "peerDependenciesMeta": {
67
75
  "wagmi": {
68
76
  "optional": true
77
+ },
78
+ "@walletconnect/utils": {
79
+ "optional": true
69
80
  }
70
81
  }
71
82
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../constants/chains.constants.cjs"),h=require("../constants/contracts.constants.cjs"),a=require("../error-handling/error-codes.constants.cjs"),s=require("ethers");class c{signer;chainId;originalProvider;fetchProvider;initConnector(){}initSigner(r){this.signer=r}requireSigner(){if(!this.signer)throw Error("No Connector In Provider Adapter")}async init(r){this.requireSigner(),r&&(this.chainId=r),this.originalProvider=this.signer.provider,this.fetchProvider=this.createFetchProvider()??this.originalProvider,this.fetchProvider===this.originalProvider&&console.warn("fetchProvider not available")}async disconnectFromConnector(){}async connectToConnector(){return 0}async waitForTransaction(r,t){if((await this.fetchProvider?.waitForTransaction(r,t))?.status)return!0;throw Error(a.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(r){this.requireSigner();const t=await this.signer.signMessage(r);if(!t)throw new Error(a.transactionErrorCodes.SIGNING_FAILED);if(t.includes("error"))throw new Error(a.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return t}async signTypedData(r,t,e){return this.signer._signTypedData(r,t,e)}getSelectedNetwork=()=>{if(!this.chainId)throw new Error("Illegal state: no chaindId");return n.networkRegistry[this.chainId]};async switchNetwork(){}createFetchProvider(){try{const t=n.networkRegistry[this.chainId]?.fetchRpcUrl;return t?t.includes("wss")?new s.providers.WebSocketProvider(t):new s.providers.StaticJsonRpcProvider(t):void 0}catch(r){console.log("create Fetch Provider error",r);return}}async getAddress(){this.requireSigner();const r=await this.signer.getAddress();if(!r)throw new Error("IllegalState");return s.utils.getAddress(r)}setChainEventListener(){}onAccountChanged(){return this.init()}onChainChanged(r){return this.init(r)}release(){}getContractMetadata(r,t){const e=t??this.chainId;if(!e)throw new Error("No chainId provided in context");const i=n.networkRegistry[e];if(!i)throw new Error(a.transactionErrorCodes.UNSUPPORTED_NETWORK);const o=h.contractMetadataMapping[r];if(!o)throw new Error(`Unsupported contractType: ${r}`);return o(i.contractData)}getContract(r,t=void 0,e){const i=this.getContractMetadata(r,e);if(!i.abi)throw new Error(`No ABI configured for contractType: ${r}`);if(i.address&&t)throw new Error(`Overriding address is not supported for contractType: ${r}`);const o=i.address??t;if(!o)throw new Error(`No contractAddress configured for contractType: ${r}`);return new s.ethers.Contract(o,i.abi)}getContractWithSigner(r,t=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(r,t).connect(this.signer)}getContractWithFetcher(r,t=void 0){if(!this.fetchProvider)throw new Error("fetchProvider not initialized");return this.getContract(r,t).connect(this.fetchProvider)}getContractWithFetcherForEthereum(r,t=void 0){const e=this.chainId===n.chainIds.localhost&&n.localhostNetwork===n.chainIds.ethMainnet?n.chainIds.localhost:n.chainIds.ethMainnet;return this.getContract(r,t).connect(new s.ethers.providers.StaticJsonRpcProvider(n.networkRegistry[e].fetchRpcUrl))}async sendTransaction(r){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(r)}async connectAndPatchProvider(){return this.requireSigner(),await this.signer.getChainId()}isPermitterAvailable(){return!1}async getGasPrice(){const r=await this.fetchProvider?.getGasPrice();if(!r)throw Error("Could not fetch gas price in getGasPrice");return r.toBigInt()}}const d=new c,g=()=>new c;exports.EthersProviderAdapter=c;exports.default=g;exports.ethersProvierAdapter=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../constants/chains.constants.cjs"),n=require("../error-handling/error-codes.constants.cjs"),s=require("ethers"),o=require("../functions/web3/getContractMetadata.cjs");class a{signer;chainId;originalProvider;fetchProvider;chainEventListener;initConnector(){}initSigner(r){this.signer=r}getSigner(){if(!this.signer)throw new Error("No Signer In Provider Adapter");return this.signer}requireSigner(){if(!this.signer)throw Error("No Connector In Provider Adapter")}async init(r){this.requireSigner(),r&&(this.chainId=r),this.originalProvider=this.signer.provider,this.fetchProvider=this.createFetchProvider()??this.originalProvider,this.fetchProvider===this.originalProvider&&console.warn("fetchProvider not available")}async disconnectFromConnector(){}async connectToConnector(){return 0}async waitForTransaction(r,e){if((await this.fetchProvider?.waitForTransaction(r,e))?.status)return!0;throw Error(n.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(r){this.requireSigner();const e=await this.signer.signMessage(r);if(!e)throw new Error(n.transactionErrorCodes.SIGNING_FAILED);if(e.includes("error"))throw new Error(n.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return e}async signTypedData(r,e,t){return this.signer._signTypedData(r,e,t)}getSelectedNetwork=()=>{if(!this.chainId)throw new Error("Illegal state: no chaindId");return i.networkRegistry[this.chainId]};async switchNetwork(r){if(this.originalProvider=this.createFetchProvider(r)??this.originalProvider,!this.originalProvider)throw new Error("switchNetwork illegal state: no provider");this.signer=this.signer?.connect(this.originalProvider),this.chainEventListener?.onChainChanged(r.chainId)}async switchAccount(r){const e=this.createFetchProvider();if(!e)throw new Error("can't create new fetch provider");this.signer=r.connect(e),await this.onAccountChanged(),this.chainEventListener?.onAccountChanged()}createFetchProvider(r){try{const t=(r??i.networkRegistry[this.chainId])?.fetchRpcUrl;return t?t.includes("wss")?new s.providers.WebSocketProvider(t):new s.providers.StaticJsonRpcProvider(t):void 0}catch(e){console.log("create Fetch Provider error",e);return}}async getAddress(){this.requireSigner();const r=await this.signer.getAddress();if(!r)throw new Error("IllegalState");return s.utils.getAddress(r)}setChainEventListener(r){this.chainEventListener=r}onAccountChanged(){return this.init()}onChainChanged(r){return this.init(r)}release(){this.removeListeners()}removeListeners(){this.chainEventListener=void 0}parseChainIdParam(r){const e=r??this.chainId;if(!e)throw new Error("No chainId provided in context");return e}getContractMetadata(r,e){const t=this.parseChainIdParam(e);return o.getContractMetadata(r,t)}getContract(r,e=void 0,t){const c=this.parseChainIdParam(t);return o.getContract(r,c,e)}getContractWithSigner(r,e=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(r,e).connect(this.signer)}getContractWithFetcher(r,e=void 0){if(!this.fetchProvider)throw new Error("fetchProvider not initialized");return this.getContract(r,e).connect(this.fetchProvider)}getContractWithFetcherForEthereum(r,e=void 0){const t=this.chainId===i.chainIds.localhost&&i.localhostNetwork===i.chainIds.ethMainnet?i.chainIds.localhost:i.chainIds.ethMainnet;return o.getContractWithFetcherByChainId(t,r,e)}async sendTransaction(r){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(r)}async connectAndPatchProvider(){return this.requireSigner(),await this.signer.getChainId()}isPermitterAvailable(){return!1}async getGasPrice(){const r=await this.fetchProvider?.getGasPrice();if(!r)throw Error("Could not fetch gas price in getGasPrice");return r.toBigInt()}}const h=new a,d=()=>new a;exports.EthersProviderAdapter=a;exports.default=d;exports.ethersProvierAdapter=h;
@@ -1,4 +1,4 @@
1
- import { IProviderAdapter } from '../data-structures/provider-adapter/IProviderAdapter';
1
+ import { ChainEventListener, IProviderAdapter } from '../data-structures/provider-adapter/IProviderAdapter';
2
2
  import { ContractMetadata, ContractType, EthereumNetwork } from '../types/ethereum-network.types';
3
3
  import { ethers, Signer } from 'ethers';
4
4
  export declare class EthersProviderAdapter implements IProviderAdapter<Signer> {
@@ -6,8 +6,10 @@ export declare class EthersProviderAdapter implements IProviderAdapter<Signer> {
6
6
  chainId: number | undefined;
7
7
  private originalProvider;
8
8
  private fetchProvider;
9
+ private chainEventListener?;
9
10
  initConnector(): void;
10
11
  initSigner(signer: Signer): void;
12
+ getSigner(): Signer;
11
13
  requireSigner(): void;
12
14
  init(chainId?: number): Promise<void>;
13
15
  disconnectFromConnector(): Promise<void>;
@@ -16,13 +18,16 @@ export declare class EthersProviderAdapter implements IProviderAdapter<Signer> {
16
18
  signMessage(message: string): Promise<string>;
17
19
  signTypedData(domain: ethers.TypedDataDomain, types: Record<string, ethers.TypedDataField[]>, value: Record<string, unknown>): Promise<string>;
18
20
  getSelectedNetwork: () => EthereumNetwork | undefined;
19
- switchNetwork(): Promise<void>;
21
+ switchNetwork(network: EthereumNetwork): Promise<void>;
22
+ switchAccount(newSigner: Signer): Promise<void>;
20
23
  private createFetchProvider;
21
24
  getAddress(): Promise<string>;
22
- setChainEventListener(): void;
25
+ setChainEventListener(chainEventListener: ChainEventListener): void;
23
26
  onAccountChanged(): Promise<unknown>;
24
27
  onChainChanged(chainId?: number): Promise<unknown>;
25
28
  release(): void;
29
+ private removeListeners;
30
+ private parseChainIdParam;
26
31
  getContractMetadata(contractType: ContractType, chainId?: number): ContractMetadata;
27
32
  getContract(contractType: ContractType, contractAddress?: undefined, chainId?: number): ethers.Contract;
28
33
  getContractWithSigner(contract: ContractType, contractAddress?: undefined): ethers.Contract;
@@ -1,17 +1,23 @@
1
- import { networkRegistry as o, chainIds as s, localhostNetwork as g } from "../constants/chains.constants.mjs";
2
- import { contractMetadataMapping as w } from "../constants/contracts.constants.mjs";
3
- import { transactionErrorCodes as a } from "../error-handling/error-codes.constants.mjs";
4
- import { providers as c, utils as l, ethers as h } from "ethers";
5
- class d {
1
+ import { networkRegistry as o, chainIds as i, localhostNetwork as h } from "../constants/chains.constants.mjs";
2
+ import { transactionErrorCodes as n } from "../error-handling/error-codes.constants.mjs";
3
+ import { providers as s, utils as d } from "ethers";
4
+ import { getContractMetadata as g, getContract as l, getContractWithFetcherByChainId as v } from "../functions/web3/getContractMetadata.mjs";
5
+ class a {
6
6
  signer;
7
7
  chainId;
8
8
  originalProvider;
9
9
  fetchProvider;
10
+ chainEventListener;
10
11
  initConnector() {
11
12
  }
12
13
  initSigner(r) {
13
14
  this.signer = r;
14
15
  }
16
+ getSigner() {
17
+ if (!this.signer)
18
+ throw new Error("No Signer In Provider Adapter");
19
+ return this.signer;
20
+ }
15
21
  requireSigner() {
16
22
  if (!this.signer)
17
23
  throw Error("No Connector In Provider Adapter");
@@ -27,15 +33,15 @@ class d {
27
33
  async waitForTransaction(r, t) {
28
34
  if ((await this.fetchProvider?.waitForTransaction(r, t))?.status)
29
35
  return !0;
30
- throw Error(a.TRANSACTION_NOT_CONFIRMED);
36
+ throw Error(n.TRANSACTION_NOT_CONFIRMED);
31
37
  }
32
38
  async signMessage(r) {
33
39
  this.requireSigner();
34
40
  const t = await this.signer.signMessage(r);
35
41
  if (!t)
36
- throw new Error(a.SIGNING_FAILED);
42
+ throw new Error(n.SIGNING_FAILED);
37
43
  if (t.includes("error"))
38
- throw new Error(a.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);
44
+ throw new Error(n.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);
39
45
  return t;
40
46
  }
41
47
  async signTypedData(r, t, e) {
@@ -46,14 +52,23 @@ class d {
46
52
  throw new Error("Illegal state: no chaindId");
47
53
  return o[this.chainId];
48
54
  };
49
- async switchNetwork() {
55
+ async switchNetwork(r) {
56
+ if (this.originalProvider = this.createFetchProvider(r) ?? this.originalProvider, !this.originalProvider)
57
+ throw new Error("switchNetwork illegal state: no provider");
58
+ this.signer = this.signer?.connect(this.originalProvider), this.chainEventListener?.onChainChanged(r.chainId);
50
59
  }
51
- createFetchProvider() {
60
+ async switchAccount(r) {
61
+ const t = this.createFetchProvider();
62
+ if (!t)
63
+ throw new Error("can't create new fetch provider");
64
+ this.signer = r.connect(t), await this.onAccountChanged(), this.chainEventListener?.onAccountChanged();
65
+ }
66
+ createFetchProvider(r) {
52
67
  try {
53
- const t = o[this.chainId]?.fetchRpcUrl;
54
- return t ? t.includes("wss") ? new c.WebSocketProvider(t) : new c.StaticJsonRpcProvider(t) : void 0;
55
- } catch (r) {
56
- console.log("create Fetch Provider error", r);
68
+ const e = (r ?? o[this.chainId])?.fetchRpcUrl;
69
+ return e ? e.includes("wss") ? new s.WebSocketProvider(e) : new s.StaticJsonRpcProvider(e) : void 0;
70
+ } catch (t) {
71
+ console.log("create Fetch Provider error", t);
57
72
  return;
58
73
  }
59
74
  }
@@ -62,9 +77,10 @@ class d {
62
77
  const r = await this.signer.getAddress();
63
78
  if (!r)
64
79
  throw new Error("IllegalState");
65
- return l.getAddress(r);
80
+ return d.getAddress(r);
66
81
  }
67
- setChainEventListener() {
82
+ setChainEventListener(r) {
83
+ this.chainEventListener = r;
68
84
  }
69
85
  onAccountChanged() {
70
86
  return this.init();
@@ -73,29 +89,24 @@ class d {
73
89
  return this.init(r);
74
90
  }
75
91
  release() {
92
+ this.removeListeners();
76
93
  }
77
- getContractMetadata(r, t) {
78
- const e = t ?? this.chainId;
79
- if (!e)
94
+ removeListeners() {
95
+ this.chainEventListener = void 0;
96
+ }
97
+ parseChainIdParam(r) {
98
+ const t = r ?? this.chainId;
99
+ if (!t)
80
100
  throw new Error("No chainId provided in context");
81
- const i = o[e];
82
- if (!i)
83
- throw new Error(a.UNSUPPORTED_NETWORK);
84
- const n = w[r];
85
- if (!n)
86
- throw new Error(`Unsupported contractType: ${r}`);
87
- return n(i.contractData);
101
+ return t;
102
+ }
103
+ getContractMetadata(r, t) {
104
+ const e = this.parseChainIdParam(t);
105
+ return g(r, e);
88
106
  }
89
107
  getContract(r, t = void 0, e) {
90
- const i = this.getContractMetadata(r, e);
91
- if (!i.abi)
92
- throw new Error(`No ABI configured for contractType: ${r}`);
93
- if (i.address && t)
94
- throw new Error(`Overriding address is not supported for contractType: ${r}`);
95
- const n = i.address ?? t;
96
- if (!n)
97
- throw new Error(`No contractAddress configured for contractType: ${r}`);
98
- return new h.Contract(n, i.abi);
108
+ const c = this.parseChainIdParam(e);
109
+ return l(r, c, t);
99
110
  }
100
111
  getContractWithSigner(r, t = void 0) {
101
112
  if (!this.signer)
@@ -108,10 +119,8 @@ class d {
108
119
  return this.getContract(r, t).connect(this.fetchProvider);
109
120
  }
110
121
  getContractWithFetcherForEthereum(r, t = void 0) {
111
- const e = this.chainId === s.localhost && g === s.ethMainnet ? s.localhost : s.ethMainnet;
112
- return this.getContract(r, t).connect(
113
- new h.providers.StaticJsonRpcProvider(o[e].fetchRpcUrl)
114
- );
122
+ const e = this.chainId === i.localhost && h === i.ethMainnet ? i.localhost : i.ethMainnet;
123
+ return v(e, r, t);
115
124
  }
116
125
  async sendTransaction(r) {
117
126
  if (!this.signer)
@@ -131,9 +140,9 @@ class d {
131
140
  return r.toBigInt();
132
141
  }
133
142
  }
134
- const E = new d(), C = () => new d();
143
+ const I = new a(), p = () => new a();
135
144
  export {
136
- d as EthersProviderAdapter,
137
- C as default,
138
- E as ethersProvierAdapter
145
+ a as EthersProviderAdapter,
146
+ p as default,
147
+ I as ethersProvierAdapter
139
148
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../constants/chains.constants.cjs"),d=require("../constants/contracts.constants.cjs"),c=require("../error-handling/error-codes.constants.cjs"),s=require("ethers"),g=require("wagmi"),h=require("../node_modules/@wagmi/core/dist/esm/actions/disconnect.cjs"),w=require("../node_modules/@wagmi/core/dist/esm/actions/reconnect.cjs"),u=require("../node_modules/@wagmi/core/dist/esm/actions/connect.cjs"),f=require("../node_modules/@wagmi/core/dist/esm/actions/signMessage.cjs"),l=require("../node_modules/@wagmi/core/dist/esm/actions/switchChain.cjs"),v=require("../node_modules/@wagmi/core/dist/esm/actions/getAccount.cjs"),C=require("../node_modules/@wagmi/core/dist/esm/actions/watchAccount.cjs"),E=require("../node_modules/@wagmi/core/dist/esm/actions/watchChainId.cjs");class a{connector;chainId;originalProvider;fetchProvider;signer;chainEventListener;config;unsubscribeFns=[];initConnector(t){this.connector=t}requireConnector(){if(!this.connector)throw Error("No Connector In Provider Adapter")}initConfig(t){this.config=t}async init(t){this.requireConnector(),t&&(this.chainId=t),this.originalProvider=await this.connector.getProvider(),this.fetchProvider=this.createFetchProvider()??this.originalProvider,this.fetchProvider===this.originalProvider&&console.warn("fetchProvider not available");const r=await this.connector.getProvider(),e=await this.connector.getAccounts();this.signer=await this.walletClientToSigner({transport:r,account:e[0]},this.chainId)}async disconnectFromConnector(){if(!this.config)throw new Error("No Config In Provider Adapter");this.release(),await h.disconnect(this.config)}async connectToConnector(t){if(!this.config)throw new Error("No Config In Provider Adapter");if(t.id==="walletConnect")try{await w.reconnect(this.config,{connectors:[t]}),await h.disconnect(this.config)}catch{}try{return(await u.connect(this.config,{connector:t})).chainId}catch(r){if(r instanceof g.ConnectorAlreadyConnectedError)return t.getChainId();throw console.log(r),new Error(c.transactionErrorCodes.CONNECTION_FAILED)}}async waitForTransaction(t,r){if((await this.fetchProvider?.waitForTransaction(t,r))?.status)return!0;throw Error(c.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(t){if(!this.config)throw new Error("No Config In Provider Adapter");const r=await f.signMessage(this.config,{message:t});if(!r)throw new Error(c.transactionErrorCodes.SIGNING_FAILED);if(r.includes("error"))throw new Error(c.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return r}async signTypedData(t,r,e){return this.signer._signTypedData(t,r,e)}getSelectedNetwork=()=>{if(!this.chainId)throw new Error("Illegal state: no chaindId");return i.networkRegistry[this.chainId]};async switchNetwork(t){if(!this.config)throw new Error("No Config In Provider Adapter");return l.switchChain(this.config,{chainId:t.chainId})}createFetchProvider(){try{const r=i.networkRegistry[this.chainId]?.fetchRpcUrl;return r?r.includes("wss")?new s.providers.WebSocketProvider(r):new s.providers.StaticJsonRpcProvider(r):void 0}catch(t){console.log("create Fetch Provider error",t);return}}async getAddress(){if(!this.config)throw new Error("No Config In Provider Adapter");const{address:t}=v.getAccount(this.config);if(!t)throw new Error("IllegalState");return s.utils.getAddress(t)}setChainEventListener(t){if(!this.config)throw new Error("No Config In Provider Adapter");this.chainEventListener=t,this.chainEventListener&&(this.unsubscribeFns.push(C.watchAccount(this.config,{onChange:({address:r},{address:e})=>{if(!this.chainEventListener){console.warn("chainEventListener is not set");return}console.log("Account changed"),r!==e&&(console.log("Account changed"),this.chainEventListener.onAccountChanged())}})),this.unsubscribeFns.push(E.watchChainId(this.config,{onChange:r=>{if(!this.chainEventListener){console.warn("chainEventListener is not set");return}console.log("Chain ID changed!",r),this.chainEventListener.onChainChanged(r)}})))}onAccountChanged(){return this.init()}onChainChanged(t){return this.init(t)}release(){this.removeListeners()}removeListeners(){this.unsubscribeFns.forEach(t=>t()),this.unsubscribeFns=[]}getContractMetadata(t,r){const e=r??this.chainId;if(!e)throw new Error("No chainId provided in context");const n=i.networkRegistry[e];if(!n)throw new Error(c.transactionErrorCodes.UNSUPPORTED_NETWORK);const o=d.contractMetadataMapping[t];if(!o)throw new Error(`Unsupported contractType: ${t}`);return o(n.contractData)}getContract(t,r=void 0,e){const n=this.getContractMetadata(t,e);if(!n.abi)throw new Error(`No ABI configured for contractType: ${t}`);if(n.address&&r)throw new Error(`Overriding address is not supported for contractType: ${t}`);const o=n.address??r;if(!o)throw new Error(`No contractAddress configured for contractType: ${t}`);return new s.ethers.Contract(o,n.abi)}getContractWithSigner(t,r=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(t,r).connect(this.signer)}getContractWithFetcher(t,r=void 0){if(!this.fetchProvider)throw new Error("fetchProvider not initialized");return this.getContract(t,r).connect(this.fetchProvider)}getContractWithFetcherForEthereum(t,r=void 0){const e=this.chainId===i.chainIds.localhost&&i.localhostNetwork===i.chainIds.ethMainnet?i.chainIds.localhost:i.chainIds.ethMainnet;return this.getContract(t,r).connect(new s.ethers.providers.StaticJsonRpcProvider(i.networkRegistry[e].fetchRpcUrl))}async sendTransaction(t){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(t)}async connectAndPatchProvider(t){return await this.connectToConnector(t)}isPermitterAvailable(){return!!this.getSelectedNetwork()?.contractData?.permitterAddress}async getGasPrice(){const t=await this.fetchProvider?.getGasPrice();if(!t)throw Error("Could not fetch gas price in getGasPrice");return t.toBigInt()}async walletClientToSigner(t,r){const{account:e,transport:n}=t,o={chainId:r,name:""};return new s.providers.Web3Provider(n,o).getSigner(e)}}const p=new a,P=()=>new a;exports.WagmiProviderAdapter=a;exports.default=P;exports.wagmiProviderAdapter=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../constants/chains.constants.cjs"),i=require("../error-handling/error-codes.constants.cjs"),o=require("ethers"),g=require("wagmi"),c=require("../functions/web3/getContractMetadata.cjs"),h=require("../node_modules/@wagmi/core/dist/esm/actions/disconnect.cjs"),u=require("../node_modules/@wagmi/core/dist/esm/actions/reconnect.cjs"),w=require("../node_modules/@wagmi/core/dist/esm/actions/connect.cjs"),l=require("../node_modules/@wagmi/core/dist/esm/actions/signMessage.cjs"),f=require("../node_modules/@wagmi/core/dist/esm/actions/switchChain.cjs"),v=require("../node_modules/@wagmi/core/dist/esm/actions/getAccount.cjs"),C=require("../node_modules/@wagmi/core/dist/esm/actions/watchAccount.cjs"),I=require("../node_modules/@wagmi/core/dist/esm/actions/watchChainId.cjs");class a{connector;chainId;originalProvider;fetchProvider;signer;chainEventListener;config;unsubscribeFns=[];initConnector(t){this.connector=t}getSigner(){if(!this.signer)throw new Error("No Signer In Provider Adapter");return this.signer}requireConnector(){if(!this.connector)throw Error("No Connector In Provider Adapter")}initConfig(t){this.config=t}async init(t){this.requireConnector(),t&&(this.chainId=t),this.originalProvider=await this.connector.getProvider(),this.fetchProvider=this.createFetchProvider()??this.originalProvider,this.fetchProvider===this.originalProvider&&console.warn("fetchProvider not available");const r=await this.connector.getProvider(),e=await this.connector.getAccounts();this.signer=await this.walletClientToSigner({transport:r,account:e[0]},this.chainId)}async disconnectFromConnector(){if(!this.config)throw new Error("No Config In Provider Adapter");this.release(),await h.disconnect(this.config)}async connectToConnector(t){if(!this.config)throw new Error("No Config In Provider Adapter");if(t.id==="walletConnect")try{await u.reconnect(this.config,{connectors:[t]}),await h.disconnect(this.config)}catch{}try{return(await w.connect(this.config,{connector:t})).chainId}catch(r){if(r instanceof g.ConnectorAlreadyConnectedError)return t.getChainId();throw console.log(r),new Error(i.transactionErrorCodes.CONNECTION_FAILED)}}async waitForTransaction(t,r){if((await this.fetchProvider?.waitForTransaction(t,r))?.status)return!0;throw Error(i.transactionErrorCodes.TRANSACTION_NOT_CONFIRMED)}async signMessage(t){if(!this.config)throw new Error("No Config In Provider Adapter");const r=await l.signMessage(this.config,{message:t});if(!r)throw new Error(i.transactionErrorCodes.SIGNING_FAILED);if(r.includes("error"))throw new Error(i.transactionErrorCodes.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);return r}async signTypedData(t,r,e){return this.signer._signTypedData(t,r,e)}getSelectedNetwork=()=>{if(!this.chainId)throw new Error("Illegal state: no chaindId");return n.networkRegistry[this.chainId]};async switchNetwork(t){if(!this.config)throw new Error("No Config In Provider Adapter");return f.switchChain(this.config,{chainId:t.chainId})}createFetchProvider(){try{const r=n.networkRegistry[this.chainId]?.fetchRpcUrl;return r?r.includes("wss")?new o.providers.WebSocketProvider(r):new o.providers.StaticJsonRpcProvider(r):void 0}catch(t){console.log("create Fetch Provider error",t);return}}async getAddress(){if(!this.config)throw new Error("No Config In Provider Adapter");const{address:t}=v.getAccount(this.config);if(!t)throw new Error("IllegalState");return o.utils.getAddress(t)}setChainEventListener(t){if(!this.config)throw new Error("No Config In Provider Adapter");this.chainEventListener=t,this.chainEventListener&&(this.unsubscribeFns.push(C.watchAccount(this.config,{onChange:({address:r},{address:e})=>{if(!this.chainEventListener){console.warn("chainEventListener is not set");return}console.log("Account changed"),r!==e&&(console.log("Account changed"),this.chainEventListener.onAccountChanged())}})),this.unsubscribeFns.push(I.watchChainId(this.config,{onChange:r=>{if(!this.chainEventListener){console.warn("chainEventListener is not set");return}console.log("Chain ID changed!",r),this.chainEventListener.onChainChanged(r)}})))}onAccountChanged(){return this.init()}onChainChanged(t){return this.init(t)}release(){this.removeListeners()}removeListeners(){this.unsubscribeFns.forEach(t=>t()),this.unsubscribeFns=[]}parseChainIdParam(t){const r=t??this.chainId;if(!r)throw new Error("No chainId provided in context");return r}getContractMetadata(t,r){const e=this.parseChainIdParam(r);return c.getContractMetadata(t,e)}getContract(t,r=void 0,e){const s=this.parseChainIdParam(e);return c.getContract(t,s,r)}getContractWithSigner(t,r=void 0){if(!this.signer)throw new Error("IllegalState: no signer");return this.getContract(t,r).connect(this.signer)}getContractWithFetcher(t,r=void 0){if(!this.fetchProvider)throw new Error("fetchProvider not initialized");return this.getContract(t,r).connect(this.fetchProvider)}getContractWithFetcherForEthereum(t,r=void 0){const e=this.chainId===n.chainIds.localhost&&n.localhostNetwork===n.chainIds.ethMainnet?n.chainIds.localhost:n.chainIds.ethMainnet;return c.getContractWithFetcherByChainId(e,t,r)}async sendTransaction(t){if(!this.signer)throw new Error("IllegalState: no signer");return await this.signer.sendTransaction(t)}async connectAndPatchProvider(t){return await this.connectToConnector(t)}isPermitterAvailable(){return!!this.getSelectedNetwork()?.contractData?.permitterAddress}async getGasPrice(){const t=await this.fetchProvider?.getGasPrice();if(!t)throw Error("Could not fetch gas price in getGasPrice");return t.toBigInt()}async walletClientToSigner(t,r){const{account:e,transport:s}=t,d={chainId:r,name:""};return new o.providers.Web3Provider(s,d).getSigner(e)}switchAccount(){throw new Error("Method not implemented.")}}const P=new a,E=()=>new a;exports.WagmiProviderAdapter=a;exports.default=E;exports.wagmiProviderAdapter=P;
@@ -1,6 +1,6 @@
1
1
  import { ChainEventListener, IProviderAdapter } from '../data-structures/provider-adapter/IProviderAdapter';
2
2
  import { ContractMetadata, ContractType, EthereumNetwork } from '../types/ethereum-network.types';
3
- import { ethers } from 'ethers';
3
+ import { ethers, Signer } from 'ethers';
4
4
  import { type Connector } from 'wagmi';
5
5
  export declare class WagmiProviderAdapter implements IProviderAdapter<Connector> {
6
6
  private connector;
@@ -12,6 +12,7 @@ export declare class WagmiProviderAdapter implements IProviderAdapter<Connector>
12
12
  private config?;
13
13
  private unsubscribeFns;
14
14
  initConnector(connector: Connector): void;
15
+ getSigner(): Signer;
15
16
  requireConnector(): void;
16
17
  initConfig(config: any): void;
17
18
  init(chainId?: number): Promise<void>;
@@ -29,6 +30,7 @@ export declare class WagmiProviderAdapter implements IProviderAdapter<Connector>
29
30
  onChainChanged(chainId?: number): Promise<unknown>;
30
31
  release(): void;
31
32
  private removeListeners;
33
+ private parseChainIdParam;
32
34
  getContractMetadata(contractType: ContractType, chainId?: number): ContractMetadata;
33
35
  getContract(contractType: ContractType, contractAddress?: undefined, chainId?: number): ethers.Contract;
34
36
  getContractWithSigner(contract: ContractType, contractAddress?: undefined): ethers.Contract;
@@ -39,6 +41,7 @@ export declare class WagmiProviderAdapter implements IProviderAdapter<Connector>
39
41
  isPermitterAvailable(): boolean;
40
42
  getGasPrice(): Promise<bigint>;
41
43
  walletClientToSigner(walletClient: any, chainId: number): Promise<ethers.providers.JsonRpcSigner>;
44
+ switchAccount(): Promise<void>;
42
45
  }
43
46
  export declare const wagmiProviderAdapter: WagmiProviderAdapter;
44
47
  declare const _default: <T = unknown>() => IProviderAdapter<T>;
@@ -1,17 +1,17 @@
1
- import { networkRegistry as c, chainIds as s, localhostNetwork as f } from "../constants/chains.constants.mjs";
2
- import { contractMetadataMapping as w } from "../constants/contracts.constants.mjs";
3
- import { transactionErrorCodes as o } from "../error-handling/error-codes.constants.mjs";
4
- import { providers as a, utils as l, ethers as h } from "ethers";
5
- import { ConnectorAlreadyConnectedError as u } from "wagmi";
6
- import { disconnect as d } from "../node_modules/@wagmi/core/dist/esm/actions/disconnect.mjs";
7
- import { reconnect as v } from "../node_modules/@wagmi/core/dist/esm/actions/reconnect.mjs";
1
+ import { networkRegistry as c, chainIds as n, localhostNetwork as g } from "../constants/chains.constants.mjs";
2
+ import { transactionErrorCodes as i } from "../error-handling/error-codes.constants.mjs";
3
+ import { providers as s, utils as w } from "ethers";
4
+ import { ConnectorAlreadyConnectedError as f } from "wagmi";
5
+ import { getContractMetadata as l, getContract as u, getContractWithFetcherByChainId as v } from "../functions/web3/getContractMetadata.mjs";
6
+ import { disconnect as a } from "../node_modules/@wagmi/core/dist/esm/actions/disconnect.mjs";
7
+ import { reconnect as C } from "../node_modules/@wagmi/core/dist/esm/actions/reconnect.mjs";
8
8
  import { connect as p } from "../node_modules/@wagmi/core/dist/esm/actions/connect.mjs";
9
- import { signMessage as C } from "../node_modules/@wagmi/core/dist/esm/actions/signMessage.mjs";
10
- import { switchChain as E } from "../node_modules/@wagmi/core/dist/esm/actions/switchChain.mjs";
11
- import { getAccount as P } from "../node_modules/@wagmi/core/dist/esm/actions/getAccount.mjs";
12
- import { watchAccount as I } from "../node_modules/@wagmi/core/dist/esm/actions/watchAccount.mjs";
13
- import { watchChainId as m } from "../node_modules/@wagmi/core/dist/esm/actions/watchChainId.mjs";
14
- class g {
9
+ import { signMessage as I } from "../node_modules/@wagmi/core/dist/esm/actions/signMessage.mjs";
10
+ import { switchChain as P } from "../node_modules/@wagmi/core/dist/esm/actions/switchChain.mjs";
11
+ import { getAccount as m } from "../node_modules/@wagmi/core/dist/esm/actions/getAccount.mjs";
12
+ import { watchAccount as E } from "../node_modules/@wagmi/core/dist/esm/actions/watchAccount.mjs";
13
+ import { watchChainId as A } from "../node_modules/@wagmi/core/dist/esm/actions/watchChainId.mjs";
14
+ class h {
15
15
  connector;
16
16
  chainId;
17
17
  originalProvider;
@@ -23,6 +23,11 @@ class g {
23
23
  initConnector(t) {
24
24
  this.connector = t;
25
25
  }
26
+ getSigner() {
27
+ if (!this.signer)
28
+ throw new Error("No Signer In Provider Adapter");
29
+ return this.signer;
30
+ }
26
31
  requireConnector() {
27
32
  if (!this.connector)
28
33
  throw Error("No Connector In Provider Adapter");
@@ -38,37 +43,37 @@ class g {
38
43
  async disconnectFromConnector() {
39
44
  if (!this.config)
40
45
  throw new Error("No Config In Provider Adapter");
41
- this.release(), await d(this.config);
46
+ this.release(), await a(this.config);
42
47
  }
43
48
  async connectToConnector(t) {
44
49
  if (!this.config)
45
50
  throw new Error("No Config In Provider Adapter");
46
51
  if (t.id === "walletConnect")
47
52
  try {
48
- await v(this.config, { connectors: [t] }), await d(this.config);
53
+ await C(this.config, { connectors: [t] }), await a(this.config);
49
54
  } catch {
50
55
  }
51
56
  try {
52
57
  return (await p(this.config, { connector: t })).chainId;
53
58
  } catch (r) {
54
- if (r instanceof u)
59
+ if (r instanceof f)
55
60
  return t.getChainId();
56
- throw console.log(r), new Error(o.CONNECTION_FAILED);
61
+ throw console.log(r), new Error(i.CONNECTION_FAILED);
57
62
  }
58
63
  }
59
64
  async waitForTransaction(t, r) {
60
65
  if ((await this.fetchProvider?.waitForTransaction(t, r))?.status)
61
66
  return !0;
62
- throw Error(o.TRANSACTION_NOT_CONFIRMED);
67
+ throw Error(i.TRANSACTION_NOT_CONFIRMED);
63
68
  }
64
69
  async signMessage(t) {
65
70
  if (!this.config)
66
71
  throw new Error("No Config In Provider Adapter");
67
- const r = await C(this.config, { message: t });
72
+ const r = await I(this.config, { message: t });
68
73
  if (!r)
69
- throw new Error(o.SIGNING_FAILED);
74
+ throw new Error(i.SIGNING_FAILED);
70
75
  if (r.includes("error"))
71
- throw new Error(o.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);
76
+ throw new Error(i.SIGNATURE_UNSUPPORTED_PERSONAL_SIGN);
72
77
  return r;
73
78
  }
74
79
  async signTypedData(t, r, e) {
@@ -82,12 +87,12 @@ class g {
82
87
  async switchNetwork(t) {
83
88
  if (!this.config)
84
89
  throw new Error("No Config In Provider Adapter");
85
- return E(this.config, { chainId: t.chainId });
90
+ return P(this.config, { chainId: t.chainId });
86
91
  }
87
92
  createFetchProvider() {
88
93
  try {
89
94
  const r = c[this.chainId]?.fetchRpcUrl;
90
- return r ? r.includes("wss") ? new a.WebSocketProvider(r) : new a.StaticJsonRpcProvider(r) : void 0;
95
+ return r ? r.includes("wss") ? new s.WebSocketProvider(r) : new s.StaticJsonRpcProvider(r) : void 0;
91
96
  } catch (t) {
92
97
  console.log("create Fetch Provider error", t);
93
98
  return;
@@ -96,16 +101,16 @@ class g {
96
101
  async getAddress() {
97
102
  if (!this.config)
98
103
  throw new Error("No Config In Provider Adapter");
99
- const { address: t } = P(this.config);
104
+ const { address: t } = m(this.config);
100
105
  if (!t)
101
106
  throw new Error("IllegalState");
102
- return l.getAddress(t);
107
+ return w.getAddress(t);
103
108
  }
104
109
  setChainEventListener(t) {
105
110
  if (!this.config)
106
111
  throw new Error("No Config In Provider Adapter");
107
112
  this.chainEventListener = t, this.chainEventListener && (this.unsubscribeFns.push(
108
- I(this.config, {
113
+ E(this.config, {
109
114
  onChange: ({ address: r }, { address: e }) => {
110
115
  if (!this.chainEventListener) {
111
116
  console.warn("chainEventListener is not set");
@@ -115,7 +120,7 @@ class g {
115
120
  }
116
121
  })
117
122
  ), this.unsubscribeFns.push(
118
- m(this.config, {
123
+ A(this.config, {
119
124
  onChange: (r) => {
120
125
  if (!this.chainEventListener) {
121
126
  console.warn("chainEventListener is not set");
@@ -138,28 +143,19 @@ class g {
138
143
  removeListeners() {
139
144
  this.unsubscribeFns.forEach((t) => t()), this.unsubscribeFns = [];
140
145
  }
141
- getContractMetadata(t, r) {
142
- const e = r ?? this.chainId;
143
- if (!e)
146
+ parseChainIdParam(t) {
147
+ const r = t ?? this.chainId;
148
+ if (!r)
144
149
  throw new Error("No chainId provided in context");
145
- const n = c[e];
146
- if (!n)
147
- throw new Error(o.UNSUPPORTED_NETWORK);
148
- const i = w[t];
149
- if (!i)
150
- throw new Error(`Unsupported contractType: ${t}`);
151
- return i(n.contractData);
150
+ return r;
151
+ }
152
+ getContractMetadata(t, r) {
153
+ const e = this.parseChainIdParam(r);
154
+ return l(t, e);
152
155
  }
153
156
  getContract(t, r = void 0, e) {
154
- const n = this.getContractMetadata(t, e);
155
- if (!n.abi)
156
- throw new Error(`No ABI configured for contractType: ${t}`);
157
- if (n.address && r)
158
- throw new Error(`Overriding address is not supported for contractType: ${t}`);
159
- const i = n.address ?? r;
160
- if (!i)
161
- throw new Error(`No contractAddress configured for contractType: ${t}`);
162
- return new h.Contract(i, n.abi);
157
+ const o = this.parseChainIdParam(e);
158
+ return u(t, o, r);
163
159
  }
164
160
  getContractWithSigner(t, r = void 0) {
165
161
  if (!this.signer)
@@ -172,10 +168,8 @@ class g {
172
168
  return this.getContract(t, r).connect(this.fetchProvider);
173
169
  }
174
170
  getContractWithFetcherForEthereum(t, r = void 0) {
175
- const e = this.chainId === s.localhost && f === s.ethMainnet ? s.localhost : s.ethMainnet;
176
- return this.getContract(t, r).connect(
177
- new h.providers.StaticJsonRpcProvider(c[e].fetchRpcUrl)
178
- );
171
+ const e = this.chainId === n.localhost && g === n.ethMainnet ? n.localhost : n.ethMainnet;
172
+ return v(e, t, r);
179
173
  }
180
174
  async sendTransaction(t) {
181
175
  if (!this.signer)
@@ -195,16 +189,19 @@ class g {
195
189
  return t.toBigInt();
196
190
  }
197
191
  async walletClientToSigner(t, r) {
198
- const { account: e, transport: n } = t, i = {
192
+ const { account: e, transport: o } = t, d = {
199
193
  chainId: r,
200
194
  name: ""
201
195
  };
202
- return new a.Web3Provider(n, i).getSigner(e);
196
+ return new s.Web3Provider(o, d).getSigner(e);
197
+ }
198
+ switchAccount() {
199
+ throw new Error("Method not implemented.");
203
200
  }
204
201
  }
205
- const G = new g(), $ = () => new g();
202
+ const x = new h(), q = () => new h();
206
203
  export {
207
- g as WagmiProviderAdapter,
208
- $ as default,
209
- G as wagmiProviderAdapter
204
+ h as WagmiProviderAdapter,
205
+ q as default,
206
+ x as wagmiProviderAdapter
210
207
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const u=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../constants/vite.constants.cjs");require("axios");require("../constants/coingecko.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const q=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const a=require("./EthersProviderAdapter.cjs"),n=async(i,t)=>{await q.preProcessing();const e=new u.Hinkal(t),r=a.default();return r.initSigner?.(i),await e.initProviderAdapter(void 0,r),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../types/activities.types.cjs");require("../constants/token-data/index.cjs");require("axios");const t=require("../crypto/preProcessing.cjs");require("../constants/reorg-depths.constants.cjs");require("../functions/utils/external-action.utils.cjs");require("node-forge");require("../functions/web3/events/getShieldedBalance.cjs");require("../constants/contracts.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../functions/utils/userAgent.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");const a=require("./EthersProviderAdapter.cjs"),n=async(i,u)=>{await t.preProcessing();const e=new q.Hinkal(u),r=a.default();return r.initSigner?.(i),await e.initProviderAdapter(void 0,r),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareEthersHinkal=n;
@@ -1,31 +1,39 @@
1
1
  import "ethers";
2
2
  import "circomlibjs-hinkal-fork";
3
+ import "../error-handling/error-codes.constants.mjs";
4
+ import "../data-structures/crypto-keys/keys.mjs";
3
5
  import "libsodium-wrappers";
4
6
  import { Hinkal as p } from "../data-structures/Hinkal/Hinkal.mjs";
5
7
  import "../constants/chains.constants.mjs";
6
8
  import "../types/circom-data.types.mjs";
9
+ import "../constants/vite.constants.mjs";
7
10
  import "../types/transactions.types.mjs";
8
11
  import "../types/curve.types.mjs";
9
- import "../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
10
- import "../constants/vite.constants.mjs";
12
+ import "../types/activities.types.mjs";
13
+ import "../constants/token-data/index.mjs";
11
14
  import "axios";
12
- import "../constants/coingecko.constants.mjs";
15
+ import { preProcessing as m } from "../crypto/preProcessing.mjs";
16
+ import "../constants/reorg-depths.constants.mjs";
17
+ import "../functions/utils/external-action.utils.mjs";
18
+ import "node-forge";
19
+ import "../functions/web3/events/getShieldedBalance.mjs";
13
20
  import "../constants/contracts.constants.mjs";
21
+ import "idb-keyval";
22
+ import "../functions/utils/convertIntegrationProviderToExternalActionId.mjs";
14
23
  import "../constants/kyc.constants.mjs";
24
+ import "../constants/coingecko.constants.mjs";
15
25
  import "../constants/axelar.constants.mjs";
16
26
  import "../constants/rewards.constants.mjs";
17
- import "../constants/reorg-depths.constants.mjs";
18
- import { preProcessing as m } from "../crypto/preProcessing.mjs";
19
- import "../functions/utils/external-action.utils.mjs";
20
- import "../functions/web3/events/getShieldedBalance.mjs";
27
+ import "../constants/addresses.constants.mjs";
28
+ import "../constants/token.limits.constants.mjs";
29
+ import "../functions/utils/userAgent.mjs";
21
30
  import "../data-structures/volatile-helper/VolatileHelper.mjs";
22
- import "idb-keyval";
23
31
  import e from "./EthersProviderAdapter.mjs";
24
- const b = async (t, o) => {
32
+ const G = async (t, o) => {
25
33
  await m();
26
34
  const r = new p(o), i = e();
27
35
  return i.initSigner?.(t), await r.initProviderAdapter(void 0, i), await r.initUserKeys(), await r.resetMerkle(), r;
28
36
  };
29
37
  export {
30
- b as prepareEthersHinkal
38
+ G as prepareEthersHinkal
31
39
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("libsodium-wrappers");const u=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../data-structures/custom-token-registry/CustomTokenRegistry.cjs");require("../constants/vite.constants.cjs");require("axios");require("../constants/coingecko.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const t=require("../crypto/preProcessing.cjs");require("../functions/utils/external-action.utils.cjs");require("../functions/web3/events/getShieldedBalance.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");require("idb-keyval");const r=require("./WagmiProviderAdapter.cjs"),q=async(i,a)=>{await t.preProcessing();const e=new u.Hinkal;return r.wagmiProviderAdapter.initConfig(a),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("ethers");require("circomlibjs-hinkal-fork");require("../error-handling/error-codes.constants.cjs");require("../data-structures/crypto-keys/keys.cjs");require("libsodium-wrappers");const q=require("../data-structures/Hinkal/Hinkal.cjs");require("../constants/chains.constants.cjs");require("../types/circom-data.types.cjs");require("../constants/vite.constants.cjs");require("../types/transactions.types.cjs");require("../types/curve.types.cjs");require("../types/activities.types.cjs");require("../constants/token-data/index.cjs");require("axios");const a=require("../crypto/preProcessing.cjs");require("../constants/reorg-depths.constants.cjs");require("../functions/utils/external-action.utils.cjs");require("node-forge");require("../functions/web3/events/getShieldedBalance.cjs");require("../constants/contracts.constants.cjs");require("idb-keyval");require("../functions/utils/convertIntegrationProviderToExternalActionId.cjs");require("../constants/kyc.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");require("../functions/utils/userAgent.cjs");require("../data-structures/volatile-helper/VolatileHelper.cjs");const r=require("./WagmiProviderAdapter.cjs"),t=async(i,u)=>{await a.preProcessing();const e=new q.Hinkal;return r.wagmiProviderAdapter.initConfig(u),await e.initProviderAdapter(i,r.wagmiProviderAdapter),await e.initUserKeys(),await e.resetMerkle(),e};exports.prepareWagmiHinkal=t;