@merkl/api 0.20.60 → 0.20.62

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.
@@ -14,6 +14,7 @@ export var program;
14
14
  program["Etherlink"] = "Etherlink";
15
15
  program["Angles"] = "Angles";
16
16
  program["Ronin"] = "Ronin";
17
+ program["TAC"] = "TAC";
17
18
  })(program || (program = {}));
18
19
  export var roninCampaigns;
19
20
  (function (roninCampaigns) {
@@ -548,6 +549,12 @@ const RoninInterfaceCampaigns = {
548
549
  weightToken1: 4000,
549
550
  },
550
551
  };
552
+ export var tacCampaigns;
553
+ (function (tacCampaigns) {
554
+ tacCampaigns["TAC_Supply_TACETH"] = "TAC Supply tacETH 0x294eecec65A0142e84AEdfD8eB2FBEA8c9a9fbad";
555
+ tacCampaigns["TAC_Supply_TACBTC"] = "TAC Supply tacBTC 0x6Bf340dB729d82af1F6443A0Ea0d79647b1c3DDf";
556
+ tacCampaigns["TAC_Supply_TACUSD"] = "TAC Supply tacUSD 0x699e04F98dE2Fc395a7dcBf36B48EC837A976490";
557
+ })(tacCampaigns || (tacCampaigns = {}));
551
558
  const AnglesInterfaceCampaigns = {
552
559
  [anglesCampaigns.Angles_supply_in_angles_liquid]: {
553
560
  campaignType: Campaign.ERC20_FIX_APR,
@@ -5584,6 +5591,55 @@ const PufferInterfaceCampaigns = {
5584
5591
  forwarders: [],
5585
5592
  },
5586
5593
  };
5594
+ const BaseTACREWARDS = 3.4;
5595
+ const DAILYREWARDSINDOLLAR = 1000;
5596
+ const tacBTCMultiplier = 3;
5597
+ const tacETHMultiplier = 3.5;
5598
+ const tacUSDMultiplier = 5;
5599
+ const TACInterfaceCampaigns = {
5600
+ [tacCampaigns.TAC_Supply_TACETH]: {
5601
+ campaignType: Campaign.ERC20_FIX_APR,
5602
+ computeChainId: ChainId.MAINNET,
5603
+ distributionChainId: ChainId.GNOSIS,
5604
+ targetToken: "0x294eecec65A0142e84AEdfD8eB2FBEA8c9a9fbad",
5605
+ rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
5606
+ hooks: [],
5607
+ whitelist: [],
5608
+ blacklist: [],
5609
+ forwarders: [],
5610
+ rewardTokenPricing: false,
5611
+ targetTokenPricing: true,
5612
+ apr: (BaseTACREWARDS * tacETHMultiplier * 365 * 100) / DAILYREWARDSINDOLLAR,
5613
+ },
5614
+ [tacCampaigns.TAC_Supply_TACBTC]: {
5615
+ campaignType: Campaign.ERC20_FIX_APR,
5616
+ computeChainId: ChainId.MAINNET,
5617
+ distributionChainId: ChainId.GNOSIS,
5618
+ targetToken: "0x6Bf340dB729d82af1F6443A0Ea0d79647b1c3DDf",
5619
+ rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
5620
+ hooks: [],
5621
+ whitelist: [],
5622
+ blacklist: [],
5623
+ forwarders: [],
5624
+ rewardTokenPricing: false,
5625
+ targetTokenPricing: true,
5626
+ apr: (BaseTACREWARDS * tacBTCMultiplier * 365 * 100) / DAILYREWARDSINDOLLAR,
5627
+ },
5628
+ [tacCampaigns.TAC_Supply_TACUSD]: {
5629
+ campaignType: Campaign.ERC20_FIX_APR,
5630
+ computeChainId: ChainId.MAINNET,
5631
+ distributionChainId: ChainId.GNOSIS,
5632
+ targetToken: "0x699e04F98dE2Fc395a7dcBf36B48EC837A976490",
5633
+ rewardToken: "0xf2401de511DC0D1ad4762588722f5B0574A56b60",
5634
+ hooks: [],
5635
+ whitelist: [],
5636
+ blacklist: [],
5637
+ forwarders: [],
5638
+ rewardTokenPricing: false,
5639
+ targetTokenPricing: true,
5640
+ apr: (BaseTACREWARDS * tacUSDMultiplier * 365 * 100) / DAILYREWARDSINDOLLAR,
5641
+ },
5642
+ };
5587
5643
  export const MerklInterfaceCampaigns = {
5588
5644
  [program.Puffer]: PufferInterfaceCampaigns,
5589
5645
  [program.ZkSync]: ZkSyncInterfaceCampaigns,
@@ -5597,4 +5653,5 @@ export const MerklInterfaceCampaigns = {
5597
5653
  [program.Etherlink]: EtherlinkInterfaceCampaigns,
5598
5654
  [program.Angles]: AnglesInterfaceCampaigns,
5599
5655
  [program.Ronin]: RoninInterfaceCampaigns,
5656
+ [program.TAC]: TACInterfaceCampaigns,
5600
5657
  };
@@ -23,6 +23,7 @@ export class ProgramPayloadService {
23
23
  const creator = query.creator;
24
24
  const amount = query.amount;
25
25
  const program = query.program;
26
+ const apr = query.apr;
26
27
  if (!(program in MerklInterfaceCampaigns)) {
27
28
  throw new Error(`Program ${program} not found`);
28
29
  }
@@ -31,6 +32,10 @@ export class ProgramPayloadService {
31
32
  throw new Error(`Campaign ${campaign} not found`);
32
33
  }
33
34
  const config = programInterface[campaign];
35
+ if (apr && "apr" in config) {
36
+ // override the apr if in query params
37
+ config.apr = apr;
38
+ }
34
39
  return {
35
40
  ...config,
36
41
  amount: amount,
@@ -4299,6 +4299,7 @@ export declare const v4: Elysia<"/v4", false, {
4299
4299
  body: unknown;
4300
4300
  params: {};
4301
4301
  query: {
4302
+ apr?: number | undefined;
4302
4303
  creator: string;
4303
4304
  campaign: string;
4304
4305
  distributionChainId: number;
@@ -4331,6 +4332,7 @@ export declare const v4: Elysia<"/v4", false, {
4331
4332
  body: unknown;
4332
4333
  params: {};
4333
4334
  query: {
4335
+ apr?: number | undefined;
4334
4336
  creator: string;
4335
4337
  campaign: string;
4336
4338
  distributionChainId: number;
@@ -4375,6 +4377,7 @@ export declare const v4: Elysia<"/v4", false, {
4375
4377
  body: unknown;
4376
4378
  params: {};
4377
4379
  query: {
4380
+ apr?: number | undefined;
4378
4381
  creator: string;
4379
4382
  campaign: string;
4380
4383
  distributionChainId: number;
@@ -4401,6 +4404,7 @@ export declare const v4: Elysia<"/v4", false, {
4401
4404
  params: {};
4402
4405
  query: {
4403
4406
  amount?: string | undefined;
4407
+ apr?: number | undefined;
4404
4408
  creator: string;
4405
4409
  distributionChainId: number;
4406
4410
  startTimestamp: number;
@@ -4435,6 +4439,7 @@ export declare const v4: Elysia<"/v4", false, {
4435
4439
  params: {};
4436
4440
  query: {
4437
4441
  amount?: string | undefined;
4442
+ apr?: number | undefined;
4438
4443
  creator: string;
4439
4444
  distributionChainId: number;
4440
4445
  startTimestamp: number;