@merkl/api 0.13.13 → 0.13.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -455,6 +455,7 @@ declare const eden: {
455
455
  query: {
456
456
  sort?: string | undefined;
457
457
  name?: string | undefined;
458
+ type?: string | undefined;
458
459
  tokens?: string | undefined;
459
460
  status?: string | undefined;
460
461
  items?: number | undefined;
@@ -566,6 +567,7 @@ declare const eden: {
566
567
  query: {
567
568
  sort?: string | undefined;
568
569
  name?: string | undefined;
570
+ type?: string | undefined;
569
571
  tokens?: string | undefined;
570
572
  status?: string | undefined;
571
573
  items?: number | undefined;
@@ -758,6 +760,7 @@ declare const eden: {
758
760
  query: {
759
761
  sort?: string | undefined;
760
762
  name?: string | undefined;
763
+ type?: string | undefined;
761
764
  tokens?: string | undefined;
762
765
  status?: string | undefined;
763
766
  items?: number | undefined;
@@ -786,6 +789,7 @@ declare const eden: {
786
789
  query: {
787
790
  sort?: string | undefined;
788
791
  name?: string | undefined;
792
+ type?: string | undefined;
789
793
  tokens?: string | undefined;
790
794
  status?: string | undefined;
791
795
  items?: number | undefined;
@@ -814,6 +818,7 @@ declare const eden: {
814
818
  query: {
815
819
  sort?: string | undefined;
816
820
  name?: string | undefined;
821
+ type?: string | undefined;
817
822
  tokens?: string | undefined;
818
823
  status?: string | undefined;
819
824
  items?: number | undefined;
@@ -3497,6 +3502,7 @@ declare const eden: {
3497
3502
  query: {
3498
3503
  sort?: string | undefined;
3499
3504
  name?: string | undefined;
3505
+ type?: string | undefined;
3500
3506
  tokens?: string | undefined;
3501
3507
  status?: string | undefined;
3502
3508
  items?: number | undefined;
@@ -3608,6 +3614,7 @@ declare const eden: {
3608
3614
  query: {
3609
3615
  sort?: string | undefined;
3610
3616
  name?: string | undefined;
3617
+ type?: string | undefined;
3611
3618
  tokens?: string | undefined;
3612
3619
  status?: string | undefined;
3613
3620
  items?: number | undefined;
@@ -3800,6 +3807,7 @@ declare const eden: {
3800
3807
  query: {
3801
3808
  sort?: string | undefined;
3802
3809
  name?: string | undefined;
3810
+ type?: string | undefined;
3803
3811
  tokens?: string | undefined;
3804
3812
  status?: string | undefined;
3805
3813
  items?: number | undefined;
@@ -3828,6 +3836,7 @@ declare const eden: {
3828
3836
  query: {
3829
3837
  sort?: string | undefined;
3830
3838
  name?: string | undefined;
3839
+ type?: string | undefined;
3831
3840
  tokens?: string | undefined;
3832
3841
  status?: string | undefined;
3833
3842
  items?: number | undefined;
@@ -3856,6 +3865,7 @@ declare const eden: {
3856
3865
  query: {
3857
3866
  sort?: string | undefined;
3858
3867
  name?: string | undefined;
3868
+ type?: string | undefined;
3859
3869
  tokens?: string | undefined;
3860
3870
  status?: string | undefined;
3861
3871
  items?: number | undefined;
@@ -7026,6 +7036,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7026
7036
  query: {
7027
7037
  sort?: string | undefined;
7028
7038
  name?: string | undefined;
7039
+ type?: string | undefined;
7029
7040
  tokens?: string | undefined;
7030
7041
  status?: string | undefined;
7031
7042
  items?: number | undefined;
@@ -7142,6 +7153,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7142
7153
  query: {
7143
7154
  sort?: string | undefined;
7144
7155
  name?: string | undefined;
7156
+ type?: string | undefined;
7145
7157
  tokens?: string | undefined;
7146
7158
  status?: string | undefined;
7147
7159
  items?: number | undefined;
@@ -7614,6 +7626,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7614
7626
  query: {
7615
7627
  sort?: string | undefined;
7616
7628
  name?: string | undefined;
7629
+ type?: string | undefined;
7617
7630
  tokens?: string | undefined;
7618
7631
  status?: string | undefined;
7619
7632
  items?: number | undefined;
@@ -7650,6 +7663,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7650
7663
  query: {
7651
7664
  sort?: string | undefined;
7652
7665
  name?: string | undefined;
7666
+ type?: string | undefined;
7653
7667
  tokens?: string | undefined;
7654
7668
  status?: string | undefined;
7655
7669
  items?: number | undefined;
@@ -7687,6 +7701,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
7687
7701
  query: {
7688
7702
  sort?: string | undefined;
7689
7703
  name?: string | undefined;
7704
+ type?: string | undefined;
7690
7705
  tokens?: string | undefined;
7691
7706
  status?: string | undefined;
7692
7707
  items?: number | undefined;
@@ -11895,6 +11910,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
11895
11910
  query: {
11896
11911
  sort?: string | undefined;
11897
11912
  name?: string | undefined;
11913
+ type?: string | undefined;
11898
11914
  tokens?: string | undefined;
11899
11915
  status?: string | undefined;
11900
11916
  items?: number | undefined;
@@ -12006,6 +12022,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12006
12022
  query: {
12007
12023
  sort?: string | undefined;
12008
12024
  name?: string | undefined;
12025
+ type?: string | undefined;
12009
12026
  tokens?: string | undefined;
12010
12027
  status?: string | undefined;
12011
12028
  items?: number | undefined;
@@ -12198,6 +12215,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12198
12215
  query: {
12199
12216
  sort?: string | undefined;
12200
12217
  name?: string | undefined;
12218
+ type?: string | undefined;
12201
12219
  tokens?: string | undefined;
12202
12220
  status?: string | undefined;
12203
12221
  items?: number | undefined;
@@ -12226,6 +12244,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12226
12244
  query: {
12227
12245
  sort?: string | undefined;
12228
12246
  name?: string | undefined;
12247
+ type?: string | undefined;
12229
12248
  tokens?: string | undefined;
12230
12249
  status?: string | undefined;
12231
12250
  items?: number | undefined;
@@ -12254,6 +12273,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
12254
12273
  query: {
12255
12274
  sort?: string | undefined;
12256
12275
  name?: string | undefined;
12276
+ type?: string | undefined;
12257
12277
  tokens?: string | undefined;
12258
12278
  status?: string | undefined;
12259
12279
  items?: number | undefined;
@@ -14937,6 +14957,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
14937
14957
  query: {
14938
14958
  sort?: string | undefined;
14939
14959
  name?: string | undefined;
14960
+ type?: string | undefined;
14940
14961
  tokens?: string | undefined;
14941
14962
  status?: string | undefined;
14942
14963
  items?: number | undefined;
@@ -15048,6 +15069,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
15048
15069
  query: {
15049
15070
  sort?: string | undefined;
15050
15071
  name?: string | undefined;
15072
+ type?: string | undefined;
15051
15073
  tokens?: string | undefined;
15052
15074
  status?: string | undefined;
15053
15075
  items?: number | undefined;
@@ -15240,6 +15262,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
15240
15262
  query: {
15241
15263
  sort?: string | undefined;
15242
15264
  name?: string | undefined;
15265
+ type?: string | undefined;
15243
15266
  tokens?: string | undefined;
15244
15267
  status?: string | undefined;
15245
15268
  items?: number | undefined;
@@ -15268,6 +15291,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
15268
15291
  query: {
15269
15292
  sort?: string | undefined;
15270
15293
  name?: string | undefined;
15294
+ type?: string | undefined;
15271
15295
  tokens?: string | undefined;
15272
15296
  status?: string | undefined;
15273
15297
  items?: number | undefined;
@@ -15296,6 +15320,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
15296
15320
  query: {
15297
15321
  sort?: string | undefined;
15298
15322
  name?: string | undefined;
15323
+ type?: string | undefined;
15299
15324
  tokens?: string | undefined;
15300
15325
  status?: string | undefined;
15301
15326
  items?: number | undefined;
@@ -253,6 +253,7 @@ declare const app: Elysia<"", false, {
253
253
  query: {
254
254
  sort?: string | undefined;
255
255
  name?: string | undefined;
256
+ type?: string | undefined;
256
257
  tokens?: string | undefined;
257
258
  status?: string | undefined;
258
259
  items?: number | undefined;
@@ -369,6 +370,7 @@ declare const app: Elysia<"", false, {
369
370
  query: {
370
371
  sort?: string | undefined;
371
372
  name?: string | undefined;
373
+ type?: string | undefined;
372
374
  tokens?: string | undefined;
373
375
  status?: string | undefined;
374
376
  items?: number | undefined;
@@ -841,6 +843,7 @@ declare const app: Elysia<"", false, {
841
843
  query: {
842
844
  sort?: string | undefined;
843
845
  name?: string | undefined;
846
+ type?: string | undefined;
844
847
  tokens?: string | undefined;
845
848
  status?: string | undefined;
846
849
  items?: number | undefined;
@@ -877,6 +880,7 @@ declare const app: Elysia<"", false, {
877
880
  query: {
878
881
  sort?: string | undefined;
879
882
  name?: string | undefined;
883
+ type?: string | undefined;
880
884
  tokens?: string | undefined;
881
885
  status?: string | undefined;
882
886
  items?: number | undefined;
@@ -914,6 +918,7 @@ declare const app: Elysia<"", false, {
914
918
  query: {
915
919
  sort?: string | undefined;
916
920
  name?: string | undefined;
921
+ type?: string | undefined;
917
922
  tokens?: string | undefined;
918
923
  status?: string | undefined;
919
924
  items?: number | undefined;
@@ -99,8 +99,7 @@ export const main = async () => {
99
99
  log.error("rewards", `${failedBatches.length} batches failed.`);
100
100
  process.exit(1);
101
101
  }
102
- if (failedBatches.length === 0) {
102
+ if (failedBatches.length === 0)
103
103
  await file.delete();
104
- }
105
104
  };
106
105
  main();
@@ -13,7 +13,35 @@ export class VicunaProcessor extends GenericProcessor {
13
13
  const vicunaTVL = (await axios("https://vicuna.orthae.xyz/tvl")).data;
14
14
  const parsedName = typeInfo.name.toLowerCase().split(" ");
15
15
  parsedName.shift();
16
- const parsedNameForAPI = parsedName.join("-");
16
+ let parsedNameForAPI = parsedName.join("-");
17
+ const mapping = {
18
+ "swapx-os-ws": "swapx-ichi-ws-os-ws",
19
+ "swapx-scusd-usdc": "swapx-ichi-usdc-scusd-usdc",
20
+ "swapx-sts-ws": "swapx-ichi-ws-sts-ws",
21
+ "swapx-sacra-ws": "swapx-ichi-ws-sacra-sacra",
22
+ "solidly-swapx-ws-eco": "swapx-ws-eco",
23
+ "solidly-swapx-ws-goglz": "swapx-ws-goglz",
24
+ "solidly-swapx-ws-hedgy": "swapx-ws-hedgy",
25
+ "solidly-swapx-ws-tysg": "swapx-ws-tysg",
26
+ "solidly-swapx-ws-sdog": "swapx-ws-sdog",
27
+ "solidly-swapx-ws-shiba": "swapx-ws-shiba",
28
+ "balancer-ws-sts": "beets-ws-sts",
29
+ "balancer-scusd-sts": "beets-usdc-scusd",
30
+ "swapx-ws-swpx": "swapx-ichi-ws-swapx-ws",
31
+ "swapx-ws-usdc": "swapx-ichi-ws-usdc-ws",
32
+ "swapx-ws-sceth": "swapx-ichi-ws-sceth-ws",
33
+ "swapx-ws-sts": "swapx-ichi-ws-sts-sts",
34
+ "swapx-ws-weth": "swapx-ichi-ws-weth-ws",
35
+ "swapx-ws-os": "swapx-ichi-ws-os-os",
36
+ "swapx-usdc-swpx": "swapx-ichi-usdc-swapx-usdc",
37
+ "swapx-usdc-weth": "swapx-ichi-usdc-weth-weth",
38
+ "swapx-usdc-scusd": "swapx-ichi-usdc-scusd-usdc",
39
+ "swapx-usdc-sts": "swapx-ichi-usdc-sts-usdc",
40
+ "swapx-weth-usdc": "swapx-ichi-usdc-weth-usdc",
41
+ };
42
+ if (!!mapping[parsedNameForAPI]) {
43
+ parsedNameForAPI = mapping[parsedNameForAPI];
44
+ }
17
45
  const tvl = vicunaTVL[campaign.computeChainId][parsedNameForAPI];
18
46
  const priceTargetToken = tvl / totalSupply;
19
47
  return {
@@ -19,7 +19,9 @@ function satisfiesNameConditions(name, type) {
19
19
  case tokenType.poolside:
20
20
  return lowerCaseName.includes("poolside");
21
21
  case tokenType.balancerGauge:
22
- return lowerCaseName.includes("balancer") && !lowerCaseName.includes("aura deposit vault");
22
+ return (lowerCaseName.includes("balancer") &&
23
+ !lowerCaseName.includes("aura deposit vault") &&
24
+ !lowerCaseName.startsWith("vifi"));
23
25
  case tokenType.gearbox:
24
26
  return lowerCaseName.includes("farming of") || lowerCaseName.startsWith("trade");
25
27
  case tokenType.euler_borrow:
@@ -51,7 +51,7 @@ export class AccountingService {
51
51
  const breakdown = {};
52
52
  let consolidatedAmount = 0;
53
53
  for (const chainId of Object.values(ChainId).filter(id => typeof id === "number")) {
54
- const monthlyData = await AccountingRepository.getForMultisigBetweenDates(startDate, endDate);
54
+ const monthlyData = await AccountingRepository.getForMultisigByChainBetweenDates(chainId, startDate, endDate);
55
55
  let totalAmount = 0;
56
56
  for (const tx of monthlyData) {
57
57
  totalAmount += Number(tx.amountIn);
@@ -108,6 +108,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
108
108
  query: {
109
109
  sort?: string | undefined;
110
110
  name?: string | undefined;
111
+ type?: string | undefined;
111
112
  tokens?: string | undefined;
112
113
  status?: string | undefined;
113
114
  items?: number | undefined;
@@ -224,6 +225,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
224
225
  query: {
225
226
  sort?: string | undefined;
226
227
  name?: string | undefined;
228
+ type?: string | undefined;
227
229
  tokens?: string | undefined;
228
230
  status?: string | undefined;
229
231
  items?: number | undefined;
@@ -696,6 +698,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
696
698
  query: {
697
699
  sort?: string | undefined;
698
700
  name?: string | undefined;
701
+ type?: string | undefined;
699
702
  tokens?: string | undefined;
700
703
  status?: string | undefined;
701
704
  items?: number | undefined;
@@ -732,6 +735,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
732
735
  query: {
733
736
  sort?: string | undefined;
734
737
  name?: string | undefined;
738
+ type?: string | undefined;
735
739
  tokens?: string | undefined;
736
740
  status?: string | undefined;
737
741
  items?: number | undefined;
@@ -769,6 +773,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
769
773
  query: {
770
774
  sort?: string | undefined;
771
775
  name?: string | undefined;
776
+ type?: string | undefined;
772
777
  tokens?: string | undefined;
773
778
  status?: string | undefined;
774
779
  items?: number | undefined;
@@ -283,6 +283,7 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
283
283
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
284
284
  chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
285
285
  action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
286
+ type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
286
287
  creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
287
288
  tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
288
289
  test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -58,6 +58,7 @@ export const GetOpportunitiesQueryDto = t.Object({
58
58
  action: t.Optional(t.RegExp(/^(POOL|HOLD|DROP|LEND|BORROW)(,(POOL|HOLD|DROP|LEND|BORROW)){0,4}$/, {
59
59
  description: "A comma seprated list actions. Legal values are: `POOL`, `HOLD`, `DROP`, `LEND`, `BORROW`",
60
60
  })),
61
+ type: t.Optional(t.String({ description: "A comma separated list of Opportunity type" })),
61
62
  creatorAddress: t.Optional(t.String({ description: "Filter by creator address" })),
62
63
  tags: t.Optional(t.String({ description: "Filter by tag" })),
63
64
  test: t.Optional(t.Boolean({ description: "Include opportunities with test campaigns" })),
@@ -241,6 +241,7 @@ export class OpportunityRepository {
241
241
  const actions = query.action?.split(",");
242
242
  const status = query.status?.split(",");
243
243
  const tokens = query.tokens?.split(",");
244
+ const types = query.type?.split(",");
244
245
  const protocols = query.mainProtocolId?.split(",");
245
246
  const sort = (query.sort === "rewards" ? "dailyRewards" : query.sort) ?? "dailyRewards";
246
247
  const order = query.order ?? "desc";
@@ -253,6 +254,7 @@ export class OpportunityRepository {
253
254
  orderBy,
254
255
  where: {
255
256
  tags: !filters.tags ? undefined : { has: filters.tags },
257
+ type: !filters.type ? undefined : { in: types },
256
258
  tvl: filters.minimumTvl ? { gte: filters.minimumTvl } : undefined,
257
259
  chainId: !chainIds ? undefined : { in: chainIds },
258
260
  name: !filters.name ? undefined : { contains: filters.name, mode: "insensitive" },
@@ -123,6 +123,7 @@ export declare const v4: Elysia<"/v4", false, {
123
123
  query: {
124
124
  sort?: string | undefined;
125
125
  name?: string | undefined;
126
+ type?: string | undefined;
126
127
  tokens?: string | undefined;
127
128
  status?: string | undefined;
128
129
  items?: number | undefined;
@@ -239,6 +240,7 @@ export declare const v4: Elysia<"/v4", false, {
239
240
  query: {
240
241
  sort?: string | undefined;
241
242
  name?: string | undefined;
243
+ type?: string | undefined;
242
244
  tokens?: string | undefined;
243
245
  status?: string | undefined;
244
246
  items?: number | undefined;
@@ -711,6 +713,7 @@ export declare const v4: Elysia<"/v4", false, {
711
713
  query: {
712
714
  sort?: string | undefined;
713
715
  name?: string | undefined;
716
+ type?: string | undefined;
714
717
  tokens?: string | undefined;
715
718
  status?: string | undefined;
716
719
  items?: number | undefined;
@@ -747,6 +750,7 @@ export declare const v4: Elysia<"/v4", false, {
747
750
  query: {
748
751
  sort?: string | undefined;
749
752
  name?: string | undefined;
753
+ type?: string | undefined;
750
754
  tokens?: string | undefined;
751
755
  status?: string | undefined;
752
756
  items?: number | undefined;
@@ -784,6 +788,7 @@ export declare const v4: Elysia<"/v4", false, {
784
788
  query: {
785
789
  sort?: string | undefined;
786
790
  name?: string | undefined;
791
+ type?: string | undefined;
787
792
  tokens?: string | undefined;
788
793
  status?: string | undefined;
789
794
  items?: number | undefined;
@@ -125,7 +125,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""], displ
125
125
  const parsedName = typeInfo.name.split(" ");
126
126
  parsedName.shift();
127
127
  const parsedNameForCard = parsedName.join(" ");
128
- return `Deposit liquidity on ${parsedNameForCard} vault on Vicuna Finance`;
128
+ return `Deposit liquidity on ${parsedNameForCard.replace("BALANCER", "Beets")} vault on Vicuna Finance`;
129
129
  }
130
130
  case tokenType.satlayer:
131
131
  return `Restake ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;