@merkl/api 0.20.48 → 0.20.49

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 (31) hide show
  1. package/dist/database/api/.generated/drizzle/schema.d.ts +17 -0
  2. package/dist/database/api/.generated/drizzle/schema.js +1 -0
  3. package/dist/database/api/.generated/drizzle/schema.ts +1 -0
  4. package/dist/database/api/.generated/edge.js +4 -3
  5. package/dist/database/api/.generated/index-browser.js +9 -0
  6. package/dist/database/api/.generated/index.d.ts +133 -1
  7. package/dist/database/api/.generated/index.js +4 -3
  8. package/dist/database/api/.generated/package.json +1 -1
  9. package/dist/database/api/.generated/schema.prisma +1 -1
  10. package/dist/database/api/.generated/wasm.js +9 -0
  11. package/dist/src/eden/index.d.ts +430 -10
  12. package/dist/src/index.d.ts +98 -2
  13. package/dist/src/libs/tokens/balances.js +2 -1
  14. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +93 -1
  15. package/dist/src/modules/v4/campaign/campaign.controller.js +23 -2
  16. package/dist/src/modules/v4/campaign/campaign.model.d.ts +15 -0
  17. package/dist/src/modules/v4/campaign/campaign.model.js +14 -0
  18. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +8 -0
  19. package/dist/src/modules/v4/campaign/campaign.service.d.ts +28 -1
  20. package/dist/src/modules/v4/campaign/campaign.service.js +35 -0
  21. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +4 -0
  22. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +14 -0
  23. package/dist/src/modules/v4/opportunity/opportunity.model.js +2 -1
  24. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +5 -0
  25. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +5 -0
  26. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1 -1
  27. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +1 -0
  28. package/dist/src/modules/v4/reward/reward.service.d.ts +1 -0
  29. package/dist/src/modules/v4/router.d.ts +98 -2
  30. package/dist/tsconfig.package.tsbuildinfo +1 -1
  31. package/package.json +1 -1
@@ -331,6 +331,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
331
331
  computeChainId: number;
332
332
  distributionChainId: number;
333
333
  campaignId: string;
334
+ distributionType: import("@db/api").$Enums.DistributionType;
334
335
  rewardTokenId: string;
335
336
  amount: string;
336
337
  opportunityId: string;
@@ -438,6 +439,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
438
439
  tags: string[];
439
440
  icon: string;
440
441
  } | null | undefined;
442
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
441
443
  depositUrl?: string | undefined;
442
444
  explorerAddress?: string | undefined;
443
445
  aprRecord?: {
@@ -569,6 +571,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
569
571
  tags: string[];
570
572
  icon: string;
571
573
  } | null | undefined;
574
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
572
575
  depositUrl?: string | undefined;
573
576
  explorerAddress?: string | undefined;
574
577
  aprRecord?: {
@@ -734,6 +737,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
734
737
  tags: string[];
735
738
  icon: string;
736
739
  } | null | undefined;
740
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
737
741
  depositUrl?: string | undefined;
738
742
  explorerAddress?: string | undefined;
739
743
  aprRecord?: {
@@ -42,6 +42,13 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
42
42
  dailyRewards: import("@sinclair/typebox").TNumber;
43
43
  depositUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
44
44
  explorerAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
45
+ distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
46
+ DUTCH_AUCTION: "DUTCH_AUCTION";
47
+ FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
48
+ FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
49
+ FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
50
+ FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
51
+ }>>;
45
52
  tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
46
53
  id: import("@sinclair/typebox").TString;
47
54
  tokens: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
@@ -156,6 +163,13 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
156
163
  icon: import("@sinclair/typebox").TString;
157
164
  }>;
158
165
  action: import("@sinclair/typebox").TString;
166
+ distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
167
+ DUTCH_AUCTION: "DUTCH_AUCTION";
168
+ FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
169
+ FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
170
+ FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
171
+ FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
172
+ }>>;
159
173
  chainId: import("@sinclair/typebox").TNumber;
160
174
  depositUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
161
175
  explorerAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -4,7 +4,7 @@ import { ProtocolResourceDto } from "@/modules/v4/protocol/protocol.model";
4
4
  import { DailyRewardsRecordResourceDto } from "@/modules/v4/reward/reward.model";
5
5
  import { TokenDto, TokenResourceDto } from "@/modules/v4/token/token.model";
6
6
  import { TvlRecordResourceDto } from "@/modules/v4/tvl/tvl.model";
