@merkl/api 1.4.85 → 1.4.86
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/cache/index.d.ts +0 -9
- package/dist/src/eden/index.d.ts +154 -140
- package/dist/src/engine/deprecated/dynamicData/implementations/Hyperdrive.d.ts +0 -15
- package/dist/src/engine/deprecated/dynamicData/utils/getContractCreationBlock.d.ts +0 -1
- package/dist/src/engine/deprecated/dynamicData/utils/getFixedApr.d.ts +0 -3
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/GenericProcessor.d.ts +0 -5
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/helpers/factoryFinder.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AaveProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AnglesLiquid.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/AuraProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BEXRewardGaugeProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerGaugeProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerPoolProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/BalancerV3PoolProcessor.d.ts +4 -5
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/CompoundProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/FluidProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/GearboxProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HanjiVaultProcessor.d.ts +4 -5
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/HourglassProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/MetamorphoProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RadiantProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/RfxProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/Satlayer.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SpliceProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/StabilityProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/SturdySiloProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TemplateProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/TorosProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/WoofiProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveNPoolProcessor.d.ts +4 -5
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/curveProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/stakedCurveProcessor.d.ts +0 -1
- package/dist/src/engine/deprecated/erc20SubTypeProcessors/implementations/xU308Processor.d.ts +0 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/penpiePRT/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/penpiePRT/metadata.js.map +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +2 -2
- package/dist/src/engine/implementations/StakingVaults/Equilibria/metadata.d.ts +2 -2
- package/dist/src/engine/implementations/StakingVaults/Equilibria/metadata.js.map +1 -1
- package/dist/src/engine/implementations/clamm/utils.d.ts +0 -1
- package/dist/src/engine/implementations/deprecated_clamm/metadata.d.ts +0 -1
- package/dist/src/engine/implementations/uniswapv4/tvl.d.ts +0 -1
- package/dist/src/engine/tvl/logStates.d.ts +0 -2
- package/dist/src/index.d.ts +154 -172
- package/dist/src/jobs/pendings.d.ts +0 -1
- package/dist/src/jobs/reward-breakdowns.d.ts +0 -1
- package/dist/src/jobs/reward-breakdowns.js.map +1 -1
- package/dist/src/jobs/rewards.d.ts +0 -1
- package/dist/src/libs/positions/clamm/thegraph/fetchAmmPositions.d.ts +0 -1
- package/dist/src/libs/positions/clamm/thegraph/index.d.ts +0 -10
- package/dist/src/libs/positions/index.d.ts +1 -2
- package/dist/src/libs/positions/prepareFetch.d.ts +1 -3
- package/dist/src/libs/positions/types.d.ts +0 -7
- package/dist/src/modules/v4/apr/apr.model.d.ts +0 -2
- package/dist/src/modules/v4/bucket/bucket.service.d.ts +0 -7
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +6 -1
- package/dist/src/modules/v4/campaign/campaign.formatter.d.ts +0 -2
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +0 -3
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +0 -3
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +15 -0
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +12 -1
- package/dist/src/modules/v4/campaignBatch/campaignBatch.model.d.ts +0 -1
- package/dist/src/modules/v4/campaignBatch/campaignBatch.service.d.ts +0 -2
- package/dist/src/modules/v4/campaignStatus/campaignStatus.model.d.ts +0 -3
- package/dist/src/modules/v4/campaignStatus/campaignStatus.service.d.ts +2 -2
- package/dist/src/modules/v4/campaignToProcess/campaignToProcess.controller.d.ts +0 -1
- package/dist/src/modules/v4/carousel/carousel.controller.d.ts +18 -0
- package/dist/src/modules/v4/carousel/carousel.repository.d.ts +27 -0
- package/dist/src/modules/v4/carousel/carousel.service.d.ts +27 -0
- package/dist/src/modules/v4/chain/chain.controller.d.ts +0 -1
- package/dist/src/modules/v4/chain/chain.model.d.ts +0 -3
- package/dist/src/modules/v4/claims/claims.controller.d.ts +0 -1
- package/dist/src/modules/v4/claims/claims.service.d.ts +0 -1
- package/dist/src/modules/v4/clamm/clamm.controller.d.ts +0 -2
- package/dist/src/modules/v4/clamm/clamm.service.d.ts +0 -1
- package/dist/src/modules/v4/computedValue/computedValue.formatter.d.ts +0 -1
- package/dist/src/modules/v4/computedValue/computedValue.model.d.ts +0 -3
- package/dist/src/modules/v4/config/config.controller.d.ts +3 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +0 -1
- package/dist/src/modules/v4/creator/creator.model.d.ts +0 -3
- package/dist/src/modules/v4/creator/creator.repository.d.ts +0 -1
- package/dist/src/modules/v4/creator/creator.service.d.ts +0 -1
- package/dist/src/modules/v4/enso/enso.service.d.ts +3 -0
- package/dist/src/modules/v4/euler/euler.controller.d.ts +0 -1
- package/dist/src/modules/v4/euler/euler.model.d.ts +0 -1
- package/dist/src/modules/v4/explorer/explorer.controller.d.ts +0 -1
- package/dist/src/modules/v4/github/github.model.d.ts +0 -2
- package/dist/src/modules/v4/interaction/interaction.controller.d.ts +3 -1
- package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +0 -1
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +0 -1
- package/dist/src/modules/v4/node/node.model.d.ts +0 -1
- package/dist/src/modules/v4/node/node.service.d.ts +1 -3
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +6 -1
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +9 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -7
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +33 -5
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +21 -9
- package/dist/src/modules/v4/payload/payload.controller.d.ts +9 -0
- package/dist/src/modules/v4/payload/payload.model.d.ts +2 -5
- package/dist/src/modules/v4/payload/payload.service.d.ts +12 -0
- package/dist/src/modules/v4/priceSource/priceSource.controller.d.ts +0 -1
- package/dist/src/modules/v4/priceSource/priceSource.model.d.ts +0 -2
- package/dist/src/modules/v4/priceSource/priceSource.service.d.ts +0 -1
- package/dist/src/modules/v4/prisma/index.d.ts +2 -6
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +5789 -5790
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +2 -5
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +0 -94
- package/dist/src/modules/v4/programPayload/subPayloads/aave.d.ts +0 -5
- package/dist/src/modules/v4/programPayload/subPayloads/bancor.d.ts +0 -26
- package/dist/src/modules/v4/programPayload/subPayloads/credix.d.ts +0 -8
- package/dist/src/modules/v4/programPayload/subPayloads/drip.d.ts +0 -5
- package/dist/src/modules/v4/programPayload/subPayloads/hypurrFi.d.ts +0 -3
- package/dist/src/modules/v4/programPayload/subPayloads/nibiru.d.ts +0 -18
- package/dist/src/modules/v4/programPayload/subPayloads/tac.d.ts +0 -59
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +12 -1
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +0 -3
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +15 -1
- package/dist/src/modules/v4/protocol/protocol.service.d.ts +9 -1
- package/dist/src/modules/v4/referral/referral.controller.d.ts +0 -1
- package/dist/src/modules/v4/referral/referral.model.d.ts +0 -1
- package/dist/src/modules/v4/reward/reward.controller.d.ts +0 -108
- package/dist/src/modules/v4/reward/reward.controller.js.map +1 -1
- package/dist/src/modules/v4/reward/reward.model.d.ts +0 -4
- package/dist/src/modules/v4/reward/reward.model.js.map +1 -1
- package/dist/src/modules/v4/reward/reward.repository.d.ts +12 -1
- package/dist/src/modules/v4/reward/reward.repository.js.map +1 -1
- package/dist/src/modules/v4/reward/reward.service.d.ts +69 -0
- package/dist/src/modules/v4/router.d.ts +5184 -5202
- package/dist/src/modules/v4/token/token.controller.d.ts +0 -1
- package/dist/src/modules/v4/token/token.model.d.ts +0 -4
- package/dist/src/modules/v4/token/token.repository.d.ts +2 -2
- package/dist/src/modules/v4/token/token.service.d.ts +2 -2
- package/dist/src/modules/v4/transaction/transaction.model.d.ts +0 -1
- package/dist/src/modules/v4/turtle/turtle.controller.d.ts +0 -1
- package/dist/src/modules/v4/turtle/turtle.service.d.ts +0 -2
- package/dist/src/modules/v4/tvl/tvl.model.d.ts +0 -1
- package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +6 -2
- package/dist/src/modules/v4/uniswap/uniswap.repository.d.ts +0 -1
- package/dist/src/modules/v4/uniswap/uniswap.service.d.ts +3 -0
- package/dist/src/modules/v4/user/user.controller.d.ts +15 -0
- package/dist/src/modules/v4/user/user.model.d.ts +0 -3
- package/dist/src/modules/v4/user/user.repository.d.ts +0 -1
- package/dist/src/modules/v4/user/user.service.d.ts +0 -1
- package/dist/src/plugins/errorHandler.d.ts +0 -1
- package/dist/src/routes/v3/blacklist.d.ts +0 -1
- package/dist/src/utils/bigintToString.d.ts +0 -3
- package/dist/src/utils/execute.d.ts +0 -1
- package/dist/src/utils/pagination.d.ts +0 -1
- package/dist/src/utils/parseDistributionType.d.ts +20 -20
- package/package.json +1 -1
@@ -40,6 +40,9 @@ export declare abstract class CarouselService {
|
|
40
40
|
description: string;
|
41
41
|
url: string;
|
42
42
|
icon: string;
|
43
|
+
banner: string | null;
|
44
|
+
opportunityBannerLight: string | null;
|
45
|
+
opportunityBannerDark: string | null;
|
43
46
|
} | null;
|
44
47
|
Protocols: {
|
45
48
|
id: string;
|
@@ -48,6 +51,9 @@ export declare abstract class CarouselService {
|
|
48
51
|
description: string;
|
49
52
|
url: string;
|
50
53
|
icon: string;
|
54
|
+
banner: string | null;
|
55
|
+
opportunityBannerLight: string | null;
|
56
|
+
opportunityBannerDark: string | null;
|
51
57
|
}[];
|
52
58
|
Tokens: {
|
53
59
|
id: string;
|
@@ -132,6 +138,9 @@ export declare abstract class CarouselService {
|
|
132
138
|
description: string;
|
133
139
|
url: string;
|
134
140
|
icon: string;
|
141
|
+
banner: string | null;
|
142
|
+
opportunityBannerLight: string | null;
|
143
|
+
opportunityBannerDark: string | null;
|
135
144
|
} | null;
|
136
145
|
} & {
|
137
146
|
id: string;
|
@@ -271,6 +280,9 @@ export declare abstract class CarouselService {
|
|
271
280
|
description: string;
|
272
281
|
url: string;
|
273
282
|
icon: string;
|
283
|
+
banner: string | null;
|
284
|
+
opportunityBannerLight: string | null;
|
285
|
+
opportunityBannerDark: string | null;
|
274
286
|
} | null;
|
275
287
|
Protocols: {
|
276
288
|
id: string;
|
@@ -279,6 +291,9 @@ export declare abstract class CarouselService {
|
|
279
291
|
description: string;
|
280
292
|
url: string;
|
281
293
|
icon: string;
|
294
|
+
banner: string | null;
|
295
|
+
opportunityBannerLight: string | null;
|
296
|
+
opportunityBannerDark: string | null;
|
282
297
|
}[];
|
283
298
|
Tokens: {
|
284
299
|
id: string;
|
@@ -363,6 +378,9 @@ export declare abstract class CarouselService {
|
|
363
378
|
description: string;
|
364
379
|
url: string;
|
365
380
|
icon: string;
|
381
|
+
banner: string | null;
|
382
|
+
opportunityBannerLight: string | null;
|
383
|
+
opportunityBannerDark: string | null;
|
366
384
|
} | null;
|
367
385
|
} & {
|
368
386
|
id: string;
|
@@ -536,6 +554,9 @@ export declare abstract class CarouselService {
|
|
536
554
|
description: string;
|
537
555
|
url: string;
|
538
556
|
icon: string;
|
557
|
+
banner: string | null;
|
558
|
+
opportunityBannerLight: string | null;
|
559
|
+
opportunityBannerDark: string | null;
|
539
560
|
} | null;
|
540
561
|
Protocols: {
|
541
562
|
id: string;
|
@@ -544,6 +565,9 @@ export declare abstract class CarouselService {
|
|
544
565
|
description: string;
|
545
566
|
url: string;
|
546
567
|
icon: string;
|
568
|
+
banner: string | null;
|
569
|
+
opportunityBannerLight: string | null;
|
570
|
+
opportunityBannerDark: string | null;
|
547
571
|
}[];
|
548
572
|
Tokens: {
|
549
573
|
id: string;
|
@@ -628,6 +652,9 @@ export declare abstract class CarouselService {
|
|
628
652
|
description: string;
|
629
653
|
url: string;
|
630
654
|
icon: string;
|
655
|
+
banner: string | null;
|
656
|
+
opportunityBannerLight: string | null;
|
657
|
+
opportunityBannerDark: string | null;
|
631
658
|
} | null;
|
632
659
|
}>;
|
633
660
|
}
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import type { ResourceAPI } from "../../../modules/v4/prisma";
|
2
|
-
// ─── Schemas ─────────────────────────────────────────────────────────────────
|
3
2
|
/**
|
4
3
|
* Chain
|
5
4
|
* @description Metadata for each supported network
|
6
5
|
* @see {@link ResourceAPI}
|
7
6
|
*/
|
8
7
|
export type Chain = ResourceAPI<"Chain">;
|
9
|
-
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
10
8
|
export declare const ChainResourceDto: import("@sinclair/typebox").TObject<{
|
11
9
|
id: import("@sinclair/typebox").TNumber;
|
12
10
|
name: import("@sinclair/typebox").TString;
|
@@ -51,7 +49,6 @@ export declare const CreateChainDto: import("@sinclair/typebox").TObject<{
|
|
51
49
|
}>;
|
52
50
|
explorerUrl: import("@sinclair/typebox").TString;
|
53
51
|
}>;
|
54
|
-
// ─── Static Types ───────────────────────────────────────────────────────────
|
55
52
|
export type ChainUniqueModel = typeof ChainUniqueDto.static;
|
56
53
|
export type ChainSearchDto = typeof GetChainQueryDto.static;
|
57
54
|
export type UpdateChainModel = typeof UpdateChainDto.static;
|
@@ -2,7 +2,6 @@ import type { ChainId } from "@package/resources/enums";
|
|
2
2
|
import type { UserUniqueModel } from "../../../modules/v4/user/user.model";
|
3
3
|
import type { ClaimModel } from "./claims.model";
|
4
4
|
export declare abstract class ClaimService {
|
5
|
-
// ─── Get Historical Claims ─────────────────────────────────────────────────
|
6
5
|
static getHistoricalClaims(params: UserUniqueModel, chainFilter?: ChainId[]): Promise<(ClaimModel & {
|
7
6
|
token?: ({
|
8
7
|
address: string;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { type CLAMMChainId, type CLAMMPoolType } from "@package/sdk";
|
2
|
-
// TODO return TokenResourceDto for `currency0` and `currency1`
|
3
2
|
export declare abstract class CLAMMService {
|
4
3
|
static getCLAMMPools(chainId: CLAMMChainId): Promise<Record<string, CLAMMPoolType>>;
|
5
4
|
}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import type { ResourceAPI } from "../prisma";
|
2
|
-
// ─── Schemas ─────────────────────────────────────────────────────────────────
|
3
2
|
export type CampaignComputedFields = keyof ResourceAPI<"CampaignComputedValue", "campaignId">["model"];
|
4
3
|
export type UserComputedFields = keyof ResourceAPI<"UserComputedValue", "campaignId" | "address" | "reason">["model"];
|
5
|
-
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
6
4
|
export declare const FindCampaignComputedValueDto: import("@sinclair/typebox").TObject<{
|
7
5
|
campaignId: import("@sinclair/typebox").TString;
|
8
6
|
field: import("@sinclair/typebox").TString;
|
@@ -51,7 +49,6 @@ export declare const TvlForApiDto: import("@sinclair/typebox").TObject<{
|
|
51
49
|
value: import("@sinclair/typebox").TNumber;
|
52
50
|
}>>>;
|
53
51
|
}>;
|
54
|
-
// ─── Static Types ────────────────────────────────────────────────────────────
|
55
52
|
export type FindCampaignComputedValueModel = typeof FindCampaignComputedValueDto.static;
|
56
53
|
export type UpsertCampaignComputedValueModel = typeof UpsertCampaignComputedValue.static;
|
57
54
|
export type UpsertCampaignEngineTvlModel = typeof UpsertCampaignEngineTvlDto.static;
|
@@ -112,6 +112,9 @@ export declare const ConfigController: Elysia<"/config", {
|
|
112
112
|
description: string;
|
113
113
|
url: string;
|
114
114
|
icon: string;
|
115
|
+
banner: string | null;
|
116
|
+
opportunityBannerLight: string | null;
|
117
|
+
opportunityBannerDark: string | null;
|
115
118
|
}[];
|
116
119
|
Tokens: {
|
117
120
|
id: string;
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import type { ResourceAPI } from "../../../modules/v4/prisma";
|
2
|
-
// ─── Schemas ─────────────────────────────────────────────────────────────────
|
3
2
|
/**
|
4
3
|
* Campaign Creator (Client)
|
5
4
|
* @description A group of user that represent a campaign creator
|
6
5
|
* @see {@link ResourceAPI}
|
7
6
|
*/
|
8
7
|
export type Creator = ResourceAPI<"Creator">;
|
9
|
-
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
10
8
|
export declare const CreatorDto: import("@sinclair/typebox").TObject<{
|
11
9
|
addresses: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
12
10
|
icon: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -273,7 +271,6 @@ export declare const CreatorsOpportunitiesDto: import("@sinclair/typebox").TArra
|
|
273
271
|
liveCampaignsForCreator: import("@sinclair/typebox").TNumber;
|
274
272
|
distributedBycreator: import("@sinclair/typebox").TNumber;
|
275
273
|
}>]>>;
|
276
|
-
// ─── Static Types ────────────────────────────────────────────────────────────
|
277
274
|
export type CreatorModel = typeof CreatorDto.static;
|
278
275
|
export type MetricsPaginationModel = typeof MetricsPaginationDto.static;
|
279
276
|
export type GetManyCreatorModel = typeof GetManyCreatorQuery.static;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { CreateCreatorDto, Creator, GetManyCreatorModel, UpdateCreatorDto } from "./creator.model";
|
2
|
-
// ─── Users Repository ────────────────────────────────────────────────────────
|
3
2
|
export declare abstract class CreatorRepository {
|
4
3
|
static findUnique(id: Creator["model"]["id"]): Promise<{
|
5
4
|
Users: {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { CreateCreatorDto, Creator, CreatorsOpportunitiesModel, FindCreatorsOpportunitiesModel, GetManyCreatorModel, MetricsPaginationModel, UpdateCreatorDto, UpdateCreatorRebateDto } from "./creator.model";
|
2
|
-
// ─── Creators Service ────────────────────────────────────────────────────────
|
3
2
|
export declare abstract class CreatorService {
|
4
3
|
/**
|
5
4
|
* Finds a creator from its id (i.e. "uniswap")
|
@@ -6,10 +6,13 @@ export declare abstract class EnsoService {
|
|
6
6
|
static getSlug(protocolId: ProtocolId | string): EnsoSlug | undefined;
|
7
7
|
static getProtocolId(slug: EnsoSlug | string): ProtocolId | undefined;
|
8
8
|
static getCompatibleProtocols(query: GetInteractionProtocolsQuery): Promise<({
|
9
|
+
banner: string | null;
|
9
10
|
description: string;
|
10
11
|
icon: string;
|
11
12
|
id: string;
|
12
13
|
name: string;
|
14
|
+
opportunityBannerDark: string | null;
|
15
|
+
opportunityBannerLight: string | null;
|
13
16
|
tags: string[];
|
14
17
|
url: string;
|
15
18
|
} & {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import Elysia from "elysia";
|
2
|
-
// ─── Interaction Controller ──────────────────────────────────────────────────
|
3
2
|
export declare const InteractionController: Elysia<"/interaction", {
|
4
3
|
decorator: {};
|
5
4
|
store: {};
|
@@ -54,10 +53,13 @@ export declare const InteractionController: Elysia<"/interaction", {
|
|
54
53
|
headers: unknown;
|
55
54
|
response: {
|
56
55
|
200: ({
|
56
|
+
banner: string | null;
|
57
57
|
description: string;
|
58
58
|
icon: string;
|
59
59
|
id: string;
|
60
60
|
name: string;
|
61
|
+
opportunityBannerDark: string | null;
|
62
|
+
opportunityBannerLight: string | null;
|
61
63
|
tags: string[];
|
62
64
|
url: string;
|
63
65
|
} & {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { MetadataMapping, Protocol } from "@package/sdk";
|
2
2
|
import type { ResourceEngine } from "../prisma";
|
3
|
-
// TODO add a migration renaming nodeType to protocol
|
4
3
|
export type Nodes = ResourceEngine<"Nodes", "id", {
|
5
4
|
nodeType: Protocol;
|
6
5
|
metadata: MetadataMapping[Protocol];
|
@@ -20,9 +20,7 @@ export declare abstract class NodeService {
|
|
20
20
|
creationBlockNumber: number;
|
21
21
|
metadata: import("@prisma/client/runtime/client").JsonValue;
|
22
22
|
})[]>;
|
23
|
-
|
24
|
-
static getNodesByMetadata<P extends Protocol>(chainIds: ChainId[], protocol: P, // Change this to P instead of Protocol
|
25
|
-
metadataCheck: (metadata: MetadataMapping[P]) => boolean): Promise<(Nodes["model"] & {
|
23
|
+
static getNodesByMetadata<P extends Protocol>(chainIds: ChainId[], protocol: P, metadataCheck: (metadata: MetadataMapping[P]) => boolean): Promise<(Nodes["model"] & {
|
26
24
|
metadata: MetadataMapping[P];
|
27
25
|
})[]>;
|
28
26
|
static getNodesByProtocols(chainIds: ChainId[], protocols: Protocol[]): Promise<(Nodes["model"] & {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import Elysia from "elysia";
|
2
|
-
// ─── Opportunities Controller ────────────────────────────────────────────────
|
3
2
|
export declare const OpportunityController: Elysia<"/opportunities", {
|
4
3
|
decorator: {};
|
5
4
|
store: {};
|
@@ -1772,6 +1771,9 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
1772
1771
|
description: string;
|
1773
1772
|
url: string;
|
1774
1773
|
icon: string;
|
1774
|
+
banner: string | null;
|
1775
|
+
opportunityBannerLight: string | null;
|
1776
|
+
opportunityBannerDark: string | null;
|
1775
1777
|
}[];
|
1776
1778
|
Tokens: {
|
1777
1779
|
id: string;
|
@@ -1990,6 +1992,9 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
1990
1992
|
description: string;
|
1991
1993
|
url: string;
|
1992
1994
|
icon: string;
|
1995
|
+
banner: string | null;
|
1996
|
+
opportunityBannerLight: string | null;
|
1997
|
+
opportunityBannerDark: string | null;
|
1993
1998
|
}[];
|
1994
1999
|
Tokens: {
|
1995
2000
|
id: string;
|
@@ -123,6 +123,9 @@ export declare abstract class OpportunityFormatter {
|
|
123
123
|
description: string;
|
124
124
|
url: string;
|
125
125
|
icon: string;
|
126
|
+
banner: string | null;
|
127
|
+
opportunityBannerLight: string | null;
|
128
|
+
opportunityBannerDark: string | null;
|
126
129
|
} | undefined;
|
127
130
|
activePrograms: {
|
128
131
|
icon: string;
|
@@ -170,6 +173,9 @@ export declare abstract class OpportunityFormatter {
|
|
170
173
|
description: string;
|
171
174
|
url: string;
|
172
175
|
icon: string;
|
176
|
+
banner: string | null;
|
177
|
+
opportunityBannerLight: string | null;
|
178
|
+
opportunityBannerDark: string | null;
|
173
179
|
} | undefined;
|
174
180
|
activePrograms: {
|
175
181
|
icon: string;
|
@@ -230,6 +236,9 @@ export declare abstract class OpportunityFormatter {
|
|
230
236
|
description: string;
|
231
237
|
url: string;
|
232
238
|
icon: string;
|
239
|
+
banner: string | null;
|
240
|
+
opportunityBannerLight: string | null;
|
241
|
+
opportunityBannerDark: string | null;
|
233
242
|
} | undefined;
|
234
243
|
activePrograms: {
|
235
244
|
icon: string;
|
@@ -9,14 +9,12 @@ import { type Token } from "../../../modules/v4/token/token.model";
|
|
9
9
|
import { type TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
10
10
|
import { type Program } from "../program/program.model";
|
11
11
|
import type { OpportunityRepository } from "./opportunity.repository";
|
12
|
-
// ─── Schemas ─────────────────────────────────────────────────────────────────
|
13
12
|
/**
|
14
13
|
* Light Opportunity
|
15
14
|
* @description Target description of rewards campaigns
|
16
15
|
* @see {@link ResourceAPI}
|
17
16
|
*/
|
18
17
|
export type OpportunityLight = ResourceAPI<"Opportunity", "manualOverrides" | "mainProtocolId", {
|
19
|
-
// Light Opportunity properties
|
20
18
|
depositUrl?: string;
|
21
19
|
explorerAddress?: string;
|
22
20
|
lastCampaignCreatedAt: number;
|
@@ -30,14 +28,12 @@ export type OpportunityLight = ResourceAPI<"Opportunity", "manualOverrides" | "m
|
|
30
28
|
* @see {@link ResourceAPI}
|
31
29
|
*/
|
32
30
|
export type Opportunity = ResourceAPI<"Opportunity", "manualOverrides" | "mainProtocolId", {
|
33
|
-
// Light Opportunity properties
|
34
31
|
depositUrl?: string;
|
35
32
|
explorerAddress?: string;
|
36
33
|
lastCampaignCreatedAt: number;
|
37
34
|
mainProtocolId?: string;
|
38
35
|
liveCampaigns: number;
|
39
36
|
liveCampaignsForCreator?: number;
|
40
|
-
// Full Opportunity properties (nested relations)
|
41
37
|
chain: Chain["model"];
|
42
38
|
tokens: Token["model"][];
|
43
39
|
protocol?: Protocol["model"];
|
@@ -54,7 +50,6 @@ export type OpportunityUnique = {
|
|
54
50
|
type: string;
|
55
51
|
identifier: string;
|
56
52
|
};
|
57
|
-
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
58
53
|
export declare const OpportunityWithoutRecordsDto: import("@sinclair/typebox").TObject<{
|
59
54
|
id: import("@sinclair/typebox").TString;
|
60
55
|
type: import("@sinclair/typebox").TString;
|
@@ -753,7 +748,6 @@ export declare const FindManyOpportunityDto: import("@sinclair/typebox").TObject
|
|
753
748
|
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
754
749
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
755
750
|
creatorSlug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
756
|
-
//TODO: find a systemic way of handling query param arrays
|
757
751
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
758
752
|
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
759
753
|
tokenTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
@@ -879,7 +873,6 @@ export declare const OpportunityDeleteOverrideDto: import("@sinclair/typebox").T
|
|
879
873
|
export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
|
880
874
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
881
875
|
}>;
|
882
|
-
// ─── Static Types ────────────────────────────────────────────────────────────
|
883
876
|
export type FindManyOpportunityModel = typeof FindManyOpportunityDto.static;
|
884
877
|
export type FindOpportunityOptionsModel = typeof FindOpportunityDto.static;
|
885
878
|
export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
|
@@ -8,7 +8,6 @@ import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
|
8
8
|
import type { CreateOpportunityModel, FindManyOpportunityModel, FindOpportunityOptionsModel } from "./opportunity.model";
|
9
9
|
export declare abstract class OpportunityRepository {
|
10
10
|
#private;
|
11
|
-
// ─── Create ──────────────────────────────────────────────────────────
|
12
11
|
static create(newOpp: CreateOpportunityModel & {
|
13
12
|
id: string;
|
14
13
|
}, upsert?: boolean): Promise<{
|
@@ -19,6 +18,9 @@ export declare abstract class OpportunityRepository {
|
|
19
18
|
description: string;
|
20
19
|
url: string;
|
21
20
|
icon: string;
|
21
|
+
banner: string | null;
|
22
|
+
opportunityBannerLight: string | null;
|
23
|
+
opportunityBannerDark: string | null;
|
22
24
|
}[];
|
23
25
|
Tokens: {
|
24
26
|
id: string;
|
@@ -59,7 +61,6 @@ export declare abstract class OpportunityRepository {
|
|
59
61
|
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
60
62
|
liveCampaigns: number;
|
61
63
|
}>;
|
62
|
-
// ─── Find ────────────────────────────────────────────────────────────
|
63
64
|
static findUnique(id: string): Promise<({
|
64
65
|
ActivePrograms: {
|
65
66
|
icon: string;
|
@@ -182,6 +183,9 @@ export declare abstract class OpportunityRepository {
|
|
182
183
|
description: string;
|
183
184
|
url: string;
|
184
185
|
icon: string;
|
186
|
+
banner: string | null;
|
187
|
+
opportunityBannerLight: string | null;
|
188
|
+
opportunityBannerDark: string | null;
|
185
189
|
} | null;
|
186
190
|
Protocols: {
|
187
191
|
id: string;
|
@@ -190,6 +194,9 @@ export declare abstract class OpportunityRepository {
|
|
190
194
|
description: string;
|
191
195
|
url: string;
|
192
196
|
icon: string;
|
197
|
+
banner: string | null;
|
198
|
+
opportunityBannerLight: string | null;
|
199
|
+
opportunityBannerDark: string | null;
|
193
200
|
}[];
|
194
201
|
Tokens: {
|
195
202
|
id: string;
|
@@ -242,7 +249,6 @@ export declare abstract class OpportunityRepository {
|
|
242
249
|
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
243
250
|
liveCampaigns: number;
|
244
251
|
}) | null>;
|
245
|
-
// wrong return type if you include campaigns (RewardToken is missing from the return type)
|
246
252
|
static findUniqueOrThrow(id: string, query: FindOpportunityOptionsModel): Promise<{
|
247
253
|
ActivePrograms: {
|
248
254
|
icon: string;
|
@@ -347,6 +353,9 @@ export declare abstract class OpportunityRepository {
|
|
347
353
|
description: string;
|
348
354
|
url: string;
|
349
355
|
icon: string;
|
356
|
+
banner: string | null;
|
357
|
+
opportunityBannerLight: string | null;
|
358
|
+
opportunityBannerDark: string | null;
|
350
359
|
} | null;
|
351
360
|
Protocols: {
|
352
361
|
id: string;
|
@@ -355,6 +364,9 @@ export declare abstract class OpportunityRepository {
|
|
355
364
|
description: string;
|
356
365
|
url: string;
|
357
366
|
icon: string;
|
367
|
+
banner: string | null;
|
368
|
+
opportunityBannerLight: string | null;
|
369
|
+
opportunityBannerDark: string | null;
|
358
370
|
}[];
|
359
371
|
Tokens: {
|
360
372
|
id: string;
|
@@ -611,6 +623,9 @@ export declare abstract class OpportunityRepository {
|
|
611
623
|
description: string;
|
612
624
|
url: string;
|
613
625
|
icon: string;
|
626
|
+
banner: string | null;
|
627
|
+
opportunityBannerLight: string | null;
|
628
|
+
opportunityBannerDark: string | null;
|
614
629
|
} | null;
|
615
630
|
Protocols: {
|
616
631
|
id: string;
|
@@ -619,6 +634,9 @@ export declare abstract class OpportunityRepository {
|
|
619
634
|
description: string;
|
620
635
|
url: string;
|
621
636
|
icon: string;
|
637
|
+
banner: string | null;
|
638
|
+
opportunityBannerLight: string | null;
|
639
|
+
opportunityBannerDark: string | null;
|
622
640
|
}[];
|
623
641
|
Tokens: {
|
624
642
|
id: string;
|
@@ -782,6 +800,9 @@ export declare abstract class OpportunityRepository {
|
|
782
800
|
description: string;
|
783
801
|
url: string;
|
784
802
|
icon: string;
|
803
|
+
banner: string | null;
|
804
|
+
opportunityBannerLight: string | null;
|
805
|
+
opportunityBannerDark: string | null;
|
785
806
|
} | null;
|
786
807
|
Protocols: {
|
787
808
|
id: string;
|
@@ -790,6 +811,9 @@ export declare abstract class OpportunityRepository {
|
|
790
811
|
description: string;
|
791
812
|
url: string;
|
792
813
|
icon: string;
|
814
|
+
banner: string | null;
|
815
|
+
opportunityBannerLight: string | null;
|
816
|
+
opportunityBannerDark: string | null;
|
793
817
|
}[];
|
794
818
|
Tokens: {
|
795
819
|
id: string;
|
@@ -1056,6 +1080,9 @@ export declare abstract class OpportunityRepository {
|
|
1056
1080
|
description: string;
|
1057
1081
|
url: string;
|
1058
1082
|
icon: string;
|
1083
|
+
banner: string | null;
|
1084
|
+
opportunityBannerLight: string | null;
|
1085
|
+
opportunityBannerDark: string | null;
|
1059
1086
|
} | null;
|
1060
1087
|
Protocols: {
|
1061
1088
|
id: string;
|
@@ -1064,6 +1091,9 @@ export declare abstract class OpportunityRepository {
|
|
1064
1091
|
description: string;
|
1065
1092
|
url: string;
|
1066
1093
|
icon: string;
|
1094
|
+
banner: string | null;
|
1095
|
+
opportunityBannerLight: string | null;
|
1096
|
+
opportunityBannerDark: string | null;
|
1067
1097
|
}[];
|
1068
1098
|
Tokens: {
|
1069
1099
|
id: string;
|
@@ -1116,7 +1146,6 @@ export declare abstract class OpportunityRepository {
|
|
1116
1146
|
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
1117
1147
|
liveCampaigns: number;
|
1118
1148
|
})[]>;
|
1119
|
-
// ─── Update ──────────────────────────────────────────────────────────
|
1120
1149
|
/**
|
1121
1150
|
* Updates Apr, Tvl and DailyRewards records
|
1122
1151
|
* @param opportunityId
|
@@ -1206,7 +1235,6 @@ export declare abstract class OpportunityRepository {
|
|
1206
1235
|
liveCampaigns: number;
|
1207
1236
|
}>;
|
1208
1237
|
static updateMany(ids: string[], data: OpportunityUpdateArgs["data"]): Promise<Prisma.BatchPayload>;
|
1209
|
-
// ─── Aggregation ─────────────────────────────────────────────────────
|
1210
1238
|
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: FindManyOpportunityModel): Promise<{
|
1211
1239
|
sum: string;
|
1212
1240
|
}>;
|