@merkl/api 1.0.22 → 1.0.23

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.
@@ -35,6 +35,7 @@ export declare abstract class CampaignRepository {
35
35
  campaignId: string | undefined;
36
36
  Opportunity: {
37
37
  identifier: string | undefined;
38
+ mainProtocolId: string | undefined;
38
39
  };
39
40
  subType: number | undefined;
40
41
  type: string | {
@@ -115,6 +116,7 @@ export declare abstract class CampaignRepository {
115
116
  campaignId: string | undefined;
116
117
  Opportunity: {
117
118
  identifier: string | undefined;
119
+ mainProtocolId: string | undefined;
118
120
  };
119
121
  subType: number | undefined;
120
122
  type: string | {
@@ -196,6 +198,7 @@ export declare abstract class CampaignRepository {
196
198
  campaignId: string | undefined;
197
199
  Opportunity: {
198
200
  identifier: string | undefined;
201
+ mainProtocolId: string | undefined;
199
202
  };
200
203
  subType: number | undefined;
201
204
  type: string | {
@@ -280,6 +283,7 @@ export declare abstract class CampaignRepository {
280
283
  campaignId: string | undefined;
281
284
  Opportunity: {
282
285
  identifier: string | undefined;
286
+ mainProtocolId: string | undefined;
283
287
  };
284
288
  subType: number | undefined;
285
289
  type: string | {
@@ -188,103 +188,6 @@ export declare abstract class CampaignService {
188
188
  computeChainId?: number;
189
189
  type?: string;
190
190
  }): Promise<number>;
191
- static upsert(id: string, dryRun?: boolean): Promise<{
192
- campaignId: string;
193
- description: string | null;
194
- id: string;
195
- params: import("@prisma/client/runtime/library").JsonValue;
196
- amount: string;
197
- startTimestamp: bigint;
198
- type: string;
199
- computeChainId: number;
200
- distributionChainId: number;
201
- endTimestamp: bigint;
202
- opportunityId: string;
203
- creatorAddress: string;
204
- distributionType: import("@package/databases").DistributionType;
205
- subType: number | null;
206
- rewardTokenId: string;
207
- manualOverrides: import("@package/databases").CampaignManualOverride[];
208
- createdAt: Date;
209
- rootCampaignId: string | null;
210
- parentCampaignId: string | null;
211
- } | {
212
- id: string;
213
- chainId: number;
214
- type: string;
215
- identifier: string;
216
- name: string;
217
- status: "PAST" | "LIVE" | "SOON";
218
- action: OpportunityAction;
219
- tokens: ({
220
- symbol: string;
221
- name: string | null;
222
- decimals: number;
223
- address: string;
224
- id: string;
225
- chainId: number;
226
- icon: string;
227
- isNative: boolean;
228
- isPoint: boolean;
229
- isPreTGE: boolean;
230
- isTest: boolean;
231
- verified: boolean;
232
- } & {
233
- price?: number | null | undefined;
234
- isTokenWrapper?: boolean | undefined;
235
- tokenWrapperAddress?: string | undefined;
236
- })[];
237
- mainProtocol: "splice" | "curve" | "morpho" | "compound" | "reserve" | "gamma" | "vest" | "zero" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quickswap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "pinto" | "mimswap" | "ichi" | "radiant" | "aave" | "fraxlend" | "ironclad" | "euler" | "gearbox" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "hypurrfi" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
238
- description: string;
239
- howToSteps: string[];
240
- depositUrl: string | undefined;
241
- explorerAddress: string | undefined;
242
- tags: string[];
243
- } | ({
244
- Tokens: {
245
- symbol: string;
246
- name: string | null;
247
- decimals: number;
248
- price: number | null;
249
- address: string;
250
- id: string;
251
- chainId: number;
252
- icon: string;
253
- isNative: boolean;
254
- isPoint: boolean;
255
- isPreTGE: boolean;
256
- isTest: boolean;
257
- verified: boolean;
258
- displaySymbol: string;
259
- }[];
260
- Protocols: {
261
- name: string;
262
- description: string;
263
- id: string;
264
- url: string;
265
- icon: string;
266
- tags: string[];
267
- }[];
268
- } & {
269
- name: string;
270
- apr: number;
271
- tvl: number;
272
- description: string;
273
- id: string;
274
- status: import("@package/databases").Status;
275
- chainId: number;
276
- action: import("@package/databases").OpportunityAction;
277
- type: string;
278
- depositUrl: string | null;
279
- explorerAddress: string | null;
280
- howToSteps: string[];
281
- mainProtocolId: string | null;
282
- manualOverrides: import("@package/databases").OpportunityManualOverride[];
283
- identifier: string;
284
- dailyRewards: number;
285
- tags: string[];
286
- lastCampaignCreatedAt: Date;
287
- }) | undefined>;
288
191
  static create(body: Omit<CreateCampaignModel, "id">, dryRun?: boolean): Promise<{
289
192
  campaignId: string;
290
193
  description: string | null;
@@ -472,6 +472,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
472
472
  endTimestamp?: string | undefined;
473
473
  opportunityId?: string | undefined;
474
474
  creatorAddress?: string | undefined;
475
+ mainProtocolId?: string | undefined;
475
476
  subType?: number | undefined;
476
477
  rootCampaignId?: string | undefined;
477
478
  parentCampaignId?: string | undefined;
@@ -2452,7 +2452,73 @@ declare const YieldNetCampaigns: {
2452
2452
  url: string;
2453
2453
  };
2454
2454
  };
2455
+ declare const katanaCampaignsInterface: {
2456
+ "Ethereum kpdUSDC 0x7B5A0182E400b241b317e781a4e9dEdFc1429822 9.589041096": {
2457
+ campaignType: Campaign;
2458
+ computeChainId: ChainId;
2459
+ distributionChainId: ChainId;
2460
+ targetToken: string;
2461
+ rewardToken: string;
2462
+ creator: string;
2463
+ url: string;
2464
+ hooks: never[];
2465
+ whitelist: never[];
2466
+ blacklist: never[];
2467
+ forwarders: never[];
2468
+ rewardTokenPricing: boolean;
2469
+ targetTokenPricing: boolean;
2470
+ apr: string;
2471
+ };
2472
+ "Ethereum kpdUSDT 0x48c03B6FfD0008460F8657Db1037C7e09dEedfcb 9.589041096": {
2473
+ campaignType: Campaign;
2474
+ computeChainId: ChainId;
2475
+ distributionChainId: ChainId;
2476
+ targetToken: string;
2477
+ rewardToken: string;
2478
+ creator: string;
2479
+ url: string;
2480
+ hooks: never[];
2481
+ whitelist: never[];
2482
+ blacklist: never[];
2483
+ forwarders: never[];
2484
+ rewardTokenPricing: boolean;
2485
+ targetTokenPricing: boolean;
2486
+ apr: string;
2487
+ };
2488
+ "Ethereum kpdWETH 0xcc6a16Be713f6a714f68b0E1f4914fD3db15fBeF 3.835616438": {
2489
+ campaignType: Campaign;
2490
+ computeChainId: ChainId;
2491
+ distributionChainId: ChainId;
2492
+ targetToken: string;
2493
+ rewardToken: string;
2494
+ creator: string;
2495
+ url: string;
2496
+ hooks: never[];
2497
+ whitelist: never[];
2498
+ blacklist: never[];
2499
+ forwarders: never[];
2500
+ rewardTokenPricing: boolean;
2501
+ targetTokenPricing: boolean;
2502
+ apr: string;
2503
+ };
2504
+ "Ethereum kpdWBTC 0x92C82f5F771F6A44CfA09357DD0575B81BF5F728 1.917808219": {
2505
+ campaignType: Campaign;
2506
+ computeChainId: ChainId;
2507
+ distributionChainId: ChainId;
2508
+ targetToken: string;
2509
+ rewardToken: string;
2510
+ creator: string;
2511
+ url: string;
2512
+ hooks: never[];
2513
+ whitelist: never[];
2514
+ blacklist: never[];
2515
+ forwarders: never[];
2516
+ rewardTokenPricing: boolean;
2517
+ targetTokenPricing: boolean;
2518
+ apr: string;
2519
+ };
2520
+ };
2455
2521
  export declare const MerklInterfaceCampaigns: {
2456
- [key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns | typeof ReserveInterfaceCampaigns | typeof BeetsInterfaceCampaigns | typeof CeloInterfaceCampaigns | typeof EtherlinkInterfaceCampaigns | typeof SwapxInterfaceCampaigns | typeof AnglesInterfaceCampaigns | typeof RoninInterfaceCampaigns | typeof TACInterfaceCampaigns | typeof HypurrFiCampaignsInterface | typeof WorldChainInterfaceCampaigns | typeof StableJackInterfaceCampaigns | typeof CornInterfaceCampaigns | typeof GauntletCompoundInterfaceCampaigns | typeof YieldNetCampaigns | typeof TermMaxInterfaceCampaigns | typeof MorphoUnichainInterfaceCampaigns | typeof KatanaCampaigns;
2522
+ [key in program]: typeof PufferInterfaceCampaigns | typeof ZkSyncInterfaceCampaigns | typeof ModeInterfaceCampaigns | typeof VicunaInterfaceCampaigns | typeof SonicmarketInterfaceCampaigns | typeof ReserveInterfaceCampaigns | typeof BeetsInterfaceCampaigns | typeof CeloInterfaceCampaigns | typeof EtherlinkInterfaceCampaigns | typeof SwapxInterfaceCampaigns | typeof AnglesInterfaceCampaigns | typeof RoninInterfaceCampaigns | typeof TACInterfaceCampaigns | typeof HypurrFiCampaignsInterface | typeof WorldChainInterfaceCampaigns | typeof StableJackInterfaceCampaigns | typeof CornInterfaceCampaigns | typeof GauntletCompoundInterfaceCampaigns | typeof YieldNetCampaigns | typeof TermMaxInterfaceCampaigns | typeof MorphoUnichainInterfaceCampaigns | typeof katanaCampaignsInterface;
2457
2523
  };
2458
2524
  export {};
@@ -137,12 +137,12 @@ export declare abstract class RewardRepository {
137
137
  static updateRewardClaimed(recipient: string, rewardTokenId: string, amount: string): Promise<Prisma.BatchPayload>;
138
138
  static updateBreakdownClaimed(recipient: string, rewardTokenId: string, campaignId: string, reason: string, amount: string): Promise<Prisma.BatchPayload>;
139
139
  static findManyRootsWithRewardOnChain(chainId: number): Promise<string[]>;
140
- static breakdownForCampaign(root: string, id: string, query: CampaignIdModel): Promise<BreakdownForCampaignsRaw[]>;
141
- static totalForCampaign(campaignId: string, root: string): Promise<{
140
+ static breakdownForCampaign(root: string, id: string, query: CampaignIdModel, isSubCampaign?: boolean): Promise<BreakdownForCampaignsRaw[]>;
141
+ static totalForCampaign(campaignId: string, root: string, isSubCampaign?: boolean): Promise<{
142
142
  campaignId: string;
143
143
  amount: bigint;
144
144
  }>;
145
- static countForCampaign(campaignId: string, root: string): Promise<{
145
+ static countForCampaign(campaignId: string, root: string, isSubCampaign?: boolean): Promise<{
146
146
  count: number;
147
147
  }>;
148
148
  static breakdownForToken(root: string, id: string, query: TokenIdModel): Promise<{
@@ -481,6 +481,7 @@ export declare const v4: Elysia<"/v4", {
481
481
  endTimestamp?: string | undefined;
482
482
  opportunityId?: string | undefined;
483
483
  creatorAddress?: string | undefined;
484
+ mainProtocolId?: string | undefined;
484
485
  subType?: number | undefined;
485
486
  rootCampaignId?: string | undefined;
486
487
  parentCampaignId?: string | undefined;
@@ -1584,128 +1585,6 @@ export declare const v4: Elysia<"/v4", {
1584
1585
  };
1585
1586
  };
1586
1587
  };
1587
- } & {
1588
- reparse: {
1589
- ":id": {
1590
- put: {
1591
- body: unknown;
1592
- params: {
1593
- id: string;
1594
- };
1595
- query: unknown;
1596
- headers: {
1597
- authorization: string;
1598
- };
1599
- response: {
1600
- 200: {
1601
- campaignId: string;
1602
- description: string | null;
1603
- id: string;
1604
- params: import("@prisma/client/runtime/library").JsonValue;
1605
- amount: string;
1606
- startTimestamp: bigint;
1607
- type: string;
1608
- computeChainId: number;
1609
- distributionChainId: number;
1610
- endTimestamp: bigint;
1611
- opportunityId: string;
1612
- creatorAddress: string;
1613
- distributionType: import("@package/databases").DistributionType;
1614
- subType: number | null;
1615
- rewardTokenId: string;
1616
- manualOverrides: import("@package/databases").CampaignManualOverride[];
1617
- createdAt: Date;
1618
- rootCampaignId: string | null;
1619
- parentCampaignId: string | null;
1620
- } | {
1621
- id: string;
1622
- chainId: number;
1623
- type: string;
1624
- identifier: string;
1625
- name: string;
1626
- status: "PAST" | "LIVE" | "SOON";
1627
- action: any;
1628
- tokens: ({
1629
- symbol: string;
1630
- name: string | null;
1631
- decimals: number;
1632
- address: string;
1633
- id: string;
1634
- chainId: number;
1635
- icon: string;
1636
- isNative: boolean;
1637
- isPoint: boolean;
1638
- isPreTGE: boolean;
1639
- isTest: boolean;
1640
- verified: boolean;
1641
- } & {
1642
- price?: number | null | undefined;
1643
- isTokenWrapper?: boolean | undefined;
1644
- tokenWrapperAddress?: string | undefined;
1645
- })[];
1646
- mainProtocol: "splice" | "curve" | "morpho" | "compound" | "reserve" | "gamma" | "vest" | "zero" | "uniswap" | "ambient" | "arthswap" | "base-swap" | "camelot" | "crust" | "fenix" | "horiza" | "izumi" | "kim" | "pancake-swap" | "quickswap" | "ramses" | "retro" | "stryke" | "sushi-swap" | "swapr" | "thruster" | "voltage" | "koi" | "supswap" | "zk-swap" | "thirdtrade" | "swap-x" | "velodrome" | "aerodrome" | "balancer" | "cross_curve" | "curveNPool" | "aura" | "akron" | "beefy" | "dragonswap" | "poolside" | "syncswap" | "neptune" | "zkSwapThreePool" | "rfx" | "ra" | "maverick" | "trader-joe" | "hanji" | "pinto" | "mimswap" | "ichi" | "radiant" | "aave" | "fraxlend" | "ironclad" | "euler" | "gearbox" | "sturdy" | "frax" | "ionic" | "moonwell" | "fluid" | "silo" | "dolomite" | "badger" | "ajna" | "layerbank" | "ion" | "venus" | "woofi" | "reactor_fusion" | "eigenlayer" | "zerolend" | "lnd" | "dlend" | "hyperdrive" | "oku" | "hourglass" | "veda" | "kyo" | "sonex" | "lendle" | "tako-tako" | "equalizer" | "spectra" | "beraborrow" | "superlend" | "avalon" | "iguana" | "xlend" | "sake" | "sonicmarket" | "stability" | "hypurrfi" | "angles" | "enzyme" | "toros" | "vicuna" | "bunni" | "beratrax" | "concrete" | "cian" | "pendle" | "yei" | "termmax" | "filament" | "gammaswap" | "maha" | "tempest" | "uranium" | "holdstation" | "katana" | "punchswap" | "satlayer" | "puffer" | undefined;
1647
- description: string;
1648
- howToSteps: string[];
1649
- depositUrl: string | undefined;
1650
- explorerAddress: string | undefined;
1651
- tags: string[];
1652
- } | {
1653
- Tokens: {
1654
- symbol: string;
1655
- name: string | null;
1656
- decimals: number;
1657
- price: number | null;
1658
- address: string;
1659
- id: string;
1660
- chainId: number;
1661
- icon: string;
1662
- isNative: boolean;
1663
- isPoint: boolean;
1664
- isPreTGE: boolean;
1665
- isTest: boolean;
1666
- verified: boolean;
1667
- displaySymbol: string;
1668
- }[];
1669
- Protocols: {
1670
- name: string;
1671
- description: string;
1672
- id: string;
1673
- url: string;
1674
- icon: string;
1675
- tags: string[];
1676
- }[];
1677
- name: string;
1678
- apr: number;
1679
- tvl: number;
1680
- description: string;
1681
- id: string;
1682
- status: import("@package/databases").Status;
1683
- chainId: number;
1684
- action: import("@package/databases").OpportunityAction;
1685
- type: string;
1686
- depositUrl: string | null;
1687
- explorerAddress: string | null;
1688
- howToSteps: string[];
1689
- mainProtocolId: string | null;
1690
- manualOverrides: import("@package/databases").OpportunityManualOverride[];
1691
- identifier: string;
1692
- dailyRewards: number;
1693
- tags: string[];
1694
- lastCampaignCreatedAt: Date;
1695
- } | undefined;
1696
- 422: {
1697
- type: "validation";
1698
- on: string;
1699
- summary?: string;
1700
- message?: string;
1701
- found?: unknown;
1702
- property?: string;
1703
- expected?: string;
1704
- };
1705
- };
1706
- };
1707
- };
1708
- };
1709
1588
  } & {
1710
1589
  opportunity: {
1711
1590
  patch: {
@@ -1879,6 +1758,7 @@ export declare const v4: Elysia<"/v4", {
1879
1758
  endTimestamp?: string | undefined;
1880
1759
  opportunityId?: string | undefined;
1881
1760
  creatorAddress?: string | undefined;
1761
+ mainProtocolId?: string | undefined;
1882
1762
  subType?: number | undefined;
1883
1763
  rootCampaignId?: string | undefined;
1884
1764
  parentCampaignId?: string | undefined;
@@ -2264,6 +2144,7 @@ export declare const v4: Elysia<"/v4", {
2264
2144
  endTimestamp?: string | undefined;
2265
2145
  opportunityId?: string | undefined;
2266
2146
  creatorAddress?: string | undefined;
2147
+ mainProtocolId?: string | undefined;
2267
2148
  subType?: number | undefined;
2268
2149
  rootCampaignId?: string | undefined;
2269
2150
  parentCampaignId?: string | undefined;
@@ -2379,6 +2260,7 @@ export declare const v4: Elysia<"/v4", {
2379
2260
  endTimestamp?: string | undefined;
2380
2261
  opportunityId?: string | undefined;
2381
2262
  creatorAddress?: string | undefined;
2263
+ mainProtocolId?: string | undefined;
2382
2264
  subType?: number | undefined;
2383
2265
  rootCampaignId?: string | undefined;
2384
2266
  parentCampaignId?: string | undefined;