@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.
- package/dist/src/eden/index.d.ts +426 -435
- package/dist/src/index.d.ts +425 -434
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +4 -4
- package/dist/src/modules/v4/payload/payload.controller.d.ts +412 -421
- package/dist/src/modules/v4/payload/payload.controller.js.map +1 -1
- package/dist/src/modules/v4/payload/payload.service.d.ts +417 -426
- package/dist/src/modules/v4/payload/payload.service.js.map +1 -1
- package/dist/src/modules/v4/router.d.ts +425 -434
- package/dist/src/scripts/compare-engine-campaigns/campaign-loader.js.map +1 -1
- package/dist/src/scripts/compare-engine-campaigns/constants.d.ts +1 -0
- package/dist/src/scripts/compare-engine-campaigns/constants.js.map +1 -1
- package/dist/src/scripts/compare-engine-campaigns/diff-reporter.js.map +1 -1
- package/dist/src/scripts/compare-engine-campaigns/index.js.map +1 -1
- package/dist/src/scripts/compare-engine-campaigns/normalizer.d.ts +1 -1
- package/dist/src/scripts/compare-engine-campaigns/normalizer.js.map +1 -1
- package/dist/src/scripts/recompute-override.js.map +1 -1
- package/dist/src/utils/getAPR.d.ts +24 -24
- package/package.json +1 -1
|
@@ -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 {
|
|
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> |
|
|
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
|
-
})
|
|
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
|
-
} & {}
|
|
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
|
-
|
|
260
|
-
|
|
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<
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
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
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
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
|
-
|
|
584
|
-
|
|
585
|
-
|
|
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
|
-
|
|
602
|
+
} & {
|
|
603
|
+
id: string;
|
|
604
|
+
value: number;
|
|
605
|
+
timestamp: bigint;
|
|
609
606
|
campaignId: string;
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
startTimestamp: bigint;
|
|
613
|
-
};
|
|
607
|
+
dailyRewardsRecordId: string;
|
|
608
|
+
})[];
|
|
614
609
|
} & {
|
|
615
610
|
id: string;
|
|
616
|
-
value: number;
|
|
617
611
|
timestamp: bigint;
|
|
618
|
-
|
|
619
|
-
|
|
612
|
+
total: number;
|
|
613
|
+
opportunityId: string;
|
|
620
614
|
})[];
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
659
|
-
|
|
660
|
-
|
|
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
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
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
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
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
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
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
|
-
|
|
825
|
-
|
|
826
|
-
|
|
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
|
-
|
|
842
|
+
} & {
|
|
843
|
+
id: string;
|
|
844
|
+
value: number;
|
|
845
|
+
timestamp: bigint;
|
|
850
846
|
campaignId: string;
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
startTimestamp: bigint;
|
|
854
|
-
};
|
|
847
|
+
dailyRewardsRecordId: string;
|
|
848
|
+
})[];
|
|
855
849
|
} & {
|
|
856
850
|
id: string;
|
|
857
|
-
value: number;
|
|
858
851
|
timestamp: bigint;
|
|
859
|
-
|
|
860
|
-
|
|
852
|
+
total: number;
|
|
853
|
+
opportunityId: string;
|
|
861
854
|
})[];
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
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
|
-
}
|
|
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
|
-
|
|
900
|
-
|
|
901
|
-
|
|
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
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
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
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
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
|
}
|