@merkl/api 0.10.362 → 0.10.378
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/README.md +78 -14
- package/dist/database/api/.generated/edge.js +21 -6
- package/dist/database/api/.generated/index-browser.js +18 -3
- package/dist/database/api/.generated/index.d.ts +1746 -256
- package/dist/database/api/.generated/index.js +21 -6
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +12 -2
- package/dist/database/api/.generated/wasm.js +18 -3
- package/dist/src/eden/index.d.ts +1041 -140
- package/dist/src/entities/campaign.js +2 -1
- package/dist/src/entities/opportunity.js +169 -3
- package/dist/src/index.d.ts +340 -9
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +45 -54
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +3 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.d.ts +34 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.js +36 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +4 -1
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.js +76 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +8 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +63 -1
- package/dist/src/modules/v4/campaign/campaign.repository.js +15 -10
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +7 -4
- package/dist/src/modules/v4/computedValue/computedValue.controller.js +7 -5
- package/dist/src/modules/v4/computedValue/computedValue.model.js +12 -4
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +8 -5
- package/dist/src/modules/v4/computedValue/computedValue.repository.js +7 -3
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +7 -4
- package/dist/src/modules/v4/computedValue/computedValue.service.js +10 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +118 -0
- package/dist/src/modules/v4/creator/creator.controller.js +30 -0
- package/dist/src/modules/v4/creator/creator.model.d.ts +29 -0
- package/dist/src/modules/v4/creator/creator.model.js +18 -0
- package/dist/src/modules/v4/creator/creator.repository.d.ts +40 -0
- package/dist/src/modules/v4/creator/creator.repository.js +63 -0
- package/dist/src/modules/v4/creator/creator.service.d.ts +61 -0
- package/dist/src/modules/v4/creator/creator.service.js +44 -0
- package/dist/src/modules/v4/creator/index.d.ts +3 -0
- package/dist/src/modules/v4/creator/index.js +3 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +3 -4
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +6 -3
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +50 -9
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +171 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +14 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -1
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +185 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +41 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +151 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.js +45 -2
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.js +2 -2
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +30 -0
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +12 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +21 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.js +12 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +13 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +230 -83
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +2 -1
- package/dist/src/modules/v4/programPayload/programPayload.service.js +42 -2
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -1
- package/dist/src/modules/v4/reward/reward.repository.js +12 -1
- package/dist/src/modules/v4/reward/reward.service.js +5 -2
- package/dist/src/modules/v4/router.d.ts +340 -9
- package/dist/src/modules/v4/router.js +3 -1
- package/dist/src/modules/v4/user/user.controller.d.ts +28 -0
- package/dist/src/modules/v4/user/user.controller.js +5 -0
- package/dist/src/modules/v4/user/user.repository.d.ts +5 -0
- package/dist/src/modules/v4/user/user.service.d.ts +5 -0
- package/dist/src/utils/decodeCalls.js +7 -1
- package/dist/src/utils/encodeCalls.js +19 -1
- package/dist/src/utils/generateCardName.js +3 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +6 -2
@@ -3,23 +3,28 @@ export declare abstract class UserService {
|
|
3
3
|
static findUnique(address: string): Promise<{
|
4
4
|
tags: string[];
|
5
5
|
address: string;
|
6
|
+
creatorId: string | null;
|
6
7
|
} | null>;
|
7
8
|
static findMany(query: GetManyUserModel): Promise<{
|
8
9
|
tags: string[];
|
9
10
|
address: string;
|
11
|
+
creatorId: string | null;
|
10
12
|
}[]>;
|
11
13
|
static findManyWithTags(): Promise<{
|
12
14
|
tags: string[];
|
13
15
|
address: string;
|
16
|
+
creatorId: string | null;
|
14
17
|
}[]>;
|
15
18
|
static create(user: UserModel): Promise<{
|
16
19
|
tags: string[];
|
17
20
|
address: string;
|
21
|
+
creatorId: string | null;
|
18
22
|
}>;
|
19
23
|
static createMany(users: UserModel[]): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
|
20
24
|
static updateTags(user: string, tags: string[]): Promise<{
|
21
25
|
tags: string[];
|
22
26
|
address: string;
|
27
|
+
creatorId: string | null;
|
23
28
|
}>;
|
24
29
|
static syncTags(): Promise<void>;
|
25
30
|
static syncOpportunityTags(): Promise<void>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, ZFStableSwapThreePoolInterface, } from "@sdk";
|
2
|
-
import { LayerBankERC20Interface, SyncSwapClassicPoolInterface } from "libs/sdk/src/merkl/interface";
|
2
|
+
import { ERC4626Interface, LayerBankERC20Interface, SyncSwapClassicPoolInterface } from "libs/sdk/src/merkl/interface";
|
3
3
|
import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
4
4
|
export function decodeCall(calls, index, key, type) {
|
5
5
|
const returnData = calls[index];
|
@@ -178,6 +178,10 @@ export function decodeReturnValue(returnData, key, type) {
|
|
178
178
|
return AuraOperatorInterface.decodeFunctionResult("staker", returnData)[0];
|
179
179
|
case "totalAssets":
|
180
180
|
switch (type) {
|
181
|
+
case tokenType.cian:
|
182
|
+
return ERC4626Interface.decodeFunctionResult("totalAssets", returnData)[0];
|
183
|
+
case tokenType.concrete:
|
184
|
+
return ERC4626Interface.decodeFunctionResult("totalAssets", returnData)[0];
|
181
185
|
case tokenType.gearbox:
|
182
186
|
return GearboxVaultInterface.decodeFunctionResult("totalAssets", returnData)[0];
|
183
187
|
case tokenType.euler_lend:
|
@@ -245,6 +249,8 @@ export function decodeReturnValue(returnData, key, type) {
|
|
245
249
|
return SyncSwapClassicPoolInterface.decodeFunctionResult("reserve0", returnData)[0];
|
246
250
|
case "reserve1":
|
247
251
|
return SyncSwapClassicPoolInterface.decodeFunctionResult("reserve1", returnData)[0];
|
252
|
+
case "asset":
|
253
|
+
return ERC4626Interface.decodeFunctionResult("asset", returnData)[0];
|
248
254
|
default:
|
249
255
|
throw new Error(`Key not recognized for ${key}`);
|
250
256
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { tokenType } from "../libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType";
|
2
2
|
import { AaveInterface, AccountantWithRateProvidersInterface, AuraInterface, AuraOperatorInterface, BalancerGaugeInterface, BalancerPoolInterface, BalancerVaultInterface, BeefyInterface, CPMMGammaPoolMainInterface, CompoundInterface, CurveInterface, CurveStableSwapNGInterface, DefutureVaultInterface, ERC20Interface, EnzymeInterface, EulerInterface, FactoryInterface, FluidInterface, FraxlendInterface, GearboxVaultInterface, IonicInterface, LayerBankInterface, MaverickBPLensInterface, MetamorphoInterface, MoonwellInterface, OneInchStakingInterface, PendleInterface, PendleYTInterface, RadiantInterface, RfxDatastoreInterface, RswEthStrategyInterface, SturdyInterface, SymetricAmbientStrategyInterface, TorosInterface, UniswapV2PoolInterface, VePufferInterface, ZFStableLPINterface, } from "@sdk";
|
3
|
-
import { SyncSwapClassicPoolInterface } from "libs/sdk/src/merkl/interface";
|
3
|
+
import { ERC4626Interface, SyncSwapClassicPoolInterface } from "libs/sdk/src/merkl/interface";
|
4
4
|
export function createCall(target, key, type, metaData) {
|
5
5
|
switch (key) {
|
6
6
|
case "SY":
|
@@ -74,6 +74,12 @@ export function createCall(target, key, type, metaData) {
|
|
74
74
|
target,
|
75
75
|
};
|
76
76
|
}
|
77
|
+
case "asset":
|
78
|
+
return {
|
79
|
+
allowFailure: true,
|
80
|
+
callData: ERC4626Interface.encodeFunctionData("asset"),
|
81
|
+
target,
|
82
|
+
};
|
77
83
|
case "underlying":
|
78
84
|
switch (type) {
|
79
85
|
case tokenType.pendle:
|
@@ -224,6 +230,18 @@ export function createCall(target, key, type, metaData) {
|
|
224
230
|
};
|
225
231
|
case "totalAssets":
|
226
232
|
switch (type) {
|
233
|
+
case tokenType.cian:
|
234
|
+
return {
|
235
|
+
allowFailure: true,
|
236
|
+
callData: ERC4626Interface.encodeFunctionData("totalAssets"),
|
237
|
+
target,
|
238
|
+
};
|
239
|
+
case tokenType.concrete:
|
240
|
+
return {
|
241
|
+
allowFailure: true,
|
242
|
+
callData: ERC4626Interface.encodeFunctionData("totalAssets"),
|
243
|
+
target,
|
244
|
+
};
|
227
245
|
case tokenType.euler_borrow:
|
228
246
|
return {
|
229
247
|
allowFailure: true,
|
@@ -125,6 +125,9 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
|
|
125
125
|
return `Restake ${typeInfo.symbolUnderlyingToken} on ${typeInfo.protocol}`;
|
126
126
|
case tokenType.veda:
|
127
127
|
return `Deposit into ${typeInfo.name.replace("Ether.Fi", "Veda")}`;
|
128
|
+
case tokenType.concrete:
|
129
|
+
case tokenType.cian:
|
130
|
+
return `Deposit ${typeInfo.symbolAsset} into ${typeInfo.name.replace("Ether.Fi", "Veda")}`;
|
128
131
|
default:
|
129
132
|
return `Hold ${typeInfo.name} (${campaign.campaignParameters.symbolTargetToken})`;
|
130
133
|
}
|