@hinkal/common 0.2.13 → 0.2.14

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 (656) 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/getServerURL.d.ts +1 -1
  22. package/API/index.d.ts +2 -0
  23. package/API/is-tx-stateless.cjs +1 -0
  24. package/API/is-tx-stateless.d.ts +3 -0
  25. package/API/is-tx-stateless.mjs +9 -0
  26. package/API/rewardsPointsCalls.cjs +1 -1
  27. package/API/rewardsPointsCalls.d.ts +3 -3
  28. package/API/rewardsPointsCalls.mjs +1 -3
  29. package/API/tenderly.api.cjs +1 -0
  30. package/API/tenderly.api.d.ts +12 -0
  31. package/API/tenderly.api.mjs +47 -0
  32. package/API/token-calls.cjs +1 -0
  33. package/API/token-calls.d.ts +2 -0
  34. package/API/token-calls.mjs +9 -0
  35. package/API/userVerifyTransactions.cjs +1 -1
  36. package/API/userVerifyTransactions.d.ts +6 -7
  37. package/API/userVerifyTransactions.mjs +13 -14
  38. package/constants/addresses.constants.cjs +1 -0
  39. package/constants/addresses.constants.d.ts +16 -0
  40. package/constants/addresses.constants.mjs +50 -0
  41. package/constants/assets.constants.cjs +1 -1
  42. package/constants/assets.constants.mjs +13 -13
  43. package/constants/axelar.constants.cjs +1 -1
  44. package/constants/axelar.constants.mjs +5 -5
  45. package/constants/balance.constants.cjs +1 -0
  46. package/constants/balance.constants.d.ts +1 -0
  47. package/constants/balance.constants.mjs +4 -0
  48. package/constants/chains.constants.cjs +1 -1
  49. package/constants/chains.constants.d.ts +0 -2
  50. package/constants/chains.constants.mjs +28 -40
  51. package/constants/contracts.constants.cjs +1 -1
  52. package/constants/contracts.constants.mjs +144 -140
  53. package/constants/conversion.constants.cjs +1 -0
  54. package/constants/conversion.constants.d.ts +1 -0
  55. package/constants/conversion.constants.mjs +4 -0
  56. package/constants/deploy-data/deploy-data-arbMainnet.json.cjs +1 -1
  57. package/constants/deploy-data/deploy-data-arbMainnet.json.mjs +846 -11
  58. package/constants/deploy-data/deploy-data-avalanche.json.cjs +1 -1
  59. package/constants/deploy-data/deploy-data-avalanche.json.mjs +848 -13
  60. package/constants/deploy-data/deploy-data-base.json.cjs +1 -1
  61. package/constants/deploy-data/deploy-data-base.json.mjs +852 -17
  62. package/constants/deploy-data/deploy-data-bnbMainnet.json.cjs +1 -1
  63. package/constants/deploy-data/deploy-data-bnbMainnet.json.mjs +855 -20
  64. package/constants/deploy-data/deploy-data-ethMainnet.json.cjs +1 -1
  65. package/constants/deploy-data/deploy-data-ethMainnet.json.mjs +850 -15
  66. package/constants/deploy-data/deploy-data-localhost.json.cjs +1 -1
  67. package/constants/deploy-data/deploy-data-localhost.json.mjs +3208 -1550
  68. package/constants/deploy-data/deploy-data-optimism.json.cjs +1 -1
  69. package/constants/deploy-data/deploy-data-optimism.json.mjs +10010 -3429
  70. package/constants/deploy-data/deploy-data-polygon.json.cjs +1 -1
  71. package/constants/deploy-data/deploy-data-polygon.json.mjs +844 -9
  72. package/constants/fees.constants.cjs +1 -1
  73. package/constants/fees.constants.d.ts +5 -3
  74. package/constants/fees.constants.mjs +22 -19
  75. package/constants/index.d.ts +6 -0
  76. package/constants/kyc.constants.cjs +1 -1
  77. package/constants/kyc.constants.mjs +30 -18
  78. package/constants/mediaUrls.constants.cjs +1 -0
  79. package/constants/mediaUrls.constants.d.ts +23 -0
  80. package/constants/mediaUrls.constants.mjs +26 -0
  81. package/constants/permit2.constants.cjs +1 -0
  82. package/constants/permit2.constants.d.ts +2 -0
  83. package/constants/permit2.constants.mjs +5 -0
  84. package/constants/protocol.constants.cjs +1 -1
  85. package/constants/protocol.constants.d.ts +6 -0
  86. package/constants/protocol.constants.mjs +27 -15
  87. package/constants/rewards.constants.cjs +1 -1
  88. package/constants/rewards.constants.mjs +14 -12
  89. package/constants/server.constants.cjs +1 -1
  90. package/constants/server.constants.d.ts +14 -6
  91. package/constants/server.constants.mjs +24 -16
  92. package/constants/token-data/ERC20Registry.cjs +1 -1
  93. package/constants/token-data/ERC20Registry.mjs +49 -48
  94. package/constants/token-data/arbMainnetRegistry.json.cjs +1 -1
  95. package/constants/token-data/arbMainnetRegistry.json.mjs +89 -86
  96. package/constants/token-data/arbMainnetRegistryFixed.json.cjs +1 -1
  97. package/constants/token-data/arbMainnetRegistryFixed.json.mjs +79 -76
  98. package/constants/token-data/avalancheRegistry.json.cjs +1 -1
  99. package/constants/token-data/avalancheRegistry.json.mjs +51 -48
  100. package/constants/token-data/avalancheRegistryFixed.json.cjs +1 -1
  101. package/constants/token-data/avalancheRegistryFixed.json.mjs +51 -48
  102. package/constants/token-data/baseRegistry.json.cjs +1 -1
  103. package/constants/token-data/baseRegistry.json.mjs +34 -31
  104. package/constants/token-data/baseRegistryFixed.json.cjs +1 -1
  105. package/constants/token-data/baseRegistryFixed.json.mjs +31 -28
  106. package/constants/token-data/bnbMainnetRegistry.json.cjs +1 -1
  107. package/constants/token-data/bnbMainnetRegistry.json.mjs +67 -64
  108. package/constants/token-data/bnbMainnetRegistryFixed.json.cjs +1 -1
  109. package/constants/token-data/bnbMainnetRegistryFixed.json.mjs +67 -64
  110. package/constants/token-data/ethMainnetRegistry.json.cjs +1 -1
  111. package/constants/token-data/ethMainnetRegistry.json.mjs +229 -226
  112. package/constants/token-data/ethMainnetRegistryFixed.json.cjs +1 -1
  113. package/constants/token-data/ethMainnetRegistryFixed.json.mjs +193 -190
  114. package/constants/token-data/index.cjs +1 -0
  115. package/constants/token-data/index.d.ts +1063 -15
  116. package/constants/token-data/index.mjs +34 -0
  117. package/constants/token-data/localhostRegistry.json.cjs +1 -1
  118. package/constants/token-data/localhostRegistry.json.mjs +296 -276
  119. package/constants/token-data/optimismRegistry.json.cjs +1 -1
  120. package/constants/token-data/optimismRegistry.json.mjs +703 -180
  121. package/constants/token-data/optimismRegistryFixed.json.cjs +1 -1
  122. package/constants/token-data/optimismRegistryFixed.json.mjs +679 -173
  123. package/constants/token-data/polygonRegistry.json.cjs +1 -1
  124. package/constants/token-data/polygonRegistry.json.mjs +110 -107
  125. package/constants/token-data/polygonRegistryFixed.json.cjs +1 -1
  126. package/constants/token-data/polygonRegistryFixed.json.mjs +102 -99
  127. package/constants/token.limits.constants.cjs +1 -0
  128. package/constants/token.limits.constants.d.ts +5 -0
  129. package/constants/token.limits.constants.mjs +30 -0
  130. package/constants/vite.constants.cjs +1 -1
  131. package/constants/vite.constants.d.ts +5 -0
  132. package/constants/vite.constants.mjs +26 -22
  133. package/data-structures/Hinkal/Hinkal.cjs +1 -1
  134. package/data-structures/Hinkal/Hinkal.d.ts +48 -20
  135. package/data-structures/Hinkal/Hinkal.mjs +263 -85
  136. package/data-structures/Hinkal/IHinkal.d.ts +37 -10
  137. package/data-structures/Hinkal/hinkalActionBeefy.cjs +1 -1
  138. package/data-structures/Hinkal/hinkalActionBeefy.mjs +25 -23
  139. package/data-structures/Hinkal/hinkalActionConvex.cjs +1 -1
  140. package/data-structures/Hinkal/hinkalActionConvex.mjs +11 -9
  141. package/data-structures/Hinkal/hinkalActionCurve.cjs +1 -1
  142. package/data-structures/Hinkal/hinkalActionCurve.mjs +18 -16
  143. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.cjs +1 -0
  144. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.d.ts +3 -0
  145. package/data-structures/Hinkal/hinkalActionFundApproveAndTransact.mjs +61 -0
  146. package/data-structures/Hinkal/hinkalActionLidoEth.cjs +1 -1
  147. package/data-structures/Hinkal/hinkalActionLidoEth.mjs +24 -22
  148. package/data-structures/Hinkal/hinkalActionPendle.cjs +1 -1
  149. package/data-structures/Hinkal/hinkalActionPendle.d.ts +1 -1
  150. package/data-structures/Hinkal/hinkalActionPendle.mjs +17 -15
  151. package/data-structures/Hinkal/hinkalActionPendleLP.cjs +1 -1
  152. package/data-structures/Hinkal/hinkalActionPendleLP.mjs +29 -26
  153. package/data-structures/Hinkal/hinkalActionReceive.cjs +1 -0
  154. package/data-structures/Hinkal/hinkalActionReceive.d.ts +4 -0
  155. package/data-structures/Hinkal/hinkalActionReceive.mjs +39 -0
  156. package/data-structures/Hinkal/hinkalActionStake.cjs +1 -1
  157. package/data-structures/Hinkal/hinkalActionStake.d.ts +1 -1
  158. package/data-structures/Hinkal/hinkalActionStake.mjs +15 -11
  159. package/data-structures/Hinkal/hinkalActionVolatile.cjs +1 -1
  160. package/data-structures/Hinkal/hinkalActionVolatile.d.ts +1 -1
  161. package/data-structures/Hinkal/hinkalActionVolatile.mjs +31 -26
  162. package/data-structures/Hinkal/hinkalApprove.cjs +1 -0
  163. package/data-structures/Hinkal/hinkalApprove.d.ts +2 -0
  164. package/data-structures/Hinkal/hinkalApprove.mjs +120 -0
  165. package/data-structures/Hinkal/hinkalCheckTokenRegistry.cjs +1 -0
  166. package/data-structures/Hinkal/hinkalCheckTokenRegistry.d.ts +3 -0
  167. package/data-structures/Hinkal/hinkalCheckTokenRegistry.mjs +12 -0
  168. package/data-structures/Hinkal/hinkalDeploySubAccount.cjs +1 -0
  169. package/data-structures/Hinkal/hinkalDeploySubAccount.d.ts +3 -0
  170. package/data-structures/Hinkal/hinkalDeploySubAccount.mjs +15 -0
  171. package/data-structures/Hinkal/hinkalDeposit.cjs +1 -1
  172. package/data-structures/Hinkal/hinkalDeposit.d.ts +3 -2
  173. package/data-structures/Hinkal/hinkalDeposit.mjs +116 -52
  174. package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -0
  175. package/data-structures/Hinkal/hinkalGetRecipientInfo.d.ts +2 -0
  176. package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +10 -0
  177. package/data-structures/Hinkal/hinkalGetZkMeProvider.cjs +1 -1
  178. package/data-structures/Hinkal/hinkalGetZkMeProvider.mjs +6 -17
  179. package/data-structures/Hinkal/hinkalInsideTransact.cjs +1 -0
  180. package/data-structures/Hinkal/hinkalInsideTransact.d.ts +2 -0
  181. package/data-structures/Hinkal/hinkalInsideTransact.mjs +111 -0
  182. package/data-structures/Hinkal/hinkalMultiSend.cjs +1 -0
  183. package/data-structures/Hinkal/hinkalMultiSend.d.ts +3 -0
  184. package/data-structures/Hinkal/hinkalMultiSend.mjs +13 -0
  185. package/data-structures/Hinkal/hinkalPrivateWallet.cjs +1 -1
  186. package/data-structures/Hinkal/hinkalPrivateWallet.d.ts +2 -1
  187. package/data-structures/Hinkal/hinkalPrivateWallet.mjs +83 -37
  188. package/data-structures/Hinkal/hinkalProoflessDeposit.cjs +1 -0
  189. package/data-structures/Hinkal/hinkalProoflessDeposit.d.ts +4 -0
  190. package/data-structures/Hinkal/hinkalProoflessDeposit.mjs +46 -0
  191. package/data-structures/Hinkal/hinkalProxySwap.cjs +1 -0
  192. package/data-structures/Hinkal/hinkalProxySwap.d.ts +5 -0
  193. package/data-structures/Hinkal/hinkalProxySwap.mjs +36 -0
  194. package/data-structures/Hinkal/hinkalSignSubAccount.cjs +1 -0
  195. package/data-structures/Hinkal/hinkalSignSubAccount.d.ts +3 -0
  196. package/data-structures/Hinkal/hinkalSignSubAccount.mjs +20 -0
  197. package/data-structures/Hinkal/hinkalSwap.cjs +1 -1
  198. package/data-structures/Hinkal/hinkalSwap.d.ts +2 -1
  199. package/data-structures/Hinkal/hinkalSwap.mjs +69 -60
  200. package/data-structures/Hinkal/hinkalWithdraw.cjs +1 -1
  201. package/data-structures/Hinkal/hinkalWithdraw.d.ts +3 -1
  202. package/data-structures/Hinkal/hinkalWithdraw.mjs +77 -50
  203. package/data-structures/Hinkal/index.d.ts +1 -0
  204. package/data-structures/Hinkal/resetMerkleTrees.cjs +1 -1
  205. package/data-structures/Hinkal/resetMerkleTrees.mjs +18 -11
  206. package/data-structures/IndexedDB/activity-db.cjs +1 -0
  207. package/data-structures/IndexedDB/activity-db.d.ts +16 -0
  208. package/data-structures/IndexedDB/activity-db.mjs +124 -0
  209. package/data-structures/IndexedDB/balances-db.cjs +1 -0
  210. package/data-structures/IndexedDB/balances-db.d.ts +13 -0
  211. package/data-structures/IndexedDB/balances-db.mjs +75 -0
  212. package/data-structures/IndexedDB/contact-db.cjs +1 -0
  213. package/data-structures/IndexedDB/contact-db.d.ts +11 -0
  214. package/data-structures/IndexedDB/contact-db.mjs +44 -0
  215. package/data-structures/IndexedDB/index.d.ts +5 -0
  216. package/data-structures/IndexedDB/prices-db.cjs +1 -0
  217. package/data-structures/IndexedDB/prices-db.d.ts +9 -0
  218. package/data-structures/IndexedDB/prices-db.mjs +62 -0
  219. package/data-structures/IndexedDB/private-balances-db.cjs +1 -0
  220. package/data-structures/IndexedDB/private-balances-db.d.ts +9 -0
  221. package/data-structures/IndexedDB/private-balances-db.mjs +28 -0
  222. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.cjs +1 -1
  223. package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.mjs +47 -44
  224. package/data-structures/TokenDBs/PrivateTokensDB.cjs +1 -0
  225. package/data-structures/TokenDBs/PrivateTokensDB.d.ts +11 -0
  226. package/data-structures/TokenDBs/PrivateTokensDB.mjs +53 -0
  227. package/data-structures/TokenDBs/PublicTokensDB.cjs +1 -0
  228. package/data-structures/TokenDBs/PublicTokensDB.d.ts +13 -0
  229. package/data-structures/TokenDBs/PublicTokensDB.mjs +81 -0
  230. package/data-structures/TokenDBs/index.d.ts +2 -0
  231. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.cjs +1 -0
  232. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.d.ts +8 -0
  233. package/data-structures/cacheDevices/AttachableMemoryCacheDevice.mjs +28 -0
  234. package/data-structures/cacheDevices/BaseCacheDevice.cjs +1 -1
  235. package/data-structures/cacheDevices/BaseCacheDevice.d.ts +9 -6
  236. package/data-structures/cacheDevices/BaseCacheDevice.mjs +13 -4
  237. package/data-structures/cacheDevices/FileCacheDevice.cjs +1 -1
  238. package/data-structures/cacheDevices/FileCacheDevice.d.ts +1 -0
  239. package/data-structures/cacheDevices/FileCacheDevice.mjs +7 -3
  240. package/data-structures/cacheDevices/LocalStorageCacheDevice.cjs +1 -1
  241. package/data-structures/cacheDevices/LocalStorageCacheDevice.d.ts +2 -1
  242. package/data-structures/cacheDevices/LocalStorageCacheDevice.mjs +10 -5
  243. package/data-structures/crypto-keys/decodeUTXO.cjs +1 -1
  244. package/data-structures/crypto-keys/decodeUTXO.mjs +13 -12
  245. package/data-structures/crypto-keys/keys.cjs +1 -1
  246. package/data-structures/crypto-keys/keys.d.ts +13 -3
  247. package/data-structures/crypto-keys/keys.mjs +45 -34
  248. package/data-structures/custom-token-registry/CustomTokenRegistry.cjs +1 -1
  249. package/data-structures/custom-token-registry/CustomTokenRegistry.d.ts +2 -3
  250. package/data-structures/custom-token-registry/CustomTokenRegistry.mjs +17 -21
  251. package/data-structures/event-service/AbstractAccessTokenSnapshotService.cjs +1 -1
  252. package/data-structures/event-service/AbstractAccessTokenSnapshotService.mjs +15 -29
  253. package/data-structures/event-service/AbstractApprovalsSnapshotService.cjs +1 -0
  254. package/data-structures/event-service/AbstractApprovalsSnapshotService.d.ts +30 -0
  255. package/data-structures/event-service/AbstractApprovalsSnapshotService.mjs +104 -0
  256. package/data-structures/event-service/AbstractCommitmentsSnapshotService.cjs +1 -1
  257. package/data-structures/event-service/AbstractCommitmentsSnapshotService.mjs +24 -37
  258. package/data-structures/event-service/AbstractEventService.cjs +1 -1
  259. package/data-structures/event-service/AbstractEventService.d.ts +1 -1
  260. package/data-structures/event-service/AbstractEventService.mjs +15 -15
  261. package/data-structures/event-service/index.d.ts +1 -0
  262. package/data-structures/index.d.ts +2 -0
  263. package/data-structures/merkle-tree/MerkleTree.cjs +1 -1
  264. package/data-structures/merkle-tree/MerkleTree.d.ts +6 -1
  265. package/data-structures/merkle-tree/MerkleTree.mjs +79 -65
  266. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.cjs +1 -0
  267. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.d.ts +3 -0
  268. package/data-structures/merkle-tree/getPatchedAccessTokenMerkleTree.mjs +13 -0
  269. package/data-structures/merkle-tree/index.d.ts +1 -0
  270. package/data-structures/provider-adapter/IProviderAdapter.d.ts +2 -0
  271. package/data-structures/snapshot/ClientAccessTokenSnapshotService.cjs +1 -1
  272. package/data-structures/snapshot/ClientAccessTokenSnapshotService.mjs +3 -2
  273. package/data-structures/snapshot/ClientApprovalsSnapshotService.cjs +1 -0
  274. package/data-structures/snapshot/ClientApprovalsSnapshotService.d.ts +8 -0
  275. package/data-structures/snapshot/ClientApprovalsSnapshotService.mjs +23 -0
  276. package/data-structures/snapshot/ClientCommitmentsSnapshotService.cjs +1 -1
  277. package/data-structures/snapshot/ClientCommitmentsSnapshotService.mjs +3 -2
  278. package/data-structures/snapshot/ClientNullifierSnapshotService.cjs +1 -1
  279. package/data-structures/snapshot/ClientNullifierSnapshotService.mjs +6 -5
  280. package/data-structures/token-price-fetcher/TokenChecker.cjs +1 -1
  281. package/data-structures/token-price-fetcher/TokenChecker.d.ts +1 -0
  282. package/data-structures/token-price-fetcher/TokenChecker.mjs +4 -2
  283. package/data-structures/transactions-manager/TransactionsManager.cjs +1 -1
  284. package/data-structures/transactions-manager/TransactionsManager.d.ts +8 -6
  285. package/data-structures/transactions-manager/TransactionsManager.mjs +124 -122
  286. package/data-structures/transactions-manager/history/getBeefyData.cjs +1 -1
  287. package/data-structures/transactions-manager/history/getBeefyData.mjs +3 -2
  288. package/data-structures/transactions-manager/history/getConvexData.cjs +1 -1
  289. package/data-structures/transactions-manager/history/getConvexData.mjs +3 -2
  290. package/data-structures/transactions-manager/history/getCurveData.cjs +1 -1
  291. package/data-structures/transactions-manager/history/getCurveData.mjs +3 -2
  292. package/data-structures/transactions-manager/history/getLidoData.cjs +1 -1
  293. package/data-structures/transactions-manager/history/getLidoData.mjs +3 -2
  294. package/data-structures/transactions-manager/history/getPendleData.cjs +1 -1
  295. package/data-structures/transactions-manager/history/getPendleData.mjs +13 -12
  296. package/data-structures/transactions-manager/history/getTxDetails.cjs +1 -1
  297. package/data-structures/transactions-manager/history/getTxDetails.mjs +22 -20
  298. package/data-structures/transactions-manager/history/getVolatileData.cjs +1 -1
  299. package/data-structures/transactions-manager/history/getVolatileData.mjs +11 -10
  300. package/data-structures/transactions-manager/history/history.types.cjs +1 -1
  301. package/data-structures/transactions-manager/history/history.types.mjs +4 -2
  302. package/data-structures/utxo/Utxo.cjs +1 -1
  303. package/data-structures/utxo/Utxo.d.ts +3 -3
  304. package/data-structures/utxo/Utxo.mjs +8 -7
  305. package/error-handling/error-codes.constants.cjs +2 -2
  306. package/error-handling/error-codes.constants.d.ts +22 -1
  307. package/error-handling/error-codes.constants.mjs +129 -112
  308. package/error-handling/get-error.message.cjs +1 -1
  309. package/error-handling/get-error.message.mjs +29 -25
  310. package/error-handling/index.d.ts +1 -0
  311. package/error-handling/logger.cjs +1 -0
  312. package/error-handling/logger.d.ts +5 -0
  313. package/error-handling/logger.mjs +16 -0
  314. package/error-handling/types.cjs +1 -1
  315. package/error-handling/types.d.ts +3 -1
  316. package/error-handling/types.mjs +2 -2
  317. package/externalABIs/BabPassport.json.cjs +1 -1
  318. package/externalABIs/BabPassport.json.mjs +8 -3
  319. package/externalABIs/BeefyRouterAbi.json.cjs +1 -1
  320. package/externalABIs/BeefyRouterAbi.json.mjs +5 -2
  321. package/externalABIs/BeefyStrategyAbi.json.cjs +1 -1
  322. package/externalABIs/BeefyStrategyAbi.json.mjs +5 -2
  323. package/externalABIs/BeefyVaultAbi.json.cjs +1 -1
  324. package/externalABIs/BeefyVaultAbi.json.mjs +5 -2
  325. package/externalABIs/BeefyZapAbi.json.cjs +1 -1
  326. package/externalABIs/BeefyZapAbi.json.mjs +5 -2
  327. package/externalABIs/BeefyZapOneInchAbi.json.cjs +1 -1
  328. package/externalABIs/BeefyZapOneInchAbi.json.mjs +5 -2
  329. package/externalABIs/ConvexBoosterAbi.json.cjs +1 -1
  330. package/externalABIs/ConvexBoosterAbi.json.mjs +5 -2
  331. package/externalABIs/ConvexBoosterAbiMainnet.json.cjs +1 -1
  332. package/externalABIs/ConvexBoosterAbiMainnet.json.mjs +5 -2
  333. package/externalABIs/ConvexRewardPoolAbi.json.cjs +1 -1
  334. package/externalABIs/ConvexRewardPoolAbi.json.mjs +5 -2
  335. package/externalABIs/CurveReadingWrapperAbi.json.cjs +1 -1
  336. package/externalABIs/CurveReadingWrapperAbi.json.mjs +5 -2
  337. package/externalABIs/CurveWrappedMainPool.json.cjs +1 -1
  338. package/externalABIs/CurveWrappedMainPool.json.mjs +5 -2
  339. package/externalABIs/CurveZap.json.cjs +1 -1
  340. package/externalABIs/CurveZap.json.mjs +5 -2
  341. package/externalABIs/CvxCrvUtilities.json.cjs +1 -1
  342. package/externalABIs/CvxCrvUtilities.json.mjs +5 -2
  343. package/externalABIs/ERC20.json.cjs +1 -1
  344. package/externalABIs/ERC20.json.mjs +20 -3
  345. package/externalABIs/GalxePassport.json.cjs +1 -1
  346. package/externalABIs/GalxePassport.json.mjs +8 -3
  347. package/externalABIs/IQuoterV2.json.cjs +1 -1
  348. package/externalABIs/IQuoterV2.json.mjs +20 -3
  349. package/externalABIs/ISwapRouter.json.cjs +1 -1
  350. package/externalABIs/ISwapRouter.json.mjs +5 -2
  351. package/externalABIs/IUniswapV3Factory.json.cjs +1 -1
  352. package/externalABIs/IUniswapV3Factory.json.mjs +20 -3
  353. package/externalABIs/IUniswapV3Pool.json.cjs +1 -1
  354. package/externalABIs/IUniswapV3Pool.json.mjs +20 -3
  355. package/externalABIs/PendleRouterAbi.json.cjs +1 -1
  356. package/externalABIs/PendleRouterAbi.json.mjs +5 -2
  357. package/externalABIs/UniswapV2PoolAbi.json.cjs +1 -1
  358. package/externalABIs/UniswapV2PoolAbi.json.mjs +16 -3
  359. package/externalABIs/index.cjs +1 -0
  360. package/externalABIs/index.d.ts +307 -11
  361. package/externalABIs/index.mjs +23 -0
  362. package/externalABIs/transactionsProver.json.cjs +1 -1
  363. package/externalABIs/transactionsProver.json.mjs +20 -3
  364. package/functions/kyc/zkMeHelper.cjs +1 -1
  365. package/functions/kyc/zkMeHelper.d.ts +0 -1
  366. package/functions/kyc/zkMeHelper.mjs +8 -11
  367. package/functions/pre-transaction/getExternalSwapAddress.cjs +1 -0
  368. package/functions/pre-transaction/getExternalSwapAddress.d.ts +3 -0
  369. package/functions/pre-transaction/getExternalSwapAddress.mjs +26 -0
  370. package/functions/pre-transaction/getFeeStructure.cjs +1 -0
  371. package/functions/pre-transaction/getFeeStructure.d.ts +4 -0
  372. package/functions/pre-transaction/getFeeStructure.mjs +30 -0
  373. package/functions/pre-transaction/getFlatFees.cjs +1 -1
  374. package/functions/pre-transaction/getFlatFees.d.ts +3 -7
  375. package/functions/pre-transaction/getFlatFees.mjs +52 -46
  376. package/functions/pre-transaction/getSignatureDataForTransact.cjs +1 -0
  377. package/functions/pre-transaction/getSignatureDataForTransact.d.ts +3 -0
  378. package/functions/pre-transaction/getSignatureDataForTransact.mjs +6 -0
  379. package/functions/pre-transaction/index.d.ts +1 -0
  380. package/functions/pre-transaction/interaction-to-action.cjs +1 -1
  381. package/functions/pre-transaction/interaction-to-action.mjs +3 -2
  382. package/functions/pre-transaction/merge-with-fee-structure.cjs +1 -0
  383. package/functions/pre-transaction/merge-with-fee-structure.d.ts +2 -0
  384. package/functions/pre-transaction/merge-with-fee-structure.mjs +25 -0
  385. package/functions/pre-transaction/outputApprovalDataProcessing.cjs +1 -0
  386. package/functions/pre-transaction/outputApprovalDataProcessing.d.ts +16 -0
  387. package/functions/pre-transaction/outputApprovalDataProcessing.mjs +42 -0
  388. package/functions/pre-transaction/outputUtxoProcessing.cjs +1 -1
  389. package/functions/pre-transaction/outputUtxoProcessing.d.ts +1 -1
  390. package/functions/pre-transaction/outputUtxoProcessing.mjs +19 -30
  391. package/functions/pre-transaction/process-gas-estimates.cjs +1 -1
  392. package/functions/pre-transaction/process-gas-estimates.d.ts +2 -2
  393. package/functions/pre-transaction/process-gas-estimates.mjs +17 -27
  394. package/functions/pre-transaction/processAmountChanges.cjs +1 -1
  395. package/functions/pre-transaction/processAmountChanges.mjs +34 -23
  396. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.cjs +1 -0
  397. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.d.ts +6 -0
  398. package/functions/pre-transaction/shouldPatchAccessTokenMerkleTree.mjs +7 -0
  399. package/functions/private-wallet/emporium.helpers.cjs +1 -1
  400. package/functions/private-wallet/emporium.helpers.d.ts +9 -1
  401. package/functions/private-wallet/emporium.helpers.mjs +117 -22
  402. package/functions/private-wallet/emporium.swap.helpers.cjs +1 -0
  403. package/functions/private-wallet/emporium.swap.helpers.d.ts +5 -0
  404. package/functions/private-wallet/emporium.swap.helpers.mjs +92 -0
  405. package/functions/private-wallet/index.d.ts +1 -0
  406. package/functions/private-wallet/opProducer.cjs +1 -1
  407. package/functions/private-wallet/opProducer.mjs +9 -10
  408. package/functions/private-wallet/smartContractWalletCalculator.cjs +1 -1
  409. package/functions/private-wallet/smartContractWalletCalculator.d.ts +5 -1
  410. package/functions/private-wallet/smartContractWalletCalculator.mjs +22 -17
  411. package/functions/protocols/convex.protocols.cjs +1 -1
  412. package/functions/protocols/convex.protocols.mjs +11 -8
  413. package/functions/protocols/pendle.helpers.cjs +1 -1
  414. package/functions/protocols/pendle.helpers.mjs +20 -15
  415. package/functions/snarkjs/common.snarkjs.cjs +1 -1
  416. package/functions/snarkjs/common.snarkjs.d.ts +8 -5
  417. package/functions/snarkjs/common.snarkjs.mjs +177 -87
  418. package/functions/snarkjs/constant.cjs +1 -1
  419. package/functions/snarkjs/constant.d.ts +223 -1
  420. package/functions/snarkjs/constant.mjs +315 -94
  421. package/functions/snarkjs/constructEmporiumProof.cjs +1 -1
  422. package/functions/snarkjs/constructEmporiumProof.d.ts +6 -3
  423. package/functions/snarkjs/constructEmporiumProof.mjs +148 -84
  424. package/functions/snarkjs/constructGeneralZkProof.cjs +1 -1
  425. package/functions/snarkjs/constructGeneralZkProof.d.ts +5 -3
  426. package/functions/snarkjs/constructGeneralZkProof.mjs +142 -86
  427. package/functions/snarkjs/generateCircomData.cjs +1 -1
  428. package/functions/snarkjs/generateCircomData.d.ts +3 -2
  429. package/functions/snarkjs/generateCircomData.mjs +33 -35
  430. package/functions/snarkjs/generateZkProof.cjs +1 -1
  431. package/functions/snarkjs/generateZkProof.d.ts +2 -2
  432. package/functions/snarkjs/generateZkProof.mjs +4 -15
  433. package/functions/snarkjs/generateZkProofEnclave.cjs +1 -0
  434. package/functions/snarkjs/generateZkProofEnclave.d.ts +6 -0
  435. package/functions/snarkjs/generateZkProofEnclave.mjs +26 -0
  436. package/functions/snarkjs/generateZkProofSelf.cjs +1 -0
  437. package/functions/snarkjs/generateZkProofSelf.d.ts +5 -0
  438. package/functions/snarkjs/generateZkProofSelf.mjs +17 -0
  439. package/functions/snarkjs/getOriginalSender.cjs +1 -0
  440. package/functions/snarkjs/getOriginalSender.d.ts +1 -0
  441. package/functions/snarkjs/getOriginalSender.mjs +5 -0
  442. package/functions/snarkjs/getZKFiles.cjs +1 -1
  443. package/functions/snarkjs/getZKFiles.d.ts +3 -2
  444. package/functions/snarkjs/getZKFiles.mjs +14 -5
  445. package/functions/utils/addresses.cjs +1 -0
  446. package/functions/utils/addresses.d.ts +4 -0
  447. package/functions/utils/addresses.mjs +20 -0
  448. package/functions/utils/amounts.utils.cjs +1 -1
  449. package/functions/utils/amounts.utils.d.ts +4 -1
  450. package/functions/utils/amounts.utils.mjs +29 -27
  451. package/functions/utils/arraysMatch.cjs +1 -0
  452. package/functions/utils/arraysMatch.d.ts +1 -0
  453. package/functions/utils/arraysMatch.mjs +4 -0
  454. package/functions/utils/axelar.utils.cjs +1 -1
  455. package/functions/utils/axelar.utils.d.ts +1 -0
  456. package/functions/utils/axelar.utils.mjs +32 -9
  457. package/functions/utils/cacheDevice.utils.cjs +1 -1
  458. package/functions/utils/cacheDevice.utils.mjs +11 -8
  459. package/functions/utils/cacheFunctions.cjs +1 -1
  460. package/functions/utils/cacheFunctions.d.ts +10 -7
  461. package/functions/utils/cacheFunctions.mjs +62 -39
  462. package/functions/utils/convertEmporiumOpToCallInfo.cjs +1 -0
  463. package/functions/utils/convertEmporiumOpToCallInfo.d.ts +2 -0
  464. package/functions/utils/convertEmporiumOpToCallInfo.mjs +10 -0
  465. package/functions/utils/convertIntegrationProviderToExternalActionId.cjs +1 -1
  466. package/functions/utils/convertIntegrationProviderToExternalActionId.d.ts +2 -1
  467. package/functions/utils/convertIntegrationProviderToExternalActionId.mjs +7 -10
  468. package/functions/utils/encodeTokenWithId.cjs +1 -0
  469. package/functions/utils/encodeTokenWithId.d.ts +2 -0
  470. package/functions/utils/encodeTokenWithId.mjs +4 -0
  471. package/functions/utils/encryptInputForEnclave.cjs +1 -0
  472. package/functions/utils/encryptInputForEnclave.d.ts +8 -0
  473. package/functions/utils/encryptInputForEnclave.mjs +43 -0
  474. package/functions/utils/erc20tokenFunctions.cjs +1 -1
  475. package/functions/utils/erc20tokenFunctions.d.ts +8 -2
  476. package/functions/utils/erc20tokenFunctions.mjs +23 -14
  477. package/functions/utils/evmNetworkFunctions.cjs +1 -1
  478. package/functions/utils/evmNetworkFunctions.mjs +7 -4
  479. package/functions/utils/external-action.utils.d.ts +2 -2
  480. package/functions/utils/fees.utils.cjs +1 -0
  481. package/functions/utils/fees.utils.d.ts +2 -0
  482. package/functions/utils/fees.utils.mjs +14 -0
  483. package/functions/utils/getBlockExplorerUrl.cjs +1 -0
  484. package/functions/utils/getBlockExplorerUrl.d.ts +1 -0
  485. package/functions/utils/getBlockExplorerUrl.mjs +6 -0
  486. package/functions/utils/getRecipientInfoFromUserKeys.cjs +1 -0
  487. package/functions/utils/getRecipientInfoFromUserKeys.d.ts +3 -0
  488. package/functions/utils/getRecipientInfoFromUserKeys.mjs +18 -0
  489. package/functions/utils/index.d.ts +12 -0
  490. package/functions/utils/involves-permit2-op.cjs +1 -0
  491. package/functions/utils/involves-permit2-op.d.ts +1 -0
  492. package/functions/utils/involves-permit2-op.mjs +5 -0
  493. package/functions/utils/merkleTree.utils.cjs +1 -0
  494. package/functions/utils/merkleTree.utils.d.ts +2 -0
  495. package/functions/utils/merkleTree.utils.mjs +19 -0
  496. package/functions/utils/prepareHinkal.d.ts +6 -0
  497. package/functions/utils/processUseApprovalUtxoData.cjs +1 -0
  498. package/functions/utils/processUseApprovalUtxoData.d.ts +3 -0
  499. package/functions/utils/processUseApprovalUtxoData.mjs +19 -0
  500. package/functions/utils/publicBalance.utils.cjs +1 -0
  501. package/functions/utils/publicBalance.utils.d.ts +5 -0
  502. package/functions/utils/publicBalance.utils.mjs +25 -0
  503. package/functions/utils/replaceAddressInCalldata.cjs +1 -0
  504. package/functions/utils/replaceAddressInCalldata.d.ts +1 -0
  505. package/functions/utils/replaceAddressInCalldata.mjs +7 -0
  506. package/functions/utils/rpc-int-encode.cjs +1 -0
  507. package/functions/utils/rpc-int-encode.d.ts +2 -0
  508. package/functions/utils/rpc-int-encode.mjs +8 -0
  509. package/functions/utils/serialize.utils.cjs +1 -1
  510. package/functions/utils/serialize.utils.d.ts +1 -0
  511. package/functions/utils/serialize.utils.mjs +3 -2
  512. package/functions/utils/string.utils.cjs +1 -1
  513. package/functions/utils/string.utils.d.ts +2 -0
  514. package/functions/utils/string.utils.mjs +28 -14
  515. package/functions/utils/time.utils.cjs +1 -1
  516. package/functions/utils/time.utils.d.ts +1 -0
  517. package/functions/utils/time.utils.mjs +4 -3
  518. package/functions/utils/token-check.utils.cjs +1 -0
  519. package/functions/utils/token-check.utils.d.ts +1 -0
  520. package/functions/utils/token-check.utils.mjs +10 -0
  521. package/functions/utils/upToDateState.cjs +1 -0
  522. package/functions/utils/upToDateState.d.ts +2 -0
  523. package/functions/utils/upToDateState.mjs +11 -0
  524. package/functions/utils/userAgent.cjs +1 -1
  525. package/functions/utils/userAgent.mjs +8 -8
  526. package/functions/web3/events/balanceChangedCustomHandler.cjs +1 -0
  527. package/functions/web3/events/balanceChangedCustomHandler.d.ts +2 -0
  528. package/functions/web3/events/balanceChangedCustomHandler.mjs +14 -0
  529. package/functions/web3/events/balanceChangedHandler.cjs +1 -1
  530. package/functions/web3/events/balanceChangedHandler.mjs +5 -4
  531. package/functions/web3/events/getApprovedBalance.cjs +1 -0
  532. package/functions/web3/events/getApprovedBalance.d.ts +7 -0
  533. package/functions/web3/events/getApprovedBalance.mjs +80 -0
  534. package/functions/web3/events/getInputUtxoAndBalance.cjs +1 -1
  535. package/functions/web3/events/getInputUtxoAndBalance.d.ts +16 -3
  536. package/functions/web3/events/getInputUtxoAndBalance.mjs +128 -46
  537. package/functions/web3/events/getShieldedBalance.cjs +2 -2
  538. package/functions/web3/events/getShieldedBalance.d.ts +1 -1
  539. package/functions/web3/events/getShieldedBalance.mjs +70 -65
  540. package/functions/web3/events/index.d.ts +2 -0
  541. package/functions/web3/functionCalls/accessTokenCalls.cjs +1 -1
  542. package/functions/web3/functionCalls/accessTokenCalls.d.ts +2 -2
  543. package/functions/web3/functionCalls/accessTokenCalls.mjs +20 -18
  544. package/functions/web3/functionCalls/approveToken.cjs +1 -1
  545. package/functions/web3/functionCalls/approveToken.mjs +8 -7
  546. package/functions/web3/functionCalls/approveTokensToHinkal.cjs +1 -0
  547. package/functions/web3/functionCalls/approveTokensToHinkal.d.ts +4 -0
  548. package/functions/web3/functionCalls/approveTokensToHinkal.mjs +11 -0
  549. package/functions/web3/functionCalls/estimateGasRelayer.cjs +1 -1
  550. package/functions/web3/functionCalls/estimateGasRelayer.d.ts +2 -2
  551. package/functions/web3/functionCalls/estimateGasRelayer.mjs +14 -8
  552. package/functions/web3/functionCalls/inHinkalApprovalCalls.cjs +1 -0
  553. package/functions/web3/functionCalls/inHinkalApprovalCalls.d.ts +5 -0
  554. package/functions/web3/functionCalls/inHinkalApprovalCalls.mjs +32 -0
  555. package/functions/web3/functionCalls/relayFunctions.d.ts +1 -15
  556. package/functions/web3/functionCalls/transactCallDirect.cjs +1 -1
  557. package/functions/web3/functionCalls/transactCallDirect.d.ts +2 -2
  558. package/functions/web3/functionCalls/transactCallDirect.mjs +31 -30
  559. package/functions/web3/functionCalls/transactCallRelayer.cjs +1 -1
  560. package/functions/web3/functionCalls/transactCallRelayer.d.ts +2 -2
  561. package/functions/web3/functionCalls/transactCallRelayer.mjs +32 -9
  562. package/functions/web3/getContractMetadata.cjs +1 -0
  563. package/functions/web3/getContractMetadata.d.ts +5 -0
  564. package/functions/web3/getContractMetadata.mjs +30 -0
  565. package/functions/web3/odosAPI.cjs +1 -1
  566. package/functions/web3/odosAPI.d.ts +1 -2
  567. package/functions/web3/odosAPI.mjs +23 -19
  568. package/functions/web3/oneInchAPI.cjs +1 -1
  569. package/functions/web3/oneInchAPI.d.ts +1 -2
  570. package/functions/web3/oneInchAPI.mjs +20 -15
  571. package/functions/web3/runContractFunction.cjs +1 -1
  572. package/functions/web3/runContractFunction.mjs +3 -2
  573. package/functions/web3/uniswapAPI.cjs +1 -1
  574. package/functions/web3/uniswapAPI.d.ts +4 -4
  575. package/functions/web3/uniswapAPI.mjs +57 -43
  576. package/index.cjs +1 -1
  577. package/index.mjs +761 -639
  578. package/package.json +19 -8
  579. package/providers/EthersProviderAdapter.cjs +1 -1
  580. package/providers/EthersProviderAdapter.d.ts +8 -3
  581. package/providers/EthersProviderAdapter.mjs +52 -43
  582. package/providers/WagmiProviderAdapter.cjs +1 -1
  583. package/providers/WagmiProviderAdapter.d.ts +4 -1
  584. package/providers/WagmiProviderAdapter.mjs +53 -56
  585. package/providers/prepareEthersHinkal.cjs +1 -1
  586. package/providers/prepareEthersHinkal.mjs +18 -10
  587. package/providers/prepareWagmiHinkal.cjs +1 -1
  588. package/providers/prepareWagmiHinkal.mjs +18 -10
  589. package/types/API.types.d.ts +21 -0
  590. package/types/ICacheDevice.d.ts +4 -3
  591. package/types/TransactionSimulator.types.d.ts +9 -0
  592. package/types/activities.types.cjs +1 -0
  593. package/types/activities.types.d.ts +45 -0
  594. package/types/activities.types.mjs +13 -0
  595. package/types/balances.types.cjs +1 -0
  596. package/types/balances.types.d.ts +17 -0
  597. package/types/balances.types.mjs +4 -0
  598. package/types/cache.types.cjs +1 -0
  599. package/types/cache.types.d.ts +27 -0
  600. package/types/cache.types.mjs +4 -0
  601. package/types/circom-data.types.d.ts +29 -9
  602. package/types/commitments.types.d.ts +6 -0
  603. package/types/contacts.types.d.ts +5 -0
  604. package/types/crypto.types.d.ts +1 -0
  605. package/types/earlyAccessCode.types.d.ts +4 -0
  606. package/types/ethereum-network.types.cjs +1 -1
  607. package/types/ethereum-network.types.d.ts +8 -3
  608. package/types/ethereum-network.types.mjs +1 -1
  609. package/types/external-action.types.cjs +1 -1
  610. package/types/external-action.types.d.ts +2 -1
  611. package/types/external-action.types.mjs +1 -1
  612. package/types/fee.types.d.ts +9 -0
  613. package/types/hinkal.types.cjs +1 -1
  614. package/types/hinkal.types.d.ts +48 -0
  615. package/types/hinkal.types.mjs +38 -13
  616. package/types/index.d.ts +9 -0
  617. package/types/kyc.types.cjs +1 -1
  618. package/types/kyc.types.d.ts +1 -1
  619. package/types/kyc.types.mjs +1 -1
  620. package/types/remote-proof.types.d.ts +15 -0
  621. package/types/rewards.types.d.ts +9 -0
  622. package/types/sandbox.types.cjs +1 -0
  623. package/types/sandbox.types.d.ts +157 -0
  624. package/types/sandbox.types.mjs +4 -0
  625. package/types/tenderly.api.types.d.ts +180 -0
  626. package/types/time.types.cjs +1 -1
  627. package/types/time.types.mjs +1 -1
  628. package/types/token-with-id.types.d.ts +4 -0
  629. package/types/token.types.d.ts +23 -0
  630. package/types/transactions.types.cjs +1 -1
  631. package/types/transactions.types.d.ts +31 -0
  632. package/types/transactions.types.mjs +8 -5
  633. package/types/wc.types.d.ts +89 -0
  634. package/types/with-id.types.d.ts +3 -0
  635. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
  636. package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
  637. package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
  638. package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +26 -26
  639. package/webworker/utxoWorker/utxoWorkerLauncher.cjs +1 -1
  640. package/webworker/utxoWorker/utxoWorkerLauncher.mjs +1 -1
  641. package/webworker/utxoWorker/utxoWorkerLogic.cjs +1 -1
  642. package/webworker/utxoWorker/utxoWorkerLogic.mjs +58 -50
  643. package/webworker/viteWorkerURL.constant.cjs +3 -3
  644. package/webworker/viteWorkerURL.constant.mjs +3 -3
  645. package/webworker/workerFactory.cjs +1 -1
  646. package/webworker/workerFactory.mjs +2 -2
  647. package/webworker/workerProxy.cjs +1 -1
  648. package/webworker/workerProxy.d.ts +11 -11
  649. package/webworker/workerProxy.mjs +24 -26
  650. package/webworker/zkProofWorker/zkProofWorker.types.d.ts +2 -0
  651. package/webworker/zkProofWorker/zkProofWorkerLauncher.cjs +1 -1
  652. package/webworker/zkProofWorker/zkProofWorkerLauncher.mjs +1 -1
  653. package/webworker/zkProofWorker/zkProofWorkerLogic.cjs +1 -1
  654. package/webworker/zkProofWorker/zkProofWorkerLogic.mjs +47 -61
  655. package/functions/utils/memoize.utils.cjs +0 -1
  656. package/functions/utils/memoize.utils.mjs +0 -14
