@merkl/api 0.20.1 → 0.20.2

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,44 +134,136 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
134
134
  };
135
135
  headers: unknown;
136
136
  response: {
137
- 200: {
138
- apr: number;
139
- aprRecord: {
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;
140
150
  cumulated: number;
141
- timestamp: bigint;
142
151
  breakdowns: {
143
152
  id: number;
144
- type: import("@db/api").$Enums.AprType;
145
- uuid: string;
153
+ type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
146
154
  identifier: string;
147
155
  value: number;
148
156
  aprRecordId: string;
149
157
  }[];
150
- };
151
- tvlRecord: {
152
- id: string;
158
+ } | undefined;
159
+ tvlRecord?: {
153
160
  total: number;
154
- timestamp: bigint;
161
+ timestamp: string | bigint;
155
162
  breakdowns: {
156
163
  id: number;
157
- type: import("@db/api").$Enums.TvlType;
158
- uuid: string;
164
+ type: "TOKEN" | "PROTOCOL";
159
165
  identifier: string;
160
166
  value: number;
161
167
  tvlRecordId: string;
162
168
  }[];
163
- };
164
- rewardsRecord: {
169
+ } | undefined;
170
+ rewardsRecord?: {
165
171
  id: string;
166
172
  total: number;
167
- timestamp: bigint;
173
+ timestamp: string | bigint;
168
174
  breakdowns: {
169
175
  id: number;
170
- uuid: string;
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
+ };
171
188
  value: number;
172
189
  campaignId: string;
190
+ amount: string | bigint;
173
191
  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;
174
265
  token: {
266
+ price?: number | null | undefined;
175
267
  symbol: string;
176
268
  id: string;
177
269
  name: string | null;
@@ -179,26 +271,107 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
179
271
  address: string;
180
272
  chainId: number;
181
273
  decimals: number;
182
- displaySymbol: string;
183
274
  verified: boolean;
184
275
  isTest: boolean;
185
- isPoint: boolean;
186
- isNative: boolean;
187
- price: number | null;
188
276
  };
189
- amount: bigint;
277
+ value: number;
278
+ campaignId: string;
279
+ amount: string | bigint;
280
+ dailyRewardsRecordId: string;
190
281
  }[];
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;
191
305
  };
192
- campaigns: {
193
- params: any;
194
- chain: {
195
- id: number;
306
+ action: string;
307
+ chainId: number;
308
+ tvl: number;
309
+ apr: number;
310
+ dailyRewards: number;
311
+ } | null)[] | {
312
+ 200: ({
313
+ protocol?: {
314
+ id: string;
196
315
  name: string;
316
+ url: string;
317
+ description: string;
318
+ tags: string[];
197
319
  icon: string;
198
- };
199
- endTimestamp: number;
200
- startTimestamp: number;
201
- rewardToken: {
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;
202
375
  symbol: string;
203
376
  id: string;
204
377
  name: string | null;
@@ -208,60 +381,83 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
208
381
  decimals: number;
209
382
  verified: boolean;
210
383
  isTest: boolean;
211
- isPoint: boolean;
212
- isNative: boolean;
213
- } & {
214
- price?: number | null | undefined;
215
- };
216
- distributionChain: {
384
+ }[];
385
+ tags: string[];
386
+ identifier: string;
387
+ chain: {
217
388
  id: number;
218
389
  name: string;
219
390
  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;
234
391
  };
235
- createdAt: string;
236
- Opportunity: {
237
- id: string;
238
- name: string;
239
- type: string;
240
- status: import("@db/api").$Enums.Status;
241
- tags: string[];
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";
242
415
  identifier: string;
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
- };
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";
426
+ identifier: string;
427
+ value: number;
428
+ tvlRecordId: string;
429
+ }[];
430
+ } | undefined;
431
+ rewardsRecord?: {
252
432
  id: string;
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;
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;
262
455
  id: string;
263
- depositUrl: string | undefined;
264
- tokens: ({
456
+ name: string;
457
+ type: string;
458
+ status: string;
459
+ tokens: {
460
+ price?: number | null | undefined;
265
461
  symbol: string;
266
462
  id: string;
267
463
  name: string | null;
@@ -271,35 +467,109 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
271
467
  decimals: number;
272
468
  verified: boolean;
273
469
  isTest: boolean;
274
- isPoint: boolean;
275
- isNative: boolean;
276
- } & {
277
- price?: number | null | undefined;
278
- })[];
470
+ }[];
471
+ tags: string[];
472
+ identifier: string;
279
473
  chain: {
280
474
  id: number;
281
475
  name: string;
282
476
  icon: string;
283
477
  };
284
- protocol: {
285
- id: string;
286
- name: string;
287
- url: string;
288
- description: string;
289
- tags: string[];
290
- icon: string;
291
- } | undefined;
292
- name: string;
293
- type: string;
294
- status: import("@db/api").$Enums.Status;
295
- tags: string[];
296
- identifier: string;
297
- action: import("@db/api").$Enums.OpportunityAction;
478
+ action: string;
298
479
  chainId: number;
299
- explorerAddress: string | null;
300
480
  tvl: number;
481
+ apr: number;
301
482
  dailyRewards: number;
302
- }[];
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;
543
+ id: string;
544
+ 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
+ }[];
559
+ 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
+ };
303
573
  };
