@merkl/api 0.20.2 → 0.20.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.
@@ -134,136 +134,44 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
134
134
  };
135
135
  headers: unknown;
136
136
  response: {
137
- 200: ({
138
- protocol?: {
139
- id: string;
140
- name: string;
141
- url: string;
142
- description: string;
143
- tags: string[];
144
- icon: string;
145
- } | null | undefined;
146
- depositUrl?: string | undefined;
147
- explorerAddress?: string | undefined;
148
- aprRecord?: {
149
- timestamp: string | bigint;
137
+ 200: {
138
+ apr: number;
139
+ aprRecord: {
150
140
  cumulated: number;
141
+ timestamp: bigint;
151
142
  breakdowns: {
152
143
  id: number;
153
- type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
144
+ type: import("@db/api").$Enums.AprType;
145
+ uuid: string;
154
146
  identifier: string;
155
147
  value: number;
156
148
  aprRecordId: string;
157
149
  }[];
158
- } | undefined;
159
- tvlRecord?: {
150
+ };
151
+ tvlRecord: {
152
+ id: string;
160
153
  total: number;
161
- timestamp: string | bigint;
154
+ timestamp: bigint;
162
155
  breakdowns: {
163
156
  id: number;
164
- type: "TOKEN" | "PROTOCOL";
157
+ type: import("@db/api").$Enums.TvlType;
158
+ uuid: string;
165
159
  identifier: string;
166
160
  value: number;
167
161
  tvlRecordId: string;
168
162
  }[];
169
- } | undefined;
170
- rewardsRecord?: {
163
+ };
164
+ rewardsRecord: {
171
165
  id: string;
172
166
  total: number;
173
- timestamp: string | bigint;
167
+ timestamp: bigint;
174
168
  breakdowns: {
175
169
  id: number;
176
- token: {
177
- price?: number | null | undefined;
178
- symbol: string;
179
- id: string;
180
- name: string | null;
181
- icon: string;
182
- address: string;
183
- chainId: number;
184
- decimals: number;
185
- verified: boolean;
186
- isTest: boolean;
187
- };
170
+ uuid: string;
188
171
  value: number;
189
172
  campaignId: string;
190
- amount: string | bigint;
191
173
  dailyRewardsRecordId: string;
192
- }[];
193
- } | undefined;
194
- id: string;
195
- name: string;
196
- type: string;
197
- status: string;
198
- tokens: {
199
- price?: number | null | undefined;
200
- symbol: string;
201
- id: string;
202
- name: string | null;
203
- icon: string;
204
- address: string;
205
- chainId: number;
206
- decimals: number;
207
- verified: boolean;
208
- isTest: boolean;
209
- }[];
210
- tags: string[];
211
- identifier: string;
212
- chain: {
213
- id: number;
214
- name: string;
215
- icon: string;
216
- };
217
- action: string;
218
- chainId: number;
219
- tvl: number;
220
- apr: number;
221
- dailyRewards: number;
222
- } | null)[];
223
- } | {
224
- 200: never;
225
- } | {
226
- 200: (Response | ({
227
- protocol?: {
228
- id: string;
229
- name: string;
230
- url: string;
231
- description: string;
232
- tags: string[];
233
- icon: string;
234
- } | null | undefined;
235
- depositUrl?: string | undefined;
236
- explorerAddress?: string | undefined;
237
- aprRecord?: {
238
- timestamp: string | bigint;
239
- cumulated: number;
240
- breakdowns: {
241
- id: number;
242
- type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
243
- identifier: string;
244
- value: number;
245
- aprRecordId: string;
246
- }[];
247
- } | undefined;
248
- tvlRecord?: {
249
- total: number;
250
- timestamp: string | bigint;
251
- breakdowns: {
252
- id: number;
253
- type: "TOKEN" | "PROTOCOL";
254
- identifier: string;
255
- value: number;
256
- tvlRecordId: string;
257
- }[];
258
- } | undefined;
259
- rewardsRecord?: {
260
- id: string;
261
- total: number;
262
- timestamp: string | bigint;
263
- breakdowns: {
264
- id: number;
265
174
  token: {
266
- price?: number | null | undefined;
267
175
  symbol: string;
268
176
  id: string;
269
177
  name: string | null;
@@ -271,107 +179,26 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
271
179
  address: string;
272
180
  chainId: number;
273
181
  decimals: number;
182
+ displaySymbol: string;
274
183
  verified: boolean;
275
184
  isTest: boolean;
185
+ isPoint: boolean;
186
+ isNative: boolean;
187
+ price: number | null;
276
188
  };
277
- value: number;
278
- campaignId: string;
279
- amount: string | bigint;
280
- dailyRewardsRecordId: string;
189
+ amount: bigint;
281
190
  }[];
282
- } | undefined;
283
- id: string;
284
- name: string;
285
- type: string;
286
- status: string;
287
- tokens: {
288
- price?: number | null | undefined;
289
- symbol: string;
290
- id: string;
291
- name: string | null;
292
- icon: string;
293
- address: string;
294
- chainId: number;
295
- decimals: number;
296
- verified: boolean;
297
- isTest: boolean;
298
- }[];
299
- tags: string[];
300
- identifier: string;
301
- chain: {
302
- id: number;
303
- name: string;
304
- icon: string;
305
191
  };
306
- action: string;
307
- chainId: number;
308
- tvl: number;
309
- apr: number;
310
- dailyRewards: number;
311
- } | null)[] | {
312
- 200: ({
313
- protocol?: {
314
- id: string;
192
+ campaigns: {
193
+ params: any;
194
+ chain: {
195
+ id: number;
315
196
  name: string;
316
- url: string;
317
- description: string;
318
- tags: string[];
319
197
  icon: string;
320
- } | null | undefined;
321
- depositUrl?: string | undefined;
322
- explorerAddress?: string | undefined;
323
- aprRecord?: {
324
- timestamp: string | bigint;
325
- cumulated: number;
326
- breakdowns: {
327
- id: number;
328
- type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
329
- identifier: string;
330
- value: number;
331
- aprRecordId: string;
332
- }[];
333
- } | undefined;
334
- tvlRecord?: {
335
- total: number;
336
- timestamp: string | bigint;
337
- breakdowns: {
338
- id: number;
339
- type: "TOKEN" | "PROTOCOL";
340
- identifier: string;
341
- value: number;
342
- tvlRecordId: string;
343
- }[];
344
- } | undefined;
345
- rewardsRecord?: {
346
- id: string;
347
- total: number;
348
- timestamp: string | bigint;
349
- breakdowns: {
350
- id: number;
351
- token: {
352
- price?: number | null | undefined;
353
- symbol: string;
354
- id: string;
355
- name: string | null;
356
- icon: string;
357
- address: string;
358
- chainId: number;
359
- decimals: number;
360
- verified: boolean;
361
- isTest: boolean;
362
- };
363
- value: number;
364
- campaignId: string;
365
- amount: string | bigint;
366
- dailyRewardsRecordId: string;
367
- }[];
368
- } | undefined;
369
- id: string;
370
- name: string;
371
- type: string;
372
- status: string;
373
- tokens: {
374
- price?: number | null | undefined;
198
+ };
199
+ endTimestamp: number;
200
+ startTimestamp: number;
201
+ rewardToken: {
375
202
  symbol: string;
376
203
  id: string;
377
204
  name: string | null;
@@ -381,83 +208,61 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
381
208
  decimals: number;
382
209
  verified: boolean;
383
210
  isTest: boolean;
384
- }[];
385
- tags: string[];
386
- identifier: string;
387
- chain: {
211
+ isPoint: boolean;
212
+ isNative: boolean;
213
+ } & {
214
+ price?: number | null | undefined;
215
+ };
216
+ distributionChain: {
388
217
  id: number;
389
218
  name: string;
390
219
  icon: string;
220
+ } | undefined;
221
+ campaignStatus: {
222
+ computedUntil: number;
223
+ processingStarted: number;
224
+ error: string;
225
+ status: import("@db/api").$Enums.RunStatus;
226
+ details: import("database/api/.generated/runtime/library").JsonValue;
227
+ campaignId: string;
228
+ } | undefined;
229
+ creatorAddress: string;
230
+ creator: {
231
+ tags: string[];
232
+ address: string;
233
+ creatorId: string | null;
391
234
  };
392
- action: string;
393
- chainId: number;
394
- tvl: number;
395
- apr: number;
396
- dailyRewards: number;
397
- } | null)[];
398
- }) & ({
399
- protocol?: {
400
- id: string;
401
- name: string;
402
- url: string;
403
- description: string;
404
- tags: string[];
405
- icon: string;
406
- } | null | undefined;
407
- depositUrl?: string | undefined;
408
- explorerAddress?: string | undefined;
409
- aprRecord?: {
410
- timestamp: string | bigint;
411
- cumulated: number;
412
- breakdowns: {
413
- id: number;
414
- type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
415
- identifier: string;
416
- value: number;
417
- aprRecordId: string;
418
- }[];
419
- } | undefined;
420
- tvlRecord?: {
421
- total: number;
422
- timestamp: string | bigint;
423
- breakdowns: {
424
- id: number;
425
- type: "TOKEN" | "PROTOCOL";
235
+ createdAt: string;
236
+ Opportunity: {
237
+ id: string;
238
+ name: string;
239
+ type: string;
240
+ status: import("@db/api").$Enums.Status;
241
+ tags: string[];
426
242
  identifier: string;
427
- value: number;
428
- tvlRecordId: string;
429
- }[];
430
- } | undefined;
431
- rewardsRecord?: {
243
+ action: import("@db/api").$Enums.OpportunityAction;
244
+ chainId: number;
245
+ depositUrl: string | null;
246
+ explorerAddress: string | null;
247
+ mainProtocolId: string | null;
248
+ tvl: number;
249
+ apr: number;
250
+ dailyRewards: number;
251
+ };
432
252
  id: string;
433
- total: number;
434
- timestamp: string | bigint;
435
- breakdowns: {
436
- id: number;
437
- token: {
438
- price?: number | null | undefined;
439
- symbol: string;
440
- id: string;
441
- name: string | null;
442
- icon: string;
443
- address: string;
444
- chainId: number;
445
- decimals: number;
446
- verified: boolean;
447
- isTest: boolean;
448
- };
449
- value: number;
450
- campaignId: string;
451
- amount: string | bigint;
452
- dailyRewardsRecordId: string;
453
- }[];
454
- } | undefined;
253
+ type: string;
254
+ subType: number | null;
255
+ computeChainId: number;
256
+ distributionChainId: number;
257
+ campaignId: string;
258
+ rewardTokenId: string;
259
+ amount: string;
260
+ opportunityId: string;
261
+ }[] | undefined;
455
262
  id: string;
456
- name: string;
457
- type: string;
458
- status: string;
459
- tokens: {
460
- price?: number | null | undefined;
263
+ depositUrl: string | undefined;
264
+ explorerAddress: string | undefined;
265
+ tokens: ({
461
266
  symbol: string;
462
267
  id: string;
463
268
  name: string | null;
@@ -467,109 +272,34 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
467
272
  decimals: number;
468
273
  verified: boolean;
469
274
  isTest: boolean;
470
- }[];
471
- tags: string[];
472
- identifier: string;
275
+ isPoint: boolean;
276
+ isNative: boolean;
277
+ } & {
278
+ price?: number | null | undefined;
279
+ })[];
473
280
  chain: {
474
281
  id: number;
475
282
  name: string;
476
283
  icon: string;
477
284
  };
478
- action: string;
479
- chainId: number;
480
- tvl: number;
481
- apr: number;
482
- dailyRewards: number;
483
- } | null)[];
484
- } | {
485
- 200: {
486
- 200: ({
487
- protocol?: {
488
- id: string;
489
- name: string;
490
- url: string;
491
- description: string;
492
- tags: string[];
493
- icon: string;
494
- } | null | undefined;
495
- depositUrl?: string | undefined;
496
- explorerAddress?: string | undefined;
497
- aprRecord?: {
498
- timestamp: string | bigint;
499
- cumulated: number;
500
- breakdowns: {
501
- id: number;
502
- type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
503
- identifier: string;
504
- value: number;
505
- aprRecordId: string;
506
- }[];
507
- } | undefined;
508
- tvlRecord?: {
509
- total: number;
510
- timestamp: string | bigint;
511
- breakdowns: {
512
- id: number;
513
- type: "TOKEN" | "PROTOCOL";
514
- identifier: string;
515
- value: number;
516
- tvlRecordId: string;
517
- }[];
518
- } | undefined;
519
- rewardsRecord?: {
520
- id: string;
521
- total: number;
522
- timestamp: string | bigint;
523
- breakdowns: {
524
- id: number;
525
- token: {
526
- price?: number | null | undefined;
527
- symbol: string;
528
- id: string;
529
- name: string | null;
530
- icon: string;
531
- address: string;
532
- chainId: number;
533
- decimals: number;
534
- verified: boolean;
535
- isTest: boolean;
536
- };
537
- value: number;
538
- campaignId: string;
539
- amount: string | bigint;
540
- dailyRewardsRecordId: string;
541
- }[];
542
- } | undefined;
285
+ protocol: {
543
286
  id: string;
544
287
  name: string;
545
- type: string;
546
- status: string;
547
- tokens: {
548
- price?: number | null | undefined;
549
- symbol: string;
550
- id: string;
551
- name: string | null;
552
- icon: string;
553
- address: string;
554
- chainId: number;
555
- decimals: number;
556
- verified: boolean;
557
- isTest: boolean;
558
- }[];
288
+ url: string;
289
+ description: string;
559
290
  tags: string[];
560
- identifier: string;
561
- chain: {
562
- id: number;
563
- name: string;
564
- icon: string;
565
- };
566
- action: string;
567
- chainId: number;
568
- tvl: number;
569
- apr: number;
570
- dailyRewards: number;
571
- } | null)[];
572
- };
291
+ icon: string;
292
+ } | undefined;
293
+ name: string;
294
+ type: string;
295
+ status: import("@db/api").$Enums.Status;
296
+ tags: string[];
297
+ identifier: string;
298
+ action: import("@db/api").$Enums.OpportunityAction;
299
+ chainId: number;
300
+ tvl: number;
301
+ dailyRewards: number;
302
+ }[];
573
303
  };
574
304
  };
575
305
  };