package/API/API.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./referralProgramCalls.cjs"),r=require("./rewardsPointsCalls.cjs"),s=require("./userVerifyTransactions.cjs"),n=require("./relayCalls.cjs"),o=require("./passwordCalls.cjs"),a=require("./getTokenPrice.cjs"),t=require("./kycCalls.cjs"),c=require("./callOdosAPI.cjs"),g=require("./dataServerCalls.cjs"),i=require("./HinkalPointsCalls.cjs"),d={getUserKycStatus:t.getUserKycStatus,setAiPriseVerificationUrl:t.setAiPriseVerificationUrl,getAccessTokenSignature:t.getAccessTokenSignature,getReclaimVerificationRequest:t.getReclaimVerificationRequest,getZkMeAccessToken:t.getZkMeAccessToken,userHasAccessToken:t.userHasAccessToken,afterKycCall:t.afterKycCall,getTokenPrice:a.getTokenPrice,getTokenPriceEth:a.getTokenPriceEth,getTokenPrices:a.getTokenPrices,getOdosPriceForToken:c.getOdosPriceForToken,getActiveCode:e.getActiveCode,updateActiveCode:e.updateActiveCode,getWeeklyReferralCodes:e.getWeeklyReferralCodes,getReferralCodes:e.getReferralCodes,addReferralCode:e.addReferralCode,getLpProgram:e.getLpProgram,addNickname:r.addNickname,getNickname:r.getNickname,verificationStartDate:s.verificationStartDate,userGetTransactions:s.userGetTransactions,userVerifyTransactions:s.userVerifyTransactions,points:r.points,leaderboard:r.leaderboard,seasonLeaderboard:r.seasonLeaderboard,getIdleRelay:n.getIdleRelay,userHasPassword:o.userHasPassword,userRegisterPassword:o.userRegisterPassword,getRewardsHistory:e.getRewardsHistory,setRewardsReceivingData:e.setRewardsReceivingData,getRewardsReceivingData:e.getRewardsReceivingData,getUserPoints:g.getUserPoints,getLimitedAnonymityStakingPoints:i.getLimitedAnonymityStakingPoints,getUserAnonymityStakingPoints:i.getUserAnonymityStakingPoints,getUserAnonymityStakingReferralPoints:i.getUserAnonymityStakingReferralPoints};exports.API=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./referralProgramCalls.cjs"),s=require("./rewardsPointsCalls.cjs"),r=require("./userVerifyTransactions.cjs"),c=require("./relayCalls.cjs"),o=require("./passwordCalls.cjs"),a=require("./getTokenPrice.cjs"),t=require("./kycCalls.cjs"),g=require("./callOdosAPI.cjs"),n=require("./dataServerCalls.cjs"),i=require("./HinkalPointsCalls.cjs"),l=require("./ai-calls.cjs"),d=require("./is-tx-stateless.cjs"),u=require("./token-calls.cjs"),k={getUserKycStatus:t.getUserKycStatus,setAiPriseVerificationUrl:t.setAiPriseVerificationUrl,getAccessTokenSignature:t.getAccessTokenSignature,getReclaimVerificationRequest:t.getReclaimVerificationRequest,getZkMeAccessToken:t.getZkMeAccessToken,userHasAccessToken:t.userHasAccessToken,afterKycCall:t.afterKycCall,getTokenPrice:a.getTokenPrice,getTokenPriceEth:a.getTokenPriceEth,getTokenPrices:a.getTokenPrices,getOdosPriceForToken:g.getOdosPriceForToken,getActiveCode:e.getActiveCode,updateActiveCode:e.updateActiveCode,getWeeklyReferralCodes:e.getWeeklyReferralCodes,getReferralCodes:e.getReferralCodes,addReferralCode:e.addReferralCode,getLpProgram:e.getLpProgram,addNickname:s.addNickname,getNickname:s.getNickname,userGetLatestCertifiedHashes:r.userGetLatestCertifiedHashes,userGetTransactions:r.userGetTransactions,userVerifyTransactions:r.userVerifyTransactions,points:s.points,leaderboard:s.leaderboard,seasonLeaderboard:s.seasonLeaderboard,getIdleRelay:c.getIdleRelay,userHasPassword:o.userHasPassword,userRegisterPassword:o.userRegisterPassword,getRewardsHistory:e.getRewardsHistory,setRewardsReceivingData:e.setRewardsReceivingData,getRewardsReceivingData:e.getRewardsReceivingData,getUserPoints:n.getUserPoints,getLimitedAnonymityStakingPoints:i.getLimitedAnonymityStakingPoints,getUserAnonymityStakingPoints:i.getUserAnonymityStakingPoints,getUserAnonymityStakingReferralPoints:i.getUserAnonymityStakingReferralPoints,getAssetChanges:n.getAssetChanges,getTokenApprovalAmountRequest:l.getTokenApprovalAmountRequest,isTxStateless:d.isTxStateless,tokensInfoCall:u.tokensInfoCall};exports.API=k;
package/API/API.d.ts CHANGED
@@ -1,13 +1,16 @@
1
1
  import { addReferralCode, getActiveCode, getLpProgram, getReferralCodes, getRewardsHistory, getRewardsReceivingData, getWeeklyReferralCodes, setRewardsReceivingData, updateActiveCode } from './referralProgramCalls';
