@merkl/api 0.21.1 → 0.21.3

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 (35) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +17 -0
  2. package/dist/database/api/.generated/drizzle/schema.js +2 -1
  3. package/dist/database/api/.generated/drizzle/schema.ts +2 -1
  4. package/dist/database/api/.generated/edge.js +5 -4
  5. package/dist/database/api/.generated/index-browser.js +2 -1
  6. package/dist/database/api/.generated/index.d.ts +79 -2
  7. package/dist/database/api/.generated/index.js +5 -4
  8. package/dist/database/api/.generated/package.json +1 -1
  9. package/dist/database/api/.generated/schema.prisma +5 -4
  10. package/dist/database/api/.generated/wasm.js +2 -1
  11. package/dist/src/eden/index.d.ts +81 -0
  12. package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/processorMapping.js +1 -0
  13. package/dist/src/engine/deprecated/erc20SubTypeProcessors/subtypesRound1.js +3 -1
  14. package/dist/src/engine/deprecated/erc20SubTypeProcessors/tokenTypeToProtocolAndAction.js +4 -0
  15. package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +1 -0
  16. package/dist/src/engine/implementations/Erc20/subTypes/index.js +1 -0
  17. package/dist/src/index.d.ts +33 -0
  18. package/dist/src/jobs/reward-breakdowns.js +1 -1
  19. package/dist/src/modules/v4/creator/creator.controller.d.ts +32 -0
  20. package/dist/src/modules/v4/creator/creator.controller.js +7 -1
  21. package/dist/src/modules/v4/creator/creator.model.d.ts +6 -0
  22. package/dist/src/modules/v4/creator/creator.model.js +4 -0
  23. package/dist/src/modules/v4/creator/creator.repository.d.ts +11 -0
  24. package/dist/src/modules/v4/creator/creator.repository.js +3 -0
  25. package/dist/src/modules/v4/creator/creator.service.d.ts +11 -1
  26. package/dist/src/modules/v4/creator/creator.service.js +3 -0
  27. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +3 -0
  28. package/dist/src/modules/v4/programPayload/programPayload.repository.js +21 -0
  29. package/dist/src/modules/v4/router.d.ts +33 -0
  30. package/dist/src/modules/v4/user/user.controller.d.ts +1 -0
  31. package/dist/src/utils/decodeCalls.js +1 -0
  32. package/dist/src/utils/encodeCalls.js +1 -0
  33. package/dist/src/utils/generateCardName.js +1 -0
  34. package/dist/tsconfig.package.tsbuildinfo +1 -1
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-24907169b43f344bde6ac20175605e498a6fb5eda95173ac3ce0f4aabbd74a8a",
2
+ "name": "prisma-client-6cac236bc33c091ad7bbf269867a230554156600fd1cccb97855a48ad1719a85",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -280,10 +280,11 @@ model User {
280
280
  }
281
281
 
282
282
  model Creator {
283
- id String @id
284
- icon String?
285
- name String
286
- Users User[]
283
+ id String @id
284
+ icon String?
285
+ name String
286
+ rebateFee Int @default(0)
287
+ Users User[]
287
288
  }
288
289
 
289
290
  model Reward {
@@ -281,7 +281,8 @@ exports.Prisma.UserScalarFieldEnum = {
281
281
  exports.Prisma.CreatorScalarFieldEnum = {
282
282
  id: 'id',
283
283
  icon: 'icon',
284
- name: 'name'
284
+ name: 'name',
285
+ rebateFee: 'rebateFee'
285
286
  };
286
287
 
287
288
  exports.Prisma.RewardScalarFieldEnum = {
@@ -3354,6 +3354,7 @@ declare const eden: {
3354
3354
  id: string;
3355
3355
  addresses: string[];
3356
3356
  icon?: string | undefined;
3357
+ rebateFee?: number | undefined;
3357
3358
  } | null;
3358
3359
  }>>;
3359
3360
  };
@@ -4510,6 +4511,7 @@ declare const eden: {
4510
4511
  id: string;
4511
4512
  addresses: string[];
4512
4513
  icon?: string | undefined;
4514
+ rebateFee?: number | undefined;
4513
4515
  };
4514
4516
  }>>;
