@merkl/api 1.1.15 → 1.1.16
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.
- package/dist/src/constants.d.ts +0 -61
- package/dist/src/eden/index.d.ts +5130 -773
- package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +1 -1
- package/dist/src/engine/implementations/Aave/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/ERC4626/metadata.d.ts +31 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/ERC4626/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +2 -1
- package/dist/src/engine/tvl/factory.d.ts +1 -1
- package/dist/src/index.d.ts +2432 -249
- package/dist/src/modules/v4/apr/apr.model.d.ts +8 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +396 -20
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +2 -1
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +15 -17
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +63 -60
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +54 -34
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +1168 -44
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +14 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +271 -46
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +6 -0
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +3 -6
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +74 -21
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +21 -34
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +38 -40
- package/dist/src/modules/v4/payload/payload.controller.d.ts +468 -16
- package/dist/src/modules/v4/payload/payload.model.d.ts +10 -1
- package/dist/src/modules/v4/payload/payload.service.d.ts +379 -12
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +17 -3
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +429 -7
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +1 -2
- package/dist/src/modules/v4/programPayload/subPayloads/hypurrFi.d.ts +11 -3
- package/dist/src/modules/v4/reward/reward.controller.d.ts +3 -3
- package/dist/src/modules/v4/reward/reward.model.d.ts +18 -4
- package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -4
- package/dist/src/modules/v4/reward/reward.service.d.ts +13 -26
- package/dist/src/modules/v4/router.d.ts +2430 -250
- package/dist/src/modules/v4/token/token.controller.d.ts +14 -22
- package/dist/src/modules/v4/token/token.model.d.ts +15 -5
- package/dist/src/modules/v4/token/token.repository.d.ts +7 -11
- package/dist/src/modules/v4/token/token.service.d.ts +348 -0
- package/dist/src/modules/v4/transaction/transaction.model.d.ts +17 -0
- package/dist/src/modules/v4/user/user.controller.d.ts +2 -4
- package/dist/src/routes/v3/opportunity.d.ts +3 -0
- package/dist/src/routes/v3/payload.d.ts +1 -1
- package/dist/src/routes/v3/router.d.ts +4 -1
- package/dist/src/utils/parseDistributionType.d.ts +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,19 +1,30 @@
|
|
1
1
|
import { type MerklChainId } from "@angleprotocol/sdk/ts";
|
2
|
-
import { type OpportunityAction, type OpportunityManualOverride, type Prisma } from "@package/databases/api";
|
2
|
+
import { DistributionType, type OpportunityAction, type OpportunityManualOverride, type Prisma, TokenType } from "@package/databases/api";
|
3
3
|
import type { CampaignWithParams, FindCampaignModel } from "../../../modules/v4/campaign/campaign.model";
|
4
4
|
import type { Protocol } from "../protocol/protocol.model";
|
5
5
|
import type { Token } from "../token/token.model";
|
6
|
-
import type {
|
6
|
+
import type { FindManyOpportunityModel, FindOpportunityModel, Opportunity, OpportunityOverrideModel, OpportunityResourceModel, OpportunityUnique } from "./opportunity.model";
|
7
7
|
export declare abstract class OpportunityService {
|
8
|
+
static transformQueryToTestAndTokenTypes(query: {
|
9
|
+
tokenTypes?: TokenType[] | undefined;
|
10
|
+
point?: boolean | undefined;
|
11
|
+
test?: boolean | undefined;
|
12
|
+
}): {
|
13
|
+
tokenTypes: import("@package/databases").TokenType[] | undefined;
|
14
|
+
test: boolean;
|
15
|
+
};
|
16
|
+
static transformQueryToDistributionTypes(query: {
|
17
|
+
distributionTypes?: FindManyOpportunityModel["distributionTypes"];
|
18
|
+
}): DistributionType[] | undefined;
|
8
19
|
static hashId(opportunity: OpportunityUnique): string;
|
9
|
-
static getAprBins(query:
|
20
|
+
static getAprBins(query: FindManyOpportunityModel): Promise<{
|
10
21
|
data: {
|
11
22
|
count: any;
|
12
23
|
min: number;
|
13
24
|
max: number;
|
14
25
|
}[];
|
15
26
|
}>;
|
16
|
-
static getTvlBins(query:
|
27
|
+
static getTvlBins(query: FindManyOpportunityModel): Promise<{
|
17
28
|
data: {
|
18
29
|
count: any;
|
19
30
|
min: number;
|
@@ -55,10 +66,9 @@ export declare abstract class OpportunityService {
|
|
55
66
|
address: string;
|
56
67
|
id: string;
|
57
68
|
chainId: number;
|
69
|
+
type: import("@package/databases").TokenType;
|
58
70
|
icon: string;
|
59
71
|
isNative: boolean;
|
60
|
-
isPoint: boolean;
|
61
|
-
isPreTGE: boolean;
|
62
72
|
isTest: boolean;
|
63
73
|
verified: boolean;
|
64
74
|
} & {
|
@@ -81,10 +91,9 @@ export declare abstract class OpportunityService {
|
|
81
91
|
address: string;
|
82
92
|
id: string;
|
83
93
|
chainId: number;
|
94
|
+
type: import("@package/databases").TokenType;
|
84
95
|
icon: string;
|
85
96
|
isNative: boolean;
|
86
|
-
isPoint: boolean;
|
87
|
-
isPreTGE: boolean;
|
88
97
|
isTest: boolean;
|
89
98
|
verified: boolean;
|
90
99
|
displaySymbol: string;
|
@@ -137,10 +146,9 @@ export declare abstract class OpportunityService {
|
|
137
146
|
address: string;
|
138
147
|
id: string;
|
139
148
|
chainId: number;
|
149
|
+
type: import("@package/databases").TokenType;
|
140
150
|
icon: string;
|
141
151
|
isNative: boolean;
|
142
|
-
isPoint: boolean;
|
143
|
-
isPreTGE: boolean;
|
144
152
|
isTest: boolean;
|
145
153
|
verified: boolean;
|
146
154
|
} & {
|
@@ -163,10 +171,9 @@ export declare abstract class OpportunityService {
|
|
163
171
|
address: string;
|
164
172
|
id: string;
|
165
173
|
chainId: number;
|
174
|
+
type: import("@package/databases").TokenType;
|
166
175
|
icon: string;
|
167
176
|
isNative: boolean;
|
168
|
-
isPoint: boolean;
|
169
|
-
isPreTGE: boolean;
|
170
177
|
isTest: boolean;
|
171
178
|
verified: boolean;
|
172
179
|
displaySymbol: string;
|
@@ -218,10 +225,9 @@ export declare abstract class OpportunityService {
|
|
218
225
|
address: string;
|
219
226
|
id: string;
|
220
227
|
chainId: number;
|
228
|
+
type: import("@package/databases").TokenType;
|
221
229
|
icon: string;
|
222
230
|
isNative: boolean;
|
223
|
-
isPoint: boolean;
|
224
|
-
isPreTGE: boolean;
|
225
231
|
isTest: boolean;
|
226
232
|
verified: boolean;
|
227
233
|
} & {
|
@@ -244,10 +250,9 @@ export declare abstract class OpportunityService {
|
|
244
250
|
address: string;
|
245
251
|
id: string;
|
246
252
|
chainId: number;
|
253
|
+
type: import("@package/databases").TokenType;
|
247
254
|
icon: string;
|
248
255
|
isNative: boolean;
|
249
|
-
isPoint: boolean;
|
250
|
-
isPreTGE: boolean;
|
251
256
|
isTest: boolean;
|
252
257
|
verified: boolean;
|
253
258
|
displaySymbol: string;
|
@@ -303,13 +308,13 @@ export declare abstract class OpportunityService {
|
|
303
308
|
timestamp: string | bigint;
|
304
309
|
cumulated: number;
|
305
310
|
breakdowns: {
|
306
|
-
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;
|
311
|
+
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" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
|
307
312
|
value: number;
|
308
|
-
type: "
|
313
|
+
type: "TOKEN" | "CAMPAIGN" | "PROTOCOL";
|
309
314
|
identifier: string;
|
310
315
|
}[];
|
311
316
|
} | undefined;
|
312
|
-
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;
|
317
|
+
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" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
|
313
318
|
explorerAddress?: string | undefined;
|
314
319
|
tvlRecord?: {
|
315
320
|
timestamp: string | bigint;
|
@@ -324,7 +329,7 @@ export declare abstract class OpportunityService {
|
|
324
329
|
timestamp: string | bigint;
|
325
330
|
total: number;
|
326
331
|
breakdowns: {
|
327
|
-
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;
|
332
|
+
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" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
|
328
333
|
token: {
|
329
334
|
price?: number | null | undefined;
|
330
335
|
symbol: string;
|
@@ -333,10 +338,9 @@ export declare abstract class OpportunityService {
|
|
333
338
|
address: string;
|
334
339
|
id: string;
|
335
340
|
chainId: number;
|
341
|
+
type: "TOKEN" | "PRETGE" | "POINT";
|
336
342
|
icon: string;
|
337
343
|
isNative: boolean;
|
338
|
-
isPoint: boolean;
|
339
|
-
isPreTGE: boolean;
|
340
344
|
isTest: boolean;
|
341
345
|
verified: boolean;
|
342
346
|
};
|
@@ -355,10 +359,9 @@ export declare abstract class OpportunityService {
|
|
355
359
|
address: string;
|
356
360
|
id: string;
|
357
361
|
chainId: number;
|
362
|
+
type: "TOKEN" | "PRETGE" | "POINT";
|
358
363
|
icon: string;
|
359
364
|
isNative: boolean;
|
360
|
-
isPoint: boolean;
|
361
|
-
isPreTGE: boolean;
|
362
365
|
isTest: boolean;
|
363
366
|
verified: boolean;
|
364
367
|
}[];
|
@@ -381,7 +384,7 @@ export declare abstract class OpportunityService {
|
|
381
384
|
computedUntil: string | number;
|
382
385
|
processingStarted: string | number;
|
383
386
|
} | undefined;
|
384
|
-
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;
|
387
|
+
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" | "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE" | "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT" | "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT" | undefined;
|
385
388
|
rootCampaignId?: string | undefined;
|
386
389
|
parentCampaignId?: string | undefined;
|
387
390
|
distributionChain?: {
|
@@ -402,10 +405,9 @@ export declare abstract class OpportunityService {
|
|
402
405
|
address: string;
|
403
406
|
id: string;
|
404
407
|
chainId: number;
|
408
|
+
type: "TOKEN" | "PRETGE" | "POINT";
|
405
409
|
icon: string;
|
406
410
|
isNative: boolean;
|
407
|
-
isPoint: boolean;
|
408
|
-
isPreTGE: boolean;
|
409
411
|
isTest: boolean;
|
410
412
|
verified: boolean;
|
411
413
|
};
|
@@ -456,7 +458,7 @@ export declare abstract class OpportunityService {
|
|
456
458
|
* @param query
|
457
459
|
* @returns A list of opportunities
|
458
460
|
*/
|
459
|
-
static findMany(query:
|
461
|
+
static findMany(query: FindManyOpportunityModel): Promise<{
|
460
462
|
aprRecord: {
|
461
463
|
cumulated: number;
|
462
464
|
timestamp: bigint;
|
@@ -497,10 +499,9 @@ export declare abstract class OpportunityService {
|
|
497
499
|
address: string;
|
498
500
|
id: string;
|
499
501
|
chainId: number;
|
502
|
+
type: import("@package/databases").TokenType;
|
500
503
|
icon: string;
|
501
504
|
isNative: boolean;
|
502
|
-
isPoint: boolean;
|
503
|
-
isPreTGE: boolean;
|
504
505
|
isTest: boolean;
|
505
506
|
verified: boolean;
|
506
507
|
displaySymbol: string;
|
@@ -518,10 +519,9 @@ export declare abstract class OpportunityService {
|
|
518
519
|
address: string;
|
519
520
|
id: string;
|
520
521
|
chainId: number;
|
522
|
+
type: import("@package/databases").TokenType;
|
521
523
|
icon: string;
|
522
524
|
isNative: boolean;
|
523
|
-
isPoint: boolean;
|
524
|
-
isPreTGE: boolean;
|
525
525
|
isTest: boolean;
|
526
526
|
verified: boolean;
|
527
527
|
} & {
|
@@ -565,7 +565,7 @@ export declare abstract class OpportunityService {
|
|
565
565
|
* @param query
|
566
566
|
* @returns the number of opportunities
|
567
567
|
*/
|
568
|
-
static countMany(query:
|
568
|
+
static countMany(query: FindManyOpportunityModel): Promise<number>;
|
569
569
|
static findLiveWithCampaigns(chainId: MerklChainId, take?: number): Promise<{
|
570
570
|
aprRecord: {
|
571
571
|
cumulated: number;
|
@@ -607,10 +607,9 @@ export declare abstract class OpportunityService {
|
|
607
607
|
address: string;
|
608
608
|
id: string;
|
609
609
|
chainId: number;
|
610
|
+
type: import("@package/databases").TokenType;
|
610
611
|
icon: string;
|
611
612
|
isNative: boolean;
|
612
|
-
isPoint: boolean;
|
613
|
-
isPreTGE: boolean;
|
614
613
|
isTest: boolean;
|
615
614
|
verified: boolean;
|
616
615
|
displaySymbol: string;
|
@@ -628,10 +627,9 @@ export declare abstract class OpportunityService {
|
|
628
627
|
address: string;
|
629
628
|
id: string;
|
630
629
|
chainId: number;
|
630
|
+
type: import("@package/databases").TokenType;
|
631
631
|
icon: string;
|
632
632
|
isNative: boolean;
|
633
|
-
isPoint: boolean;
|
634
|
-
isPreTGE: boolean;
|
635
633
|
isTest: boolean;
|
636
634
|
verified: boolean;
|
637
635
|
} & {
|
@@ -669,13 +667,13 @@ export declare abstract class OpportunityService {
|
|
669
667
|
dailyRewards: number;
|
670
668
|
tags: string[];
|
671
669
|
}[]>;
|
672
|
-
static aggregate(query:
|
670
|
+
static aggregate(query: FindManyOpportunityModel, field: keyof Prisma.OpportunitySumAggregateInputType): Promise<{
|
673
671
|
sum: string;
|
674
672
|
}>;
|
675
|
-
static aggregateMin(query:
|
673
|
+
static aggregateMin(query: FindManyOpportunityModel, field: keyof Prisma.OpportunityMinAggregateInputType): Promise<{
|
676
674
|
min: string;
|
677
675
|
}>;
|
678
|
-
static aggregateMax(query:
|
676
|
+
static aggregateMax(query: FindManyOpportunityModel, field: keyof Prisma.OpportunityMaxAggregateInputType): Promise<{
|
679
677
|
max: string;
|
680
678
|
}>;
|
681
679
|
static update(id: string, data: Partial<Opportunity["raw"]>): Promise<{
|