@merkl/api 0.16.13 → 0.16.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/src/backgroundJobs/jobs/priceUpdater.js +1 -1
  2. package/dist/src/eden/index.d.ts +363 -413
  3. package/dist/src/entities/opportunity.js +17 -0
  4. package/dist/src/index.d.ts +84 -82
  5. package/dist/src/libs/campaigns/campaignTypes/EncompassingDynamicData.d.ts +5 -0
  6. package/dist/src/libs/campaigns/campaignTypes/EncompassingDynamicData.js +34 -0
  7. package/dist/src/libs/campaigns/campaignsDynamicData.js +4 -0
  8. package/dist/src/libs/merklChainData.js +1 -1
  9. package/dist/src/libs/tokens/balances.js +1 -1
  10. package/dist/src/modules/v4/accounting/accounting.service.js +1 -1
  11. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +1 -13
  12. package/dist/src/modules/v4/campaign/campaign.repository.js +2 -2
  13. package/dist/src/modules/v4/campaign/campaign.service.d.ts +2 -26
  14. package/dist/src/modules/v4/campaign/campaign.service.js +3 -3
  15. package/dist/src/modules/v4/claims/claims.controller.d.ts +1 -1
  16. package/dist/src/modules/v4/enso/enso.model.d.ts +1 -1
  17. package/dist/src/modules/v4/enso/enso.model.js +1 -1
  18. package/dist/src/modules/v4/enso/enso.service.d.ts +2 -2
  19. package/dist/src/modules/v4/enso/enso.service.js +2 -2
  20. package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -1
  21. package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
  22. package/dist/src/modules/v4/kyberzap/kyberzap.service.js +1 -1
  23. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +4 -40
  24. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +12 -108
  25. package/dist/src/modules/v4/opportunity/opportunity.service.js +8 -5
  26. package/dist/src/modules/v4/opportunity/subservices/getAjnaMetadata.service.js +1 -1
  27. package/dist/src/modules/v4/opportunity/subservices/getBadgerMetadata.service.js +1 -1
  28. package/dist/src/modules/v4/opportunity/subservices/getEncompassingMetadata.service.d.ts +3 -0
  29. package/dist/src/modules/v4/opportunity/subservices/getEncompassingMetadata.service.js +35 -0
  30. package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
  31. package/dist/src/modules/v4/protocol/protocol.model.js +4 -0
  32. package/dist/src/modules/v4/protocol/protocol.service.js +6 -2
  33. package/dist/src/modules/v4/referral/referral.controller.d.ts +82 -0
  34. package/dist/src/modules/v4/referral/referral.controller.js +25 -0
  35. package/dist/src/modules/v4/referral/referral.model.d.ts +10 -0
  36. package/dist/src/modules/v4/referral/referral.model.js +12 -0
  37. package/dist/src/modules/v4/referral/referral.service.d.ts +216 -0
  38. package/dist/src/modules/v4/referral/referral.service.js +170 -0
  39. package/dist/src/modules/v4/reward/reward.controller.js +3 -3
  40. package/dist/src/modules/v4/reward/reward.repository.js +2 -2
  41. package/dist/src/modules/v4/reward/reward.service.js +1 -1
  42. package/dist/src/modules/v4/router.d.ts +84 -82
  43. package/dist/src/modules/v4/router.js +3 -1
  44. package/dist/src/modules/v4/token/token.controller.d.ts +16 -28
  45. package/dist/src/modules/v4/token/token.controller.js +2 -1
  46. package/dist/src/modules/v4/token/token.service.d.ts +5 -69
  47. package/dist/src/routes/v3/lostyield.js +1 -1
  48. package/dist/tsconfig.package.tsbuildinfo +1 -1
  49. package/package.json +1 -1
  50. package/dist/src/modules/v4/token/index.d.ts +0 -3
  51. package/dist/src/modules/v4/token/index.js +0 -3
@@ -1182,6 +1182,23 @@ export const extractOpportunities = {
1182
1182
  };
1183
1183
  return opportunity;
1184
1184
  },