4515
4517
  patch: (body: {
@@ -4527,8 +4529,27 @@ declare const eden: {
4527
4529
  name: string;
4528
4530
  id: string;
4529
4531
  icon: string | null;
4532
+ rebateFee: number;
4530
4533
  };
4531
4534
  }>>;
4535
+ rebate: {
4536
+ patch: (body: {
4537
+ rebate: number;
4538
+ }, options: {
4539
+ headers: {
4540
+ authorization: string;
4541
+ };
4542
+ query?: Record<string, unknown> | undefined;
4543
+ fetch?: RequestInit | undefined;
4544
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
4545
+ 200: {
4546
+ name: string;
4547
+ id: string;
4548
+ icon: string | null;
4549
+ rebateFee: number;
4550
+ };
4551
+ }>>;
4552
+ };
4532
4553
  }) & {
4533
4554
  index: {
4534
4555
  get: (options: {
@@ -4546,10 +4567,12 @@ declare const eden: {
4546
4567
  addresses: string[];
4547
4568
  } & {
4548
4569
  icon?: string | undefined;
4570
+ rebateFee?: number | undefined;
4549
4571
  })[];
4550
4572
  }>>;
4551
4573
  post: (body: {
4552
4574
  icon?: string | undefined;
4575
+ rebateFee?: number | undefined;
4553
4576
  name: string;
4554
4577
  id: string;
4555
4578
  addresses: string[];
@@ -4564,6 +4587,7 @@ declare const eden: {
4564
4587
  name: string;
4565
4588
  id: string;
4566
4589
  icon: string | null;
4590
+ rebateFee: number;
4567
4591
  };
4568
4592
  }>>;
4569
4593
  };
@@ -9493,6 +9517,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
9493
9517
  id: string;
9494
9518
  addresses: string[];
9495
9519
  icon?: string | undefined;
9520
+ rebateFee?: number | undefined;
9496
9521
  } | null;
9497
9522
  };
9498
9523
  };
@@ -10900,6 +10925,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
10900
10925
  addresses: string[];
10901
10926
  } & {
10902
10927
  icon?: string | undefined;
10928
+ rebateFee?: number | undefined;
10903
10929
  })[];
10904
10930
  };
10905
10931
  };
@@ -10921,6 +10947,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
10921
10947
  id: string;
10922
10948
  addresses: string[];
10923
10949
  icon?: string | undefined;
10950
+ rebateFee?: number | undefined;
10924
10951
  };
10925
10952
  };
10926
10953
  };
@@ -10932,6 +10959,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
10932
10959
  post: {
10933
10960
  body: {
10934
10961
  icon?: string | undefined;
10962
+ rebateFee?: number | undefined;
10935
10963
  name: string;
10936
10964
  id: string;
10937
10965
  addresses: string[];
@@ -10946,6 +10974,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
10946
10974
  name: string;
10947
10975
  id: string;
10948
10976
  icon: string | null;
10977
+ rebateFee: number;
10949
10978
  };
10950
10979
  };
10951
10980
  };
@@ -10972,6 +11001,34 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
10972
11001
  name: string;
10973
11002
  id: string;
10974
11003
  icon: string | null;
11004
+ rebateFee: number;
11005
+ };
11006
+ };
11007
+ };
11008
+ };
11009
+ };
11010
+ } & {
11011
+ creators: {
11012
+ ":id": {
11013
+ rebate: {
11014
+ patch: {
11015
+ body: {
11016
+ rebate: number;
11017
+ };
11018
+ params: {
11019
+ id: string;
11020
+ };
11021
+ query: unknown;
11022
+ headers: {
11023
+ authorization: string;
11024
+ };
11025
+ response: {
11026
+ 200: {
11027
+ name: string;
11028
+ id: string;
11029
+ icon: string | null;
11030
+ rebateFee: number;
11031
+ };
10975
11032
  };
10976
11033
  };
10977
11034
  };
@@ -15405,6 +15462,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
15405
15462
  id: string;
15406
15463
  addresses: string[];
15407
15464
  icon?: string | undefined;
15465
+ rebateFee?: number | undefined;
15408
15466
  } | null;
15409
15467
  }>>;
15410
15468
  };
