@merkl/api 0.10.81 → 0.10.83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cache/declaration.d.ts +5 -0
- package/dist/src/eden/index.d.ts +66 -307
- package/dist/src/index.d.ts +24 -117
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicDataRefacto.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +16 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/AaveProcessor.d.ts +30 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/AssetProcessor.d.ts +35 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/AuraProcessor.d.ts +61 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/BalancerGaugeProcessor.d.ts +49 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/BalancerPoolProcessor.d.ts +53 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/BeefyProcessor.d.ts +48 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/CompoundProcessor.d.ts +44 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EnzymeProcessor.d.ts +40 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerBorrowProcessor.d.ts +37 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/EulerLendProcessor.d.ts +37 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/FluidProcessor.d.ts +39 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/FraxProcessor.d.ts +33 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/GearboxProcessor.d.ts +40 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/MetamorphoProcessor.d.ts +31 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/PendleProcessor.d.ts +27 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/RadiantProcessor.d.ts +32 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/SpliceProcessor.d.ts +16 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/SturdySiloProcessor.d.ts +39 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/TorosProcessor.d.ts +29 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/curveProcessor.d.ts +47 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/genericProcessor.d.ts +61 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.d.ts +6 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/templateProcessor.d.ts +32 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/uniswapProcessor.d.ts +42 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesPricesRefactoFinal.d.ts +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1RefactoFinal.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound2RefactoFinal.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound3RefactoFinal.d.ts +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound4RefactoFinal.d.ts +4 -0
- package/dist/src/libs/campaigns/campaignsDynamicDataRefacto.d.ts +3 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +0 -12
- package/dist/src/modules/v4/reward/reward.repository.d.ts +1 -0
- package/dist/src/modules/v4/reward/reward.service.d.ts +126 -109
- package/dist/src/modules/v4/router.d.ts +24 -117
- package/dist/src/modules/v4/testdynamicData/dynamicData.controller.d.ts +50 -0
- package/dist/src/modules/v4/testdynamicData/dynamicData.model.d.ts +5 -0
- package/dist/src/modules/v4/testdynamicData/dynamicData.repository.d.ts +0 -0
- package/dist/src/modules/v4/testdynamicData/dynamicData.service.d.ts +12 -0
- package/dist/src/modules/v4/testdynamicData/index.d.ts +3 -0
- package/dist/src/modules/v4/token/token.repository.d.ts +1 -1
- package/dist/src/modules/v4/user/user.controller.d.ts +2 -2
- package/dist/src/routes/v3/ERC20Campaigns.d.ts +24 -117
- package/dist/src/routes/v3/blacklist.d.ts +24 -117
- package/dist/src/routes/v3/campaigns.d.ts +24 -117
- package/dist/src/routes/v3/campaignsInfo.d.ts +24 -117
- package/dist/src/routes/v3/multiChainPositions.d.ts +24 -117
- package/dist/src/routes/v3/opportunity.d.ts +24 -117
- package/dist/src/routes/v3/positions.d.ts +24 -117
- package/dist/src/routes/v3/rewards.d.ts +24 -117
- package/dist/src/routes/v3/updates.d.ts +24 -117
- package/dist/src/routes/v3/userRewards.d.ts +24 -117
- package/dist/src/utils/decodeCalls.d.ts +2 -0
- package/dist/src/utils/encodeCalls.d.ts +3 -0
- package/dist/src/utils/generateCardName.d.ts +3 -0
- package/dist/src/utils/interfaces.d.ts +39 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/SturdySiloProcessor.d.ts
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import type { tokenType } from "../helpers/tokenType";
|
4
|
+
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
5
|
+
type callType = {
|
6
|
+
key: keyof dataRawSturdySilo;
|
7
|
+
call: string;
|
8
|
+
target: keyof callKeysSturdySilo;
|
9
|
+
metaData?: any;
|
10
|
+
};
|
11
|
+
type callKeysSturdySilo = callKeys & {
|
12
|
+
underlying: string;
|
13
|
+
sharePrice: string;
|
14
|
+
collateralContract: string;
|
15
|
+
collateral: string;
|
16
|
+
symbolUnderlyingToken: string;
|
17
|
+
decimalsUnderlyingToken: string;
|
18
|
+
symbolCollateral: string;
|
19
|
+
};
|
20
|
+
type dataRawSturdySilo = callKeysSturdySilo & {};
|
21
|
+
type dataTypeSturdySilo = dataType & {
|
22
|
+
underlying: string;
|
23
|
+
sharePrice: number;
|
24
|
+
collateral: string;
|
25
|
+
collateralContract: string;
|
26
|
+
symbolUnderlyingToken: string;
|
27
|
+
decimalsUnderlyingToken: string;
|
28
|
+
symbolCollateral: string;
|
29
|
+
};
|
30
|
+
export declare class SturdySiloProcessor extends GenericProcessor<callKeysSturdySilo, dataRawSturdySilo, dataTypeSturdySilo> {
|
31
|
+
rounds: {
|
32
|
+
round1: callType[];
|
33
|
+
round2: callType[];
|
34
|
+
round3: callType[];
|
35
|
+
round4: callType[];
|
36
|
+
};
|
37
|
+
processingRound5(index: number, type: tokenType, typeInfo: dataRawSturdySilo, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeSturdySilo>;
|
38
|
+
}
|
39
|
+
export {};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import type { tokenType } from "../helpers/tokenType";
|
4
|
+
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
5
|
+
type callType = {
|
6
|
+
key: keyof dataRawToros;
|
7
|
+
call: string;
|
8
|
+
target: keyof callKeysToros;
|
9
|
+
metaData?: any;
|
10
|
+
};
|
11
|
+
type callKeysToros = callKeys & {
|
12
|
+
tokenPrice: string;
|
13
|
+
};
|
14
|
+
type dataRawToros = callKeysToros & {};
|
15
|
+
type dataTypeToros = dataType & {
|
16
|
+
tokenPrice: string;
|
17
|
+
priceTargetToken: number;
|
18
|
+
symbolUnderlyingToken: string;
|
19
|
+
};
|
20
|
+
export declare class TorosProcessor extends GenericProcessor<callKeysToros, dataRawToros, dataTypeToros> {
|
21
|
+
rounds: {
|
22
|
+
round1: callType[];
|
23
|
+
round2: callType[];
|
24
|
+
round3: callType[];
|
25
|
+
round4: callType[];
|
26
|
+
};
|
27
|
+
processingRound5(index: number, type: tokenType, typeInfo: dataRawToros, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeToros>;
|
28
|
+
}
|
29
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import { tokenType } from "../helpers/tokenType";
|
4
|
+
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
5
|
+
type callType = {
|
6
|
+
key: keyof dataRawCurve;
|
7
|
+
call: string;
|
8
|
+
target: keyof callKeysCurve;
|
9
|
+
metaData?: any;
|
10
|
+
optional?: boolean;
|
11
|
+
};
|
12
|
+
type callKeysCurve = callKeys & {
|
13
|
+
lp_price: string;
|
14
|
+
token0: string;
|
15
|
+
token1: string;
|
16
|
+
token2: string;
|
17
|
+
symbolToken0: string;
|
18
|
+
symbolToken1: string;
|
19
|
+
symbolToken2: string;
|
20
|
+
};
|
21
|
+
type dataRawCurve = callKeysCurve & {
|
22
|
+
poolTokens: {
|
23
|
+
[key: string]: string;
|
24
|
+
};
|
25
|
+
};
|
26
|
+
type dataTypeCurve = dataType & {
|
27
|
+
lp_price: number;
|
28
|
+
token0: string;
|
29
|
+
token1: string;
|
30
|
+
token2: string;
|
31
|
+
symbolToken0: string;
|
32
|
+
symbolToken1: string;
|
33
|
+
symbolToken2: string;
|
34
|
+
poolTokens: {
|
35
|
+
[key: string]: string;
|
36
|
+
};
|
37
|
+
};
|
38
|
+
export declare class CurveProcessor extends GenericProcessor<callKeysCurve, dataRawCurve, dataTypeCurve> {
|
39
|
+
rounds: {
|
40
|
+
round1: callType[];
|
41
|
+
round2: callType[];
|
42
|
+
round3: callType[];
|
43
|
+
round4: callType[];
|
44
|
+
};
|
45
|
+
processingRound5(index: number, type: tokenType, typeInfo: dataRawCurve, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeCurve>;
|
46
|
+
}
|
47
|
+
export {};
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
4
|
+
import { type tokenType, type tokenTypeStruct } from "../helpers/tokenType";
|
5
|
+
export declare enum roundType {
|
6
|
+
one = "round1",
|
7
|
+
two = "round2",
|
8
|
+
three = "round3",
|
9
|
+
four = "round4"
|
10
|
+
}
|
11
|
+
export type callType = {
|
12
|
+
key: any;
|
13
|
+
call: any;
|
14
|
+
target: any;
|
15
|
+
metaData?: any;
|
16
|
+
optional?: boolean;
|
17
|
+
};
|
18
|
+
export type callKeys = {
|
19
|
+
[key: string]: string;
|
20
|
+
tokenAddress: string;
|
21
|
+
blacklistedSupply: string;
|
22
|
+
totalSupply: string;
|
23
|
+
};
|
24
|
+
export type dataRaw = {
|
25
|
+
tokenAddress: string;
|
26
|
+
blacklistedSupply: string;
|
27
|
+
totalSupply: string;
|
28
|
+
};
|
29
|
+
export type dataType = {
|
30
|
+
tokenAddress: string;
|
31
|
+
totalSupply: number;
|
32
|
+
blacklistedSupply: number;
|
33
|
+
tvl: number;
|
34
|
+
cardName: string;
|
35
|
+
priceTargetToken: number;
|
36
|
+
};
|
37
|
+
export declare class GenericProcessor<Input extends callKeys, DataRaw extends dataRaw, Output extends dataType> {
|
38
|
+
rounds: {
|
39
|
+
round1: callType[];
|
40
|
+
round2: callType[];
|
41
|
+
round3: callType[];
|
42
|
+
round4: callType[];
|
43
|
+
};
|
44
|
+
debug: boolean;
|
45
|
+
processingRound1(typeInfo: DataRaw): void;
|
46
|
+
processingRound2(typeInfo: DataRaw): void;
|
47
|
+
processingRound3(typeInfo: DataRaw): void;
|
48
|
+
processingRound4(typeInfo: DataRaw): void;
|
49
|
+
processingRound5(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<Output>;
|
50
|
+
computeRound1(type: tokenType, typeInfo: DataRaw): tokenTypeStruct;
|
51
|
+
computeRound2(index: number, type: tokenType, typeInfo: DataRaw, calls: string[]): tokenTypeStruct;
|
52
|
+
computeRound3(index: number, type: tokenType, typeInfo: DataRaw, calls: string[]): tokenTypeStruct;
|
53
|
+
computeRound4(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
54
|
+
computeRound5(index: number, type: tokenType, typeInfo: DataRaw, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
55
|
+
generateBlackListCall(type: tokenType, typeInfo: DataRaw, campaign: CampaignParameters<Campaign.ERC20>): Multicall3.Call3Struct[];
|
56
|
+
decodeBlackListedSupply(index: number, decimals: number, blacklist: string[], calls: string[]): string;
|
57
|
+
decodeRound(round: callType[], index: number, calls: string[], type: tokenType, data: DataRaw): void;
|
58
|
+
decodePreviousRound(round: roundType, calls: string[], data: DataRaw, type: tokenType, index: number): void;
|
59
|
+
encodeRound(round: callType[], callInfo: Input, type: tokenType): Multicall3.Call3Struct[];
|
60
|
+
encodeNextRound(round: roundType, type: tokenType, data: DataRaw): Multicall3.Call3Struct[];
|
61
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { tokenType } from "../helpers/tokenType";
|
2
|
+
import { GenericProcessor } from "./GenericProcessor";
|
3
|
+
import type { callKeys, dataRaw, dataType } from "./GenericProcessor";
|
4
|
+
export declare const processorMapping: {
|
5
|
+
[key in tokenType]: typeof GenericProcessor<callKeys, dataRaw, dataType>;
|
6
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
3
|
+
import type { tokenType, tokenTypeStruct } from "../helpers/tokenType";
|
4
|
+
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
5
|
+
type callType = {
|
6
|
+
key: keyof dataRawTemplate;
|
7
|
+
call: string;
|
8
|
+
target: keyof callKeysTemplate;
|
9
|
+
metaData?: any;
|
10
|
+
};
|
11
|
+
type callKeysTemplate = callKeys & {};
|
12
|
+
type dataRawTemplate = callKeysTemplate & {};
|
13
|
+
type dataTypeTemplate = dataType & {};
|
14
|
+
export declare class TemplateProcessor extends GenericProcessor<callKeysTemplate, dataRawTemplate, dataTypeTemplate> {
|
15
|
+
rounds: {
|
16
|
+
round1: callType[];
|
17
|
+
round2: callType[];
|
18
|
+
round3: callType[];
|
19
|
+
round4: callType[];
|
20
|
+
};
|
21
|
+
processingRound1(typeInfo: dataRawTemplate): void;
|
22
|
+
processingRound2(typeInfo: dataRawTemplate): void;
|
23
|
+
processingRound3(typeInfo: dataRawTemplate): void;
|
24
|
+
processingRound4(typeInfo: dataRawTemplate): void;
|
25
|
+
processingRound5(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeTemplate>;
|
26
|
+
computeRound1(type: tokenType, typeInfo: dataRawTemplate): tokenTypeStruct;
|
27
|
+
computeRound2(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[]): tokenTypeStruct;
|
28
|
+
computeRound3(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[]): tokenTypeStruct;
|
29
|
+
computeRound4(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
30
|
+
computeRound5(index: number, type: tokenType, typeInfo: dataRawTemplate, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
31
|
+
}
|
32
|
+
export {};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import type { Pricer } from "../../../../../utils/pricer";
|
2
|
+
import { type Campaign, type CampaignParameters } from "@sdk";
|
3
|
+
import type { tokenType } from "../helpers/tokenType";
|
4
|
+
import { GenericProcessor, type callKeys, type dataType } from "./GenericProcessor";
|
5
|
+
type callType = {
|
6
|
+
key: keyof dataRawUni;
|
7
|
+
call: string;
|
8
|
+
target: keyof callKeysUni;
|
9
|
+
metaData?: any;
|
10
|
+
};
|
11
|
+
type callKeysUni = callKeys & {
|
12
|
+
token0: string;
|
13
|
+
token1: string;
|
14
|
+
symbolToken0: string;
|
15
|
+
symbolToken1: string;
|
16
|
+
decimalsToken0: string;
|
17
|
+
decimalsToken1: string;
|
18
|
+
balanceToken0: string;
|
19
|
+
balanceToken1: string;
|
20
|
+
};
|
21
|
+
type dataRawUni = callKeysUni & {};
|
22
|
+
type dataTypeUni = dataType & {
|
23
|
+
token0: string;
|
24
|
+
token1: string;
|
25
|
+
symbolToken0: string;
|
26
|
+
symbolToken1: string;
|
27
|
+
decimalsToken0: number;
|
28
|
+
decimalsToken1: number;
|
29
|
+
balanceToken0: number;
|
30
|
+
balanceToken1: number;
|
31
|
+
priceTargetToken: number;
|
32
|
+
};
|
33
|
+
export declare class UniswapProcessor extends GenericProcessor<callKeysUni, dataRawUni, dataTypeUni> {
|
34
|
+
rounds: {
|
35
|
+
round1: callType[];
|
36
|
+
round2: callType[];
|
37
|
+
round3: callType[];
|
38
|
+
round4: callType[];
|
39
|
+
};
|
40
|
+
processingRound5(index: number, type: tokenType, typeInfo: dataRawUni, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<dataTypeUni>;
|
41
|
+
}
|
42
|
+
export {};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { Pricer } from "../../../../utils/pricer";
|
2
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
3
|
+
import type { tokenType, tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare function getTokenPricesInfo(index: number, type: tokenType, typeInfo: any, calls: string[], campaign: CampaignParameters<Campaign.ERC20> | CampaignParameters<Campaign.EULER>, pricer: Pricer): Promise<tokenTypeStruct>;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
2
|
+
import type { tokenType, tokenTypeStruct } from "./helpers/tokenType";
|
3
|
+
export declare function getTokenTypeRound2(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[]): tokenTypeStruct;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
2
|
+
import type { tokenType, tokenTypeStruct } from "./helpers/tokenType";
|
3
|
+
export declare function getTokenTypeRound3(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[]): tokenTypeStruct;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import type { Campaign, CampaignParameters } from "@sdk";
|
2
|
+
import type { Multicall3 } from "libs/sdk/src/generated/Multicall";
|
3
|
+
import type { tokenType, tokenTypeStruct } from "./helpers/tokenType";
|
4
|
+
export declare function getTokenTypeRound4(index: number, type: tokenType, typeInfo: any, calls: Multicall3.ResultStructOutput[], campaign: CampaignParameters<Campaign.ERC20>): tokenTypeStruct;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { Campaign, type CampaignDynamicData, type CampaignParameters, type MerklChainId } from "@sdk";
|
2
|
+
import type { UncachedResult } from "../../utils/execute";
|
3
|
+
export declare function campaignsDynamicDataRefacto<T extends Campaign>(chainId: MerklChainId, campaigns: CampaignParameters<T>[], type: T, nextVersion?: boolean): Promise<UncachedResult<Partial<CampaignDynamicData<T>[]>>>;
|
@@ -122,18 +122,6 @@ export declare abstract class OpportunityRepository {
|
|
122
122
|
verified: boolean;
|
123
123
|
price: number | null;
|
124
124
|
};
|
125
|
-
RewardBreakdown: {
|
126
|
-
id: number;
|
127
|
-
protocolId: string | null;
|
128
|
-
reason: string;
|
129
|
-
amount: string;
|
130
|
-
claimed: string;
|
131
|
-
pending: string;
|
132
|
-
auxiliaryData1: string | null;
|
133
|
-
auxiliaryData2: string | null;
|
134
|
-
rewardId: string;
|
135
|
-
campaignId: string;
|
136
|
-
}[];
|
137
125
|
} & {
|
138
126
|
id: string;
|
139
127
|
computeChainId: number;
|
@@ -145,6 +145,7 @@ export declare abstract class RewardRepository {
|
|
145
145
|
rewardId: string;
|
146
146
|
campaignId: string;
|
147
147
|
}[]>;
|
148
|
+
static findManyRootsWithRewardOnChain(chainId: number): Promise<string[]>;
|
148
149
|
static breakdownForCampaigns(root: string, campaignIds: string[], query: CampaignIdListModel): Promise<{
|
149
150
|
Campaign: {
|
150
151
|
identifier: string;
|
@@ -74,7 +74,7 @@ export declare abstract class RewardService {
|
|
74
74
|
* @param reward straight from db
|
75
75
|
* @returns a Reward model
|
76
76
|
*/
|
77
|
-
static format(
|
77
|
+
static format(rewards: Awaited<ReturnType<typeof RewardRepository.getByRecipient>>): {
|
78
78
|
token: {
|
79
79
|
id: string;
|
80
80
|
name: string | null;
|
@@ -148,10 +148,10 @@ export declare abstract class RewardService {
|
|
148
148
|
root: string;
|
149
149
|
recipient: string;
|
150
150
|
proofs: string[];
|
151
|
-
};
|
151
|
+
}[];
|
152
152
|
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
|
153
|
-
static getByRecipient(recipient: string, roots: string[], withToken?: boolean): Promise<{
|
154
|
-
|
153
|
+
static getByRecipient(recipient: string, roots: string[], withToken?: boolean): Promise<({
|
154
|
+
RewardToken: {
|
155
155
|
id: string;
|
156
156
|
name: string | null;
|
157
157
|
chainId: number;
|
@@ -162,69 +162,77 @@ export declare abstract class RewardService {
|
|
162
162
|
verified: boolean;
|
163
163
|
price: number | null;
|
164
164
|
};
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
165
|
+
Breakdown: ({
|
166
|
+
Campaign: {
|
167
|
+
identifier: string;
|
168
|
+
campaignId: string;
|
169
|
+
Opportunity: {
|
170
|
+
Chain: {
|
171
|
+
id: number;
|
172
|
+
name: string;
|
173
|
+
icon: string;
|
174
|
+
};
|
175
|
+
Tokens: {
|
176
|
+
id: string;
|
177
|
+
name: string | null;
|
178
|
+
chainId: number;
|
179
|
+
address: string;
|
180
|
+
decimals: number;
|
181
|
+
symbol: string;
|
182
|
+
icon: string;
|
183
|
+
verified: boolean;
|
184
|
+
price: number | null;
|
185
|
+
}[];
|
186
|
+
Protocols: {
|
187
|
+
id: string;
|
188
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
189
|
+
name: string;
|
190
|
+
description: string;
|
191
|
+
url: string;
|
192
|
+
icon: string;
|
193
|
+
}[];
|
194
|
+
MainProtocol: {
|
195
|
+
id: string;
|
196
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
197
|
+
name: string;
|
198
|
+
description: string;
|
199
|
+
url: string;
|
200
|
+
icon: string;
|
201
|
+
} | null;
|
202
|
+
} & {
|
174
203
|
id: string;
|
175
|
-
name: string | null;
|
176
204
|
chainId: number;
|
177
|
-
|
178
|
-
|
179
|
-
symbol: string;
|
180
|
-
icon: string;
|
181
|
-
verified: boolean;
|
182
|
-
price: number | null;
|
183
|
-
}[];
|
184
|
-
Protocols: {
|
185
|
-
id: string;
|
186
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
187
|
-
name: string;
|
188
|
-
description: string;
|
189
|
-
url: string;
|
190
|
-
icon: string;
|
191
|
-
}[];
|
192
|
-
MainProtocol: {
|
193
|
-
id: string;
|
194
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
205
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
206
|
+
identifier: string;
|
195
207
|
name: string;
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
identifier: string;
|
205
|
-
name: string;
|
206
|
-
status: import("../../../../database/api/.generated").$Enums.Status;
|
207
|
-
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
208
|
-
mainProtocolId: string | null;
|
209
|
-
tvl: number;
|
210
|
-
apr: number;
|
211
|
-
dailyRewards: number;
|
212
|
-
tags: string[];
|
208
|
+
status: import("../../../../database/api/.generated").$Enums.Status;
|
209
|
+
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
210
|
+
mainProtocolId: string | null;
|
211
|
+
tvl: number;
|
212
|
+
apr: number;
|
213
|
+
dailyRewards: number;
|
214
|
+
tags: string[];
|
215
|
+
};
|
213
216
|
};
|
217
|
+
} & {
|
218
|
+
id: number;
|
219
|
+
protocolId: string | null;
|
214
220
|
reason: string;
|
215
221
|
amount: string;
|
216
222
|
claimed: string;
|
217
223
|
pending: string;
|
218
224
|
auxiliaryData1: string | null;
|
219
225
|
auxiliaryData2: string | null;
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
226
|
+
rewardId: string;
|
227
|
+
campaignId: string;
|
228
|
+
})[];
|
229
|
+
} & {
|
230
|
+
id: string;
|
224
231
|
root: string;
|
225
232
|
recipient: string;
|
233
|
+
rewardTokenId: string;
|
226
234
|
proofs: string[];
|
227
|
-
}[]>;
|
235
|
+
})[]>;
|
228
236
|
/**
|
229
237
|
* Groups a breakdown array by their corresponding opportunities
|
230
238
|
* @param breakdowns with campaignIds
|
@@ -247,7 +255,7 @@ export declare abstract class RewardService {
|
|
247
255
|
*/
|
248
256
|
static splitRewardsBreakdownByOpportunity(rewards: Awaited<ReturnType<typeof RewardService.getUserRewardsByChain>>): (Omit<{
|
249
257
|
chain: Chain;
|
250
|
-
rewards: Awaited<ReturnType<(typeof RewardService)["
|
258
|
+
rewards: Awaited<ReturnType<(typeof RewardService)["format"]>>;
|
251
259
|
}, "rewards"> & {
|
252
260
|
rewards: (Omit<{
|
253
261
|
token: {
|
@@ -337,7 +345,7 @@ export declare abstract class RewardService {
|
|
337
345
|
})[];
|
338
346
|
static removeOpportunityFromRewardBreakdown(rewards: Awaited<ReturnType<typeof RewardService.getUserRewardsByChain>>): (Omit<{
|
339
347
|
chain: Chain;
|
340
|
-
rewards: Awaited<ReturnType<(typeof RewardService)["
|
348
|
+
rewards: Awaited<ReturnType<(typeof RewardService)["format"]>>;
|
341
349
|
}, "rewards"> & {
|
342
350
|
rewards: (Omit<{
|
343
351
|
token: {
|
@@ -425,8 +433,9 @@ export declare abstract class RewardService {
|
|
425
433
|
}[];
|
426
434
|
})[];
|
427
435
|
})[];
|
428
|
-
static
|
429
|
-
|
436
|
+
static findManyRootsOnChain(chainId: ChainId): Promise<any>;
|
437
|
+
static checkLastClaim(chainId: number, user: string, roots: CacheKeys["CurrentRoot"]["returns"], rewards: Awaited<ReturnType<typeof RewardService.getByRecipient>>): Promise<({
|
438
|
+
RewardToken: {
|
430
439
|
id: string;
|
431
440
|
name: string | null;
|
432
441
|
chainId: number;
|
@@ -437,72 +446,80 @@ export declare abstract class RewardService {
|
|
437
446
|
verified: boolean;
|
438
447
|
price: number | null;
|
439
448
|
};
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
+
Breakdown: ({
|
450
|
+
Campaign: {
|
451
|
+
identifier: string;
|
452
|
+
campaignId: string;
|
453
|
+
Opportunity: {
|
454
|
+
Chain: {
|
455
|
+
id: number;
|
456
|
+
name: string;
|
457
|
+
icon: string;
|
458
|
+
};
|
459
|
+
Tokens: {
|
460
|
+
id: string;
|
461
|
+
name: string | null;
|
462
|
+
chainId: number;
|
463
|
+
address: string;
|
464
|
+
decimals: number;
|
465
|
+
symbol: string;
|
466
|
+
icon: string;
|
467
|
+
verified: boolean;
|
468
|
+
price: number | null;
|
469
|
+
}[];
|
470
|
+
Protocols: {
|
471
|
+
id: string;
|
472
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
473
|
+
name: string;
|
474
|
+
description: string;
|
475
|
+
url: string;
|
476
|
+
icon: string;
|
477
|
+
}[];
|
478
|
+
MainProtocol: {
|
479
|
+
id: string;
|
480
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
481
|
+
name: string;
|
482
|
+
description: string;
|
483
|
+
url: string;
|
484
|
+
icon: string;
|
485
|
+
} | null;
|
486
|
+
} & {
|
449
487
|
id: string;
|
450
|
-
name: string | null;
|
451
488
|
chainId: number;
|
452
|
-
|
453
|
-
|
454
|
-
symbol: string;
|
455
|
-
icon: string;
|
456
|
-
verified: boolean;
|
457
|
-
price: number | null;
|
458
|
-
}[];
|
459
|
-
Protocols: {
|
460
|
-
id: string;
|
461
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
462
|
-
name: string;
|
463
|
-
description: string;
|
464
|
-
url: string;
|
465
|
-
icon: string;
|
466
|
-
}[];
|
467
|
-
MainProtocol: {
|
468
|
-
id: string;
|
469
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
489
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
490
|
+
identifier: string;
|
470
491
|
name: string;
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
identifier: string;
|
480
|
-
name: string;
|
481
|
-
status: import("../../../../database/api/.generated").$Enums.Status;
|
482
|
-
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
483
|
-
mainProtocolId: string | null;
|
484
|
-
tvl: number;
|
485
|
-
apr: number;
|
486
|
-
dailyRewards: number;
|
487
|
-
tags: string[];
|
492
|
+
status: import("../../../../database/api/.generated").$Enums.Status;
|
493
|
+
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
494
|
+
mainProtocolId: string | null;
|
495
|
+
tvl: number;
|
496
|
+
apr: number;
|
497
|
+
dailyRewards: number;
|
498
|
+
tags: string[];
|
499
|
+
};
|
488
500
|
};
|
501
|
+
} & {
|
502
|
+
id: number;
|
503
|
+
protocolId: string | null;
|
489
504
|
reason: string;
|
490
505
|
amount: string;
|
491
506
|
claimed: string;
|
492
507
|
pending: string;
|
493
508
|
auxiliaryData1: string | null;
|
494
509
|
auxiliaryData2: string | null;
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
510
|
+
rewardId: string;
|
511
|
+
campaignId: string;
|
512
|
+
})[];
|
513
|
+
} & {
|
514
|
+
id: string;
|
499
515
|
root: string;
|
500
516
|
recipient: string;
|
517
|
+
rewardTokenId: string;
|
501
518
|
proofs: string[];
|
502
|
-
}[]>;
|
519
|
+
})[]>;
|
503
520
|
static getUserRewardsByChain(user: string, withToken: boolean, chainFilter?: ChainId[]): Promise<{
|
504
521
|
chain: Chain;
|
505
|
-
rewards: Awaited<ReturnType<(typeof RewardService)["
|
522
|
+
rewards: Awaited<ReturnType<(typeof RewardService)["format"]>>;
|
506
523
|
}[]>;
|
507
524
|
static updatePendings(data: UpdatePendingModel): Promise<boolean>;
|
508
525
|
static count(): Promise<Record<string, {
|