@merkl/api 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/README.md +90 -0
  2. package/dist/src/cache/declaration.d.ts +133 -0
  3. package/dist/src/cache/index.d.ts +61 -0
  4. package/dist/src/cache/redis.d.ts +312 -0
  5. package/dist/src/constants.d.ts +86 -0
  6. package/dist/src/eden/index.d.ts +19165 -0
  7. package/dist/src/eden/index.js +2 -0
  8. package/dist/src/engine/deprecated/dynamicData/implementations/Ajna.d.ts +7 -0
  9. package/dist/src/engine/deprecated/dynamicData/implementations/Badger.d.ts +7 -0
  10. package/dist/src/engine/deprecated/dynamicData/implementations/Clamm.d.ts +7 -0
  11. package/dist/src/engine/deprecated/dynamicData/implementations/Compound.d.ts +7 -0
  12. package/dist/src/engine/deprecated/dynamicData/implementations/CompoundV3.d.ts +7 -0
  13. package/dist/src/engine/deprecated/dynamicData/implementations/Dolomite.d.ts +7 -0
  14. package/dist/src/engine/deprecated/dynamicData/implementations/ERC721.d.ts +7 -0
  15. package/dist/src/engine/deprecated/dynamicData/implementations/ERCMultiToken.d.ts +7 -0
  16. package/dist/src/engine/deprecated/dynamicData/implementations/EigenLayer.d.ts +7 -0
  17. package/dist/src/engine/deprecated/dynamicData/implementations/Encompassing.d.ts +7 -0
  18. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20.d.ts +108 -0
  19. package/dist/src/engine/deprecated/dynamicData/implementations/Erc20Snapshot.d.ts +7 -0
  20. package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.d.ts +7 -0
  21. package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +7 -0
  22. package/dist/src/engine/deprecated/dynamicData/implementations/Morpho.d.ts +9 -0
  23. package/dist/src/engine/deprecated/dynamicData/implementations/Radiant.d.ts +7 -0
  24. package/dist/src/engine/deprecated/dynamicData/implementations/Silo.d.ts +9 -0
  25. package/dist/src/engine/deprecated/dynamicData/implementations/UniswapV4.d.ts +7 -0
  26. package/dist/src/engine/deprecated/dynamicData/implementations/Vest.d.ts +9 -0
  27. package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +5 -0
  28. package/dist/src/engine/deprecated/dynamicData/utils/fetchA51Strategies.d.ts +18 -0
  29. package/dist/src/engine/deprecated/dynamicData/utils/fetchClamInfo.d.ts +2 -0
  30. package/dist/src/engine/deprecated/dynamicData/utils/fetchLogs.d.ts +14 -0
  31. package/dist/src/engine/deprecated/dynamicData/utils/getCompV2ForksVaults.d.ts +19 -0
  32. package/dist/src/engine/deprecated/dynamicData/utils/getContractCreationBlock.d.ts +2 -0
  33. package/dist/src/engine/deprecated/dynamicData/utils/getDolomiteMarkets.d.ts +8 -0
  34. package/dist/src/engine/deprecated/dynamicData/utils/getEulerV2Vaults.d.ts +9 -0
  35. package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +8 -0
  36. package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.d.ts +103 -0
  37. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/eulerVaultNames.d.ts +1 -0
  38. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +5 -0
  39. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getBlacklistedSupply.d.ts +2 -0
  40. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/getCrossCurveTokenPrice.d.ts +1 -0
  41. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/hardcoded.d.ts +3 -0
  42. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/ownerFinder.d.ts +2 -0
  43. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/spliceTVL.d.ts +8 -0
  44. package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/treasuryFinder.d.ts +2 -0
  45. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +30 -0
  46. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +35 -0
  47. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AssetProcessor.d.ts +35 -0
  48. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +107 -0
  49. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +85 -0
  50. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +75 -0
  51. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +88 -0
  52. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +44 -0
  53. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BeefyProcessor.d.ts +48 -0
  54. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BunniV2Processor.d.ts +45 -0
  55. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +44 -0
  56. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ERC4626Processor.d.ts +34 -0
  57. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EnzymeProcessor.d.ts +40 -0
  58. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EqualizerGaugeProcessor.d.ts +28 -0
  59. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerBorrowProcessor.d.ts +36 -0
  60. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/EulerLendProcessor.d.ts +35 -0
  61. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +39 -0
  62. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FraxProcessor.d.ts +33 -0
  63. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaALMProcessor.d.ts +30 -0
  64. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GammaProcessor.d.ts +43 -0
  65. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +44 -0
  66. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +43 -0
  67. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HoldStationProcessor.d.ts +29 -0
  68. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +36 -0
  69. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MaverickBPProcessor.d.ts +50 -0
  70. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +33 -0
  71. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/NoLinkVaultProcessor.d.ts +38 -0
  72. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleProcessor.d.ts +29 -0
  73. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/PendleYTProcessor.d.ts +29 -0
  74. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +32 -0
  75. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +40 -0
  76. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.d.ts +34 -0
  77. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraProcessor.d.ts +31 -0
  78. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpectraYTProcessor.d.ts +31 -0
  79. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +16 -0
  80. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.d.ts +29 -0
  81. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +39 -0
  82. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TempestVaultProcessor.d.ts +52 -0
  83. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +32 -0
  84. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +30 -0
  85. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/UniswapProcessor.d.ts +44 -0
  86. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/VicunaProcessor.d.ts +28 -0
  87. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +32 -0
  88. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/ZkSwapThreePoolProcessor.d.ts +53 -0
  89. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +39 -0
  90. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +49 -0
  91. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.d.ts +4 -0
  92. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +54 -0
  93. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +38 -0
  94. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesPrices.d.ts +5 -0
  95. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.d.ts +4 -0
  96. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound2.d.ts +3 -0
  97. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound3.d.ts +3 -0
  98. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound4.d.ts +3 -0
  99. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeStruct.d.ts +7 -0
  100. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.d.ts +7 -0
  101. package/dist/src/engine/implementations/Ajna/metadata.d.ts +19 -0
  102. package/dist/src/engine/implementations/Ajna/tvl.d.ts +7 -0
  103. package/dist/src/engine/implementations/Ambient/metadata.d.ts +19 -0
  104. package/dist/src/engine/implementations/Ambient/tvl.d.ts +7 -0
  105. package/dist/src/engine/implementations/Badger/metadata.d.ts +19 -0
  106. package/dist/src/engine/implementations/Clamm/metadata.d.ts +45 -0
  107. package/dist/src/engine/implementations/Compound/metadata.d.ts +18 -0
  108. package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +18 -0
  109. package/dist/src/engine/implementations/Default/metadata.d.ts +13 -0
  110. package/dist/src/engine/implementations/Dolomite/metadata.d.ts +18 -0
  111. package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +17 -0
  112. package/dist/src/engine/implementations/EigenLayer/tvl.d.ts +7 -0
  113. package/dist/src/engine/implementations/Encompassing/metadata.d.ts +16 -0
  114. package/dist/src/engine/implementations/Erc20/metadata.d.ts +18 -0
  115. package/dist/src/engine/implementations/Erc20/subTypes/detect.d.ts +8 -0
  116. package/dist/src/engine/implementations/Erc20/subTypes/factories.d.ts +5 -0
  117. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +30 -0
  118. package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/tvl.d.ts +6 -0
  119. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +19 -0
  120. package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/tvl.d.ts +5 -0
  121. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +17 -0
  122. package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/tvl.d.ts +6 -0
  123. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +30 -0
  124. package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/tvl.d.ts +6 -0
  125. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +16 -0
  126. package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/tvl.d.ts +6 -0
  127. package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +17 -0
  128. package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/tvl.d.ts +6 -0
  129. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +17 -0
  130. package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/tvl.d.ts +6 -0
  131. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +17 -0
  132. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/tvl.d.ts +6 -0
  133. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +18 -0
  134. package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/tvl.d.ts +6 -0
  135. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +30 -0
  136. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/metadata.d.ts +30 -0
  137. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/tvl.d.ts +6 -0
  138. package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/tvl.d.ts +6 -0
  139. package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +123 -0
  140. package/dist/src/engine/implementations/Erc20/tvl.d.ts +6 -0
  141. package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +15 -0
  142. package/dist/src/engine/implementations/Erc721/metadata.d.ts +17 -0
  143. package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +29 -0
  144. package/dist/src/engine/implementations/EventBased/metadata.d.ts +24 -0
  145. package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +24 -0
  146. package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +18 -0
  147. package/dist/src/engine/implementations/FraxLend/tvlBorrow.d.ts +7 -0
  148. package/dist/src/engine/implementations/FraxLend/tvlCollateral.d.ts +7 -0
  149. package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +20 -0
  150. package/dist/src/engine/implementations/Invalid/metadata.d.ts +11 -0
  151. package/dist/src/engine/implementations/Ion/metadata.d.ts +17 -0
  152. package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +24 -0
  153. package/dist/src/engine/implementations/Locker/metadata.d.ts +24 -0
  154. package/dist/src/engine/implementations/Locker/tvl.d.ts +7 -0
  155. package/dist/src/engine/implementations/Morpho/metadata.d.ts +26 -0
  156. package/dist/src/engine/implementations/MultiLog/metadata.d.ts +8 -0
  157. package/dist/src/engine/implementations/MultiLog/tvl.d.ts +7 -0
  158. package/dist/src/engine/implementations/Radiant/metadata.d.ts +18 -0
  159. package/dist/src/engine/implementations/Silo/metadata.d.ts +18 -0
  160. package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +20 -0
  161. package/dist/src/engine/implementations/UniswapV4/tvl.d.ts +7 -0
  162. package/dist/src/engine/implementations/Vest/metadata.d.ts +17 -0
  163. package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +20 -0
  164. package/dist/src/engine/implementations/morphoBorrow/tvl.d.ts +7 -0
  165. package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +20 -0
  166. package/dist/src/engine/implementations/morphoCollateral/tvl.d.ts +7 -0
  167. package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +20 -0
  168. package/dist/src/engine/implementations/morphoSupply/tvl.d.ts +7 -0
  169. package/dist/src/engine/metadata/factory.d.ts +3 -0
  170. package/dist/src/engine/tvl/factory.d.ts +6 -0
  171. package/dist/src/engine/tvl/logStates.d.ts +17 -0
  172. package/dist/src/errors/BadRequest.error.d.ts +4 -0
  173. package/dist/src/errors/Conflict.error.d.ts +4 -0
  174. package/dist/src/errors/HttpError.d.ts +11 -0
  175. package/dist/src/errors/InvalidParameter.error.d.ts +4 -0
  176. package/dist/src/errors/NotFound.error.d.ts +8 -0
  177. package/dist/src/errors/Opportunity.error.d.ts +6 -0
  178. package/dist/src/errors/UnableToFindPrice.error.d.ts +4 -0
  179. package/dist/src/errors/Unauthorized.error.d.ts +4 -0
  180. package/dist/src/errors/VoidString.error.d.ts +4 -0
  181. package/dist/src/errors/index.d.ts +6 -0
  182. package/dist/src/guards/BackOffice.guard.d.ts +7 -0
  183. package/dist/src/guards/Engine.guard.d.ts +7 -0
  184. package/dist/src/guards/TokenAuth.guard.d.ts +7 -0
  185. package/dist/src/guards/VerifyJwt.guard.d.ts +10 -0
  186. package/dist/src/hooks/checkQueryAddressValidity.d.ts +26 -0
  187. package/dist/src/hooks/checkQueryChainIdValidity.d.ts +26 -0
  188. package/dist/src/index.d.ts +10260 -0
  189. package/dist/src/jobs/pendings.d.ts +1 -0
  190. package/dist/src/jobs/prices.d.ts +1 -0
  191. package/dist/src/jobs/reward-breakdowns.d.ts +1 -0
  192. package/dist/src/jobs/rewards.d.ts +1 -0
  193. package/dist/src/jobs/set-dungeon-keeper.d.ts +1 -0
  194. package/dist/src/jobs/update-analytics.d.ts +1 -0
  195. package/dist/src/jobs/update-dynamic-data.d.ts +1 -0
  196. package/dist/src/jobs/update-euler-vaults.d.ts +1 -0
  197. package/dist/src/jobs/update-rpc-calls-cache.d.ts +1 -0
  198. package/dist/src/jobs/update-uniswap-v4-pools.d.ts +1 -0
  199. package/dist/src/jobs/update-v3-caches.d.ts +12 -0
  200. package/dist/src/libs/computeFee.d.ts +4 -0
  201. package/dist/src/libs/deprecated-merklv3/index.d.ts +5 -0
  202. package/dist/src/libs/getTokensList.d.ts +23 -0
  203. package/dist/src/libs/merklChainData.d.ts +4 -0
  204. package/dist/src/libs/parse/marketsWithCache.d.ts +4 -0
  205. package/dist/src/libs/positions/EigenLayer/index.d.ts +6 -0
  206. package/dist/src/libs/positions/ajna/index.d.ts +6 -0
  207. package/dist/src/libs/positions/badger/index.d.ts +6 -0
  208. package/dist/src/libs/positions/clamm/index.d.ts +7 -0
  209. package/dist/src/libs/positions/clamm/thegraph/fetchAlmPositions.d.ts +5 -0
  210. package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +8 -0
  211. package/dist/src/libs/positions/clamm/thegraph/fetchFarmedPositions.d.ts +10 -0
  212. package/dist/src/libs/positions/clamm/thegraph/index.d.ts +40 -0
  213. package/dist/src/libs/positions/compound/index.d.ts +24 -0
  214. package/dist/src/libs/positions/dolomite/index.d.ts +17 -0
  215. package/dist/src/libs/positions/erc20/index.d.ts +5 -0
  216. package/dist/src/libs/positions/euler/index.d.ts +5 -0
  217. package/dist/src/libs/positions/index.d.ts +3 -0
  218. package/dist/src/libs/positions/morpho/index.d.ts +6 -0
  219. package/dist/src/libs/positions/prepareFetch.d.ts +22 -0
  220. package/dist/src/libs/positions/silo/index.d.ts +5 -0
  221. package/dist/src/libs/positions/types.d.ts +75 -0
  222. package/dist/src/libs/staticCampaigns.d.ts +7 -0
  223. package/dist/src/libs/tokens/allowances.d.ts +1 -0
  224. package/dist/src/libs/tokens/balances.d.ts +11 -0
  225. package/dist/src/libs/tokens/tokenInfo.d.ts +8 -0
  226. package/dist/src/modules/v4/accounting/accounting.controller.d.ts +284 -0
  227. package/dist/src/modules/v4/accounting/accounting.model.d.ts +32 -0
  228. package/dist/src/modules/v4/accounting/accounting.repository.d.ts +99 -0
  229. package/dist/src/modules/v4/accounting/accounting.service.d.ts +59 -0
  230. package/dist/src/modules/v4/airflow/airflow.service.d.ts +3 -0
  231. package/dist/src/modules/v4/apr/apr.model.d.ts +54 -0
  232. package/dist/src/modules/v4/apr/apr.service.d.ts +9 -0
  233. package/dist/src/modules/v4/authentication/authentication.controller.d.ts +74 -0
  234. package/dist/src/modules/v4/authentication/authentication.model.d.ts +10 -0
  235. package/dist/src/modules/v4/authentication/authentication.service.d.ts +10 -0
  236. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +150 -0
  237. package/dist/src/modules/v4/blacklist/blacklist.model.d.ts +15 -0
  238. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +21 -0
  239. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +24 -0
  240. package/dist/src/modules/v4/boost/boost.controller.d.ts +110 -0
  241. package/dist/src/modules/v4/boost/boost.model.d.ts +12 -0
  242. package/dist/src/modules/v4/boost/boost.service.d.ts +11 -0
  243. package/dist/src/modules/v4/bucket/bucket.model.d.ts +10 -0
  244. package/dist/src/modules/v4/bucket/bucket.service.d.ts +14 -0
  245. package/dist/src/modules/v4/cache/cache.model.d.ts +13 -0
  246. package/dist/src/modules/v4/cache/cache.repository.d.ts +8 -0
  247. package/dist/src/modules/v4/cache/cache.service.d.ts +12 -0
  248. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1084 -0
  249. package/dist/src/modules/v4/campaign/campaign.model.d.ts +223 -0
  250. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +901 -0
  251. package/dist/src/modules/v4/campaign/campaign.service.d.ts +1103 -0
  252. package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +566 -0
  253. package/dist/src/modules/v4/chain/chain.controller.d.ts +194 -0
  254. package/dist/src/modules/v4/chain/chain.model.d.ts +52 -0
  255. package/dist/src/modules/v4/chain/chain.repository.d.ts +104 -0
  256. package/dist/src/modules/v4/chain/chain.service.d.ts +83 -0
  257. package/dist/src/modules/v4/chainInteraction/chainInteraction.service.d.ts +2 -0
  258. package/dist/src/modules/v4/claims/claims.controller.d.ts +55 -0
  259. package/dist/src/modules/v4/claims/claims.model.d.ts +9 -0
  260. package/dist/src/modules/v4/claims/claims.repository.d.ts +5 -0
  261. package/dist/src/modules/v4/claims/claims.service.d.ts +9 -0
  262. package/dist/src/modules/v4/coingecko/coingecko.model.d.ts +0 -0
  263. package/dist/src/modules/v4/coingecko/coingecko.repository.d.ts +14 -0
  264. package/dist/src/modules/v4/coingecko/coingecko.service.d.ts +16 -0
  265. package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +162 -0
  266. package/dist/src/modules/v4/computedValue/computedValue.model.d.ts +27 -0
  267. package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +19 -0
  268. package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +20 -0
  269. package/dist/src/modules/v4/creator/creator.controller.d.ts +616 -0
  270. package/dist/src/modules/v4/creator/creator.model.d.ts +59 -0
  271. package/dist/src/modules/v4/creator/creator.repository.d.ts +97 -0
  272. package/dist/src/modules/v4/creator/creator.service.d.ts +352 -0
  273. package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +62 -0
  274. package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +14 -0
  275. package/dist/src/modules/v4/enso/enso.model.d.ts +166 -0
  276. package/dist/src/modules/v4/enso/enso.service.d.ts +69 -0
  277. package/dist/src/modules/v4/explorer/explorer.controller.d.ts +58 -0
  278. package/dist/src/modules/v4/explorer/explorer.model.d.ts +16 -0
  279. package/dist/src/modules/v4/explorer/explorer.repository.d.ts +21 -0
  280. package/dist/src/modules/v4/explorer/explorer.service.d.ts +28 -0
  281. package/dist/src/modules/v4/icon/icon.model.d.ts +4 -0
  282. package/dist/src/modules/v4/icon/icon.service.d.ts +5 -0
  283. package/dist/src/modules/v4/interaction/interaction.controller.d.ts +128 -0
  284. package/dist/src/modules/v4/interaction/interaction.model.d.ts +110 -0
  285. package/dist/src/modules/v4/interaction/interaction.service.d.ts +38 -0
  286. package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +114 -0
  287. package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +34 -0
  288. package/dist/src/modules/v4/liquidity/implementations/AjnaPositionFetcher.d.ts +6 -0
  289. package/dist/src/modules/v4/liquidity/implementations/BadgerPositionFetcher.d.ts +6 -0
  290. package/dist/src/modules/v4/liquidity/implementations/ClammPositionFetcher.d.ts +6 -0
  291. package/dist/src/modules/v4/liquidity/implementations/DolomitePositionFetcher.d.ts +6 -0
  292. package/dist/src/modules/v4/liquidity/implementations/ERC20PositionFetcher.d.ts +6 -0
  293. package/dist/src/modules/v4/liquidity/implementations/EulerPositionFetcher.d.ts +6 -0
  294. package/dist/src/modules/v4/liquidity/liquidity.controller.d.ts +50 -0
  295. package/dist/src/modules/v4/liquidity/liquidity.model.d.ts +25 -0
  296. package/dist/src/modules/v4/liquidity/liquidity.repository.d.ts +14 -0
  297. package/dist/src/modules/v4/liquidity/liquidity.service.d.ts +5 -0
  298. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +113 -0
  299. package/dist/src/modules/v4/merklRoot/merklRoot.model.d.ts +13 -0
  300. package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +23 -0
  301. package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +45 -0
  302. package/dist/src/modules/v4/nodes/node.controller.d.ts +65 -0
  303. package/dist/src/modules/v4/nodes/node.model.d.ts +21 -0
  304. package/dist/src/modules/v4/nodes/node.repository.d.ts +21 -0
  305. package/dist/src/modules/v4/nodes/node.service.d.ts +21 -0
  306. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1459 -0
  307. package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +119 -0
  308. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +487 -0
  309. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +1054 -0
  310. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +1316 -0
  311. package/dist/src/modules/v4/opportunity/transform-id.pipe.d.ts +5 -0
  312. package/dist/src/modules/v4/opportunity/validate-id.pipe.d.ts +5 -0
  313. package/dist/src/modules/v4/parse/parse.controller.d.ts +64 -0
  314. package/dist/src/modules/v4/parse/parse.model.d.ts +10 -0
  315. package/dist/src/modules/v4/payload/payload.controller.d.ts +127 -0
  316. package/dist/src/modules/v4/payload/payload.model.d.ts +309 -0
  317. package/dist/src/modules/v4/payload/payload.service.d.ts +27 -0
  318. package/dist/src/modules/v4/price/price.controller.d.ts +228 -0
  319. package/dist/src/modules/v4/price/price.model.d.ts +34 -0
  320. package/dist/src/modules/v4/price/price.repository.d.ts +36 -0
  321. package/dist/src/modules/v4/price/price.service.d.ts +40 -0
  322. package/dist/src/modules/v4/prisma/index.d.ts +32 -0
  323. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1082 -0
  324. package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +316 -0
  325. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +2451 -0
  326. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +50 -0
  327. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +290 -0
  328. package/dist/src/modules/v4/protocol/protocol.model.d.ts +107 -0
  329. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +89 -0
  330. package/dist/src/modules/v4/protocol/protocol.service.d.ts +35 -0
  331. package/dist/src/modules/v4/referral/referral.controller.d.ts +104 -0
  332. package/dist/src/modules/v4/referral/referral.model.d.ts +10 -0
  333. package/dist/src/modules/v4/referral/referral.service.d.ts +216 -0
  334. package/dist/src/modules/v4/reward/reward.controller.d.ts +599 -0
  335. package/dist/src/modules/v4/reward/reward.converter.d.ts +14 -0
  336. package/dist/src/modules/v4/reward/reward.model.d.ts +260 -0
  337. package/dist/src/modules/v4/reward/reward.repository.d.ts +174 -0
  338. package/dist/src/modules/v4/reward/reward.service.d.ts +833 -0
  339. package/dist/src/modules/v4/router.d.ts +8706 -0
  340. package/dist/src/modules/v4/status/status.controller.d.ts +303 -0
  341. package/dist/src/modules/v4/status/status.model.d.ts +64 -0
  342. package/dist/src/modules/v4/status/status.repository.d.ts +104 -0
  343. package/dist/src/modules/v4/status/status.service.d.ts +89 -0
  344. package/dist/src/modules/v4/token/token.controller.d.ts +498 -0
  345. package/dist/src/modules/v4/token/token.model.d.ts +124 -0
  346. package/dist/src/modules/v4/token/token.repository.d.ts +122 -0
  347. package/dist/src/modules/v4/token/token.service.d.ts +361 -0
  348. package/dist/src/modules/v4/tracer/tracer.service.d.ts +3 -0
  349. package/dist/src/modules/v4/turtle/turtle.controller.d.ts +81 -0
  350. package/dist/src/modules/v4/turtle/turtle.repository.d.ts +14 -0
  351. package/dist/src/modules/v4/turtle/turtle.service.d.ts +17 -0
  352. package/dist/src/modules/v4/tvl/tvl.model.d.ts +35 -0
  353. package/dist/src/modules/v4/tvl/tvl.service.d.ts +9 -0
  354. package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +407 -0
  355. package/dist/src/modules/v4/uniswap/uniswap.model.d.ts +53 -0
  356. package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +13 -0
  357. package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +18 -0
  358. package/dist/src/modules/v4/user/user.controller.d.ts +444 -0
  359. package/dist/src/modules/v4/user/user.model.d.ts +84 -0
  360. package/dist/src/modules/v4/user/user.repository.d.ts +34 -0
  361. package/dist/src/modules/v4/user/user.service.d.ts +37 -0
  362. package/dist/src/plugins/error-handling.plugin.d.ts +33 -0
  363. package/dist/src/routes/v1/allowances.d.ts +80 -0
  364. package/dist/src/routes/v1/balances.d.ts +63 -0
  365. package/dist/src/routes/v1/prices.d.ts +55 -0
  366. package/dist/src/routes/v1/router.d.ts +142 -0
  367. package/dist/src/routes/v1/tokens.d.ts +58 -0
  368. package/dist/src/routes/v2/merkl.d.ts +92 -0
  369. package/dist/src/routes/v2/router.d.ts +83 -0
  370. package/dist/src/routes/v3/app.d.ts +61 -0
  371. package/dist/src/routes/v3/blacklist.d.ts +58 -0
  372. package/dist/src/routes/v3/campaign/delay.d.ts +60 -0
  373. package/dist/src/routes/v3/campaignClaims.d.ts +61 -0
  374. package/dist/src/routes/v3/campaignUnclaimed.d.ts +60 -0
  375. package/dist/src/routes/v3/campaigns.d.ts +71 -0
  376. package/dist/src/routes/v3/campaignsForMainParameter.d.ts +67 -0
  377. package/dist/src/routes/v3/campaignsRewardsReport.d.ts +60 -0
  378. package/dist/src/routes/v3/claims.d.ts +61 -0
  379. package/dist/src/routes/v3/compoundV2.d.ts +55 -0
  380. package/dist/src/routes/v3/createCampaign.d.ts +60 -0
  381. package/dist/src/routes/v3/dolomite.d.ts +59 -0
  382. package/dist/src/routes/v3/euler.d.ts +114 -0
  383. package/dist/src/routes/v3/fetch.d.ts +59 -0
  384. package/dist/src/routes/v3/health.d.ts +53 -0
  385. package/dist/src/routes/v3/lostyield.d.ts +66 -0
  386. package/dist/src/routes/v3/merkl.d.ts +116 -0
  387. package/dist/src/routes/v3/morphoMarkets.d.ts +75 -0
  388. package/dist/src/routes/v3/morphoVaults.d.ts +65 -0
  389. package/dist/src/routes/v3/multiChainPositions.d.ts +58 -0
  390. package/dist/src/routes/v3/opportunity.d.ts +119 -0
  391. package/dist/src/routes/v3/overview.d.ts +91 -0
  392. package/dist/src/routes/v3/parse.d.ts +60 -0
  393. package/dist/src/routes/v3/payload.d.ts +71 -0
  394. package/dist/src/routes/v3/poolInfo.d.ts +62 -0
  395. package/dist/src/routes/v3/positions.d.ts +75 -0
  396. package/dist/src/routes/v3/radiant.d.ts +69 -0
  397. package/dist/src/routes/v3/recipients.d.ts +59 -0
  398. package/dist/src/routes/v3/rewards.d.ts +86 -0
  399. package/dist/src/routes/v3/rewardsReport.d.ts +69 -0
  400. package/dist/src/routes/v3/router.d.ts +1387 -0
  401. package/dist/src/routes/v3/silo.d.ts +66 -0
  402. package/dist/src/routes/v3/token.d.ts +64 -0
  403. package/dist/src/routes/v3/twt/participants.d.ts +52 -0
  404. package/dist/src/routes/v3/uniswapv4.d.ts +246 -0
  405. package/dist/src/routes/v3/updates.d.ts +66 -0
  406. package/dist/src/routes/v3/userRewards.d.ts +82 -0
  407. package/dist/src/scripts/fill-coingecko-data.d.ts +1 -0
  408. package/dist/src/scripts/fill-descriptions.d.ts +1 -0
  409. package/dist/src/scripts/fill-unknown-tokens.d.ts +1 -0
  410. package/dist/src/scripts/reparse-opportunities.d.ts +1 -0
  411. package/dist/src/types/external/spectraAPI.d.ts +88 -0
  412. package/dist/src/types/index.d.ts +20 -0
  413. package/dist/src/utils/TailSampler.d.ts +8 -0
  414. package/dist/src/utils/bigintToString.d.ts +1 -0
  415. package/dist/src/utils/caseChanges.d.ts +4 -0
  416. package/dist/src/utils/decodeCalls.d.ts +3 -0
  417. package/dist/src/utils/encodeCalls.d.ts +3 -0
  418. package/dist/src/utils/error.d.ts +70 -0
  419. package/dist/src/utils/execute.d.ts +22 -0
  420. package/dist/src/utils/generateCardName.d.ts +6 -0
  421. package/dist/src/utils/generic.d.ts +7 -0
  422. package/dist/src/utils/hashArray.d.ts +2 -0
  423. package/dist/src/utils/lastBlockBefore.d.ts +3 -0
  424. package/dist/src/utils/logger.d.ts +54 -0
  425. package/dist/src/utils/parseDistributionType.d.ts +1 -0
  426. package/dist/src/utils/pricer.d.ts +57 -0
  427. package/dist/src/utils/prices/chainlinkRead.d.ts +4 -0
  428. package/dist/src/utils/prices/curveVirtualPrice.d.ts +4 -0
  429. package/dist/src/utils/prices/getDQUICK.d.ts +4 -0
  430. package/dist/src/utils/prices/priceFetcherFactory.d.ts +10 -0
  431. package/dist/src/utils/prices/priceService.d.ts +13 -0
  432. package/dist/src/utils/prices/services/OnChainCallService.d.ts +8 -0
  433. package/dist/src/utils/prices/services/coinGeckoService.d.ts +12 -0
  434. package/dist/src/utils/prices/services/defillamaService.d.ts +12 -0
  435. package/dist/src/utils/prices/services/dexScreenerService.d.ts +12 -0
  436. package/dist/src/utils/prices/services/erc4626Service.d.ts +9 -0
  437. package/dist/src/utils/prices/services/getERC4626.d.ts +4 -0
  438. package/dist/src/utils/prices/services/indexCoopService.d.ts +12 -0
  439. package/dist/src/utils/prices/services/priceFetcher.d.ts +8 -0
  440. package/dist/src/utils/prices/uniV2Price.d.ts +7 -0
  441. package/dist/src/utils/providers.d.ts +124 -0
  442. package/dist/src/utils/queries/allCampaigns.d.ts +1 -0
  443. package/dist/src/utils/sanitizeChain.d.ts +2 -0
  444. package/dist/src/utils/stryke.d.ts +2 -0
  445. package/dist/src/utils/throw.d.ts +22 -0
  446. package/dist/tsconfig.tsbuildinfo +1 -0
  447. package/package.json +26 -0
