@merkl/api 0.10.279 → 0.10.281

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 (27) hide show
  1. package/dist/src/eden/index.d.ts +80 -39
  2. package/dist/src/index.d.ts +30 -13
  3. package/dist/src/libs/campaigns/campaignTypes/CLAMMDynamicData.js +2 -8
  4. package/dist/src/modules/v4/boost/boost.controller.d.ts +44 -0
  5. package/dist/src/modules/v4/boost/boost.controller.js +14 -0
  6. package/dist/src/modules/v4/boost/boost.model.d.ts +6 -0
  7. package/dist/src/modules/v4/boost/boost.model.js +10 -0
  8. package/dist/src/modules/v4/boost/boost.service.d.ts +3 -0
  9. package/dist/src/modules/v4/boost/boost.service.js +6 -0
  10. package/dist/src/modules/v4/boost/index.d.ts +2 -0
  11. package/dist/src/modules/v4/boost/index.js +2 -0
  12. package/dist/src/modules/v4/enso/enso.model.d.ts +3 -2
  13. package/dist/src/modules/v4/enso/enso.model.js +3 -3
  14. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1 -1
  15. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +2 -2
  16. package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
  17. package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
  18. package/dist/src/modules/v4/reward/reward.controller.d.ts +5 -12
  19. package/dist/src/modules/v4/reward/reward.model.d.ts +1 -8
  20. package/dist/src/modules/v4/reward/reward.model.js +1 -2
  21. package/dist/src/modules/v4/reward/reward.repository.d.ts +6 -0
  22. package/dist/src/modules/v4/reward/reward.repository.js +19 -0
  23. package/dist/src/modules/v4/reward/reward.service.js +12 -7
  24. package/dist/src/modules/v4/router.d.ts +30 -13
  25. package/dist/src/modules/v4/router.js +3 -1
  26. package/dist/tsconfig.package.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -125,7 +125,7 @@ declare const eden: {
125
125
  } & {
126
126
  price?: number | null | undefined;
127
127
  })[];
128
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
128
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
129
129
  depositUrl: any;
130
130
  tags: string[];
131
131
  };
@@ -1126,24 +1126,17 @@ declare const eden: {
1126
1126
  };
1127
1127
  pendings: {
1128
1128
  post: (body: {
1129
- distributionChainId: number;
1130
- campaignId: string;
1131
- root: string;
1132
- rewardToken: string;
1133
- toUpdate: {
1134
- auxiliaryData1?: string | undefined;
1135
- auxiliaryData2?: string | undefined;
1136
- reason: string;
1137
- pending: string;
1138
- recipient: string;
1139
- }[];
1140
- toCreate: {
1129
+ data: {
1141
1130
  auxiliaryData1?: string | undefined;
1142
1131
  auxiliaryData2?: string | undefined;
1143
1132
  reason: string;
1144
1133
  pending: string;
1145
1134
  recipient: string;
1146
1135
  }[];
1136
+ distributionChainId: number;
1137
+ campaignId: string;
1138
+ root: string;
1139
+ rewardToken: string;
1147
1140
  }, options: {
1148
1141
  headers: {
1149
1142
  authorization: string;
@@ -2217,6 +2210,25 @@ declare const eden: {
2217
2210
  }>>;
2218
2211
  };
2219
2212
  };
2213
+ boosts: {
2214
+ euler: {
2215
+ post: (body: {
2216
+ address: string;
2217
+ score: string;
2218
+ }[] | {
2219
+ addresses: string[];
2220
+ }, options: {
2221
+ headers: {
2222
+ authorization: string;
2223
+ };
2224
+ query?: Record<string, unknown> | undefined;
2225
+ fetch?: RequestInit | undefined;
2226
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2227
+ [x: string]: any;
2228
+ 200: any;
2229
+ }>>;
2230
+ };
2231
+ };
2220
2232
  };
2221
2233
  v3: {
2222
2234
  app: {
@@ -3023,7 +3035,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3023
3035
  } & {
3024
3036
  price?: number | null | undefined;
3025
3037
  })[];
3026
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
3038
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
3027
3039
  depositUrl: any;
3028
3040
  tags: string[];
3029
3041
  };
@@ -4149,24 +4161,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4149
4161
  pendings: {
4150
4162
  post: {
4151
4163
  body: {
4152
- distributionChainId: number;
4153
- campaignId: string;
4154
- root: string;
4155
- rewardToken: string;
4156
- toUpdate: {
4157
- auxiliaryData1?: string | undefined;
4158
- auxiliaryData2?: string | undefined;
4159
- reason: string;
4160
- pending: string;
4161
- recipient: string;
4162
- }[];
4163
- toCreate: {
4164
+ data: {
4164
4165
  auxiliaryData1?: string | undefined;
4165
4166
  auxiliaryData2?: string | undefined;
4166
4167
  reason: string;
4167
4168
  pending: string;
4168
4169
  recipient: string;
4169
4170
  }[];
4171
+ distributionChainId: number;
4172
+ campaignId: string;
4173
+ root: string;
4174
+ rewardToken: string;
4170
4175
  };
4171
4176
  params: {};
4172
4177
  query: unknown;
@@ -5559,6 +5564,30 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5559
5564
  };
5560
5565
  };
5561
5566
  };
5567
+ } & {
5568
+ v4: {
5569
+ boosts: {
5570
+ euler: {
5571
+ post: {
5572
+ body: {
5573
+ addresses: string[];
5574
+ } | {
5575
+ address: string;
5576
+ score: string;
5577
+ }[];
5578
+ params: {};
5579
+ query: unknown;
5580
+ headers: {
5581
+ authorization: string;
5582
+ };
5583
+ response: {
5584
+ [x: string]: any;
5585
+ 200: any;
5586
+ };
5587
+ };
5588
+ };
5589
+ };
5590
+ };
5562
5591
  } & {
5563
5592
  v3: {
5564
5593
  app: {
@@ -6444,7 +6473,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6444
6473
  } & {
6445
6474
  price?: number | null | undefined;
6446
6475
  })[];
6447
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
6476
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
6448
6477
  depositUrl: any;
6449
6478
  tags: string[];
6450
6479
  };
@@ -7445,24 +7474,17 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7445
7474
  };
