@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
@@ -65,6 +65,9 @@ export declare abstract class OpportunityConvertor {
|
|
65
65
|
[id: `61_${string}`]: OpportunityV3;
|
66
66
|
[id: `62_${string}`]: OpportunityV3;
|
67
67
|
[id: `63_${string}`]: OpportunityV3;
|
68
|
+
[id: `64_${string}`]: OpportunityV3;
|
69
|
+
[id: `65_${string}`]: OpportunityV3;
|
70
|
+
[id: `66_${string}`]: OpportunityV3;
|
68
71
|
}>;
|
69
72
|
static logKeyAndTTLV3Opportunities(showCampaigns: boolean, test: boolean | undefined, identifier: string | undefined, chainId: string | undefined): Promise<void>;
|
70
73
|
static wrapV3Opportunities(showCampaigns: boolean, test: boolean | undefined, identifier: string | undefined, chainId: string | undefined): Promise<{
|
@@ -131,5 +134,8 @@ export declare abstract class OpportunityConvertor {
|
|
131
134
|
[id: `61_${string}`]: OpportunityV3;
|
132
135
|
[id: `62_${string}`]: OpportunityV3;
|
133
136
|
[id: `63_${string}`]: OpportunityV3;
|
137
|
+
[id: `64_${string}`]: OpportunityV3;
|
138
|
+
[id: `65_${string}`]: OpportunityV3;
|
139
|
+
[id: `66_${string}`]: OpportunityV3;
|
134
140
|
}>;
|
135
141
|
}
|
@@ -42,10 +42,9 @@ export declare abstract class OpportunityFormatter {
|
|
42
42
|
address: string;
|
43
43
|
id: string;
|
44
44
|
chainId: number;
|
45
|
+
type: import("@package/databases").TokenType;
|
45
46
|
icon: string;
|
46
47
|
isNative: boolean;
|
47
|
-
isPoint: boolean;
|
48
|
-
isPreTGE: boolean;
|
49
48
|
isTest: boolean;
|
50
49
|
verified: boolean;
|
51
50
|
displaySymbol: string;
|
@@ -63,10 +62,9 @@ export declare abstract class OpportunityFormatter {
|
|
63
62
|
address: string;
|
64
63
|
id: string;
|
65
64
|
chainId: number;
|
65
|
+
type: import("@package/databases").TokenType;
|
66
66
|
icon: string;
|
67
67
|
isNative: boolean;
|
68
|
-
isPoint: boolean;
|
69
|
-
isPreTGE: boolean;
|
70
68
|
isTest: boolean;
|
71
69
|
verified: boolean;
|
72
70
|
} & {
|
@@ -112,10 +110,9 @@ export declare abstract class OpportunityFormatter {
|
|
112
110
|
address: string;
|
113
111
|
id: string;
|
114
112
|
chainId: number;
|
113
|
+
type: import("@package/databases").TokenType;
|
115
114
|
icon: string;
|
116
115
|
isNative: boolean;
|
117
|
-
isPoint: boolean;
|
118
|
-
isPreTGE: boolean;
|
119
116
|
isTest: boolean;
|
120
117
|
verified: boolean;
|
121
118
|
} & {
|
@@ -9,7 +9,7 @@ import { type Token } from "../../../modules/v4/token/token.model";
|
|
9
9
|
import { type TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
10
10
|
import type { OpportunityRepository } from "./opportunity.repository";
|
11
11
|
/**
|
12
|
-
* Opportunity
|
12
|
+
* Light Opportunity
|
13
13
|
* @description Target description of rewards campaigns
|
14
14
|
* @see {@link ResourceAPI}
|
15
15
|
*/
|
@@ -27,10 +27,10 @@ export type OpportunityLight = ResourceAPI<"Opportunity", "manualOverrides" | "m
|
|
27
27
|
export type Opportunity = ResourceAPI<"Opportunity", "manualOverrides" | "mainProtocolId", {
|
28
28
|
depositUrl?: string;
|
29
29
|
explorerAddress?: string;
|
30
|
+
lastCampaignCreatedAt: number;
|
30
31
|
mainProtocolId?: string;
|
31
32
|
chain: Chain["model"];
|
32
33
|
tokens: Token["model"][];
|
33
|
-
lastCampaignCreatedAt: number;
|
34
34
|
protocol?: Protocol["model"];
|
35
35
|
aprRecord?: AprRecord["model"];
|
36
36
|
tvlRecord?: TvlRecord["model"];
|
@@ -64,6 +64,10 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
64
64
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
65
65
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
66
66
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
67
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
68
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
69
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
70
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
67
71
|
}>>;
|
68
72
|
tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
69
73
|
id: import("@sinclair/typebox").TString;
|
@@ -77,10 +81,13 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
77
81
|
verified: import("@sinclair/typebox").TBoolean;
|
78
82
|
isNative: import("@sinclair/typebox").TBoolean;
|
79
83
|
isTest: import("@sinclair/typebox").TBoolean;
|
80
|
-
isPoint: import("@sinclair/typebox").TBoolean;
|
81
|
-
isPreTGE: import("@sinclair/typebox").TBoolean;
|
82
84
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
83
85
|
symbol: import("@sinclair/typebox").TString;
|
86
|
+
type: import("@sinclair/typebox").TEnum<{
|
87
|
+
readonly TOKEN: "TOKEN";
|
88
|
+
readonly PRETGE: "PRETGE";
|
89
|
+
readonly POINT: "POINT";
|
90
|
+
}>;
|
84
91
|
}>>;
|
85
92
|
chain: import("@sinclair/typebox").TObject<{
|
86
93
|
id: import("@sinclair/typebox").TNumber;
|
@@ -112,6 +119,10 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
112
119
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
113
120
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
114
121
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
122
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
123
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
124
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
125
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
115
126
|
}>>;
|
116
127
|
}>>;
|
117
128
|
}>>;
|
@@ -143,10 +154,13 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
143
154
|
verified: import("@sinclair/typebox").TBoolean;
|
144
155
|
isNative: import("@sinclair/typebox").TBoolean;
|
145
156
|
isTest: import("@sinclair/typebox").TBoolean;
|
146
|
-
isPoint: import("@sinclair/typebox").TBoolean;
|
147
|
-
isPreTGE: import("@sinclair/typebox").TBoolean;
|
148
157
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
149
158
|
symbol: import("@sinclair/typebox").TString;
|
159
|
+
type: import("@sinclair/typebox").TEnum<{
|
160
|
+
readonly TOKEN: "TOKEN";
|
161
|
+
readonly PRETGE: "PRETGE";
|
162
|
+
readonly POINT: "POINT";
|
163
|
+
}>;
|
150
164
|
}>;
|
151
165
|
amount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
|
152
166
|
distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
@@ -155,6 +169,10 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
155
169
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
156
170
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
157
171
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
172
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
173
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
174
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
175
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
158
176
|
}>>;
|
159
177
|
}>>;
|
160
178
|
}>>;
|
@@ -184,10 +202,13 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
184
202
|
verified: import("@sinclair/typebox").TBoolean;
|
185
203
|
isNative: import("@sinclair/typebox").TBoolean;
|
186
204
|
isTest: import("@sinclair/typebox").TBoolean;
|
187
|
-
isPoint: import("@sinclair/typebox").TBoolean;
|
188
|
-
isPreTGE: import("@sinclair/typebox").TBoolean;
|
189
205
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
190
206
|
symbol: import("@sinclair/typebox").TString;
|
207
|
+
type: import("@sinclair/typebox").TEnum<{
|
208
|
+
readonly TOKEN: "TOKEN";
|
209
|
+
readonly PRETGE: "PRETGE";
|
210
|
+
readonly POINT: "POINT";
|
211
|
+
}>;
|
191
212
|
}>>;
|
192
213
|
tvl: import("@sinclair/typebox").TNumber;
|
193
214
|
description: import("@sinclair/typebox").TString;
|
@@ -238,6 +259,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
238
259
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
239
260
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
240
261
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
262
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
263
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
264
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
265
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
241
266
|
}>>;
|
242
267
|
}>>;
|
243
268
|
}>>;
|
@@ -247,6 +272,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
247
272
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
248
273
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
249
274
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
275
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
276
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
277
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
278
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
250
279
|
}>>;
|
251
280
|
identifier: import("@sinclair/typebox").TString;
|
252
281
|
howToSteps: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
@@ -282,10 +311,13 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
282
311
|
verified: import("@sinclair/typebox").TBoolean;
|
283
312
|
isNative: import("@sinclair/typebox").TBoolean;
|
284
313
|
isTest: import("@sinclair/typebox").TBoolean;
|
285
|
-
isPoint: import("@sinclair/typebox").TBoolean;
|
286
|
-
isPreTGE: import("@sinclair/typebox").TBoolean;
|
287
314
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
288
315
|
symbol: import("@sinclair/typebox").TString;
|
316
|
+
type: import("@sinclair/typebox").TEnum<{
|
317
|
+
readonly TOKEN: "TOKEN";
|
318
|
+
readonly PRETGE: "PRETGE";
|
319
|
+
readonly POINT: "POINT";
|
320
|
+
}>;
|
289
321
|
}>;
|
290
322
|
amount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
|
291
323
|
distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
@@ -294,6 +326,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
294
326
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
295
327
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
296
328
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
329
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
330
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
331
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
332
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
297
333
|
}>>;
|
298
334
|
}>>;
|
299
335
|
}>>;
|
@@ -338,10 +374,13 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
338
374
|
verified: import("@sinclair/typebox").TBoolean;
|
339
375
|
isNative: import("@sinclair/typebox").TBoolean;
|
340
376
|
isTest: import("@sinclair/typebox").TBoolean;
|
341
|
-
isPoint: import("@sinclair/typebox").TBoolean;
|
342
|
-
isPreTGE: import("@sinclair/typebox").TBoolean;
|
343
377
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
344
378
|
symbol: import("@sinclair/typebox").TString;
|
379
|
+
type: import("@sinclair/typebox").TEnum<{
|
380
|
+
readonly TOKEN: "TOKEN";
|
381
|
+
readonly PRETGE: "PRETGE";
|
382
|
+
readonly POINT: "POINT";
|
383
|
+
}>;
|
345
384
|
}>;
|
346
385
|
distributionChain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
347
386
|
id: import("@sinclair/typebox").TNumber;
|
@@ -362,6 +401,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
362
401
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
363
402
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
364
403
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
404
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
405
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
406
|
+
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
407
|
+
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
365
408
|
}>>;
|
366
409
|
campaignStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
367
410
|
computedUntil: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
@@ -382,20 +425,22 @@ export declare const OpportunityUniqueUpdateDto: import("@sinclair/typebox").TOb
|
|
382
425
|
id: import("@sinclair/typebox").TString;
|
383
426
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
384
427
|
}>;
|
385
|
-
export declare const
|
386
|
-
sum: import("@sinclair/typebox").TNumber;
|
387
|
-
}>;
|
388
|
-
export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObject<{
|
428
|
+
export declare const FindManyOpportunityDto: import("@sinclair/typebox").TObject<{
|
389
429
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
390
430
|
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
391
431
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
392
432
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
393
433
|
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
434
|
+
tokenTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
435
|
+
readonly TOKEN: "TOKEN";
|
436
|
+
readonly PRETGE: "PRETGE";
|
437
|
+
readonly POINT: "POINT";
|
438
|
+
}>>>;
|
439
|
+
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
394
440
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
395
441
|
creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
396
442
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
397
443
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
398
|
-
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
399
444
|
minimumTvl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
400
445
|
maximumTvl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
401
446
|
minimumApr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
@@ -407,7 +452,13 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
|
|
407
452
|
rewardTokenSymbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
408
453
|
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
409
454
|
order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
455
|
+
distributionTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
456
|
+
FIX_REWARD: "FIX_REWARD";
|
457
|
+
MAX_REWARD: "MAX_REWARD";
|
458
|
+
DUTCH_AUCTION: "DUTCH_AUCTION";
|
459
|
+
}>>>;
|
410
460
|
mainProtocolId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
461
|
+
chainName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
411
462
|
excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
412
463
|
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
413
464
|
items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
@@ -415,6 +466,11 @@ export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObje
|
|
415
466
|
export declare const FindOpportunityDto: import("@sinclair/typebox").TObject<{
|
416
467
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
417
468
|
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
469
|
+
tokenTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
470
|
+
readonly TOKEN: "TOKEN";
|
471
|
+
readonly PRETGE: "PRETGE";
|
472
|
+
readonly POINT: "POINT";
|
473
|
+
}>>>;
|
418
474
|
campaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
419
475
|
excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
420
476
|
}>;
|
@@ -455,9 +511,6 @@ export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
|
|
455
511
|
export declare const OpportunityAggregateFieldDto: import("@sinclair/typebox").TObject<{
|
456
512
|
field: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"apr" | "tvl" | "dailyRewards">[]>;
|
457
513
|
}>;
|
458
|
-
export declare const OpportunityIdDto: import("@sinclair/typebox").TObject<{
|
459
|
-
id: import("@sinclair/typebox").TString;
|
460
|
-
}>;
|
461
514
|
export declare const OpportunityOverrideDto: import("@sinclair/typebox").TObject<{
|
462
515
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
463
516
|
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -489,7 +542,7 @@ export declare const OpportunityDeleteOverrideDto: import("@sinclair/typebox").T
|
|
489
542
|
export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
|
490
543
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
491
544
|
}>;
|
492
|
-
export type
|
545
|
+
export type FindManyOpportunityModel = typeof FindManyOpportunityDto.static;
|
493
546
|
export type FindOpportunityModel = typeof FindOpportunityDto.static;
|
494
547
|
export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
|
495
548
|
export type OpportunityAggregateField = typeof OpportunityAggregateFieldDto.static;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { type MerklChainId } from "@angleprotocol/sdk/ts";
|
2
|
+
import { type TokenType } from "@package/databases";
|
2
3
|
import { type Prisma, Status } from "@package/databases/api";
|
3
4
|
import type { AprRecord } from "../../../modules/v4/apr/apr.model";
|
4
5
|
import type { Campaign } from "../../../modules/v4/campaign/campaign.model";
|
5
6
|
import type { DailyRewardsRecord } from "../../../modules/v4/reward/reward.model";
|
6
7
|
import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
7
|
-
import type { CreateOpportunityModel,
|
8
|
+
import type { CreateOpportunityModel, FindManyOpportunityModel, FindOpportunityModel, Opportunity } from "./opportunity.model";
|
8
9
|
export declare abstract class OpportunityRepository {
|
9
10
|
#private;
|
10
11
|
static create(newOpp: CreateOpportunityModel & {
|
@@ -18,10 +19,9 @@ export declare abstract class OpportunityRepository {
|
|
18
19
|
address: string;
|
19
20
|
id: string;
|
20
21
|
chainId: number;
|
22
|
+
type: TokenType;
|
21
23
|
icon: string;
|
22
24
|
isNative: boolean;
|
23
|
-
isPoint: boolean;
|
24
|
-
isPreTGE: boolean;
|
25
25
|
isTest: boolean;
|
26
26
|
verified: boolean;
|
27
27
|
displaySymbol: string;
|
@@ -69,10 +69,9 @@ export declare abstract class OpportunityRepository {
|
|
69
69
|
address: string;
|
70
70
|
id: string;
|
71
71
|
chainId: number;
|
72
|
+
type: TokenType;
|
72
73
|
icon: string;
|
73
74
|
isNative: boolean;
|
74
|
-
isPoint: boolean;
|
75
|
-
isPreTGE: boolean;
|
76
75
|
isTest: boolean;
|
77
76
|
verified: boolean;
|
78
77
|
displaySymbol: string;
|
@@ -106,10 +105,9 @@ export declare abstract class OpportunityRepository {
|
|
106
105
|
address: string;
|
107
106
|
id: string;
|
108
107
|
chainId: number;
|
108
|
+
type: TokenType;
|
109
109
|
icon: string;
|
110
110
|
isNative: boolean;
|
111
|
-
isPoint: boolean;
|
112
|
-
isPreTGE: boolean;
|
113
111
|
isTest: boolean;
|
114
112
|
verified: boolean;
|
115
113
|
displaySymbol: string;
|
@@ -178,10 +176,9 @@ export declare abstract class OpportunityRepository {
|
|
178
176
|
address: string;
|
179
177
|
id: string;
|
180
178
|
chainId: number;
|
179
|
+
type: TokenType;
|
181
180
|
icon: string;
|
182
181
|
isNative: boolean;
|
183
|
-
isPoint: boolean;
|
184
|
-
isPreTGE: boolean;
|
185
182
|
isTest: boolean;
|
186
183
|
verified: boolean;
|
187
184
|
displaySymbol: string;
|
@@ -254,10 +251,9 @@ export declare abstract class OpportunityRepository {
|
|
254
251
|
address: string;
|
255
252
|
id: string;
|
256
253
|
chainId: number;
|
254
|
+
type: TokenType;
|
257
255
|
icon: string;
|
258
256
|
isNative: boolean;
|
259
|
-
isPoint: boolean;
|
260
|
-
isPreTGE: boolean;
|
261
257
|
isTest: boolean;
|
262
258
|
verified: boolean;
|
263
259
|
displaySymbol: string;
|
@@ -326,10 +322,9 @@ export declare abstract class OpportunityRepository {
|
|
326
322
|
address: string;
|
327
323
|
id: string;
|
328
324
|
chainId: number;
|
325
|
+
type: TokenType;
|
329
326
|
icon: string;
|
330
327
|
isNative: boolean;
|
331
|
-
isPoint: boolean;
|
332
|
-
isPreTGE: boolean;
|
333
328
|
isTest: boolean;
|
334
329
|
verified: boolean;
|
335
330
|
displaySymbol: string;
|
@@ -422,10 +417,9 @@ export declare abstract class OpportunityRepository {
|
|
422
417
|
address: string;
|
423
418
|
id: string;
|
424
419
|
chainId: number;
|
420
|
+
type: TokenType;
|
425
421
|
icon: string;
|
426
422
|
isNative: boolean;
|
427
|
-
isPoint: boolean;
|
428
|
-
isPreTGE: boolean;
|
429
423
|
isTest: boolean;
|
430
424
|
verified: boolean;
|
431
425
|
displaySymbol: string;
|
@@ -459,10 +453,9 @@ export declare abstract class OpportunityRepository {
|
|
459
453
|
address: string;
|
460
454
|
id: string;
|
461
455
|
chainId: number;
|
456
|
+
type: TokenType;
|
462
457
|
icon: string;
|
463
458
|
isNative: boolean;
|
464
|
-
isPoint: boolean;
|
465
|
-
isPreTGE: boolean;
|
466
459
|
isTest: boolean;
|
467
460
|
verified: boolean;
|
468
461
|
displaySymbol: string;
|
@@ -531,10 +524,9 @@ export declare abstract class OpportunityRepository {
|
|
531
524
|
address: string;
|
532
525
|
id: string;
|
533
526
|
chainId: number;
|
527
|
+
type: TokenType;
|
534
528
|
icon: string;
|
535
529
|
isNative: boolean;
|
536
|
-
isPoint: boolean;
|
537
|
-
isPreTGE: boolean;
|
538
530
|
isTest: boolean;
|
539
531
|
verified: boolean;
|
540
532
|
displaySymbol: string;
|
@@ -572,7 +564,7 @@ export declare abstract class OpportunityRepository {
|
|
572
564
|
tags: string[];
|
573
565
|
lastCampaignCreatedAt: Date;
|
574
566
|
})[]>;
|
575
|
-
static findMany(query:
|
567
|
+
static findMany(query: FindManyOpportunityModel): Promise<({
|
576
568
|
Chain: {
|
577
569
|
Explorer: {
|
578
570
|
id: string;
|
@@ -614,10 +606,9 @@ export declare abstract class OpportunityRepository {
|
|
614
606
|
address: string;
|
615
607
|
id: string;
|
616
608
|
chainId: number;
|
609
|
+
type: TokenType;
|
617
610
|
icon: string;
|
618
611
|
isNative: boolean;
|
619
|
-
isPoint: boolean;
|
620
|
-
isPreTGE: boolean;
|
621
612
|
isTest: boolean;
|
622
613
|
verified: boolean;
|
623
614
|
displaySymbol: string;
|
@@ -686,10 +677,9 @@ export declare abstract class OpportunityRepository {
|
|
686
677
|
address: string;
|
687
678
|
id: string;
|
688
679
|
chainId: number;
|
680
|
+
type: TokenType;
|
689
681
|
icon: string;
|
690
682
|
isNative: boolean;
|
691
|
-
isPoint: boolean;
|
692
|
-
isPreTGE: boolean;
|
693
683
|
isTest: boolean;
|
694
684
|
verified: boolean;
|
695
685
|
displaySymbol: string;
|
@@ -727,7 +717,7 @@ export declare abstract class OpportunityRepository {
|
|
727
717
|
tags: string[];
|
728
718
|
lastCampaignCreatedAt: Date;
|
729
719
|
})[]>;
|
730
|
-
static countMany(query:
|
720
|
+
static countMany(query: FindManyOpportunityModel): Promise<number>;
|
731
721
|
/**
|
732
722
|
* @dev Live campaigns here can be:
|
733
723
|
* 1. Opportunities with status LIVE
|
@@ -787,10 +777,9 @@ export declare abstract class OpportunityRepository {
|
|
787
777
|
address: string;
|
788
778
|
id: string;
|
789
779
|
chainId: number;
|
780
|
+
type: TokenType;
|
790
781
|
icon: string;
|
791
782
|
isNative: boolean;
|
792
|
-
isPoint: boolean;
|
793
|
-
isPreTGE: boolean;
|
794
783
|
isTest: boolean;
|
795
784
|
verified: boolean;
|
796
785
|
displaySymbol: string;
|
@@ -824,10 +813,9 @@ export declare abstract class OpportunityRepository {
|
|
824
813
|
address: string;
|
825
814
|
id: string;
|
826
815
|
chainId: number;
|
816
|
+
type: TokenType;
|
827
817
|
icon: string;
|
828
818
|
isNative: boolean;
|
829
|
-
isPoint: boolean;
|
830
|
-
isPreTGE: boolean;
|
831
819
|
isTest: boolean;
|
832
820
|
verified: boolean;
|
833
821
|
displaySymbol: string;
|
@@ -896,10 +884,9 @@ export declare abstract class OpportunityRepository {
|
|
896
884
|
address: string;
|
897
885
|
id: string;
|
898
886
|
chainId: number;
|
887
|
+
type: TokenType;
|
899
888
|
icon: string;
|
900
889
|
isNative: boolean;
|
901
|
-
isPoint: boolean;
|
902
|
-
isPreTGE: boolean;
|
903
890
|
isTest: boolean;
|
904
891
|
verified: boolean;
|
905
892
|
displaySymbol: string;
|
@@ -1040,13 +1027,13 @@ export declare abstract class OpportunityRepository {
|
|
1040
1027
|
lastCampaignCreatedAt: Date;
|
1041
1028
|
}>;
|
1042
1029
|
static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<Prisma.BatchPayload>;
|
1043
|
-
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query:
|
1030
|
+
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: FindManyOpportunityModel): Promise<{
|
1044
1031
|
sum: string;
|
1045
1032
|
}>;
|
1046
|
-
static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query:
|
1033
|
+
static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query: FindManyOpportunityModel): Promise<{
|
1047
1034
|
min: string;
|
1048
1035
|
}>;
|
1049
|
-
static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query:
|
1036
|
+
static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query: FindManyOpportunityModel): Promise<{
|
1050
1037
|
max: string;
|
1051
1038
|
}>;
|
1052
1039
|
}
|