@merkl/api 0.10.132 → 0.10.134

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 (42) hide show
  1. package/dist/src/constants.d.ts +1 -0
  2. package/dist/src/constants.js +1 -0
  3. package/dist/src/eden/index.d.ts +98 -25
  4. package/dist/src/index.d.ts +36 -7
  5. package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicDataRefacto.js +4 -8
  6. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +3 -2
  7. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +11 -3
  8. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MaverickBPProcessor.d.ts +50 -0
  9. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MaverickBPProcessor.js +75 -0
  10. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +2 -0
  11. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1RefactoFinal.js +2 -0
  12. package/dist/src/modules/v4/enso/enso.service.d.ts +1 -0
  13. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +32 -0
  14. package/dist/src/modules/v4/opportunity/opportunity.controller.js +7 -2
  15. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +4 -0
  16. package/dist/src/modules/v4/opportunity/opportunity.model.js +3 -0
  17. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +3 -0
  18. package/dist/src/modules/v4/opportunity/opportunity.repository.js +10 -0
  19. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +4 -0
  20. package/dist/src/modules/v4/opportunity/opportunity.service.js +3 -0
  21. package/dist/src/modules/v4/participate/participate.controller.d.ts +1 -0
  22. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +3 -7
  23. package/dist/src/modules/v4/protocol/protocol.controller.js +4 -9
  24. package/dist/src/modules/v4/protocol/protocol.model.d.ts +2 -2
  25. package/dist/src/modules/v4/protocol/protocol.model.js +4 -1
  26. package/dist/src/modules/v4/protocol/protocol.service.js +4 -3
  27. package/dist/src/modules/v4/router.d.ts +36 -7
  28. package/dist/src/routes/v3/ERC20Campaigns.d.ts +36 -7
  29. package/dist/src/routes/v3/blacklist.d.ts +36 -7
  30. package/dist/src/routes/v3/campaigns.d.ts +36 -7
  31. package/dist/src/routes/v3/campaignsInfo.d.ts +36 -7
  32. package/dist/src/routes/v3/multiChainPositions.d.ts +36 -7
  33. package/dist/src/routes/v3/opportunity.d.ts +36 -7
  34. package/dist/src/routes/v3/positions.d.ts +36 -7
  35. package/dist/src/routes/v3/rewards.d.ts +36 -7
  36. package/dist/src/routes/v3/updates.d.ts +36 -7
  37. package/dist/src/routes/v3/userRewards.d.ts +36 -7
  38. package/dist/src/utils/decodeCalls.js +3 -1
  39. package/dist/src/utils/encodeCalls.js +7 -1
  40. package/dist/src/utils/generateCardName.js +2 -0
  41. package/dist/tsconfig.package.tsbuildinfo +1 -1
  42. package/package.json +2 -1
@@ -458,6 +458,38 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
458
458
  };
459
459
  };
460
460
  };
461
+ } & {
462
+ opportunities: {
463
+ aggregate: {
464
+ ":field": {
465
+ get: {
466
+ body: unknown;
467
+ params: {
468
+ field: never;
469
+ };
470
+ query: {
471
+ sort?: undefined;
472
+ name?: string | undefined;
473
+ tokens?: string | undefined;
474
+ status?: string | undefined;
475
+ items?: number | undefined;
476
+ tags?: string | undefined;
477
+ chainId?: string | undefined;
478
+ page?: number | undefined;
479
+ action?: string | undefined;
480
+ mainProtocolId?: string | undefined;
481
+ order?: undefined;
482
+ };
483
+ headers: unknown;
484
+ response: {
485
+ 200: {
486
+ sum: File;
487
+ };
488
+ };
489
+ };
490
+ };
491
+ };
492
+ };
461
493
  };
462
494
  } & {
463
495
  v4: {
@@ -662,6 +694,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
662
694
  name: string;
663
695
  url: string;
664
696
  description: string;
697
+ id: string;
665
698
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
666
699
  icon: string;
667
700
  } | null;
@@ -688,6 +721,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
688
721
  name: string;
689
722
  url: string;
690
723
  description: string;
724
+ id: string;
691
725
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
692
726
  icon: string;
693
727
  } & {})[] | null;
