@merkl/api 0.10.331 → 0.10.333

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.
@@ -2458,13 +2458,16 @@ declare const eden: {
2458
2458
  "from-config": {
2459
2459
  post: (body: {
2460
2460
  url?: string | undefined;
2461
+ hooks?: {}[] | undefined;
2461
2462
  endTimestamp?: number | undefined;
2463
+ blacklist?: string[] | undefined;
2462
2464
  poolAddress?: string | undefined;
2463
2465
  marketId?: string | undefined;
2464
2466
  strategy?: string | undefined;
2465
2467
  poolId?: string | undefined;
2466
2468
  contract?: string | undefined;
2467
2469
  forwarders?: (string | {})[] | undefined;
2470
+ whitelist?: string[] | undefined;
2468
2471
  targetToken?: string | undefined;
2469
2472
  isOutOfRangeIncentivized?: boolean | undefined;
2470
2473
  weightFees?: number | undefined;
@@ -2480,16 +2483,13 @@ declare const eden: {
2480
2483
  compFork?: number | undefined;
2481
2484
  evkAddress?: string | undefined;
2482
2485
  collateralAddress?: string | undefined;
2483
- hooks: {}[];
2484
2486
  creator: string;
2485
2487
  startTimestamp: number;
2486
2488
  computeChainId: number;
2487
2489
  distributionChainId: number;
2488
2490
  amount: string;
2489
- blacklist: string[];
2490
2491
  rewardToken: string;
2491
2492
  campaignType: number;
2492
- whitelist: string[];
2493
2493
  }, options?: {
2494
2494
  headers?: Record<string, unknown> | undefined;
2495
2495
  query?: Record<string, unknown> | undefined;
@@ -6163,13 +6163,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6163
6163
  post: {
6164
6164
  body: {
6165
6165
  url?: string | undefined;
6166
+ hooks?: {}[] | undefined;
6166
6167
  endTimestamp?: number | undefined;
6168
+ blacklist?: string[] | undefined;
6167
6169
  poolAddress?: string | undefined;
6168
6170
  marketId?: string | undefined;
6169
6171
  strategy?: string | undefined;
6170
6172
  poolId?: string | undefined;
6171
6173
  contract?: string | undefined;
6172
6174
  forwarders?: (string | {})[] | undefined;
6175
+ whitelist?: string[] | undefined;
6173
6176
  targetToken?: string | undefined;
6174
6177
  isOutOfRangeIncentivized?: boolean | undefined;
6175
6178
  weightFees?: number | undefined;
@@ -6185,16 +6188,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
6185
6188
  compFork?: number | undefined;
6186
6189
  evkAddress?: string | undefined;
6187
6190
  collateralAddress?: string | undefined;
6188
- hooks: {}[];
6189
6191
  creator: string;
6190
6192
  startTimestamp: number;
6191
6193
  computeChainId: number;
6192
6194
  distributionChainId: number;
6193
6195
  amount: string;
6194
- blacklist: string[];
6195
6196
  rewardToken: string;
6196
6197
  campaignType: number;
6197
- whitelist: string[];
6198
6198
  };
6199
6199
  params: {};
6200
6200
  query: unknown;
@@ -9452,13 +9452,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
9452
9452
  "from-config": {
9453
9453
  post: (body: {
9454
9454
  url?: string | undefined;
9455
+ hooks?: {}[] | undefined;
9455
9456
  endTimestamp?: number | undefined;
9457
+ blacklist?: string[] | undefined;
9456
9458
  poolAddress?: string | undefined;
9457
9459
  marketId?: string | undefined;
9458
9460
  strategy?: string | undefined;
9459
9461
  poolId?: string | undefined;
9460
9462
  contract?: string | undefined;
9461
9463
  forwarders?: (string | {})[] | undefined;
9464
+ whitelist?: string[] | undefined;
9462
9465
  targetToken?: string | undefined;
9463
9466
  isOutOfRangeIncentivized?: boolean | undefined;
9464
9467
  weightFees?: number | undefined;
@@ -9474,16 +9477,13 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
9474
9477
  compFork?: number | undefined;
9475
9478
  evkAddress?: string | undefined;
9476
9479
  collateralAddress?: string | undefined;
9477
- hooks: {}[];
9478
9480
  creator: string;
9479
9481
  startTimestamp: number;
9480
9482
  computeChainId: number;
9481
9483
  distributionChainId: number;
9482
9484
  amount: string;
9483
- blacklist: string[];
9484
9485
  rewardToken: string;
9485
9486
  campaignType: number;
9486
- whitelist: string[];
9487
9487
  }, options?: {
9488
9488
  headers?: Record<string, unknown> | undefined;
9489
9489
  query?: Record<string, unknown> | undefined;
@@ -3056,13 +3056,16 @@ declare const app: Elysia<"", false, {
3056
3056
  post: {
3057
3057
  body: {
3058
3058
  url?: string | undefined;
3059
+ hooks?: {}[] | undefined;
3059
3060
  endTimestamp?: number | undefined;
3061
+ blacklist?: string[] | undefined;
3060
3062
  poolAddress?: string | undefined;
3061
3063
  marketId?: string | undefined;
3062
3064
  strategy?: string | undefined;
3063
3065
  poolId?: string | undefined;
3064
3066
  contract?: string | undefined;
3065
3067
  forwarders?: (string | {})[] | undefined;
3068
+ whitelist?: string[] | undefined;
3066
3069
  targetToken?: string | undefined;
3067
3070
  isOutOfRangeIncentivized?: boolean | undefined;
3068
3071
  weightFees?: number | undefined;
@@ -3078,16 +3081,13 @@ declare const app: Elysia<"", false, {
3078
3081
  compFork?: number | undefined;
3079
3082
  evkAddress?: string | undefined;
3080
3083
  collateralAddress?: string | undefined;
3081
- hooks: {}[];
3082
3084
  creator: string;
3083
3085
  startTimestamp: number;
3084
3086
  computeChainId: number;
3085
3087
  distributionChainId: number;
3086
3088
  amount: string;
3087
- blacklist: string[];
3088
3089
  rewardToken: string;
3089
3090
  campaignType: number;
3090
- whitelist: string[];
3091
3091
  };
3092
3092
  params: {};
3093
3093
  query: unknown;
@@ -19,6 +19,7 @@ const factoryAddresses = {
19
19
  "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73": tokenType.pancakeswap, // PancakeSwap Factory BNB
20
20
  "0x70ee0A6DB4F5a2Dc4d9c0b57bE97B9987e75BAFD": tokenType.pendleYT, // Pendle YT Factory
21
21
  "0xFD513630F697A9C1731F196185fb9ebA6eAAc20B": tokenType.cpmmGamma, // CPMMGAMMA Factory
22
+ "0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10": tokenType.traderJoe, // Trader Joe Factory
22
23
  };
23
24
  export function getTypeFromFactoryAddress(address) {
24
25
  if (factoryAddresses[address]) {
@@ -64,7 +64,8 @@ export declare enum tokenType {
64
64
  crosscurve = "crosscurve",
65
65
  venus = "venus",
66
66
  reactor_fusion = "reactor_fusion",
67
- vicuna = "vicuna"
67
+ vicuna = "vicuna",
68
+ traderJoe = "traderJoe"
68
69
  }
69
70
  export declare const tokenTypeToProtocol: {
70
71
  [key in tokenType]: {
@@ -66,6 +66,7 @@ export var tokenType;
66
66
  tokenType["venus"] = "venus";
67
67
  tokenType["reactor_fusion"] = "reactor_fusion";
68
68
  tokenType["vicuna"] = "vicuna";
69
+ tokenType["traderJoe"] = "traderJoe";
69
70
  })(tokenType || (tokenType = {}));
70
71
  export const tokenTypeToProtocol = {
71
72
  [tokenType.aave_borrowing]: { protocol: "Aave" },
@@ -161,4 +162,5 @@ export const tokenTypeToProtocol = {
161
162
  protocol: "CrossCurve",
162
163
  },
163
164
  [tokenType.vicuna]: { protocol: "Vicuna" },
165
+ [tokenType.traderJoe]: { protocol: "Trader Joe" },
164
166
  };
@@ -100,4 +100,5 @@ export const processorMapping = {
100
100
  [tokenType.venus]: AssetProcessor,
101
101
  [tokenType.reactor_fusion]: AssetProcessor,
102
102
  [tokenType.vicuna]: VicunaProcessor,
103
+ [tokenType.traderJoe]: UniswapProcessor,
103
104
  };
@@ -185,13 +185,16 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
185
185
  post: {
186
186
  body: {
187
187
  url?: string | undefined;
188
+ hooks?: {}[] | undefined;
188
189
  endTimestamp?: number | undefined;
190
+ blacklist?: string[] | undefined;
189
191
  poolAddress?: string | undefined;
190
192
  marketId?: string | undefined;
191
193
  strategy?: string | undefined;
192
194
  poolId?: string | undefined;
193
195
  contract?: string | undefined;
194
196
  forwarders?: (string | {})[] | undefined;
197
+ whitelist?: string[] | undefined;
195
198
  targetToken?: string | undefined;
196
199
  isOutOfRangeIncentivized?: boolean | undefined;
197
200
  weightFees?: number | undefined;
@@ -207,16 +210,13 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
207
210
  compFork?: number | undefined;
208
211
  evkAddress?: string | undefined;
209
212
  collateralAddress?: string | undefined;
210
- hooks: {}[];
211
213
  creator: string;
212
214
  startTimestamp: number;
213
215
  computeChainId: number;
214
216
  distributionChainId: number;
215
217
  amount: string;
216
- blacklist: string[];
217
218
  rewardToken: string;
218
219
  campaignType: number;
219
- whitelist: string[];
220
220
  };
221
221
  params: {};
222
222
  query: unknown;
@@ -16,9 +16,9 @@ export declare const SinglePayloadInputDto: import("@sinclair/typebox").TObject<
16
16
  startTimestamp: import("@sinclair/typebox").TNumber;
17
17
  computeChainId: import("@sinclair/typebox").TNumber;
18
18
  creator: import("@sinclair/typebox").TString;
19
- hooks: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>;
20
- whitelist: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
21
- blacklist: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
19
+ hooks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{}>>>;
20
+ whitelist: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
21
+ blacklist: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
22
22
  campaignType: import("@sinclair/typebox").TNumber;
23
23
  endTimestamp: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
24
24
  targetToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -17,9 +17,9 @@ export const SinglePayloadInputDto = t.Object({
17
17
  startTimestamp: t.Numeric({ description: "Start timestamp for the campaign" }),
18
18
  computeChainId: t.Numeric({ description: "Chain ID used for computation" }),
19
19
  creator: t.String({ description: "Address of the campaign creator" }),
20
- hooks: t.Array(t.Object({})),
21
- whitelist: t.Array(t.String({ description: "List of addresses allowed to participate" })),
22
- blacklist: t.Array(t.String({ description: "List of addresses not allowed to participate" })),
20
+ hooks: t.Optional(t.Array(t.Object({}))),
21
+ whitelist: t.Optional(t.Array(t.String({ description: "List of addresses allowed to participate" }))),
22
+ blacklist: t.Optional(t.Array(t.String({ description: "List of addresses not allowed to participate" }))),
23
23
  campaignType: t.Numeric({ description: "Type of the campaign 1 : ERC20, 2: CLAMM , ..." }),
24
24
  endTimestamp: t.Optional(t.Numeric({ description: "End timestamp for the campaign" })),
25
25
  targetToken: t.Optional(t.String({ description: "Address of the target token that is incentivized" })),
@@ -31,7 +31,9 @@ export declare enum pufferCampaigns {
31
31
  uniswapv3_eth_pufETH = "0xBDB04e915B94FbFD6e8552ff7860E59Db7d4499a",
32
32
  uniswapv3_weth_PUFFER = "0xc5c9a9AB6403CDBa9722463000146C18b504F0bA",
33
33
  uniswapv3_vt_weth = "0xa56600e670724b42F38d3A6e4B25e8D786B4F5f9",
34
- venus_pufeth = "0xE0ee5dDeBFe0abe0a4Af50299D68b74Cec31668e"
34
+ venus_pufeth = "0xE0ee5dDeBFe0abe0a4Af50299D68b74Cec31668e",
35
+ unifiBTC = "0x170D847A8320F3B6A77eE15B0CAE430e3eC933a0",
36
+ unifiUSD = "0x82c40e07277eBb92935f79cE92268F80dDc7caB4"
35
37
  }
36
38
  export declare enum zkSyncCampaigns {
37
39
  Izumi_Finance_Zk_Weth = "Izumi Finance ZK/WETH 0xd62bc9f19bd94fde9c41df4b6eb6419ea6b8e25c",
@@ -34,6 +34,8 @@ export var pufferCampaigns;
34
34
  pufferCampaigns["uniswapv3_weth_PUFFER"] = "0xc5c9a9AB6403CDBa9722463000146C18b504F0bA";
35
35
  pufferCampaigns["uniswapv3_vt_weth"] = "0xa56600e670724b42F38d3A6e4B25e8D786B4F5f9";
36
36
  pufferCampaigns["venus_pufeth"] = "0xE0ee5dDeBFe0abe0a4Af50299D68b74Cec31668e";
37
+ pufferCampaigns["unifiBTC"] = "0x170D847A8320F3B6A77eE15B0CAE430e3eC933a0";
38
+ pufferCampaigns["unifiUSD"] = "0x82c40e07277eBb92935f79cE92268F80dDc7caB4";
37
39
  })(pufferCampaigns || (pufferCampaigns = {}));
38
40
  export var zkSyncCampaigns;
39
41
  (function (zkSyncCampaigns) {
@@ -1126,6 +1128,26 @@ const ZkSyncInterfaceCampaigns = {
1126
1128
  },
1127
1129
  };
1128
1130
  const PufferInterfaceCampaigns = {
1131
+ [pufferCampaigns.unifiBTC]: {
1132
+ campaignType: Campaign.ERC20,
1133
+ computeChainId: ChainId.MAINNET,
1134
+ hooks: [],
1135
+ targetToken: "0x170D847A8320F3B6A77eE15B0CAE430e3eC933a0",
1136
+ whitelist: [],
1137
+ blacklist: [],
1138
+ url: "https://quest.puffer.fi/unifi",
1139
+ forwarders: [],
1140
+ },
1141
+ [pufferCampaigns.unifiUSD]: {
1142
+ campaignType: Campaign.ERC20,
1143
+ computeChainId: ChainId.MAINNET,
1144
+ hooks: [],
1145
+ targetToken: "0x82c40e07277eBb92935f79cE92268F80dDc7caB4",
1146
+ whitelist: [],
1147
+ blacklist: [],
1148
+ url: "https://quest.puffer.fi/unifi",
1149
+ forwarders: [],
1150
+ },
1129
1151
  [pufferCampaigns.venus_pufeth]: {
1130
1152
  campaignType: Campaign.ERC20,
1131
1153
  computeChainId: ChainId.MAINNET,
@@ -2934,13 +2934,16 @@ export declare const v4: Elysia<"/v4", false, {
2934
2934
  post: {
2935
2935
  body: {
2936
2936
  url?: string | undefined;
2937
+ hooks?: {}[] | undefined;
2937
2938
  endTimestamp?: number | undefined;
2939
+ blacklist?: string[] | undefined;
2938
2940
  poolAddress?: string | undefined;
2939
2941
  marketId?: string | undefined;
2940
2942
  strategy?: string | undefined;
2941
2943
  poolId?: string | undefined;
2942
2944
  contract?: string | undefined;
2943
2945
  forwarders?: (string | {})[] | undefined;
2946
+ whitelist?: string[] | undefined;
2944
2947
  targetToken?: string | undefined;
2945
2948
  isOutOfRangeIncentivized?: boolean | undefined;
2946
2949
  weightFees?: number | undefined;
@@ -2956,16 +2959,13 @@ export declare const v4: Elysia<"/v4", false, {
2956
2959
  compFork?: number | undefined;
2957
2960
  evkAddress?: string | undefined;
2958
2961
  collateralAddress?: string | undefined;
2959
- hooks: {}[];
2960
2962
  creator: string;
2961
2963
  startTimestamp: number;
2962
2964
  computeChainId: number;
2963
2965
  distributionChainId: number;
2964
2966
  amount: string;
2965
- blacklist: string[];
2966
2967
  rewardToken: string;
2967
2968
  campaignType: number;
2968
- whitelist: string[];
2969
2969
  };
2970
2970
  params: {};
2971
2971
  query: unknown;
@@ -25,7 +25,7 @@ export const ErrorHandler = (app) => app
25
25
  if (code === "VALIDATION") {
26
26
  return {
27
27
  name: "ValidationError",
28
- message: "Request malformed",
28
+ message: JSON.parse(error.message).summary,
29
29
  info: JSON.parse(error.message),
30
30
  };
31
31
  }
@@ -14,6 +14,7 @@ export function generateCardName(type, typeInfo, campaign, symbols = [""]) {
14
14
  case tokenType.ra:
15
15
  case tokenType.syncswap:
16
16
  case tokenType.pancakeswap:
17
+ case tokenType.traderJoe:
17
18
  return `Provide liquidity to ${typeInfo.protocol} ${typeInfo.symbolToken0}-${typeInfo.symbolToken1}`;
18
19
  case tokenType.pendleYT:
19
20
  return `Hold ${typeInfo.protocol} ${typeInfo.name}`;