@merkl/api 1.6.0 → 1.6.1

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.
@@ -1,6 +1,6 @@
1
1
  import { CampaignType, type ChainId } from "@package/resources/enums";
2
2
  import type { CampaignConfig, OnchainCampaign } from "@package/resources/schemas";
3
- import { type ValidCampaign } from "@package/sdk";
3
+ import type { ValidCampaign } from "@package/sdk";
4
4
  import type { TransactionParametersModel } from "../transaction/transaction.model";
5
5
  import type { CampaignPayloadInputModel, SafeFileModel, SinglePayloadInputModel } from "./payload.model";
6
6
  export declare class PayloadService {
@@ -19,7 +19,7 @@ export declare class PayloadService {
19
19
  };
20
20
  payload: string;
21
21
  };
22
- campaign: import("@package/resources/schemas").EngineCampaign<CampaignType> | undefined;
22
+ campaign: import("@package/resources/schemas").EngineCampaign<CampaignType.INVALID> | import("@package/resources/schemas").EngineCampaign<CampaignType>;
23
23
  opportunity: ({
24
24
  chainId: number;
25
25
  type: string;
@@ -240,8 +240,8 @@ export declare class PayloadService {
240
240
  lastCampaignCreatedAt: Date;
241
241
  manualOverrides: import("@package/databases").OpportunityManualOverride[];
242
242
  liveCampaigns: number;
243
- }) | undefined;
244
- tvl: ({
243
+ });
244
+ tvl: {
245
245
  breakdowns: ({
246
246
  identifier: string;
247
247
  type: import("@package/databases").TvlType;
@@ -249,21 +249,15 @@ export declare class PayloadService {
249
249
  } & {})[];
250
250
  timestamp: bigint;
251
251
  total: number;
252
- } & {}) | undefined;
252
+ } & {};
253
253
  fee: string;
254
254
  }>;
255
255
  /**
256
256
  * Given onchain campaign creation arguments, tries to build the campaign and return the opportunity.
257
257
  */