@@ -16561,6 +16619,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16561
16619
  id: string;
16562
16620
  addresses: string[];
16563
16621
  icon?: string | undefined;
16622
+ rebateFee?: number | undefined;
16564
16623
  };
16565
16624
  }>>;
16566
16625
  patch: (body: {
@@ -16578,8 +16637,27 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16578
16637
  name: string;
16579
16638
  id: string;
16580
16639
  icon: string | null;
16640
+ rebateFee: number;
16581
16641
  };
16582
16642
  }>>;
16643
+ rebate: {
16644
+ patch: (body: {
16645
+ rebate: number;
16646
+ }, options: {
16647
+ headers: {
16648
+ authorization: string;
16649
+ };
16650
+ query?: Record<string, unknown> | undefined;
16651
+ fetch?: RequestInit | undefined;
16652
+ }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
16653
+ 200: {
16654
+ name: string;
16655
+ id: string;
16656
+ icon: string | null;
16657
+ rebateFee: number;
16658
+ };
16659
+ }>>;
16660
+ };
16583
16661
  }) & {
16584
16662
  index: {
16585
16663
  get: (options: {
@@ -16597,10 +16675,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16597
16675
  addresses: string[];
16598
16676
  } & {
16599
16677
  icon?: string | undefined;
16678
+ rebateFee?: number | undefined;
16600
16679
  })[];
16601
16680
  }>>;
16602
16681
  post: (body: {
16603
16682
  icon?: string | undefined;
16683
+ rebateFee?: number | undefined;
16604
16684
  name: string;
16605
16685
  id: string;
16606
16686
  addresses: string[];
@@ -16615,6 +16695,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
16615
16695
  name: string;
16616
16696
  id: string;
16617
16697
  icon: string | null;
16698
+ rebateFee: number;
16618
16699
  };
16619
16700
  }>>;
16620
16701
  };
@@ -150,4 +150,5 @@ export const processorMapping = {
150
150
  [Erc20SubType.sake_lending]: AaveProcessor,
151
151
  [Erc20SubType.gamma]: GammaALMProcessor,
152
152
  [Erc20SubType.stability]: StabilityProcessor,
153
+ [Erc20SubType.stability_lending]: AaveProcessor,
153
154
  };
@@ -169,8 +169,10 @@ function satisfiesNameConditions(name, type) {
169
169
  return lowerCaseName.includes("sake soneium");
170
170
  case Erc20SubType.sake_borrowing:
171
171
  return lowerCaseName.includes("sake soneium") && lowerCaseName.includes("debt");
172
+ case Erc20SubType.stability_lending:
173
+ return lowerCaseName.startsWith("stability market");
172
174
  case Erc20SubType.stability:
173
- return lowerCaseName.startsWith("stability");
175
+ return lowerCaseName.startsWith("stability") && !lowerCaseName.startsWith("stability market");
174
176
  default:
175
177
  return false;
176
178
  }
@@ -97,6 +97,10 @@ export const tokenTypeToProtocolAndAction = {
97
97
  protocol: "stability",
98
98
  action: OpportunityAction.HOLD,
99
99
  },
100
+ [Erc20SubType.stability_lending]: {
101
+ protocol: "stability",
102
+ action: OpportunityAction.LEND,
103
+ },
100
104
  [Erc20SubType.bunniV2]: {
101
105
  protocol: "bunni",
102
106
  action: OpportunityAction.HOLD,
@@ -107,6 +107,7 @@ export declare enum Erc20SubType {
107
107
  sake_lending = "sake_lending",
108
108
  gamma = "gamma",
109
109
  stability = "stability",
110
+ stability_lending = "stability_lending",
110
111
  lendle_vaults = "lendle_vaults",
111
112
  termmax = "termmax"
112
113
  }
@@ -106,6 +106,7 @@ export var Erc20SubType;
106
106
  Erc20SubType["sake_lending"] = "sake_lending";
107
107
  Erc20SubType["gamma"] = "gamma";
108
108
  Erc20SubType["stability"] = "stability";
109
+ Erc20SubType["stability_lending"] = "stability_lending";
109
110
  Erc20SubType["lendle_vaults"] = "lendle_vaults";
110
111
  Erc20SubType["termmax"] = "termmax";
111
112
  })(Erc20SubType || (Erc20SubType = {}));