@@ -0,0 +1,901 @@
1
+ import { type ChainId } from "@angleprotocol/sdk/ts";
2
+ import { type CampaignManualOverride } from "@package/databases/api";
3
+ import type { Campaign, CampaignUnique, CampaignWithParams, GetCampaignQueryModel } from "../../../modules/v4/campaign/campaign.model";
4
+ export declare abstract class CampaignRepository {
5
+ static transformQueryToPrismaFilters(query: GetCampaignQueryModel): {
6
+ where: {
7
+ createdAt: {
8
+ gte: Date;
9
+ } | undefined;
10
+ rootCampaignId: {
11
+ equals: string;
12
+ mode: "insensitive";
13
+ } | undefined;
14
+ parentCampaignId: {
15
+ equals: string;
16
+ mode: "insensitive";
17
+ } | undefined;
18
+ endTimestamp: {
19
+ gte: number;
20
+ lt?: undefined;
21
+ };
22
+ startTimestamp: {
23
+ lte: number;
24
+ gt?: undefined;
25
+ gte?: undefined;
26
+ };
27
+ OR: {
28
+ id: string;
29
+ }[] | undefined;
30
+ distributionChainId: {
31
+ in: number[];
32
+ } | undefined;
33
+ computeChainId: number | undefined;
34
+ opportunityId: string | undefined;
35
+ campaignId: string | undefined;
36
+ Opportunity: {
37
+ identifier: string | undefined;
38
+ };
39
+ subType: number | undefined;
40
+ type: string | {
41
+ in: string[];
42
+ } | undefined;
43
+ creatorAddress: string | undefined;
44
+ RewardToken: {
45
+ address: string | undefined;
46
+ symbol: string | undefined;
47
+ OR: ({
48
+ symbol: {
49
+ equals: string;
50
+ mode: "insensitive";
51
+ };
52
+ displaySymbol?: undefined;
53
+ } | {
54
+ displaySymbol: {
55
+ equals: string;
56
+ mode: "insensitive";
57
+ };
58
+ symbol?: undefined;
59
+ })[] | undefined;
60
+ isTest: false | undefined;
61
+ isPoint: boolean | undefined;
62
+ };
63
+ Creator: {
64
+ OR: ({
65
+ Creator: {
66
+ id: string;
67
+ };
68
+ tags?: undefined;
69
+ } | {
70
+ tags: {
71
+ has: string;
72
+ };
73
+ Creator?: undefined;
74
+ })[];
75
+ Creator?: undefined;
76
+ tags?: undefined;
77
+ } | {
78
+ Creator: {
79
+ id: string;
80
+ };
81
+ OR?: undefined;
82
+ tags?: undefined;
83
+ } | {
84
+ tags: {
85
+ has: string;
86
+ };
87
+ OR?: undefined;
88
+ Creator?: undefined;
89
+ } | undefined;
90
+ } | {
91
+ createdAt: {
92
+ gte: Date;
93
+ } | undefined;
94
+ rootCampaignId: {
95
+ equals: string;
96
+ mode: "insensitive";
97
+ } | undefined;
98
+ parentCampaignId: {
99
+ equals: string;
100
+ mode: "insensitive";
101
+ } | undefined;
102
+ endTimestamp: {
103
+ lt: number;
104
+ gte?: undefined;
105
+ };
106
+ startTimestamp?: undefined;
107
+ OR: {
108
+ id: string;
109
+ }[] | undefined;
110
+ distributionChainId: {
111
+ in: number[];
112
+ } | undefined;
113
+ computeChainId: number | undefined;
114
+ opportunityId: string | undefined;
115
+ campaignId: string | undefined;
116
+ Opportunity: {
117
+ identifier: string | undefined;
118
+ };
119
+ subType: number | undefined;
120
+ type: string | {
121
+ in: string[];
122
+ } | undefined;
123
+ creatorAddress: string | undefined;
124
+ RewardToken: {
125
+ address: string | undefined;
126
+ symbol: string | undefined;
127
+ OR: ({
128
+ symbol: {
129
+ equals: string;
130
+ mode: "insensitive";
131
+ };
132
+ displaySymbol?: undefined;
133
+ } | {
134
+ displaySymbol: {
135
+ equals: string;
136
+ mode: "insensitive";
137
+ };
138
+ symbol?: undefined;
139
+ })[] | undefined;
140
+ isTest: false | undefined;
141
+ isPoint: boolean | undefined;
142
+ };
143
+ Creator: {
144
+ OR: ({
145
+ Creator: {
146
+ id: string;
147
+ };
148
+ tags?: undefined;
149
+ } | {
150
+ tags: {
151
+ has: string;
152
+ };
153
+ Creator?: undefined;
154
+ })[];
155
+ Creator?: undefined;
156
+ tags?: undefined;
157
+ } | {
158
+ Creator: {
159
+ id: string;
160
+ };
161
+ OR?: undefined;
162
+ tags?: undefined;
163
+ } | {
164
+ tags: {
165
+ has: string;
166
+ };
167
+ OR?: undefined;
168
+ Creator?: undefined;
169
+ } | undefined;
170
+ } | {
171
+ createdAt: {
172
+ gte: Date;
173
+ } | undefined;
174
+ rootCampaignId: {
175
+ equals: string;
176
+ mode: "insensitive";
177
+ } | undefined;
178
+ parentCampaignId: {
179
+ equals: string;
180
+ mode: "insensitive";
181
+ } | undefined;
182
+ startTimestamp: {
183
+ gt: number;
184
+ lte?: undefined;
185
+ gte?: undefined;
186
+ };
187
+ endTimestamp?: undefined;
188
+ OR: {
189
+ id: string;
190
+ }[] | undefined;
191
+ distributionChainId: {
192
+ in: number[];
193
+ } | undefined;
194
+ computeChainId: number | undefined;
195
+ opportunityId: string | undefined;
196
+ campaignId: string | undefined;
197
+ Opportunity: {
198
+ identifier: string | undefined;
199
+ };
200
+ subType: number | undefined;
201
+ type: string | {
202
+ in: string[];
203
+ } | undefined;
204
+ creatorAddress: string | undefined;
205
+ RewardToken: {
206
+ address: string | undefined;
207
+ symbol: string | undefined;
208
+ OR: ({
209
+ symbol: {
210
+ equals: string;
211
+ mode: "insensitive";
212
+ };
213
+ displaySymbol?: undefined;
214
+ } | {
215
+ displaySymbol: {
216
+ equals: string;
217
+ mode: "insensitive";
218
+ };
219
+ symbol?: undefined;
220
+ })[] | undefined;
221
+ isTest: false | undefined;
222
+ isPoint: boolean | undefined;
223
+ };
224
+ Creator: {
225
+ OR: ({
226
+ Creator: {
227
+ id: string;
228
+ };
229
+ tags?: undefined;
230
+ } | {
231
+ tags: {
232
+ has: string;
233
+ };
234
+ Creator?: undefined;
235
+ })[];
236
+ Creator?: undefined;
237
+ tags?: undefined;
238
+ } | {
239
+ Creator: {
240
+ id: string;
241
+ };
242
+ OR?: undefined;
243
+ tags?: undefined;
244
+ } | {
245
+ tags: {
246
+ has: string;
247
+ };
248
+ OR?: undefined;
249
+ Creator?: undefined;
250
+ } | undefined;
251
+ } | {
252
+ createdAt: {
253
+ gte: Date;
254
+ } | undefined;
255
+ rootCampaignId: {
256
+ equals: string;
257
+ mode: "insensitive";
258
+ } | undefined;
259
+ parentCampaignId: {
260
+ equals: string;
261
+ mode: "insensitive";
262
+ } | undefined;
263
+ endTimestamp: {
264
+ gte: number;
265
+ lt?: undefined;
266
+ } | undefined;
267
+ startTimestamp: {
268
+ gte: number;
269
+ lte?: undefined;
270
+ gt?: undefined;
271
+ } | undefined;
272
+ OR: {
273
+ id: string;
274
+ }[] | undefined;
275
+ distributionChainId: {
276
+ in: number[];
277
+ } | undefined;
278
+ computeChainId: number | undefined;
279
+ opportunityId: string | undefined;
280
+ campaignId: string | undefined;
281
+ Opportunity: {
282
+ identifier: string | undefined;
283
+ };
284
+ subType: number | undefined;
285
+ type: string | {
286
+ in: string[];
287
+ } | undefined;
288
+ creatorAddress: string | undefined;
289
+ RewardToken: {
290
+ address: string | undefined;
291
+ symbol: string | undefined;
292
+ OR: ({
293
+ symbol: {
294
+ equals: string;
295
+ mode: "insensitive";
296
+ };
297
+ displaySymbol?: undefined;
298
+ } | {
299
+ displaySymbol: {
300
+ equals: string;
301
+ mode: "insensitive";
302
+ };
303
+ symbol?: undefined;
304
+ })[] | undefined;
305
+ isTest: false | undefined;
306
+ isPoint: boolean | undefined;
307
+ };
308
+ Creator: {
309
+ OR: ({
310
+ Creator: {
311
+ id: string;
312
+ };
313
+ tags?: undefined;
314
+ } | {
315
+ tags: {
316
+ has: string;
317
+ };
318
+ Creator?: undefined;
319
+ })[];
320
+ Creator?: undefined;
321
+ tags?: undefined;
322
+ } | {
323
+ Creator: {
324
+ id: string;
325
+ };
326
+ OR?: undefined;
327
+ tags?: undefined;
328
+ } | {
329
+ tags: {
330
+ has: string;
331
+ };
332
+ OR?: undefined;
333
+ Creator?: undefined;
334
+ } | undefined;
335
+ };
336
+ };
337
+ /**
338
+ * Retrieves all past campaigns from the database.
339
+ * A campaign is considered past if the current timestamp is greater than the campaign's end timestamp.
340
+ *
341
+ * @returns A promise that resolves to an array of past campaigns.
342
+ *
343
+ * @dev Excludes test campaigns
344
+ */
345
+ static getPastCampaigns(query?: {
346
+ computeChainId?: number;
347
+ type?: string;
348
+ creatorId?: string;
349
+ creatorAddress?: string;
350
+ }): Promise<({
351
+ Opportunity: {
352
+ name: string;
353
+ apr: number;
354
+ tvl: number;
355
+ description: string;
356
+ id: string;
357
+ status: import("@package/databases").Status;
358
+ chainId: number;
359
+ action: import("@package/databases").OpportunityAction;
360
+ type: string;
361
+ depositUrl: string | null;
362
+ explorerAddress: string | null;
363
+ howToSteps: string[];
364
+ mainProtocolId: string | null;
365
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
366
+ identifier: string;
367
+ dailyRewards: number;
368
+ tags: string[];
369
+ lastCampaignCreatedAt: Date;
370
+ };
371
+ } & {
372
+ campaignId: string;
373
+ description: string | null;
374
+ id: string;
375
+ params: import("@prisma/client/runtime/library").JsonValue;
376
+ amount: string;
377
+ startTimestamp: bigint;
378
+ type: string;
379
+ computeChainId: number;
380
+ distributionChainId: number;
381
+ endTimestamp: bigint;
382
+ opportunityId: string;
383
+ creatorAddress: string;
384
+ distributionType: import("@package/databases").DistributionType;
385
+ subType: number | null;
386
+ rewardTokenId: string;
387
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
388
+ createdAt: Date;
389
+ rootCampaignId: string | null;
390
+ parentCampaignId: string | null;
391
+ })[]>;
392
+ /**
393
+ * Retrieves all past campaigns from the database.
394
+ * A campaign is considered past if the current timestamp is greater than the campaign's end timestamp.
395
+ *
396
+ * @returns A promise that resolves to an array of past campaigns.
397
+ *
398
+ * @dev Excludes test campaigns
399
+ */
400
+ static getFutureCampaigns(query?: {
401
+ computeChainId?: number;
402
+ type?: string;
403
+ creatorId?: string;
404
+ creatorAddress?: string;
405
+ }): Promise<({
406
+ Opportunity: {
407
+ name: string;
408
+ apr: number;
409
+ tvl: number;
410
+ description: string;
411
+ id: string;
412
+ status: import("@package/databases").Status;
413
+ chainId: number;
414
+ action: import("@package/databases").OpportunityAction;
415
+ type: string;
416
+ depositUrl: string | null;
417
+ explorerAddress: string | null;
418
+ howToSteps: string[];
419
+ mainProtocolId: string | null;
420
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
421
+ identifier: string;
422
+ dailyRewards: number;
423
+ tags: string[];
424
+ lastCampaignCreatedAt: Date;
425
+ };
426
+ } & {
427
+ campaignId: string;
428
+ description: string | null;
429
+ id: string;
430
+ params: import("@prisma/client/runtime/library").JsonValue;
431
+ amount: string;
432
+ startTimestamp: bigint;
433
+ type: string;
434
+ computeChainId: number;
435
+ distributionChainId: number;
436
+ endTimestamp: bigint;
437
+ opportunityId: string;
438
+ creatorAddress: string;
439
+ distributionType: import("@package/databases").DistributionType;
440
+ subType: number | null;
441
+ rewardTokenId: string;
442
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
443
+ createdAt: Date;
444
+ rootCampaignId: string | null;
445
+ parentCampaignId: string | null;
446
+ })[]>;
447
+ /**
448
+ * Retrieves all live campaigns from the database.
449
+ * A campaign is considered live if the current timestamp is between the campaign's start and end timestamps.
450
+ *
451
+ * @returns A promise that resolves to an array of live campaigns.
452
+ *
453
+ * @dev Excludes test campaigns
454
+ */
455
+ static getLiveCampaigns(query?: {
456
+ distributionChainId?: number;
457
+ computeChainId?: number;
458
+ type?: string;
459
+ creatorId?: string;
460
+ creatorAddress?: string;
461
+ }): Promise<({
462
+ RewardToken: {
463
+ symbol: string;
464
+ name: string | null;
465
+ decimals: number;
466
+ price: number | null;
467
+ address: string;
468
+ id: string;
469
+ chainId: number;
470
+ icon: string;
471
+ isNative: boolean;
472
+ isPoint: boolean;
473
+ isPreTGE: boolean;
474
+ isTest: boolean;
475
+ verified: boolean;
476
+ displaySymbol: string;
477
+ };
478
+ Opportunity: {
479
+ name: string;
480
+ apr: number;
481
+ tvl: number;
482
+ description: string;
483
+ id: string;
484
+ status: import("@package/databases").Status;
485
+ chainId: number;
486
+ action: import("@package/databases").OpportunityAction;
487
+ type: string;
488
+ depositUrl: string | null;
489
+ explorerAddress: string | null;
490
+ howToSteps: string[];
491
+ mainProtocolId: string | null;
492
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
493
+ identifier: string;
494
+ dailyRewards: number;
495
+ tags: string[];
496
+ lastCampaignCreatedAt: Date;
497
+ };
498
+ RewardBreakdown: ({
499
+ Reward: {
500
+ claimed: string;
501
+ id: string;
502
+ recipient: string;
503
+ amount: string;
504
+ root: string;
505
+ proofs: string[];
506
+ pending: string;
507
+ rewardTokenId: string;
508
+ };
509
+ } & {
510
+ protocolId: string | null;
511
+ campaignId: string;
512
+ claimed: string;
513
+ id: string;
514
+ amount: string;
515
+ reason: string;
516
+ rewardId: string;
517
+ pending: string;
518
+ subCampaignId: string | null;
519
+ })[];
520
+ } & {
521
+ campaignId: string;
522
+ description: string | null;
523
+ id: string;
524
+ params: import("@prisma/client/runtime/library").JsonValue;
525
+ amount: string;
526
+ startTimestamp: bigint;
527
+ type: string;
528
+ computeChainId: number;
529
+ distributionChainId: number;
530
+ endTimestamp: bigint;
531
+ opportunityId: string;
532
+ creatorAddress: string;
533
+ distributionType: import("@package/databases").DistributionType;
534
+ subType: number | null;
535
+ rewardTokenId: string;
536
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
537
+ createdAt: Date;
538
+ rootCampaignId: string | null;
539
+ parentCampaignId: string | null;
540
+ })[]>;
541
+ static countLives(query?: {
542
+ distributionChainId?: number;
543
+ computeChainId?: number;
544
+ type?: string;
545
+ }, includeSubCampaigns?: boolean): Promise<number>;
546
+ /**
547
+ * Upserts a campaign in the database. If the campaign already exists, it updates the existing record;
548
+ * otherwise, it creates a new one.
549
+ *
550
+ * @param {CreateCampaignModel} campaign - The campaign data to be upserted.
551
+ * @returns The upserted campaign record.
552
+ *
553
+ * @dev Should be the only way of creating campaigns in the database.
554
+ *
555
+ * @throws {Error} If unable to fetch data for the reward token.
556
+ *
557
+ * @remarks
558
+ * This method performs the following steps:
559
+ * 1. Determines the campaign type from the provided campaign data.
560
+ * 2. Computes the opportunity ID based on the campaign data.
561
+ * 3. Constructs the data object for the campaign to be upserted.
562
+ * 4. Upserts the campaign in the database using the constructed data object.
563
+ * 5. Logs an error if the upsert operation fails.
564
+ */
565
+ static upsert(campaign: Omit<CampaignWithParams, "manualOverrides">, opportunityIdentifier: string): Promise<{
566
+ campaignId: string;
567
+ description: string | null;
568
+ id: string;
569
+ params: import("@prisma/client/runtime/library").JsonValue;
570
+ amount: string;
571
+ startTimestamp: bigint;
572
+ type: string;
573
+ computeChainId: number;
574
+ distributionChainId: number;
575
+ endTimestamp: bigint;
576
+ opportunityId: string;
577
+ creatorAddress: string;
578
+ distributionType: import("@package/databases").DistributionType;
579
+ subType: number | null;
580
+ rewardTokenId: string;
581
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
582
+ createdAt: Date;
583
+ rootCampaignId: string | null;
584
+ parentCampaignId: string | null;
585
+ } | undefined>;
586
+ /**
587
+ * Retrieves a campaign from the engine database by its chain and campaign id.
588
+ * @dev Types are different from the API database.
589
+ * @dev IDs are different from the API database.
590
+ * id in the engine database = campaignId in the API database
591
+ */
592
+ static getFromEngineDbWithId(campaignIds: CampaignUnique[]): Promise<{
593
+ rewardToken: string;
594
+ campaignId: string;
595
+ creator: string;
596
+ amount: string;
597
+ index: number;
598
+ chainId: number;
599
+ campaignType: number;
600
+ startTimestamp: number;
601
+ computeChainId: number;
602
+ endTimestamp: number;
603
+ campaignParameters: import("@prisma/client/runtime/library").JsonValue;
604
+ campaignSubType: number;
605
+ mainParameter: string;
606
+ }[]>;
607
+ static findUnique(id: string): Promise<({
608
+ ComputeChain: {
609
+ name: string;
610
+ id: number;
611
+ icon: string;
612
+ };
613
+ DistributionChain: {
614
+ name: string;
615
+ id: number;
616
+ icon: string;
617
+ };
618
+ RewardToken: {
619
+ symbol: string;
620
+ name: string | null;
621
+ decimals: number;
622
+ price: number | null;
623
+ address: string;
624
+ id: string;
625
+ chainId: number;
626
+ icon: string;
627
+ isNative: boolean;
628
+ isPoint: boolean;
629
+ isPreTGE: boolean;
630
+ isTest: boolean;
631
+ verified: boolean;
632
+ displaySymbol: string;
633
+ };
634
+ Creator: {
635
+ address: string;
636
+ tags: string[];
637
+ creatorId: string | null;
638
+ };
639
+ CampaignStatus: {
640
+ campaignId: string;
641
+ error: string;
642
+ status: import("@package/databases").RunStatus;
643
+ details: import("@prisma/client/runtime/library").JsonValue;
644
+ computedUntil: bigint;
645
+ processingStarted: bigint;
646
+ }[];
647
+ } & {
648
+ campaignId: string;
649
+ description: string | null;
650
+ id: string;
651
+ params: import("@prisma/client/runtime/library").JsonValue;
652
+ amount: string;
653
+ startTimestamp: bigint;
654
+ type: string;
655
+ computeChainId: number;
656
+ distributionChainId: number;
657
+ endTimestamp: bigint;
658
+ opportunityId: string;
659
+ creatorAddress: string;
660
+ distributionType: import("@package/databases").DistributionType;
661
+ subType: number | null;
662
+ rewardTokenId: string;
663
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
664
+ createdAt: Date;
665
+ rootCampaignId: string | null;
666
+ parentCampaignId: string | null;
667
+ }) | null>;
668
+ static findUniqueOrThrow(id: string, withOpportunity: boolean): Promise<{
669
+ ComputeChain: {
670
+ name: string;
671
+ id: number;
672
+ icon: string;
673
+ };
674
+ DistributionChain: {
675
+ name: string;
676
+ id: number;
677
+ icon: string;
678
+ };
679
+ RewardToken: {
680
+ symbol: string;
681
+ name: string | null;
682
+ decimals: number;
683
+ price: number | null;
684
+ address: string;
685
+ id: string;
686
+ chainId: number;
687
+ icon: string;
688
+ isNative: boolean;
689
+ isPoint: boolean;
690
+ isPreTGE: boolean;
691
+ isTest: boolean;
692
+ verified: boolean;
693
+ displaySymbol: string;
694
+ };
695
+ Opportunity: {
696
+ name: string;
697
+ apr: number;
698
+ tvl: number;
699
+ description: string;
700
+ id: string;
701
+ status: import("@package/databases").Status;
702
+ chainId: number;
703
+ action: import("@package/databases").OpportunityAction;
704
+ type: string;
705
+ depositUrl: string | null;
706
+ explorerAddress: string | null;
707
+ howToSteps: string[];
708
+ mainProtocolId: string | null;
709
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
710
+ identifier: string;
711
+ dailyRewards: number;
712
+ tags: string[];
713
+ lastCampaignCreatedAt: Date;
714
+ };
715
+ Creator: {
716
+ address: string;
717
+ tags: string[];
718
+ creatorId: string | null;
719
+ };
720
+ CampaignStatus: {
721
+ campaignId: string;
722
+ error: string;
723
+ status: import("@package/databases").RunStatus;
724
+ details: import("@prisma/client/runtime/library").JsonValue;
725
+ computedUntil: bigint;
726
+ processingStarted: bigint;
727
+ }[];
728
+ } & {
729
+ campaignId: string;
730
+ description: string | null;
731
+ id: string;
732
+ params: import("@prisma/client/runtime/library").JsonValue;
733
+ amount: string;
734
+ startTimestamp: bigint;
735
+ type: string;
736
+ computeChainId: number;
737
+ distributionChainId: number;
738
+ endTimestamp: bigint;
739
+ opportunityId: string;
740
+ creatorAddress: string;
741
+ distributionType: import("@package/databases").DistributionType;
742
+ subType: number | null;
743
+ rewardTokenId: string;
744
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
745
+ createdAt: Date;
746
+ rootCampaignId: string | null;
747
+ parentCampaignId: string | null;
748
+ }>;
749
+ static findCampaignsToProcess(distributionChainId: ChainId): Promise<{
750
+ campaignId: string;
751
+ endTimestamp: bigint;
752
+ CampaignStatus: {
753
+ status: import("@package/databases").RunStatus;
754
+ computedUntil: bigint;
755
+ processingStarted: bigint;
756
+ }[];
757
+ }[]>;
758
+ static findMany(query: GetCampaignQueryModel): Promise<({
759
+ ComputeChain: {
760
+ name: string;
761
+ id: number;
762
+ icon: string;
763
+ };
764
+ DistributionChain: {
765
+ name: string;
766
+ id: number;
767
+ icon: string;
768
+ };
769
+ RewardToken: {
770
+ symbol: string;
771
+ name: string | null;
772
+ decimals: number;
773
+ price: number | null;
774
+ address: string;
775
+ id: string;
776
+ chainId: number;
777
+ icon: string;
778
+ isNative: boolean;
779
+ isPoint: boolean;
780
+ isPreTGE: boolean;
781
+ isTest: boolean;
782
+ verified: boolean;
783
+ displaySymbol: string;
784
+ };
785
+ Opportunity: {
786
+ name: string;
787
+ apr: number;
788
+ tvl: number;
789
+ description: string;
790
+ id: string;
791
+ status: import("@package/databases").Status;
792
+ chainId: number;
793
+ action: import("@package/databases").OpportunityAction;
794
+ type: string;
795
+ depositUrl: string | null;
796
+ explorerAddress: string | null;
797
+ howToSteps: string[];
798
+ mainProtocolId: string | null;
799
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
800
+ identifier: string;
801
+ dailyRewards: number;
802
+ tags: string[];
803
+ lastCampaignCreatedAt: Date;
804
+ };
805
+ Creator: {
806
+ address: string;
807
+ tags: string[];
808
+ creatorId: string | null;
809
+ };
810
+ CampaignStatus: {
811
+ campaignId: string;
812
+ error: string;
813
+ status: import("@package/databases").RunStatus;
814
+ details: import("@prisma/client/runtime/library").JsonValue;
815
+ computedUntil: bigint;
816
+ processingStarted: bigint;
817
+ }[];
818
+ } & {
819
+ campaignId: string;
820
+ description: string | null;
821
+ id: string;
822
+ params: import("@prisma/client/runtime/library").JsonValue;
823
+ amount: string;
824
+ startTimestamp: bigint;
825
+ type: string;
826
+ computeChainId: number;
827
+ distributionChainId: number;
828
+ endTimestamp: bigint;
829
+ opportunityId: string;
830
+ creatorAddress: string;
831
+ distributionType: import("@package/databases").DistributionType;
832
+ subType: number | null;
833
+ rewardTokenId: string;
834
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
835
+ createdAt: Date;
836
+ rootCampaignId: string | null;
837
+ parentCampaignId: string | null;
838
+ })[]>;
839
+ static countMany(query: GetCampaignQueryModel): Promise<number>;
840
+ static findChains(): Promise<Record<string, ChainId>>;
841
+ static addManualOverride(id: string, field: CampaignManualOverride): Promise<void>;
842
+ static removeManualOverride(id: string, field: CampaignManualOverride): Promise<void>;
843
+ static updateOpportunity(id: string, opportunityId: string): Promise<void>;
844
+ static updateCreator(id: string, creatorAddress: string): Promise<void>;
845
+ static updateParams(id: string, params: string): Promise<{
846
+ campaignId: string;
847
+ description: string | null;
848
+ id: string;
849
+ params: import("@prisma/client/runtime/library").JsonValue;
850
+ amount: string;
851
+ startTimestamp: bigint;
852
+ type: string;
853
+ computeChainId: number;
854
+ distributionChainId: number;
855
+ endTimestamp: bigint;
856
+ opportunityId: string;
857
+ creatorAddress: string;
858
+ distributionType: import("@package/databases").DistributionType;
859
+ subType: number | null;
860
+ rewardTokenId: string;
861
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
862
+ createdAt: Date;
863
+ rootCampaignId: string | null;
864
+ parentCampaignId: string | null;
865
+ }>;
866
+ static getTvlRecords(campaign: {
867
+ opportunityId: string;
868
+ startTimestamp: bigint;
869
+ endTimestamp: bigint;
870
+ }): Promise<{
871
+ timestamp: bigint;
872
+ total: number;
873
+ }[]>;
874
+ static getAprRecords(campaign: Campaign["raw"]): Promise<{
875
+ timestamp: bigint;
876
+ apr: number;
877
+ }[]>;
878
+ static getDailyRewardsRecords(campaign: {
879
+ opportunityId: string;
880
+ startTimestamp: bigint;
881
+ endTimestamp: bigint;
882
+ }): Promise<{
883
+ timestamp: bigint;
884
+ total: number;
885
+ }[]>;
886
+ static getWalletCount(campaign: {
887
+ id: string;
888
+ opportunityId: string;
889
+ startTimestamp: bigint;
890
+ endTimestamp: bigint;
891
+ }): Promise<number>;
892
+ static getWalletCountOverTime(campaign: {
893
+ id: string;
894
+ opportunityId: string;
895
+ startTimestamp: bigint;
896
+ endTimestamp: bigint;
897
+ }): Promise<{
898
+ timestamp: bigint;
899
+ walletCount: number;
900
+ }[]>;
901
+ }