@@ -701,13 +735,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
701
735
  get: {
702
736
  body: unknown;
703
737
  params: {};
704
- query: {
705
- name?: string | undefined;
706
- id?: string[] | undefined;
707
- items?: number | undefined;
708
- tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
709
- page?: number | undefined;
710
- };
738
+ query: unknown;
711
739
  headers: unknown;
712
740
  response: {
713
741
  200: number;
@@ -1787,6 +1815,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1787
1815
  name: string;
1788
1816
  url: string;
1789
1817
  description: string;
1818
+ id: string;
1790
1819
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
1791
1820
  icon: string;
1792
1821
  } & {})[] | null;
@@ -459,6 +459,38 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
459
459
  };
460
460
  };
461
461
  };
462
+ } & {
463
+ opportunities: {
464
+ aggregate: {
465
+ ":field": {
466
+ get: {
467
+ body: unknown;
468
+ params: {
469
+ field: never;
470
+ };
471
+ query: {
472
+ sort?: undefined;
473
+ name?: string | undefined;
474
+ tokens?: string | undefined;
475
+ status?: string | undefined;
476
+ items?: number | undefined;
477
+ tags?: string | undefined;
478
+ chainId?: string | undefined;
479
+ page?: number | undefined;
480
+ action?: string | undefined;
481
+ mainProtocolId?: string | undefined;
482
+ order?: undefined;
483
+ };
484
+ headers: unknown;
485
+ response: {
486
+ 200: {
487
+ sum: File;
488
+ };
489
+ };
490
+ };
491
+ };
492
+ };
493
+ };
462
494
  };
463
495
  } & {
464
496
  v4: {
@@ -663,6 +695,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
663
695
  name: string;
664
696
  url: string;
665
697
  description: string;
698
+ id: string;
666
699
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
667
700
  icon: string;
668
701
  } | null;
@@ -689,6 +722,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
689
722
  name: string;
690
723
  url: string;
691
724
  description: string;
725
+ id: string;
692
726
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
693
727
  icon: string;
694
728
  } & {})[] | null;
@@ -702,13 +736,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
702
736
  get: {
703
737
  body: unknown;
704
738
  params: {};
705
- query: {
706
- name?: string | undefined;
707
- id?: string[] | undefined;
708
- items?: number | undefined;
709
- tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
710
- page?: number | undefined;
711
- };
739
+ query: unknown;
712
740
  headers: unknown;
713
741
  response: {
714
742
  200: number;
@@ -1788,6 +1816,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1788
1816
  name: string;
1789
1817
  url: string;
1790
1818
  description: string;
1819
+ id: string;
1791
1820
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
1792
1821
  icon: string;
1793
1822
  } & {})[] | null;
@@ -441,6 +441,38 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
441
441
  };
442
442
  };
443
443
  };
444
+ } & {
445
+ opportunities: {
446
+ aggregate: {
447
+ ":field": {
448
+ get: {
449
+ body: unknown;
450
+ params: {
451
+ field: never;
452
+ };
453
+ query: {
454
+ sort?: undefined;
455
+ name?: string | undefined;
456
+ tokens?: string | undefined;
457
+ status?: string | undefined;
458
+ items?: number | undefined;
459
+ tags?: string | undefined;
460
+ chainId?: string | undefined;
461
+ page?: number | undefined;
462
+ action?: string | undefined;
463
+ mainProtocolId?: string | undefined;
464
+ order?: undefined;
465
+ };
466
+ headers: unknown;
467
+ response: {
468
+ 200: {
469
+ sum: File;
470
+ };
471
+ };
472
+ };
473
+ };
474
+ };
475
+ };
444
476
  };
