@merkl/api 0.20.154 → 0.20.156

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 +84 -7
  2. package/dist/database/api/.generated/drizzle/schema.js +4 -1
  3. package/dist/database/api/.generated/drizzle/schema.ts +4 -1
  4. package/dist/database/api/.generated/edge.js +12 -4
  5. package/dist/database/api/.generated/index-browser.js +9 -1
  6. package/dist/database/api/.generated/index.d.ts +303 -79
  7. package/dist/database/api/.generated/index.js +12 -4
  8. package/dist/database/api/.generated/package.json +1 -1
  9. package/dist/database/api/.generated/schema.prisma +5 -0
  10. package/dist/database/api/.generated/wasm.js +9 -1
  11. package/dist/src/eden/index.d.ts +171 -3
  12. package/dist/src/index.d.ts +59 -1
  13. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +15 -0
  14. package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -0
  15. package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
  16. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +18 -0
  17. package/dist/src/modules/v4/campaign/campaign.service.d.ts +34 -0
  18. package/dist/src/modules/v4/campaign/campaign.service.js +2 -1
  19. package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +10 -0
  20. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +30 -1
  21. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +11 -0
  22. package/dist/src/modules/v4/opportunity/opportunity.model.js +6 -0
  23. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +23 -0
  24. package/dist/src/modules/v4/opportunity/opportunity.repository.js +4 -0
  25. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +46 -1
  26. package/dist/src/modules/v4/opportunity/opportunity.service.js +44 -0
  27. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +3 -0
  28. package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -0
  29. package/dist/src/modules/v4/reward/reward.service.d.ts +17 -0
  30. package/dist/src/modules/v4/router.d.ts +59 -1
  31. package/dist/src/modules/v4/user/user.controller.d.ts +4 -0
  32. package/dist/src/scripts/fill-descriptions.d.ts +1 -0
  33. package/dist/src/scripts/fill-descriptions.js +101 -0
  34. package/dist/tsconfig.package.tsbuildinfo +1 -1
  35. package/package.json +1 -1
@@ -114,16 +114,19 @@ export declare abstract class RewardService {
114
114
  creatorId: string | null;
115
115
  };
116
116
  createdAt: string;