@@ -15,6 +15,7 @@ import type { OpportunityRepository } from "./opportunity.repository";
15
15
  */
16
16
  export type Opportunity = Resource<"Opportunity", "mainProtocolId", {
17
17
  depositUrl?: string;
18
+ explorerAddress?: string;
18
19
  chain: Chain["model"];
19
20
  tokens: Token["model"][];
20
21
  protocol?: Protocol["model"];
@@ -521,6 +521,7 @@ export declare abstract class OpportunityService {
521
521
  }[] | undefined;
522
522
  id: string;
523
523
  depositUrl: string | undefined;
524
+ explorerAddress: string | undefined;
524
525
  tokens: ({
525
526
  symbol: string;
526
527
  id: string;
@@ -556,7 +557,6 @@ export declare abstract class OpportunityService {
556
557
  identifier: string;
557
558
  action: import("@db/api").$Enums.OpportunityAction;
558
559
  chainId: number;
559
- explorerAddress: string | null;
560
560
  tvl: number;
561
561
  dailyRewards: number;
562
562
  }[]>;
@@ -694,6 +694,7 @@ export declare abstract class OpportunityService {
694
694
  }[] | undefined;
695
695
  id: string;
696
696
  depositUrl: string | undefined;
697
+ explorerAddress: string | undefined;
697
698
  tokens: ({
698
699
  symbol: string;
699
700
  id: string;
@@ -729,7 +730,6 @@ export declare abstract class OpportunityService {
729
730
  identifier: string;
730
731
  action: import("@db/api").$Enums.OpportunityAction;
731
732
  chainId: number;
732
- explorerAddress: string | null;
733
733
  tvl: number;
734
734
  dailyRewards: number;
735
735
  }[]>;
@@ -863,6 +863,7 @@ export declare abstract class OpportunityService {
863
863
  }[] | undefined;
864
864
  id: string;
865
865
  depositUrl: string | undefined;
866
+ explorerAddress: string | undefined;
866
867
  tokens: ({
867
868
  symbol: string;
868
869
  id: string;
@@ -898,13 +899,13 @@ export declare abstract class OpportunityService {
898
899
  identifier: string;
899
900
  action: import("@db/api").$Enums.OpportunityAction;
900
901
  chainId: number;
901
- explorerAddress: string | null;
902
902
  tvl: number;
903
903
  dailyRewards: number;
904
904
  };
905
905
  static formatResponseBase(opportunity: LightOpportunityFromDB): {
906
906
  id: string;
907
907
  depositUrl: string | undefined;
908
+ explorerAddress: string | undefined;
908
909
  tokens: ({
909
910
  symbol: string;
910
911
  id: string;
@@ -940,7 +941,6 @@ export declare abstract class OpportunityService {
940
941
  identifier: string;
941
942
  action: import("@db/api").$Enums.OpportunityAction;
942
943
  chainId: number;
943
- explorerAddress: string | null;
944
944
  tvl: number;
945
945
  apr: number;
946
946
  dailyRewards: number;
@@ -243,6 +243,7 @@ export class OpportunityService {
243
243
  ...opp,
244
244
  id,
245
245
  depositUrl: opp.depositUrl ?? undefined,
246
+ explorerAddress: opp.explorerAddress ?? undefined,
246
247
  tokens: Tokens.map(t => TokenService.format(t)),
247
248
  chain: Chain,
248
249
  protocol: MainProtocol ?? undefined,
@@ -136,6 +136,7 @@ export declare abstract class RewardService {
136
136
  }[] | undefined;
137
137
  id: string;
138
138
  depositUrl: string | undefined;
139
+ explorerAddress: string | undefined;
139
140
  tokens: ({
140
141
  symbol: string;
141
142
  id: string;
@@ -171,7 +172,6 @@ export declare abstract class RewardService {
171
172
  identifier: string;
172
173
  action: import("@db/api").$Enums.OpportunityAction;
173
174
  chainId: number;
174
- explorerAddress: string | null;
175
175
  tvl: number;
176
176
  dailyRewards: number;
177
177
  }, number>>;