@@ -4099,6 +4099,7 @@ declare const app: Elysia<"", false, {
4099
4099
  id: string;
4100
4100
  addresses: string[];
4101
4101
  icon?: string | undefined;
4102
+ rebateFee?: number | undefined;
4102
4103
  } | null;
4103
4104
  };
4104
4105
  };
@@ -5506,6 +5507,7 @@ declare const app: Elysia<"", false, {
5506
5507
  addresses: string[];
5507
5508
  } & {
5508
5509
  icon?: string | undefined;
5510
+ rebateFee?: number | undefined;
5509
5511
  })[];
5510
5512
  };
5511
5513
  };
@@ -5527,6 +5529,7 @@ declare const app: Elysia<"", false, {
5527
5529
  id: string;
5528
5530
  addresses: string[];
5529
5531
  icon?: string | undefined;
5532
+ rebateFee?: number | undefined;
5530
5533
  };
5531
5534
  };
5532
5535
  };
@@ -5538,6 +5541,7 @@ declare const app: Elysia<"", false, {
5538
5541
  post: {
5539
5542
  body: {
5540
5543
  icon?: string | undefined;
5544
+ rebateFee?: number | undefined;
5541
5545
  name: string;
5542
5546
  id: string;
5543
5547
  addresses: string[];
@@ -5552,6 +5556,7 @@ declare const app: Elysia<"", false, {
5552
5556
  name: string;
5553
5557
  id: string;
5554
5558
  icon: string | null;
5559
+ rebateFee: number;
5555
5560
  };
5556
5561
  };
5557
5562
  };
@@ -5578,6 +5583,34 @@ declare const app: Elysia<"", false, {
5578
5583
  name: string;
5579
5584
  id: string;
5580
5585
  icon: string | null;
5586
+ rebateFee: number;
5587
+ };
5588
+ };
5589
+ };
5590
+ };
5591
+ };
5592
+ } & {
5593
+ creators: {
5594
+ ":id": {
5595
+ rebate: {
5596
+ patch: {
5597
+ body: {
5598
+ rebate: number;
5599
+ };
5600
+ params: {
5601
+ id: string;
5602
+ };
5603
+ query: unknown;
5604
+ headers: {
5605
+ authorization: string;
5606
+ };
5607
+ response: {
5608
+ 200: {
5609
+ name: string;
5610
+ id: string;
5611
+ icon: string | null;
5612
+ rebateFee: number;
5613
+ };
5581
5614
  };
5582
5615
  };
5583
5616
  };
@@ -85,7 +85,7 @@ const load = async (rewardBreakdowns, skipSubCampaignReasons = false) => {
85
85
  if (!skipSubCampaignReasons && breakdown.reason.includes("~")) {
86
86
  // subcampaign reason will have the form <campaignId>_<protocol>_<reason> outputted by the processor>
87
87
  const subcampaignReason = breakdown.reason.split("~")[breakdown.reason.split("~").length - 1];
88
- breakdown.reason = subcampaignReason.split("_").slice(2).join("_");
88
+ breakdown.reason = subcampaignReason.split("_")[2];
89
89
  breakdown.subCampaignId = subcampaignReason.split("_")[0];
90
90
  }
91
91
  return {
@@ -30,6 +30,7 @@ export declare const CreatorController: Elysia<"/creators", false, {
30
30
  addresses: string[];
31
31
  } & {
32
32
  icon?: string | undefined;
33
+ rebateFee?: number | undefined;
33
34
  })[];
34
35
  };
35
36
  };
@@ -51,6 +52,7 @@ export declare const CreatorController: Elysia<"/creators", false, {
51
52
  id: string;
52
53
  addresses: string[];
53
54
  icon?: string | undefined;
55
+ rebateFee?: number | undefined;
54
56
  };
55
57
  };
56
58
  };