117
+ description: string | undefined;
117
118
  Opportunity: {
118
119
  id: string;
119
120
  name: string;
120
121
  type: string;
121
122
  status: import("@db/api").$Enums.Status;
123
+ description: string;
122
124
  tags: string[];
123
125
  identifier: string;
124
126
  action: import("@db/api").$Enums.OpportunityAction;
125
127
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
126
128
  chainId: number;
129
+ howToSteps: string[];
127
130
  depositUrl: string | null;
128
131
  explorerAddress: string | null;
129
132
  mainProtocolId: string | null;
@@ -179,10 +182,12 @@ export declare abstract class RewardService {
179
182
  name: string;
180
183
  type: string;
181
184
  status: import("@db/api").$Enums.Status;
185
+ description: string;
182
186
  tags: string[];
183
187
  identifier: string;
184
188
  action: import("@db/api").$Enums.OpportunityAction;
185
189
  chainId: number;
190
+ howToSteps: string[];
186
191
  tvl: number;
187
192
  dailyRewards: number;
188
193
  }, number>>;
@@ -240,11 +245,13 @@ export declare abstract class RewardService {
240
245
  name: string;
241
246
  type: string;
242
247
  status: import("@db/api").$Enums.Status;
248
+ description: string;
243
249
  tags: string[];
244
250
  identifier: string;
245
251
  action: import("@db/api").$Enums.OpportunityAction;
246
252
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
247
253
  chainId: number;
254
+ howToSteps: string[];
248
255
  depositUrl: string | null;
249
256
  explorerAddress: string | null;
250
257
  mainProtocolId: string | null;
@@ -325,11 +332,13 @@ export declare abstract class RewardService {
325
332
  name: string;
326
333
  type: string;
327
334
  status: import("@db/api").$Enums.Status;
335
+ description: string;
328
336
  tags: string[];
329
337
  identifier: string;
330
338
  action: import("@db/api").$Enums.OpportunityAction;
331
339
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
332
340
  chainId: number;
341
+ howToSteps: string[];
333
342
  depositUrl: string | null;
334
343
  explorerAddress: string | null;
335
344
  mainProtocolId: string | null;
@@ -414,11 +423,13 @@ export declare abstract class RewardService {
414
423
  name: string;
415
424
  type: string;
416
425
  status: import("@db/api").$Enums.Status;
426
+ description: string;
417
427
  tags: string[];
418
428
  identifier: string;
419
429
  action: import("@db/api").$Enums.OpportunityAction;
420
430
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
421
431
  chainId: number;
432
+ howToSteps: string[];
422
433
  depositUrl: string | null;
423
434
  explorerAddress: string | null;
424
435
  mainProtocolId: string | null;
@@ -532,11 +543,13 @@ export declare abstract class RewardService {
532
543
  name: string;
533
544
  type: string;
534
545
  status: import("@db/api").$Enums.Status;
546
+ description: string;
535
547
  tags: string[];
536
548
  identifier: string;
537
549
  action: import("@db/api").$Enums.OpportunityAction;
538
550
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
539
551
  chainId: number;
552
+ howToSteps: string[];
540
553
  depositUrl: string | null;
541
554
  explorerAddress: string | null;
542
555
  mainProtocolId: string | null;
@@ -632,11 +645,13 @@ export declare abstract class RewardService {
632
645
  name: string;
633
646
  type: string;
634
647
  status: import("@db/api").$Enums.Status;
648
+ description: string;
635
649
  tags: string[];
636
650
  identifier: string;
637
651
  action: import("@db/api").$Enums.OpportunityAction;
638
652
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
639
653
  chainId: number;
654
+ howToSteps: string[];
640
655
  depositUrl: string | null;
641
656
  explorerAddress: string | null;
642
657
  mainProtocolId: string | null;
@@ -730,11 +745,13 @@ export declare abstract class RewardService {
730
745
  name: string;
731
746
  type: string;
732
747
  status: import("@db/api").$Enums.Status;
748
+ description: string;
733
749
  tags: string[];
734
750
  identifier: string;
735
751
  action: import("@db/api").$Enums.OpportunityAction;
736
752
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
737
753
  chainId: number;
754
+ howToSteps: string[];
738
755
  depositUrl: string | null;
739
756
  explorerAddress: string | null;
740
757
  mainProtocolId: string | null;
@@ -32,7 +32,9 @@ export declare const v4: Elysia<"/v4", false, {
32
32
  post: {
33
33
  body: {
34
34
  name?: string | undefined;
35
+ description?: string | undefined;
35
36
  tags?: string[] | undefined;
37
+ howToSteps?: string[] | undefined;
36
38
  depositUrl?: string | undefined;
37
39
  explorerAddress?: string | undefined;
38
40
  protocols?: string[] | undefined;
@@ -82,11 +84,13 @@ export declare const v4: Elysia<"/v4", false, {
82
84
  name: string;
83
85
  type: string;
84
86
  status: import("@db/api").$Enums.Status;
87
+ description: string;
85
88
  tags: string[];
86
89
  identifier: string;
87
90
  action: import("@db/api").$Enums.OpportunityAction;
88
91
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
89
92
  chainId: number;
93
+ howToSteps: string[];
90
94
  depositUrl: string | null;
91
95
  explorerAddress: string | null;
92
96
  mainProtocolId: string | null;
@@ -106,7 +110,9 @@ export declare const v4: Elysia<"/v4", false, {
106
110
  patch: {
107
111
  body: {
108
112
  name?: string | undefined;
113
+ description?: string | undefined;
109
114
  action?: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "SWAP" | "INVALID" | undefined;
115
+ howToSteps?: string[] | undefined;
110
116
  depositUrl?: string | undefined;
111
117
  explorerAddress?: string | undefined;
112
118
  };
@@ -123,11 +129,13 @@ export declare const v4: Elysia<"/v4", false, {
123
129
  name: string;
124
130
  type: string;
125
131
  status: import("@db/api").$Enums.Status;
132
+ description: string;
126
133
  tags: string[];
127
134
  identifier: string;
128
135
  action: import("@db/api").$Enums.OpportunityAction;
129
136
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
130
137
  chainId: number;
138
+ howToSteps: string[];
131
139
  depositUrl: string | null;
132
140
  explorerAddress: string | null;
133
141
  mainProtocolId: string | null;
@@ -146,7 +154,7 @@ export declare const v4: Elysia<"/v4", false, {
146
154
  ":id": {
147
155
  override: {
148
156
  delete: {
149
- body: ("name" | "action" | "depositUrl" | "explorerAddress")[];
157
+ body: ("name" | "description" | "action" | "howToSteps" | "depositUrl" | "explorerAddress")[];
150
158
  params: {
151
159
  id: string;
152
160
  };
@@ -184,11 +192,13 @@ export declare const v4: Elysia<"/v4", false, {
184
192
  name: string;
185
193
  type: string;
186
194
  status: import("@db/api").$Enums.Status;
195
+ description: string;
187
196
  tags: string[];
188
197
  identifier: string;
189
198
  action: import("@db/api").$Enums.OpportunityAction;
190
199
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
191
200
  chainId: number;
201
+ howToSteps: string[];
192
202
  depositUrl: string | null;
193
203
  explorerAddress: string | null;
194
204
  mainProtocolId: string | null;
@@ -221,6 +231,8 @@ export declare const v4: Elysia<"/v4", false, {
221
231
  price?: number | null | undefined;
222
232
  })[];
223
233
  mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "stability" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
234
+ description: string;
235
+ howToSteps: string[];
224
236
  depositUrl: string | undefined;
225
237
  explorerAddress: string | undefined;
226
238
  tags: string[];
@@ -273,11 +285,13 @@ export declare const v4: Elysia<"/v4", false, {
273
285
  name: string;
274
286
  type: string;
275
287
  status: import("@db/api").$Enums.Status;
288
+ description: string;
276
289
  tags: string[];
277
290
  identifier: string;
278
291
  action: import("@db/api").$Enums.OpportunityAction;
279
292
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
280
293
  chainId: number;
294
+ howToSteps: string[];
281
295
  depositUrl: string | null;
282
296
  explorerAddress: string | null;
283
297
  mainProtocolId: string | null;
@@ -310,6 +324,8 @@ export declare const v4: Elysia<"/v4", false, {
310
324
  price?: number | null | undefined;
311
325
  })[];
312
326
  mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "stability" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
327
+ description: string;
328
+ howToSteps: string[];
313
329
  depositUrl: string | undefined;
314
330
  explorerAddress: string | undefined;
315
331
  tags: string[];
@@ -455,16 +471,19 @@ export declare const v4: Elysia<"/v4", false, {
455
471
  creatorId: string | null;
456
472
  };
457
473
  createdAt: string;
474
+ description: string | undefined;
458
475
  Opportunity: {
459
476
  id: string;
460
477
  name: string;
461
478
  type: string;
462
479
  status: import("@db/api").$Enums.Status;
480
+ description: string;
463
481
  tags: string[];
464
482
  identifier: string;
465
483
  action: import("@db/api").$Enums.OpportunityAction;
466
484
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
467
485
  chainId: number;
486
+ howToSteps: string[];
468
487
  depositUrl: string | null;
469
488
  explorerAddress: string | null;
470
489
  mainProtocolId: string | null;
@@ -520,10 +539,12 @@ export declare const v4: Elysia<"/v4", false, {
520
539
  name: string;
521
540
  type: string;
522
541
  status: import("@db/api").$Enums.Status;
542
+ description: string;
523
543
  tags: string[];
524
544
  identifier: string;
525
545
  action: import("@db/api").$Enums.OpportunityAction;
526
546
  chainId: number;
547
+ howToSteps: string[];
527
548
  tvl: number;
528
549
  dailyRewards: number;
529
550
  }[];
@@ -659,6 +680,7 @@ export declare const v4: Elysia<"/v4", false, {
659
680
  isPoint: boolean;
660
681
  isPreTGE: boolean;
661
682
  }[];
683
+ description: string;
662
684
  tags: string[];
663
685
  identifier: string;
664
686
  chain: {
@@ -668,6 +690,7 @@ export declare const v4: Elysia<"/v4", false, {
668
690
  };
669
691
  action: string;
670
692
  chainId: number;
693
+ howToSteps: string[];
671
694
  tvl: number;
672
695
  apr: number;
673
696
  dailyRewards: number;
@@ -796,6 +819,7 @@ export declare const v4: Elysia<"/v4", false, {
796
819
  isPoint: boolean;
797
820
  isPreTGE: boolean;
798
821
  }[];
822
+ description: string;
799
823
  tags: string[];
800
824
  identifier: string;
801
825
  chain: {
@@ -805,11 +829,13 @@ export declare const v4: Elysia<"/v4", false, {
805
829
  };
806
830
  action: string;
807
831
  chainId: number;
832
+ howToSteps: string[];
808
833
  tvl: number;
809
834
  apr: number;
810
835
  dailyRewards: number;
811
836
  lastCampaignCreatedAt: string;
812
837
  campaigns: {
838
+ description?: string | undefined;
813
839
  creator?: {
814
840
  tags?: string[] | undefined;
815
841
  creatorId?: string | null | undefined;
@@ -969,6 +995,7 @@ export declare const v4: Elysia<"/v4", false, {
969
995
  isPoint: boolean;
970
996
  isPreTGE: boolean;
971
997
  }[];
998
+ description: string;
972
999
  tags: string[];
973
1000
  identifier: string;
974
1001
  chain: {
@@ -978,11 +1005,13 @@ export declare const v4: Elysia<"/v4", false, {
978
1005
  };
979
1006
  action: string;
980
1007
  chainId: number;
1008
+ howToSteps: string[];
981
1009
  tvl: number;
982
1010
  apr: number;
983
1011
  dailyRewards: number;
984
1012
  lastCampaignCreatedAt: string;
985
1013
  campaigns: {
1014
+ description?: string | undefined;
986
1015
  creator?: {
987
1016
  tags?: string[] | undefined;
988
1017
  creatorId?: string | null | undefined;
@@ -1211,6 +1240,7 @@ export declare const v4: Elysia<"/v4", false, {
1211
1240
  200: {
1212
1241
  id: string;
1213
1242
  type: string;
1243
+ description: string | null;
1214
1244
  params: import("database/api/.generated/runtime/library").JsonValue;
1215
1245
  subType: number | null;
1216
1246
  computeChainId: number;
@@ -1254,11 +1284,13 @@ export declare const v4: Elysia<"/v4", false, {
1254
1284
  name: string;
1255
1285
  type: string;
1256
1286
  status: import("@db/api").$Enums.Status;
1287
+ description: string;
1257
1288
  tags: string[];
1258
1289
  identifier: string;
1259
1290
  action: import("@db/api").$Enums.OpportunityAction;
1260
1291
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1261
1292
  chainId: number;
1293
+ howToSteps: string[];
1262
1294
  depositUrl: string | null;
1263
1295
  explorerAddress: string | null;
1264
1296
  mainProtocolId: string | null;
@@ -1291,6 +1323,8 @@ export declare const v4: Elysia<"/v4", false, {
1291
1323
  price?: number | null | undefined;
1292
1324
  })[];
1293
1325
  mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "stability" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
1326
+ description: string;
1327
+ howToSteps: string[];
1294
1328
  depositUrl: string | undefined;
1295
1329
  explorerAddress: string | undefined;
1296
1330
  tags: string[];
@@ -1369,6 +1403,7 @@ export declare const v4: Elysia<"/v4", false, {
1369
1403
  200: {
1370
1404
  id: string;
1371
1405
  type: string;
1406
+ description: string | null;
1372
1407
  params: import("database/api/.generated/runtime/library").JsonValue;
1373
1408
  subType: number | null;
1374
1409
  computeChainId: number;
@@ -1463,16 +1498,19 @@ export declare const v4: Elysia<"/v4", false, {
1463
1498
  creatorId: string | null;
1464
1499
  };
1465
1500
  createdAt: string;
1501
+ description: string | undefined;
1466
1502
  Opportunity: {
1467
1503
  id: string;
1468
1504
  name: string;
1469
1505
  type: string;
1470
1506
  status: import("@db/api").$Enums.Status;
1507
+ description: string;
1471
1508
  tags: string[];
1472
1509
  identifier: string;
1473
1510
  action: import("@db/api").$Enums.OpportunityAction;
1474
1511
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1475
1512
  chainId: number;
1513
+ howToSteps: string[];
1476
1514
  depositUrl: string | null;
1477
1515
  explorerAddress: string | null;
1478
1516
  mainProtocolId: string | null;
@@ -1550,16 +1588,19 @@ export declare const v4: Elysia<"/v4", false, {
1550
1588
  creatorId: string | null;
1551
1589
  };
1552
1590
  createdAt: string;
1591
+ description: string | undefined;
1553
1592
  Opportunity: {
1554
1593
  id: string;
1555
1594
  name: string;
1556
1595
  type: string;
1557
1596
  status: import("@db/api").$Enums.Status;
1597
+ description: string;
1558
1598
  tags: string[];
1559
1599
  identifier: string;
1560
1600
  action: import("@db/api").$Enums.OpportunityAction;
1561
1601
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1562
1602
  chainId: number;
1603
+ howToSteps: string[];
1563
1604
  depositUrl: string | null;
1564
1605
  explorerAddress: string | null;
1565
1606
  mainProtocolId: string | null;
@@ -1753,16 +1794,19 @@ export declare const v4: Elysia<"/v4", false, {
1753
1794
  creatorId: string | null;
1754
1795
  };
1755
1796
  createdAt: string;
1797
+ description: string | undefined;
1756
1798
  Opportunity: {
1757
1799
  id: string;
1758
1800
  name: string;
1759
1801
  type: string;
1760
1802
  status: import("@db/api").$Enums.Status;
1803
+ description: string;
1761
1804
  tags: string[];
1762
1805
  identifier: string;
1763
1806
  action: import("@db/api").$Enums.OpportunityAction;
1764
1807
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
1765
1808
  chainId: number;
1809
+ howToSteps: string[];
1766
1810
  depositUrl: string | null;
1767
1811
  explorerAddress: string | null;
1768
1812
  mainProtocolId: string | null;
@@ -2092,6 +2136,7 @@ export declare const v4: Elysia<"/v4", false, {
2092
2136
  200: {
2093
2137
  id: string;
2094
2138
  type: string;
2139
+ description: string | null;
2095
2140
  params: import("database/api/.generated/runtime/library").JsonValue;
2096
2141
  subType: number | null;
2097
2142
  computeChainId: number;
@@ -2135,11 +2180,13 @@ export declare const v4: Elysia<"/v4", false, {
2135
2180
  name: string;
2136
2181
  type: string;
2137
2182
  status: import("@db/api").$Enums.Status;
2183
+ description: string;
2138
2184
  tags: string[];
2139
2185
  identifier: string;
2140
2186
  action: import("@db/api").$Enums.OpportunityAction;
2141
2187
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
2142
2188
  chainId: number;
2189
+ howToSteps: string[];
2143
2190
  depositUrl: string | null;
2144
2191
  explorerAddress: string | null;
2145
2192
  mainProtocolId: string | null;
@@ -2172,6 +2219,8 @@ export declare const v4: Elysia<"/v4", false, {
2172
2219
  price?: number | null | undefined;
2173
2220
  })[];
2174
2221
  mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "stability" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2222
+ description: string;
2223
+ howToSteps: string[];
2175
2224
  depositUrl: string | undefined;
2176
2225
  explorerAddress: string | undefined;
2177
2226
  tags: string[];
@@ -2197,6 +2246,7 @@ export declare const v4: Elysia<"/v4", false, {
2197
2246
  200: {
2198
2247
  id: string;
2199
2248
  type: string;
2249
+ description: string | null;
2200
2250
  params: import("database/api/.generated/runtime/library").JsonValue;
2201
2251
  subType: number | null;
2202
2252
  computeChainId: number;
@@ -2240,11 +2290,13 @@ export declare const v4: Elysia<"/v4", false, {
2240
2290
  name: string;
2241
2291
  type: string;
2242
2292
  status: import("@db/api").$Enums.Status;
2293
+ description: string;
2243
2294
  tags: string[];
2244
2295
  identifier: string;
2245
2296
  action: import("@db/api").$Enums.OpportunityAction;
2246
2297
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
2247
2298
  chainId: number;
2299
+ howToSteps: string[];
2248
2300
  depositUrl: string | null;
2249
2301
  explorerAddress: string | null;
2250
2302
  mainProtocolId: string | null;
@@ -2277,6 +2329,8 @@ export declare const v4: Elysia<"/v4", false, {
2277
2329
  price?: number | null | undefined;
2278
2330
  })[];
2279
2331
  mainProtocol: "splice" | "reserve" | "morpho" | "quickswap" | "euler" | "aura" | "poolside" | "gearbox" | "filament" | "fluid" | "compound" | "ionic" | "layerbank" | "moonwell" | "fraxlend" | "fenix" | "ra" | "syncswap" | "beefy" | "aerodrome" | "velodrome" | "curve" | "toros" | "akron" | "enzyme" | "dragonswap" | "koi" | "rfx" | "woofi" | "pendle" | "zkSwapThreePool" | "maha" | "tempest" | "holdstation" | "venus" | "reactor_fusion" | "vicuna" | "curveNPool" | "satlayer" | "veda" | "cian" | "concrete" | "hourglass" | "katana" | "gamma" | "stability" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "horiza" | "izumi" | "kim" | "pancake-swap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "zero" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "balancer" | "cross_curve" | "neptune" | "maverick" | "trader-joe" | "hanji" | "radiant" | "aave" | "ironclad" | "sturdy" | "frax" | "silo" | "dolomite" | "badger" | "ajna" | "ion" | "eigenlayer" | "vest" | "zerolend" | "lnd" | "hyperdrive" | "oku" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "angles" | "bunni" | "beratrax" | "yei" | "gammaswap" | "uranium" | undefined;
2332
+ description: string;
2333
+ howToSteps: string[];
2280
2334
  depositUrl: string | undefined;
2281
2335
  explorerAddress: string | undefined;
2282
2336
  tags: string[];
@@ -3872,11 +3926,13 @@ export declare const v4: Elysia<"/v4", false, {
3872
3926
  name: string;
3873
3927
  type: string;
3874
3928
  status: import("@db/api").$Enums.Status;
3929
+ description: string;
3875
3930
  tags: string[];
3876
3931
  identifier: string;
3877
3932
  action: import("@db/api").$Enums.OpportunityAction;
3878
3933
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
3879
3934
  chainId: number;
3935
+ howToSteps: string[];
3880
3936
  depositUrl: string | null;
3881
3937
  explorerAddress: string | null;
3882
3938
  mainProtocolId: string | null;
@@ -3995,11 +4051,13 @@ export declare const v4: Elysia<"/v4", false, {
3995
4051
  name: string;
3996
4052
  type: string;
3997
4053
  status: import("@db/api").$Enums.Status;
4054
+ description: string;
3998
4055
  tags: string[];
3999
4056
  identifier: string;
4000
4057
  action: import("@db/api").$Enums.OpportunityAction;
4001
4058
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
4002
4059
  chainId: number;
4060
+ howToSteps: string[];
4003
4061
  depositUrl: string | null;
4004
4062
  explorerAddress: string | null;
4005
4063
  mainProtocolId: string | null;
@@ -182,11 +182,13 @@ export declare const UserController: Elysia<"/users", false, {
182
182
  name: string;
183
183
  type: string;
184
184
  status: import("@db/api").$Enums.Status;
185
+ description: string;
185
186
  tags: string[];
186
187
  identifier: string;
187
188
  action: import("@db/api").$Enums.OpportunityAction;
188
189
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
189
190
  chainId: number;
191
+ howToSteps: string[];
190
192
  depositUrl: string | null;
191
193
  explorerAddress: string | null;
192
194
  mainProtocolId: string | null;
@@ -305,11 +307,13 @@ export declare const UserController: Elysia<"/users", false, {
305
307
  name: string;
306
308
  type: string;
307
309
  status: import("@db/api").$Enums.Status;
310
+ description: string;
308
311
  tags: string[];
309
312
  identifier: string;
310
313
  action: import("@db/api").$Enums.OpportunityAction;
311
314
  manualOverrides: import("@db/api").$Enums.OpportunityManualOverride[];
312
315
  chainId: number;
316
+ howToSteps: string[];
313
317
  depositUrl: string | null;
314
318
  explorerAddress: string | null;
315
319
  mainProtocolId: string | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,101 @@
1
+ import { OpportunityService } from "@/modules/v4/opportunity/opportunity.service";
2
+ import { apiDbClient } from "@db";
3
+ let page = 0;
4
+ while (true) {
5
+ const opportunities = await apiDbClient.opportunity.findMany({
6
+ select: {
7
+ id: true,
8
+ name: true,
9
+ explorerAddress: true,
10
+ depositUrl: true,
11
+ identifier: true,
12
+ MainProtocol: {
13
+ select: {
14
+ url: true,
15
+ name: true,
16
+ },
17
+ },
18
+ Chain: {
19
+ select: {
20
+ name: true,
21
+ },
22
+ },
23
+ type: true,
24
+ action: true,
25
+ Tokens: {
26
+ select: {
27
+ symbol: true,
28
+ address: true,
29
+ name: true,
30
+ },
31
+ },
32
+ Campaigns: {
33
+ take: 1,
34
+ include: {
35
+ RewardToken: {
36
+ select: {
37
+ address: true,
38
+ },
39
+ },
40
+ },
41
+ },
42
+ description: true,
43
+ },
44
+ take: 1000,
45
+ skip: page * 1000,
46
+ });
47
+ page += 1;
48
+ if (opportunities.length === 0) {
49
+ break;
50
+ }
51
+ for (const opportunity of opportunities) {
52
+ const { action, Tokens: tokens, MainProtocol: protocol, Chain: chain } = opportunity;
53
+ const symbols = tokens?.map(t => t.symbol).join("-");
54
+ let description = "";
55
+ switch (action) {
56
+ case "POOL":
57
+ description = `Earn rewards by providing liquidity to the ${protocol?.name} ${symbols} pool on ${chain.name}, or through a liquidity manager supported by Merkl`;
58
+ break;
59
+ case "HOLD":
60
+ description = `Earn rewards by holding ${symbols} or by staking it in a supported contract`;
61
+ break;
62
+ case "LEND":
63
+ description = `Earn rewards by lending ${symbols} to ${protocol?.name} on ${chain.name}`;
64
+ break;
65
+ case "BORROW":
66
+ description = `Earn rewards by taking a long position on ${protocol?.name} ${symbols} on ${chain.name}`;
67
+ break;
68
+ case "DROP":
69
+ description = `Visit your dashboard to check if you've earned rewards from this airdrop`;
70
+ break;
71
+ case "LONG":
72
+ description = `Borrow ${symbols} on ${protocol?.name} on ${chain.name}`;
73
+ break;
74
+ case "SHORT":
75
+ description = `Earn rewards by taking a short position on ${protocol?.name} ${symbols} on ${chain.name}`;
76
+ break;
77
+ case "SWAP":
78
+ description = `Earn rewards by trading ${symbols} on ${chain.name}`;
79
+ break;
80
+ default:
81
+ break;
82
+ }
83
+ const howToSteps = OpportunityService.howToSteps(action, tokens, protocol);
84
+ if (description !== opportunity.description) {
85
+ await apiDbClient.opportunity.update({
86
+ where: {
87
+ id: opportunity.id,
88
+ },
89
+ data: {
90
+ description,
91
+ howToSteps,
92
+ },
93
+ });
94
+ console.log(`updated description for ${opportunity.id} - ${opportunity.name} to ${description}`);
95
+ }
96
+ else {
97
+ console.log(`no description for ${opportunity.id} - ${opportunity.name}`);
98
+ }
99
+ }
100
+ }
101
+ process.exit(0);