445
477
  } & {
446
478
  v4: {
@@ -645,6 +677,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
645
677
  name: string;
646
678
  url: string;
647
679
  description: string;
680
+ id: string;
648
681
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
649
682
  icon: string;
650
683
  } | null;
@@ -671,6 +704,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
671
704
  name: string;
672
705
  url: string;
673
706
  description: string;
707
+ id: string;
674
708
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
675
709
  icon: string;
676
710
  } & {})[] | null;
@@ -684,13 +718,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
684
718
  get: {
685
719
  body: unknown;
686
720
  params: {};
687
- query: {
688
- name?: string | undefined;
689
- id?: string[] | undefined;
690
- items?: number | undefined;
691
- tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
692
- page?: number | undefined;
693
- };
721
+ query: unknown;
694
722
  headers: unknown;
695
723
  response: {
696
724
  200: number;
@@ -1770,6 +1798,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1770
1798
  name: string;
1771
1799
  url: string;
1772
1800
  description: string;
1801
+ id: string;
1773
1802
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
1774
1803
  icon: string;
1775
1804
  } & {})[] | null;
@@ -442,6 +442,38 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
442
442
  };
443
443
  };
444
444
  };
445
+ } & {
446
+ opportunities: {
447
+ aggregate: {
448
+ ":field": {
449
+ get: {
450
+ body: unknown;
451
+ params: {
452
+ field: never;
453
+ };
454
+ query: {
455
+ sort?: undefined;
456
+ name?: string | undefined;
457
+ tokens?: string | undefined;
458
+ status?: string | undefined;
459
+ items?: number | undefined;
460
+ tags?: string | undefined;
461
+ chainId?: string | undefined;
462
+ page?: number | undefined;
463
+ action?: string | undefined;
464
+ mainProtocolId?: string | undefined;
465
+ order?: undefined;
466
+ };
467
+ headers: unknown;
468
+ response: {
469
+ 200: {
470
+ sum: File;
471
+ };
472
+ };
473
+ };
474
+ };
475
+ };
476
+ };
445
477
  };
446
478
  } & {
447
479
  v4: {
@@ -646,6 +678,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
646
678
  name: string;
647
679
  url: string;
648
680
  description: string;
681
+ id: string;
649
682
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
650
683
  icon: string;
651
684
  } | null;
@@ -672,6 +705,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
672
705
  name: string;
673
706
  url: string;
674
707
  description: string;
708
+ id: string;
675
709
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
676
710
  icon: string;
677
711
  } & {})[] | null;
@@ -685,13 +719,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
685
719
  get: {
686
720
  body: unknown;
687
721
  params: {};
688
- query: {
689
- name?: string | undefined;
690
- id?: string[] | undefined;
691
- items?: number | undefined;
692
- tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
693
- page?: number | undefined;
694
- };
722
+ query: unknown;
695
723
  headers: unknown;
696
724
  response: {
697
725
  200: number;
@@ -1771,6 +1799,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1771
1799
  name: string;
1772
1800
  url: string;
1773
1801
  description: string;
1802
+ id: string;
1774
1803
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
1775
1804
  icon: string;
1776
1805
  } & {})[] | null;
@@ -444,6 +444,38 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
444
444
  };
445
445
  };
446
446
  };
447
+ } & {
448
+ opportunities: {
449
+ aggregate: {
450
+ ":field": {
451
+ get: {
452
+ body: unknown;
453
+ params: {
454
+ field: never;
455
+ };
456
+ query: {
457
+ sort?: undefined;
458
+ name?: string | undefined;
459
+ tokens?: string | undefined;
460
+ status?: string | undefined;
461
+ items?: number | undefined;
462
+ tags?: string | undefined;
463
+ chainId?: string | undefined;
464
+ page?: number | undefined;
465
+ action?: string | undefined;
466
+ mainProtocolId?: string | undefined;
467
+ order?: undefined;
468
+ };
469
+ headers: unknown;
470
+ response: {
471
+ 200: {
472
+ sum: File;
473
+ };
474
+ };
475
+ };
476
+ };
477
+ };
478
+ };
447
479
  };
