@merkl/api 0.10.208 → 0.10.210
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/database/api/.generated/edge.js +6 -4
- package/dist/database/api/.generated/index-browser.js +3 -1
- package/dist/database/api/.generated/index.d.ts +3 -1
- package/dist/database/api/.generated/index.js +6 -4
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +2 -0
- package/dist/database/api/.generated/wasm.js +3 -1
- package/dist/database/api/seeder/resources/protocol.d.ts +12 -0
- package/dist/database/api/seeder/resources/protocol.js +2 -0
- package/dist/src/eden/index.d.ts +39 -9
- package/dist/src/entities/opportunity.js +37 -1
- package/dist/src/index.d.ts +15 -3
- package/dist/src/index.js +1 -1
- package/dist/src/libs/campaigns/campaignTypes/EigenLayerDynamicData.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/EigenLayerDynamicData.js +67 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +4 -0
- package/dist/src/libs/positions/EigenLayer/index.d.ts +6 -0
- package/dist/src/libs/positions/EigenLayer/index.js +53 -0
- package/dist/src/libs/positions/ajna/index.d.ts +4 -39
- package/dist/src/libs/positions/ajna/index.js +2 -2
- package/dist/src/libs/positions/badger/index.d.ts +3 -24
- package/dist/src/libs/positions/badger/index.js +1 -1
- package/dist/src/libs/positions/index.js +4 -0
- package/dist/src/libs/positions/morpho/index.d.ts +4 -38
- package/dist/src/libs/positions/prepareFetch.js +29 -1
- package/dist/src/libs/positions/types.d.ts +55 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -2
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +2 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +2 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -1
- package/dist/src/modules/v4/protocol/protocol.model.js +2 -0
- package/dist/src/modules/v4/router.d.ts +3 -3
- package/dist/src/utils/generateCardName.js +1 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1,3 +1,42 @@
|
|
1
|
+
import type { Forwarder, ForwarderParameters } from "@sdk";
|
2
|
+
export interface BucketData {
|
3
|
+
bucket_index: number;
|
4
|
+
deposit: string;
|
5
|
+
bucket_price: string;
|
6
|
+
}
|
7
|
+
export type UserPosition = {
|
8
|
+
balance: number;
|
9
|
+
token: string;
|
10
|
+
origin: string;
|
11
|
+
totalSupply: number;
|
12
|
+
tvl: number;
|
13
|
+
};
|
14
|
+
export type PositionType = {
|
15
|
+
[mainParameter: string]: {
|
16
|
+
userPositions: UserPosition[];
|
17
|
+
decimals: number;
|
18
|
+
totalSupply: number;
|
19
|
+
userTVL: number;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
export type FetchedCampaign = {
|
23
|
+
computedtotalSupply: number;
|
24
|
+
rewardToken: string;
|
25
|
+
symbolRewardToken: string;
|
26
|
+
tvl: number;
|
27
|
+
decimals: number;
|
28
|
+
totalSupplyTargetToken: number;
|
29
|
+
amount: number;
|
30
|
+
forwarders?: {
|
31
|
+
[address: string]: ForwarderParameters<Forwarder>;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
export type Res = {
|
35
|
+
userPositions: UserPosition[];
|
36
|
+
decimals: number;
|
37
|
+
totalSupply: number;
|
38
|
+
userTVL: number;
|
39
|
+
};
|
1
40
|
export type CLAMMPosition = {
|
2
41
|
userPositions: {
|
3
42
|
almAddress: string;
|
@@ -18,3 +57,19 @@ export type CLAMMPosition = {
|
|
18
57
|
userTotalLiquidity: number;
|
19
58
|
userInRangeLiquidity: number;
|
20
59
|
};
|
60
|
+
export type AjnaFetchedCampaign = FetchedCampaign & {
|
61
|
+
subtype: number;
|
62
|
+
poolId: string;
|
63
|
+
quoteToken: string;
|
64
|
+
};
|
65
|
+
export type BadgerFetchedCampaign = FetchedCampaign & {
|
66
|
+
targetToken: string;
|
67
|
+
};
|
68
|
+
export type MorphoFetchedCampaign = FetchedCampaign & {
|
69
|
+
targetToken: string;
|
70
|
+
subtype: number;
|
71
|
+
marketId?: string;
|
72
|
+
};
|
73
|
+
export type EigenLayerFetchedCampaign = FetchedCampaign & {
|
74
|
+
strategy: string;
|
75
|
+
};
|
@@ -60,7 +60,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
60
60
|
body: unknown;
|
61
61
|
params: {};
|
62
62
|
query: {
|
63
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
|
63
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
64
64
|
items?: number | undefined;
|
65
65
|
subType?: number | undefined;
|
66
66
|
page?: number | undefined;
|
@@ -132,7 +132,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
132
132
|
body: unknown;
|
133
133
|
params: {};
|
134
134
|
query: {
|
135
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
|
135
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
136
136
|
items?: number | undefined;
|
137
137
|
subType?: number | undefined;
|
138
138
|
page?: number | undefined;
|
@@ -117,6 +117,8 @@ export declare const GetCampaignQueryDto: import("@sinclair/typebox").TObject<{
|
|
117
117
|
AJNA: "AJNA";
|
118
118
|
EULER: "EULER";
|
119
119
|
UNISWAP_V4: "UNISWAP_V4";
|
120
|
+
ION: "ION";
|
121
|
+
EIGENLAYER: "EIGENLAYER";
|
120
122
|
}>>;
|
121
123
|
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
122
124
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -17,7 +17,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
17
17
|
post: {
|
18
18
|
body: {
|
19
19
|
name?: string | undefined;
|
20
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4";
|
20
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
21
21
|
tokens: {
|
22
22
|
chainId: number;
|
23
23
|
address: string;
|
@@ -315,6 +315,8 @@ export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
|
|
315
315
|
AJNA: "AJNA";
|
316
316
|
EULER: "EULER";
|
317
317
|
UNISWAP_V4: "UNISWAP_V4";
|
318
|
+
ION: "ION";
|
319
|
+
EIGENLAYER: "EIGENLAYER";
|
318
320
|
}>;
|
319
321
|
identifier: import("@sinclair/typebox").TString;
|
320
322
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -5,7 +5,7 @@ import type { Resource } from "../prisma";
|
|
5
5
|
* @see {@link Resource}
|
6
6
|
*/
|
7
7
|
export type Protocol = Resource<"Protocol">;
|
8
|
-
declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank"];
|
8
|
+
declare const protocolTypes: readonly ["arthswap", "baseswap", "camelot", "crust", "fenix", "horiza", "izumi", "kim", "pancakeswap-v3", "quickswap-algebra", "quickswap-uni", "ramses", "retro", "stryke", "stryke-pcs", "stryke-sushi", "sushiswap-v3", "swapr", "thruster", "uniswap-v3", "voltage", "zero", "koi", "supswap-v3", "zkswap", "thirdtrade", "uniswap-v2", "velodrome", "aerodrome", "balancer", "curve", "aura", "akron", "beefy", "dragonswap", "poolside", "koi", "radiant", "aave", "euler", "gearbox", "compound", "sturdy", "frax", "ionic", "moonwell", "fluid", "silo", "morpho", "coumpound", "dolomite", "badger", "ajna", "layerbank", "ion", "eigenlayer"];
|
9
9
|
export type ProtocolId = (typeof protocolTypes)[number];
|
10
10
|
export declare const ProtocolResourceDto: import("@sinclair/typebox").TObject<{
|
11
11
|
id: import("@sinclair/typebox").TString;
|
@@ -26,7 +26,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
26
26
|
post: {
|
27
27
|
body: {
|
28
28
|
name?: string | undefined;
|
29
|
-
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4";
|
29
|
+
type: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER";
|
30
30
|
tokens: {
|
31
31
|
chainId: number;
|
32
32
|
address: string;
|
@@ -573,7 +573,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
573
573
|
body: unknown;
|
574
574
|
params: {};
|
575
575
|
query: {
|
576
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
|
576
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
577
577
|
items?: number | undefined;
|
578
578
|
subType?: number | undefined;
|
579
579
|
page?: number | undefined;
|
@@ -645,7 +645,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
645
645
|
body: unknown;
|
646
646
|
params: {};
|
647
647
|
query: {
|
648
|
-
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | undefined;
|
648
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | undefined;
|
649
649
|
items?: number | undefined;
|
650
650
|
subType?: number | undefined;
|
651
651
|
page?: number | undefined;
|
@@ -94,6 +94,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
|
|
94
94
|
return `Stake ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} LP on ${typeInfo.protocol}`;
|
95
95
|
case tokenType.tempest:
|
96
96
|
case tokenType.tempestStaking:
|
97
|
+
return `Deposit into ${typeInfo.symbolToken0}/${typeInfo.symbolToken1} vault on ${typeInfo.protocol}`;
|
97
98
|
case tokenType.holdstation:
|
98
99
|
return `Hold vault token ${campaign.campaignParameters.symbolTargetToken} on ${typeInfo.protocol}`;
|
99
100
|
case tokenType.staking:
|