304
574
  };
305
575
  };
@@ -363,6 +633,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
363
633
  icon: string;
364
634
  } | null | undefined;
365
635
  depositUrl?: string | undefined;
636
+ explorerAddress?: string | undefined;
366
637
  aprRecord?: {
367
638
  timestamp: string | bigint;
368
639
  cumulated: number;
@@ -493,6 +764,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
493
764
  icon: string;
494
765
  } | null | undefined;
495
766
  depositUrl?: string | undefined;
767
+ explorerAddress?: string | undefined;
496
768
  aprRecord?: {
497
769
  timestamp: string | bigint;
498
770
  cumulated: number;
@@ -657,6 +929,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
657
929
  icon: string;
658
930
  } | null | undefined;
659
931
  depositUrl?: string | undefined;
932
+ explorerAddress?: string | undefined;
660
933
  aprRecord?: {
661
934
  timestamp: string | bigint;
662
935
  cumulated: number;
@@ -40,6 +40,7 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
40
40
  apr: import("@sinclair/typebox").TNumber;
41
41
  dailyRewards: import("@sinclair/typebox").TNumber;
42
42
  depositUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
43
+ explorerAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
43
44
  tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
44
45
  id: import("@sinclair/typebox").TString;
45
46
  tokens: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
@@ -156,6 +157,7 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
156
157
  action: import("@sinclair/typebox").TString;
157
158
  chainId: import("@sinclair/typebox").TNumber;
158
159
  depositUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
160
+ explorerAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
159
161
  tvl: import("@sinclair/typebox").TNumber;
160
162
  apr: import("@sinclair/typebox").TNumber;
161
163
  dailyRewards: import("@sinclair/typebox").TNumber;
@@ -19,6 +19,7 @@ export const OpportunityResourceDto = t.Object({
19
19
  apr: t.Number(),
20
20
  dailyRewards: t.Number(),
21
21
  depositUrl: t.Optional(t.String()),
22
+ explorerAddress: t.Optional(t.String()),
22
23
  tags: t.Array(t.String()),
23
24
  id: t.String(),
24
25
  tokens: t.Array(TokenResourceDto),
@@ -124,6 +124,7 @@ export declare abstract class OpportunityService {
124
124
  icon: string;
125
125
  } | null | undefined;
126
126
  depositUrl?: string | undefined;
127
+ explorerAddress?: string | undefined;
127
128
  aprRecord?: {
128
129
  timestamp: string | bigint;
129
130
  cumulated: number;
@@ -260,6 +261,7 @@ export declare abstract class OpportunityService {
260
261
  icon: string;
261
262
  } | null | undefined;
262
263
  depositUrl?: string | undefined;
264
+ explorerAddress?: string | undefined;
263
265
  aprRecord?: {
264
266
  timestamp: string | bigint;
265
267
  cumulated: number;