448
480
  } & {
449
481
  v4: {
@@ -648,6 +680,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
648
680
  name: string;
649
681
  url: string;
650
682
  description: string;
683
+ id: string;
651
684
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
652
685
  icon: string;
653
686
  } | null;
@@ -674,6 +707,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
674
707
  name: string;
675
708
  url: string;
676
709
  description: string;
710
+ id: string;
677
711
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
678
712
  icon: string;
679
713
  } & {})[] | null;
@@ -687,13 +721,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
687
721
  get: {
688
722
  body: unknown;
689
723
  params: {};
690
- query: {
691
- name?: string | undefined;
692
- id?: string[] | undefined;
693
- items?: number | undefined;
694
- tags?: ("AMM" | "ALM" | "DEX" | "LENDING")[] | undefined;
695
- page?: number | undefined;
696
- };
724
+ query: unknown;
697
725
  headers: unknown;
698
726
  response: {
699
727
  200: number;
@@ -1773,6 +1801,7 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
1773
1801
  name: string;
1774
1802
  url: string;
1775
1803
  description: string;
1804
+ id: string;
1776
1805
  tags: import("../../../database/api/.generated").$Enums.ProtocolTag[];
1777
1806
  icon: string;
1778
1807
  } & {})[] | null;
@@ -1,4 +1,4 @@
1
- import { AaveInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CompoundInterface, CurveInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, RadiantInterface, RfxInterface, SturdyInterface, TorosInterface, UniswapV2PoolInterface, } from "@sdk";
1
+ import { AaveInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CompoundInterface, CurveInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, RadiantInterface, RfxInterface, SturdyInterface, TorosInterface, UniswapV2PoolInterface, } from "@sdk";
2
2
  import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
3
3
  export function decodeCall(calls, index, key, type) {
4
4
  const returnData = calls[index];
@@ -164,6 +164,8 @@ export function decodeCall(calls, index, key, type) {
164
164
  return PendleInterface.decodeFunctionResult("readTokens", returnData)[0];
165
165
  case "readTokens2":
166
166
  return PendleInterface.decodeFunctionResult("readTokens", returnData)[2];
167
+ case "boostedPositionInformation":
168
+ return MaverickBPLensInterface.decodeFunctionResult("boostedPositionInformation", returnData)[0];
167
169
  default:
168
170
  throw new Error(`Key not recognized for ${key}`);
169
171
  }
@@ -1,5 +1,5 @@
1
1
  import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
2
- import { AaveInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CompoundInterface, CurveInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, RadiantInterface, RfxDatastoreInterface, SturdyInterface, TorosInterface, UniswapV2PoolInterface, } from "@sdk";
2
+ import { AaveInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CompoundInterface, CurveInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, RadiantInterface, RfxDatastoreInterface, SturdyInterface, TorosInterface, UniswapV2PoolInterface, } from "@sdk";
3
3
  import { fluidInterface } from "src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1";
4
4
  export function createCall(target, key, type, metaData) {
5
5
  switch (key) {
@@ -234,6 +234,12 @@ export function createCall(target, key, type, metaData) {
234
234
  callData: PendleInterface.encodeFunctionData("readTokens"),
235
235
  target: target,
236
236
  };
237
+ case "boostedPositionInformation":
238
+ return {
239
+ allowFailure: true,
240
+ callData: MaverickBPLensInterface.encodeFunctionData("boostedPositionInformation", [metaData]),
241
+ target: target,
242
+ };
237
243
  default:
238
244
  throw new Error(`Unknown key ${key}`);
239
245
  }
@@ -83,6 +83,8 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
83
83
  return `Stake ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.protocol}`;
84
84
  case tokenType.woofi:
85
85
  return `Supercharge ${typeInfo.symbolUnderlying} on ${typeInfo.protocol}`;
86
+ case tokenType.maverickBoostedPosition:
87
+ return `Hold or stake Maverick Boosted Position ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.protocol}`;
86
88
  default:
87
89
  return `Hold ${typeInfo.name} (${campaign.campaignParameters.symbolTargetToken})`;
88
90
  }