@merkl/api 0.10.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +125 -0
  3. package/dist/database/api/.generated/default.d.ts +1 -0
  4. package/dist/database/api/.generated/edge.d.ts +1 -0
  5. package/dist/database/api/.generated/index.d.ts +36404 -0
  6. package/dist/database/api/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
  7. package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  8. package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  9. package/dist/database/api/.generated/package.json +84 -0
  10. package/dist/database/api/.generated/runtime/index-browser.d.ts +365 -0
  11. package/dist/database/api/.generated/runtime/library.d.ts +3273 -0
  12. package/dist/database/api/.generated/schema.prisma +366 -0
  13. package/dist/database/api/.generated/wasm.d.ts +1 -0
  14. package/dist/database/api/seeder/resources/protocol.d.ts +353 -0
  15. package/dist/database/engine/.generated/default.d.ts +1 -0
  16. package/dist/database/engine/.generated/edge.d.ts +1 -0
  17. package/dist/database/engine/.generated/index.d.ts +16342 -0
  18. package/dist/database/engine/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
  19. package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  20. package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  21. package/dist/database/engine/.generated/package.json +84 -0
  22. package/dist/database/engine/.generated/runtime/index-browser.d.ts +365 -0
  23. package/dist/database/engine/.generated/runtime/library.d.ts +3273 -0
  24. package/dist/database/engine/.generated/schema.prisma +205 -0
  25. package/dist/database/engine/.generated/wasm.d.ts +1 -0
  26. package/dist/src/backgroundJobs/index.d.ts +1 -0
  27. package/dist/src/backgroundJobs/jobs/campaignsCacheUpdater.d.ts +45 -0
  28. package/dist/src/backgroundJobs/jobs/health.d.ts +40 -0
  29. package/dist/src/backgroundJobs/jobs/opportunityUpdater.d.ts +37 -0
  30. package/dist/src/backgroundJobs/jobs/priceUpdater.d.ts +35 -0
  31. package/dist/src/backgroundJobs/jobs/sync.d.ts +39 -0
  32. package/dist/src/cache/declaration.d.ts +153 -0
  33. package/dist/src/cache/index.d.ts +52 -0
  34. package/dist/src/cache/redis.d.ts +311 -0
  35. package/dist/src/constants.d.ts +349 -0
  36. package/dist/src/eden/index.d.ts +4882 -0
  37. package/dist/src/eden/index.js +4 -0
  38. package/dist/src/entities/campaign.d.ts +58 -0
  39. package/dist/src/entities/opportunity.d.ts +17 -0
  40. package/dist/src/errors/BadRequest.error.d.ts +4 -0
  41. package/dist/src/errors/Conflict.error.d.ts +4 -0
  42. package/dist/src/errors/HttpError.d.ts +6 -0
  43. package/dist/src/errors/NotFound.error.d.ts +4 -0
  44. package/dist/src/errors/Opportunity.error.d.ts +6 -0
  45. package/dist/src/errors/Unauthorized.error.d.ts +4 -0
  46. package/dist/src/errors/index.d.ts +5 -0
  47. package/dist/src/guards/BackOffice.guard.d.ts +7 -0
  48. package/dist/src/guards/Engine.guard.d.ts +7 -0
  49. package/dist/src/guards/TokenAuth.guard.d.ts +7 -0
  50. package/dist/src/hooks/checkQueryAddressValidity.d.ts +21 -0
  51. package/dist/src/hooks/checkQueryChainIdValidity.d.ts +21 -0
  52. package/dist/src/index.d.ts +1889 -0
  53. package/dist/src/internal/controllers/endingCampaigns.d.ts +42 -0
  54. package/dist/src/internal/controllers/unclaimed.d.ts +43 -0
  55. package/dist/src/internal/index.d.ts +1 -0
  56. package/dist/src/libs/campaigns/campaignTypes/AjnaDynamicData.d.ts +5 -0
  57. package/dist/src/libs/campaigns/campaignTypes/BadgerDynamicData.d.ts +5 -0
  58. package/dist/src/libs/campaigns/campaignTypes/CLAMMDynamicData.d.ts +3 -0
  59. package/dist/src/libs/campaigns/campaignTypes/CompoundDynamicData.d.ts +3 -0
  60. package/dist/src/libs/campaigns/campaignTypes/DolomiteDynamicData.d.ts +5 -0
  61. package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.d.ts +3 -0
  62. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/eulerVaultNames.d.ts +1 -0
  63. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/factoryFinder.d.ts +5 -0
  64. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/getBlacklistedSupply.d.ts +1 -0
  65. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/metamorphoTvl.d.ts +1 -0
  66. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/spliceTVL.d.ts +7 -0
  67. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +45 -0
  68. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesPrices.d.ts +4 -0
  69. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.d.ts +23 -0
  70. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound2.d.ts +7 -0
  71. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound3.d.ts +6 -0
  72. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound4.d.ts +4 -0
  73. package/dist/src/libs/campaigns/campaignTypes/ERC20_SNAPSHOTDynamicData.d.ts +5 -0
  74. package/dist/src/libs/campaigns/campaignTypes/EulerDynamicData.d.ts +3 -0
  75. package/dist/src/libs/campaigns/campaignTypes/JSON_AIRDROPDynamicData.d.ts +5 -0
  76. package/dist/src/libs/campaigns/campaignTypes/MORPHODynamicData.d.ts +5 -0
  77. package/dist/src/libs/campaigns/campaignTypes/RadiantDynamicData.d.ts +3 -0
  78. package/dist/src/libs/campaigns/campaignTypes/SILODynamicData.d.ts +7 -0
  79. package/dist/src/libs/campaigns/campaignsDynamicData.d.ts +3 -0
  80. package/dist/src/libs/campaigns/getCampaigns.d.ts +1 -0
  81. package/dist/src/libs/campaigns/getRewards.d.ts +29 -0
  82. package/dist/src/libs/campaigns/utils/fetchA51Strategies.d.ts +18 -0
  83. package/dist/src/libs/campaigns/utils/fetchClamInfo.d.ts +2 -0
  84. package/dist/src/libs/campaigns/utils/fetchLogs.d.ts +10 -0
  85. package/dist/src/libs/campaigns/utils/getCompV2ForksVaults.d.ts +19 -0
  86. package/dist/src/libs/campaigns/utils/getContractCreationBlock.d.ts +2 -0
  87. package/dist/src/libs/campaigns/utils/getDolomiteMarkets.d.ts +7 -0
  88. package/dist/src/libs/campaigns/utils/getEulerV2Vaults.d.ts +16 -0
  89. package/dist/src/libs/campaigns/utils/getLastEligibilityRatio.d.ts +2 -0
  90. package/dist/src/libs/computeFee.d.ts +4 -0
  91. package/dist/src/libs/custom/twtParticipants.d.ts +6 -0
  92. package/dist/src/libs/deprecated-merklv3/index.d.ts +5 -0
  93. package/dist/src/libs/getTokensList.d.ts +27 -0
  94. package/dist/src/libs/merklChainData.d.ts +4 -0
  95. package/dist/src/libs/parse/marketsWithCache.d.ts +4 -0
  96. package/dist/src/libs/positions/ajna/index.d.ts +41 -0
  97. package/dist/src/libs/positions/badger/index.d.ts +27 -0
  98. package/dist/src/libs/positions/clamm/index.d.ts +8 -0
  99. package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +5 -0
  100. package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +8 -0
  101. package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +11 -0
  102. package/dist/src/libs/positions/clamm/thegraph/index.d.ts +37 -0
  103. package/dist/src/libs/positions/compound/index.d.ts +26 -0
  104. package/dist/src/libs/positions/dolomite/index.d.ts +17 -0
  105. package/dist/src/libs/positions/erc20/index.d.ts +5 -0
  106. package/dist/src/libs/positions/euler/index.d.ts +5 -0
  107. package/dist/src/libs/positions/index.d.ts +3 -0
  108. package/dist/src/libs/positions/morpho/index.d.ts +40 -0
  109. package/dist/src/libs/positions/prepareFetch.d.ts +22 -0
  110. package/dist/src/libs/positions/silo/index.d.ts +5 -0
  111. package/dist/src/libs/positions/types.d.ts +20 -0
  112. package/dist/src/libs/reports/campaignReport.d.ts +9 -0
  113. package/dist/src/libs/reports/mainParameterRewards.d.ts +3 -0
  114. package/dist/src/libs/rewards/userRewards.d.ts +2 -0
  115. package/dist/src/libs/staticCampaigns.d.ts +2 -0
  116. package/dist/src/libs/tokens/balances.d.ts +11 -0
  117. package/dist/src/libs/tokens/tokenInfo.d.ts +8 -0
  118. package/dist/src/modules/v4/accounting/accounting.controller.d.ts +206 -0
  119. package/dist/src/modules/v4/accounting/accounting.model.d.ts +32 -0
  120. package/dist/src/modules/v4/accounting/accounting.repository.d.ts +99 -0
  121. package/dist/src/modules/v4/accounting/accounting.service.d.ts +44 -0
  122. package/dist/src/modules/v4/accounting/index.d.ts +3 -0
  123. package/dist/src/modules/v4/apr/apr.controller.d.ts +0 -0
  124. package/dist/src/modules/v4/apr/apr.model.d.ts +15 -0
  125. package/dist/src/modules/v4/apr/apr.repository.d.ts +0 -0
  126. package/dist/src/modules/v4/apr/apr.service.d.ts +6 -0
  127. package/dist/src/modules/v4/apr/index.d.ts +2 -0
  128. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +122 -0
  129. package/dist/src/modules/v4/blacklist/blacklist.model.d.ts +15 -0
  130. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +24 -0
  131. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +24 -0
  132. package/dist/src/modules/v4/blacklist/index.d.ts +3 -0
  133. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +139 -0
  134. package/dist/src/modules/v4/campaign/campaign.model.d.ts +85 -0
  135. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +110 -0
  136. package/dist/src/modules/v4/campaign/campaign.service.d.ts +180 -0
  137. package/dist/src/modules/v4/campaign/index.d.ts +3 -0
  138. package/dist/src/modules/v4/chain/chain.controller.d.ts +91 -0
  139. package/dist/src/modules/v4/chain/chain.model.d.ts +19 -0
  140. package/dist/src/modules/v4/chain/chain.repository.d.ts +66 -0
  141. package/dist/src/modules/v4/chain/chain.service.d.ts +42 -0
  142. package/dist/src/modules/v4/chain/index.d.ts +3 -0
  143. package/dist/src/modules/v4/enso/enso.model.d.ts +130 -0
  144. package/dist/src/modules/v4/enso/enso.service.d.ts +47 -0
  145. package/dist/src/modules/v4/explorer/explorer.repository.d.ts +8 -0
  146. package/dist/src/modules/v4/explorer/explorer.service.d.ts +8 -0
  147. package/dist/src/modules/v4/explorer/index.d.ts +1 -0
  148. package/dist/src/modules/v4/index.d.ts +4 -0
  149. package/dist/src/modules/v4/merklRoot/index.d.ts +3 -0
  150. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +44 -0
  151. package/dist/src/modules/v4/merklRoot/merklRoot.model.d.ts +6 -0
  152. package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +21 -0
  153. package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +34 -0
  154. package/dist/src/modules/v4/opportunity/index.d.ts +3 -0
  155. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +349 -0
  156. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +113 -0
  157. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +432 -0
  158. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +413 -0
  159. package/dist/src/modules/v4/opportunity/subservices/getAjnaMetadata.service.d.ts +3 -0
  160. package/dist/src/modules/v4/opportunity/subservices/getBadgerMetadata.service.d.ts +3 -0
  161. package/dist/src/modules/v4/opportunity/subservices/getClammMetadata.service.d.ts +3 -0
  162. package/dist/src/modules/v4/opportunity/subservices/getCompoundMetadata.service.d.ts +3 -0
  163. package/dist/src/modules/v4/opportunity/subservices/getDolomiteMetadata.service.d.ts +3 -0
  164. package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.d.ts +3 -0
  165. package/dist/src/modules/v4/opportunity/subservices/getErc20SnapshotMetadata.service.d.ts +3 -0
  166. package/dist/src/modules/v4/opportunity/subservices/getEulerMetadata.service.d.ts +3 -0
  167. package/dist/src/modules/v4/opportunity/subservices/getJsonAirDropMetadata.service.d.ts +3 -0
  168. package/dist/src/modules/v4/opportunity/subservices/getMorphoMetadata.service.d.ts +3 -0
  169. package/dist/src/modules/v4/opportunity/subservices/getRadiantMetadata.service.d.ts +3 -0
  170. package/dist/src/modules/v4/opportunity/subservices/getSiloMetadata.service.d.ts +3 -0
  171. package/dist/src/modules/v4/opportunity/transform-id.pipe.d.ts +5 -0
  172. package/dist/src/modules/v4/opportunity/validate-id.pipe.d.ts +5 -0
  173. package/dist/src/modules/v4/participate/participate.controller.d.ts +120 -0
  174. package/dist/src/modules/v4/participate/participate.model.d.ts +51 -0
  175. package/dist/src/modules/v4/participate/participate.service.d.ts +8 -0
  176. package/dist/src/modules/v4/price/index.d.ts +3 -0
  177. package/dist/src/modules/v4/price/price.controller.d.ts +169 -0
  178. package/dist/src/modules/v4/price/price.model.d.ts +32 -0
  179. package/dist/src/modules/v4/price/price.repository.d.ts +33 -0
  180. package/dist/src/modules/v4/price/price.service.d.ts +33 -0
  181. package/dist/src/modules/v4/prisma/index.d.ts +32 -0
  182. package/dist/src/modules/v4/protocol/index.d.ts +3 -0
  183. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +87 -0
  184. package/dist/src/modules/v4/protocol/protocol.model.d.ts +27 -0
  185. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +37 -0
  186. package/dist/src/modules/v4/protocol/protocol.service.d.ts +10 -0
  187. package/dist/src/modules/v4/reward/index.d.ts +3 -0
  188. package/dist/src/modules/v4/reward/reward.controller.d.ts +158 -0
  189. package/dist/src/modules/v4/reward/reward.model.d.ts +158 -0
  190. package/dist/src/modules/v4/reward/reward.repository.d.ts +158 -0
  191. package/dist/src/modules/v4/reward/reward.service.d.ts +523 -0
  192. package/dist/src/modules/v4/reward/rewardConvertor.service.d.ts +14 -0
  193. package/dist/src/modules/v4/router.d.ts +1865 -0
  194. package/dist/src/modules/v4/status/index.d.ts +3 -0
  195. package/dist/src/modules/v4/status/status.controller.d.ts +143 -0
  196. package/dist/src/modules/v4/status/status.model.d.ts +23 -0
  197. package/dist/src/modules/v4/status/status.repository.d.ts +68 -0
  198. package/dist/src/modules/v4/status/status.service.d.ts +38 -0
  199. package/dist/src/modules/v4/token/index.d.ts +3 -0
  200. package/dist/src/modules/v4/token/token.controller.d.ts +131 -0
  201. package/dist/src/modules/v4/token/token.model.d.ts +35 -0
  202. package/dist/src/modules/v4/token/token.repository.d.ts +59 -0
  203. package/dist/src/modules/v4/token/token.service.d.ts +165 -0
  204. package/dist/src/modules/v4/tvl/index.d.ts +2 -0
  205. package/dist/src/modules/v4/tvl/tvl.controller.d.ts +0 -0
  206. package/dist/src/modules/v4/tvl/tvl.model.d.ts +15 -0
  207. package/dist/src/modules/v4/tvl/tvl.repository.d.ts +0 -0
  208. package/dist/src/modules/v4/tvl/tvl.service.d.ts +6 -0
  209. package/dist/src/modules/v4/uniswapV4/index.d.ts +4 -0
  210. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.d.ts +52 -0
  211. package/dist/src/modules/v4/uniswapV4/uniswapV4.model.d.ts +15 -0
  212. package/dist/src/modules/v4/uniswapV4/uniswapV4.repository.d.ts +2 -0
  213. package/dist/src/modules/v4/uniswapV4/uniswapV4.service.d.ts +20 -0
  214. package/dist/src/modules/v4/user/index.d.ts +3 -0
  215. package/dist/src/modules/v4/user/user.controller.d.ts +325 -0
  216. package/dist/src/modules/v4/user/user.model.d.ts +25 -0
  217. package/dist/src/modules/v4/user/user.repository.d.ts +19 -0
  218. package/dist/src/modules/v4/user/user.service.d.ts +19 -0
  219. package/dist/src/plugins/error-handling.plugin.d.ts +28 -0
  220. package/dist/src/plugins/logger.plugin.d.ts +21 -0
  221. package/dist/src/routes/v1/allowances.d.ts +66 -0
  222. package/dist/src/routes/v1/balances.d.ts +49 -0
  223. package/dist/src/routes/v1/prices.d.ts +41 -0
  224. package/dist/src/routes/v1/tokens.d.ts +44 -0
  225. package/dist/src/routes/v2/merkl.d.ts +54 -0
  226. package/dist/src/routes/v3/ERC20Campaigns.d.ts +1910 -0
  227. package/dist/src/routes/v3/app.d.ts +39 -0
  228. package/dist/src/routes/v3/blacklist.d.ts +1910 -0
  229. package/dist/src/routes/v3/campaign/delay.d.ts +41 -0
  230. package/dist/src/routes/v3/campaignClaims.d.ts +43 -0
  231. package/dist/src/routes/v3/campaignReport.d.ts +42 -0
  232. package/dist/src/routes/v3/campaignUnclaimed.d.ts +43 -0
  233. package/dist/src/routes/v3/campaigns.d.ts +1915 -0
  234. package/dist/src/routes/v3/campaignsForMainParameter.d.ts +42 -0
  235. package/dist/src/routes/v3/campaignsInfo.d.ts +1902 -0
  236. package/dist/src/routes/v3/campaignsRewardsReport.d.ts +43 -0
  237. package/dist/src/routes/v3/claims.d.ts +45 -0
  238. package/dist/src/routes/v3/compoundV2.d.ts +40 -0
  239. package/dist/src/routes/v3/createCampaign.d.ts +46 -0
  240. package/dist/src/routes/v3/dolomite.d.ts +40 -0
  241. package/dist/src/routes/v3/euler.d.ts +40 -0
  242. package/dist/src/routes/v3/exports/campaigns.d.ts +42 -0
  243. package/dist/src/routes/v3/fetch.d.ts +45 -0
  244. package/dist/src/routes/v3/health.d.ts +39 -0
  245. package/dist/src/routes/v3/lostyield.d.ts +52 -0
  246. package/dist/src/routes/v3/merkl.d.ts +87 -0
  247. package/dist/src/routes/v3/morphoMarkets.d.ts +61 -0
  248. package/dist/src/routes/v3/morphoVaults.d.ts +51 -0
  249. package/dist/src/routes/v3/multiChainPositions.d.ts +1909 -0
  250. package/dist/src/routes/v3/opportunity.d.ts +1946 -0
  251. package/dist/src/routes/v3/overview.d.ts +60 -0
  252. package/dist/src/routes/v3/parse.d.ts +46 -0
  253. package/dist/src/routes/v3/payload.d.ts +57 -0
  254. package/dist/src/routes/v3/poolInfo.d.ts +42 -0
  255. package/dist/src/routes/v3/positions.d.ts +1927 -0
  256. package/dist/src/routes/v3/radiant.d.ts +55 -0
  257. package/dist/src/routes/v3/recipients.d.ts +38 -0
  258. package/dist/src/routes/v3/rewards.d.ts +1910 -0
  259. package/dist/src/routes/v3/rewardsReport.d.ts +48 -0
  260. package/dist/src/routes/v3/rootForTimestamp.d.ts +52 -0
  261. package/dist/src/routes/v3/silo.d.ts +52 -0
  262. package/dist/src/routes/v3/token.d.ts +50 -0
  263. package/dist/src/routes/v3/tokenUnclaimed.d.ts +43 -0
  264. package/dist/src/routes/v3/twt/participants.d.ts +40 -0
  265. package/dist/src/routes/v3/updates.d.ts +1907 -0
  266. package/dist/src/routes/v3/userRewards.d.ts +1931 -0
  267. package/dist/src/types/index.d.ts +46 -0
  268. package/dist/src/types/parameters/Action.d.ts +4 -0
  269. package/dist/src/types/parameters/Chain.d.ts +4 -0
  270. package/dist/src/types/parameters/ChainCampaignId.d.ts +4 -0
  271. package/dist/src/types/parameters/MainParameter.d.ts +4 -0
  272. package/dist/src/types/parameters/OpportunityId.d.ts +4 -0
  273. package/dist/src/types/parameters/Timestamp.d.ts +4 -0
  274. package/dist/src/types/parameters/Type.d.ts +4 -0
  275. package/dist/src/types/parameters/index.d.ts +36 -0
  276. package/dist/src/types/returnTypes.d.ts +27 -0
  277. package/dist/src/types/utils.d.ts +5 -0
  278. package/dist/src/utils/addString.d.ts +2 -0
  279. package/dist/src/utils/bigintToString.d.ts +1 -0
  280. package/dist/src/utils/crypto.d.ts +1 -0
  281. package/dist/src/utils/error.d.ts +53 -0
  282. package/dist/src/utils/execute.d.ts +32 -0
  283. package/dist/src/utils/generic.d.ts +24 -0
  284. package/dist/src/utils/hashArray.d.ts +1 -0
  285. package/dist/src/utils/lastBlockBefore.d.ts +3 -0
  286. package/dist/src/utils/logger.d.ts +24 -0
  287. package/dist/src/utils/pricer.d.ts +52 -0
  288. package/dist/src/utils/prices/chainlinkRead.d.ts +4 -0
  289. package/dist/src/utils/prices/curveVirtualPrice.d.ts +4 -0
  290. package/dist/src/utils/prices/getDQUICK.d.ts +4 -0
  291. package/dist/src/utils/prices/priceFetcherFactory.d.ts +10 -0
  292. package/dist/src/utils/prices/priceService.d.ts +13 -0
  293. package/dist/src/utils/prices/services/coinGeckoService.d.ts +12 -0
  294. package/dist/src/utils/prices/services/defillamaService.d.ts +12 -0
  295. package/dist/src/utils/prices/services/dexScreenerService.d.ts +12 -0
  296. package/dist/src/utils/prices/services/erc4626Service.d.ts +9 -0
  297. package/dist/src/utils/prices/services/getERC4626.d.ts +4 -0
  298. package/dist/src/utils/prices/services/indexCoopService.d.ts +12 -0
  299. package/dist/src/utils/prices/services/priceFetcher.d.ts +8 -0
  300. package/dist/src/utils/prices/uniV2Price.d.ts +7 -0
  301. package/dist/src/utils/prisma.d.ts +16 -0
  302. package/dist/src/utils/providers.d.ts +13 -0
  303. package/dist/src/utils/queries/activeCampaigns.d.ts +3 -0
  304. package/dist/src/utils/queries/allCampaigns.d.ts +6 -0
  305. package/dist/src/utils/queries/campaignsForMainParameter.d.ts +2 -0
  306. package/dist/src/utils/queries/claimsOverTime.d.ts +8 -0
  307. package/dist/src/utils/queries/endingCampaigns.d.ts +10 -0
  308. package/dist/src/utils/queries/futureCampaigns.d.ts +3 -0
  309. package/dist/src/utils/queries/mainParameterCampaigns.d.ts +5 -0
  310. package/dist/src/utils/queries/rewardsAmount.d.ts +10 -0
  311. package/dist/src/utils/queries/unclaimed.d.ts +11 -0
  312. package/dist/src/utils/rateLimit.d.ts +63 -0
  313. package/dist/src/utils/stryke.d.ts +2 -0
  314. package/dist/src/utils/throw.d.ts +4 -0
  315. package/dist/src/utils/trace.d.ts +26 -0
  316. package/dist/src/utils/validation.d.ts +5 -0
  317. package/dist/tsconfig.package.tsbuildinfo +1 -0
  318. package/package.json +91 -0
