@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.
Files changed (84) hide show
  1. package/README.md +78 -14
  2. package/dist/database/api/.generated/edge.js +21 -6
  3. package/dist/database/api/.generated/index-browser.js +18 -3
  4. package/dist/database/api/.generated/index.d.ts +1746 -256
  5. package/dist/database/api/.generated/index.js +21 -6
  6. package/dist/database/api/.generated/package.json +1 -1
  7. package/dist/database/api/.generated/schema.prisma +12 -2
  8. package/dist/database/api/.generated/wasm.js +18 -3
  9. package/dist/src/eden/index.d.ts +1041 -140
  10. package/dist/src/entities/campaign.js +2 -1
  11. package/dist/src/entities/opportunity.js +169 -3
  12. package/dist/src/index.d.ts +340 -9
  13. package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +45 -54
  14. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +3 -1
  15. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
  16. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.d.ts +34 -0
  17. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.js +36 -0
  18. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +3 -0
  19. package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +4 -1
  20. package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.d.ts +5 -0
  21. package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.js +76 -0
  22. package/dist/src/libs/campaigns/campaignsDynamicData.js +8 -0
  23. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -0
  24. package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
  25. package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
  26. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +63 -1
  27. package/dist/src/modules/v4/campaign/campaign.repository.js +15 -10
  28. package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +7 -4
  29. package/dist/src/modules/v4/computedValue/computedValue.controller.js +7 -5
  30. package/dist/src/modules/v4/computedValue/computedValue.model.js +12 -4
  31. package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +8 -5
  32. package/dist/src/modules/v4/computedValue/computedValue.repository.js +7 -3
  33. package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +7 -4
  34. package/dist/src/modules/v4/computedValue/computedValue.service.js +10 -0
  35. package/dist/src/modules/v4/creator/creator.controller.d.ts +118 -0
  36. package/dist/src/modules/v4/creator/creator.controller.js +30 -0
  37. package/dist/src/modules/v4/creator/creator.model.d.ts +29 -0
  38. package/dist/src/modules/v4/creator/creator.model.js +18 -0
  39. package/dist/src/modules/v4/creator/creator.repository.d.ts +40 -0
  40. package/dist/src/modules/v4/creator/creator.repository.js +63 -0
  41. package/dist/src/modules/v4/creator/creator.service.d.ts +61 -0
  42. package/dist/src/modules/v4/creator/creator.service.js +44 -0
  43. package/dist/src/modules/v4/creator/index.d.ts +3 -0
  44. package/dist/src/modules/v4/creator/index.js +3 -0
  45. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +3 -4
  46. package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +1 -1
  47. package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -0
  48. package/dist/src/modules/v4/dynamicData/dynamicData.model.js +1 -0
  49. package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +6 -3
  50. package/dist/src/modules/v4/dynamicData/dynamicData.service.js +50 -9
  51. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +171 -1
  52. package/dist/src/modules/v4/opportunity/opportunity.controller.js +14 -0
  53. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -1
  54. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +185 -0
  55. package/dist/src/modules/v4/opportunity/opportunity.repository.js +41 -0
  56. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +151 -1
  57. package/dist/src/modules/v4/opportunity/opportunity.service.js +45 -2
  58. package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.d.ts +1 -1
  59. package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.js +2 -2
  60. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +30 -0
  61. package/dist/src/modules/v4/programPayload/programPayload.controller.js +12 -1
  62. package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +21 -1
  63. package/dist/src/modules/v4/programPayload/programPayload.model.js +12 -0
  64. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +13 -2
  65. package/dist/src/modules/v4/programPayload/programPayload.repository.js +230 -83
  66. package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +2 -1
  67. package/dist/src/modules/v4/programPayload/programPayload.service.js +42 -2
  68. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +1 -0
  69. package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -0
  70. package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
  71. package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -1
  72. package/dist/src/modules/v4/reward/reward.repository.js +12 -1
  73. package/dist/src/modules/v4/reward/reward.service.js +5 -2
  74. package/dist/src/modules/v4/router.d.ts +340 -9
  75. package/dist/src/modules/v4/router.js +3 -1
  76. package/dist/src/modules/v4/user/user.controller.d.ts +28 -0
  77. package/dist/src/modules/v4/user/user.controller.js +5 -0
  78. package/dist/src/modules/v4/user/user.repository.d.ts +5 -0
  79. package/dist/src/modules/v4/user/user.service.d.ts +5 -0
  80. package/dist/src/utils/decodeCalls.js +7 -1
  81. package/dist/src/utils/encodeCalls.js +19 -1
  82. package/dist/src/utils/generateCardName.js +3 -0
  83. package/dist/tsconfig.package.tsbuildinfo +1 -1
  84. 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
  }