1185
+ [Campaign.ENCOMPASSING]: ({ chainId, mainParameter, campaignParameters: params, tvl, apr }, campaigns) => {
1186
+ const opportunity = {
1187
+ id: `${Campaign.ENCOMPASSING}_${mainParameter}`,
1188
+ name: params.opportunityName ?? ["Distribution of", params.symbolRewardToken].join(" "),
1189
+ chainId,
1190
+ action: "drop",
1191
+ status: getStatus(campaigns.all),
1192
+ tags: getTags(campaigns.all),
1193
+ tokenIcons: [params.symbolRewardToken],
1194
+ campaigns: { ...campaigns, type: Campaign.ENCOMPASSING, ids: campaigns.all.map(c => c.campaignId) },
1195
+ rewardTokenIcons: getRewardTokenIcons(campaigns.active),
1196
+ dailyRewardTokens: getRewardTokens(campaigns.active),
1197
+ tvl,
1198
+ apr,
1199
+ };
1200
+ return opportunity;
1201
+ },
1185
1202
  };
1186
1203
  /**
1187
1204
  * @returns the opportunities map with their corresponding campaign's data added
@@ -223,20 +223,8 @@ declare const app: Elysia<"", false, {
223
223
  name: string;
224
224
  status: "PAST" | "LIVE" | "SOON";
225
225
  action: import("../database/api/.generated").$Enums.OpportunityAction;
226
- tokens: ({
227
- symbol: string;
228
- name: string | null;
229
- id: string;
230
- icon: string;
231
- chainId: number;
232
- address: string;
233
- decimals: number;
234
- verified: boolean;
235
- isTest: boolean;
236
- } & {
237
- price?: number | null | undefined;
238
- })[];
239
- mainProtocol: "morpho" | "euler" | "ambient" | "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" | "uniswapv4" | "uniswap-v2" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap-v3" | "neptune" | "zkSwapThreePool" | "syncswap" | "rfx" | "radiant" | "aave" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | undefined;
226
+ tokens: any[];
227
+ mainProtocol: "morpho" | "euler" | "ambient" | "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" | "uniswapv4" | "uniswap-v2" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap-v3" | "neptune" | "zkSwapThreePool" | "syncswap" | "rfx" | "radiant" | "aave" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | undefined;
240
228
  depositUrl: any;
241
229
  tags: string[];
242
230
  };
@@ -321,19 +309,7 @@ declare const app: Elysia<"", false, {
321
309
  };
322
310
  id: string;
323
311
  depositUrl: string | undefined;
324
- tokens: ({
325
- symbol: string;
326
- name: string | null;
327
- id: string;
328
- icon: string;
329
- chainId: number;
330
- address: string;
331
- decimals: number;
332
- verified: boolean;
333
- isTest: boolean;
334
- } & {
335
- price?: number | null | undefined;
336
- })[];
312
+ tokens: Token[];
337
313
  chain: {
338
314
  name: string;
339
315
  id: number;
@@ -620,19 +596,7 @@ declare const app: Elysia<"", false, {
620
596
  id: number;
621
597
  icon: string;
622
598
  };
623
- rewardToken: {
624
- symbol: string;
625
- name: string | null;
626
- id: string;
627
- icon: string;
628
- chainId: number;
629
- address: string;
630
- decimals: number;
631
- verified: boolean;
632
- isTest: boolean;
633
- } & {
634
- price?: number | null | undefined;
635
- };
599
+ rewardToken: Token;
636
600
  distributionChain: {
637
601
  name: string;
638
602
  id: number;
@@ -1112,19 +1076,7 @@ declare const app: Elysia<"", false, {
1112
1076
  id: number;
1113
1077
  icon: string;
1114
1078
  };
1115
- rewardToken: {
1116
- symbol: string;
1117
- name: string | null;
1118
- id: string;
1119
- icon: string;
1120
- chainId: number;
1121
- address: string;
1122
- decimals: number;
1123
- verified: boolean;
1124
- isTest: boolean;
1125
- } & {
1126
- price?: number | null | undefined;
1127
- };
1079
+ rewardToken: Token;
1128
1080
  distributionChain: {
1129
1081
  name: string;
1130
1082
  id: number;
@@ -1536,21 +1488,7 @@ declare const app: Elysia<"", false, {
1536
1488
  };
1537
1489
  headers: unknown;
1538
1490
  response: {
1539
- 200: ({
1540
- symbol: string;
1541
- name: string | null;
1542
- id: string;
1543
- icon: string;
1544
- chainId: number;
1545
- address: string;
1546
- decimals: number;
1547
- verified: boolean;
1548
- isTest: boolean;
1549
- } & {
1550
- price?: number | null | undefined;
1551
- } & {
1552
- balance: bigint;
1553
- })[];
1491
+ 200: any[];
1554
1492
  };
1555
1493
  };
1556
1494
  };
@@ -1572,19 +1510,7 @@ declare const app: Elysia<"", false, {
1572
1510
  };
1573
1511
  headers: unknown;
1574
1512
  response: {
1575
- 200: ({
1576
- symbol: string;
1577
- name: string | null;
1578
- id: string;
1579
- icon: string;
1580
- chainId: number;
1581
- address: string;
1582
- decimals: number;
1583
- verified: boolean;
1584
- isTest: boolean;
1585
- } & {
1586
- price?: number | null | undefined;
1587
- })[];
1513
+ 200: Token[];
1588
1514
  };
1589
1515
  };
1590
1516
  };
@@ -1678,6 +1604,20 @@ declare const app: Elysia<"", false, {
1678
1604
  };
1679
1605
  };
1680
1606
  };
1607
+ } & {
1608
+ tokens: {
1609
+ sync: {
1610
+ get: {
1611
+ body: unknown;
1612
+ params: {};
1613
+ query: unknown;
1614
+ headers: unknown;
1615
+ response: {
1616
+ 200: void;
1617
+ };
1618
+ };
1619
+ };
1620
+ };
1681
1621
  };
1682
1622
  } & {
1683
1623
  v4: {
@@ -3427,7 +3367,7 @@ declare const app: Elysia<"", false, {
3427
3367
  headers: unknown;
3428
3368
  response: {
3429
3369
  200: (import("./modules/v4/claims").ClaimModel & {
3430
- token?: import("./modules/v4/token").Token["model"];
3370
+ token?: Token;
3431
3371
  })[];
3432
3372
  };
3433
3373
  };
@@ -3979,6 +3919,68 @@ declare const app: Elysia<"", false, {
3979
3919
  };
3980
3920
  };
3981
3921
  };
3922
+ } & {
3923
+ v4: {
3924
+ referral: {
3925
+ code: {
3926
+ get: {
3927
+ body: unknown;
3928
+ params: {};
3929
+ query: {
3930
+ chainId: number;
3931
+ address: string;
3932
+ referralKey: string;
3933
+ };
3934
+ headers: unknown;
3935
+ response: {
3936
+ 200: {
3937
+ code: string;
3938
+ referrer: boolean;
3939
+ referredUsers: never[];
3940
+ transaction: {
3941
+ to: string;
3942
+ data: `0x${string}`;
3943
+ };
3944
+ } | {
3945
+ code: any;
3946
+ referrer: boolean;
3947
+ referredUsers: any;
3948
+ transaction?: undefined;
3949
+ };
3950
+ };
3951
+ };
3952
+ };
3953
+ };
3954
+ } & {
3955
+ referral: {
3956
+ redeem: {
3957
+ get: {
3958
+ body: unknown;
3959
+ params: {};
3960
+ query: {
3961
+ code: string;
3962
+ chainId: number;
3963
+ referralKey: string;
3964
+ };
3965
+ headers: unknown;
3966
+ response: {
3967
+ 200: {
3968
+ code: string;
3969
+ referrer: any;
3970
+ transaction?: undefined;
3971
+ } | {
3972
+ code: string;
3973
+ referrer: any;
3974
+ transaction: {
3975
+ to: string;
3976
+ data: `0x${string}`;
3977
+ };
3978
+ };
3979
+ };
3980
+ };
3981
+ };
3982
+ };
3983
+ };
3982
3984
  } & {
3983
3985
  v3: {
3984
3986
  app: {
@@ -0,0 +1,5 @@
1
+ import type { Campaign, CampaignDynamicData, CampaignParameters, MerklChainId } from "@sdk";
2
+ import type { UncachedResult } from "../../../utils/execute";
3
+ type ReturnType = CampaignDynamicData<Campaign.ENCOMPASSING>[];
4
+ export declare function EncompassingDynamicData(_chainId: MerklChainId, campaigns: CampaignParameters<Campaign.ENCOMPASSING>[]): Promise<UncachedResult<Partial<ReturnType>>>;
5
+ export {};
@@ -0,0 +1,34 @@
1
+ import axios from "axios";
2
+ export async function EncompassingDynamicData(_chainId, campaigns) {
3
+ const calls = [];
4
+ return {
5
+ cached: false,
6
+ call: {
7
+ callData: calls,
8
+ handler: () => { },
9
+ reducer: async (_result) => {
10
+ const dynamicData = [];
11
+ for (const campaign of campaigns) {
12
+ let tvl = 0;
13
+ let apr = 0;
14
+ if (campaign.campaignParameters.dataUrl) {
15
+ try {
16
+ const dataResponse = await axios.get(campaign.campaignParameters.dataUrl);
17
+ if (dataResponse.data) {
18
+ tvl = dataResponse.data.tvl ?? 0;
19
+ apr = dataResponse.data.apr ?? 0;
20
+ }
21
+ }
22
+ catch { }
23
+ }
24
+ dynamicData.push({
25
+ ...campaign,
26
+ tvl,
27
+ apr,
28
+ });
29
+ }
30
+ return dynamicData;
31
+ },
32
+ },
33
+ };
34
+ }
@@ -9,6 +9,7 @@ import { DolomiteDynamicData } from "./campaignTypes/DolomiteDynamicData";
9
9
  import { ERC20DynamicData } from "./campaignTypes/ERC20DynamicData";
10
10
  import { ERC20_SNAPSHOTDynamicData } from "./campaignTypes/ERC20_SNAPSHOTDynamicData";
11
11
  import { EigenLayerDynamicData } from "./campaignTypes/EigenLayerDynamicData";
12
+ import { EncompassingDynamicData } from "./campaignTypes/EncompassingDynamicData";
12
13
  import { HyperdriveDynamicData } from "./campaignTypes/HyperdriveDynamicData";
13
14
  import { JSON_AIRDROPDynamicData } from "./campaignTypes/JSON_AIRDROPDynamicData";
14
15
  import { MORPHODynamicData } from "./campaignTypes/MORPHODynamicData";
@@ -86,6 +87,9 @@ export async function campaignsDynamicData(chainId, campaigns, type) {
86
87
  case Campaign.UNISWAP_V4: {
87
88
  return UniswapV4DynamicData(chainId, campaigns);
88
89
  }
90
+ case Campaign.ENCOMPASSING: {
91
+ return EncompassingDynamicData(chainId, campaigns);
92
+ }
89
93
  }
90
94
  return {
91
95
  cached: false,
@@ -1,5 +1,5 @@
1
1
  import { Redis } from "../cache";
2
- import { TokenService } from "../modules/v4/token";
2
+ import { TokenService } from "../modules/v4/token/token.service";
3
3
  import { Interface } from "@ethersproject/abi";
4
4
  import { BN2Number, DistributionCreator__factory, Distributor__factory, NETWORK_LABELS, NULL_ADDRESS, registry, } from "@sdk";
5
5
  import { batchMulticallCallWithRetry } from "../utils/generic";
@@ -1,4 +1,4 @@
1
- import { TokenService } from "../../modules/v4/token";
1
+ import { TokenService } from "../../modules/v4/token/token.service";
2
2
  import { ChainId, ChainInteractionService, ETH_ADDRESS, ETH_ZKSYNC_ADDRESS, Erc20__factory, EthOnZKSync_INTERFACE, NETWORK_LABELS, } from "@sdk";
3
3
  import { log } from "../../utils/logger";
4
4
  export async function getOnlyUserBalance(chainId, userAddress, tokenAddresses) {
@@ -1,5 +1,5 @@
1
1
  import { AccountingRepository } from "./accounting.repository";
2
- import { TokenService } from "../token";
2
+ import { TokenService } from "../token/token.service";
3
3
  import { ChainId } from "@sdk";
4
4
  export class AccountingService {
5
5
  static hashId(chainId, fromTokenId, toTokenId, timestamp) {
@@ -138,19 +138,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
138
138
  id: number;
139
139
  icon: string;
140
140
  };
141
- rewardToken: {
142
- symbol: string;
143
- name: string | null;
144
- id: string;
145
- icon: string;
146
- chainId: number;
147
- address: string;
148
- decimals: number;
149
- verified: boolean;
150
- isTest: boolean;
151
- } & {
152
- price?: number | null | undefined;
153
- };
141
+ rewardToken: Token;
154
142
  distributionChain: {
155
143
  name: string;
156
144
  id: number;
@@ -1,4 +1,5 @@
1
- import { CampaignService } from "./";
1
+ import { CampaignService } from "./campaign.service";
2
+ import { TokenService } from "../token/token.service";
2
3
  import { log } from "../../../utils/logger";
3
4
  import { apiDbClient, engineDbClient } from "../../../utils/prisma";
4
5
  import { ALL_CAMPAIGNS_FOR_CHAIN_AFTER } from "../../../utils/queries/allCampaigns";
@@ -6,7 +7,6 @@ import { Prisma, RunStatus } from "../../../../database/api/.generated";
6
7
  import { MAX_COMPUTE_JOB_TIME } from "@sdk";
7
8
  import moment from "moment";
8
9
  import { OpportunityService } from "../opportunity";
9
- import { TokenService } from "../token";
10
10
  export class CampaignRepository {
11
11
  static transformQueryToPrismaFilters(query) {
12
12
  const { creatorTag, creatorId, creatorAddress, chainId, endTimestamp, opportunityId, mainParameter, campaignId, startTimestamp, subType, type, tokenAddress, tokenSymbol, test, } = query;
@@ -58,19 +58,7 @@ export declare abstract class CampaignService {
58
58
  id: number;
59
59
  icon: string;
60
60
  };
61
- rewardToken: {
62
- symbol: string;
63
- name: string | null;
64
- id: string;
65
- icon: string;
66
- chainId: number;
67
- address: string;
68
- decimals: number;
69
- verified: boolean;
70
- isTest: boolean;
71
- } & {
72
- price?: number | null | undefined;
73
- };
61
+ rewardToken: Token;
74
62
  distributionChain: {
75
63
  name: string;
76
64
  id: number;
@@ -204,19 +192,7 @@ export declare abstract class CampaignService {
204
192
  id: number;
205
193
  icon: string;
206
194
  };
207
- rewardToken: {
208
- symbol: string;
209
- name: string | null;
210
- id: string;
211
- icon: string;
212
- chainId: number;
213
- address: string;
214
- decimals: number;
215
- verified: boolean;
216
- isTest: boolean;
217
- } & {
218
- price?: number | null | undefined;
219
- };
195
+ rewardToken: Token;
220
196
  distributionChain: {
221
197
  name: string;
222
198
  id: number;
@@ -2,15 +2,15 @@ import { HttpError } from "../../../errors";
2
2
  import { campaignsDynamicData } from "../../../libs/campaigns/campaignsDynamicData";
3
3
  import { CampaignRepository } from "./campaign.repository";
4
4
  import { OpportunityService } from "../opportunity";
5
+ import { StatusService } from "../status/status.service";
6
+ import { TokenRepository } from "../token/token.repository";
7
+ import { TokenService } from "../token/token.service";
5
8
  import { InvalidParameter } from "../../../utils/error";
6
9
  import { executeSimple } from "../../../utils/execute";
7
10
  import { log } from "../../../utils/logger";
8
11
  import { Campaign as CampaignEnum, NETWORK_LABELS, } from "@sdk";
9
12
  import { utils } from "ethers";
10
13
  import moment from "moment";
11
- import { StatusService } from "../status";
12
- import { TokenService } from "../token";
13
- import { TokenRepository } from "../token/token.repository";
14
14
  export class CampaignService {
15
15
  static hashId(campaign) {
16
16
  return Bun.hash(`${campaign.distributionChain}${campaign.campaignId}`).toString();
@@ -25,7 +25,7 @@ export declare const ClaimController: Elysia<"/claims", false, {
25
25
  headers: unknown;
26
26
  response: {
27
27
  200: (import("./claims.model").ClaimModel & {
28
- token?: import("../token").Token["model"];
28
+ token?: Token;
29
29
  })[];
30
30
  };
31
31
  };
@@ -57,7 +57,7 @@ export declare const apiTypes: {
57
57
  base: "base";
58
58
  }>>;
59
59
  page: import("@sinclair/typebox").TNumber;
60
- inludeMetadatra: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
60
+ inludeMetadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
61
61
  }>;
62
62
  readonly response: import("@sinclair/typebox").TObject<{
63
63
  data: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
@@ -51,7 +51,7 @@ export const apiTypes = {
51
51
  chainId: t.Number(),
52
52
  type: t.Optional(t.Enum({ defi: "defi", base: "base" })),
53
53
  page: t.Number(),
54
- inludeMetadatra: t.Optional(t.Boolean()),
54
+ inludeMetadata: t.Optional(t.String()),
55
55
  }),
56
56
  response: t.Object({
57
57
  data: t.Array(t.Object({
@@ -1,11 +1,11 @@
1
- import type { GetParticipateProtocolsQuery, InteractionAction, InteractionTarget, Router } from "../interaction/interaction.model";
1
+ import type { GetInteractionProtocolsQuery, InteractionAction, InteractionTarget, Router } from "../interaction/interaction.model";
2
2
  import { type ProtocolId } from "../protocol";
3
3
  import { type EnsoApi, type EnsoSlug } from "./enso.model";
4
4
  export declare abstract class EnsoService {
5
5
  #private;
6
6
  static getSlug(protocolId: ProtocolId | string): EnsoSlug | undefined;
7
7
  static getProtocolId(slug: EnsoSlug | string): ProtocolId | undefined;
8
- static getCompatibleProtocols(query: GetParticipateProtocolsQuery): Promise<({
8
+ static getCompatibleProtocols(query: GetInteractionProtocolsQuery): Promise<({
9
9
  name: string;
10
10
  url: string;
11
11
  description: string;
@@ -1,7 +1,7 @@
1
1
  import { ProtocolService } from "../protocol";
2
- import { TokenService } from "../token";
2
+ import { TokenService } from "../token/token.service";
3
3
  import { slugToProtocolId } from "./enso.model";
4
- const ENSO = `https://api.enso.finance/api`;
4
+ const ENSO = "https://api.enso.finance/api";
5
5
  export class EnsoService {
6
6
  static async #fetch(route, params) {
7
7
  const res = await fetch(`${ENSO}${route}?${params?.query ? new URLSearchParams(params?.query) : ""}`, {
@@ -1,5 +1,5 @@
1
+ import type { Token } from "../token/token.model";
1
2
  import type { ProtocolId } from "../protocol";
2
- import type { Token } from "../token";
3
3
  /**
4
4
  * Interaction Route
5
5
  */