@@ -0,0 +1,4882 @@
1
+ import type { Campaign as CampaignResource } from "../modules/v4";
2
+ import type { CampaignType } from "../../database/api/.generated";
3
+ declare const eden: {
4
+ valueOf: {};
5
+ index: {
6
+ get: (options?: {
7
+ headers?: Record<string, unknown> | undefined;
8
+ query?: Record<string, unknown> | undefined;
9
+ fetch?: RequestInit | undefined;
10
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
11
+ 200: string;
12
+ }>>;
13
+ };
14
+ v4: {
15
+ opportunities: ((params: {
16
+ id: string | number;
17
+ }) => {
18
+ get: (options?: {
19
+ headers?: Record<string, unknown> | undefined;
20
+ query?: Record<string, unknown> | undefined;
21
+ fetch?: RequestInit | undefined;
22
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
23
+ 200: {
24
+ aprRecord: {
25
+ cumulated: number;
26
+ cummulated: number;
27
+ timestamp: bigint;
28
+ breakdowns: {
29
+ id: number;
30
+ identifier: string;
31
+ type: import("../../database/api/.generated").$Enums.AprType;
32
+ value: number;
33
+ aprRecordId: string;
34
+ }[];
35
+ };
36
+ tvlRecord: {
37
+ id: string;
38
+ total: number;
39
+ timestamp: bigint;
40
+ breakdowns: {
41
+ id: number;
42
+ identifier: string;
43
+ type: import("../../database/api/.generated").$Enums.TvlType;
44
+ value: number;
45
+ tvlRecordId: string;
46
+ }[];
47
+ };
48
+ rewardsRecord: {
49
+ id: string;
50
+ total: number;
51
+ timestamp: bigint;
52
+ breakdowns: {
53
+ id: number;
54
+ value: number;
55
+ campaignId: string;
56
+ dailyRewardsRecordId: string;
57
+ }[];
58
+ };
59
+ id: string;
60
+ tokens: {
61
+ id: string;
62
+ name: string | null;
63
+ chainId: number;
64
+ address: string;
65
+ decimals: number;
66
+ symbol: string;
67
+ icon: string;
68
+ verified: boolean;
69
+ price: number | null;
70
+ }[];
71
+ chain: {
72
+ id: number;
73
+ name: string;
74
+ icon: string;
75
+ };
76
+ protocol: {
77
+ id: string;
78
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
79
+ name: string;
80
+ description: string;
81
+ url: string;
82
+ icon: string;
83
+ } | undefined;
84
+ name: string;
85
+ type: import("../../database/api/.generated").$Enums.CampaignType;
86
+ status: import("../../database/api/.generated").$Enums.Status;
87
+ tags: string[];
88
+ identifier: string;
89
+ chainId: number;
90
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
91
+ tvl: number;
92
+ apr: number;
93
+ dailyRewards: number;
94
+ } | null | undefined;
95
+ }>>;
96
+ campaigns: {
97
+ get: (options?: {
98
+ headers?: Record<string, unknown> | undefined;
99
+ query?: Record<string, unknown> | undefined;
100
+ fetch?: RequestInit | undefined;
101
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
102
+ 200: {
103
+ aprRecord: {
104
+ cumulated: number;
105
+ cummulated: number;
106
+ timestamp: bigint;
107
+ breakdowns: {
108
+ id: number;
109
+ identifier: string;
110
+ type: import("../../database/api/.generated").$Enums.AprType;
111
+ value: number;
112
+ aprRecordId: string;
113
+ }[];
114
+ };
115
+ tvlRecord: {
116
+ id: string;
117
+ total: number;
118
+ timestamp: bigint;
119
+ breakdowns: {
120
+ id: number;
121
+ identifier: string;
122
+ type: import("../../database/api/.generated").$Enums.TvlType;
123
+ value: number;
124
+ tvlRecordId: string;
125
+ }[];
126
+ };
127
+ rewardsRecord: {
128
+ id: string;
129
+ total: number;
130
+ timestamp: bigint;
131
+ breakdowns: {
132
+ id: number;
133
+ value: number;
134
+ campaignId: string;
135
+ dailyRewardsRecordId: string;
136
+ }[];
137
+ };
138
+ id: string;
139
+ tokens: {
140
+ id: string;
141
+ name: string | null;
142
+ chainId: number;
143
+ address: string;
144
+ decimals: number;
145
+ symbol: string;
146
+ icon: string;
147
+ verified: boolean;
148
+ price: number | null;
149
+ }[];
150
+ chain: {
151
+ id: number;
152
+ name: string;
153
+ icon: string;
154
+ };
155
+ protocol: {
156
+ id: string;
157
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
158
+ name: string;
159
+ description: string;
160
+ url: string;
161
+ icon: string;
162
+ } | undefined;
163
+ name: string;
164
+ type: import("../../database/api/.generated").$Enums.CampaignType;
165
+ status: import("../../database/api/.generated").$Enums.Status;
166
+ tags: string[];
167
+ identifier: string;
168
+ chainId: number;
169
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
170
+ tvl: number;
171
+ apr: number;
172
+ dailyRewards: number;
173
+ } | null | undefined;
174
+ }>>;
175
+ };
176
+ }) & {
177
+ index: {
178
+ post: (body: {
179
+ name?: string | undefined;
180
+ type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4";
181
+ tokens: {
182
+ chainId: number;
183
+ address: string;
184
+ }[];
185
+ status: "NONE" | "PAST" | "LIVE" | "SOON";
186
+ identifier: string;
187
+ chainId: number;
188
+ action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW";
189
+ protocols: string[];
190
+ mainProtocol: string;
191
+ }, options: {
192
+ headers: {
193
+ authorization: string;
194
+ };
195
+ query?: Record<string, unknown> | undefined;
196
+ fetch?: RequestInit | undefined;
197
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
198
+ 200: void;
199
+ }>>;
200
+ get: (options: {
201
+ headers?: Record<string, unknown> | undefined;
202
+ query: {
203
+ sort?: "tvl" | "apr" | "rewards" | undefined;
204
+ name?: string | undefined;
205
+ tokens?: string | undefined;
206
+ status?: string | undefined;
207
+ items?: number | undefined;
208
+ tags?: string | undefined;
209
+ chainId?: string | undefined;
210
+ page?: number | undefined;
211
+ action?: string | undefined;
212
+ mainProtocolId?: string | undefined;
213
+ order?: "asc" | "desc" | undefined;
214
+ };
215
+ fetch?: RequestInit | undefined;
216
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
217
+ 200: ({
218
+ aprRecord: {
219
+ cumulated: number;
220
+ cummulated: number;
221
+ timestamp: bigint;
222
+ breakdowns: {
223
+ id: number;
224
+ identifier: string;
225
+ type: import("../../database/api/.generated").$Enums.AprType;
226
+ value: number;
227
+ aprRecordId: string;
228
+ }[];
229
+ };
230
+ tvlRecord: {
231
+ id: string;
232
+ total: number;
233
+ timestamp: bigint;
234
+ breakdowns: {
235
+ id: number;
236
+ identifier: string;
237
+ type: import("../../database/api/.generated").$Enums.TvlType;
238
+ value: number;
239
+ tvlRecordId: string;
240
+ }[];
241
+ };
242
+ rewardsRecord: {
243
+ id: string;
244
+ total: number;
245
+ timestamp: bigint;
246
+ breakdowns: {
247
+ id: number;
248
+ value: number;
249
+ campaignId: string;
250
+ dailyRewardsRecordId: string;
251
+ }[];
252
+ };
253
+ id: string;
254
+ tokens: {
255
+ id: string;
256
+ name: string | null;
257
+ chainId: number;
258
+ address: string;
259
+ decimals: number;
260
+ symbol: string;
261
+ icon: string;
262
+ verified: boolean;
263
+ price: number | null;
264
+ }[];
265
+ chain: {
266
+ id: number;
267
+ name: string;
268
+ icon: string;
269
+ };
270
+ protocol: {
271
+ id: string;
272
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
273
+ name: string;
274
+ description: string;
275
+ url: string;
276
+ icon: string;
277
+ } | undefined;
278
+ name: string;
279
+ type: import("../../database/api/.generated").$Enums.CampaignType;
280
+ status: import("../../database/api/.generated").$Enums.Status;
281
+ tags: string[];
282
+ identifier: string;
283
+ chainId: number;
284
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
285
+ tvl: number;
286
+ apr: number;
287
+ dailyRewards: number;
288
+ } | null)[];
289
+ }>>;
290
+ };
291
+ count: {
292
+ get: (options: {
293
+ headers?: Record<string, unknown> | undefined;
294
+ query: {
295
+ sort?: "tvl" | "apr" | "rewards" | undefined;
296
+ name?: string | undefined;
297
+ tokens?: string | undefined;
298
+ status?: string | undefined;
299
+ items?: number | undefined;
300
+ tags?: string | undefined;
301
+ chainId?: string | undefined;
302
+ page?: number | undefined;
303
+ action?: string | undefined;
304
+ mainProtocolId?: string | undefined;
305
+ order?: "asc" | "desc" | undefined;
306
+ };
307
+ fetch?: RequestInit | undefined;
308
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
309
+ 200: number;
310
+ }>>;
311
+ };
312
+ };
313
+ campaigns: {
314
+ index: {
315
+ post: (body: {
316
+ subType?: number | undefined;
317
+ type: number;
318
+ params: string;
319
+ identifier: string;
320
+ chainId: number;
321
+ startTimestamp: string;
322
+ endTimestamp: string;
323
+ computeChainId: number;
324
+ campaignId: string;
325
+ amount: string;
326
+ creator: string;
327
+ rewardTokenAddress: string;
328
+ opportunityIdentifier: string;
329
+ }, options: {
330
+ headers: {
331
+ authorization: string;
332
+ };
333
+ query?: Record<string, unknown> | undefined;
334
+ fetch?: RequestInit | undefined;
335
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
336
+ 200: unknown;
337
+ }>>;
338
+ get: (options: {
339
+ headers?: Record<string, unknown> | undefined;
340
+ query: {
341
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
342
+ items?: number | undefined;
343
+ identifier?: string | undefined;
344
+ subType?: number | undefined;
345
+ chainId?: number | undefined;
346
+ startTimestamp?: string | undefined;
347
+ endTimestamp?: string | undefined;
348
+ page?: number | undefined;
349
+ mainParameter?: string | undefined;
350
+ campaignId?: string | undefined;
351
+ opportunityId?: string | undefined;
352
+ };
353
+ fetch?: RequestInit | undefined;
354
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
355
+ 200: ({
356
+ params: any;
357
+ chain: {
358
+ id: number;
359
+ name: string;
360
+ icon: string;
361
+ };
362
+ rewardToken: {
363
+ id: string;
364
+ name: string | null;
365
+ chainId: number;
366
+ address: string;
367
+ decimals: number;
368
+ symbol: string;
369
+ icon: string;
370
+ verified: boolean;
371
+ price: number | null;
372
+ };
373
+ distributionChain: {
374
+ id: number;
375
+ name: string;
376
+ icon: string;
377
+ } | undefined;
378
+ id: string;
379
+ computeChainId: number;
380
+ distributionChainId: number;
381
+ identifier: string;
382
+ campaignId: string;
383
+ type: import("../../database/api/.generated").$Enums.CampaignType;
384
+ subType: number | null;
385
+ rewardTokenId: string;
386
+ amount: string;
387
+ opportunityId: string;
388
+ startTimestamp: bigint;
389
+ endTimestamp: bigint;
390
+ creatorAddress: string;
391
+ } | null)[];
392
+ }>>;
393
+ };
394
+ count: {
395
+ get: (options: {
396
+ headers?: Record<string, unknown> | undefined;
397
+ query: {
398
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
399
+ items?: number | undefined;
400
+ identifier?: string | undefined;
401
+ subType?: number | undefined;
402
+ chainId?: number | undefined;
403
+ startTimestamp?: string | undefined;
404
+ endTimestamp?: string | undefined;
405
+ page?: number | undefined;
406
+ mainParameter?: string | undefined;
407
+ campaignId?: string | undefined;
408
+ opportunityId?: string | undefined;
409
+ };
410
+ fetch?: RequestInit | undefined;
411
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
412
+ 200: number;
413
+ }>>;
414
+ };
415
+ };
416
+ protocols: ((params: {
417
+ id: string | number;
418
+ }) => {
419
+ get: (options?: {
420
+ headers?: Record<string, unknown> | undefined;
421
+ query?: Record<string, unknown> | undefined;
422
+ fetch?: RequestInit | undefined;
423
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
424
+ 200: ({
425
+ name: string;
426
+ url: string;
427
+ description: string;
428
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
429
+ icon: string;
430
+ } & {}) | null;
431
+ }>>;
432
+ }) & {
433
+ index: {
434
+ get: (options: {
435
+ headers?: Record<string, unknown> | undefined;
436
+ query: {
437
+ name?: string | undefined;
438
+ id?: string[] | undefined;
439
+ items?: number | undefined;
440
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
441
+ page?: number | undefined;
442
+ };
443
+ fetch?: RequestInit | undefined;
444
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
445
+ 200: ({
446
+ name: string;
447
+ url: string;
448
+ description: string;
449
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
450
+ icon: string;
451
+ } & {})[] | null;
452
+ }>>;
453
+ };
454
+ count: {
455
+ get: (options: {
456
+ headers?: Record<string, unknown> | undefined;
457
+ query: {
458
+ name?: string | undefined;
459
+ id?: string[] | undefined;
460
+ items?: number | undefined;
461
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
462
+ page?: number | undefined;
463
+ };
464
+ fetch?: RequestInit | undefined;
465
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
466
+ 200: number;
467
+ }>>;
468
+ };
469
+ };
470
+ tokens: ((params: {
471
+ id: string | number;
472
+ }) => {
473
+ get: (options?: {
474
+ headers?: Record<string, unknown> | undefined;
475
+ query?: Record<string, unknown> | undefined;
476
+ fetch?: RequestInit | undefined;
477
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
478
+ 200: ({
479
+ symbol: string;
480
+ name: string | null;
481
+ id: string;
482
+ chainId: number;
483
+ address: string;
484
+ icon: string;
485
+ decimals: number;
486
+ verified: boolean;
487
+ } & {
488
+ price?: number | null | undefined;
489
+ }) | undefined;
490
+ }>>;
491
+ }) & {
492
+ balances: {
493
+ get: (options: {
494
+ headers?: Record<string, unknown> | undefined;
495
+ query: {
496
+ tokenAddress?: string | undefined;
497
+ additionalTokenAddresses?: string[] | undefined;
498
+ chainId: number;
499
+ userAddress: string;
500
+ };
501
+ fetch?: RequestInit | undefined;
502
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
503
+ 200: ({
504
+ symbol: string;
505
+ name: string | null;
506
+ id: string;
507
+ chainId: number;
508
+ address: string;
509
+ icon: string;
510
+ decimals: number;
511
+ verified: boolean;
512
+ } & {
513
+ price?: number | null | undefined;
514
+ } & {
515
+ balance: bigint;
516
+ })[];
517
+ }>>;
518
+ };
519
+ index: {
520
+ get: (options: {
521
+ headers?: Record<string, unknown> | undefined;
522
+ query: {
523
+ symbol?: string | undefined;
524
+ name?: string | undefined;
525
+ chainId?: any;
526
+ address?: string | undefined;
527
+ verified?: boolean | undefined;
528
+ };
529
+ fetch?: RequestInit | undefined;
530
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
531
+ 200: ({
532
+ symbol: string;
533
+ name: string | null;
534
+ id: string;
535
+ chainId: number;
536
+ address: string;
537
+ icon: string;
538
+ decimals: number;
539
+ verified: boolean;
540
+ } & {
541
+ price?: number | null | undefined;
542
+ })[];
543
+ }>>;
544
+ };
545
+ count: {
546
+ get: (options: {
547
+ headers?: Record<string, unknown> | undefined;
548
+ query: {
549
+ symbol?: string | undefined;
550
+ name?: string | undefined;
551
+ chainId?: any;
552
+ address?: string | undefined;
553
+ verified?: boolean | undefined;
554
+ };
555
+ fetch?: RequestInit | undefined;
556
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
557
+ 200: number;
558
+ }>>;
559
+ };
560
+ };
561
+ rewards: {
562
+ engine: {
563
+ post: (body: {
564
+ recipient: string;
565
+ distributionChainId: number;
566
+ root: string;
567
+ proofs: string[];
568
+ rewardToken: string;
569
+ }[], options: {
570
+ headers: {
571
+ authorization: string;
572
+ };
573
+ query?: Record<string, unknown> | undefined;
574
+ fetch?: RequestInit | undefined;
575
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
576
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
577
+ }>>;
578
+ breakdowns: {
579
+ post: (body: {
580
+ distributionChainId: number;
581
+ campaignId: string;
582
+ root: string;
583
+ rewardToken: string;
584
+ breakdowns: {
585
+ protocolId?: string | undefined;
586
+ auxiliaryData1?: string | undefined;
587
+ auxiliaryData2?: string | undefined;
588
+ reason: string;
589
+ pending: string;
590
+ recipient: string;
591
+ amount: string;
592
+ claimed: string;
593
+ }[];
594
+ }[], options: {
595
+ headers: {
596
+ authorization: string;
597
+ };
598
+ query?: Record<string, unknown> | undefined;
599
+ fetch?: RequestInit | undefined;
600
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
601
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
602
+ }>>;
603
+ };
604
+ };
605
+ pendings: {
606
+ post: (body: {
607
+ distributionChainId: number;
608
+ campaignId: string;
609
+ root: string;
610
+ rewardToken: string;
611
+ toUpdate: {
612
+ auxiliaryData1?: string | undefined;
613
+ auxiliaryData2?: string | undefined;
614
+ reason: string;
615
+ pending: string;
616
+ recipient: string;
617
+ }[];
618
+ toCreate: {
619
+ auxiliaryData1?: string | undefined;
620
+ auxiliaryData2?: string | undefined;
621
+ reason: string;
622
+ pending: string;
623
+ recipient: string;
624
+ }[];
625
+ }, options: {
626
+ headers: {
627
+ authorization: string;
628
+ };
629
+ query?: Record<string, unknown> | undefined;
630
+ fetch?: RequestInit | undefined;
631
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
632
+ 200: boolean;
633
+ }>>;
634
+ };
635
+ count: {
636
+ get: (options: {
637
+ headers: {
638
+ authorization: string;
639
+ };
640
+ query?: Record<string, unknown> | undefined;
641
+ fetch?: RequestInit | undefined;
642
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
643
+ 200: Record<string, {
644
+ breakdown: number;
645
+ rewards: Record<string, number>;
646
+ }>;
647
+ }>>;
648
+ };
649
+ breakdown: {
650
+ get: (options: {
651
+ headers?: Record<string, unknown> | undefined;
652
+ query: {
653
+ items?: number | undefined;
654
+ page?: number | undefined;
655
+ chainId: number;
656
+ campaignIdentifiers: string | string[];
657
+ };
658
+ fetch?: RequestInit | undefined;
659
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
660
+ 200: {
661
+ Campaign: {
662
+ identifier: string;
663
+ campaignId: string;
664
+ };
665
+ amount: string;
666
+ Reward: {
667
+ recipient: string;
668
+ };
669
+ }[];
670
+ }>>;
671
+ };
672
+ };
673
+ chains: ((params: {
674
+ chainId: string | number;
675
+ }) => {
676
+ get: (options?: {
677
+ headers?: Record<string, unknown> | undefined;
678
+ query?: Record<string, unknown> | undefined;
679
+ fetch?: RequestInit | undefined;
680
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
681
+ 200: ({
682
+ Explorer: {
683
+ id: string;
684
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
685
+ url: string;
686
+ chainId: number;
687
+ }[];
688
+ } & {
689
+ id: number;
690
+ name: string;
691
+ icon: string;
692
+ }) | null;
693
+ }>>;
694
+ }) & {
695
+ index: {
696
+ get: (options: {
697
+ headers?: Record<string, unknown> | undefined;
698
+ query: {
699
+ search?: string | undefined;
700
+ };
701
+ fetch?: RequestInit | undefined;
702
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
703
+ 200: ({
704
+ Explorer: {
705
+ id: string;
706
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
707
+ url: string;
708
+ chainId: number;
709
+ }[];
710
+ } & {
711
+ id: number;
712
+ name: string;
713
+ icon: string;
714
+ })[];
715
+ }>>;
716
+ };
717
+ count: {
718
+ get: (options: {
719
+ headers?: Record<string, unknown> | undefined;
720
+ query: {
721
+ search?: string | undefined;
722
+ };
723
+ fetch?: RequestInit | undefined;
724
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
725
+ 200: number;
726
+ }>>;
727
+ };
728
+ };
729
+ prices: {
730
+ index: {
731
+ get: (options?: {
732
+ headers?: Record<string, unknown> | undefined;
733
+ query?: Record<string, unknown> | undefined;
734
+ fetch?: RequestInit | undefined;
735
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
736
+ 200: {
737
+ [token: string]: number;
738
+ };
739
+ }>>;
740
+ };
741
+ symbol: ((params: {
742
+ symbol: string | number;
743
+ }) => {
744
+ get: (options?: {
745
+ headers?: Record<string, unknown> | undefined;
746
+ query?: Record<string, unknown> | undefined;
747
+ fetch?: RequestInit | undefined;
748
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
749
+ 200: number;
750
+ }>>;
751
+ }) & {};
752
+ sources: {
753
+ index: {
754
+ get: (options?: {
755
+ headers?: Record<string, unknown> | undefined;
756
+ query?: Record<string, unknown> | undefined;
757
+ fetch?: RequestInit | undefined;
758
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
759
+ 200: {
760
+ id: number;
761
+ symbol: string;
762
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
763
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
764
+ }[];
765
+ }>>;
766
+ post: (body: {
767
+ symbol: string;
768
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA";
769
+ args: {};
770
+ }, options: {
771
+ headers: {
772
+ authorization: string;
773
+ };
774
+ query?: Record<string, unknown> | undefined;
775
+ fetch?: RequestInit | undefined;
776
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
777
+ 200: number | undefined;
778
+ }>>;
779
+ };
780
+ symbol: ((params: {
781
+ symbol: string | number;
782
+ }) => {
783
+ get: (options?: {
784
+ headers?: Record<string, unknown> | undefined;
785
+ query?: Record<string, unknown> | undefined;
786
+ fetch?: RequestInit | undefined;
787
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
788
+ 200: {
789
+ id: number;
790
+ symbol: string;
791
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
792
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
793
+ };
794
+ }>>;
795
+ patch: (body: {
796
+ symbol?: string | undefined;
797
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | undefined;
798
+ args?: {} | undefined;
799
+ }, options: {
800
+ headers: {
801
+ authorization: string;
802
+ };
803
+ query?: Record<string, unknown> | undefined;
804
+ fetch?: RequestInit | undefined;
805
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
806
+ 200: {
807
+ id: number;
808
+ symbol: string;
809
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
810
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
811
+ };
812
+ }>>;
813
+ delete: (body: unknown, options: {
814
+ headers: {
815
+ authorization: string;
816
+ };
817
+ query?: Record<string, unknown> | undefined;
818
+ fetch?: RequestInit | undefined;
819
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
820
+ 200: {
821
+ id: number;
822
+ symbol: string;
823
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
824
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
825
+ };
826
+ }>>;
827
+ }) & {};
828
+ };
829
+ };
830
+ blacklists: {
831
+ index: {
832
+ get: (options?: {
833
+ headers?: Record<string, unknown> | undefined;
834
+ query?: Record<string, unknown> | undefined;
835
+ fetch?: RequestInit | undefined;
836
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
837
+ 200: {
838
+ id: string;
839
+ chainId: number;
840
+ poolAddress: string;
841
+ userAddress: string;
842
+ arrestTimestamp: bigint;
843
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
844
+ }[];
845
+ }>>;
846
+ post: (body: {
847
+ reason?: string | undefined;
848
+ chainId: number;
849
+ poolAddress: string;
850
+ userAddress: string;
851
+ }, options: {
852
+ headers: {
853
+ authorization: string;
854
+ };
855
+ query?: Record<string, unknown> | undefined;
856
+ fetch?: RequestInit | undefined;
857
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
858
+ 200: {
859
+ id: string;
860
+ chainId: number;
861
+ poolAddress: string;
862
+ userAddress: string;
863
+ arrestTimestamp: bigint;
864
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
865
+ };
866
+ }>>;
867
+ };
868
+ all: {
869
+ get: (options?: {
870
+ headers?: Record<string, unknown> | undefined;
871
+ query?: Record<string, unknown> | undefined;
872
+ fetch?: RequestInit | undefined;
873
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
874
+ 200: string[];
875
+ }>>;
876
+ };
877
+ check: ((params: {
878
+ address: string | number;
879
+ }) => {
880
+ get: (options?: {
881
+ headers?: Record<string, unknown> | undefined;
882
+ query?: Record<string, unknown> | undefined;
883
+ fetch?: RequestInit | undefined;
884
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
885
+ 200: boolean;
886
+ }>>;
887
+ }) & {};
888
+ user: ((params: {
889
+ address: string | number;
890
+ }) => {
891
+ delete: (body: unknown, options: {
892
+ headers: {
893
+ authorization: string;
894
+ };
895
+ query?: Record<string, unknown> | undefined;
896
+ fetch?: RequestInit | undefined;
897
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
898
+ 200: boolean;
899
+ }>>;
900
+ }) & {};
901
+ };
902
+ users: ((params: {
903
+ address: string | number;
904
+ }) => {
905
+ get: (options?: {
906
+ headers?: Record<string, unknown> | undefined;
907
+ query?: Record<string, unknown> | undefined;
908
+ fetch?: RequestInit | undefined;
909
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
910
+ 200: {
911
+ address: string;
912
+ } | null;
913
+ }>>;
914
+ rewards: {
915
+ full: {
916
+ get: (options?: {
917
+ headers?: Record<string, unknown> | undefined;
918
+ query?: Record<string, unknown> | undefined;
919
+ fetch?: RequestInit | undefined;
920
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
921
+ 200: (Omit<{
922
+ chain: import("../../database/api/.generated").Chain;
923
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
924
+ }, "rewards"> & {
925
+ rewards: (Omit<{
926
+ token: {
927
+ id: string;
928
+ name: string | null;
929
+ chainId: number;
930
+ address: string;
931
+ decimals: number;
932
+ symbol: string;
933
+ icon: string;
934
+ verified: boolean;
935
+ price: number | null;
936
+ };
937
+ breakdowns: {
938
+ campaignId: string;
939
+ opportunity: {
940
+ Chain: {
941
+ id: number;
942
+ name: string;
943
+ icon: string;
944
+ };
945
+ Tokens: {
946
+ id: string;
947
+ name: string | null;
948
+ chainId: number;
949
+ address: string;
950
+ decimals: number;
951
+ symbol: string;
952
+ icon: string;
953
+ verified: boolean;
954
+ price: number | null;
955
+ }[];
956
+ Protocols: {
957
+ id: string;
958
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
959
+ name: string;
960
+ description: string;
961
+ url: string;
962
+ icon: string;
963
+ }[];
964
+ MainProtocol: {
965
+ id: string;
966
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
967
+ name: string;
968
+ description: string;
969
+ url: string;
970
+ icon: string;
971
+ } | null;
972
+ } & {
973
+ id: string;
974
+ chainId: number;
975
+ type: import("../../database/api/.generated").$Enums.CampaignType;
976
+ identifier: string;
977
+ name: string;
978
+ status: import("../../database/api/.generated").$Enums.Status;
979
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
980
+ mainProtocolId: string | null;
981
+ tvl: number;
982
+ apr: number;
983
+ dailyRewards: number;
984
+ tags: string[];
985
+ };
986
+ reason: string;
987
+ amount: string;
988
+ claimed: string;
989
+ pending: string;
990
+ auxiliaryData1: string | null;
991
+ auxiliaryData2: string | null;
992
+ }[];
993
+ claimed: bigint;
994
+ amount: bigint;
995
+ pending: bigint;
996
+ root: string;
997
+ recipient: string;
998
+ proofs: string[];
999
+ }, "breakdowns"> & {
1000
+ breakdowns: {
1001
+ opportunity: import("../modules/v4").Opportunity["model"] | null;
1002
+ claimed: bigint;
1003
+ amount: bigint;
1004
+ pending: bigint;
1005
+ auxiliaryData1: string | null;
1006
+ auxiliaryData2: string | null;
1007
+ }[];
1008
+ })[];
1009
+ distributor: string;
1010
+ })[];
1011
+ }>>;
1012
+ };
1013
+ get: (options: {
1014
+ headers?: Record<string, unknown> | undefined;
1015
+ query: {
1016
+ chainId: number | number[];
1017
+ };
1018
+ fetch?: RequestInit | undefined;
1019
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1020
+ 200: (Omit<{
1021
+ chain: import("../../database/api/.generated").Chain;
1022
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
1023
+ }, "rewards"> & {
1024
+ rewards: (Omit<{
1025
+ token: {
1026
+ id: string;
1027
+ name: string | null;
1028
+ chainId: number;
1029
+ address: string;
1030
+ decimals: number;
1031
+ symbol: string;
1032
+ icon: string;
1033
+ verified: boolean;
1034
+ price: number | null;
1035
+ };
1036
+ breakdowns: {
1037
+ campaignId: string;
1038
+ opportunity: {
1039
+ Chain: {
1040
+ id: number;
1041
+ name: string;
1042
+ icon: string;
1043
+ };
1044
+ Tokens: {
1045
+ id: string;
1046
+ name: string | null;
1047
+ chainId: number;
1048
+ address: string;
1049
+ decimals: number;
1050
+ symbol: string;
1051
+ icon: string;
1052
+ verified: boolean;
1053
+ price: number | null;
1054
+ }[];
1055
+ Protocols: {
1056
+ id: string;
1057
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1058
+ name: string;
1059
+ description: string;
1060
+ url: string;
1061
+ icon: string;
1062
+ }[];
1063
+ MainProtocol: {
1064
+ id: string;
1065
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1066
+ name: string;
1067
+ description: string;
1068
+ url: string;
1069
+ icon: string;
1070
+ } | null;
1071
+ } & {
1072
+ id: string;
1073
+ chainId: number;
1074
+ type: import("../../database/api/.generated").$Enums.CampaignType;
1075
+ identifier: string;
1076
+ name: string;
1077
+ status: import("../../database/api/.generated").$Enums.Status;
1078
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
1079
+ mainProtocolId: string | null;
1080
+ tvl: number;
1081
+ apr: number;
1082
+ dailyRewards: number;
1083
+ tags: string[];
1084
+ };
1085
+ reason: string;
1086
+ amount: string;
1087
+ claimed: string;
1088
+ pending: string;
1089
+ auxiliaryData1: string | null;
1090
+ auxiliaryData2: string | null;
1091
+ }[];
1092
+ claimed: bigint;
1093
+ amount: bigint;
1094
+ pending: bigint;
1095
+ root: string;
1096
+ recipient: string;
1097
+ proofs: string[];
1098
+ }, "breakdowns"> & {
1099
+ breakdowns: {
1100
+ campaignId: string;
1101
+ reason: string;
1102
+ amount: string;
1103
+ claimed: string;
1104
+ pending: string;
1105
+ auxiliaryData1: string | null;
1106
+ auxiliaryData2: string | null;
1107
+ }[];
1108
+ })[];
1109
+ })[];
1110
+ }>>;
1111
+ };
1112
+ tags: {
1113
+ patch: (body: {
1114
+ tags: string[];
1115
+ }, options: {
1116
+ headers: {
1117
+ authorization: string;
1118
+ };
1119
+ query?: Record<string, unknown> | undefined;
1120
+ fetch?: RequestInit | undefined;
1121
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1122
+ 200: {
1123
+ address: string;
1124
+ tags: string[];
1125
+ };
1126
+ }>>;
1127
+ };
1128
+ }) & {
1129
+ index: {
1130
+ get: (options: {
1131
+ headers?: Record<string, unknown> | undefined;
1132
+ query: {
1133
+ items?: number | undefined;
1134
+ tags?: string[] | undefined;
1135
+ page?: number | undefined;
1136
+ address?: string | undefined;
1137
+ };
1138
+ fetch?: RequestInit | undefined;
1139
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1140
+ 200: {
1141
+ address: string;
1142
+ tags: string[];
1143
+ }[];
1144
+ }>>;
1145
+ post: (body: {
1146
+ tags: string[];
1147
+ address: string;
1148
+ }, options: {
1149
+ headers: {
1150
+ authorization: string;
1151
+ };
1152
+ query?: Record<string, unknown> | undefined;
1153
+ fetch?: RequestInit | undefined;
1154
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1155
+ 200: {
1156
+ address: string;
1157
+ tags: string[];
1158
+ };
1159
+ }>>;
1160
+ };
1161
+ };
1162
+ roots: {
1163
+ index: {
1164
+ get: (options: {
1165
+ headers?: Record<string, unknown> | undefined;
1166
+ query: {
1167
+ chainId: number;
1168
+ fromTimestamp: string;
1169
+ toTimestamp: string;
1170
+ };
1171
+ fetch?: RequestInit | undefined;
1172
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1173
+ 200: {
1174
+ root: string;
1175
+ chainId: number;
1176
+ epoch: number;
1177
+ timestamp: bigint;
1178
+ }[];
1179
+ }>>;
1180
+ };
1181
+ };
1182
+ participate: {
1183
+ targets: {
1184
+ get: (options: {
1185
+ headers?: Record<string, unknown> | undefined;
1186
+ query: {
1187
+ identifier?: string | undefined;
1188
+ chainId: number;
1189
+ protocolId: string;
1190
+ };
1191
+ fetch?: RequestInit | undefined;
1192
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1193
+ 200: import("../modules/v4/participate/participate.model").ParticipateTarget[] | undefined;
1194
+ }>>;
1195
+ };
1196
+ protocols: {
1197
+ get: (options: {
1198
+ headers?: Record<string, unknown> | undefined;
1199
+ query: {
1200
+ chainId?: number | undefined;
1201
+ };
1202
+ fetch?: RequestInit | undefined;
1203
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1204
+ 200: ({
1205
+ name: string;
1206
+ url: string;
1207
+ description: string;
1208
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1209
+ icon: string;
1210
+ } & {})[] | null;
1211
+ }>>;
1212
+ };
1213
+ quote: {
1214
+ get: (options: {
1215
+ headers?: Record<string, unknown> | undefined;
1216
+ query: {
1217
+ identifier: string;
1218
+ chainId: number;
1219
+ protocolId: string;
1220
+ userAddress: string;
1221
+ fromAmount: string;
1222
+ fromTokenAddress: string;
1223
+ };
1224
+ fetch?: RequestInit | undefined;
1225
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1226
+ 200: {
1227
+ amountOut: {};
1228
+ gas: string;
1229
+ feeAmount: string[];
1230
+ priceImpact: number;
1231
+ } | undefined;
1232
+ }>>;
1233
+ };
1234
+ transaction: {
1235
+ get: (options: {
1236
+ headers?: Record<string, unknown> | undefined;
1237
+ query: {
1238
+ identifier: string;
1239
+ chainId: number;
1240
+ protocolId: string;
1241
+ userAddress: string;
1242
+ fromAmount: string;
1243
+ fromTokenAddress: string;
1244
+ };
1245
+ fetch?: RequestInit | undefined;
1246
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1247
+ 200: {
1248
+ amountOut: string;
1249
+ gas: string;
1250
+ feeAmount: string[];
1251
+ priceImpact: number;
1252
+ createAt: number;
1253
+ tx: {
1254
+ data: string;
1255
+ from: string;
1256
+ value: string;
1257
+ to: string;
1258
+ };
1259
+ } | undefined;
1260
+ }>>;
1261
+ };
1262
+ };
1263
+ accounting: {
1264
+ index: {
1265
+ get: (options: {
1266
+ headers: {
1267
+ authorization: string;
1268
+ };
1269
+ query: {
1270
+ items?: number | undefined;
1271
+ page?: number | undefined;
1272
+ };
1273
+ fetch?: RequestInit | undefined;
1274
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1275
+ 200: {
1276
+ id: string;
1277
+ chainId: number;
1278
+ fromTokenId: string;
1279
+ toTokenId: string;
1280
+ multisig: string;
1281
+ recipient: string;
1282
+ amountIn: string;
1283
+ amountOut: string;
1284
+ datetime: Date;
1285
+ timestamp: number;
1286
+ }[];
1287
+ }>>;
1288
+ };
1289
+ revenues: {
1290
+ get: (options: {
1291
+ headers: {
1292
+ authorization: string;
1293
+ };
1294
+ query?: Record<string, unknown> | undefined;
1295
+ fetch?: RequestInit | undefined;
1296
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1297
+ 200: {
1298
+ totalAmount: number;
1299
+ };
1300
+ }>>;
1301
+ "per-month": ((params: {
1302
+ year: string | number;
1303
+ }) => {} & ((params: {
1304
+ month: string | number;
1305
+ }) => {
1306
+ get: (options: {
1307
+ headers: {
1308
+ authorization: string;
1309
+ };
1310
+ query?: Record<string, unknown> | undefined;
1311
+ fetch?: RequestInit | undefined;
1312
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1313
+ 200: {
1314
+ totalAmount: number;
1315
+ from: string;
1316
+ to: string;
1317
+ };
1318
+ }>>;
1319
+ })) & {};
1320
+ chains: ((params: {
1321
+ chainId: string | number;
1322
+ }) => {
1323
+ get: (options: {
1324
+ headers: {
1325
+ authorization: string;
1326
+ };
1327
+ query?: Record<string, unknown> | undefined;
1328
+ fetch?: RequestInit | undefined;
1329
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1330
+ 200: {
1331
+ totalAmount: number;
1332
+ };
1333
+ }>>;
1334
+ "per-month": ((params: {
1335
+ year: string | number;
1336
+ }) => {} & ((params: {
1337
+ month: string | number;
1338
+ }) => {
1339
+ get: (options: {
1340
+ headers: {
1341
+ authorization: string;
1342
+ };
1343
+ query?: Record<string, unknown> | undefined;
1344
+ fetch?: RequestInit | undefined;
1345
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1346
+ 200: {
1347
+ totalAmount: number;
1348
+ from: string;
1349
+ to: string;
1350
+ };
1351
+ }>>;
1352
+ })) & {};
1353
+ }) & {};
1354
+ };
1355
+ tokens: ((params: {
1356
+ chainId: string | number;
1357
+ }) => {} & ((params: {
1358
+ tokenAddress: string | number;
1359
+ }) => {
1360
+ get: (options: {
1361
+ headers: {
1362
+ authorization: string;
1363
+ };
1364
+ query?: Record<string, unknown> | undefined;
1365
+ fetch?: RequestInit | undefined;
1366
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1367
+ 200: {
1368
+ totalAmount: number;
1369
+ totalAmountUSD: number;
1370
+ };
1371
+ }>>;
1372
+ "per-month": ((params: {
1373
+ year: string | number;
1374
+ }) => {} & ((params: {
1375
+ month: string | number;
1376
+ }) => {
1377
+ get: (options: {
1378
+ headers: {
1379
+ authorization: string;
1380
+ };
1381
+ query?: Record<string, unknown> | undefined;
1382
+ fetch?: RequestInit | undefined;
1383
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1384
+ 200: {
1385
+ totalAmount: number;
1386
+ totalAmountUSD: number;
1387
+ from: string;
1388
+ to: string;
1389
+ };
1390
+ }>>;
1391
+ })) & {};
1392
+ })) & {};
1393
+ };
1394
+ campaignStatus: {
1395
+ engine: {
1396
+ post: (body: {
1397
+ status: {
1398
+ value: "SUCCESS";
1399
+ computedUntil: number;
1400
+ } | {
1401
+ value: "PROCESSING";
1402
+ } | {
1403
+ error: string;
1404
+ details: string;
1405
+ value: "SKIPPED";
1406
+ } | {
1407
+ error: string;
1408
+ details: string;
1409
+ value: "FAILED";
1410
+ };
1411
+ campaignId: string;
1412
+ distributionChain: number;
1413
+ }, options: {
1414
+ headers: {
1415
+ authorization: string;
1416
+ };
1417
+ query?: Record<string, unknown> | undefined;
1418
+ fetch?: RequestInit | undefined;
1419
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1420
+ 200: void;
1421
+ }>>;
1422
+ };
1423
+ index: {
1424
+ get: (options?: {
1425
+ headers?: Record<string, unknown> | undefined;
1426
+ query?: Record<string, unknown> | undefined;
1427
+ fetch?: RequestInit | undefined;
1428
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1429
+ 200: {
1430
+ campaignId: string;
1431
+ computedUntil: bigint;
1432
+ processingStarted: bigint;
1433
+ status: import("../../database/api/.generated").$Enums.RunStatus;
1434
+ error: string;
1435
+ details: import("../../database/api/.generated").Prisma.JsonValue;
1436
+ }[];
1437
+ }>>;
1438
+ };
1439
+ unique: {
1440
+ get: (options: {
1441
+ headers?: Record<string, unknown> | undefined;
1442
+ query: {
1443
+ identifier: string;
1444
+ distributionChain: number;
1445
+ };
1446
+ fetch?: RequestInit | undefined;
1447
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1448
+ 200: {
1449
+ campaignId: string;
1450
+ computedUntil: bigint;
1451
+ processingStarted: bigint;
1452
+ status: import("../../database/api/.generated").$Enums.RunStatus;
1453
+ error: string;
1454
+ details: import("../../database/api/.generated").Prisma.JsonValue;
1455
+ };
1456
+ }>>;
1457
+ };
1458
+ computeChain: ((params: {
1459
+ chainId: string | number;
1460
+ }) => {
1461
+ get: (options?: {
1462
+ headers?: Record<string, unknown> | undefined;
1463
+ query?: Record<string, unknown> | undefined;
1464
+ fetch?: RequestInit | undefined;
1465
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1466
+ 200: {
1467
+ campaignId: string;
1468
+ computedUntil: bigint;
1469
+ processingStarted: bigint;
1470
+ status: import("../../database/api/.generated").$Enums.RunStatus;
1471
+ error: string;
1472
+ details: import("../../database/api/.generated").Prisma.JsonValue;
1473
+ }[];
1474
+ }>>;
1475
+ }) & {};
1476
+ overlaps: {
1477
+ get: (options: {
1478
+ headers: {
1479
+ authorization: string;
1480
+ };
1481
+ query: {
1482
+ identifier: string;
1483
+ distributionChain: number;
1484
+ };
1485
+ fetch?: RequestInit | undefined;
1486
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1487
+ 200: boolean;
1488
+ }>>;
1489
+ };
1490
+ };
1491
+ };
1492
+ };
1493
+ type Api = typeof eden;
1494
+ type ApiModuleVersion = Exclude<keyof Api, "index" | "valueOf">;
1495
+ type ApiModuleRoute<V extends ApiModuleVersion> = keyof Api[V];
1496
+ export type OneOfRoute<R extends ApiModuleRoute<"v4">> = NonNullable<RouteType<"v4", R>["data"]>[number];
1497
+ export type FromPromise<R extends (...args: any) => Promise<{
1498
+ data: any;
1499
+ }>> = NonNullable<NonNullable<Awaited<ReturnType<R>>["data"]>[number]>;
1500
+ type RouteType<V extends ApiModuleVersion, R extends ApiModuleRoute<V>> = Awaited<ReturnType<"get" extends keyof Api[V][R] ? (Api[V][R]["get"] extends (...args: any) => any ? Api[V][R]["get"] : never) : never>>;
1501
+ export declare const MerklApi: (domain: string | import("elysia").default<"", false, {
1502
+ decorator: {};
1503
+ store: {};
1504
+ derive: {};
1505
+ resolve: {};
1506
+ }, {
1507
+ type: {};
1508
+ error: {
1509
+ readonly HttpError: import("../errors").HttpError;
1510
+ readonly BadRequestError: import("../errors").BadRequestError;
1511
+ readonly ConflictError: import("../errors").ConflictError;
1512
+ readonly NotFoundError: import("../errors").NotFoundError;
1513
+ readonly UnauthorizedError: import("../errors").UnauthorizedError;
1514
+ readonly InvalidParameter: import("../utils/error").InvalidParameter;
1515
+ readonly UnsupportedNetwork: import("../utils/error").UnsupportedNetwork;
1516
+ readonly OpportunityNotFound: import("../utils/error").OpportunityNotFound;
1517
+ readonly MerkleRootNotFound: import("../utils/error").MerkleRootNotFound;
1518
+ readonly ValidationError: import("elysia").ValidationError;
1519
+ readonly InvalidCacheCall: import("../utils/error").InvalidCacheCall;
1520
+ };
1521
+ }, {
1522
+ schema: {};
1523
+ macro: {};
1524
+ }, false & {
1525
+ index: {
1526
+ get: {
1527
+ body: unknown;
1528
+ params: Record<never, string>;
1529
+ query: unknown;
1530
+ headers: unknown;
1531
+ response: {
1532
+ 200: string;
1533
+ };
1534
+ };
1535
+ };
1536
+ } & {
1537
+ v4: {};
1538
+ } & {
1539
+ v4: {
1540
+ opportunities: {
1541
+ index: {
1542
+ post: {
1543
+ body: {
1544
+ name?: string | undefined;
1545
+ type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4";
1546
+ tokens: {
1547
+ chainId: number;
1548
+ address: string;
1549
+ }[];
1550
+ status: "NONE" | "PAST" | "LIVE" | "SOON";
1551
+ identifier: string;
1552
+ chainId: number;
1553
+ action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW";
1554
+ protocols: string[];
1555
+ mainProtocol: string;
1556
+ };
1557
+ params: Record<never, string>;
1558
+ query: unknown;
1559
+ headers: {
1560
+ authorization: string;
1561
+ };
1562
+ response: {
1563
+ 200: void;
1564
+ };
1565
+ };
1566
+ };
1567
+ };
1568
+ } & {
1569
+ opportunities: {
1570
+ ":id": {
1571
+ get: {
1572
+ body: unknown;
1573
+ params: {
1574
+ id: string;
1575
+ };
1576
+ query: unknown;
1577
+ headers: unknown;
1578
+ response: {
1579
+ 200: {
1580
+ aprRecord: {
1581
+ cumulated: number;
1582
+ cummulated: number;
1583
+ timestamp: bigint;
1584
+ breakdowns: {
1585
+ id: number;
1586
+ identifier: string;
1587
+ type: import("../../database/api/.generated").$Enums.AprType;
1588
+ value: number;
1589
+ aprRecordId: string;
1590
+ }[];
1591
+ };
1592
+ tvlRecord: {
1593
+ id: string;
1594
+ total: number;
1595
+ timestamp: bigint;
1596
+ breakdowns: {
1597
+ id: number;
1598
+ identifier: string;
1599
+ type: import("../../database/api/.generated").$Enums.TvlType;
1600
+ value: number;
1601
+ tvlRecordId: string;
1602
+ }[];
1603
+ };
1604
+ rewardsRecord: {
1605
+ id: string;
1606
+ total: number;
1607
+ timestamp: bigint;
1608
+ breakdowns: {
1609
+ id: number;
1610
+ value: number;
1611
+ campaignId: string;
1612
+ dailyRewardsRecordId: string;
1613
+ }[];
1614
+ };
1615
+ id: string;
1616
+ tokens: {
1617
+ id: string;
1618
+ name: string | null;
1619
+ chainId: number;
1620
+ address: string;
1621
+ decimals: number;
1622
+ symbol: string;
1623
+ icon: string;
1624
+ verified: boolean;
1625
+ price: number | null;
1626
+ }[];
1627
+ chain: {
1628
+ id: number;
1629
+ name: string;
1630
+ icon: string;
1631
+ };
1632
+ protocol: {
1633
+ id: string;
1634
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1635
+ name: string;
1636
+ description: string;
1637
+ url: string;
1638
+ icon: string;
1639
+ } | undefined;
1640
+ name: string;
1641
+ type: import("../../database/api/.generated").$Enums.CampaignType;
1642
+ status: import("../../database/api/.generated").$Enums.Status;
1643
+ tags: string[];
1644
+ identifier: string;
1645
+ chainId: number;
1646
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
1647
+ tvl: number;
1648
+ apr: number;
1649
+ dailyRewards: number;
1650
+ } | null | undefined;
1651
+ };
1652
+ };
1653
+ };
1654
+ };
1655
+ } & {
1656
+ opportunities: {
1657
+ ":id": {
1658
+ campaigns: {
1659
+ get: {
1660
+ body: unknown;
1661
+ params: {
1662
+ id: string;
1663
+ };
1664
+ query: unknown;
1665
+ headers: unknown;
1666
+ response: {
1667
+ 200: {
1668
+ aprRecord: {
1669
+ cumulated: number;
1670
+ cummulated: number;
1671
+ timestamp: bigint;
1672
+ breakdowns: {
1673
+ id: number;
1674
+ identifier: string;
1675
+ type: import("../../database/api/.generated").$Enums.AprType;
1676
+ value: number;
1677
+ aprRecordId: string;
1678
+ }[];
1679
+ };
1680
+ tvlRecord: {
1681
+ id: string;
1682
+ total: number;
1683
+ timestamp: bigint;
1684
+ breakdowns: {
1685
+ id: number;
1686
+ identifier: string;
1687
+ type: import("../../database/api/.generated").$Enums.TvlType;
1688
+ value: number;
1689
+ tvlRecordId: string;
1690
+ }[];
1691
+ };
1692
+ rewardsRecord: {
1693
+ id: string;
1694
+ total: number;
1695
+ timestamp: bigint;
1696
+ breakdowns: {
1697
+ id: number;
1698
+ value: number;
1699
+ campaignId: string;
1700
+ dailyRewardsRecordId: string;
1701
+ }[];
1702
+ };
1703
+ id: string;
1704
+ tokens: {
1705
+ id: string;
1706
+ name: string | null;
1707
+ chainId: number;
1708
+ address: string;
1709
+ decimals: number;
1710
+ symbol: string;
1711
+ icon: string;
1712
+ verified: boolean;
1713
+ price: number | null;
1714
+ }[];
1715
+ chain: {
1716
+ id: number;
1717
+ name: string;
1718
+ icon: string;
1719
+ };
1720
+ protocol: {
1721
+ id: string;
1722
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1723
+ name: string;
1724
+ description: string;
1725
+ url: string;
1726
+ icon: string;
1727
+ } | undefined;
1728
+ name: string;
1729
+ type: import("../../database/api/.generated").$Enums.CampaignType;
1730
+ status: import("../../database/api/.generated").$Enums.Status;
1731
+ tags: string[];
1732
+ identifier: string;
1733
+ chainId: number;
1734
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
1735
+ tvl: number;
1736
+ apr: number;
1737
+ dailyRewards: number;
1738
+ } | null | undefined;
1739
+ };
1740
+ };
1741
+ };
1742
+ };
1743
+ };
1744
+ } & {
1745
+ opportunities: {
1746
+ index: {
1747
+ get: {
1748
+ body: unknown;
1749
+ params: Record<never, string>;
1750
+ query: {
1751
+ sort?: "tvl" | "apr" | "rewards" | undefined;
1752
+ name?: string | undefined;
1753
+ tokens?: string | undefined;
1754
+ status?: string | undefined;
1755
+ items?: number | undefined;
1756
+ tags?: string | undefined;
1757
+ chainId?: string | undefined;
1758
+ page?: number | undefined;
1759
+ action?: string | undefined;
1760
+ mainProtocolId?: string | undefined;
1761
+ order?: "asc" | "desc" | undefined;
1762
+ };
1763
+ headers: unknown;
1764
+ response: {
1765
+ 200: ({
1766
+ aprRecord: {
1767
+ cumulated: number;
1768
+ cummulated: number;
1769
+ timestamp: bigint;
1770
+ breakdowns: {
1771
+ id: number;
1772
+ identifier: string;
1773
+ type: import("../../database/api/.generated").$Enums.AprType;
1774
+ value: number;
1775
+ aprRecordId: string;
1776
+ }[];
1777
+ };
1778
+ tvlRecord: {
1779
+ id: string;
1780
+ total: number;
1781
+ timestamp: bigint;
1782
+ breakdowns: {
1783
+ id: number;
1784
+ identifier: string;
1785
+ type: import("../../database/api/.generated").$Enums.TvlType;
1786
+ value: number;
1787
+ tvlRecordId: string;
1788
+ }[];
1789
+ };
1790
+ rewardsRecord: {
1791
+ id: string;
1792
+ total: number;
1793
+ timestamp: bigint;
1794
+ breakdowns: {
1795
+ id: number;
1796
+ value: number;
1797
+ campaignId: string;
1798
+ dailyRewardsRecordId: string;
1799
+ }[];
1800
+ };
1801
+ id: string;
1802
+ tokens: {
1803
+ id: string;
1804
+ name: string | null;
1805
+ chainId: number;
1806
+ address: string;
1807
+ decimals: number;
1808
+ symbol: string;
1809
+ icon: string;
1810
+ verified: boolean;
1811
+ price: number | null;
1812
+ }[];
1813
+ chain: {
1814
+ id: number;
1815
+ name: string;
1816
+ icon: string;
1817
+ };
1818
+ protocol: {
1819
+ id: string;
1820
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
1821
+ name: string;
1822
+ description: string;
1823
+ url: string;
1824
+ icon: string;
1825
+ } | undefined;
1826
+ name: string;
1827
+ type: import("../../database/api/.generated").$Enums.CampaignType;
1828
+ status: import("../../database/api/.generated").$Enums.Status;
1829
+ tags: string[];
1830
+ identifier: string;
1831
+ chainId: number;
1832
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
1833
+ tvl: number;
1834
+ apr: number;
1835
+ dailyRewards: number;
1836
+ } | null)[];
1837
+ };
1838
+ };
1839
+ };
1840
+ };
1841
+ } & {
1842
+ opportunities: {
1843
+ count: {
1844
+ get: {
1845
+ body: unknown;
1846
+ params: Record<never, string>;
1847
+ query: {
1848
+ sort?: "tvl" | "apr" | "rewards" | undefined;
1849
+ name?: string | undefined;
1850
+ tokens?: string | undefined;
1851
+ status?: string | undefined;
1852
+ items?: number | undefined;
1853
+ tags?: string | undefined;
1854
+ chainId?: string | undefined;
1855
+ page?: number | undefined;
1856
+ action?: string | undefined;
1857
+ mainProtocolId?: string | undefined;
1858
+ order?: "asc" | "desc" | undefined;
1859
+ };
1860
+ headers: unknown;
1861
+ response: {
1862
+ 200: number;
1863
+ };
1864
+ };
1865
+ };
1866
+ };
1867
+ };
1868
+ } & {
1869
+ v4: {
1870
+ campaigns: {
1871
+ index: {
1872
+ post: {
1873
+ body: {
1874
+ subType?: number | undefined;
1875
+ type: number;
1876
+ params: string;
1877
+ identifier: string;
1878
+ chainId: number;
1879
+ startTimestamp: string;
1880
+ endTimestamp: string;
1881
+ computeChainId: number;
1882
+ campaignId: string;
1883
+ amount: string;
1884
+ creator: string;
1885
+ rewardTokenAddress: string;
1886
+ opportunityIdentifier: string;
1887
+ };
1888
+ params: Record<never, string>;
1889
+ query: unknown;
1890
+ headers: {
1891
+ authorization: string;
1892
+ };
1893
+ response: {
1894
+ 200: unknown;
1895
+ };
1896
+ };
1897
+ };
1898
+ };
1899
+ } & {
1900
+ campaigns: {
1901
+ index: {
1902
+ get: {
1903
+ body: unknown;
1904
+ params: Record<never, string>;
1905
+ query: {
1906
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
1907
+ items?: number | undefined;
1908
+ identifier?: string | undefined;
1909
+ subType?: number | undefined;
1910
+ chainId?: number | undefined;
1911
+ startTimestamp?: string | undefined;
1912
+ endTimestamp?: string | undefined;
1913
+ page?: number | undefined;
1914
+ mainParameter?: string | undefined;
1915
+ campaignId?: string | undefined;
1916
+ opportunityId?: string | undefined;
1917
+ };
1918
+ headers: unknown;
1919
+ response: {
1920
+ 200: ({
1921
+ params: any;
1922
+ chain: {
1923
+ id: number;
1924
+ name: string;
1925
+ icon: string;
1926
+ };
1927
+ rewardToken: {
1928
+ id: string;
1929
+ name: string | null;
1930
+ chainId: number;
1931
+ address: string;
1932
+ decimals: number;
1933
+ symbol: string;
1934
+ icon: string;
1935
+ verified: boolean;
1936
+ price: number | null;
1937
+ };
1938
+ distributionChain: {
1939
+ id: number;
1940
+ name: string;
1941
+ icon: string;
1942
+ } | undefined;
1943
+ id: string;
1944
+ computeChainId: number;
1945
+ distributionChainId: number;
1946
+ identifier: string;
1947
+ campaignId: string;
1948
+ type: import("../../database/api/.generated").$Enums.CampaignType;
1949
+ subType: number | null;
1950
+ rewardTokenId: string;
1951
+ amount: string;
1952
+ opportunityId: string;
1953
+ startTimestamp: bigint;
1954
+ endTimestamp: bigint;
1955
+ creatorAddress: string;
1956
+ } | null)[];
1957
+ };
1958
+ };
1959
+ };
1960
+ };
1961
+ } & {
1962
+ campaigns: {
1963
+ count: {
1964
+ get: {
1965
+ body: unknown;
1966
+ params: Record<never, string>;
1967
+ query: {
1968
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
1969
+ items?: number | undefined;
1970
+ identifier?: string | undefined;
1971
+ subType?: number | undefined;
1972
+ chainId?: number | undefined;
1973
+ startTimestamp?: string | undefined;
1974
+ endTimestamp?: string | undefined;
1975
+ page?: number | undefined;
1976
+ mainParameter?: string | undefined;
1977
+ campaignId?: string | undefined;
1978
+ opportunityId?: string | undefined;
1979
+ };
1980
+ headers: unknown;
1981
+ response: {
1982
+ 200: number;
1983
+ };
1984
+ };
1985
+ };
1986
+ };
1987
+ };
1988
+ } & {
1989
+ v4: {
1990
+ protocols: {
1991
+ ":id": {
1992
+ get: {
1993
+ body: unknown;
1994
+ params: Record<"id", string>;
1995
+ query: unknown;
1996
+ headers: unknown;
1997
+ response: {
1998
+ 200: ({
1999
+ name: string;
2000
+ url: string;
2001
+ description: string;
2002
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2003
+ icon: string;
2004
+ } & {}) | null;
2005
+ };
2006
+ };
2007
+ };
2008
+ };
2009
+ } & {
2010
+ protocols: {
2011
+ index: {
2012
+ get: {
2013
+ body: unknown;
2014
+ params: Record<never, string>;
2015
+ query: {
2016
+ name?: string | undefined;
2017
+ id?: string[] | undefined;
2018
+ items?: number | undefined;
2019
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
2020
+ page?: number | undefined;
2021
+ };
2022
+ headers: unknown;
2023
+ response: {
2024
+ 200: ({
2025
+ name: string;
2026
+ url: string;
2027
+ description: string;
2028
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2029
+ icon: string;
2030
+ } & {})[] | null;
2031
+ };
2032
+ };
2033
+ };
2034
+ };
2035
+ } & {
2036
+ protocols: {
2037
+ count: {
2038
+ get: {
2039
+ body: unknown;
2040
+ params: Record<never, string>;
2041
+ query: {
2042
+ name?: string | undefined;
2043
+ id?: string[] | undefined;
2044
+ items?: number | undefined;
2045
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
2046
+ page?: number | undefined;
2047
+ };
2048
+ headers: unknown;
2049
+ response: {
2050
+ 200: number;
2051
+ };
2052
+ };
2053
+ };
2054
+ };
2055
+ };
2056
+ } & {
2057
+ v4: {
2058
+ tokens: {
2059
+ ":id": {
2060
+ get: {
2061
+ body: unknown;
2062
+ params: {
2063
+ id: string;
2064
+ };
2065
+ query: unknown;
2066
+ headers: unknown;
2067
+ response: {
2068
+ 200: ({
2069
+ symbol: string;
2070
+ name: string | null;
2071
+ id: string;
2072
+ chainId: number;
2073
+ address: string;
2074
+ icon: string;
2075
+ decimals: number;
2076
+ verified: boolean;
2077
+ } & {
2078
+ price?: number | null | undefined;
2079
+ }) | undefined;
2080
+ };
2081
+ };
2082
+ };
2083
+ };
2084
+ } & {
2085
+ tokens: {
2086
+ balances: {
2087
+ get: {
2088
+ body: unknown;
2089
+ params: Record<never, string>;
2090
+ query: {
2091
+ tokenAddress?: string | undefined;
2092
+ additionalTokenAddresses?: string[] | undefined;
2093
+ chainId: number;
2094
+ userAddress: string;
2095
+ };
2096
+ headers: unknown;
2097
+ response: {
2098
+ 200: ({
2099
+ symbol: string;
2100
+ name: string | null;
2101
+ id: string;
2102
+ chainId: number;
2103
+ address: string;
2104
+ icon: string;
2105
+ decimals: number;
2106
+ verified: boolean;
2107
+ } & {
2108
+ price?: number | null | undefined;
2109
+ } & {
2110
+ balance: bigint;
2111
+ })[];
2112
+ };
2113
+ };
2114
+ };
2115
+ };
2116
+ } & {
2117
+ tokens: {
2118
+ index: {
2119
+ get: {
2120
+ body: unknown;
2121
+ params: Record<never, string>;
2122
+ query: {
2123
+ symbol?: string | undefined;
2124
+ name?: string | undefined;
2125
+ chainId?: any;
2126
+ address?: string | undefined;
2127
+ verified?: boolean | undefined;
2128
+ };
2129
+ headers: unknown;
2130
+ response: {
2131
+ 200: ({
2132
+ symbol: string;
2133
+ name: string | null;
2134
+ id: string;
2135
+ chainId: number;
2136
+ address: string;
2137
+ icon: string;
2138
+ decimals: number;
2139
+ verified: boolean;
2140
+ } & {
2141
+ price?: number | null | undefined;
2142
+ })[];
2143
+ };
2144
+ };
2145
+ };
2146
+ };
2147
+ } & {
2148
+ tokens: {
2149
+ count: {
2150
+ get: {
2151
+ body: unknown;
2152
+ params: Record<never, string>;
2153
+ query: {
2154
+ symbol?: string | undefined;
2155
+ name?: string | undefined;
2156
+ chainId?: any;
2157
+ address?: string | undefined;
2158
+ verified?: boolean | undefined;
2159
+ };
2160
+ headers: unknown;
2161
+ response: {
2162
+ 200: number;
2163
+ };
2164
+ };
2165
+ };
2166
+ };
2167
+ };
2168
+ } & {
2169
+ v4: {
2170
+ rewards: {
2171
+ engine: {
2172
+ post: {
2173
+ body: {
2174
+ recipient: string;
2175
+ distributionChainId: number;
2176
+ root: string;
2177
+ proofs: string[];
2178
+ rewardToken: string;
2179
+ }[];
2180
+ params: Record<never, string>;
2181
+ query: unknown;
2182
+ headers: {
2183
+ authorization: string;
2184
+ };
2185
+ response: {
2186
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
2187
+ };
2188
+ };
2189
+ };
2190
+ };
2191
+ } & {
2192
+ rewards: {
2193
+ engine: {
2194
+ breakdowns: {
2195
+ post: {
2196
+ body: {
2197
+ distributionChainId: number;
2198
+ campaignId: string;
2199
+ root: string;
2200
+ rewardToken: string;
2201
+ breakdowns: {
2202
+ protocolId?: string | undefined;
2203
+ auxiliaryData1?: string | undefined;
2204
+ auxiliaryData2?: string | undefined;
2205
+ reason: string;
2206
+ pending: string;
2207
+ recipient: string;
2208
+ amount: string;
2209
+ claimed: string;
2210
+ }[];
2211
+ }[];
2212
+ params: Record<never, string>;
2213
+ query: unknown;
2214
+ headers: {
2215
+ authorization: string;
2216
+ };
2217
+ response: {
2218
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
2219
+ };
2220
+ };
2221
+ };
2222
+ };
2223
+ };
2224
+ } & {
2225
+ rewards: {
2226
+ pendings: {
2227
+ post: {
2228
+ body: {
2229
+ distributionChainId: number;
2230
+ campaignId: string;
2231
+ root: string;
2232
+ rewardToken: string;
2233
+ toUpdate: {
2234
+ auxiliaryData1?: string | undefined;
2235
+ auxiliaryData2?: string | undefined;
2236
+ reason: string;
2237
+ pending: string;
2238
+ recipient: string;
2239
+ }[];
2240
+ toCreate: {
2241
+ auxiliaryData1?: string | undefined;
2242
+ auxiliaryData2?: string | undefined;
2243
+ reason: string;
2244
+ pending: string;
2245
+ recipient: string;
2246
+ }[];
2247
+ };
2248
+ params: Record<never, string>;
2249
+ query: unknown;
2250
+ headers: {
2251
+ authorization: string;
2252
+ };
2253
+ response: {
2254
+ 200: boolean;
2255
+ };
2256
+ };
2257
+ };
2258
+ };
2259
+ } & {
2260
+ rewards: {
2261
+ count: {
2262
+ get: {
2263
+ body: unknown;
2264
+ params: Record<never, string>;
2265
+ query: unknown;
2266
+ headers: {
2267
+ authorization: string;
2268
+ };
2269
+ response: {
2270
+ 200: Record<string, {
2271
+ breakdown: number;
2272
+ rewards: Record<string, number>;
2273
+ }>;
2274
+ };
2275
+ };
2276
+ };
2277
+ };
2278
+ } & {
2279
+ rewards: {
2280
+ breakdown: {
2281
+ get: {
2282
+ body: unknown;
2283
+ params: Record<never, string>;
2284
+ query: {
2285
+ items?: number | undefined;
2286
+ page?: number | undefined;
2287
+ chainId: number;
2288
+ campaignIdentifiers: string | string[];
2289
+ };
2290
+ headers: unknown;
2291
+ response: {
2292
+ 200: {
2293
+ Campaign: {
2294
+ identifier: string;
2295
+ campaignId: string;
2296
+ };
2297
+ amount: string;
2298
+ Reward: {
2299
+ recipient: string;
2300
+ };
2301
+ }[];
2302
+ };
2303
+ };
2304
+ };
2305
+ };
2306
+ };
2307
+ } & {
2308
+ v4: {
2309
+ chains: {
2310
+ ":chainId": {
2311
+ get: {
2312
+ body: unknown;
2313
+ params: {
2314
+ chainId: number;
2315
+ };
2316
+ query: unknown;
2317
+ headers: unknown;
2318
+ response: {
2319
+ 200: ({
2320
+ Explorer: {
2321
+ id: string;
2322
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
2323
+ url: string;
2324
+ chainId: number;
2325
+ }[];
2326
+ } & {
2327
+ id: number;
2328
+ name: string;
2329
+ icon: string;
2330
+ }) | null;
2331
+ };
2332
+ };
2333
+ };
2334
+ };
2335
+ } & {
2336
+ chains: {
2337
+ index: {
2338
+ get: {
2339
+ body: unknown;
2340
+ params: Record<never, string>;
2341
+ query: {
2342
+ search?: string | undefined;
2343
+ };
2344
+ headers: unknown;
2345
+ response: {
2346
+ 200: ({
2347
+ Explorer: {
2348
+ id: string;
2349
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
2350
+ url: string;
2351
+ chainId: number;
2352
+ }[];
2353
+ } & {
2354
+ id: number;
2355
+ name: string;
2356
+ icon: string;
2357
+ })[];
2358
+ };
2359
+ };
2360
+ };
2361
+ };
2362
+ } & {
2363
+ chains: {
2364
+ count: {
2365
+ get: {
2366
+ body: unknown;
2367
+ params: Record<never, string>;
2368
+ query: {
2369
+ search?: string | undefined;
2370
+ };
2371
+ headers: unknown;
2372
+ response: {
2373
+ 200: number;
2374
+ };
2375
+ };
2376
+ };
2377
+ };
2378
+ };
2379
+ } & {
2380
+ v4: {
2381
+ prices: {
2382
+ index: {
2383
+ get: {
2384
+ body: unknown;
2385
+ params: Record<never, string>;
2386
+ query: unknown;
2387
+ headers: unknown;
2388
+ response: {
2389
+ 200: {
2390
+ [token: string]: number;
2391
+ };
2392
+ };
2393
+ };
2394
+ };
2395
+ } & {
2396
+ symbol: {
2397
+ ":symbol": {
2398
+ get: {
2399
+ body: unknown;
2400
+ params: {
2401
+ symbol: string;
2402
+ };
2403
+ query: unknown;
2404
+ headers: unknown;
2405
+ response: {
2406
+ 200: number;
2407
+ };
2408
+ };
2409
+ };
2410
+ };
2411
+ } & {
2412
+ sources: {
2413
+ index: {
2414
+ get: {
2415
+ body: unknown;
2416
+ params: Record<never, string>;
2417
+ query: unknown;
2418
+ headers: unknown;
2419
+ response: {
2420
+ 200: {
2421
+ id: number;
2422
+ symbol: string;
2423
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
2424
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
2425
+ }[];
2426
+ };
2427
+ };
2428
+ };
2429
+ };
2430
+ } & {
2431
+ sources: {
2432
+ symbol: {
2433
+ ":symbol": {
2434
+ get: {
2435
+ body: unknown;
2436
+ params: {
2437
+ symbol: string;
2438
+ };
2439
+ query: unknown;
2440
+ headers: unknown;
2441
+ response: {
2442
+ 200: {
2443
+ id: number;
2444
+ symbol: string;
2445
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
2446
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
2447
+ };
2448
+ };
2449
+ };
2450
+ };
2451
+ };
2452
+ };
2453
+ } & {
2454
+ sources: {
2455
+ index: {
2456
+ post: {
2457
+ body: {
2458
+ symbol: string;
2459
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA";
2460
+ args: {};
2461
+ };
2462
+ params: Record<never, string>;
2463
+ query: unknown;
2464
+ headers: {
2465
+ authorization: string;
2466
+ };
2467
+ response: {
2468
+ 200: number | undefined;
2469
+ };
2470
+ };
2471
+ };
2472
+ };
2473
+ } & {
2474
+ sources: {
2475
+ symbol: {
2476
+ ":symbol": {
2477
+ patch: {
2478
+ body: {
2479
+ symbol?: string | undefined;
2480
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | undefined;
2481
+ args?: {} | undefined;
2482
+ };
2483
+ params: {
2484
+ symbol: string;
2485
+ };
2486
+ query: unknown;
2487
+ headers: {
2488
+ authorization: string;
2489
+ };
2490
+ response: {
2491
+ 200: {
2492
+ id: number;
2493
+ symbol: string;
2494
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
2495
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
2496
+ };
2497
+ };
2498
+ };
2499
+ };
2500
+ };
2501
+ };
2502
+ } & {
2503
+ sources: {
2504
+ symbol: {
2505
+ ":symbol": {
2506
+ delete: {
2507
+ body: unknown;
2508
+ params: {
2509
+ symbol: string;
2510
+ };
2511
+ query: unknown;
2512
+ headers: {
2513
+ authorization: string;
2514
+ };
2515
+ response: {
2516
+ 200: {
2517
+ id: number;
2518
+ symbol: string;
2519
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
2520
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
2521
+ };
2522
+ };
2523
+ };
2524
+ };
2525
+ };
2526
+ };
2527
+ };
2528
+ };
2529
+ } & {
2530
+ v4: {
2531
+ blacklists: {
2532
+ index: {
2533
+ get: {
2534
+ body: unknown;
2535
+ params: Record<never, string>;
2536
+ query: unknown;
2537
+ headers: unknown;
2538
+ response: {
2539
+ 200: {
2540
+ id: string;
2541
+ chainId: number;
2542
+ poolAddress: string;
2543
+ userAddress: string;
2544
+ arrestTimestamp: bigint;
2545
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
2546
+ }[];
2547
+ };
2548
+ };
2549
+ };
2550
+ };
2551
+ } & {
2552
+ blacklists: {
2553
+ all: {
2554
+ get: {
2555
+ body: unknown;
2556
+ params: Record<never, string>;
2557
+ query: unknown;
2558
+ headers: unknown;
2559
+ response: {
2560
+ 200: string[];
2561
+ };
2562
+ };
2563
+ };
2564
+ };
2565
+ } & {
2566
+ blacklists: {
2567
+ check: {
2568
+ ":address": {
2569
+ get: {
2570
+ body: unknown;
2571
+ params: {
2572
+ address: string;
2573
+ };
2574
+ query: unknown;
2575
+ headers: unknown;
2576
+ response: {
2577
+ 200: boolean;
2578
+ };
2579
+ };
2580
+ };
2581
+ };
2582
+ };
2583
+ } & {
2584
+ blacklists: {
2585
+ index: {
2586
+ post: {
2587
+ body: {
2588
+ reason?: string | undefined;
2589
+ chainId: number;
2590
+ poolAddress: string;
2591
+ userAddress: string;
2592
+ };
2593
+ params: Record<never, string>;
2594
+ query: unknown;
2595
+ headers: {
2596
+ authorization: string;
2597
+ };
2598
+ response: {
2599
+ 200: {
2600
+ id: string;
2601
+ chainId: number;
2602
+ poolAddress: string;
2603
+ userAddress: string;
2604
+ arrestTimestamp: bigint;
2605
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
2606
+ };
2607
+ };
2608
+ };
2609
+ };
2610
+ };
2611
+ } & {
2612
+ blacklists: {
2613
+ user: {
2614
+ ":address": {
2615
+ delete: {
2616
+ body: unknown;
2617
+ params: {
2618
+ address: string;
2619
+ };
2620
+ query: unknown;
2621
+ headers: {
2622
+ authorization: string;
2623
+ };
2624
+ response: {
2625
+ 200: boolean;
2626
+ };
2627
+ };
2628
+ };
2629
+ };
2630
+ };
2631
+ };
2632
+ } & {
2633
+ v4: {
2634
+ users: {
2635
+ index: {
2636
+ get: {
2637
+ body: unknown;
2638
+ params: Record<never, string>;
2639
+ query: {
2640
+ items?: number | undefined;
2641
+ tags?: string[] | undefined;
2642
+ page?: number | undefined;
2643
+ address?: string | undefined;
2644
+ };
2645
+ headers: unknown;
2646
+ response: {
2647
+ 200: {
2648
+ address: string;
2649
+ tags: string[];
2650
+ }[];
2651
+ };
2652
+ };
2653
+ };
2654
+ };
2655
+ } & {
2656
+ users: {
2657
+ ":address": {
2658
+ get: {
2659
+ body: unknown;
2660
+ params: Record<"address", string>;
2661
+ query: unknown;
2662
+ headers: unknown;
2663
+ response: {
2664
+ 200: {
2665
+ address: string;
2666
+ } | null;
2667
+ };
2668
+ };
2669
+ };
2670
+ };
2671
+ } & {
2672
+ users: {
2673
+ ":address": {
2674
+ rewards: {
2675
+ full: {
2676
+ get: {
2677
+ body: unknown;
2678
+ params: {
2679
+ address: string;
2680
+ };
2681
+ query: unknown;
2682
+ headers: unknown;
2683
+ response: {
2684
+ 200: (Omit<{
2685
+ chain: import("../../database/api/.generated").Chain;
2686
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
2687
+ }, "rewards"> & {
2688
+ rewards: (Omit<{
2689
+ token: {
2690
+ id: string;
2691
+ name: string | null;
2692
+ chainId: number;
2693
+ address: string;
2694
+ decimals: number;
2695
+ symbol: string;
2696
+ icon: string;
2697
+ verified: boolean;
2698
+ price: number | null;
2699
+ };
2700
+ breakdowns: {
2701
+ campaignId: string;
2702
+ opportunity: {
2703
+ Chain: {
2704
+ id: number;
2705
+ name: string;
2706
+ icon: string;
2707
+ };
2708
+ Tokens: {
2709
+ id: string;
2710
+ name: string | null;
2711
+ chainId: number;
2712
+ address: string;
2713
+ decimals: number;
2714
+ symbol: string;
2715
+ icon: string;
2716
+ verified: boolean;
2717
+ price: number | null;
2718
+ }[];
2719
+ Protocols: {
2720
+ id: string;
2721
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2722
+ name: string;
2723
+ description: string;
2724
+ url: string;
2725
+ icon: string;
2726
+ }[];
2727
+ MainProtocol: {
2728
+ id: string;
2729
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2730
+ name: string;
2731
+ description: string;
2732
+ url: string;
2733
+ icon: string;
2734
+ } | null;
2735
+ } & {
2736
+ id: string;
2737
+ chainId: number;
2738
+ type: import("../../database/api/.generated").$Enums.CampaignType;
2739
+ identifier: string;
2740
+ name: string;
2741
+ status: import("../../database/api/.generated").$Enums.Status;
2742
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
2743
+ mainProtocolId: string | null;
2744
+ tvl: number;
2745
+ apr: number;
2746
+ dailyRewards: number;
2747
+ tags: string[];
2748
+ };
2749
+ reason: string;
2750
+ amount: string;
2751
+ claimed: string;
2752
+ pending: string;
2753
+ auxiliaryData1: string | null;
2754
+ auxiliaryData2: string | null;
2755
+ }[];
2756
+ claimed: bigint;
2757
+ amount: bigint;
2758
+ pending: bigint;
2759
+ root: string;
2760
+ recipient: string;
2761
+ proofs: string[];
2762
+ }, "breakdowns"> & {
2763
+ breakdowns: {
2764
+ opportunity: import("../modules/v4").Opportunity["model"] | null;
2765
+ claimed: bigint;
2766
+ amount: bigint;
2767
+ pending: bigint;
2768
+ auxiliaryData1: string | null;
2769
+ auxiliaryData2: string | null;
2770
+ }[];
2771
+ })[];
2772
+ distributor: string;
2773
+ })[];
2774
+ };
2775
+ };
2776
+ };
2777
+ };
2778
+ };
2779
+ };
2780
+ } & {
2781
+ users: {
2782
+ ":address": {
2783
+ rewards: {
2784
+ get: {
2785
+ body: unknown;
2786
+ params: {
2787
+ address: string;
2788
+ };
2789
+ query: {
2790
+ chainId: number | number[];
2791
+ };
2792
+ headers: unknown;
2793
+ response: {
2794
+ 200: (Omit<{
2795
+ chain: import("../../database/api/.generated").Chain;
2796
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
2797
+ }, "rewards"> & {
2798
+ rewards: (Omit<{
2799
+ token: {
2800
+ id: string;
2801
+ name: string | null;
2802
+ chainId: number;
2803
+ address: string;
2804
+ decimals: number;
2805
+ symbol: string;
2806
+ icon: string;
2807
+ verified: boolean;
2808
+ price: number | null;
2809
+ };
2810
+ breakdowns: {
2811
+ campaignId: string;
2812
+ opportunity: {
2813
+ Chain: {
2814
+ id: number;
2815
+ name: string;
2816
+ icon: string;
2817
+ };
2818
+ Tokens: {
2819
+ id: string;
2820
+ name: string | null;
2821
+ chainId: number;
2822
+ address: string;
2823
+ decimals: number;
2824
+ symbol: string;
2825
+ icon: string;
2826
+ verified: boolean;
2827
+ price: number | null;
2828
+ }[];
2829
+ Protocols: {
2830
+ id: string;
2831
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2832
+ name: string;
2833
+ description: string;
2834
+ url: string;
2835
+ icon: string;
2836
+ }[];
2837
+ MainProtocol: {
2838
+ id: string;
2839
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2840
+ name: string;
2841
+ description: string;
2842
+ url: string;
2843
+ icon: string;
2844
+ } | null;
2845
+ } & {
2846
+ id: string;
2847
+ chainId: number;
2848
+ type: import("../../database/api/.generated").$Enums.CampaignType;
2849
+ identifier: string;
2850
+ name: string;
2851
+ status: import("../../database/api/.generated").$Enums.Status;
2852
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
2853
+ mainProtocolId: string | null;
2854
+ tvl: number;
2855
+ apr: number;
2856
+ dailyRewards: number;
2857
+ tags: string[];
2858
+ };
2859
+ reason: string;
2860
+ amount: string;
2861
+ claimed: string;
2862
+ pending: string;
2863
+ auxiliaryData1: string | null;
2864
+ auxiliaryData2: string | null;
2865
+ }[];
2866
+ claimed: bigint;
2867
+ amount: bigint;
2868
+ pending: bigint;
2869
+ root: string;
2870
+ recipient: string;
2871
+ proofs: string[];
2872
+ }, "breakdowns"> & {
2873
+ breakdowns: {
2874
+ campaignId: string;
2875
+ reason: string;
2876
+ amount: string;
2877
+ claimed: string;
2878
+ pending: string;
2879
+ auxiliaryData1: string | null;
2880
+ auxiliaryData2: string | null;
2881
+ }[];
2882
+ })[];
2883
+ })[];
2884
+ };
2885
+ };
2886
+ };
2887
+ };
2888
+ };
2889
+ } & {
2890
+ users: {
2891
+ index: {
2892
+ post: {
2893
+ body: {
2894
+ tags: string[];
2895
+ address: string;
2896
+ };
2897
+ params: Record<never, string>;
2898
+ query: unknown;
2899
+ headers: {
2900
+ authorization: string;
2901
+ };
2902
+ response: {
2903
+ 200: {
2904
+ address: string;
2905
+ tags: string[];
2906
+ };
2907
+ };
2908
+ };
2909
+ };
2910
+ };
2911
+ } & {
2912
+ users: {
2913
+ ":address": {
2914
+ tags: {
2915
+ patch: {
2916
+ body: {
2917
+ tags: string[];
2918
+ };
2919
+ params: {
2920
+ address: string;
2921
+ };
2922
+ query: unknown;
2923
+ headers: {
2924
+ authorization: string;
2925
+ };
2926
+ response: {
2927
+ 200: {
2928
+ address: string;
2929
+ tags: string[];
2930
+ };
2931
+ };
2932
+ };
2933
+ };
2934
+ };
2935
+ };
2936
+ };
2937
+ } & {
2938
+ v4: {
2939
+ roots: {
2940
+ index: {
2941
+ get: {
2942
+ body: unknown;
2943
+ params: Record<never, string>;
2944
+ query: {
2945
+ chainId: number;
2946
+ fromTimestamp: string;
2947
+ toTimestamp: string;
2948
+ };
2949
+ headers: unknown;
2950
+ response: {
2951
+ 200: {
2952
+ root: string;
2953
+ chainId: number;
2954
+ epoch: number;
2955
+ timestamp: bigint;
2956
+ }[];
2957
+ };
2958
+ };
2959
+ };
2960
+ };
2961
+ };
2962
+ } & {
2963
+ v4: {
2964
+ participate: {
2965
+ targets: {
2966
+ get: {
2967
+ body: unknown;
2968
+ params: Record<never, string>;
2969
+ query: {
2970
+ identifier?: string | undefined;
2971
+ chainId: number;
2972
+ protocolId: string;
2973
+ };
2974
+ headers: unknown;
2975
+ response: {
2976
+ 200: import("../modules/v4/participate/participate.model").ParticipateTarget[] | undefined;
2977
+ };
2978
+ };
2979
+ };
2980
+ };
2981
+ } & {
2982
+ participate: {
2983
+ protocols: {
2984
+ get: {
2985
+ body: unknown;
2986
+ params: Record<never, string>;
2987
+ query: {
2988
+ chainId?: number | undefined;
2989
+ };
2990
+ headers: unknown;
2991
+ response: {
2992
+ 200: ({
2993
+ name: string;
2994
+ url: string;
2995
+ description: string;
2996
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
2997
+ icon: string;
2998
+ } & {})[] | null;
2999
+ };
3000
+ };
3001
+ };
3002
+ };
3003
+ } & {
3004
+ participate: {
3005
+ quote: {
3006
+ get: {
3007
+ body: unknown;
3008
+ params: Record<never, string>;
3009
+ query: {
3010
+ identifier: string;
3011
+ chainId: number;
3012
+ protocolId: string;
3013
+ userAddress: string;
3014
+ fromAmount: string;
3015
+ fromTokenAddress: string;
3016
+ };
3017
+ headers: unknown;
3018
+ response: {
3019
+ 200: {
3020
+ amountOut: {};
3021
+ gas: string;
3022
+ feeAmount: string[];
3023
+ priceImpact: number;
3024
+ } | undefined;
3025
+ };
3026
+ };
3027
+ };
3028
+ };
3029
+ } & {
3030
+ participate: {
3031
+ transaction: {
3032
+ get: {
3033
+ body: unknown;
3034
+ params: Record<never, string>;
3035
+ query: {
3036
+ identifier: string;
3037
+ chainId: number;
3038
+ protocolId: string;
3039
+ userAddress: string;
3040
+ fromAmount: string;
3041
+ fromTokenAddress: string;
3042
+ };
3043
+ headers: unknown;
3044
+ response: {
3045
+ 200: {
3046
+ amountOut: string;
3047
+ gas: string;
3048
+ feeAmount: string[];
3049
+ priceImpact: number;
3050
+ createAt: number;
3051
+ tx: {
3052
+ data: string;
3053
+ from: string;
3054
+ value: string;
3055
+ to: string;
3056
+ };
3057
+ } | undefined;
3058
+ };
3059
+ };
3060
+ };
3061
+ };
3062
+ };
3063
+ } & {
3064
+ v4: {
3065
+ accounting: {
3066
+ index: {
3067
+ get: {
3068
+ body: unknown;
3069
+ params: Record<never, string>;
3070
+ query: {
3071
+ items?: number | undefined;
3072
+ page?: number | undefined;
3073
+ };
3074
+ headers: {
3075
+ authorization: string;
3076
+ };
3077
+ response: {
3078
+ 200: {
3079
+ id: string;
3080
+ chainId: number;
3081
+ fromTokenId: string;
3082
+ toTokenId: string;
3083
+ multisig: string;
3084
+ recipient: string;
3085
+ amountIn: string;
3086
+ amountOut: string;
3087
+ datetime: Date;
3088
+ timestamp: number;
3089
+ }[];
3090
+ };
3091
+ };
3092
+ };
3093
+ } & {
3094
+ revenues: {
3095
+ get: {
3096
+ body: unknown;
3097
+ params: Record<never, string>;
3098
+ query: unknown;
3099
+ headers: {
3100
+ authorization: string;
3101
+ };
3102
+ response: {
3103
+ 200: {
3104
+ totalAmount: number;
3105
+ };
3106
+ };
3107
+ };
3108
+ };
3109
+ } & {
3110
+ revenues: {
3111
+ "per-month": {
3112
+ ":year": {
3113
+ ":month": {
3114
+ get: {
3115
+ body: unknown;
3116
+ params: {
3117
+ month: number;
3118
+ year: number;
3119
+ };
3120
+ query: unknown;
3121
+ headers: {
3122
+ authorization: string;
3123
+ };
3124
+ response: {
3125
+ 200: {
3126
+ totalAmount: number;
3127
+ from: string;
3128
+ to: string;
3129
+ };
3130
+ };
3131
+ };
3132
+ };
3133
+ };
3134
+ };
3135
+ };
3136
+ } & {
3137
+ revenues: {
3138
+ chains: {
3139
+ ":chainId": {
3140
+ get: {
3141
+ body: unknown;
3142
+ params: {
3143
+ chainId: number;
3144
+ };
3145
+ query: unknown;
3146
+ headers: {
3147
+ authorization: string;
3148
+ };
3149
+ response: {
3150
+ 200: {
3151
+ totalAmount: number;
3152
+ };
3153
+ };
3154
+ };
3155
+ };
3156
+ };
3157
+ };
3158
+ } & {
3159
+ revenues: {
3160
+ chains: {
3161
+ ":chainId": {
3162
+ "per-month": {
3163
+ ":year": {
3164
+ ":month": {
3165
+ get: {
3166
+ body: unknown;
3167
+ params: {
3168
+ chainId: number;
3169
+ month: number;
3170
+ year: number;
3171
+ };
3172
+ query: unknown;
3173
+ headers: {
3174
+ authorization: string;
3175
+ };
3176
+ response: {
3177
+ 200: {
3178
+ totalAmount: number;
3179
+ from: string;
3180
+ to: string;
3181
+ };
3182
+ };
3183
+ };
3184
+ };
3185
+ };
3186
+ };
3187
+ };
3188
+ };
3189
+ };
3190
+ } & {
3191
+ tokens: {
3192
+ ":chainId": {
3193
+ ":tokenAddress": {
3194
+ get: {
3195
+ body: unknown;
3196
+ params: {
3197
+ chainId: number;
3198
+ tokenAddress: string;
3199
+ };
3200
+ query: unknown;
3201
+ headers: {
3202
+ authorization: string;
3203
+ };
3204
+ response: {
3205
+ 200: {
3206
+ totalAmount: number;
3207
+ totalAmountUSD: number;
3208
+ };
3209
+ };
3210
+ };
3211
+ };
3212
+ };
3213
+ };
3214
+ } & {
3215
+ tokens: {
3216
+ ":chainId": {
3217
+ ":tokenAddress": {
3218
+ "per-month": {
3219
+ ":year": {
3220
+ ":month": {
3221
+ get: {
3222
+ body: unknown;
3223
+ params: {
3224
+ chainId: number;
3225
+ tokenAddress: string;
3226
+ month: number;
3227
+ year: number;
3228
+ };
3229
+ query: unknown;
3230
+ headers: {
3231
+ authorization: string;
3232
+ };
3233
+ response: {
3234
+ 200: {
3235
+ totalAmount: number;
3236
+ totalAmountUSD: number;
3237
+ from: string;
3238
+ to: string;
3239
+ };
3240
+ };
3241
+ };
3242
+ };
3243
+ };
3244
+ };
3245
+ };
3246
+ };
3247
+ };
3248
+ };
3249
+ };
3250
+ } & {
3251
+ v4: {
3252
+ campaignStatus: {
3253
+ engine: {
3254
+ post: {
3255
+ body: {
3256
+ status: {
3257
+ value: "SUCCESS";
3258
+ computedUntil: number;
3259
+ } | {
3260
+ value: "PROCESSING";
3261
+ } | {
3262
+ error: string;
3263
+ details: string;
3264
+ value: "SKIPPED";
3265
+ } | {
3266
+ error: string;
3267
+ details: string;
3268
+ value: "FAILED";
3269
+ };
3270
+ campaignId: string;
3271
+ distributionChain: number;
3272
+ };
3273
+ params: Record<never, string>;
3274
+ query: unknown;
3275
+ headers: {
3276
+ authorization: string;
3277
+ };
3278
+ response: {
3279
+ 200: void;
3280
+ };
3281
+ };
3282
+ };
3283
+ };
3284
+ } & {
3285
+ campaignStatus: {
3286
+ index: {
3287
+ get: {
3288
+ body: unknown;
3289
+ params: Record<never, string>;
3290
+ query: unknown;
3291
+ headers: unknown;
3292
+ response: {
3293
+ 200: {
3294
+ campaignId: string;
3295
+ computedUntil: bigint;
3296
+ processingStarted: bigint;
3297
+ status: import("../../database/api/.generated").$Enums.RunStatus;
3298
+ error: string;
3299
+ details: import("../../database/api/.generated").Prisma.JsonValue;
3300
+ }[];
3301
+ };
3302
+ };
3303
+ };
3304
+ };
3305
+ } & {
3306
+ campaignStatus: {
3307
+ unique: {
3308
+ get: {
3309
+ body: unknown;
3310
+ params: Record<never, string>;
3311
+ query: {
3312
+ identifier: string;
3313
+ distributionChain: number;
3314
+ };
3315
+ headers: unknown;
3316
+ response: {
3317
+ 200: {
3318
+ campaignId: string;
3319
+ computedUntil: bigint;
3320
+ processingStarted: bigint;
3321
+ status: import("../../database/api/.generated").$Enums.RunStatus;
3322
+ error: string;
3323
+ details: import("../../database/api/.generated").Prisma.JsonValue;
3324
+ };
3325
+ };
3326
+ };
3327
+ };
3328
+ };
3329
+ } & {
3330
+ campaignStatus: {
3331
+ computeChain: {
3332
+ ":chainId": {
3333
+ get: {
3334
+ body: unknown;
3335
+ params: {
3336
+ chainId: number;
3337
+ };
3338
+ query: unknown;
3339
+ headers: unknown;
3340
+ response: {
3341
+ 200: {
3342
+ campaignId: string;
3343
+ computedUntil: bigint;
3344
+ processingStarted: bigint;
3345
+ status: import("../../database/api/.generated").$Enums.RunStatus;
3346
+ error: string;
3347
+ details: import("../../database/api/.generated").Prisma.JsonValue;
3348
+ }[];
3349
+ };
3350
+ };
3351
+ };
3352
+ };
3353
+ };
3354
+ } & {
3355
+ campaignStatus: {
3356
+ overlaps: {
3357
+ get: {
3358
+ body: unknown;
3359
+ params: Record<never, string>;
3360
+ query: {
3361
+ identifier: string;
3362
+ distributionChain: number;
3363
+ };
3364
+ headers: {
3365
+ authorization: string;
3366
+ };
3367
+ response: {
3368
+ 200: boolean;
3369
+ };
3370
+ };
3371
+ };
3372
+ };
3373
+ };
3374
+ }, {
3375
+ derive: {};
3376
+ resolve: {};
3377
+ schema: {};
3378
+ }, {
3379
+ derive: {
3380
+ readonly tracer: import("dd-trace").Tracer;
3381
+ readonly span: import("dd-trace").Span;
3382
+ readonly trace: <R, T extends () => R>(handler: T) => R;
3383
+ };
3384
+ resolve: {};
3385
+ schema: {};
3386
+ }>, config?: import("@elysiajs/eden").Treaty.Config) => {
3387
+ valueOf: {};
3388
+ index: {
3389
+ get: (options?: {
3390
+ headers?: Record<string, unknown> | undefined;
3391
+ query?: Record<string, unknown> | undefined;
3392
+ fetch?: RequestInit | undefined;
3393
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3394
+ 200: string;
3395
+ }>>;
3396
+ };
3397
+ v4: {
3398
+ opportunities: ((params: {
3399
+ id: string | number;
3400
+ }) => {
3401
+ get: (options?: {
3402
+ headers?: Record<string, unknown> | undefined;
3403
+ query?: Record<string, unknown> | undefined;
3404
+ fetch?: RequestInit | undefined;
3405
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3406
+ 200: {
3407
+ aprRecord: {
3408
+ cumulated: number;
3409
+ cummulated: number;
3410
+ timestamp: bigint;
3411
+ breakdowns: {
3412
+ id: number;
3413
+ identifier: string;
3414
+ type: import("../../database/api/.generated").$Enums.AprType;
3415
+ value: number;
3416
+ aprRecordId: string;
3417
+ }[];
3418
+ };
3419
+ tvlRecord: {
3420
+ id: string;
3421
+ total: number;
3422
+ timestamp: bigint;
3423
+ breakdowns: {
3424
+ id: number;
3425
+ identifier: string;
3426
+ type: import("../../database/api/.generated").$Enums.TvlType;
3427
+ value: number;
3428
+ tvlRecordId: string;
3429
+ }[];
3430
+ };
3431
+ rewardsRecord: {
3432
+ id: string;
3433
+ total: number;
3434
+ timestamp: bigint;
3435
+ breakdowns: {
3436
+ id: number;
3437
+ value: number;
3438
+ campaignId: string;
3439
+ dailyRewardsRecordId: string;
3440
+ }[];
3441
+ };
3442
+ id: string;
3443
+ tokens: {
3444
+ id: string;
3445
+ name: string | null;
3446
+ chainId: number;
3447
+ address: string;
3448
+ decimals: number;
3449
+ symbol: string;
3450
+ icon: string;
3451
+ verified: boolean;
3452
+ price: number | null;
3453
+ }[];
3454
+ chain: {
3455
+ id: number;
3456
+ name: string;
3457
+ icon: string;
3458
+ };
3459
+ protocol: {
3460
+ id: string;
3461
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
3462
+ name: string;
3463
+ description: string;
3464
+ url: string;
3465
+ icon: string;
3466
+ } | undefined;
3467
+ name: string;
3468
+ type: import("../../database/api/.generated").$Enums.CampaignType;
3469
+ status: import("../../database/api/.generated").$Enums.Status;
3470
+ tags: string[];
3471
+ identifier: string;
3472
+ chainId: number;
3473
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
3474
+ tvl: number;
3475
+ apr: number;
3476
+ dailyRewards: number;
3477
+ } | null | undefined;
3478
+ }>>;
3479
+ campaigns: {
3480
+ get: (options?: {
3481
+ headers?: Record<string, unknown> | undefined;
3482
+ query?: Record<string, unknown> | undefined;
3483
+ fetch?: RequestInit | undefined;
3484
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3485
+ 200: {
3486
+ aprRecord: {
3487
+ cumulated: number;
3488
+ cummulated: number;
3489
+ timestamp: bigint;
3490
+ breakdowns: {
3491
+ id: number;
3492
+ identifier: string;
3493
+ type: import("../../database/api/.generated").$Enums.AprType;
3494
+ value: number;
3495
+ aprRecordId: string;
3496
+ }[];
3497
+ };
3498
+ tvlRecord: {
3499
+ id: string;
3500
+ total: number;
3501
+ timestamp: bigint;
3502
+ breakdowns: {
3503
+ id: number;
3504
+ identifier: string;
3505
+ type: import("../../database/api/.generated").$Enums.TvlType;
3506
+ value: number;
3507
+ tvlRecordId: string;
3508
+ }[];
3509
+ };
3510
+ rewardsRecord: {
3511
+ id: string;
3512
+ total: number;
3513
+ timestamp: bigint;
3514
+ breakdowns: {
3515
+ id: number;
3516
+ value: number;
3517
+ campaignId: string;
3518
+ dailyRewardsRecordId: string;
3519
+ }[];
3520
+ };
3521
+ id: string;
3522
+ tokens: {
3523
+ id: string;
3524
+ name: string | null;
3525
+ chainId: number;
3526
+ address: string;
3527
+ decimals: number;
3528
+ symbol: string;
3529
+ icon: string;
3530
+ verified: boolean;
3531
+ price: number | null;
3532
+ }[];
3533
+ chain: {
3534
+ id: number;
3535
+ name: string;
3536
+ icon: string;
3537
+ };
3538
+ protocol: {
3539
+ id: string;
3540
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
3541
+ name: string;
3542
+ description: string;
3543
+ url: string;
3544
+ icon: string;
3545
+ } | undefined;
3546
+ name: string;
3547
+ type: import("../../database/api/.generated").$Enums.CampaignType;
3548
+ status: import("../../database/api/.generated").$Enums.Status;
3549
+ tags: string[];
3550
+ identifier: string;
3551
+ chainId: number;
3552
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
3553
+ tvl: number;
3554
+ apr: number;
3555
+ dailyRewards: number;
3556
+ } | null | undefined;
3557
+ }>>;
3558
+ };
3559
+ }) & {
3560
+ index: {
3561
+ post: (body: {
3562
+ name?: string | undefined;
3563
+ type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4";
3564
+ tokens: {
3565
+ chainId: number;
3566
+ address: string;
3567
+ }[];
3568
+ status: "NONE" | "PAST" | "LIVE" | "SOON";
3569
+ identifier: string;
3570
+ chainId: number;
3571
+ action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW";
3572
+ protocols: string[];
3573
+ mainProtocol: string;
3574
+ }, options: {
3575
+ headers: {
3576
+ authorization: string;
3577
+ };
3578
+ query?: Record<string, unknown> | undefined;
3579
+ fetch?: RequestInit | undefined;
3580
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3581
+ 200: void;
3582
+ }>>;
3583
+ get: (options: {
3584
+ headers?: Record<string, unknown> | undefined;
3585
+ query: {
3586
+ sort?: "tvl" | "apr" | "rewards" | undefined;
3587
+ name?: string | undefined;
3588
+ tokens?: string | undefined;
3589
+ status?: string | undefined;
3590
+ items?: number | undefined;
3591
+ tags?: string | undefined;
3592
+ chainId?: string | undefined;
3593
+ page?: number | undefined;
3594
+ action?: string | undefined;
3595
+ mainProtocolId?: string | undefined;
3596
+ order?: "asc" | "desc" | undefined;
3597
+ };
3598
+ fetch?: RequestInit | undefined;
3599
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3600
+ 200: ({
3601
+ aprRecord: {
3602
+ cumulated: number;
3603
+ cummulated: number;
3604
+ timestamp: bigint;
3605
+ breakdowns: {
3606
+ id: number;
3607
+ identifier: string;
3608
+ type: import("../../database/api/.generated").$Enums.AprType;
3609
+ value: number;
3610
+ aprRecordId: string;
3611
+ }[];
3612
+ };
3613
+ tvlRecord: {
3614
+ id: string;
3615
+ total: number;
3616
+ timestamp: bigint;
3617
+ breakdowns: {
3618
+ id: number;
3619
+ identifier: string;
3620
+ type: import("../../database/api/.generated").$Enums.TvlType;
3621
+ value: number;
3622
+ tvlRecordId: string;
3623
+ }[];
3624
+ };
3625
+ rewardsRecord: {
3626
+ id: string;
3627
+ total: number;
3628
+ timestamp: bigint;
3629
+ breakdowns: {
3630
+ id: number;
3631
+ value: number;
3632
+ campaignId: string;
3633
+ dailyRewardsRecordId: string;
3634
+ }[];
3635
+ };
3636
+ id: string;
3637
+ tokens: {
3638
+ id: string;
3639
+ name: string | null;
3640
+ chainId: number;
3641
+ address: string;
3642
+ decimals: number;
3643
+ symbol: string;
3644
+ icon: string;
3645
+ verified: boolean;
3646
+ price: number | null;
3647
+ }[];
3648
+ chain: {
3649
+ id: number;
3650
+ name: string;
3651
+ icon: string;
3652
+ };
3653
+ protocol: {
3654
+ id: string;
3655
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
3656
+ name: string;
3657
+ description: string;
3658
+ url: string;
3659
+ icon: string;
3660
+ } | undefined;
3661
+ name: string;
3662
+ type: import("../../database/api/.generated").$Enums.CampaignType;
3663
+ status: import("../../database/api/.generated").$Enums.Status;
3664
+ tags: string[];
3665
+ identifier: string;
3666
+ chainId: number;
3667
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
3668
+ tvl: number;
3669
+ apr: number;
3670
+ dailyRewards: number;
3671
+ } | null)[];
3672
+ }>>;
3673
+ };
3674
+ count: {
3675
+ get: (options: {
3676
+ headers?: Record<string, unknown> | undefined;
3677
+ query: {
3678
+ sort?: "tvl" | "apr" | "rewards" | undefined;
3679
+ name?: string | undefined;
3680
+ tokens?: string | undefined;
3681
+ status?: string | undefined;
3682
+ items?: number | undefined;
3683
+ tags?: string | undefined;
3684
+ chainId?: string | undefined;
3685
+ page?: number | undefined;
3686
+ action?: string | undefined;
3687
+ mainProtocolId?: string | undefined;
3688
+ order?: "asc" | "desc" | undefined;
3689
+ };
3690
+ fetch?: RequestInit | undefined;
3691
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3692
+ 200: number;
3693
+ }>>;
3694
+ };
3695
+ };
3696
+ campaigns: {
3697
+ index: {
3698
+ post: (body: {
3699
+ subType?: number | undefined;
3700
+ type: number;
3701
+ params: string;
3702
+ identifier: string;
3703
+ chainId: number;
3704
+ startTimestamp: string;
3705
+ endTimestamp: string;
3706
+ computeChainId: number;
3707
+ campaignId: string;
3708
+ amount: string;
3709
+ creator: string;
3710
+ rewardTokenAddress: string;
3711
+ opportunityIdentifier: string;
3712
+ }, options: {
3713
+ headers: {
3714
+ authorization: string;
3715
+ };
3716
+ query?: Record<string, unknown> | undefined;
3717
+ fetch?: RequestInit | undefined;
3718
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3719
+ 200: unknown;
3720
+ }>>;
3721
+ get: (options: {
3722
+ headers?: Record<string, unknown> | undefined;
3723
+ query: {
3724
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
3725
+ items?: number | undefined;
3726
+ identifier?: string | undefined;
3727
+ subType?: number | undefined;
3728
+ chainId?: number | undefined;
3729
+ startTimestamp?: string | undefined;
3730
+ endTimestamp?: string | undefined;
3731
+ page?: number | undefined;
3732
+ mainParameter?: string | undefined;
3733
+ campaignId?: string | undefined;
3734
+ opportunityId?: string | undefined;
3735
+ };
3736
+ fetch?: RequestInit | undefined;
3737
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3738
+ 200: ({
3739
+ params: any;
3740
+ chain: {
3741
+ id: number;
3742
+ name: string;
3743
+ icon: string;
3744
+ };
3745
+ rewardToken: {
3746
+ id: string;
3747
+ name: string | null;
3748
+ chainId: number;
3749
+ address: string;
3750
+ decimals: number;
3751
+ symbol: string;
3752
+ icon: string;
3753
+ verified: boolean;
3754
+ price: number | null;
3755
+ };
3756
+ distributionChain: {
3757
+ id: number;
3758
+ name: string;
3759
+ icon: string;
3760
+ } | undefined;
3761
+ id: string;
3762
+ computeChainId: number;
3763
+ distributionChainId: number;
3764
+ identifier: string;
3765
+ campaignId: string;
3766
+ type: import("../../database/api/.generated").$Enums.CampaignType;
3767
+ subType: number | null;
3768
+ rewardTokenId: string;
3769
+ amount: string;
3770
+ opportunityId: string;
3771
+ startTimestamp: bigint;
3772
+ endTimestamp: bigint;
3773
+ creatorAddress: string;
3774
+ } | null)[];
3775
+ }>>;
3776
+ };
3777
+ count: {
3778
+ get: (options: {
3779
+ headers?: Record<string, unknown> | undefined;
3780
+ query: {
3781
+ type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
3782
+ items?: number | undefined;
3783
+ identifier?: string | undefined;
3784
+ subType?: number | undefined;
3785
+ chainId?: number | undefined;
3786
+ startTimestamp?: string | undefined;
3787
+ endTimestamp?: string | undefined;
3788
+ page?: number | undefined;
3789
+ mainParameter?: string | undefined;
3790
+ campaignId?: string | undefined;
3791
+ opportunityId?: string | undefined;
3792
+ };
3793
+ fetch?: RequestInit | undefined;
3794
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3795
+ 200: number;
3796
+ }>>;
3797
+ };
3798
+ };
3799
+ protocols: ((params: {
3800
+ id: string | number;
3801
+ }) => {
3802
+ get: (options?: {
3803
+ headers?: Record<string, unknown> | undefined;
3804
+ query?: Record<string, unknown> | undefined;
3805
+ fetch?: RequestInit | undefined;
3806
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3807
+ 200: ({
3808
+ name: string;
3809
+ url: string;
3810
+ description: string;
3811
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
3812
+ icon: string;
3813
+ } & {}) | null;
3814
+ }>>;
3815
+ }) & {
3816
+ index: {
3817
+ get: (options: {
3818
+ headers?: Record<string, unknown> | undefined;
3819
+ query: {
3820
+ name?: string | undefined;
3821
+ id?: string[] | undefined;
3822
+ items?: number | undefined;
3823
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
3824
+ page?: number | undefined;
3825
+ };
3826
+ fetch?: RequestInit | undefined;
3827
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3828
+ 200: ({
3829
+ name: string;
3830
+ url: string;
3831
+ description: string;
3832
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
3833
+ icon: string;
3834
+ } & {})[] | null;
3835
+ }>>;
3836
+ };
3837
+ count: {
3838
+ get: (options: {
3839
+ headers?: Record<string, unknown> | undefined;
3840
+ query: {
3841
+ name?: string | undefined;
3842
+ id?: string[] | undefined;
3843
+ items?: number | undefined;
3844
+ tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
3845
+ page?: number | undefined;
3846
+ };
3847
+ fetch?: RequestInit | undefined;
3848
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3849
+ 200: number;
3850
+ }>>;
3851
+ };
3852
+ };
3853
+ tokens: ((params: {
3854
+ id: string | number;
3855
+ }) => {
3856
+ get: (options?: {
3857
+ headers?: Record<string, unknown> | undefined;
3858
+ query?: Record<string, unknown> | undefined;
3859
+ fetch?: RequestInit | undefined;
3860
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3861
+ 200: ({
3862
+ symbol: string;
3863
+ name: string | null;
3864
+ id: string;
3865
+ chainId: number;
3866
+ address: string;
3867
+ icon: string;
3868
+ decimals: number;
3869
+ verified: boolean;
3870
+ } & {
3871
+ price?: number | null | undefined;
3872
+ }) | undefined;
3873
+ }>>;
3874
+ }) & {
3875
+ balances: {
3876
+ get: (options: {
3877
+ headers?: Record<string, unknown> | undefined;
3878
+ query: {
3879
+ tokenAddress?: string | undefined;
3880
+ additionalTokenAddresses?: string[] | undefined;
3881
+ chainId: number;
3882
+ userAddress: string;
3883
+ };
3884
+ fetch?: RequestInit | undefined;
3885
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3886
+ 200: ({
3887
+ symbol: string;
3888
+ name: string | null;
3889
+ id: string;
3890
+ chainId: number;
3891
+ address: string;
3892
+ icon: string;
3893
+ decimals: number;
3894
+ verified: boolean;
3895
+ } & {
3896
+ price?: number | null | undefined;
3897
+ } & {
3898
+ balance: bigint;
3899
+ })[];
3900
+ }>>;
3901
+ };
3902
+ index: {
3903
+ get: (options: {
3904
+ headers?: Record<string, unknown> | undefined;
3905
+ query: {
3906
+ symbol?: string | undefined;
3907
+ name?: string | undefined;
3908
+ chainId?: any;
3909
+ address?: string | undefined;
3910
+ verified?: boolean | undefined;
3911
+ };
3912
+ fetch?: RequestInit | undefined;
3913
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3914
+ 200: ({
3915
+ symbol: string;
3916
+ name: string | null;
3917
+ id: string;
3918
+ chainId: number;
3919
+ address: string;
3920
+ icon: string;
3921
+ decimals: number;
3922
+ verified: boolean;
3923
+ } & {
3924
+ price?: number | null | undefined;
3925
+ })[];
3926
+ }>>;
3927
+ };
3928
+ count: {
3929
+ get: (options: {
3930
+ headers?: Record<string, unknown> | undefined;
3931
+ query: {
3932
+ symbol?: string | undefined;
3933
+ name?: string | undefined;
3934
+ chainId?: any;
3935
+ address?: string | undefined;
3936
+ verified?: boolean | undefined;
3937
+ };
3938
+ fetch?: RequestInit | undefined;
3939
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3940
+ 200: number;
3941
+ }>>;
3942
+ };
3943
+ };
3944
+ rewards: {
3945
+ engine: {
3946
+ post: (body: {
3947
+ recipient: string;
3948
+ distributionChainId: number;
3949
+ root: string;
3950
+ proofs: string[];
3951
+ rewardToken: string;
3952
+ }[], options: {
3953
+ headers: {
3954
+ authorization: string;
3955
+ };
3956
+ query?: Record<string, unknown> | undefined;
3957
+ fetch?: RequestInit | undefined;
3958
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3959
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
3960
+ }>>;
3961
+ breakdowns: {
3962
+ post: (body: {
3963
+ distributionChainId: number;
3964
+ campaignId: string;
3965
+ root: string;
3966
+ rewardToken: string;
3967
+ breakdowns: {
3968
+ protocolId?: string | undefined;
3969
+ auxiliaryData1?: string | undefined;
3970
+ auxiliaryData2?: string | undefined;
3971
+ reason: string;
3972
+ pending: string;
3973
+ recipient: string;
3974
+ amount: string;
3975
+ claimed: string;
3976
+ }[];
3977
+ }[], options: {
3978
+ headers: {
3979
+ authorization: string;
3980
+ };
3981
+ query?: Record<string, unknown> | undefined;
3982
+ fetch?: RequestInit | undefined;
3983
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
3984
+ 200: import("../../database/api/.generated").Prisma.BatchPayload;
3985
+ }>>;
3986
+ };
3987
+ };
3988
+ pendings: {
3989
+ post: (body: {
3990
+ distributionChainId: number;
3991
+ campaignId: string;
3992
+ root: string;
3993
+ rewardToken: string;
3994
+ toUpdate: {
3995
+ auxiliaryData1?: string | undefined;
3996
+ auxiliaryData2?: string | undefined;
3997
+ reason: string;
3998
+ pending: string;
3999
+ recipient: string;
4000
+ }[];
4001
+ toCreate: {
4002
+ auxiliaryData1?: string | undefined;
4003
+ auxiliaryData2?: string | undefined;
4004
+ reason: string;
4005
+ pending: string;
4006
+ recipient: string;
4007
+ }[];
4008
+ }, options: {
4009
+ headers: {
4010
+ authorization: string;
4011
+ };
4012
+ query?: Record<string, unknown> | undefined;
4013
+ fetch?: RequestInit | undefined;
4014
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4015
+ 200: boolean;
4016
+ }>>;
4017
+ };
4018
+ count: {
4019
+ get: (options: {
4020
+ headers: {
4021
+ authorization: string;
4022
+ };
4023
+ query?: Record<string, unknown> | undefined;
4024
+ fetch?: RequestInit | undefined;
4025
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4026
+ 200: Record<string, {
4027
+ breakdown: number;
4028
+ rewards: Record<string, number>;
4029
+ }>;
4030
+ }>>;
4031
+ };
4032
+ breakdown: {
4033
+ get: (options: {
4034
+ headers?: Record<string, unknown> | undefined;
4035
+ query: {
4036
+ items?: number | undefined;
4037
+ page?: number | undefined;
4038
+ chainId: number;
4039
+ campaignIdentifiers: string | string[];
4040
+ };
4041
+ fetch?: RequestInit | undefined;
4042
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4043
+ 200: {
4044
+ Campaign: {
4045
+ identifier: string;
4046
+ campaignId: string;
4047
+ };
4048
+ amount: string;
4049
+ Reward: {
4050
+ recipient: string;
4051
+ };
4052
+ }[];
4053
+ }>>;
4054
+ };
4055
+ };
4056
+ chains: ((params: {
4057
+ chainId: string | number;
4058
+ }) => {
4059
+ get: (options?: {
4060
+ headers?: Record<string, unknown> | undefined;
4061
+ query?: Record<string, unknown> | undefined;
4062
+ fetch?: RequestInit | undefined;
4063
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4064
+ 200: ({
4065
+ Explorer: {
4066
+ id: string;
4067
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
4068
+ url: string;
4069
+ chainId: number;
4070
+ }[];
4071
+ } & {
4072
+ id: number;
4073
+ name: string;
4074
+ icon: string;
4075
+ }) | null;
4076
+ }>>;
4077
+ }) & {
4078
+ index: {
4079
+ get: (options: {
4080
+ headers?: Record<string, unknown> | undefined;
4081
+ query: {
4082
+ search?: string | undefined;
4083
+ };
4084
+ fetch?: RequestInit | undefined;
4085
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4086
+ 200: ({
4087
+ Explorer: {
4088
+ id: string;
4089
+ type: import("../../database/api/.generated").$Enums.ExplorerType;
4090
+ url: string;
4091
+ chainId: number;
4092
+ }[];
4093
+ } & {
4094
+ id: number;
4095
+ name: string;
4096
+ icon: string;
4097
+ })[];
4098
+ }>>;
4099
+ };
4100
+ count: {
4101
+ get: (options: {
4102
+ headers?: Record<string, unknown> | undefined;
4103
+ query: {
4104
+ search?: string | undefined;
4105
+ };
4106
+ fetch?: RequestInit | undefined;
4107
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4108
+ 200: number;
4109
+ }>>;
4110
+ };
4111
+ };
4112
+ prices: {
4113
+ index: {
4114
+ get: (options?: {
4115
+ headers?: Record<string, unknown> | undefined;
4116
+ query?: Record<string, unknown> | undefined;
4117
+ fetch?: RequestInit | undefined;
4118
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4119
+ 200: {
4120
+ [token: string]: number;
4121
+ };
4122
+ }>>;
4123
+ };
4124
+ symbol: ((params: {
4125
+ symbol: string | number;
4126
+ }) => {
4127
+ get: (options?: {
4128
+ headers?: Record<string, unknown> | undefined;
4129
+ query?: Record<string, unknown> | undefined;
4130
+ fetch?: RequestInit | undefined;
4131
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4132
+ 200: number;
4133
+ }>>;
4134
+ }) & {};
4135
+ sources: {
4136
+ index: {
4137
+ get: (options?: {
4138
+ headers?: Record<string, unknown> | undefined;
4139
+ query?: Record<string, unknown> | undefined;
4140
+ fetch?: RequestInit | undefined;
4141
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4142
+ 200: {
4143
+ id: number;
4144
+ symbol: string;
4145
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
4146
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
4147
+ }[];
4148
+ }>>;
4149
+ post: (body: {
4150
+ symbol: string;
4151
+ method: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA";
4152
+ args: {};
4153
+ }, options: {
4154
+ headers: {
4155
+ authorization: string;
4156
+ };
4157
+ query?: Record<string, unknown> | undefined;
4158
+ fetch?: RequestInit | undefined;
4159
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4160
+ 200: number | undefined;
4161
+ }>>;
4162
+ };
4163
+ symbol: ((params: {
4164
+ symbol: string | number;
4165
+ }) => {
4166
+ get: (options?: {
4167
+ headers?: Record<string, unknown> | undefined;
4168
+ query?: Record<string, unknown> | undefined;
4169
+ fetch?: RequestInit | undefined;
4170
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4171
+ 200: {
4172
+ id: number;
4173
+ symbol: string;
4174
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
4175
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
4176
+ };
4177
+ }>>;
4178
+ patch: (body: {
4179
+ symbol?: string | undefined;
4180
+ method?: "COINGECKO" | "CONSTANT" | "EQUAL_TO" | "ERC4626" | "DEXSCREENER" | "INDEXCOOP" | "DEFILLAMA" | undefined;
4181
+ args?: {} | undefined;
4182
+ }, options: {
4183
+ headers: {
4184
+ authorization: string;
4185
+ };
4186
+ query?: Record<string, unknown> | undefined;
4187
+ fetch?: RequestInit | undefined;
4188
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4189
+ 200: {
4190
+ id: number;
4191
+ symbol: string;
4192
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
4193
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
4194
+ };
4195
+ }>>;
4196
+ delete: (body: unknown, options: {
4197
+ headers: {
4198
+ authorization: string;
4199
+ };
4200
+ query?: Record<string, unknown> | undefined;
4201
+ fetch?: RequestInit | undefined;
4202
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4203
+ 200: {
4204
+ id: number;
4205
+ symbol: string;
4206
+ method: import("../../database/api/.generated").$Enums.PriceSourceMethod;
4207
+ args: import("../../database/api/.generated").Prisma.JsonValue | null;
4208
+ };
4209
+ }>>;
4210
+ }) & {};
4211
+ };
4212
+ };
4213
+ blacklists: {
4214
+ index: {
4215
+ get: (options?: {
4216
+ headers?: Record<string, unknown> | undefined;
4217
+ query?: Record<string, unknown> | undefined;
4218
+ fetch?: RequestInit | undefined;
4219
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4220
+ 200: {
4221
+ id: string;
4222
+ chainId: number;
4223
+ poolAddress: string;
4224
+ userAddress: string;
4225
+ arrestTimestamp: bigint;
4226
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
4227
+ }[];
4228
+ }>>;
4229
+ post: (body: {
4230
+ reason?: string | undefined;
4231
+ chainId: number;
4232
+ poolAddress: string;
4233
+ userAddress: string;
4234
+ }, options: {
4235
+ headers: {
4236
+ authorization: string;
4237
+ };
4238
+ query?: Record<string, unknown> | undefined;
4239
+ fetch?: RequestInit | undefined;
4240
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4241
+ 200: {
4242
+ id: string;
4243
+ chainId: number;
4244
+ poolAddress: string;
4245
+ userAddress: string;
4246
+ arrestTimestamp: bigint;
4247
+ arrestDetails: import("../../database/api/.generated").Prisma.JsonValue;
4248
+ };
4249
+ }>>;
4250
+ };
4251
+ all: {
4252
+ get: (options?: {
4253
+ headers?: Record<string, unknown> | undefined;
4254
+ query?: Record<string, unknown> | undefined;
4255
+ fetch?: RequestInit | undefined;
4256
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4257
+ 200: string[];
4258
+ }>>;
4259
+ };
4260
+ check: ((params: {
4261
+ address: string | number;
4262
+ }) => {
4263
+ get: (options?: {
4264
+ headers?: Record<string, unknown> | undefined;
4265
+ query?: Record<string, unknown> | undefined;
4266
+ fetch?: RequestInit | undefined;
4267
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4268
+ 200: boolean;
4269
+ }>>;
4270
+ }) & {};
4271
+ user: ((params: {
4272
+ address: string | number;
4273
+ }) => {
4274
+ delete: (body: unknown, options: {
4275
+ headers: {
4276
+ authorization: string;
4277
+ };
4278
+ query?: Record<string, unknown> | undefined;
4279
+ fetch?: RequestInit | undefined;
4280
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4281
+ 200: boolean;
4282
+ }>>;
4283
+ }) & {};
4284
+ };
4285
+ users: ((params: {
4286
+ address: string | number;
4287
+ }) => {
4288
+ get: (options?: {
4289
+ headers?: Record<string, unknown> | undefined;
4290
+ query?: Record<string, unknown> | undefined;
4291
+ fetch?: RequestInit | undefined;
4292
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4293
+ 200: {
4294
+ address: string;
4295
+ } | null;
4296
+ }>>;
4297
+ rewards: {
4298
+ full: {
4299
+ get: (options?: {
4300
+ headers?: Record<string, unknown> | undefined;
4301
+ query?: Record<string, unknown> | undefined;
4302
+ fetch?: RequestInit | undefined;
4303
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4304
+ 200: (Omit<{
4305
+ chain: import("../../database/api/.generated").Chain;
4306
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
4307
+ }, "rewards"> & {
4308
+ rewards: (Omit<{
4309
+ token: {
4310
+ id: string;
4311
+ name: string | null;
4312
+ chainId: number;
4313
+ address: string;
4314
+ decimals: number;
4315
+ symbol: string;
4316
+ icon: string;
4317
+ verified: boolean;
4318
+ price: number | null;
4319
+ };
4320
+ breakdowns: {
4321
+ campaignId: string;
4322
+ opportunity: {
4323
+ Chain: {
4324
+ id: number;
4325
+ name: string;
4326
+ icon: string;
4327
+ };
4328
+ Tokens: {
4329
+ id: string;
4330
+ name: string | null;
4331
+ chainId: number;
4332
+ address: string;
4333
+ decimals: number;
4334
+ symbol: string;
4335
+ icon: string;
4336
+ verified: boolean;
4337
+ price: number | null;
4338
+ }[];
4339
+ Protocols: {
4340
+ id: string;
4341
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
4342
+ name: string;
4343
+ description: string;
4344
+ url: string;
4345
+ icon: string;
4346
+ }[];
4347
+ MainProtocol: {
4348
+ id: string;
4349
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
4350
+ name: string;
4351
+ description: string;
4352
+ url: string;
4353
+ icon: string;
4354
+ } | null;
4355
+ } & {
4356
+ id: string;
4357
+ chainId: number;
4358
+ type: import("../../database/api/.generated").$Enums.CampaignType;
4359
+ identifier: string;
4360
+ name: string;
4361
+ status: import("../../database/api/.generated").$Enums.Status;
4362
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
4363
+ mainProtocolId: string | null;
4364
+ tvl: number;
4365
+ apr: number;
4366
+ dailyRewards: number;
4367
+ tags: string[];
4368
+ };
4369
+ reason: string;
4370
+ amount: string;
4371
+ claimed: string;
4372
+ pending: string;
4373
+ auxiliaryData1: string | null;
4374
+ auxiliaryData2: string | null;
4375
+ }[];
4376
+ claimed: bigint;
4377
+ amount: bigint;
4378
+ pending: bigint;
4379
+ root: string;
4380
+ recipient: string;
4381
+ proofs: string[];
4382
+ }, "breakdowns"> & {
4383
+ breakdowns: {
4384
+ opportunity: import("../modules/v4").Opportunity["model"] | null;
4385
+ claimed: bigint;
4386
+ amount: bigint;
4387
+ pending: bigint;
4388
+ auxiliaryData1: string | null;
4389
+ auxiliaryData2: string | null;
4390
+ }[];
4391
+ })[];
4392
+ distributor: string;
4393
+ })[];
4394
+ }>>;
4395
+ };
4396
+ get: (options: {
4397
+ headers?: Record<string, unknown> | undefined;
4398
+ query: {
4399
+ chainId: number | number[];
4400
+ };
4401
+ fetch?: RequestInit | undefined;
4402
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4403
+ 200: (Omit<{
4404
+ chain: import("../../database/api/.generated").Chain;
4405
+ rewards: Awaited<ReturnType<typeof import("../modules/v4/reward").RewardService["getByRecipient"]>>;
4406
+ }, "rewards"> & {
4407
+ rewards: (Omit<{
4408
+ token: {
4409
+ id: string;
4410
+ name: string | null;
4411
+ chainId: number;
4412
+ address: string;
4413
+ decimals: number;
4414
+ symbol: string;
4415
+ icon: string;
4416
+ verified: boolean;
4417
+ price: number | null;
4418
+ };
4419
+ breakdowns: {
4420
+ campaignId: string;
4421
+ opportunity: {
4422
+ Chain: {
4423
+ id: number;
4424
+ name: string;
4425
+ icon: string;
4426
+ };
4427
+ Tokens: {
4428
+ id: string;
4429
+ name: string | null;
4430
+ chainId: number;
4431
+ address: string;
4432
+ decimals: number;
4433
+ symbol: string;
4434
+ icon: string;
4435
+ verified: boolean;
4436
+ price: number | null;
4437
+ }[];
4438
+ Protocols: {
4439
+ id: string;
4440
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
4441
+ name: string;
4442
+ description: string;
4443
+ url: string;
4444
+ icon: string;
4445
+ }[];
4446
+ MainProtocol: {
4447
+ id: string;
4448
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
4449
+ name: string;
4450
+ description: string;
4451
+ url: string;
4452
+ icon: string;
4453
+ } | null;
4454
+ } & {
4455
+ id: string;
4456
+ chainId: number;
4457
+ type: import("../../database/api/.generated").$Enums.CampaignType;
4458
+ identifier: string;
4459
+ name: string;
4460
+ status: import("../../database/api/.generated").$Enums.Status;
4461
+ action: import("../../database/api/.generated").$Enums.OpportunityAction;
4462
+ mainProtocolId: string | null;
4463
+ tvl: number;
4464
+ apr: number;
4465
+ dailyRewards: number;
4466
+ tags: string[];
4467
+ };
4468
+ reason: string;
4469
+ amount: string;
4470
+ claimed: string;
4471
+ pending: string;
4472
+ auxiliaryData1: string | null;
4473
+ auxiliaryData2: string | null;
4474
+ }[];
4475
+ claimed: bigint;
4476
+ amount: bigint;
4477
+ pending: bigint;
4478
+ root: string;
4479
+ recipient: string;
4480
+ proofs: string[];
4481
+ }, "breakdowns"> & {
4482
+ breakdowns: {
4483
+ campaignId: string;
4484
+ reason: string;
4485
+ amount: string;
4486
+ claimed: string;
4487
+ pending: string;
4488
+ auxiliaryData1: string | null;
4489
+ auxiliaryData2: string | null;
4490
+ }[];
4491
+ })[];
4492
+ })[];
4493
+ }>>;
4494
+ };
4495
+ tags: {
4496
+ patch: (body: {
4497
+ tags: string[];
4498
+ }, options: {
4499
+ headers: {
4500
+ authorization: string;
4501
+ };
4502
+ query?: Record<string, unknown> | undefined;
4503
+ fetch?: RequestInit | undefined;
4504
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4505
+ 200: {
4506
+ address: string;
4507
+ tags: string[];
4508
+ };
4509
+ }>>;
4510
+ };
4511
+ }) & {
4512
+ index: {
4513
+ get: (options: {
4514
+ headers?: Record<string, unknown> | undefined;
4515
+ query: {
4516
+ items?: number | undefined;
4517
+ tags?: string[] | undefined;
4518
+ page?: number | undefined;
4519
+ address?: string | undefined;
4520
+ };
4521
+ fetch?: RequestInit | undefined;
4522
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4523
+ 200: {
4524
+ address: string;
4525
+ tags: string[];
4526
+ }[];
4527
+ }>>;
4528
+ post: (body: {
4529
+ tags: string[];
4530
+ address: string;
4531
+ }, options: {
4532
+ headers: {
4533
+ authorization: string;
4534
+ };
4535
+ query?: Record<string, unknown> | undefined;
4536
+ fetch?: RequestInit | undefined;
4537
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4538
+ 200: {
4539
+ address: string;
4540
+ tags: string[];
4541
+ };
4542
+ }>>;
4543
+ };
4544
+ };
4545
+ roots: {
4546
+ index: {
4547
+ get: (options: {
4548
+ headers?: Record<string, unknown> | undefined;
4549
+ query: {
4550
+ chainId: number;
4551
+ fromTimestamp: string;
4552
+ toTimestamp: string;
4553
+ };
4554
+ fetch?: RequestInit | undefined;
4555
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4556
+ 200: {
4557
+ root: string;
4558
+ chainId: number;
4559
+ epoch: number;
4560
+ timestamp: bigint;
4561
+ }[];
4562
+ }>>;
4563
+ };
4564
+ };
4565
+ participate: {
4566
+ targets: {
4567
+ get: (options: {
4568
+ headers?: Record<string, unknown> | undefined;
4569
+ query: {
4570
+ identifier?: string | undefined;
4571
+ chainId: number;
4572
+ protocolId: string;
4573
+ };
4574
+ fetch?: RequestInit | undefined;
4575
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4576
+ 200: import("../modules/v4/participate/participate.model").ParticipateTarget[] | undefined;
4577
+ }>>;
4578
+ };
4579
+ protocols: {
4580
+ get: (options: {
4581
+ headers?: Record<string, unknown> | undefined;
4582
+ query: {
4583
+ chainId?: number | undefined;
4584
+ };
4585
+ fetch?: RequestInit | undefined;
4586
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4587
+ 200: ({
4588
+ name: string;
4589
+ url: string;
4590
+ description: string;
4591
+ tags: import("../../database/api/.generated").$Enums.ProtocolTag[];
4592
+ icon: string;
4593
+ } & {})[] | null;
4594
+ }>>;
4595
+ };
4596
+ quote: {
4597
+ get: (options: {
4598
+ headers?: Record<string, unknown> | undefined;
4599
+ query: {
4600
+ identifier: string;
4601
+ chainId: number;
4602
+ protocolId: string;
4603
+ userAddress: string;
4604
+ fromAmount: string;
4605
+ fromTokenAddress: string;
4606
+ };
4607
+ fetch?: RequestInit | undefined;
4608
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4609
+ 200: {
4610
+ amountOut: {};
4611
+ gas: string;
4612
+ feeAmount: string[];
4613
+ priceImpact: number;
4614
+ } | undefined;
4615
+ }>>;
4616
+ };
4617
+ transaction: {
4618
+ get: (options: {
4619
+ headers?: Record<string, unknown> | undefined;
4620
+ query: {
4621
+ identifier: string;
4622
+ chainId: number;
4623
+ protocolId: string;
4624
+ userAddress: string;
4625
+ fromAmount: string;
4626
+ fromTokenAddress: string;
4627
+ };
4628
+ fetch?: RequestInit | undefined;
4629
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4630
+ 200: {
4631
+ amountOut: string;
4632
+ gas: string;
4633
+ feeAmount: string[];
4634
+ priceImpact: number;
4635
+ createAt: number;
4636
+ tx: {
4637
+ data: string;
4638
+ from: string;
4639
+ value: string;
4640
+ to: string;
4641
+ };
4642
+ } | undefined;
4643
+ }>>;
4644
+ };
4645
+ };
4646
+ accounting: {
4647
+ index: {
4648
+ get: (options: {
4649
+ headers: {
4650
+ authorization: string;
4651
+ };
4652
+ query: {
4653
+ items?: number | undefined;
4654
+ page?: number | undefined;
4655
+ };
4656
+ fetch?: RequestInit | undefined;
4657
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4658
+ 200: {
4659
+ id: string;
4660
+ chainId: number;
4661
+ fromTokenId: string;
4662
+ toTokenId: string;
4663
+ multisig: string;
4664
+ recipient: string;
4665
+ amountIn: string;
4666
+ amountOut: string;
4667
+ datetime: Date;
4668
+ timestamp: number;
4669
+ }[];
4670
+ }>>;
4671
+ };
4672
+ revenues: {
4673
+ get: (options: {
4674
+ headers: {
4675
+ authorization: string;
4676
+ };
4677
+ query?: Record<string, unknown> | undefined;
4678
+ fetch?: RequestInit | undefined;
4679
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4680
+ 200: {
4681
+ totalAmount: number;
4682
+ };
4683
+ }>>;
4684
+ "per-month": ((params: {
4685
+ year: string | number;
4686
+ }) => {} & ((params: {
4687
+ month: string | number;
4688
+ }) => {
4689
+ get: (options: {
4690
+ headers: {
4691
+ authorization: string;
4692
+ };
4693
+ query?: Record<string, unknown> | undefined;
4694
+ fetch?: RequestInit | undefined;
4695
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4696
+ 200: {
4697
+ totalAmount: number;
4698
+ from: string;
4699
+ to: string;
4700
+ };
4701
+ }>>;
4702
+ })) & {};
4703
+ chains: ((params: {
4704
+ chainId: string | number;
4705
+ }) => {
4706
+ get: (options: {
4707
+ headers: {
4708
+ authorization: string;
4709
+ };
4710
+ query?: Record<string, unknown> | undefined;
4711
+ fetch?: RequestInit | undefined;
4712
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4713
+ 200: {
4714
+ totalAmount: number;
4715
+ };
4716
+ }>>;
4717
+ "per-month": ((params: {
4718
+ year: string | number;
4719
+ }) => {} & ((params: {
4720
+ month: string | number;
4721
+ }) => {
4722
+ get: (options: {
4723
+ headers: {
4724
+ authorization: string;
4725
+ };
4726
+ query?: Record<string, unknown> | undefined;
4727
+ fetch?: RequestInit | undefined;
4728
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4729
+ 200: {
4730
+ totalAmount: number;
4731
+ from: string;
4732
+ to: string;
4733
+ };
4734
+ }>>;
4735
+ })) & {};
4736
+ }) & {};
4737
+ };
4738
+ tokens: ((params: {
4739
+ chainId: string | number;
4740
+ }) => {} & ((params: {
4741
+ tokenAddress: string | number;
4742
+ }) => {
4743
+ get: (options: {
4744
+ headers: {
4745
+ authorization: string;
4746
+ };
4747
+ query?: Record<string, unknown> | undefined;
4748
+ fetch?: RequestInit | undefined;
4749
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4750
+ 200: {
4751
+ totalAmount: number;
4752
+ totalAmountUSD: number;
4753
+ };
4754
+ }>>;
4755
+ "per-month": ((params: {
4756
+ year: string | number;
4757
+ }) => {} & ((params: {
4758
+ month: string | number;
4759
+ }) => {
4760
+ get: (options: {
4761
+ headers: {
4762
+ authorization: string;
4763
+ };
4764
+ query?: Record<string, unknown> | undefined;
4765
+ fetch?: RequestInit | undefined;
4766
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4767
+ 200: {
4768
+ totalAmount: number;
4769
+ totalAmountUSD: number;
4770
+ from: string;
4771
+ to: string;
4772
+ };
4773
+ }>>;
4774
+ })) & {};
4775
+ })) & {};
4776
+ };
4777
+ campaignStatus: {
4778
+ engine: {
4779
+ post: (body: {
4780
+ status: {
4781
+ value: "SUCCESS";
4782
+ computedUntil: number;
4783
+ } | {
4784
+ value: "PROCESSING";
4785
+ } | {
4786
+ error: string;
4787
+ details: string;
4788
+ value: "SKIPPED";
4789
+ } | {
4790
+ error: string;
4791
+ details: string;
4792
+ value: "FAILED";
4793
+ };
4794
+ campaignId: string;
4795
+ distributionChain: number;
4796
+ }, options: {
4797
+ headers: {
4798
+ authorization: string;
4799
+ };
4800
+ query?: Record<string, unknown> | undefined;
4801
+ fetch?: RequestInit | undefined;
4802
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4803
+ 200: void;
4804
+ }>>;
4805
+ };
4806
+ index: {
4807
+ get: (options?: {
4808
+ headers?: Record<string, unknown> | undefined;
4809
+ query?: Record<string, unknown> | undefined;
4810
+ fetch?: RequestInit | undefined;
4811
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4812
+ 200: {
4813
+ campaignId: string;
4814
+ computedUntil: bigint;
4815
+ processingStarted: bigint;
4816
+ status: import("../../database/api/.generated").$Enums.RunStatus;
4817
+ error: string;
4818
+ details: import("../../database/api/.generated").Prisma.JsonValue;
4819
+ }[];
4820
+ }>>;
4821
+ };
4822
+ unique: {
4823
+ get: (options: {
4824
+ headers?: Record<string, unknown> | undefined;
4825
+ query: {
4826
+ identifier: string;
4827
+ distributionChain: number;
4828
+ };
4829
+ fetch?: RequestInit | undefined;
4830
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4831
+ 200: {
4832
+ campaignId: string;
4833
+ computedUntil: bigint;
4834
+ processingStarted: bigint;
4835
+ status: import("../../database/api/.generated").$Enums.RunStatus;
4836
+ error: string;
4837
+ details: import("../../database/api/.generated").Prisma.JsonValue;
4838
+ };
4839
+ }>>;
4840
+ };
4841
+ computeChain: ((params: {
4842
+ chainId: string | number;
4843
+ }) => {
4844
+ get: (options?: {
4845
+ headers?: Record<string, unknown> | undefined;
4846
+ query?: Record<string, unknown> | undefined;
4847
+ fetch?: RequestInit | undefined;
4848
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4849
+ 200: {
4850
+ campaignId: string;
4851
+ computedUntil: bigint;
4852
+ processingStarted: bigint;
4853
+ status: import("../../database/api/.generated").$Enums.RunStatus;
4854
+ error: string;
4855
+ details: import("../../database/api/.generated").Prisma.JsonValue;
4856
+ }[];
4857
+ }>>;
4858
+ }) & {};
4859
+ overlaps: {
4860
+ get: (options: {
4861
+ headers: {
4862
+ authorization: string;
4863
+ };
4864
+ query: {
4865
+ identifier: string;
4866
+ distributionChain: number;
4867
+ };
4868
+ fetch?: RequestInit | undefined;
4869
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4870
+ 200: boolean;
4871
+ }>>;
4872
+ };
4873
+ };
4874
+ };
4875
+ };
4876
+ export type Opportunity = FromPromise<Api["v4"]["opportunities"]["index"]["get"]>;
4877
+ export type Protocol = FromPromise<Api["v4"]["protocols"]["index"]["get"]>;
4878
+ export type Campaign<C extends CampaignType = CampaignType> = CampaignResource<C>["model"];
4879
+ export type Chain = FromPromise<Api["v4"]["chains"]["index"]["get"]>;
4880
+ export type Token = FromPromise<Api["v4"]["tokens"]["index"]["get"]>;
4881
+ export type Reward = NonNullable<Awaited<ReturnType<ReturnType<Api["v4"]["users"]>["rewards"]["full"]["get"]>>["data"]>[number];
4882
+ export {};