7446
7475
  pendings: {
7447
7476
  post: (body: {
7448
- distributionChainId: number;
7449
- campaignId: string;
7450
- root: string;
7451
- rewardToken: string;
7452
- toUpdate: {
7453
- auxiliaryData1?: string | undefined;
7454
- auxiliaryData2?: string | undefined;
7455
- reason: string;
7456
- pending: string;
7457
- recipient: string;
7458
- }[];
7459
- toCreate: {
7477
+ data: {
7460
7478
  auxiliaryData1?: string | undefined;
7461
7479
  auxiliaryData2?: string | undefined;
7462
7480
  reason: string;
7463
7481
  pending: string;
7464
7482
  recipient: string;
7465
7483
  }[];
7484
+ distributionChainId: number;
7485
+ campaignId: string;
7486
+ root: string;
7487
+ rewardToken: string;
7466
7488
  }, options: {
7467
7489
  headers: {
7468
7490
  authorization: string;
@@ -8536,6 +8558,25 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8536
8558
  }>>;
8537
8559
  };
8538
8560
  };
8561
+ boosts: {
8562
+ euler: {
8563
+ post: (body: {
8564
+ address: string;
8565
+ score: string;
8566
+ }[] | {
8567
+ addresses: string[];
8568
+ }, options: {
8569
+ headers: {
8570
+ authorization: string;
8571
+ };
8572
+ query?: Record<string, unknown> | undefined;
8573
+ fetch?: RequestInit | undefined;
8574
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8575
+ [x: string]: any;
8576
+ 200: any;
8577
+ }>>;
8578
+ };
8579
+ };
8539
8580
  };
8540
8581
  v3: {
8541
8582
  app: {
@@ -221,7 +221,7 @@ declare const app: Elysia<"", false, {
221
221
  } & {
222
222
  price?: number | null | undefined;
223
223
  })[];
224
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
224
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
225
225
  depositUrl: any;
226
226
  tags: string[];
227
227
  };
@@ -1347,24 +1347,17 @@ declare const app: Elysia<"", false, {
1347
1347
  pendings: {
1348
1348
  post: {
1349
1349
  body: {
1350
- distributionChainId: number;
1351
- campaignId: string;
1352
- root: string;
1353
- rewardToken: string;
1354
- toUpdate: {
1355
- auxiliaryData1?: string | undefined;
1356
- auxiliaryData2?: string | undefined;
1357
- reason: string;
1358
- pending: string;
1359
- recipient: string;
1360
- }[];
1361
- toCreate: {
1350
+ data: {
1362
1351
  auxiliaryData1?: string | undefined;
1363
1352
  auxiliaryData2?: string | undefined;
1364
1353
  reason: string;
1365
1354
  pending: string;
1366
1355
  recipient: string;
1367
1356
  }[];
1357
+ distributionChainId: number;
1358
+ campaignId: string;
1359
+ root: string;
1360
+ rewardToken: string;
1368
1361
  };
1369
1362
  params: {};
1370
1363
  query: unknown;
@@ -2757,6 +2750,30 @@ declare const app: Elysia<"", false, {
2757
2750
  };
2758
2751
  };
2759
2752
  };
2753
+ } & {
2754
+ v4: {
2755
+ boosts: {
2756
+ euler: {
2757
+ post: {
2758
+ body: {
2759
+ addresses: string[];
2760
+ } | {
2761
+ address: string;
2762
+ score: string;
2763
+ }[];
2764
+ params: {};
2765
+ query: unknown;
2766
+ headers: {
2767
+ authorization: string;
2768
+ };
2769
+ response: {
2770
+ [x: string]: any;
2771
+ 200: any;
2772
+ };
2773
+ };
2774
+ };
2775
+ };
2776
+ };
2760
2777
  } & {
2761
2778
  v3: {
2762
2779
  app: {
@@ -67,10 +67,7 @@ export async function CLAMMDynamicData(chainId, campaigns) {
67
67
  A51Strategies = await fetchA51Strategies(chainId, [...new Set(A51Pools)]);
68
68
  }
69
69
  for (const pool of poolList) {
70
- let poolInterface = PoolInterface[AMMAlgorithmMapping[pool.amm]];
71
- if (pool.amm === AMM.SyncswapV3) {
72
- poolInterface = PoolInterface[AMMAlgorithm.Neptune];
73
- }
70
+ const poolInterface = PoolInterface[AMMAlgorithmMapping[pool.amm]];
74
71
  const d = campaigns?.filter(campaign => campaign.mainParameter.toLowerCase() === pool.mainParameter.toLowerCase())[0];
75
72
  calls.push({
76
73
  allowFailure: true,
@@ -287,10 +284,7 @@ export async function CLAMMDynamicData(chainId, campaigns) {
287
284
  let i = 0;
288
285
  if (!!poolList) {
289
286
  for (const pool of poolList) {
290
- let poolInterface = PoolInterface[AMMAlgorithmMapping[pool.amm]];
291
- if (pool.amm === AMM.SyncswapV3) {
292
- poolInterface = PoolInterface[AMMAlgorithm.Neptune];
293
- }
287
+ const poolInterface = PoolInterface[AMMAlgorithmMapping[pool.amm]];
294
288
  // This liquidity call gives the active liquidity on the pool. To get the total liquidity we would need to loop over all positions
295
289
  let poolTotalLiquidity;
296
290
  let sqrtPrice;
@@ -0,0 +1,44 @@
1
+ import Elysia from "elysia";
2
+ export declare const BoostController: Elysia<"/boosts", false, {
3
+ decorator: {};
4
+ store: {};
5
+ derive: {};
6
+ resolve: {};
7
+ }, {
8
+ type: {};
9
+ error: {};
10
+ }, {
11
+ schema: {};
12
+ macro: {};
13
+ macroFn: {};
14
+ }, {
15
+ boosts: {
16
+ euler: {
17
+ post: {
18
+ body: {
19
+ addresses: string[];
20
+ } | {
21
+ address: string;
22
+ score: string;
23
+ }[];
24
+ params: {};
25
+ query: unknown;
26
+ headers: {
27
+ authorization: string;
28
+ };
29
+ response: {
30
+ [x: string]: any;
31
+ 200: any;
32
+ };
33
+ };
34
+ };
35
+ };
36
+ }, {
37
+ derive: {};
38
+ resolve: {};
39
+ schema: {};
40
+ }, {
41
+ derive: {};
42
+ resolve: {};
43
+ schema: {};
44
+ }>;
@@ -0,0 +1,14 @@
1
+ import { AuthorizationHeadersDto, BackOfficeGuard } from "../../../guards/BackOffice.guard";
2
+ import Elysia from "elysia";
3
+ import { getEulerBoostBody } from "./boost.model";
4
+ import { BoostService } from "./boost.service";
5
+ export const BoostController = new Elysia({ prefix: "/boosts", detail: { tags: ["Boosts"], hide: true } })
6
+ // ─── Get Euler Boost ─────────────────────────────────────────────────
7
+ .post("/euler", async ({ body }) => await BoostService.getEulerBoost(), {
8
+ body: getEulerBoostBody,
9
+ headers: AuthorizationHeadersDto,
10
+ beforeHandle: async ({ headers }) => {
11
+ await BackOfficeGuard({ headers });
12
+ },
13
+ detail: { hide: true },
14
+ });
@@ -0,0 +1,6 @@
1
+ export declare const getEulerBoostBody: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
2
+ addresses: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
3
+ }>, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
4
+ address: import("@sinclair/typebox").TString;
5
+ score: import("@sinclair/typebox").TString;
6
+ }>>]>;
@@ -0,0 +1,10 @@
1
+ import { t } from "elysia";
2
+ export const getEulerBoostBody = t.Union([
3
+ t.Object({
4
+ addresses: t.Array(t.String()),
5
+ }),
6
+ t.Array(t.Object({
7
+ address: t.String(),
8
+ score: t.String(),
9
+ })),
10
+ ]);
@@ -0,0 +1,3 @@
1
+ export declare class BoostService {
2
+ static getEulerBoost(): Promise<any>;
3
+ }
@@ -0,0 +1,6 @@
1
+ import axios from "axios";
2
+ export class BoostService {
3
+ static async getEulerBoost() {
4
+ return (await axios.get("https://points.euler.finance/integrations/merkl/usd0multipliers")).data;
5
+ }
6
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./boost.controller";
2
+ export * from "./boost.service";
@@ -0,0 +1,2 @@
1
+ export * from "./boost.controller";
2
+ export * from "./boost.service";
@@ -11,7 +11,8 @@ export declare const slugToProtocolId: {
11
11
  readonly "aura-lp": "aura";
12
12
  readonly aura: "aura";
13
13
  readonly beefy: "beefy";
14
- readonly venus: "compound";
14
+ readonly venus: "venus";
15
+ readonly "compound-v3": "compound";
15
16
  readonly "curve-gauge": "curve";
16
17
  readonly "euler-v2": "euler";
17
18
  readonly fluid: "fluid";
@@ -25,7 +26,7 @@ export declare const slugToProtocolId: {
25
26
  readonly "silo-protected": "silo";
26
27
  readonly silo: "silo";
27
28
  readonly "velodrome-v2-staking": "velodrome";
28
- readonly zerolend: "zero";
29
+ readonly zerolend: "zerolend";
29
30
  };
30
31
  export type EnsoSlug = keyof typeof slugToProtocolId;
31
32
  export declare const apiTypes: {
@@ -12,8 +12,8 @@ export const slugToProtocolId = {
12
12
  "aura-lp": "aura",
13
13
  aura: "aura",
14
14
  beefy: "beefy",
15
- venus: "compound",
16
- // "compound-v3": "compound",
15
+ venus: "venus",
16
+ "compound-v3": "compound",
17
17
  "curve-gauge": "curve",
18
18
  "euler-v2": "euler",
19
19
  fluid: "fluid",
@@ -27,7 +27,7 @@ export const slugToProtocolId = {
27
27
  "silo-protected": "silo",
28
28
  silo: "silo",
29
29
  "velodrome-v2-staking": "velodrome",
30
- zerolend: "zero",
30
+ zerolend: "zerolend",
31
31
  };
32
32
  export const apiTypes = {
33
33
  "/v1/protocols": {
@@ -90,7 +90,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
90
90
  } & {
91
91
  price?: number | null | undefined;
92
92
  })[];
93
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
93
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
94
94
  depositUrl: any;
95
95
  tags: string[];
96
96
  };
@@ -47,7 +47,7 @@ export declare abstract class OpportunityService {
47
47
  } & {
48
48
  price?: number | null | undefined;
49
49
  })[];
50
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
50
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
51
51
  depositUrl: any;
52
52
  tags: string[];
53
53
  }>;
@@ -75,7 +75,7 @@ export declare abstract class OpportunityService {
75
75
  } & {
76
76
  price?: number | null | undefined;
77
77
  })[];
78
- mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
78
+ mainProtocol: "morpho" | "aura" | "poolside" | "gearbox" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fenix" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "akron" | "dragonswap" | "koi" | "baseswap" | "zkswap" | "rfx" | "woofi" | "zkSwapThreePool" | "venus" | "reactor_fusion" | "balancer" | "aave" | "zerolend" | "arthswap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancakeswap-v3" | "quickswap-algebra" | "quickswap-uni" | "ramses" | "retro" | "stryke" | "stryke-pcs" | "stryke-sushi" | "sushiswap-v3" | "swapr" | "thruster" | "uniswap-v3" | "voltage" | "zero" | "supswap-v3" | "thirdtrade" | "uniswap-v2" | "syncswap-v3" | "neptune" | "radiant" | "euler" | "sturdy" | "frax" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | undefined;
79
79
  depositUrl: any;
80
80
  tags: string[];
81
81
  }>;
@@ -5,7 +5,7 @@ import type { Resource } from "../prisma";
5
5
  * @see {@link Resource}
6
6
  */
7
7
  export type Protocol = Resource<"Protocol">;
8
- declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest"];
8
+ declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "syncswap-v3", "neptune", "zkSwapThreePool", "syncswap", "rfx", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "venus", "woofi", "reactor_fusion", "eigenlayer", "vest", "zerolend"];
9
9
  export type ProtocolId = (typeof protocolTypes)[number];
10
10
  export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
11
11
  id: import("@sinclair/typebox").TString;
@@ -68,6 +68,7 @@ const protocolTypes = [
68
68
  "reactor_fusion",
69
69
  "eigenlayer",
70
70
  "vest",
71
+ "zerolend",
71
72
  ];
72
73
  // ─── DTOs ────────────────────────────────────────────────────────────────────
73
74
  export const ProtocolResourceDto = t.Object({
@@ -130,24 +130,17 @@ export declare const RewardController: Elysia<"/rewards", false, {
130
130
  pendings: {
131
131
  post: {
132
132
  body: {
133
- distributionChainId: number;
134
- campaignId: string;
135
- root: string;
136
- rewardToken: string;
137
- toUpdate: {
138
- auxiliaryData1?: string | undefined;
139
- auxiliaryData2?: string | undefined;
140
- reason: string;
141
- pending: string;
142
- recipient: string;
143
- }[];
144
- toCreate: {
133
+ data: {
145
134
  auxiliaryData1?: string | undefined;
146
135
  auxiliaryData2?: string | undefined;
147
136
  reason: string;
148
137
  pending: string;
149
138
  recipient: string;
150
139
  }[];
140
+ distributionChainId: number;
141
+ campaignId: string;
142
+ root: string;
143
+ rewardToken: string;
151
144
  };
152
145
  params: {};
153
146
  query: unknown;
@@ -126,14 +126,7 @@ export declare const UpdatePendingDto: import("@sinclair/typebox").TObject<{
126
126
  rewardToken: import("@sinclair/typebox").TString;
127
127
  campaignId: import("@sinclair/typebox").TString;
128
128
  root: import("@sinclair/typebox").TString;
129
- toUpdate: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
130
- recipient: import("@sinclair/typebox").TString;
131
- reason: import("@sinclair/typebox").TString;
132
- pending: import("@sinclair/typebox").TString;
133
- auxiliaryData1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
134
- auxiliaryData2: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
135
- }>>;
136
- toCreate: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
129
+ data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
137
130
  recipient: import("@sinclair/typebox").TString;
138
131
  reason: import("@sinclair/typebox").TString;
139
132
  pending: import("@sinclair/typebox").TString;
@@ -58,8 +58,7 @@ export const UpdatePendingDto = t.Object({
58
58
  rewardToken: t.String(),
59
59
  campaignId: t.String(),
60
60
  root: t.String(),
61
- toUpdate: t.Array(PendingDto),
62
- toCreate: t.Array(PendingDto),
61
+ data: t.Array(PendingDto),
63
62
  });
64
63
  export const RewardsByUser = t.Object({
65
64
  address: t.String(),
@@ -126,6 +126,12 @@ export declare abstract class RewardRepository {
126
126
  };
127
127
  })[]>;
128
128
  static updateClaimed(recipient: string, rewardTokenId: string, campaignId: string, reason: string, amount: string): Promise<Prisma.BatchPayload>;
129
+ static findManyBreakdownUniques(rewardTokenId: string, root: string, campaignId: string): Promise<{
130
+ reason: string;
131
+ Reward: {
132
+ recipient: string;
133
+ };
134
+ }[]>;
129
135
  static updatePendings(rewardTokenId: string, root: string, campaignId: string, toUpdate: PendingEntity[]): Promise<{
130
136
  reason: string;
131
137
  pending: string;
@@ -139,6 +139,25 @@ export class RewardRepository {
139
139
  },
140
140
  });
141
141
  }
142
+ static async findManyBreakdownUniques(rewardTokenId, root, campaignId) {
143
+ return await apiDbClient.rewardBreakdown.findMany({
144
+ where: {
145
+ Reward: {
146
+ root,
147
+ rewardTokenId,
148
+ },
149
+ campaignId,
150
+ },
151
+ select: {
152
+ Reward: {
153
+ select: {
154
+ recipient: true,
155
+ },
156
+ },
157
+ reason: true,
158
+ },
159
+ });
160
+ }
142
161
  static async updatePendings(rewardTokenId, root, campaignId, toUpdate) {
143
162
  return await apiDbClient.$transaction(toUpdate.map(x => {
144
163
  return apiDbClient.rewardBreakdown.update({