@@ -62,6 +64,7 @@ export declare const CreatorController: Elysia<"/creators", false, {
62
64
  post: {
63
65
  body: {
64
66
  icon?: string | undefined;
67
+ rebateFee?: number | undefined;
65
68
  name: string;
66
69
  id: string;
67
70
  addresses: string[];
@@ -76,6 +79,7 @@ export declare const CreatorController: Elysia<"/creators", false, {
76
79
  name: string;
77
80
  id: string;
78
81
  icon: string | null;
82
+ rebateFee: number;
79
83
  };
80
84
  };
81
85
  };
@@ -102,6 +106,34 @@ export declare const CreatorController: Elysia<"/creators", false, {
102
106
  name: string;
103
107
  id: string;
104
108
  icon: string | null;
109
+ rebateFee: number;
110
+ };
111
+ };
112
+ };
113
+ };
114
+ };
115
+ } & {
116
+ creators: {
117
+ ":id": {
118
+ rebate: {
119
+ patch: {
120
+ body: {
121
+ rebate: number;
122
+ };
123
+ params: {
124
+ id: string;
125
+ };
126
+ query: unknown;
127
+ headers: {
128
+ authorization: string;
129
+ };
130
+ response: {
131
+ 200: {
132
+ name: string;
133
+ id: string;
134
+ icon: string | null;
135
+ rebateFee: number;
136
+ };
105
137
  };
106
138
  };
107
139
  };
@@ -1,7 +1,7 @@
1
1
  import { NotFoundError } from "@/errors";
2
2
  import { AuthorizationHeadersDto, BackOfficeGuard } from "@/guards/BackOffice.guard";
3
3
  import { Elysia } from "elysia";
4
- import { CreatorDto, GetManyCreatorQuery, UpdateCreatorDto } from "./creator.model";
4
+ import { CreatorDto, GetManyCreatorQuery, UpdateCreatorDto, UpdateCreatorRebateDto } from "./creator.model";
5
5
  import { CreatorService } from "./creator.service";
6
6
  // ─── Creators Controller ────────────────────────────────────────────────────────
7
7
  export const CreatorController = new Elysia({ prefix: "/creators", detail: { tags: ["Creator"] } })
@@ -27,4 +27,10 @@ export const CreatorController = new Elysia({ prefix: "/creators", detail: { tag
27
27
  headers: AuthorizationHeadersDto,
28
28
  body: UpdateCreatorDto,
29
29
  beforeHandle: BackOfficeGuard,
30
+ })
31
+ // ─── Update Creator's Rebate Fee ──────────────────────────────────────────────
32
+ .patch("/:id/rebate", async ({ params: { id }, body }) => CreatorService.updateRebate(id, body.rebate), {
33
+ headers: AuthorizationHeadersDto,
34
+ body: UpdateCreatorRebateDto,
35
+ beforeHandle: BackOfficeGuard,
30
36
  });
@@ -7,12 +7,14 @@ import type { Resource } from "@/modules/v4/prisma";
7
7
  export type Creator = Resource<"Creator", "icon", {
8
8
  icon?: string;
9
9
  addresses: string[];
10
+ rebateFee?: number;
10
11
  }>;
11
12
  export declare const CreatorDto: import("@sinclair/typebox").TObject<{
12
13
  addresses: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
13
14
  icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
14
15
  id: import("@sinclair/typebox").TString;
15
16
  name: import("@sinclair/typebox").TString;
17
+ rebateFee: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
16
18
  }>;
17
19
  export declare const GetManyCreatorQuery: import("@sinclair/typebox").TObject<{
18
20
  address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -24,6 +26,10 @@ export declare const UpdateCreatorDto: import("@sinclair/typebox").TObject<{
24
26
  icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
25
27
  name: import("@sinclair/typebox").TString;
26
28
  }>;
29
+ export declare const UpdateCreatorRebateDto: import("@sinclair/typebox").TObject<{
30
+ rebate: import("@sinclair/typebox").TNumber;
31
+ }>;
27
32
  export type CreatorModel = typeof CreatorDto.static;
28
33
  export type GetManyCreatorModel = typeof GetManyCreatorQuery.static;
29
34
  export type UpdateCreatorDto = typeof UpdateCreatorDto.static;
35
+ export type UpdateCreatorRebateDto = typeof UpdateCreatorRebateDto.static;
@@ -5,6 +5,7 @@ export const CreatorDto = t.Object({
5
5
  icon: t.Optional(t.String()),
6
6
  id: t.String(),
7
7
  name: t.String(),
8
+ rebateFee: t.Optional(t.Number({ maximum: 100, minimum: 0 })),
8
9
  });
9
10
  export const GetManyCreatorQuery = t.Object({
10
11
  address: t.Optional(t.String()),
@@ -16,3 +17,6 @@ export const UpdateCreatorDto = t.Object({
16
17
  icon: t.Optional(t.String()),
17
18
  name: t.String(),
18
19
  });
20
+ export const UpdateCreatorRebateDto = t.Object({
21
+ rebate: t.Number({ maximum: 100, minimum: 0 }),
22
+ });
@@ -10,11 +10,13 @@ export declare abstract class CreatorRepository {
10
10
  name: string;
11
11
  id: string;
12
12
  icon: string | null;
13
+ rebateFee: number;
13
14
  }) | null>;
14
15
  static findUniqueFromAddress(address: string): Promise<{
15
16
  name: string;
16
17
  id: string;
17
18
  icon: string | null;
19
+ rebateFee: number;
18
20
  } | null>;
19
21
  static findMany(query: GetManyCreatorModel): Promise<({
20
22
  Users: {
@@ -26,15 +28,24 @@ export declare abstract class CreatorRepository {
26
28
  name: string;
27
29
  id: string;
28
30
  icon: string | null;
31
+ rebateFee: number;
29
32
  })[]>;
30
33
  static create({ addresses, ...creator }: Creator["model"]): Promise<{
31
34
  name: string;
32
35
  id: string;
33
36
  icon: string | null;
37
+ rebateFee: number;
34
38
  }>;
35
39
  static update(id: Creator["model"]["id"], { addresses, ...creator }: UpdateCreatorDto): Promise<{
36
40
  name: string;
37
41
  id: string;
38
42
  icon: string | null;
43
+ rebateFee: number;
44
+ }>;
45
+ static updateRebate(id: Creator["model"]["id"], rebate: number): Promise<{
46
+ name: string;
47
+ id: string;
48
+ icon: string | null;
49
+ rebateFee: number;
39
50
  }>;
40
51
  }
@@ -60,4 +60,7 @@ export class CreatorRepository {
60
60
  },
61
61
  });
62
62
  }
63
+ static async updateRebate(id, rebate) {
64
+ return await apiDbClient.creator.update({ where: { id }, data: { rebateFee: rebate } });
65
+ }
63
66
  }
@@ -1,4 +1,4 @@
1
- import type { Creator, GetManyCreatorModel, UpdateCreatorDto } from "./creator.model";
1
+ import type { Creator, GetManyCreatorModel, UpdateCreatorDto, UpdateCreatorRebateDto } from "./creator.model";
2
2
  export declare abstract class CreatorService {
3
3
  /**
4
4
  * Format creator into its model
@@ -21,6 +21,7 @@ export declare abstract class CreatorService {
21
21
  name: string;
22
22
  id: string;
23
23
  icon: string | null;
24
+ rebateFee: number;
24
25
  }) | null>;
25
26
  /**
26
27
  * Finds many creator
@@ -37,6 +38,7 @@ export declare abstract class CreatorService {
37
38
  name: string;
38
39
  id: string;
39
40
  icon: string | null;
41
+ rebateFee: number;
40
42
  })[]>;
41
43
  /**
42
44
  * Creates a creator
@@ -46,6 +48,7 @@ export declare abstract class CreatorService {
46
48
  name: string;
47
49
  id: string;
48
50
  icon: string | null;
51
+ rebateFee: number;
49
52
  }>;
50
53
  /**
51
54
  * Updates data on a creator
@@ -57,5 +60,12 @@ export declare abstract class CreatorService {
57
60
  name: string;
58
61
  id: string;
59
62
  icon: string | null;
63
+ rebateFee: number;
64
+ }>;
65
+ static updateRebate(id: Creator["model"]["id"], rebate: UpdateCreatorRebateDto["rebate"]): Promise<{
66
+ name: string;
67
+ id: string;
68
+ icon: string | null;
69
+ rebateFee: number;
60
70
  }>;
61
71
  }
@@ -41,4 +41,7 @@ export class CreatorService {
41
41
  static async update(id, creator) {
42
42
  return await CreatorRepository.update(id, creator);
43
43
  }
44
+ static async updateRebate(id, rebate) {
45
+ return await CreatorRepository.updateRebate(id, rebate);
46
+ }
44
47
  }
@@ -545,6 +545,9 @@ export declare enum tacCampaigns {
545
545
  TAC_Supply_ylbfBTCtac = "TAC Supply ylbfBTC.tac 0x0d1862e73a1430A5FD3245B47859c1BEcD6f3A1D",
546
546
  TAC_Supply_uTAC = "TAC Supply uTAC++ 0xAF87B90E8a3035905697E07Bb813d2d59D2b0951"
547
547
  }
548
+ export declare enum HypurrFiCampaigns {
549
+ HypurrFi_Borrow_Pooled_USDXL = "HypurrFi Borrow Pooled USDXL 0xa0399Ff8F46Ce6C2Cfee05C5F67307C7F390a439"
550
+ }
548
551
  declare const AnglesInterfaceCampaigns: {
549
552
  "0x15E96CDecA34B9DE1B31586c1206206aDb92E69D": {
550
553
  campaignType: any;
@@ -621,6 +621,10 @@ export var tacCampaigns;
621
621
  tacCampaigns["TAC_Supply_ylbfBTCtac"] = "TAC Supply ylbfBTC.tac 0x0d1862e73a1430A5FD3245B47859c1BEcD6f3A1D";
622
622
  tacCampaigns["TAC_Supply_uTAC"] = "TAC Supply uTAC++ 0xAF87B90E8a3035905697E07Bb813d2d59D2b0951";
623
623
  })(tacCampaigns || (tacCampaigns = {}));
624
+ export var HypurrFiCampaigns;
625
+ (function (HypurrFiCampaigns) {
626
+ HypurrFiCampaigns["HypurrFi_Borrow_Pooled_USDXL"] = "HypurrFi Borrow Pooled USDXL 0xa0399Ff8F46Ce6C2Cfee05C5F67307C7F390a439";
627
+ })(HypurrFiCampaigns || (HypurrFiCampaigns = {}));
624
628
  const AnglesInterfaceCampaigns = {
625
629
  [anglesCampaigns.Angles_supply_in_angles_liquid]: {
626
630
  campaignType: Campaign.ERC20_FIX_APR,
@@ -6688,6 +6692,23 @@ const WorldChainInterfaceCampaigns = {
6688
6692
  },
6689
6693
  },
6690
6694
  };
6695
+ const HypurrFiInterfaceCampaigns = {
6696
+ [HypurrFiCampaigns.HypurrFi_Borrow_Pooled_USDXL]: {
6697
+ campaignType: Campaign.ERC20REBASEFIXAPR,
6698
+ computeChainId: ChainId.HYPEREVM,
6699
+ distributionChainId: ChainId.HYPEREVM,
6700
+ targetToken: "0xa0399Ff8F46Ce6C2Cfee05C5F67307C7F390a439",
6701
+ rewardToken: "0x05225a6416EDaeeC7227027E86F7A47D18A06b91",
6702
+ creator: "0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701",
6703
+ hooks: [],
6704
+ whitelist: [],
6705
+ blacklist: [],
6706
+ forwarders: [],
6707
+ rewardTokenPricing: false,
6708
+ targetTokenPricing: false,
6709
+ apr: "365",
6710
+ },
6711
+ };
6691
6712
  export const MerklInterfaceCampaigns = {
6692
6713
  [program.Puffer]: PufferInterfaceCampaigns,
6693
6714
  [program.ZkSync]: ZkSyncInterfaceCampaigns,