@merkl/api 0.17.41 → 0.18.0
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/eden/index.d.ts +43 -8
- package/dist/src/factories/metadataFactory/factory.js +2 -1
- package/dist/src/factories/metadataFactory/implementations/Compound.d.ts +1 -1
- package/dist/src/factories/metadataFactory/implementations/Erc20.js +1 -1
- package/dist/src/index.d.ts +9 -2
- package/dist/src/libs/campaigns/campaignsDynamicData.js +1 -1
- package/dist/src/modules/v4/claims/claims.controller.js +1 -1
- package/dist/src/modules/v4/claims/claims.service.d.ts +1 -1
- package/dist/src/modules/v4/enso/enso.service.d.ts +1 -1
- package/dist/src/modules/v4/enso/enso.service.js +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +7 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +7 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +28 -0
- package/dist/src/modules/v4/protocol/protocol.controller.js +1 -1
- package/dist/src/modules/v4/router.d.ts +8 -1
- package/dist/src/routes/v3/campaigns.d.ts +1 -1
- package/dist/src/routes/v3/router.d.ts +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/modules/v4/claims/index.d.ts +0 -3
- package/dist/src/modules/v4/claims/index.js +0 -3
- package/dist/src/modules/v4/protocol/index.d.ts +0 -2
- package/dist/src/modules/v4/protocol/index.js +0 -2
- package/dist/src/modules/v4/user/index.d.ts +0 -3
- package/dist/src/modules/v4/user/index.js +0 -3
- /package/dist/src/factories/metadataFactory/implementations/{UniswapV4Metadata.d.ts → UniswapV4.d.ts} +0 -0
- /package/dist/src/factories/metadataFactory/implementations/{UniswapV4Metadata.js → UniswapV4.js} +0 -0
package/dist/src/eden/index.d.ts
CHANGED
@@ -616,6 +616,13 @@ declare const eden: {
|
|
616
616
|
price?: number | null | undefined;
|
617
617
|
})[];
|
618
618
|
chain: {
|
619
|
+
Explorer: {
|
620
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
621
|
+
url: string;
|
622
|
+
id: string;
|
623
|
+
chainId: number;
|
624
|
+
}[];
|
625
|
+
} & {
|
619
626
|
name: string;
|
620
627
|
id: number;
|
621
628
|
icon: string;
|
@@ -3043,7 +3050,7 @@ declare const eden: {
|
|
3043
3050
|
};
|
3044
3051
|
fetch?: RequestInit | undefined;
|
3045
3052
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
3046
|
-
200: (import("../modules/v4/claims").ClaimModel & {
|
3053
|
+
200: (import("../modules/v4/claims/claims.model").ClaimModel & {
|
3047
3054
|
token?: import("../modules/v4/token/token.model").Token["model"];
|
3048
3055
|
})[];
|
3049
3056
|
}>>;
|
@@ -4033,6 +4040,13 @@ declare const eden: {
|
|
4033
4040
|
price?: number | null | undefined;
|
4034
4041
|
})[];
|
4035
4042
|
chain: {
|
4043
|
+
Explorer: {
|
4044
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
4045
|
+
url: string;
|
4046
|
+
id: string;
|
4047
|
+
chainId: number;
|
4048
|
+
}[];
|
4049
|
+
} & {
|
4036
4050
|
name: string;
|
4037
4051
|
id: number;
|
4038
4052
|
icon: string;
|
@@ -6460,7 +6474,7 @@ declare const eden: {
|
|
6460
6474
|
};
|
6461
6475
|
fetch?: RequestInit | undefined;
|
6462
6476
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
6463
|
-
200: (import("../modules/v4/claims").ClaimModel & {
|
6477
|
+
200: (import("../modules/v4/claims/claims.model").ClaimModel & {
|
6464
6478
|
token?: import("../modules/v4/token/token.model").Token["model"];
|
6465
6479
|
})[];
|
6466
6480
|
}>>;
|
@@ -6971,8 +6985,8 @@ declare const eden: {
|
|
6971
6985
|
query: {
|
6972
6986
|
types?: string | number | string[] | number[] | undefined;
|
6973
6987
|
chainIds?: string | string[] | undefined;
|
6974
|
-
creatorTag?: string | undefined;
|
6975
6988
|
live?: boolean | undefined;
|
6989
|
+
creatorTag?: string | undefined;
|
6976
6990
|
hideTestTokens?: string | undefined;
|
6977
6991
|
};
|
6978
6992
|
fetch?: RequestInit | undefined;
|
@@ -7911,6 +7925,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
7911
7925
|
price?: number | null | undefined;
|
7912
7926
|
})[];
|
7913
7927
|
chain: {
|
7928
|
+
Explorer: {
|
7929
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
7930
|
+
url: string;
|
7931
|
+
id: string;
|
7932
|
+
chainId: number;
|
7933
|
+
}[];
|
7934
|
+
} & {
|
7914
7935
|
name: string;
|
7915
7936
|
id: number;
|
7916
7937
|
icon: string;
|
@@ -11194,7 +11215,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
11194
11215
|
};
|
11195
11216
|
headers: unknown;
|
11196
11217
|
response: {
|
11197
|
-
200: (import("../modules/v4/claims").ClaimModel & {
|
11218
|
+
200: (import("../modules/v4/claims/claims.model").ClaimModel & {
|
11198
11219
|
token?: import("../modules/v4/token/token.model").Token["model"];
|
11199
11220
|
})[];
|
11200
11221
|
};
|
@@ -11850,8 +11871,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
11850
11871
|
query: {
|
11851
11872
|
types?: string | number | string[] | number[] | undefined;
|
11852
11873
|
chainIds?: string | string[] | undefined;
|
11853
|
-
creatorTag?: string | undefined;
|
11854
11874
|
live?: boolean | undefined;
|
11875
|
+
creatorTag?: string | undefined;
|
11855
11876
|
hideTestTokens?: string | undefined;
|
11856
11877
|
};
|
11857
11878
|
headers: unknown;
|
@@ -13150,6 +13171,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
13150
13171
|
price?: number | null | undefined;
|
13151
13172
|
})[];
|
13152
13173
|
chain: {
|
13174
|
+
Explorer: {
|
13175
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
13176
|
+
url: string;
|
13177
|
+
id: string;
|
13178
|
+
chainId: number;
|
13179
|
+
}[];
|
13180
|
+
} & {
|
13153
13181
|
name: string;
|
13154
13182
|
id: number;
|
13155
13183
|
icon: string;
|
@@ -15577,7 +15605,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
15577
15605
|
};
|
15578
15606
|
fetch?: RequestInit | undefined;
|
15579
15607
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
15580
|
-
200: (import("../modules/v4/claims").ClaimModel & {
|
15608
|
+
200: (import("../modules/v4/claims/claims.model").ClaimModel & {
|
15581
15609
|
token?: import("../modules/v4/token/token.model").Token["model"];
|
15582
15610
|
})[];
|
15583
15611
|
}>>;
|
@@ -16567,6 +16595,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
16567
16595
|
price?: number | null | undefined;
|
16568
16596
|
})[];
|
16569
16597
|
chain: {
|
16598
|
+
Explorer: {
|
16599
|
+
type: import("../../database/api/.generated").$Enums.ExplorerType;
|
16600
|
+
url: string;
|
16601
|
+
id: string;
|
16602
|
+
chainId: number;
|
16603
|
+
}[];
|
16604
|
+
} & {
|
16570
16605
|
name: string;
|
16571
16606
|
id: number;
|
16572
16607
|
icon: string;
|
@@ -18994,7 +19029,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
18994
19029
|
};
|
18995
19030
|
fetch?: RequestInit | undefined;
|
18996
19031
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
18997
|
-
200: (import("../modules/v4/claims").ClaimModel & {
|
19032
|
+
200: (import("../modules/v4/claims/claims.model").ClaimModel & {
|
18998
19033
|
token?: import("../modules/v4/token/token.model").Token["model"];
|
18999
19034
|
})[];
|
19000
19035
|
}>>;
|
@@ -19505,8 +19540,8 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
19505
19540
|
query: {
|
19506
19541
|
types?: string | number | string[] | number[] | undefined;
|
19507
19542
|
chainIds?: string | string[] | undefined;
|
19508
|
-
creatorTag?: string | undefined;
|
19509
19543
|
live?: boolean | undefined;
|
19544
|
+
creatorTag?: string | undefined;
|
19510
19545
|
hideTestTokens?: string | undefined;
|
19511
19546
|
};
|
19512
19547
|
fetch?: RequestInit | undefined;
|
@@ -18,7 +18,7 @@ import { JsonAirdropMetadata } from "./implementations/JsonAirdrop";
|
|
18
18
|
import { MorphoMetadata } from "./implementations/Morpho";
|
19
19
|
import { RadiantMetadata } from "./implementations/Radiant";
|
20
20
|
import { SiloMetadata } from "./implementations/Silo";
|
21
|
-
import { UniswapV4Metadata } from "./implementations/
|
21
|
+
import { UniswapV4Metadata } from "./implementations/UniswapV4";
|
22
22
|
import { VestMetadata } from "./implementations/Vest";
|
23
23
|
// @dev Casts are made to enforce type safety
|
24
24
|
// @dev A type error must be thrown if a new campaign type is added and the corresponding metadata builder is not implemented
|
@@ -52,5 +52,6 @@ const map = {
|
|
52
52
|
[Campaign.AMBIENTPROCESSOR]: new AmbientMetadata(),
|
53
53
|
[Campaign.ENCOMPASSING]: new EncompassingMetadata(),
|
54
54
|
[Campaign.EVENT_BASED]: new EventBasedMetadata(),
|
55
|
+
[Campaign.ERC20REBASEFIXAPR]: new Erc20Metadata(),
|
55
56
|
};
|
56
57
|
export const metadataBuilderFactory = (campaignType) => map[campaignType];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { type Campaign as CampaignEnum, type CampaignParameters, type ChainId } from "@sdk";
|
2
|
-
import type { ProtocolId } from "../../../modules/v4/protocol";
|
2
|
+
import type { ProtocolId } from "../../../modules/v4/protocol/protocol.model";
|
3
3
|
import type { MetadataBuilder } from "../interface";
|
4
4
|
type campaignType = CampaignEnum.COMPOUND;
|
5
5
|
export declare class CompoundMetadata implements MetadataBuilder<campaignType> {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { log } from "../../../utils/logger";
|
2
2
|
import { Campaign as CampaignEnum } from "@sdk";
|
3
3
|
import { CampaignService } from "../../../modules/v4/campaign";
|
4
|
-
import { ProtocolService } from "../../../modules/v4/protocol";
|
4
|
+
import { ProtocolService } from "../../../modules/v4/protocol/protocol.service";
|
5
5
|
export class Erc20Metadata {
|
6
6
|
async getMetadata(computeChainId, params, _subType, rewardTokenAddress, distributionChainId, campaignId) {
|
7
7
|
let action = "HOLD";
|
package/dist/src/index.d.ts
CHANGED
@@ -408,6 +408,13 @@ declare const app: Elysia<"", false, {
|
|
408
408
|
price?: number | null | undefined;
|
409
409
|
})[];
|
410
410
|
chain: {
|
411
|
+
Explorer: {
|
412
|
+
type: import("../database/api/.generated").$Enums.ExplorerType;
|
413
|
+
url: string;
|
414
|
+
id: string;
|
415
|
+
chainId: number;
|
416
|
+
}[];
|
417
|
+
} & {
|
411
418
|
name: string;
|
412
419
|
id: number;
|
413
420
|
icon: string;
|
@@ -3691,7 +3698,7 @@ declare const app: Elysia<"", false, {
|
|
3691
3698
|
};
|
3692
3699
|
headers: unknown;
|
3693
3700
|
response: {
|
3694
|
-
200: (import("./modules/v4/claims").ClaimModel & {
|
3701
|
+
200: (import("./modules/v4/claims/claims.model").ClaimModel & {
|
3695
3702
|
token?: import("./modules/v4/token/token.model").Token["model"];
|
3696
3703
|
})[];
|
3697
3704
|
};
|
@@ -4347,8 +4354,8 @@ declare const app: Elysia<"", false, {
|
|
4347
4354
|
query: {
|
4348
4355
|
types?: string | number | string[] | number[] | undefined;
|
4349
4356
|
chainIds?: string | string[] | undefined;
|
4350
|
-
creatorTag?: string | undefined;
|
4351
4357
|
live?: boolean | undefined;
|
4358
|
+
creatorTag?: string | undefined;
|
4352
4359
|
hideTestTokens?: string | undefined;
|
4353
4360
|
};
|
4354
4361
|
headers: unknown;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { UserService } from "../../modules/v4/user";
|
1
|
+
import { UserService } from "../../modules/v4/user/user.service";
|
2
2
|
import { Campaign } from "@sdk";
|
3
3
|
import { AjnaDynamicData } from "./campaignTypes/AjnaDynamicData";
|
4
4
|
import { AmbientDynamicData } from "./campaignTypes/AmbientDynamicData";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { throwOnInvalidRequiredAddress, throwOnUnsupportedChainId } from "../../../utils/throw";
|
2
2
|
import Elysia from "elysia";
|
3
3
|
import { ChainArrayOptionalDto } from "../chain/chain.model";
|
4
|
-
import { UserUniqueDto } from "../user";
|
4
|
+
import { UserUniqueDto } from "../user/user.model";
|
5
5
|
import { ClaimService } from "./claims.service";
|
6
6
|
// ─── Claim Controller ───────────────────────────────────────────────────────
|
7
7
|
export const ClaimController = new Elysia({ prefix: "/claims", detail: { tags: ["Claims"] } })
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ChainId } from "@sdk";
|
2
2
|
import type { Token } from "../token/token.model";
|
3
|
-
import type { UserUniqueModel } from "../user";
|
3
|
+
import type { UserUniqueModel } from "../user/user.model";
|
4
4
|
import type { ClaimModel } from "./claims.model";
|
5
5
|
export declare abstract class ClaimService {
|
6
6
|
static getHistoricalClaims(params: UserUniqueModel, chainFilter?: ChainId[]): Promise<(ClaimModel & {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { GetInteractionProtocolsQuery, InteractionAction, InteractionTarget, Router } from "../interaction/interaction.model";
|
2
|
-
import {
|
2
|
+
import type { ProtocolId } from "../protocol/protocol.model";
|
3
3
|
import { type EnsoApi, type EnsoSlug } from "./enso.model";
|
4
4
|
export declare abstract class EnsoService {
|
5
5
|
#private;
|
@@ -263,6 +263,13 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
263
263
|
price?: number | null | undefined;
|
264
264
|
})[];
|
265
265
|
chain: {
|
266
|
+
Explorer: {
|
267
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
268
|
+
url: string;
|
269
|
+
id: string;
|
270
|
+
chainId: number;
|
271
|
+
}[];
|
272
|
+
} & {
|
266
273
|
name: string;
|
267
274
|
id: number;
|
268
275
|
icon: string;
|
@@ -175,6 +175,13 @@ export declare abstract class OpportunityRepository {
|
|
175
175
|
}) | null>;
|
176
176
|
static findUniqueOrThrow(id: string, withTest?: boolean, withCampaigns?: boolean): Promise<{
|
177
177
|
Chain: {
|
178
|
+
Explorer: {
|
179
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
180
|
+
url: string;
|
181
|
+
id: string;
|
182
|
+
chainId: number;
|
183
|
+
}[];
|
184
|
+
} & {
|
178
185
|
name: string;
|
179
186
|
id: number;
|
180
187
|
icon: string;
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { ProtocolService } from "../protocol/protocol.service";
|
1
2
|
import { apiDbClient } from "../../../utils/prisma";
|
2
3
|
import { Status } from "../../../../database/api/.generated";
|
3
4
|
import moment from "moment";
|
4
5
|
import { AprService } from "../apr";
|
5
|
-
import { ProtocolService } from "../protocol";
|
6
6
|
import { RewardService } from "../reward";
|
7
7
|
import { TvlService } from "../tvl";
|
8
8
|
export class OpportunityRepository {
|
@@ -197,7 +197,7 @@ export class OpportunityRepository {
|
|
197
197
|
include: {
|
198
198
|
...OpportunityRepository.#getRecordInclusion(withTest),
|
199
199
|
Campaigns: withCampaigns ? OpportunityRepository.#getCampaignInclusion(withTest) : undefined,
|
200
|
-
Chain: true,
|
200
|
+
Chain: { include: { Explorer: true } },
|
201
201
|
MainProtocol: true,
|
202
202
|
Protocols: true,
|
203
203
|
Tokens: {
|
@@ -551,6 +551,13 @@ export declare abstract class OpportunityService {
|
|
551
551
|
price?: number | null | undefined;
|
552
552
|
})[];
|
553
553
|
chain: {
|
554
|
+
Explorer: {
|
555
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
556
|
+
url: string;
|
557
|
+
id: string;
|
558
|
+
chainId: number;
|
559
|
+
}[];
|
560
|
+
} & {
|
554
561
|
name: string;
|
555
562
|
id: number;
|
556
563
|
icon: string;
|
@@ -716,6 +723,13 @@ export declare abstract class OpportunityService {
|
|
716
723
|
price?: number | null | undefined;
|
717
724
|
})[];
|
718
725
|
chain: {
|
726
|
+
Explorer: {
|
727
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
728
|
+
url: string;
|
729
|
+
id: string;
|
730
|
+
chainId: number;
|
731
|
+
}[];
|
732
|
+
} & {
|
719
733
|
name: string;
|
720
734
|
id: number;
|
721
735
|
icon: string;
|
@@ -877,6 +891,13 @@ export declare abstract class OpportunityService {
|
|
877
891
|
price?: number | null | undefined;
|
878
892
|
})[];
|
879
893
|
chain: {
|
894
|
+
Explorer: {
|
895
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
896
|
+
url: string;
|
897
|
+
id: string;
|
898
|
+
chainId: number;
|
899
|
+
}[];
|
900
|
+
} & {
|
880
901
|
name: string;
|
881
902
|
id: number;
|
882
903
|
icon: string;
|
@@ -917,6 +938,13 @@ export declare abstract class OpportunityService {
|
|
917
938
|
price?: number | null | undefined;
|
918
939
|
})[];
|
919
940
|
chain: {
|
941
|
+
Explorer: {
|
942
|
+
type: import("../../../../database/api/.generated").$Enums.ExplorerType;
|
943
|
+
url: string;
|
944
|
+
id: string;
|
945
|
+
chainId: number;
|
946
|
+
}[];
|
947
|
+
} & {
|
920
948
|
name: string;
|
921
949
|
id: number;
|
922
950
|
icon: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AuthorizationHeadersDto, BackOfficeGuard } from "../../../guards/BackOffice.guard";
|
2
2
|
import Elysia, { t } from "elysia";
|
3
|
-
import { ProtocolService } from ".";
|
4
3
|
import { CreateProtocolDto, GetProtocolsQueryDto, ProtocolIdDto, ProtocolResourceDto, UpdateProtocolDto, } from "./protocol.model";
|
4
|
+
import { ProtocolService } from "./protocol.service";
|
5
5
|
// ─── Protocols Controller ────────────────────────────────────────────────────
|
6
6
|
export const ProtocolController = new Elysia({ prefix: "/protocols", detail: { tags: ["Protocols"] } })
|
7
7
|
// ─── Get Many Protocols ──────────────────────────────────────────────
|
@@ -278,6 +278,13 @@ export declare const v4: Elysia<"/v4", false, {
|
|
278
278
|
price?: number | null | undefined;
|
279
279
|
})[];
|
280
280
|
chain: {
|
281
|
+
Explorer: {
|
282
|
+
type: import("../../../database/api/.generated").$Enums.ExplorerType;
|
283
|
+
url: string;
|
284
|
+
id: string;
|
285
|
+
chainId: number;
|
286
|
+
}[];
|
287
|
+
} & {
|
281
288
|
name: string;
|
282
289
|
id: number;
|
283
290
|
icon: string;
|
@@ -3561,7 +3568,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3561
3568
|
};
|
3562
3569
|
headers: unknown;
|
3563
3570
|
response: {
|
3564
|
-
200: (import("./claims").ClaimModel & {
|
3571
|
+
200: (import("./claims/claims.model").ClaimModel & {
|
3565
3572
|
token?: import("./token/token.model").Token["model"];
|
3566
3573
|
})[];
|
3567
3574
|
};
|
@@ -35,8 +35,8 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
35
35
|
query: {
|
36
36
|
types?: string | number | string[] | number[] | undefined;
|
37
37
|
chainIds?: string | string[] | undefined;
|
38
|
-
creatorTag?: string | undefined;
|
39
38
|
live?: boolean | undefined;
|
39
|
+
creatorTag?: string | undefined;
|
40
40
|
hideTestTokens?: string | undefined;
|
41
41
|
};
|
42
42
|
headers: unknown;
|
@@ -71,8 +71,8 @@ export declare const v3: Elysia<"/v3", false, {
|
|
71
71
|
query: {
|
72
72
|
types?: string | number | string[] | number[] | undefined;
|
73
73
|
chainIds?: string | string[] | undefined;
|
74
|
-
creatorTag?: string | undefined;
|
75
74
|
live?: boolean | undefined;
|
75
|
+
creatorTag?: string | undefined;
|
76
76
|
hideTestTokens?: string | undefined;
|
77
77
|
};
|
78
78
|
headers: unknown;
|