7
- import { OpportunityAction, OpportunityManualOverride, Status } from "@db/api";
7
+ import { DistributionType, OpportunityAction, OpportunityManualOverride, Status } from "@db/api";
8
8
  import { t } from "elysia";
9
9
  import { ChainResourceDto } from "../chain/chain.model";
10
10
  // ─── DTOs ────────────────────────────────────────────────────────────────────
@@ -20,6 +20,7 @@ export const OpportunityResourceDto = t.Object({
20
20
  dailyRewards: t.Number(),
21
21
  depositUrl: t.Optional(t.String()),
22
22
  explorerAddress: t.Optional(t.String()),
23
+ distributionType: t.Optional(t.Enum(DistributionType)),
23
24
  tags: t.Array(t.String()),
24
25
  id: t.String(),
25
26
  tokens: t.Array(TokenResourceDto),
@@ -56,6 +56,7 @@ export declare abstract class OpportunityRepository {
56
56
  computeChainId: number;
57
57
  distributionChainId: number;
58
58
  campaignId: string;
59
+ distributionType: import("@db/api").$Enums.DistributionType;
59
60
  rewardTokenId: string;
60
61
  amount: string;
61
62
  opportunityId: string;
@@ -197,6 +198,7 @@ export declare abstract class OpportunityRepository {
197
198
  computeChainId: number;
198
199
  distributionChainId: number;
199
200
  campaignId: string;
201
+ distributionType: import("@db/api").$Enums.DistributionType;
200
202
  rewardTokenId: string;
201
203
  amount: string;
202
204
  opportunityId: string;
@@ -396,6 +398,7 @@ export declare abstract class OpportunityRepository {
396
398
  computeChainId: number;
397
399
  distributionChainId: number;
398
400
  campaignId: string;
401
+ distributionType: import("@db/api").$Enums.DistributionType;
399
402
  rewardTokenId: string;
400
403
  amount: string;
401
404
  opportunityId: string;
@@ -544,6 +547,7 @@ export declare abstract class OpportunityRepository {
544
547
  computeChainId: number;
545
548
  distributionChainId: number;
546
549
  campaignId: string;
550
+ distributionType: import("@db/api").$Enums.DistributionType;
547
551
  rewardTokenId: string;
548
552
  amount: string;
549
553
  opportunityId: string;
@@ -744,6 +748,7 @@ export declare abstract class OpportunityRepository {
744
748
  computeChainId: number;
745
749
  distributionChainId: number;
746
750
  campaignId: string;
751
+ distributionType: import("@db/api").$Enums.DistributionType;
747
752
  rewardTokenId: string;
748
753
  amount: string;
749
754
  opportunityId: string;
@@ -141,6 +141,7 @@ export declare abstract class OpportunityService {
141
141
  tags: string[];
142
142
  icon: string;
143
143
  } | null | undefined;
144
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
144
145
  depositUrl?: string | undefined;
145
146
  explorerAddress?: string | undefined;
146
147
  aprRecord?: {
@@ -278,6 +279,7 @@ export declare abstract class OpportunityService {
278
279
  tags: string[];
279
280
  icon: string;
280
281
  } | null | undefined;
282
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
281
283
  depositUrl?: string | undefined;
282
284
  explorerAddress?: string | undefined;
283
285
  aprRecord?: {
@@ -531,6 +533,7 @@ export declare abstract class OpportunityService {
531
533
  computeChainId: number;
532
534
  distributionChainId: number;
533
535
  campaignId: string;
536
+ distributionType: import("@db/api").$Enums.DistributionType;
534
537
  rewardTokenId: string;
535
538
  amount: string;
536
539
  opportunityId: string;
@@ -702,6 +705,7 @@ export declare abstract class OpportunityService {
702
705
  computeChainId: number;
703
706
  distributionChainId: number;
704
707
  campaignId: string;
708
+ distributionType: import("@db/api").$Enums.DistributionType;
705
709
  rewardTokenId: string;
706
710
  amount: string;
707
711
  opportunityId: string;
@@ -866,6 +870,7 @@ export declare abstract class OpportunityService {
866
870
  computeChainId: number;
867
871
  distributionChainId: number;
868
872
  campaignId: string;
873
+ distributionType: import("@db/api").$Enums.DistributionType;
869
874
  rewardTokenId: string;
870
875
  amount: string;
871
876
  opportunityId: string;
@@ -189,10 +189,10 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
189
189
  endTimestamp?: number | undefined;
190
190
  blacklist?: string[] | undefined;
191
191
  poolAddress?: string | undefined;
192
+ contract?: string | undefined;
192
193
  marketId?: string | undefined;
193
194
  strategy?: string | undefined;
194
195
  poolId?: string | undefined;
195
- contract?: string | undefined;
196
196
  forwarders?: (string | {})[] | undefined;
197
197
  whitelist?: string[] | undefined;
198
198
  targetToken?: string | undefined;
@@ -36,6 +36,7 @@ export declare abstract class ProtocolRepository {
36
36
  computeChainId: number;
37
37
  distributionChainId: number;
38
38
  campaignId: string;
39
+ distributionType: import("@db/api").$Enums.DistributionType;
39
40
  rewardTokenId: string;
40
41
  amount: string;
41
42
  opportunityId: string;
@@ -128,6 +128,7 @@ export declare abstract class RewardService {
128
128
  computeChainId: number;
129
129
  distributionChainId: number;
130
130
  campaignId: string;
131
+ distributionType: import("@db/api").$Enums.DistributionType;
131
132
  rewardTokenId: string;
132
133
  amount: string;
133
134
  opportunityId: string;
@@ -346,6 +346,7 @@ export declare const v4: Elysia<"/v4", false, {
346
346
  computeChainId: number;
347
347
  distributionChainId: number;
348
348
  campaignId: string;
349
+ distributionType: import("@db/api").$Enums.DistributionType;
349
350
  rewardTokenId: string;
350
351
  amount: string;
351
352
  opportunityId: string;
@@ -453,6 +454,7 @@ export declare const v4: Elysia<"/v4", false, {
453
454
  tags: string[];
454
455
  icon: string;
455
456
  } | null | undefined;
457
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
456
458
  depositUrl?: string | undefined;
457
459
  explorerAddress?: string | undefined;
458
460
  aprRecord?: {
@@ -584,6 +586,7 @@ export declare const v4: Elysia<"/v4", false, {
584
586
  tags: string[];
585
587
  icon: string;
586
588
  } | null | undefined;
589
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
587
590
  depositUrl?: string | undefined;
588
591
  explorerAddress?: string | undefined;
589
592
  aprRecord?: {
@@ -749,6 +752,7 @@ export declare const v4: Elysia<"/v4", false, {
749
752
  tags: string[];
750
753
  icon: string;
751
754
  } | null | undefined;
755
+ distributionType?: "DUTCH_AUCTION" | "FIX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
752
756
  depositUrl?: string | undefined;
753
757
  explorerAddress?: string | undefined;
754
758
  aprRecord?: {
@@ -1092,6 +1096,7 @@ export declare const v4: Elysia<"/v4", false, {
1092
1096
  computeChainId: number;
1093
1097
  distributionChainId: number;
1094
1098
  campaignId: string;
1099
+ distributionType: import("@db/api").$Enums.DistributionType;
1095
1100
  rewardTokenId: string;
1096
1101
  amount: string;
1097
1102
  opportunityId: string;
@@ -1180,6 +1185,7 @@ export declare const v4: Elysia<"/v4", false, {
1180
1185
  computeChainId: number;
1181
1186
  distributionChainId: number;
1182
1187
  campaignId: string;
1188
+ distributionType: import("@db/api").$Enums.DistributionType;
1183
1189
  rewardTokenId: string;
1184
1190
  amount: string;
1185
1191
  opportunityId: string;
@@ -1230,11 +1236,42 @@ export declare const v4: Elysia<"/v4", false, {
1230
1236
  };
1231
1237
  };
1232
1238
  };
1239
+ } & {
1240
+ "dry-run": {
1241
+ "dynamic-data": {
1242
+ list: {
1243
+ post: {
1244
+ body: string[];
1245
+ params: {};
1246
+ query: unknown;
1247
+ headers: {
1248
+ authorization: string;
1249
+ };
1250
+ response: {
1251
+ 200: unknown[];
1252
+ };
1253
+ };
1254
+ };
1255
+ };
1256
+ };
1233
1257
  } & {
1234
1258
  "dry-run": {
1235
1259
  "dynamic-data": {
1236
1260
  post: {
1237
- body: string[];
1261
+ body: {
1262
+ id?: string | undefined;
1263
+ subType?: number | undefined;
1264
+ campaignId?: string | undefined;
1265
+ amount?: string | undefined;
1266
+ creatorAddress?: string | undefined;
1267
+ type: string;
1268
+ params: any;
1269
+ computeChainId: number;
1270
+ distributionChainId: number;
1271
+ startTimestamp: number;
1272
+ endTimestamp: number;
1273
+ rewardToken: string;
1274
+ };
1238
1275
  params: {};
1239
1276
  query: unknown;
1240
1277
  headers: {
@@ -1246,6 +1283,62 @@ export declare const v4: Elysia<"/v4", false, {
1246
1283
  };
1247
1284
  };
1248
1285
  };
1286
+ } & {
1287
+ "dry-run": {
1288
+ metadata: {
1289
+ post: {
1290
+ body: {
1291
+ id?: string | undefined;
1292
+ subType?: number | undefined;
1293
+ campaignId?: string | undefined;
1294
+ amount?: string | undefined;
1295
+ creatorAddress?: string | undefined;
1296
+ type: string;
1297
+ params: any;
1298
+ computeChainId: number;
1299
+ distributionChainId: number;
1300
+ startTimestamp: number;
1301
+ endTimestamp: number;
1302
+ rewardToken: string;
1303
+ };
1304
+ params: {};
1305
+ query: unknown;
1306
+ headers: {
1307
+ authorization: string;
1308
+ };
1309
+ response: {
1310
+ 200: {
1311
+ id: string;
1312
+ chainId: number;
1313
+ type: string;
1314
+ identifier: string;
1315
+ name: string;
1316
+ status: "PAST" | "LIVE" | "SOON";
1317
+ action: any;
1318
+ tokens: ({
1319
+ symbol: string;
1320
+ id: string;
1321
+ name: string | null;
1322
+ icon: string;
1323
+ address: string;
1324
+ chainId: number;
1325
+ decimals: number;
1326
+ verified: boolean;
1327
+ isTest: boolean;
1328
+ isPoint: boolean;
1329
+ isNative: boolean;
1330
+ } & {
1331
+ price?: number | null | undefined;
1332
+ })[];
1333
+ mainProtocol: "splice" | "morpho" | "quickswap" | "euler" | "ambient" | "uniswap" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "curve" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "fraxlend" | "ironclad" | "gearbox" | "compound" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "vest" | "zerolend" | "hyperdrive" | "gamma" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "satlayer" | undefined;
1334
+ depositUrl: any;
1335
+ explorerAddress: string | undefined;
1336
+ tags: string[];
1337
+ };
1338
+ };
1339
+ };
1340
+ };
1341
+ };
1249
1342
  } & {
1250
1343
  "dry-run": {
1251
1344
  metadata: {
@@ -1390,6 +1483,7 @@ export declare const v4: Elysia<"/v4", false, {
1390
1483
  computeChainId: number;
1391
1484
  distributionChainId: number;
1392
1485
  campaignId: string;
1486
+ distributionType: import("@db/api").$Enums.DistributionType;
1393
1487
  rewardTokenId: string;
1394
1488
  amount: string;
1395
1489
  opportunityId: string;
@@ -1474,6 +1568,7 @@ export declare const v4: Elysia<"/v4", false, {
1474
1568
  computeChainId: number;
1475
1569
  distributionChainId: number;
1476
1570
  campaignId: string;
1571
+ distributionType: import("@db/api").$Enums.DistributionType;
1477
1572
  rewardTokenId: string;
1478
1573
  amount: string;
1479
1574
  opportunityId: string;
@@ -1659,6 +1754,7 @@ export declare const v4: Elysia<"/v4", false, {
1659
1754
  computeChainId: number;
1660
1755
  distributionChainId: number;
1661
1756
  campaignId: string;
1757
+ distributionType: import("@db/api").$Enums.DistributionType;
1662
1758
  rewardTokenId: string;
1663
1759
  amount: string;
1664
1760
  opportunityId: string;
@@ -4364,10 +4460,10 @@ export declare const v4: Elysia<"/v4", false, {
4364
4460
  endTimestamp?: number | undefined;
4365
4461
  blacklist?: string[] | undefined;
4366
4462
  poolAddress?: string | undefined;
4463
+ contract?: string | undefined;
4367
4464
  marketId?: string | undefined;
4368
4465
  strategy?: string | undefined;
4369
4466
  poolId?: string | undefined;
4370
- contract?: string | undefined;
4371
4467
  forwarders?: (string | {})[] | undefined;
4372
4468
  whitelist?: string[] | undefined;
4373
4469
  targetToken?: string | undefined;