258
258
  static analyseOnchainArgs(chainId: number, args: OnchainCampaign): Promise<{
259
- message: string;
260
- name: string;
261
- campaign?: undefined;
262
- opportunity?: undefined;
263
- tvl?: undefined;
264
- } | {
265
- message?: undefined;
266
- campaign: import("@package/resources/schemas").EngineCampaign<CampaignType>;
259
+ config: import("@package/resources/schemas").ExtendedConfig<CampaignType>;
260
+ campaign: import("@package/resources/schemas").EngineCampaign<CampaignType.INVALID> | import("@package/resources/schemas").EngineCampaign<CampaignType>;
267
261
  opportunity: ({
268
262
  chainId: number;
269
263
  type: string;
@@ -494,149 +488,181 @@ export declare class PayloadService {
494
488
  timestamp: bigint;
495
489
  total: number;
496
490
  } & {};
497
- name?: undefined;
498
491
  }>;
499
- static simulateAndAnalyze(body: TransactionParametersModel): Promise<Record<string, {
500
- message: string;
501
- name: string;
502
- campaign?: undefined;
503
- opportunity?: undefined;
504
- tvl?: undefined;
505
- } | {
506
- message?: undefined;
507
- campaign: import("@package/resources/schemas").EngineCampaign<CampaignType>;
508
- opportunity: ({
509
- chainId: number;
510
- type: string;
511
- identifier: string;
512
- name?: string | undefined;
513
- status: "LIVE" | "NONE" | "PAST" | "SOON";
514
- action: "BORROW" | "DROP" | "HOLD" | "INVALID" | "LEND" | "LONG" | "POOL" | "SHORT" | "STAKE" | "SWAP";
515
- description?: string | undefined;
516
- howToSteps?: string[] | undefined;
517
- tokens: {
518
- address: string;
492
+ static simulateAndAnalyze(body: TransactionParametersModel): Promise<{
493
+ campaigns: Record<string, {
494
+ config: import("@package/resources/schemas").ExtendedConfig<CampaignType>;
495
+ campaign: import("@package/resources/schemas").EngineCampaign<CampaignType.INVALID> | import("@package/resources/schemas").EngineCampaign<CampaignType>;
496
+ opportunity: ({
519
497
  chainId: number;
520
- }[];
521
- protocols?: string[] | undefined;
522
- mainProtocol?: string | undefined;
523
- depositUrl?: string | undefined;
524
- explorerAddress?: string | undefined;
525
- tags?: string[] | undefined;
526
- } & {
527
- id: string;
528
- }) | ({
529
- ActivePrograms: {
530
- icon: string;
531
- id: string;
532
- name: string;
533
- slug: string | null;
534
- }[];
535
- AprRecords: ({
536
- AprBreakdown: {
537
- identifier: string;
538
- timestamp: bigint;
539
- type: import("@package/databases").AprType;
540
- value: number;
498
+ type: string;
499
+ identifier: string;
500
+ name?: string | undefined;
501
+ status: "LIVE" | "NONE" | "PAST" | "SOON";
502
+ action: "BORROW" | "DROP" | "HOLD" | "INVALID" | "LEND" | "LONG" | "POOL" | "SHORT" | "STAKE" | "SWAP";
503
+ description?: string | undefined;
504
+ howToSteps?: string[] | undefined;
505
+ tokens: {
506
+ address: string;
507
+ chainId: number;
541
508
  }[];
509
+ protocols?: string[] | undefined;
510
+ mainProtocol?: string | undefined;
511
+ depositUrl?: string | undefined;
512
+ explorerAddress?: string | undefined;
513
+ tags?: string[] | undefined;
542
514
  } & {
543
515
  id: string;
544
- timestamp: bigint;
545
- cumulated: number;
546
- opportunityId: string;
547
- })[];
548
- Campaigns: {
549
- id: string;
550
- computeChainId: number;
551
- distributionChainId: number;
552
- campaignId: string;
553
- type: string;
554
- distributionType: import("@package/databases").DistributionType;
555
- subType: number | null;
556
- rewardTokenId: string;
557
- amount: string;
558
- opportunityId: string;
559
- startTimestamp: bigint;
560
- endTimestamp: bigint;
561
- params: import("@prisma/client/runtime/client").JsonValue;
562
- description: string | null;
563
- dailyRewards: number;
564
- apr: number;
565
- creatorAddress: string;
566
- manualOverrides: import("@package/databases").CampaignManualOverride[];
567
- createdAt: Date;
568
- rootCampaignId: string | null;
569
- parentCampaignId: string | null;
570
- }[];
571
- Chain: {
572
- id: number;
573
- name: string;
574
- icon: string;
575
- liveCampaigns: number;
576
- endOfDisputePeriod: number;
577
- };
578
- DailyRewardsRecords: ({
579
- DailyRewardsBreakdown: ({
580
- Campaign: {
581
- CampaignStatus: {
516
+ }) | ({
517
+ ActivePrograms: {
518
+ icon: string;
519
+ id: string;
520
+ name: string;
521
+ slug: string | null;
522
+ }[];
523
+ AprRecords: ({
524
+ AprBreakdown: {
525
+ identifier: string;
526
+ timestamp: bigint;
527
+ type: import("@package/databases").AprType;
528
+ value: number;
529
+ }[];
530
+ } & {
531
+ id: string;
532
+ timestamp: bigint;
533
+ cumulated: number;
534
+ opportunityId: string;
535
+ })[];
536
+ Campaigns: {
537
+ id: string;
538
+ computeChainId: number;
539
+ distributionChainId: number;
540
+ campaignId: string;
541
+ type: string;
542
+ distributionType: import("@package/databases").DistributionType;
543
+ subType: number | null;
544
+ rewardTokenId: string;
545
+ amount: string;
546
+ opportunityId: string;
547
+ startTimestamp: bigint;
548
+ endTimestamp: bigint;
549
+ params: import("@prisma/client/runtime/client").JsonValue;
550
+ description: string | null;
551
+ dailyRewards: number;
552
+ apr: number;
553
+ creatorAddress: string;
554
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
555
+ createdAt: Date;
556
+ rootCampaignId: string | null;
557
+ parentCampaignId: string | null;
558
+ }[];
559
+ Chain: {
560
+ id: number;
561
+ name: string;
562
+ icon: string;
563
+ liveCampaigns: number;
564
+ endOfDisputePeriod: number;
565
+ };
566
+ DailyRewardsRecords: ({
567
+ DailyRewardsBreakdown: ({
568
+ Campaign: {
569
+ CampaignStatus: {
570
+ campaignId: string;
571
+ computedUntil: bigint;
572
+ processingStarted: bigint;
573
+ status: import("@package/databases").RunStatus;
574
+ preComputeStatus: import("@package/databases").RunStatus;
575
+ preComputeProcessingStarted: bigint;
576
+ error: string;
577
+ details: import("@prisma/client/runtime/client").JsonValue;
578
+ }[];
579
+ RewardToken: {
580
+ id: string;
581
+ name: string | null;
582
+ chainId: number;
583
+ address: string;
584
+ decimals: number;
585
+ symbol: string;
586
+ displaySymbol: string;
587
+ icon: string;
588
+ verified: boolean;
589
+ isTest: boolean;
590
+ type: import("@package/databases").TokenType;
591
+ isNative: boolean;
592
+ price: number | null;
593
+ updatedAt: number | null;
594
+ priceSource: string | null;
595
+ };
596
+ amount: string;
582
597
  campaignId: string;
583
- computedUntil: bigint;
584
- processingStarted: bigint;
585
- status: import("@package/databases").RunStatus;
586
- preComputeStatus: import("@package/databases").RunStatus;
587
- preComputeProcessingStarted: bigint;
588
- error: string;
589
- details: import("@prisma/client/runtime/client").JsonValue;
590
- }[];
591
- RewardToken: {
592
- id: string;
593
- name: string | null;
594
- chainId: number;
595
- address: string;
596
- decimals: number;
597
- symbol: string;
598
- displaySymbol: string;
599
- icon: string;
600
- verified: boolean;
601
- isTest: boolean;
602
- type: import("@package/databases").TokenType;
603
- isNative: boolean;
604
- price: number | null;
605
- updatedAt: number | null;
606
- priceSource: string | null;
598
+ distributionType: import("@package/databases").DistributionType;
599
+ endTimestamp: bigint;
600
+ startTimestamp: bigint;
607
601
  };
608
- amount: string;
602
+ } & {
603
+ id: string;
604
+ value: number;
605
+ timestamp: bigint;
609
606
  campaignId: string;
610
- distributionType: import("@package/databases").DistributionType;
611
- endTimestamp: bigint;
612
- startTimestamp: bigint;
613
- };
607
+ dailyRewardsRecordId: string;
608
+ })[];
614
609
  } & {
615
610
  id: string;
616
- value: number;
617
611
  timestamp: bigint;
618
- campaignId: string;
619
- dailyRewardsRecordId: string;
612
+ total: number;
613
+ opportunityId: string;
620
614
  })[];
621
- } & {
622
- id: string;
623
- timestamp: bigint;
624
- total: number;
625
- opportunityId: string;
626
- })[];
627
- MainProtocol: {
628
- id: string;
629
- tags: string[];
630
- name: string;
631
- description: string;
632
- url: string;
633
- icon: string;
634
- banner: string | null;
635
- opportunityBannerLight: string | null;
636
- opportunityBannerDark: string | null;
637
- } | null;
638
- NativeAprRecords: ({
639
- RewardToken: {
615
+ MainProtocol: {
616
+ id: string;
617
+ tags: string[];
618
+ name: string;
619
+ description: string;
620
+ url: string;
621
+ icon: string;
622
+ banner: string | null;
623
+ opportunityBannerLight: string | null;
624
+ opportunityBannerDark: string | null;
625
+ } | null;
626
+ NativeAprRecords: ({
627
+ RewardToken: {
628
+ id: string;
629
+ name: string | null;
630
+ chainId: number;
631
+ address: string;
632
+ decimals: number;
633
+ symbol: string;
634
+ displaySymbol: string;
635
+ icon: string;
636
+ verified: boolean;
637
+ isTest: boolean;
638
+ type: import("@package/databases").TokenType;
639
+ isNative: boolean;
640
+ price: number | null;
641
+ updatedAt: number | null;
642
+ priceSource: string | null;
643
+ } | null;
644
+ } & {
645
+ id: string;
646
+ title: string;
647
+ description: string | null;
648
+ timestamp: bigint;
649
+ value: number;
650
+ amount: bigint | null;
651
+ rewardTokenId: string | null;
652
+ opportunityId: string;
653
+ })[];
654
+ Protocols: {
655
+ id: string;
656
+ tags: string[];
657
+ name: string;
658
+ description: string;
659
+ url: string;
660
+ icon: string;
661
+ banner: string | null;
662
+ opportunityBannerLight: string | null;
663
+ opportunityBannerDark: string | null;
664
+ }[];
665
+ Tokens: {
640
666
  id: string;
641
667
  name: string | null;
642
668
  chainId: number;
@@ -652,232 +678,231 @@ export declare class PayloadService {
652
678
  price: number | null;
653
679
  updatedAt: number | null;
654
680
  priceSource: string | null;
655
- } | null;
681
+ }[];
682
+ TvlRecords: ({
683
+ TvlBreakdown: {
684
+ identifier: string;
685
+ type: import("@package/databases").TvlType;
686
+ value: number;
687
+ }[];
688
+ } & {
689
+ id: string;
690
+ timestamp: bigint;
691
+ total: number;
692
+ opportunityId: string;
693
+ })[];
656
694
  } & {
657
695
  id: string;
658
- title: string;
659
- description: string | null;
660
- timestamp: bigint;
661
- value: number;
662
- amount: bigint | null;
663
- rewardTokenId: string | null;
664
- opportunityId: string;
665
- })[];
666
- Protocols: {
667
- id: string;
668
- tags: string[];
696
+ chainId: number;
697
+ type: string;
698
+ identifier: string;
669
699
  name: string;
670
700
  description: string;
671
- url: string;
672
- icon: string;
673
- banner: string | null;
674
- opportunityBannerLight: string | null;
675
- opportunityBannerDark: string | null;
676
- }[];
677
- Tokens: {
678
- id: string;
679
- name: string | null;
680
- chainId: number;
681
- address: string;
682
- decimals: number;
683
- symbol: string;
684
- displaySymbol: string;
685
- icon: string;
686
- verified: boolean;
687
- isTest: boolean;
688
- type: import("@package/databases").TokenType;
689
- isNative: boolean;
690
- price: number | null;
691
- updatedAt: number | null;
692
- priceSource: string | null;
693
- }[];
694
- TvlRecords: ({
695
- TvlBreakdown: {
701
+ howToSteps: string[];
702
+ depositUrl: string | null;
703
+ explorerAddress: string | null;
704
+ status: import("@package/databases").Status;
705
+ action: import("@package/databases").OpportunityAction;
706
+ mainProtocolId: string | null;
707
+ tvl: number;
708
+ apr: number;
709
+ nativeApr: number | null;
710
+ maxApr: number | null;
711
+ dailyRewards: number;
712
+ tags: string[];
713
+ lastCampaignCreatedAt: Date;
714
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
715
+ liveCampaigns: number;
716
+ });
717
+ tvl: {
718
+ breakdowns: ({
696
719
  identifier: string;
697
720
  type: import("@package/databases").TvlType;
698
721
  value: number;
699
- }[];
700
- } & {
701
- id: string;
722
+ } & {})[];
702
723
  timestamp: bigint;
703
724
  total: number;
704
- opportunityId: string;
705
- })[];
706
- } & {
707
- id: string;
708
- chainId: number;
709
- type: string;
710
- identifier: string;
711
- name: string;
712
- description: string;
713
- howToSteps: string[];
714
- depositUrl: string | null;
715
- explorerAddress: string | null;
716
- status: import("@package/databases").Status;
717
- action: import("@package/databases").OpportunityAction;
718
- mainProtocolId: string | null;
719
- tvl: number;
720
- apr: number;
721
- nativeApr: number | null;
722
- maxApr: number | null;
723
- dailyRewards: number;
724
- tags: string[];
725
- lastCampaignCreatedAt: Date;
726
- manualOverrides: import("@package/databases").OpportunityManualOverride[];
727
- liveCampaigns: number;
728
- });
729
- tvl: {
730
- breakdowns: ({
731
- identifier: string;
732
- type: import("@package/databases").TvlType;
733
- value: number;
734
- } & {})[];
735
- timestamp: bigint;
736
- total: number;
737
- } & {};
738
- name?: undefined;
739
- }>>;
740
- static analyseSafe(body: SafeFileModel): Promise<Record<string, {
741
- message: string;
742
- name: string;
743
- campaign?: undefined;
744
- opportunity?: undefined;
745
- tvl?: undefined;
746
- } | {
747
- message?: undefined;
748
- campaign: import("@package/resources/schemas").EngineCampaign<CampaignType>;
749
- opportunity: ({
750
- chainId: number;
751
- type: string;
752
- identifier: string;
753
- name?: string | undefined;
754
- status: "LIVE" | "NONE" | "PAST" | "SOON";
755
- action: "BORROW" | "DROP" | "HOLD" | "INVALID" | "LEND" | "LONG" | "POOL" | "SHORT" | "STAKE" | "SWAP";
756
- description?: string | undefined;
757
- howToSteps?: string[] | undefined;
758
- tokens: {
759
- address: string;
725
+ } & {};
726
+ }>;
727
+ errors: {
728
+ campaignId: string;
729
+ error: string;
730
+ }[];
731
+ }>;
732
+ static analyseSafe(body: SafeFileModel): Promise<{
733
+ campaigns: Record<string, {
734
+ config: import("@package/resources/schemas").ExtendedConfig<CampaignType>;
735
+ campaign: import("@package/resources/schemas").EngineCampaign<CampaignType.INVALID> | import("@package/resources/schemas").EngineCampaign<CampaignType>;
736
+ opportunity: ({
760
737
  chainId: number;
761
- }[];
762
- protocols?: string[] | undefined;
763
- mainProtocol?: string | undefined;
764
- depositUrl?: string | undefined;
765
- explorerAddress?: string | undefined;
766
- tags?: string[] | undefined;
767
- } & {
768
- id: string;
769
- }) | ({
770
- ActivePrograms: {
771
- icon: string;
772
- id: string;
773
- name: string;
774
- slug: string | null;
775
- }[];
776
- AprRecords: ({
777
- AprBreakdown: {
778
- identifier: string;
779
- timestamp: bigint;
780
- type: import("@package/databases").AprType;
781
- value: number;
738
+ type: string;
739
+ identifier: string;
740
+ name?: string | undefined;
741
+ status: "LIVE" | "NONE" | "PAST" | "SOON";
742
+ action: "BORROW" | "DROP" | "HOLD" | "INVALID" | "LEND" | "LONG" | "POOL" | "SHORT" | "STAKE" | "SWAP";
743
+ description?: string | undefined;
744
+ howToSteps?: string[] | undefined;
745
+ tokens: {
746
+ address: string;
747
+ chainId: number;
782
748
  }[];
749
+ protocols?: string[] | undefined;
750
+ mainProtocol?: string | undefined;
751
+ depositUrl?: string | undefined;
752
+ explorerAddress?: string | undefined;
753
+ tags?: string[] | undefined;
783
754
  } & {
784
755
  id: string;
785
- timestamp: bigint;
786
- cumulated: number;
787
- opportunityId: string;
788
- })[];
789
- Campaigns: {
790
- id: string;
791
- computeChainId: number;
792
- distributionChainId: number;
793
- campaignId: string;
794
- type: string;
795
- distributionType: import("@package/databases").DistributionType;
796
- subType: number | null;
797
- rewardTokenId: string;
798
- amount: string;
799
- opportunityId: string;
800
- startTimestamp: bigint;
801
- endTimestamp: bigint;
802
- params: import("@prisma/client/runtime/client").JsonValue;
803
- description: string | null;
804
- dailyRewards: number;
805
- apr: number;
806
- creatorAddress: string;
807
- manualOverrides: import("@package/databases").CampaignManualOverride[];
808
- createdAt: Date;
809
- rootCampaignId: string | null;
810
- parentCampaignId: string | null;
811
- }[];
812
- Chain: {
813
- id: number;
814
- name: string;
815
- icon: string;
816
- liveCampaigns: number;
817
- endOfDisputePeriod: number;
818
- };
819
- DailyRewardsRecords: ({
820
- DailyRewardsBreakdown: ({
821
- Campaign: {
822
- CampaignStatus: {
756
+ }) | ({
757
+ ActivePrograms: {
758
+ icon: string;
759
+ id: string;
760
+ name: string;
761
+ slug: string | null;
762
+ }[];
763
+ AprRecords: ({
764
+ AprBreakdown: {
765
+ identifier: string;
766
+ timestamp: bigint;
767
+ type: import("@package/databases").AprType;
768
+ value: number;
769
+ }[];
770
+ } & {
771
+ id: string;
772
+ timestamp: bigint;
773
+ cumulated: number;
774
+ opportunityId: string;
775
+ })[];
776
+ Campaigns: {
777
+ id: string;
778
+ computeChainId: number;
779
+ distributionChainId: number;
780
+ campaignId: string;
781
+ type: string;
782
+ distributionType: import("@package/databases").DistributionType;
783
+ subType: number | null;
784
+ rewardTokenId: string;
785
+ amount: string;
786
+ opportunityId: string;
787
+ startTimestamp: bigint;
788
+ endTimestamp: bigint;
789
+ params: import("@prisma/client/runtime/client").JsonValue;
790
+ description: string | null;
791
+ dailyRewards: number;
792
+ apr: number;
793
+ creatorAddress: string;
794
+ manualOverrides: import("@package/databases").CampaignManualOverride[];
795
+ createdAt: Date;
796
+ rootCampaignId: string | null;
797
+ parentCampaignId: string | null;
798
+ }[];
799
+ Chain: {
800
+ id: number;
801
+ name: string;
802
+ icon: string;
803
+ liveCampaigns: number;
804
+ endOfDisputePeriod: number;
805
+ };
806
+ DailyRewardsRecords: ({
807
+ DailyRewardsBreakdown: ({
808
+ Campaign: {
809
+ CampaignStatus: {
810
+ campaignId: string;
811
+ computedUntil: bigint;
812
+ processingStarted: bigint;
813
+ status: import("@package/databases").RunStatus;
814
+ preComputeStatus: import("@package/databases").RunStatus;
815
+ preComputeProcessingStarted: bigint;
816
+ error: string;
817
+ details: import("@prisma/client/runtime/client").JsonValue;
818
+ }[];
819
+ RewardToken: {
820
+ id: string;
821
+ name: string | null;
822
+ chainId: number;
823
+ address: string;
824
+ decimals: number;
825
+ symbol: string;
826
+ displaySymbol: string;
827
+ icon: string;
828
+ verified: boolean;
829
+ isTest: boolean;
830
+ type: import("@package/databases").TokenType;
831
+ isNative: boolean;
832
+ price: number | null;
833
+ updatedAt: number | null;
834
+ priceSource: string | null;
835
+ };
836
+ amount: string;
823
837
  campaignId: string;
824
- computedUntil: bigint;
825
- processingStarted: bigint;
826
- status: import("@package/databases").RunStatus;
827
- preComputeStatus: import("@package/databases").RunStatus;
828
- preComputeProcessingStarted: bigint;
829
- error: string;
830
- details: import("@prisma/client/runtime/client").JsonValue;
831
- }[];
832
- RewardToken: {
833
- id: string;
834
- name: string | null;
835
- chainId: number;
836
- address: string;
837
- decimals: number;
838
- symbol: string;
839
- displaySymbol: string;
840
- icon: string;
841
- verified: boolean;
842
- isTest: boolean;
843
- type: import("@package/databases").TokenType;
844
- isNative: boolean;
845
- price: number | null;
846
- updatedAt: number | null;
847
- priceSource: string | null;
838
+ distributionType: import("@package/databases").DistributionType;
839
+ endTimestamp: bigint;
840
+ startTimestamp: bigint;
848
841
  };
849
- amount: string;
842
+ } & {
843
+ id: string;
844
+ value: number;
845
+ timestamp: bigint;
850
846
  campaignId: string;
851
- distributionType: import("@package/databases").DistributionType;
852
- endTimestamp: bigint;
853
- startTimestamp: bigint;
854
- };
847
+ dailyRewardsRecordId: string;
848
+ })[];
855
849
  } & {
856
850
  id: string;
857
- value: number;
858
851
  timestamp: bigint;
859
- campaignId: string;
860
- dailyRewardsRecordId: string;
852
+ total: number;
853
+ opportunityId: string;
861
854
  })[];
862
- } & {
863
- id: string;
864
- timestamp: bigint;
865
- total: number;
866
- opportunityId: string;
867
- })[];
868
- MainProtocol: {
869
- id: string;
870
- tags: string[];
871
- name: string;
872
- description: string;
873
- url: string;
874
- icon: string;
875
- banner: string | null;
876
- opportunityBannerLight: string | null;
877
- opportunityBannerDark: string | null;
878
- } | null;
879
- NativeAprRecords: ({
880
- RewardToken: {
855
+ MainProtocol: {
856
+ id: string;
857
+ tags: string[];
858
+ name: string;
859
+ description: string;
860
+ url: string;
861
+ icon: string;
862
+ banner: string | null;
863
+ opportunityBannerLight: string | null;
864
+ opportunityBannerDark: string | null;
865
+ } | null;
866
+ NativeAprRecords: ({
867
+ RewardToken: {
868
+ id: string;
869
+ name: string | null;
870
+ chainId: number;
871
+ address: string;
872
+ decimals: number;
873
+ symbol: string;
874
+ displaySymbol: string;
875
+ icon: string;
876
+ verified: boolean;
877
+ isTest: boolean;
878
+ type: import("@package/databases").TokenType;
879
+ isNative: boolean;
880
+ price: number | null;
881
+ updatedAt: number | null;
882
+ priceSource: string | null;
883
+ } | null;
884
+ } & {
885
+ id: string;
886
+ title: string;
887
+ description: string | null;
888
+ timestamp: bigint;
889
+ value: number;
890
+ amount: bigint | null;
891
+ rewardTokenId: string | null;
892
+ opportunityId: string;
893
+ })[];
894
+ Protocols: {
895
+ id: string;
896
+ tags: string[];
897
+ name: string;
898
+ description: string;
899
+ url: string;
900
+ icon: string;
901
+ banner: string | null;
902
+ opportunityBannerLight: string | null;
903
+ opportunityBannerDark: string | null;
904
+ }[];
905
+ Tokens: {
881
906
  id: string;
882
907
  name: string | null;
883
908
  chainId: number;
@@ -893,91 +918,57 @@ export declare class PayloadService {
893
918
  price: number | null;
894
919
  updatedAt: number | null;
895
920
  priceSource: string | null;
896
- } | null;
921
+ }[];
922
+ TvlRecords: ({
923
+ TvlBreakdown: {
924
+ identifier: string;
925
+ type: import("@package/databases").TvlType;
926
+ value: number;
927
+ }[];
928
+ } & {
929
+ id: string;
930
+ timestamp: bigint;
931
+ total: number;
932
+ opportunityId: string;
933
+ })[];
897
934
  } & {
898
935
  id: string;
899
- title: string;
900
- description: string | null;
901
- timestamp: bigint;
902
- value: number;
903
- amount: bigint | null;
904
- rewardTokenId: string | null;
905
- opportunityId: string;
906
- })[];
907
- Protocols: {
908
- id: string;
909
- tags: string[];
936
+ chainId: number;
937
+ type: string;
938
+ identifier: string;
910
939
  name: string;
911
940
  description: string;
912
- url: string;
913
- icon: string;
914
- banner: string | null;
915
- opportunityBannerLight: string | null;
916
- opportunityBannerDark: string | null;
917
- }[];
918
- Tokens: {
919
- id: string;
920
- name: string | null;
921
- chainId: number;
922
- address: string;
923
- decimals: number;
924
- symbol: string;
925
- displaySymbol: string;
926
- icon: string;
927
- verified: boolean;
928
- isTest: boolean;
929
- type: import("@package/databases").TokenType;
930
- isNative: boolean;
931
- price: number | null;
932
- updatedAt: number | null;
933
- priceSource: string | null;
934
- }[];
935
- TvlRecords: ({
936
- TvlBreakdown: {
941
+ howToSteps: string[];
942
+ depositUrl: string | null;
943
+ explorerAddress: string | null;
944
+ status: import("@package/databases").Status;
945
+ action: import("@package/databases").OpportunityAction;
946
+ mainProtocolId: string | null;
947
+ tvl: number;
948
+ apr: number;
949
+ nativeApr: number | null;
950
+ maxApr: number | null;
951
+ dailyRewards: number;
952
+ tags: string[];
953
+ lastCampaignCreatedAt: Date;
954
+ manualOverrides: import("@package/databases").OpportunityManualOverride[];
955
+ liveCampaigns: number;
956
+ });
957
+ tvl: {
958
+ breakdowns: ({
937
959
  identifier: string;
938
960
  type: import("@package/databases").TvlType;
939
961
  value: number;
940
- }[];
941
- } & {
942
- id: string;
962
+ } & {})[];
943
963
  timestamp: bigint;
944
964
  total: number;
945
- opportunityId: string;
946
- })[];
947
- } & {
948
- id: string;
949
- chainId: number;
950
- type: string;
951
- identifier: string;
952
- name: string;
953
- description: string;
954
- howToSteps: string[];
955
- depositUrl: string | null;
956
- explorerAddress: string | null;
957
- status: import("@package/databases").Status;
958
- action: import("@package/databases").OpportunityAction;
959
- mainProtocolId: string | null;
960
- tvl: number;
961
- apr: number;
962
- nativeApr: number | null;
963
- maxApr: number | null;
964
- dailyRewards: number;
965
- tags: string[];
966
- lastCampaignCreatedAt: Date;
967
- manualOverrides: import("@package/databases").OpportunityManualOverride[];
968
- liveCampaigns: number;
969
- });
970
- tvl: {
971
- breakdowns: ({
972
- identifier: string;
973
- type: import("@package/databases").TvlType;
974
- value: number;
975
- } & {})[];
976
- timestamp: bigint;
977
- total: number;
978
- } & {};
979
- name?: undefined;
980
- }>>;
965
+ } & {};
966
+ }>;
967
+ errors: {
968
+ campaignId: string;
969
+ error: string;
970
+ }[];
971
+ }>;
981
972
  static checkMinimumAmount(rewardToken: string, tokenAmount: bigint, numberOfHours: bigint, distributionChainId: ChainId): Promise<boolean>;
982
973
  static getMinimumAmount(rewardToken: string, distributionChainId: ChainId): Promise<bigint>;
983
974
  }