2
2
  import { addNickname, getNickname, leaderboard, points, seasonLeaderboard } from './rewardsPointsCalls';
3
- import { userGetTransactions, userVerifyTransactions, verificationStartDate } from './userVerifyTransactions';
3
+ import { userGetLatestCertifiedHashes, userGetTransactions, userVerifyTransactions } from './userVerifyTransactions';
4
4
  import { getIdleRelay } from './relayCalls';
5
5
  import { userHasPassword, userRegisterPassword } from './passwordCalls';
6
6
  import { getTokenPrice, getTokenPriceEth, getTokenPrices } from './getTokenPrice';
7
7
  import { afterKycCall, getAccessTokenSignature, getReclaimVerificationRequest, getUserKycStatus, getZkMeAccessToken, setAiPriseVerificationUrl, userHasAccessToken } from './kycCalls';
8
8
  import { getOdosPriceForToken } from './callOdosAPI';
9
- import { getUserPoints } from './dataServerCalls';
9
+ import { getAssetChanges, getUserPoints } from './dataServerCalls';
10
10
  import { getLimitedAnonymityStakingPoints, getUserAnonymityStakingPoints, getUserAnonymityStakingReferralPoints } from './HinkalPointsCalls';
11
+ import { getTokenApprovalAmountRequest } from './ai-calls';
12
+ import { isTxStateless } from './is-tx-stateless';
13
+ import { tokensInfoCall } from './token-calls';
11
14
  export type IAPI = {
12
15
  getUserKycStatus: typeof getUserKycStatus;
13
16
  setAiPriseVerificationUrl: typeof setAiPriseVerificationUrl;
@@ -28,7 +31,7 @@ export type IAPI = {
28
31
  getNickname: typeof getNickname;
29
32
  userHasAccessToken: typeof userHasAccessToken;
30
33
  afterKycCall: typeof afterKycCall;
31
- verificationStartDate: typeof verificationStartDate;
34
+ userGetLatestCertifiedHashes: typeof userGetLatestCertifiedHashes;
32
35
  userGetTransactions: typeof userGetTransactions;
33
36
  userVerifyTransactions: typeof userVerifyTransactions;
34
37
  getIdleRelay: typeof getIdleRelay;
@@ -44,5 +47,9 @@ export type IAPI = {
44
47
  getLimitedAnonymityStakingPoints: typeof getLimitedAnonymityStakingPoints;
45
48
  getUserAnonymityStakingPoints: typeof getUserAnonymityStakingPoints;
46
49
  getUserAnonymityStakingReferralPoints: typeof getUserAnonymityStakingReferralPoints;
50
+ getAssetChanges: typeof getAssetChanges;
51
+ getTokenApprovalAmountRequest: typeof getTokenApprovalAmountRequest;
52
+ isTxStateless: typeof isTxStateless;
53
+ tokensInfoCall: typeof tokensInfoCall;
47
54
  };
48
55
  export declare const API: IAPI;
package/API/API.mjs CHANGED
@@ -1,59 +1,70 @@
1
- import { getActiveCode as e, updateActiveCode as t, getWeeklyReferralCodes as r, getReferralCodes as o, addReferralCode as i, getLpProgram as s, getRewardsHistory as a, setRewardsReceivingData as n, getRewardsReceivingData as g } from "./referralProgramCalls.mjs";
2
- import { addNickname as m, getNickname as c, points as d, leaderboard as f, seasonLeaderboard as k } from "./rewardsPointsCalls.mjs";
3
- import { verificationStartDate as p, userGetTransactions as P, userVerifyTransactions as R } from "./userVerifyTransactions.mjs";
4
- import { getIdleRelay as l } from "./relayCalls.mjs";
5
- import { userHasPassword as y, userRegisterPassword as A } from "./passwordCalls.mjs";
6
- import { getTokenPrice as u, getTokenPriceEth as T, getTokenPrices as C } from "./getTokenPrice.mjs";
7
- import { getUserKycStatus as S, setAiPriseVerificationUrl as v, getAccessTokenSignature as w, getReclaimVerificationRequest as U, getZkMeAccessToken as D, userHasAccessToken as H, afterKycCall as L } from "./kycCalls.mjs";
8
- import { getOdosPriceForToken as V } from "./callOdosAPI.mjs";
9
- import { getUserPoints as b } from "./dataServerCalls.mjs";
10
- import { getLimitedAnonymityStakingPoints as I, getUserAnonymityStakingPoints as K, getUserAnonymityStakingReferralPoints as N } from "./HinkalPointsCalls.mjs";
11
- const j = {
1
+ import { getActiveCode as e, updateActiveCode as t, getWeeklyReferralCodes as r, getReferralCodes as o, addReferralCode as s, getLpProgram as i, getRewardsHistory as a, setRewardsReceivingData as n, getRewardsReceivingData as m } from "./referralProgramCalls.mjs";
2
+ import { addNickname as g, getNickname as c, points as d, leaderboard as f, seasonLeaderboard as p } from "./rewardsPointsCalls.mjs";
3
+ import { userGetLatestCertifiedHashes as k, userGetTransactions as l, userVerifyTransactions as R } from "./userVerifyTransactions.mjs";
4
+ import { getIdleRelay as A } from "./relayCalls.mjs";
5
+ import { userHasPassword as P, userRegisterPassword as u } from "./passwordCalls.mjs";
6
+ import { getTokenPrice as y, getTokenPriceEth as T, getTokenPrices as C } from "./getTokenPrice.mjs";
7
+ import { getUserKycStatus as S, setAiPriseVerificationUrl as v, getAccessTokenSignature as w, getReclaimVerificationRequest as U, getZkMeAccessToken as H, userHasAccessToken as L, afterKycCall as h } from "./kycCalls.mjs";
8
+ import { getOdosPriceForToken as I } from "./callOdosAPI.mjs";
9
+ import { getUserPoints as V, getAssetChanges as b } from "./dataServerCalls.mjs";
10
+ import { getLimitedAnonymityStakingPoints as q, getUserAnonymityStakingPoints as x, getUserAnonymityStakingReferralPoints as D } from "./HinkalPointsCalls.mjs";
11
+ import { getTokenApprovalAmountRequest as G } from "./ai-calls.mjs";
12
+ import { isTxStateless as K } from "./is-tx-stateless.mjs";
13
+ import { tokensInfoCall as N } from "./token-calls.mjs";
14
+ const _ = {
12
15
  // KYC
13
16
  getUserKycStatus: S,
14
17
  setAiPriseVerificationUrl: v,
15
18
  getAccessTokenSignature: w,
16
19
  getReclaimVerificationRequest: U,
17
- getZkMeAccessToken: D,
18
- userHasAccessToken: H,
19
- afterKycCall: L,
20
+ getZkMeAccessToken: H,
21
+ userHasAccessToken: L,
22
+ afterKycCall: h,
20
23
  // Prices
21
- getTokenPrice: u,
24
+ getTokenPrice: y,
22
25
  getTokenPriceEth: T,
23
26
  getTokenPrices: C,
24
- getOdosPriceForToken: V,
27
+ getOdosPriceForToken: I,
25
28
  // Referral Codes
26
29
  getActiveCode: e,
27
30
  updateActiveCode: t,
28
31
  getWeeklyReferralCodes: r,
29
32
  getReferralCodes: o,
30
- addReferralCode: i,
31
- getLpProgram: s,
33
+ addReferralCode: s,
34
+ getLpProgram: i,
32
35
  // Rewards Points
33
- addNickname: m,
36
+ addNickname: g,
34
37
  getNickname: c,
35
38
  // Transaction Verifications
36
- verificationStartDate: p,
37
- userGetTransactions: P,
39
+ userGetLatestCertifiedHashes: k,
40
+ userGetTransactions: l,
38
41
  userVerifyTransactions: R,
39
42
  points: d,
40
43
  leaderboard: f,
41
- seasonLeaderboard: k,
44
+ seasonLeaderboard: p,
42
45
  // relay
43
- getIdleRelay: l,
46
+ getIdleRelay: A,
44
47
  // password
45
- userHasPassword: y,
46
- userRegisterPassword: A,
48
+ userHasPassword: P,
49
+ userRegisterPassword: u,
47
50
  getRewardsHistory: a,
48
51
  setRewardsReceivingData: n,
49
- getRewardsReceivingData: g,
52
+ getRewardsReceivingData: m,
50
53
  // points
51
- getUserPoints: b,
54
+ getUserPoints: V,
52
55
  // AnonymityStakingPoints
53
- getLimitedAnonymityStakingPoints: I,
54
- getUserAnonymityStakingPoints: K,
55
- getUserAnonymityStakingReferralPoints: N
56
+ getLimitedAnonymityStakingPoints: q,
57
+ getUserAnonymityStakingPoints: x,
58
+ getUserAnonymityStakingReferralPoints: D,
59
+ // asset changes
60
+ getAssetChanges: b,
61
+ // AI
62
+ getTokenApprovalAmountRequest: G,
63
+ // tenderly
64
+ isTxStateless: K,
65
+ // token calls
66
+ tokensInfoCall: N
56
67
  };
57
68
  export {
58
- j as API
69
+ _ as API
59
70
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("axios"),n=require("../constants/server.constants.cjs"),s=require("./getServerURL.cjs"),a=async(e,t,r)=>(await o.post(`${s.getServerURL(r)}${n.API_CONFIG.ROUTES.getTokenApprovalAmount}`,{html:e,tokenInfo:t})).data;exports.getTokenApprovalAmountRequest=a;
@@ -0,0 +1,9 @@
1
+ type TokenInfo = {
2
+ address?: string;
3
+ symbol?: string;
4
+ };
5
+ interface GetTokenApprovalAmountsResponse {
6
+ tokenAmount: string;
7
+ }
8
+ export declare const getTokenApprovalAmountRequest: (html: string, tokenInfo: TokenInfo, chainId: number) => Promise<GetTokenApprovalAmountsResponse>;
9
+ export {};
@@ -0,0 +1,13 @@
1
+ import e from "axios";
2
+ import { API_CONFIG as p } from "../constants/server.constants.mjs";
3
+ import { getServerURL as a } from "./getServerURL.mjs";
4
+ const s = async (o, t, r) => (await e.post(
5
+ `${a(r)}${p.ROUTES.getTokenApprovalAmount}`,
6
+ {
7
+ html: o,
8
+ tokenInfo: t
9
+ }
10
+ )).data;
11
+ export {
12
+ s as getTokenApprovalAmountRequest
13
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("axios"),v=require("ethers"),l=require("../types/curve.types.cjs"),h=require("../constants/crvCvx.registry.cjs"),c=require("../constants/token-data/ERC20Registry.cjs"),d=require("../constants/chains.constants.cjs"),p=require("../constants/protocol.constants.cjs"),T=require("../error-handling/logError.cjs"),g=require("../functions/utils/caseInsensitive.utils.cjs"),C=new Set,k={},m=(e,o)=>{const a=c.getERC20Registry(e),n=a.find(t=>t.erc20TokenAddress.toLocaleLowerCase()===o.toLocaleLowerCase());return n?n?n.symbol:o:a[0].symbol},D=(e,o)=>{const a=c.getERC20Registry(e),n=a.find(t=>t.erc20TokenAddress.toLocaleLowerCase()===o.toLocaleLowerCase());return n?n.logoURI?n.logoURI:"":a[0].logoURI?a[0].logoURI:""};async function P(e){const o=d.getNonLocalhostChainId(e),a=l.curveNetworkNames[o];return f.get(`https://api.curve.fi/api/getSubgraphData/${a}`,{timeout:7e3}).then(n=>n.data?n.data.data.poolList.map(t=>({address:t.address,volumeUSD:t.volumeUSD,dailyApy:t.latestDailyApy,weeklyApy:t.latestWeeklyApy})):[]).catch(()=>[])}async function L(e,o){const a=d.getNonLocalhostChainId(e),n=l.curveNetworkNames[a];return n?f.get(`https://api.curve.fi/api/getPools/${n}/${o}`).then(t=>t.data?.data.poolData.map(s=>{const{usdTotal:i}=s,u=Number(v.ethers.utils.formatEther(s.totalSupply||"0")),y=u>0?Number(i)/u:0;return{id:s.id,name:s.name,address:s.address,lpToken:m(e,s.lpTokenAddress||""),lpTokenAddress:s.lpTokenAddress,coins:s.underlyingCoins?s.underlyingCoins:s.coins,tokensForDeposit:s.coins,coinAddresses:(s.coinsAddresses||[]).filter(r=>r!==p.zeroAddress).map(r=>m(e,r)),coinLogos:(s.coinsAddresses||[]).filter(r=>r!==p.zeroAddress).map(r=>D(e,r)),gaugeAddress:s.gaugeAddress?s.gaugeAddress:void 0,gaugeCrvApy:s.gaugeCrvApy&&s.gaugeCrvApy[0]&&s.gaugeCrvApy[0]!==0?{base:s.gaugeCrvApy[0],boosted:s.gaugeCrvApy[1]}:void 0,gaugeRewards:s.gaugeRewards,usdTotal:i,totalSupply:u,lpPrice:y,liquidityUtilization:void 0}})):[]}async function b(e){let o=[];return await Promise.all(l.curvePools.map(async a=>{const n=await L(e,a);return o=o.concat(n),n})),Promise.all(o)}async function w(e){const o=await P(e),a=await b(e),n=[];for(const t of a){if(n.map(u=>u.address).includes(t.address))continue;const s=t.lpTokenAddress.toLowerCase();C.add(s.toLowerCase()),k[s]=t.address.toLowerCase();const i={id:t.id,name:t.name,address:t.address,lpToken:s,lpTokenAddress:s,coins:t.coins,coinNames:t.coinAddresses.join(" "),coinAddresses:t.coinAddresses,coinLogos:t.coinLogos,tokensForDeposit:t.tokensForDeposit,gaugeAddress:t.gaugeAddress,usdTotal:t.usdTotal,totalSupply:t.totalSupply,lpPrice:t.lpPrice,tvl:Math.round(t.usdTotal),gaugeRewards:t.gaugeRewards,gaugeCrvApy:t.gaugeCrvApy?{base:Math.round(t.gaugeCrvApy.base*100)/100,boosted:Math.round(t.gaugeCrvApy.boosted*100)/100}:void 0,liquidityUtilization:0,volumeUSD:0,dailyApy:0,weeklyApy:0};for(const u of o)if(g.caseInsensitiveEqual(t.address,u.address)){i.liquidityUtilization=u.volumeUSD/t.usdTotal,i.volumeUSD=Math.round(u.volumeUSD),i.dailyApy=Math.round(u.dailyApy*100)/100,i.weeklyApy=Math.round(u.weeklyApy*100)/100;break}n.push(i)}return n}const N=async e=>{const o=d.getNonLocalhostChainId(e),a=await w(o),n=h.getCrvCvxWithChainId(o).map(s=>s.lpToken.toLowerCase());return a.filter(s=>g.lowerCaseIncludes(n,s.lpTokenAddress))},I=async e=>{const o=d.getNonLocalhostChainId(e),a=await w(o),t=c.getERC20Registry(e).map(i=>i.erc20TokenAddress.toLowerCase());return a.filter(i=>g.lowerCaseIncludes(t,i.lpTokenAddress))};async function R(e,o){let a=0;for(let r=0;r<e.tokensForDeposit.length;r+=1)e.tokensForDeposit[r].usdTotal=Number(v.ethers.utils.formatUnits(BigInt(e.tokensForDeposit[r].poolBalance),Number(e.tokensForDeposit[r].decimals)))*e.tokensForDeposit[r].usdPrice,a+=e.tokensForDeposit[r].usdTotal||0,e.tokensForDeposit[r].symbol.startsWith("am")&&(e.tokensForDeposit[r].symbol=e.tokensForDeposit[r].symbol.slice(2));for(let r=0;r<e.tokensForDeposit.length;r+=1)e.tokensForDeposit[r].weighting=(e.tokensForDeposit[r].usdTotal||0)/a;const n=await o.functions.fee();let t,s,i,u=!1;try{const r=(await o.functions.future_A_time())[0].toNumber(),A=new Date(r*1e3);s=A.toLocaleString(),i=(await o.functions.future_A())[0].toNumber()/100,u=!!r&&A>=new Date,t=(await o.functions.initial_A())[0].toNumber()/100}catch{T.logError("A ramp up not found")}return{poolAddress:o.address,lpToken:e.lpTokenAddress,gaugeAddress:e.gaugeAddress,gaugeCrvApy:e.gaugeCrvApy,currencyReserves:e.coins,liquidityUtilization:e.liquidityUtilization,volumeUSD:e.volumeUSD,dailyApy:e.dailyApy,weeklyApy:e.weeklyApy,gaugeRewards:e?.gaugeRewards,A:(await o.functions.A())[0].toNumber(),initialA:t,futureTime:s,futureA:i,hasRampUp:u,fee:n[0].toNumber()/1e8,daoFee:n[0].toNumber()/2e8,virtualPrice:Number((await o.functions.get_virtual_price())[0].toBigInt()/100000000000000n)/1e4}}exports.getCurvePools=N;exports.getCurvePoolsforPriceFetching=I;exports.getExtendedPoolInfo=R;exports.lpTokens=C;exports.lpTokensToBasePool=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("axios"),v=require("ethers"),l=require("../types/curve.types.cjs"),h=require("../constants/crvCvx.registry.cjs"),c=require("../constants/token-data/ERC20Registry.cjs"),d=require("../constants/chains.constants.cjs"),p=require("../constants/protocol.constants.cjs"),T=require("../error-handling/logError.cjs"),g=require("../functions/utils/caseInsensitive.utils.cjs"),C=new Set,k={},m=(e,o)=>{const a=c.getERC20Registry(e),n=a.find(t=>t.erc20TokenAddress.toLocaleLowerCase()===o.toLocaleLowerCase());return n?n?n.symbol:o:a[0].symbol},D=(e,o)=>{const a=c.getERC20Registry(e),n=a.find(t=>t.erc20TokenAddress.toLocaleLowerCase()===o.toLocaleLowerCase());return n?n.logoURI?n.logoURI:"":a[0].logoURI?a[0].logoURI:""};async function P(e){const o=d.getNonLocalhostChainId(e),a=l.curveNetworkNames[o];return f.get(`https://api.curve.finance/api/getSubgraphData/${a}`,{timeout:7e3}).then(n=>n.data?n.data.data.poolList.map(t=>({address:t.address,volumeUSD:t.volumeUSD,dailyApy:t.latestDailyApy,weeklyApy:t.latestWeeklyApy})):[]).catch(()=>[])}async function L(e,o){const a=d.getNonLocalhostChainId(e),n=l.curveNetworkNames[a];if(!n)return[];try{return await f.get(`https://api.curve.finance/api/getPools/${n}/${o}`).then(t=>t.data?.data.poolData.map(s=>{const{usdTotal:i}=s,u=Number(v.ethers.utils.formatEther(s.totalSupply||"0")),y=u>0?Number(i)/u:0;return{id:s.id,name:s.name,address:s.address,lpToken:m(e,s.lpTokenAddress||""),lpTokenAddress:s.lpTokenAddress,coins:s.underlyingCoins?s.underlyingCoins:s.coins,tokensForDeposit:s.coins,coinAddresses:(s.coinsAddresses||[]).filter(r=>r!==p.zeroAddress).map(r=>m(e,r)),coinLogos:(s.coinsAddresses||[]).filter(r=>r!==p.zeroAddress).map(r=>D(e,r)),gaugeAddress:s.gaugeAddress?s.gaugeAddress:void 0,gaugeCrvApy:s.gaugeCrvApy&&s.gaugeCrvApy[0]&&s.gaugeCrvApy[0]!==0?{base:s.gaugeCrvApy[0],boosted:s.gaugeCrvApy[1]}:void 0,gaugeRewards:s.gaugeRewards,usdTotal:i,totalSupply:u,lpPrice:y,liquidityUtilization:void 0}}))}catch{return[]}}async function b(e){let o=[];return await Promise.all(l.curvePools.map(async a=>{const n=await L(e,a);return o=o.concat(n),n})),Promise.all(o)}async function w(e){const o=await P(e),a=await b(e),n=[];for(const t of a){if(n.map(u=>u.address).includes(t.address))continue;const s=t.lpTokenAddress.toLowerCase();C.add(s.toLowerCase()),k[s]=t.address.toLowerCase();const i={id:t.id,name:t.name,address:t.address,lpToken:s,lpTokenAddress:s,coins:t.coins,coinNames:t.coinAddresses.join(" "),coinAddresses:t.coinAddresses,coinLogos:t.coinLogos,tokensForDeposit:t.tokensForDeposit,gaugeAddress:t.gaugeAddress,usdTotal:t.usdTotal,totalSupply:t.totalSupply,lpPrice:t.lpPrice,tvl:Math.round(t.usdTotal),gaugeRewards:t.gaugeRewards,gaugeCrvApy:t.gaugeCrvApy?{base:Math.round(t.gaugeCrvApy.base*100)/100,boosted:Math.round(t.gaugeCrvApy.boosted*100)/100}:void 0,liquidityUtilization:0,volumeUSD:0,dailyApy:0,weeklyApy:0};for(const u of o)if(g.caseInsensitiveEqual(t.address,u.address)){i.liquidityUtilization=u.volumeUSD/t.usdTotal,i.volumeUSD=Math.round(u.volumeUSD),i.dailyApy=Math.round(u.dailyApy*100)/100,i.weeklyApy=Math.round(u.weeklyApy*100)/100;break}n.push(i)}return n}const N=async e=>{const o=d.getNonLocalhostChainId(e),a=await w(o),n=h.getCrvCvxWithChainId(o).map(s=>s.lpToken.toLowerCase());return a.filter(s=>g.lowerCaseIncludes(n,s.lpTokenAddress))},I=async e=>{const o=d.getNonLocalhostChainId(e),a=await w(o),t=c.getERC20Registry(e).map(i=>i.erc20TokenAddress.toLowerCase());return a.filter(i=>g.lowerCaseIncludes(t,i.lpTokenAddress))};async function R(e,o){let a=0;for(let r=0;r<e.tokensForDeposit.length;r+=1)e.tokensForDeposit[r].usdTotal=Number(v.ethers.utils.formatUnits(BigInt(e.tokensForDeposit[r].poolBalance),Number(e.tokensForDeposit[r].decimals)))*e.tokensForDeposit[r].usdPrice,a+=e.tokensForDeposit[r].usdTotal||0,e.tokensForDeposit[r].symbol.startsWith("am")&&(e.tokensForDeposit[r].symbol=e.tokensForDeposit[r].symbol.slice(2));for(let r=0;r<e.tokensForDeposit.length;r+=1)e.tokensForDeposit[r].weighting=(e.tokensForDeposit[r].usdTotal||0)/a;const n=await o.functions.fee();let t,s,i,u=!1;try{const r=(await o.functions.future_A_time())[0].toNumber(),A=new Date(r*1e3);s=A.toLocaleString(),i=(await o.functions.future_A())[0].toNumber()/100,u=!!r&&A>=new Date,t=(await o.functions.initial_A())[0].toNumber()/100}catch{T.logError("A ramp up not found")}return{poolAddress:o.address,lpToken:e.lpTokenAddress,gaugeAddress:e.gaugeAddress,gaugeCrvApy:e.gaugeCrvApy,currencyReserves:e.coins,liquidityUtilization:e.liquidityUtilization,volumeUSD:e.volumeUSD,dailyApy:e.dailyApy,weeklyApy:e.weeklyApy,gaugeRewards:e?.gaugeRewards,A:(await o.functions.A())[0].toNumber(),initialA:t,futureTime:s,futureA:i,hasRampUp:u,fee:n[0].toNumber()/1e8,daoFee:n[0].toNumber()/2e8,virtualPrice:Number((await o.functions.get_virtual_price())[0].toBigInt()/100000000000000n)/1e4}}exports.getCurvePools=N;exports.getCurvePoolsforPriceFetching=I;exports.getExtendedPoolInfo=R;exports.lpTokens=C;exports.lpTokensToBasePool=k;
@@ -16,7 +16,7 @@ const T = /* @__PURE__ */ new Set(), L = {}, y = (e, o) => {
16
16
  };
17
17
  async function b(e) {
18
18
  const o = u(e), n = f[o];
19
- return A.get(`https://api.curve.fi/api/getSubgraphData/${n}`, { timeout: 7e3 }).then((a) => a.data ? a.data.data.poolList.map((t) => ({
19
+ return A.get(`https://api.curve.finance/api/getSubgraphData/${n}`, { timeout: 7e3 }).then((a) => a.data ? a.data.data.poolList.map((t) => ({
20
20
  address: t.address,
21
21
  volumeUSD: t.volumeUSD,
22
22
  dailyApy: t.latestDailyApy,
@@ -25,27 +25,33 @@ async function b(e) {
25
25
  }
26
26
  async function U(e, o) {
27
27
  const n = u(e), a = f[n];
28
- return a ? A.get(`https://api.curve.fi/api/getPools/${a}/${o}`).then((t) => t.data?.data.poolData.map((s) => {
29
- const { usdTotal: i } = s, d = Number(p.utils.formatEther(s.totalSupply || "0")), c = d > 0 ? Number(i) / d : 0;
30
- return {
31
- id: s.id,
32
- name: s.name,
33
- address: s.address,
34
- lpToken: y(e, s.lpTokenAddress || ""),
35
- lpTokenAddress: s.lpTokenAddress,
36
- coins: s.underlyingCoins ? s.underlyingCoins : s.coins,
37
- tokensForDeposit: s.coins,
38
- coinAddresses: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => y(e, r)),
39
- coinLogos: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => P(e, r)),
40
- gaugeAddress: s.gaugeAddress ? s.gaugeAddress : void 0,
41
- gaugeCrvApy: s.gaugeCrvApy && s.gaugeCrvApy[0] && s.gaugeCrvApy[0] !== 0 ? { base: s.gaugeCrvApy[0], boosted: s.gaugeCrvApy[1] } : void 0,
42
- gaugeRewards: s.gaugeRewards,
43
- usdTotal: i,
44
- totalSupply: d,
45
- lpPrice: c,
46
- liquidityUtilization: void 0
47
- };
48
- })) : [];
28
+ if (!a)
29
+ return [];
30
+ try {
31
+ return await A.get(`https://api.curve.finance/api/getPools/${a}/${o}`).then((t) => t.data?.data.poolData.map((s) => {
32
+ const { usdTotal: i } = s, d = Number(p.utils.formatEther(s.totalSupply || "0")), c = d > 0 ? Number(i) / d : 0;
33
+ return {
34
+ id: s.id,
35
+ name: s.name,
36
+ address: s.address,
37
+ lpToken: y(e, s.lpTokenAddress || ""),
38
+ lpTokenAddress: s.lpTokenAddress,
39
+ coins: s.underlyingCoins ? s.underlyingCoins : s.coins,
40
+ tokensForDeposit: s.coins,
41
+ coinAddresses: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => y(e, r)),
42
+ coinLogos: (s.coinsAddresses || []).filter((r) => r !== m).map((r) => P(e, r)),
43
+ gaugeAddress: s.gaugeAddress ? s.gaugeAddress : void 0,
44
+ gaugeCrvApy: s.gaugeCrvApy && s.gaugeCrvApy[0] && s.gaugeCrvApy[0] !== 0 ? { base: s.gaugeCrvApy[0], boosted: s.gaugeCrvApy[1] } : void 0,
45
+ gaugeRewards: s.gaugeRewards,
46
+ usdTotal: i,
47
+ totalSupply: d,
48
+ lpPrice: c,
49
+ liquidityUtilization: void 0
50
+ };
51
+ }));
52
+ } catch {
53
+ return [];
54
+ }
49
55
  }
50
56
  async function N(e) {
51
57
  let o = [];
@@ -1,10 +1,11 @@
1
- import { CircomDataJsonType, DimDataType } from '../types/circom-data.types';
1
+ import { CircomDataBaseJsonType, DimDataType } from '../types/circom-data.types';
2
2
  export interface HinkalTransactionRequestBody {
3
3
  a: [string, string];
4
4
  b: [[string, string], [string, string]];
5
5
  c: [string, string];
6
6
  dimData: DimDataType;
7
- circomData: CircomDataJsonType;
7
+ circomData: CircomDataBaseJsonType;
8
8
  withPrivateMempool?: boolean;
9
+ withUniswapWorkAround?: boolean;
9
10
  }
10
11
  export declare function callRelayerTransactAPI(chainId: number, requestBody: HinkalTransactionRequestBody): Promise<any>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios"),s=require("../constants/server.constants.cjs"),o=require("./getServerURL.cjs"),n=async(e,t)=>(await r.get(`${o.getDataServerURL(e)}${s.DATA_SERVER_CONFIG.getUserPoints(t)}`)).data;exports.getUserPoints=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),r=require("../constants/server.constants.cjs"),a=require("./getServerURL.cjs"),i=async(e,t)=>(await s.get(`${a.getDataServerURL(e)}${r.DATA_SERVER_CONFIG.getUserPoints(t)}`)).data,c=async(e,t,n,g,o)=>(await s.post(`${a.getDataServerURL(e)}${r.DATA_SERVER_CONFIG.getAssetChanges}`,{chainId:e,from:t,to:n,data:g,value:o}))?.data;exports.getAssetChanges=c;exports.getUserPoints=i;
@@ -1,2 +1,6 @@
1
1
  import { UserPointsBreakdown } from '../types/rewards.types';
2
+ import { AssetChanges } from '../types/API.types';
2
3
  export declare const getUserPoints: (chainId: number, ethereumAddress: string) => Promise<UserPointsBreakdown>;
4
+ export declare const getAssetChanges: (chainId: number, from: string, to: string, data: string, value: string) => Promise<{
5
+ assetChanges: AssetChanges;
6
+ }>;
@@ -1,9 +1,13 @@
1
- import r from "axios";
2
- import { DATA_SERVER_CONFIG as e } from "../constants/server.constants.mjs";
3
- import { getDataServerURL as a } from "./getServerURL.mjs";
4
- const g = async (t, o) => (await r.get(
5
- `${a(t)}${e.getUserPoints(o)}`
6
- )).data;
1
+ import e from "axios";
2
+ import { DATA_SERVER_CONFIG as a } from "../constants/server.constants.mjs";
3
+ import { getDataServerURL as o } from "./getServerURL.mjs";
4
+ const A = async (t, s) => (await e.get(
5
+ `${o(t)}${a.getUserPoints(s)}`
6
+ )).data, $ = async (t, s, r, g, i) => (await e.post(
7
+ `${o(t)}${a.getAssetChanges}`,
8
+ { chainId: t, from: s, to: r, data: g, value: i }
9
+ ))?.data;
7
10
  export {
8
- g as getUserPoints
11
+ $ as getAssetChanges,
12
+ A as getUserPoints
9
13
  };
package/API/duneAPI.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),a=require("./getServerURL.cjs");require("../constants/chains.constants.cjs");require("../constants/vite.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");const u=require("../constants/server.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");const n=async(e,r)=>{const{balances:t}=(await i.get(`${a.getServerURL(r)}${u.API_CONFIG.ROUTES.getPublicWalletInformation(e)}`)).data;return t};exports.getPublicWalletBalance=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("axios"),u=require("./getServerURL.cjs");require("../constants/token-data/index.cjs");require("../constants/chains.constants.cjs");require("../constants/vite.constants.cjs");require("../constants/contracts.constants.cjs");require("../constants/kyc.constants.cjs");const a=require("../constants/server.constants.cjs");require("../constants/coingecko.constants.cjs");require("../constants/axelar.constants.cjs");require("../constants/rewards.constants.cjs");require("../constants/reorg-depths.constants.cjs");require("../constants/addresses.constants.cjs");require("../constants/token.limits.constants.cjs");const n=async(e,r)=>{const{balances:t}=(await i.get(`${u.getServerURL(r)}${a.API_CONFIG.ROUTES.getPublicWalletInformation(e)}`)).data;return t};exports.getPublicWalletBalance=n;
package/API/duneAPI.mjs CHANGED
@@ -1,20 +1,23 @@
1
1
  import i from "axios";
2
2
  import { getServerURL as m } from "./getServerURL.mjs";
3
+ import "../constants/token-data/index.mjs";
3
4
  import "../constants/chains.constants.mjs";
4
5
  import "../constants/vite.constants.mjs";
5
6
  import "../constants/contracts.constants.mjs";
6
7
  import "../constants/kyc.constants.mjs";
7
- import { API_CONFIG as a } from "../constants/server.constants.mjs";
8
+ import { API_CONFIG as p } from "../constants/server.constants.mjs";
8
9
  import "../constants/coingecko.constants.mjs";
9
10
  import "../constants/axelar.constants.mjs";
10
11
  import "../constants/rewards.constants.mjs";
11
12
  import "../constants/reorg-depths.constants.mjs";
12
- const P = async (t, o) => {
13
+ import "../constants/addresses.constants.mjs";
14
+ import "../constants/token.limits.constants.mjs";
15
+ const R = async (t, o) => {
13
16
  const { balances: r } = (await i.get(
14
- `${m(o)}${a.ROUTES.getPublicWalletInformation(t)}`
17
+ `${m(o)}${p.ROUTES.getPublicWalletInformation(t)}`
15
18
  )).data;
16
19
  return r;
17
20
  };
18
21
  export {
19
- P as getPublicWalletBalance
22
+ R as getPublicWalletBalance
20
23
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("axios"),s=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),o=async e=>(await t.get(`${n.getServerURL(e)}${s.API_CONFIG.ROUTES.getCommitmentsSnapshot}`)).data,a=async e=>(await t.get(`${n.getServerURL(e)}${s.API_CONFIG.ROUTES.getAccessTokenSnapshot}`)).data;exports.fetchAccessTokenSnapshot=a;exports.fetchCommitmentsSnapshot=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("axios"),s=require("../constants/server.constants.cjs"),a=require("./getServerURL.cjs"),o=async t=>(await e.get(`${a.getServerURL(t)}${s.API_CONFIG.ROUTES.getCommitmentsSnapshot}`)).data,n=async t=>(await e.get(`${a.getServerURL(t)}${s.API_CONFIG.ROUTES.getAccessTokenSnapshot}`)).data,c=async t=>(await e.get(`${a.getServerURL(t)}${s.API_CONFIG.ROUTES.getApprovalsSnapshot}`)).data;exports.fetchAccessTokenSnapshot=n;exports.fetchApprovalsSnapshot=c;exports.fetchCommitmentsSnapshot=o;
@@ -1,6 +1,6 @@
1
1
  import { MerkleTreeJson } from '../data-structures/merkle-tree/MerkleTree';
2
2
  import { SenderAddressIndexMapJson } from '../data-structures/event-service/AbstractAccessTokenSnapshotService';
3
- import { EncryptedOutputWithSign } from '../types';
3
+ import { ApprovedUtxo, EncryptedOutputWithSign } from '../types';
4
4
  export interface ICommitmentsTreeSnapshot {
5
5
  merkleTree: MerkleTreeJson;
6
6
  latestBlockNumber: number;
@@ -16,5 +16,13 @@ export interface IAccessTokenTreeSnapshot {
16
16
  accessTokenContractAddress: string;
17
17
  chainId: number;
18
18
  }
19
+ export interface IApprovalsSnapshot {
20
+ approvals: Record<string, ApprovedUtxo<string>[]>;
21
+ events: string[];
22
+ latestBlockNumber: number;
23
+ hinkalAddress: string;
24
+ chainId: number;
25
+ }
19
26
  export declare const fetchCommitmentsSnapshot: (chainId: number) => Promise<ICommitmentsTreeSnapshot>;
20
27
  export declare const fetchAccessTokenSnapshot: (chainId: number) => Promise<IAccessTokenTreeSnapshot>;
28
+ export declare const fetchApprovalsSnapshot: (chainId: number) => Promise<IApprovalsSnapshot>;
@@ -1,8 +1,9 @@
1
- import o from "axios";
2
- import { API_CONFIG as e } from "../constants/server.constants.mjs";
3
- import { getServerURL as a } from "./getServerURL.mjs";
4
- const c = async (t) => (await o.get(`${a(t)}${e.ROUTES.getCommitmentsSnapshot}`)).data, r = async (t) => (await o.get(`${a(t)}${e.ROUTES.getAccessTokenSnapshot}`)).data;
1
+ import a from "axios";
2
+ import { API_CONFIG as o } from "../constants/server.constants.mjs";
3
+ import { getServerURL as s } from "./getServerURL.mjs";
4
+ const c = async (t) => (await a.get(`${s(t)}${o.ROUTES.getCommitmentsSnapshot}`)).data, m = async (t) => (await a.get(`${s(t)}${o.ROUTES.getAccessTokenSnapshot}`)).data, r = async (t) => (await a.get(`${s(t)}${o.ROUTES.getApprovalsSnapshot}`)).data;
5
5
  export {
6
- r as fetchAccessTokenSnapshot,
6
+ m as fetchAccessTokenSnapshot,
7
+ r as fetchApprovalsSnapshot,
7
8
  c as fetchCommitmentsSnapshot
8
9
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios"),o=require("../constants/server.constants.cjs"),c=require("./getRelayerURL.cjs"),g=async(e,t,s,a,r,i)=>(await n.get(`${c.getRelayerURL(e)}${o.RELAYER_CONFIG.getGasEstimate(t,s,a,r,i)}`)).data;exports.getGasEstimates=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios"),c=require("../constants/server.constants.cjs"),g=require("./getRelayerURL.cjs"),u=async(e,t,s,a,r,i,o)=>(await n.post(`${g.getRelayerURL(e)}${c.RELAYER_CONFIG.getGasEstimate(t,s,a,r,o)}`,{calls:i})).data;exports.getGasEstimates=u;
@@ -1,9 +1,10 @@
1
1
  import { ExternalActionId } from '../types/external-action.types';
2
2
  import { ValidExternalAction } from '../types/hinkal.types';
3
+ import { CallInfo } from '../types/API.types';
3
4
  interface GetGasEstimateResponse {
4
5
  status: 'success' | 'failed';
5
6
  priceOfTransactionInUSD?: number;
6
7
  priceOfTransactionInToken?: number;
7
8
  }
8
- export declare const getGasEstimates: (chainId: number, tokenAddress: string, externalActionId: ExternalActionId, action: ValidExternalAction | undefined, erc20TokenAddressLength: number, gasAmount?: number) => Promise<GetGasEstimateResponse>;
9
+ export declare const getGasEstimates: (chainId: number, tokenAddress: string, externalActionId: ExternalActionId, action: ValidExternalAction | undefined, erc20TokenAddressLength: number, calls: CallInfo<string>[], gasAmount?: number) => Promise<GetGasEstimateResponse>;
9
10
  export {};
@@ -1,15 +1,16 @@
1
- import s from "axios";
2
- import { RELAYER_CONFIG as i } from "../constants/server.constants.mjs";
3
- import { getRelayerURL as g } from "./getRelayerURL.mjs";
4
- const f = async (t, a, e, r, o, m) => (await s.get(
5
- `${g(t)}${i.getGasEstimate(
1
+ import i from "axios";
2
+ import { RELAYER_CONFIG as p } from "../constants/server.constants.mjs";
3
+ import { getRelayerURL as E } from "./getRelayerURL.mjs";
4
+ const n = async (t, a, o, r, e, s, m) => (await i.post(
5
+ `${E(t)}${p.getGasEstimate(
6
6
  a,
7
- e,
8
- r,
9
7
  o,
8
+ r,
9
+ e,
10
10
  m
11
- )}`
11
+ )}`,
12
+ { calls: s }
12
13
  )).data;
13
14
  export {
14
- f as getGasEstimates
15
+ n as getGasEstimates
15
16
  };
@@ -1,2 +1,2 @@
1
1
  export declare const getServerURL: (chainId: number) => string;
2
- export declare const getDataServerURL: (chainId: number) => "https://ethMainnet-data-server.hinkal.pro" | "http://localhost:7090" | "http://ec2-54-241-116-187.us-west-1.compute.amazonaws.com:7090" | "http://ec2-18-144-10-166.us-west-1.compute.amazonaws.com:7090";
2
+ export declare const getDataServerURL: (chainId: number) => "https://ethMainnet-data-server.hinkal.pro" | "http://localhost:7090" | "http://ec2-54-241-116-187.us-west-1.compute.amazonaws.com:7090" | "http://ec2-54-193-146-86.us-west-1.compute.amazonaws.com:7090";
package/API/index.d.ts CHANGED
@@ -12,3 +12,5 @@ export * from './API';
12
12
  export * from './callCurveAPI';
13
13
  export * from './getRelayerURL';
14
14
  export * from './duneAPI';
15
+ export * from './tenderly.api';
16
+ export * from './token-calls';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),r=require("./getServerURL.cjs"),a=require("../constants/server.constants.cjs"),i=async(e,t)=>(await s.post(`${r.getServerURL(e)}${a.API_CONFIG.ROUTES.isTxStateless}`,{txParameters:t}))?.data;exports.isTxStateless=i;
@@ -0,0 +1,3 @@
1
+ import { TxParametersBase } from '../types/wc.types';
2
+ import { TransactionSimulatorResult } from '../types/TransactionSimulator.types';
3
+ export declare const isTxStateless: (chainId: number, txParameters: TxParametersBase) => Promise<TransactionSimulatorResult<string>>;
@@ -0,0 +1,9 @@
1
+ import o from "axios";
2
+ import { getServerURL as s } from "./getServerURL.mjs";
3
+ import { API_CONFIG as e } from "../constants/server.constants.mjs";
4
+ const p = async (t, r) => (await o.post(`${s(t)}${e.ROUTES.isTxStateless}`, {
5
+ txParameters: r
6
+ }))?.data;
7
+ export {
8
+ p as isTxStateless
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),t=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),c=async(e,r,s,o)=>(await a.post(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.addNickname}`,{ethereumAddress:r,nickname:s,action:o})).data,d=async(e,r)=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.getNickname(r)}`)).data,i=async(e,r,s)=>(await a.get(`${n.getServerURL(r)}${t.API_CONFIG.ROUTES.points(e,s)}`)).data,g=async(e,r)=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.leaderboard(r)}`)).data,p=async(e,r)=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.seasonLeaderboard(r)}`)).data;exports.addNickname=c;exports.getNickname=d;exports.leaderboard=g;exports.points=i;exports.seasonLeaderboard=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),t=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),c=async(e,r,s,o)=>(await a.post(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.addNickname}`,{ethereumAddress:r,nickname:s,action:o})).data,d=async(e,r)=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.getNickname(r)}`)).data,i=async(e,r,s)=>(await a.get(`${n.getServerURL(r)}${t.API_CONFIG.ROUTES.points(e,s)}`)).data,g=async(e,r)=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.leaderboard(r)}`)).data,p=async e=>(await a.get(`${n.getServerURL(e)}${t.API_CONFIG.ROUTES.seasonLeaderboard}`)).data;exports.addNickname=c;exports.getNickname=d;exports.leaderboard=g;exports.points=i;exports.seasonLeaderboard=p;
@@ -4,7 +4,7 @@ interface IGetNickname {
4
4
  nickname: string | undefined;
5
5
  }
6
6
  export declare const getNickname: (chainId: number, ethereumAddress: string) => Promise<IGetNickname>;
7
- export declare const points: (ethereumAddress: string, chainId: number, isWeek: boolean) => Promise<LeaderBoardItem[]>;
8
- export declare const leaderboard: (chainId: number, ethereumAddress: string) => Promise<LeaderboardEntry[]>;
9
- export declare const seasonLeaderboard: (chainId: number, ethereumAddress: string) => Promise<LeaderboardEntry[]>;
7
+ export declare const points: (ethereumAddress: string, chainId: number, week?: number) => Promise<LeaderBoardItem[]>;
8
+ export declare const leaderboard: (chainId: number, week?: number) => Promise<LeaderboardEntry[]>;
9
+ export declare const seasonLeaderboard: (chainId: number) => Promise<LeaderboardEntry[]>;
10
10
  export {};
@@ -5,9 +5,7 @@ const m = async (e, s, a, r) => (await t.post(`${o(e)}${n.ROUTES.addNickname}`,
5
5
  ethereumAddress: s,
6
6
  nickname: a,
7
7
  action: r
8
- })).data, $ = async (e, s) => (await t.get(`${o(e)}${n.ROUTES.getNickname(s)}`)).data, g = async (e, s, a) => (await t.get(`${o(s)}${n.ROUTES.points(e, a)}`)).data, O = async (e, s) => (await t.get(`${o(e)}${n.ROUTES.leaderboard(s)}`)).data, R = async (e, s) => (await t.get(
9
- `${o(e)}${n.ROUTES.seasonLeaderboard(s)}`
10
- )).data;
8
+ })).data, $ = async (e, s) => (await t.get(`${o(e)}${n.ROUTES.getNickname(s)}`)).data, g = async (e, s, a) => (await t.get(`${o(s)}${n.ROUTES.points(e, a)}`)).data, O = async (e, s) => (await t.get(`${o(e)}${n.ROUTES.leaderboard(s)}`)).data, R = async (e) => (await t.get(`${o(e)}${n.ROUTES.seasonLeaderboard}`)).data;
11
9
  export {
12
10
  m as addNickname,
13
11
  $ as getNickname,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("axios"),i="7o1iPUgCIjLI0rSxj2yuz9-Z3052uUc4",d="hinkal-org",l="project",u=`https://api.tenderly.co/api/v1/account/${d}/project/${l}`,a={"X-Access-Key":i},r=async e=>(await s.post(`${u}/simulate`,{...e},{headers:a})).data,n="https://optimism.gateway.tenderly.co/2A3r4RCMoAZVmQOpNqRO29",o=async e=>(await s.post(n,{jsonrpc:"2.0",id:0,method:"tenderly_simulateTransaction",params:e.params},{headers:a})).data,c=async e=>(await s.post(n,{jsonrpc:"2.0",id:0,method:"tenderly_simulateBundle",params:e.params},{headers:a})).data,p=async(e,t)=>(await s.post(n,{jsonrpc:"2.0",id:0,method:"tenderly_getStorageChanges",params:[{address:e,offset:t}]},{headers:a})).data,m={rpcGetStorageChanges:p,rpcSimulateTransaction:o,rpcSimulateBundle:c,simulateTx:r};exports.WALLET_API=m;exports.rpcGetStorageChanges=p;exports.rpcSimulateBundle=c;exports.rpcSimulateTransaction=o;exports.simulateTx=r;exports.tenderlyRpcLinkOptimism=n;
@@ -0,0 +1,12 @@
1
+ import type { RpcSimulateResult, RpcSimulateTransactionBody, RpcSimulateTransactionResponse, RpcTransactionParams, SimulateTxBody, SimulateTxResponse } from '../types/tenderly.api.types';
2
+ export declare const simulateTx: (simulateTxBody: SimulateTxBody) => Promise<SimulateTxResponse>;
3
+ export declare const tenderlyRpcLinkOptimism = "https://optimism.gateway.tenderly.co/2A3r4RCMoAZVmQOpNqRO29";
4
+ export declare const rpcSimulateTransaction: (simulateTxBody: RpcSimulateTransactionBody) => Promise<RpcSimulateTransactionResponse>;
5
+ export declare const rpcSimulateBundle: (simulateTxBody: RpcSimulateTransactionBody<RpcTransactionParams[]>) => Promise<RpcSimulateTransactionResponse<RpcSimulateResult[]>>;
6
+ export declare const rpcGetStorageChanges: (address: string, offset: string) => Promise<any>;
7
+ export declare const WALLET_API: {
8
+ rpcGetStorageChanges: (address: string, offset: string) => Promise<any>;
9
+ rpcSimulateTransaction: (simulateTxBody: RpcSimulateTransactionBody) => Promise<RpcSimulateTransactionResponse>;
10
+ rpcSimulateBundle: (simulateTxBody: RpcSimulateTransactionBody<RpcTransactionParams[]>) => Promise<RpcSimulateTransactionResponse<RpcSimulateResult[]>>;
11
+ simulateTx: (simulateTxBody: SimulateTxBody) => Promise<SimulateTxResponse>;
12
+ };
@@ -0,0 +1,47 @@
1
+ import e from "axios";
2
+ const o = "7o1iPUgCIjLI0rSxj2yuz9-Z3052uUc4", r = "hinkal-org", c = "project", p = `https://api.tenderly.co/api/v1/account/${r}/project/${c}`, a = { "X-Access-Key": o }, i = async (s) => (await e.post(
3
+ `${p}/simulate`,
4
+ { ...s },
5
+ {
6
+ headers: a
7
+ }
8
+ )).data, n = "https://optimism.gateway.tenderly.co/2A3r4RCMoAZVmQOpNqRO29", d = async (s) => (await e.post(
9
+ n,
10
+ { jsonrpc: "2.0", id: 0, method: "tenderly_simulateTransaction", params: s.params },
11
+ {
12
+ headers: a
13
+ }
14
+ )).data, m = async (s) => (await e.post(
15
+ n,
16
+ { jsonrpc: "2.0", id: 0, method: "tenderly_simulateBundle", params: s.params },
17
+ { headers: a }
18
+ )).data, l = async (s, t) => (await e.post(
19
+ n,
20
+ {
21
+ jsonrpc: "2.0",
22
+ id: 0,
23
+ method: "tenderly_getStorageChanges",
24
+ params: [
25
+ {
26
+ address: s,
27
+ offset: t
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ headers: a
33
+ }
34
+ )).data, h = {
35
+ rpcGetStorageChanges: l,
36
+ rpcSimulateTransaction: d,
37
+ rpcSimulateBundle: m,
38
+ simulateTx: i
39
+ };
40
+ export {
41
+ h as WALLET_API,
42
+ l as rpcGetStorageChanges,
43
+ m as rpcSimulateBundle,
44
+ d as rpcSimulateTransaction,
45
+ i as simulateTx,
46
+ n as tenderlyRpcLinkOptimism
47
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("axios"),o=require("../constants/server.constants.cjs"),n=require("./getServerURL.cjs"),s=async(e,t)=>(await r.post(`${n.getServerURL(e)}${o.API_CONFIG.ROUTES.getTokensInfo}`,{tokenAddresses:t})).data;exports.tokensInfoCall=s;
@@ -0,0 +1,2 @@
1
+ import { ERC20Token } from '../types';
2
+ export declare const tokensInfoCall: (chainId: number, tokenAddresses: string[]) => Promise<(ERC20Token | undefined)[]>;
@@ -0,0 +1,9 @@
1
+ import r from "axios";
2
+ import { API_CONFIG as e } from "../constants/server.constants.mjs";
3
+ import { getServerURL as a } from "./getServerURL.mjs";
4
+ const f = async (o, t) => (await r.post(`${a(o)}${e.ROUTES.getTokensInfo}`, {
5
+ tokenAddresses: t
6
+ })).data;
7
+ export {
8
+ f as tokensInfoCall
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),s=require("./getServerURL.cjs"),n=require("../constants/server.constants.cjs"),u=async(t,e)=>{const{data:r}=await a.get(`${s.getServerURL(t)}${n.API_CONFIG.ROUTES.verificationStartDate(e)}`);return r},S=async(t,e,r)=>(await a.get(`${s.getServerURL(t)}${n.API_CONFIG.ROUTES.userGetTransactions(e,r)}`)).data,T=async(t,e,r,i,o,c)=>(await a.post(`${s.getServerURL(t)}${n.API_CONFIG.ROUTES.userVerifyTransactions}`,{transactionHashes:e,zkCallDataArray:r,backendToken:i,ethereumAddress:o,week:c})).data;exports.userGetTransactions=S;exports.userVerifyTransactions=T;exports.verificationStartDate=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("axios"),n=require("./getServerURL.cjs"),i=require("../constants/server.constants.cjs"),c=async(e,t)=>{const{data:s}=await a.get(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userGetLatestCertifiedHashes(t)}`);return s},u=async(e,t,s,r)=>(await a.get(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userGetTransactions(t,s,r)}`)).data,T=async(e,t,s,r,o)=>(await a.post(`${n.getServerURL(e)}${i.API_CONFIG.ROUTES.userVerifyTransactions}`,{transactionHashes:t,zkCallDataArray:s,backendToken:r,ethereumAddress:o})).data;exports.userGetLatestCertifiedHashes=c;exports.userGetTransactions=u;exports.userVerifyTransactions=T;