@@ -1,5 +1,5 @@
1
+ import type { ProtocolId } from "../protocol/protocol.model";
1
2
  import type { InteractionAction, Router } from "../interaction/interaction.model";
2
- import type { ProtocolId } from "../protocol";
3
3
  import { type KyberZapDexId, type ZapAction } from "./kyberzap.model";
4
4
  export declare abstract class KyberZapService {
5
5
  #private;
@@ -1,4 +1,4 @@
1
- import { TokenService } from "../token";
1
+ import { TokenService } from "../token/token.service";
2
2
  import { chainToKyberLabel, dexIdToProtocolId, } from "./kyberzap.model";
3
3
  const KYBERZAP = `https://zap-api.kyberswap.com/`;
4
4
  export class KyberZapService {
@@ -78,20 +78,8 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
78
78
  name: string;
79
79
  status: "PAST" | "LIVE" | "SOON";
80
80
  action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
81
- tokens: ({
82
- symbol: string;
83
- name: string | null;
84
- id: string;
85
- icon: string;
86
- chainId: number;
87
- address: string;
88
- decimals: number;
89
- verified: boolean;
90
- isTest: boolean;
91
- } & {
92
- price?: number | null | undefined;
93
- })[];
94
- mainProtocol: "morpho" | "euler" | "ambient" | "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" | "uniswapv4" | "uniswap-v2" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap-v3" | "neptune" | "zkSwapThreePool" | "syncswap" | "rfx" | "radiant" | "aave" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | undefined;
81
+ tokens: any[];
82
+ mainProtocol: "morpho" | "euler" | "ambient" | "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" | "uniswapv4" | "uniswap-v2" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap-v3" | "neptune" | "zkSwapThreePool" | "syncswap" | "rfx" | "radiant" | "aave" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "coumpound" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | undefined;
95
83
  depositUrl: any;
96
84
  tags: string[];
97
85
  };
@@ -176,19 +164,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
176
164
  };
177
165
  id: string;
178
166
  depositUrl: string | undefined;
179
- tokens: ({
180
- symbol: string;
181
- name: string | null;
182
- id: string;
183
- icon: string;
184
- chainId: number;
185
- address: string;
186
- decimals: number;
187
- verified: boolean;
188
- isTest: boolean;
189
- } & {
190
- price?: number | null | undefined;
191
- })[];
167
+ tokens: Token[];
192
168
  chain: {
193
169
  name: string;
194
170
  id: number;
@@ -475,19 +451,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
475
451
  id: number;
476
452
  icon: string;
477
453
  };
478
- rewardToken: {
479
- symbol: string;
480
- name: string | null;
481
- id: string;
482
- icon: string;
483
- chainId: number;
484
- address: string;
485
- decimals: number;
486
- verified: boolean;
487
- isTest: boolean;
488
- } & {
489
- price?: number | null | undefined;
490
- };
454
+ rewardToken: Token;
491
455
  distributionChain: {
492
456
  name: string;
493
457
  id: number;