@merkl/api 0.10.362 → 0.10.377
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/README.md +78 -14
- package/dist/database/api/.generated/edge.js +21 -6
- package/dist/database/api/.generated/index-browser.js +18 -3
- package/dist/database/api/.generated/index.d.ts +1746 -256
- package/dist/database/api/.generated/index.js +21 -6
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +12 -2
- package/dist/database/api/.generated/wasm.js +18 -3
- package/dist/src/eden/index.d.ts +1041 -140
- package/dist/src/entities/campaign.js +2 -1
- package/dist/src/entities/opportunity.js +169 -3
- package/dist/src/index.d.ts +340 -9
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +45 -54
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +3 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.d.ts +34 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.js +36 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +4 -1
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.js +76 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +8 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +63 -1
- package/dist/src/modules/v4/campaign/campaign.repository.js +15 -10
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +7 -4
- package/dist/src/modules/v4/computedValue/computedValue.controller.js +7 -5
- package/dist/src/modules/v4/computedValue/computedValue.model.js +12 -4
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +8 -5
- package/dist/src/modules/v4/computedValue/computedValue.repository.js +7 -3
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +7 -4
- package/dist/src/modules/v4/computedValue/computedValue.service.js +10 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +118 -0
- package/dist/src/modules/v4/creator/creator.controller.js +30 -0
- package/dist/src/modules/v4/creator/creator.model.d.ts +29 -0
- package/dist/src/modules/v4/creator/creator.model.js +18 -0
- package/dist/src/modules/v4/creator/creator.repository.d.ts +40 -0
- package/dist/src/modules/v4/creator/creator.repository.js +63 -0
- package/dist/src/modules/v4/creator/creator.service.d.ts +61 -0
- package/dist/src/modules/v4/creator/creator.service.js +44 -0
- package/dist/src/modules/v4/creator/index.d.ts +3 -0
- package/dist/src/modules/v4/creator/index.js +3 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +3 -4
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +6 -3
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +50 -9
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +171 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +14 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -1
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +185 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +41 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +151 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.js +45 -2
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.js +2 -2
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +30 -0
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +12 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +21 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.js +12 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +3 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +28 -2
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +2 -1
- package/dist/src/modules/v4/programPayload/programPayload.service.js +42 -2
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -1
- package/dist/src/modules/v4/reward/reward.repository.js +12 -1
- package/dist/src/modules/v4/reward/reward.service.js +5 -2
- package/dist/src/modules/v4/router.d.ts +340 -9
- package/dist/src/modules/v4/router.js +3 -1
- package/dist/src/modules/v4/user/user.controller.d.ts +28 -0
- package/dist/src/modules/v4/user/user.controller.js +5 -0
- package/dist/src/modules/v4/user/user.repository.d.ts +5 -0
- package/dist/src/modules/v4/user/user.service.d.ts +5 -0
- package/dist/src/utils/decodeCalls.js +7 -1
- package/dist/src/utils/encodeCalls.js +19 -1
- package/dist/src/utils/generateCardName.js +3 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +6 -2
@@ -13,8 +13,9 @@ export async function getCampaignsFor(chainIds, filters = { onlyLive: false }) {
|
|
13
13
|
prev[chain] = Object.keys(allData).reduce((acc, curr) => {
|
14
14
|
const [type, mainParameter] = curr.split("_");
|
15
15
|
const campaignType = Number.parseInt(type);
|
16
|
-
if (!filters?.types?.length || filters?.types?.includes(campaignType))
|
16
|
+
if (!filters?.types?.length || filters?.types?.includes(campaignType)) {
|
17
17
|
acc[`${campaignType}_${mainParameter}`] = allData[curr];
|
18
|
+
}
|
18
19
|
return acc;
|
19
20
|
}, {});
|
20
21
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { getHyperdriveMetadata } from "../modules/v4/opportunity/subservices/getHyperdriveMetadata.service";
|
1
2
|
import { AjnaSubCampaignType, BN2Number, Campaign, ChainId, CompFork, CompoundSubCampaignType, DolomiteSubCampaignType, EAprBreakdownType, EulerSubCampaignType, MorphoSubCampaignType, almName, ammName, } from "@sdk";
|
2
3
|
import { activeCampaign, getApr, getCampaignsFor, getDailyRewards, getRewardTokenIcons, getRewardTokens, getStatus, getTags, inactiveCampaign, removeTestTokens, } from "./campaign";
|
3
4
|
export const extractOpportunities = {
|
@@ -41,11 +42,11 @@ export const extractOpportunities = {
|
|
41
42
|
];
|
42
43
|
let platform = ammName(amm ?? params.amm);
|
43
44
|
let subCampaignTag = "";
|
44
|
-
if (platform === "BaseSwap" &&
|
45
|
+
if (platform === "BaseSwap" && computeChainId === ChainId.MODE)
|
45
46
|
platform = "SwapMode";
|
46
|
-
if (platform === "BaseSwap" &&
|
47
|
+
if (platform === "BaseSwap" && computeChainId === ChainId.ARBITRUM)
|
47
48
|
platform = "Arbidex";
|
48
|
-
if (platform === "BaseSwap" &&
|
49
|
+
if (platform === "BaseSwap" && computeChainId === ChainId.OPTIMISM)
|
49
50
|
platform = "SuperSwap";
|
50
51
|
const restrictedToForwarders = params.whitelist.flatMap(addr => {
|
51
52
|
const forwarders = campaigns.all.map(({ forwarders }) => forwarders?.find(({ almAddress, sender, owner }) => [almAddress, sender, owner].some(a => a?.toLowerCase() === addr?.toLowerCase())));
|
@@ -888,6 +889,171 @@ export const extractOpportunities = {
|
|
888
889
|
};
|
889
890
|
return opportunity;
|
890
891
|
},
|
892
|
+
[Campaign.ERC20_FIX_APR]: (campaign, campaigns, prices) => {
|
893
|
+
const { chainId, tvl, campaignParameters: params, typeInfo, computeChainId, mainParameter } = campaign;
|
894
|
+
const { active, all } = campaigns;
|
895
|
+
// DEPRECATED!!!!
|
896
|
+
const map = {
|
897
|
+
actions: {
|
898
|
+
pool: [
|
899
|
+
"uniswapv2",
|
900
|
+
"velodrome",
|
901
|
+
"aerodrome",
|
902
|
+
"balancerGauge",
|
903
|
+
"balancerPool",
|
904
|
+
"curve",
|
905
|
+
"aura",
|
906
|
+
"akron",
|
907
|
+
"beefy",
|
908
|
+
"dragonswap",
|
909
|
+
"poolside",
|
910
|
+
"koi",
|
911
|
+
"pancakeswap",
|
912
|
+
"tempest",
|
913
|
+
"cross_curve",
|
914
|
+
"zkswap",
|
915
|
+
"maverickBoostedPosition",
|
916
|
+
"zkSwapThreePool",
|
917
|
+
"syncswap",
|
918
|
+
"rfx",
|
919
|
+
],
|
920
|
+
borrow: ["radiant_borrow", "aave_borrowing", "euler_borrow", "zerolend_borrowing"],
|
921
|
+
lend: [
|
922
|
+
"gearbox",
|
923
|
+
"compound",
|
924
|
+
"radiant_lend",
|
925
|
+
"aave_lending",
|
926
|
+
"sturdy_aggregator",
|
927
|
+
"sturdy_silo",
|
928
|
+
"fraxlend",
|
929
|
+
"moonwell",
|
930
|
+
"ionic",
|
931
|
+
"fluid",
|
932
|
+
"silostaking",
|
933
|
+
"euler_lend",
|
934
|
+
"layerbank",
|
935
|
+
"zerolend_lending",
|
936
|
+
"venus",
|
937
|
+
"reactor_fusion",
|
938
|
+
"woofi",
|
939
|
+
],
|
940
|
+
},
|
941
|
+
icons: {
|
942
|
+
pool: () => {
|
943
|
+
if (["balancerGauge", "balancerPool"].includes(campaign.type ?? ""))
|
944
|
+
return Object.values(typeInfo.poolTokens ?? {})
|
945
|
+
.map(tkn => tkn?.symbol)
|
946
|
+
.filter(tkn => tkn);
|
947
|
+
if (["curve"].includes(campaign.type ?? ""))
|
948
|
+
return Object.values(typeInfo.poolTokens ?? {}).filter(tkn => tkn);
|
949
|
+
if (["rfx"].includes(campaign.type ?? "")) {
|
950
|
+
return [typeInfo.symbolShortToken, typeInfo.symbolLongToken];
|
951
|
+
}
|
952
|
+
if (["maverickBoostedPosition"].includes(campaign.type ?? "")) {
|
953
|
+
return [typeInfo.symbolTokenA, typeInfo.symbolTokenB];
|
954
|
+
}
|
955
|
+
return [typeInfo.symbolToken0, typeInfo.symbolToken1];
|
956
|
+
},
|
957
|
+
lend: () => (campaign.type === "compound" ? [typeInfo.symbolBaseToken] : [typeInfo.symbolUnderlyingToken]),
|
958
|
+
borrow: () => [typeInfo.symbolUnderlyingToken],
|
959
|
+
hold: () => {
|
960
|
+
if (["toros", "enzyme"].includes(campaign.type))
|
961
|
+
return [typeInfo.symbolUnderlyingToken];
|
962
|
+
return [campaign.campaignParameters.symbolTargetToken];
|
963
|
+
},
|
964
|
+
},
|
965
|
+
};
|
966
|
+
const action = Object.entries(map.actions).find(([_action, _types]) => _types.includes(campaign.type ?? ""))?.[0] ?? "hold";
|
967
|
+
const icons = map.icons[action]();
|
968
|
+
const opportunity = {
|
969
|
+
id: `${Campaign.ERC20}_${mainParameter}`,
|
970
|
+
platform: params.symbolTargetToken,
|
971
|
+
name: typeInfo?.cardName,
|
972
|
+
chainId: !computeChainId ? chainId : computeChainId,
|
973
|
+
distributionChainId: chainId,
|
974
|
+
tvl,
|
975
|
+
action,
|
976
|
+
apr: getApr(active),
|
977
|
+
status: getStatus(all),
|
978
|
+
tags: getTags(campaigns.all),
|
979
|
+
dailyrewards: getDailyRewards(active, prices),
|
980
|
+
tokenIcons: icons,
|
981
|
+
campaigns: { ...campaigns, type: Campaign.ERC20, ids: campaigns.all.map(c => c.campaignId) },
|
982
|
+
rewardTokenIcons: getRewardTokenIcons(campaigns.active),
|
983
|
+
dailyRewardTokens: getRewardTokens(campaigns.active),
|
984
|
+
};
|
985
|
+
return opportunity;
|
986
|
+
},
|
987
|
+
[Campaign.HYPERDRIVELOGFIXPROCESSOR]: (campaign, campaigns, prices) => {
|
988
|
+
const { chainId, tvl, campaignSubType, campaignParameters: params, computeChainId } = campaign;
|
989
|
+
const { active, all } = campaigns;
|
990
|
+
const metadata = getHyperdriveMetadata(chainId, campaign.campaignSubType, campaign.campaignParameters);
|
991
|
+
const aprBreakdown = active.reduce((res, campaign) => {
|
992
|
+
res[`Campaign ${campaign.campaignId.slice(0, 8)}`] = {
|
993
|
+
value: campaign.apr ?? 0,
|
994
|
+
address: campaign.campaignId,
|
995
|
+
type: EAprBreakdownType.DETAILS,
|
996
|
+
};
|
997
|
+
return res;
|
998
|
+
}, {});
|
999
|
+
const aprBreakdown2 = getCampaignsApr(active);
|
1000
|
+
const opportunity = {
|
1001
|
+
id: `${Campaign.HYPERDRIVELOGFIXPROCESSOR}_${campaign.mainParameter}`,
|
1002
|
+
platform: "Hyperdrive",
|
1003
|
+
name: metadata.name,
|
1004
|
+
chainId: !computeChainId ? chainId : computeChainId,
|
1005
|
+
distributionChainId: chainId,
|
1006
|
+
tvl,
|
1007
|
+
action: metadata.action?.toLowerCase(),
|
1008
|
+
subtype: campaignSubType,
|
1009
|
+
status: getStatus(all),
|
1010
|
+
tags: getTags(campaigns.all),
|
1011
|
+
dailyrewards: getDailyRewards(active, prices),
|
1012
|
+
tokenIcons: [params.symbolTargetToken],
|
1013
|
+
campaigns: { ...campaigns, type: Campaign.HYPERDRIVELOGFIXPROCESSOR, ids: campaigns.all.map(c => c.campaignId) },
|
1014
|
+
rewardTokenIcons: getRewardTokenIcons(campaigns.active),
|
1015
|
+
dailyRewardTokens: getRewardTokens(campaigns.active),
|
1016
|
+
apr: getApr(active),
|
1017
|
+
aprBreakdown,
|
1018
|
+
aprBreakdown2,
|
1019
|
+
};
|
1020
|
+
return opportunity;
|
1021
|
+
},
|
1022
|
+
[Campaign.HYPERDRIVELOGPROCESSOR]: (campaign, campaigns, prices) => {
|
1023
|
+
const { chainId, tvl, campaignSubType, campaignParameters: params, computeChainId } = campaign;
|
1024
|
+
const { active, all } = campaigns;
|
1025
|
+
const metadata = getHyperdriveMetadata(chainId, campaign.campaignSubType, campaign.campaignParameters);
|
1026
|
+
const aprBreakdown = active.reduce((res, campaign) => {
|
1027
|
+
res[`Campaign ${campaign.campaignId.slice(0, 8)}`] = {
|
1028
|
+
value: campaign.apr ?? 0,
|
1029
|
+
address: campaign.campaignId,
|
1030
|
+
type: EAprBreakdownType.DETAILS,
|
1031
|
+
};
|
1032
|
+
return res;
|
1033
|
+
}, {});
|
1034
|
+
const aprBreakdown2 = getCampaignsApr(active);
|
1035
|
+
const opportunity = {
|
1036
|
+
id: `${Campaign.HYPERDRIVELOGPROCESSOR}_${campaign.mainParameter}`,
|
1037
|
+
platform: "Hyperdrive",
|
1038
|
+
name: metadata.name,
|
1039
|
+
chainId: !computeChainId ? chainId : computeChainId,
|
1040
|
+
distributionChainId: chainId,
|
1041
|
+
tvl,
|
1042
|
+
action: metadata.action?.toLowerCase(),
|
1043
|
+
subtype: campaignSubType,
|
1044
|
+
status: getStatus(all),
|
1045
|
+
tags: getTags(campaigns.all),
|
1046
|
+
dailyrewards: getDailyRewards(active, prices),
|
1047
|
+
tokenIcons: [params.symbolTargetToken],
|
1048
|
+
campaigns: { ...campaigns, type: Campaign.HYPERDRIVELOGPROCESSOR, ids: campaigns.all.map(c => c.campaignId) },
|
1049
|
+
rewardTokenIcons: getRewardTokenIcons(campaigns.active),
|
1050
|
+
dailyRewardTokens: getRewardTokens(campaigns.active),
|
1051
|
+
apr: getApr(active),
|
1052
|
+
aprBreakdown,
|
1053
|
+
aprBreakdown2,
|
1054
|
+
};
|
1055
|
+
return opportunity;
|
1056
|
+
},
|
891
1057
|
};
|
892
1058
|
/**
|
893
1059
|
* @returns the opportunities map with their corresponding campaign's data added
|
package/dist/src/index.d.ts
CHANGED
@@ -160,7 +160,7 @@ declare const app: Elysia<"", false, {
|
|
160
160
|
status: "NONE" | "PAST" | "LIVE" | "SOON";
|
161
161
|
identifier: string;
|
162
162
|
chainId: number;
|
163
|
-
action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "
|
163
|
+
action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT";
|
164
164
|
};
|
165
165
|
params: {};
|
166
166
|
query: unknown;
|
@@ -485,6 +485,176 @@ declare const app: Elysia<"", false, {
|
|
485
485
|
};
|
486
486
|
};
|
487
487
|
};
|
488
|
+
} & {
|
489
|
+
opportunities: {
|
490
|
+
campaigns: {
|
491
|
+
get: {
|
492
|
+
body: unknown;
|
493
|
+
params: {};
|
494
|
+
query: {
|
495
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | "ERC20_FIX_APR" | "HYPERDRIVELOGPROCESSOR" | "HYPERDRIVELOGFIXPROCESSOR" | undefined;
|
496
|
+
items?: number | undefined;
|
497
|
+
subType?: number | undefined;
|
498
|
+
page?: number | undefined;
|
499
|
+
chainId?: number | undefined;
|
500
|
+
startTimestamp?: string | undefined;
|
501
|
+
endTimestamp?: string | undefined;
|
502
|
+
tokenAddress?: string | undefined;
|
503
|
+
mainParameter?: string | undefined;
|
504
|
+
campaignId?: string | undefined;
|
505
|
+
opportunityId?: string | undefined;
|
506
|
+
creatorId?: string | undefined;
|
507
|
+
test?: boolean | undefined;
|
508
|
+
creatorTag?: string | undefined;
|
509
|
+
tokenSymbol?: string | undefined;
|
510
|
+
};
|
511
|
+
headers: unknown;
|
512
|
+
response: {
|
513
|
+
200: ({
|
514
|
+
protocol?: {
|
515
|
+
name: string;
|
516
|
+
url: string;
|
517
|
+
description: string;
|
518
|
+
id: string;
|
519
|
+
tags: string[];
|
520
|
+
icon: string;
|
521
|
+
} | null | undefined;
|
522
|
+
depositUrl?: string | undefined;
|
523
|
+
aprRecord?: {
|
524
|
+
timestamp: string | bigint;
|
525
|
+
cumulated: number;
|
526
|
+
breakdowns: {
|
527
|
+
type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
|
528
|
+
id: number;
|
529
|
+
identifier: string;
|
530
|
+
value: number;
|
531
|
+
aprRecordId: string;
|
532
|
+
}[];
|
533
|
+
} | undefined;
|
534
|
+
tvlRecord?: {
|
535
|
+
total: number;
|
536
|
+
timestamp: string | bigint;
|
537
|
+
breakdowns: {
|
538
|
+
type: "TOKEN" | "PROTOCOL";
|
539
|
+
id: number;
|
540
|
+
identifier: string;
|
541
|
+
value: number;
|
542
|
+
tvlRecordId: string;
|
543
|
+
}[];
|
544
|
+
} | undefined;
|
545
|
+
rewardsRecord?: {
|
546
|
+
total: number;
|
547
|
+
id: string;
|
548
|
+
timestamp: string | bigint;
|
549
|
+
breakdowns: {
|
550
|
+
token: {
|
551
|
+
price?: number | null | undefined;
|
552
|
+
symbol: string;
|
553
|
+
name: string | null;
|
554
|
+
id: string;
|
555
|
+
icon: string;
|
556
|
+
chainId: number;
|
557
|
+
address: string;
|
558
|
+
decimals: number;
|
559
|
+
verified: boolean;
|
560
|
+
isTest: boolean;
|
561
|
+
};
|
562
|
+
id: number;
|
563
|
+
value: number;
|
564
|
+
campaignId: string;
|
565
|
+
amount: string | bigint;
|
566
|
+
dailyRewardsRecordId: string;
|
567
|
+
}[];
|
568
|
+
} | undefined;
|
569
|
+
name: string;
|
570
|
+
type: string;
|
571
|
+
tokens: {
|
572
|
+
price?: number | null | undefined;
|
573
|
+
symbol: string;
|
574
|
+
name: string | null;
|
575
|
+
id: string;
|
576
|
+
icon: string;
|
577
|
+
chainId: number;
|
578
|
+
address: string;
|
579
|
+
decimals: number;
|
580
|
+
verified: boolean;
|
581
|
+
isTest: boolean;
|
582
|
+
}[];
|
583
|
+
id: string;
|
584
|
+
status: string;
|
585
|
+
tags: string[];
|
586
|
+
identifier: string;
|
587
|
+
chain: {
|
588
|
+
name: string;
|
589
|
+
id: number;
|
590
|
+
icon: string;
|
591
|
+
};
|
592
|
+
chainId: number;
|
593
|
+
action: string;
|
594
|
+
tvl: number;
|
595
|
+
apr: number;
|
596
|
+
dailyRewards: number;
|
597
|
+
} & {
|
598
|
+
campaigns: {
|
599
|
+
params: any;
|
600
|
+
chain: {
|
601
|
+
name: string;
|
602
|
+
id: number;
|
603
|
+
icon: string;
|
604
|
+
};
|
605
|
+
rewardToken: {
|
606
|
+
symbol: string;
|
607
|
+
name: string | null;
|
608
|
+
id: string;
|
609
|
+
icon: string;
|
610
|
+
chainId: number;
|
611
|
+
address: string;
|
612
|
+
decimals: number;
|
613
|
+
verified: boolean;
|
614
|
+
isTest: boolean;
|
615
|
+
} & {
|
616
|
+
price?: number | null | undefined;
|
617
|
+
};
|
618
|
+
distributionChain: {
|
619
|
+
name: string;
|
620
|
+
id: number;
|
621
|
+
icon: string;
|
622
|
+
} | undefined;
|
623
|
+
campaignStatus: {
|
624
|
+
error: string;
|
625
|
+
details: import("database/api/.generated/runtime/library").JsonValue;
|
626
|
+
status: import("../database/api/.generated").$Enums.RunStatus;
|
627
|
+
campaignId: string;
|
628
|
+
computedUntil: bigint;
|
629
|
+
processingStarted: bigint;
|
630
|
+
};
|
631
|
+
type: import("../database/api/.generated").$Enums.CampaignType;
|
632
|
+
id: string;
|
633
|
+
subType: number | null;
|
634
|
+
startTimestamp: bigint;
|
635
|
+
endTimestamp: bigint;
|
636
|
+
computeChainId: number;
|
637
|
+
distributionChainId: number;
|
638
|
+
campaignId: string;
|
639
|
+
rewardTokenId: string;
|
640
|
+
amount: string;
|
641
|
+
opportunityId: string;
|
642
|
+
creatorAddress: string;
|
643
|
+
}[];
|
644
|
+
})[];
|
645
|
+
readonly 404: {
|
646
|
+
message: string;
|
647
|
+
name: string;
|
648
|
+
};
|
649
|
+
readonly 500: {
|
650
|
+
code: string;
|
651
|
+
info: string;
|
652
|
+
httpCode: number;
|
653
|
+
};
|
654
|
+
};
|
655
|
+
};
|
656
|
+
};
|
657
|
+
};
|
488
658
|
} & {
|
489
659
|
opportunities: {
|
490
660
|
":id": {
|
@@ -901,6 +1071,7 @@ declare const app: Elysia<"", false, {
|
|
901
1071
|
mainParameter?: string | undefined;
|
902
1072
|
campaignId?: string | undefined;
|
903
1073
|
opportunityId?: string | undefined;
|
1074
|
+
creatorId?: string | undefined;
|
904
1075
|
test?: boolean | undefined;
|
905
1076
|
creatorTag?: string | undefined;
|
906
1077
|
tokenSymbol?: string | undefined;
|
@@ -973,6 +1144,7 @@ declare const app: Elysia<"", false, {
|
|
973
1144
|
mainParameter?: string | undefined;
|
974
1145
|
campaignId?: string | undefined;
|
975
1146
|
opportunityId?: string | undefined;
|
1147
|
+
creatorId?: string | undefined;
|
976
1148
|
test?: boolean | undefined;
|
977
1149
|
creatorTag?: string | undefined;
|
978
1150
|
tokenSymbol?: string | undefined;
|
@@ -1112,6 +1284,7 @@ declare const app: Elysia<"", false, {
|
|
1112
1284
|
":id": {
|
1113
1285
|
patch: {
|
1114
1286
|
body: {
|
1287
|
+
name?: string | undefined;
|
1115
1288
|
url?: string | undefined;
|
1116
1289
|
description?: string | undefined;
|
1117
1290
|
icon?: string | undefined;
|
@@ -2100,6 +2273,7 @@ declare const app: Elysia<"", false, {
|
|
2100
2273
|
200: {
|
2101
2274
|
tags: string[];
|
2102
2275
|
address: string;
|
2276
|
+
creatorId: string | null;
|
2103
2277
|
}[];
|
2104
2278
|
};
|
2105
2279
|
};
|
@@ -2119,6 +2293,7 @@ declare const app: Elysia<"", false, {
|
|
2119
2293
|
200: {
|
2120
2294
|
tags: string[];
|
2121
2295
|
address: string;
|
2296
|
+
creatorId: string | null;
|
2122
2297
|
}[];
|
2123
2298
|
};
|
2124
2299
|
};
|
@@ -2138,11 +2313,35 @@ declare const app: Elysia<"", false, {
|
|
2138
2313
|
200: {
|
2139
2314
|
tags: string[];
|
2140
2315
|
address: string;
|
2316
|
+
creatorId: string | null;
|
2141
2317
|
} | null;
|
2142
2318
|
};
|
2143
2319
|
};
|
2144
2320
|
};
|
2145
2321
|
};
|
2322
|
+
} & {
|
2323
|
+
users: {
|
2324
|
+
":address": {
|
2325
|
+
creator: {
|
2326
|
+
get: {
|
2327
|
+
body: unknown;
|
2328
|
+
params: {
|
2329
|
+
address: string;
|
2330
|
+
};
|
2331
|
+
query: unknown;
|
2332
|
+
headers: unknown;
|
2333
|
+
response: {
|
2334
|
+
200: {
|
2335
|
+
name: string;
|
2336
|
+
id: string;
|
2337
|
+
addresses: string[];
|
2338
|
+
icon?: string | undefined;
|
2339
|
+
} | null;
|
2340
|
+
};
|
2341
|
+
};
|
2342
|
+
};
|
2343
|
+
};
|
2344
|
+
};
|
2146
2345
|
} & {
|
2147
2346
|
users: {
|
2148
2347
|
":address": {
|
@@ -2394,6 +2593,7 @@ declare const app: Elysia<"", false, {
|
|
2394
2593
|
200: {
|
2395
2594
|
tags: string[];
|
2396
2595
|
address: string;
|
2596
|
+
creatorId: string | null;
|
2397
2597
|
};
|
2398
2598
|
};
|
2399
2599
|
};
|
@@ -2434,6 +2634,7 @@ declare const app: Elysia<"", false, {
|
|
2434
2634
|
200: {
|
2435
2635
|
tags: string[];
|
2436
2636
|
address: string;
|
2637
|
+
creatorId: string | null;
|
2437
2638
|
};
|
2438
2639
|
};
|
2439
2640
|
};
|
@@ -2832,8 +3033,7 @@ declare const app: Elysia<"", false, {
|
|
2832
3033
|
authorization: string;
|
2833
3034
|
};
|
2834
3035
|
response: {
|
2835
|
-
|
2836
|
-
200: any;
|
3036
|
+
200: any[];
|
2837
3037
|
};
|
2838
3038
|
};
|
2839
3039
|
};
|
@@ -2856,6 +3056,7 @@ declare const app: Elysia<"", false, {
|
|
2856
3056
|
mainParameter?: string | undefined;
|
2857
3057
|
campaignId?: string | undefined;
|
2858
3058
|
opportunityId?: string | undefined;
|
3059
|
+
creatorId?: string | undefined;
|
2859
3060
|
test?: boolean | undefined;
|
2860
3061
|
creatorTag?: string | undefined;
|
2861
3062
|
tokenSymbol?: string | undefined;
|
@@ -2864,8 +3065,7 @@ declare const app: Elysia<"", false, {
|
|
2864
3065
|
authorization: string;
|
2865
3066
|
};
|
2866
3067
|
response: {
|
2867
|
-
|
2868
|
-
200: any;
|
3068
|
+
200: any[];
|
2869
3069
|
};
|
2870
3070
|
};
|
2871
3071
|
};
|
@@ -3285,6 +3485,36 @@ declare const app: Elysia<"", false, {
|
|
3285
3485
|
};
|
3286
3486
|
};
|
3287
3487
|
};
|
3488
|
+
} & {
|
3489
|
+
"program-payload": {
|
3490
|
+
parse: {
|
3491
|
+
"from-campaign-data": {
|
3492
|
+
post: {
|
3493
|
+
body: {
|
3494
|
+
chainId: number;
|
3495
|
+
startTimestamp: number;
|
3496
|
+
endTimestamp: number;
|
3497
|
+
computeChainId: number;
|
3498
|
+
amount: string;
|
3499
|
+
rewardToken: string;
|
3500
|
+
campaignType: number;
|
3501
|
+
campaignData: string;
|
3502
|
+
symbolRewardToken: string;
|
3503
|
+
decimalsRewardToken: number;
|
3504
|
+
};
|
3505
|
+
params: {};
|
3506
|
+
query: unknown;
|
3507
|
+
headers: {
|
3508
|
+
authorization: string;
|
3509
|
+
};
|
3510
|
+
response: {
|
3511
|
+
[x: string]: any;
|
3512
|
+
200: any;
|
3513
|
+
};
|
3514
|
+
};
|
3515
|
+
};
|
3516
|
+
};
|
3517
|
+
};
|
3288
3518
|
};
|
3289
3519
|
} & {
|
3290
3520
|
v4: {
|
@@ -3343,8 +3573,9 @@ declare const app: Elysia<"", false, {
|
|
3343
3573
|
headers: unknown;
|
3344
3574
|
response: {
|
3345
3575
|
200: {
|
3346
|
-
|
3347
|
-
|
3576
|
+
averageBoost: number | null;
|
3577
|
+
totalDistributedInUSD: number | null;
|
3578
|
+
forfeitingBoost: number | null;
|
3348
3579
|
} | null;
|
3349
3580
|
};
|
3350
3581
|
};
|
@@ -3367,8 +3598,10 @@ declare const app: Elysia<"", false, {
|
|
3367
3598
|
headers: unknown;
|
3368
3599
|
response: {
|
3369
3600
|
200: {
|
3370
|
-
|
3371
|
-
|
3601
|
+
reason: string;
|
3602
|
+
id: number;
|
3603
|
+
campaignId: string;
|
3604
|
+
boost: number | null;
|
3372
3605
|
}[];
|
3373
3606
|
};
|
3374
3607
|
};
|
@@ -3423,6 +3656,104 @@ declare const app: Elysia<"", false, {
|
|
3423
3656
|
};
|
3424
3657
|
};
|
3425
3658
|
};
|
3659
|
+
} & {
|
3660
|
+
v4: {
|
3661
|
+
creators: {
|
3662
|
+
index: {
|
3663
|
+
get: {
|
3664
|
+
body: unknown;
|
3665
|
+
params: {};
|
3666
|
+
query: {
|
3667
|
+
items?: number | undefined;
|
3668
|
+
page?: number | undefined;
|
3669
|
+
address?: string | undefined;
|
3670
|
+
};
|
3671
|
+
headers: unknown;
|
3672
|
+
response: {
|
3673
|
+
200: ({
|
3674
|
+
name: string;
|
3675
|
+
id: string;
|
3676
|
+
addresses: string[];
|
3677
|
+
} & {
|
3678
|
+
icon?: string | undefined;
|
3679
|
+
})[];
|
3680
|
+
};
|
3681
|
+
};
|
3682
|
+
};
|
3683
|
+
};
|
3684
|
+
} & {
|
3685
|
+
creators: {
|
3686
|
+
":id": {
|
3687
|
+
get: {
|
3688
|
+
body: unknown;
|
3689
|
+
params: {
|
3690
|
+
id: string;
|
3691
|
+
};
|
3692
|
+
query: unknown;
|
3693
|
+
headers: unknown;
|
3694
|
+
response: {
|
3695
|
+
200: {
|
3696
|
+
name: string;
|
3697
|
+
id: string;
|
3698
|
+
addresses: string[];
|
3699
|
+
icon?: string | undefined;
|
3700
|
+
};
|
3701
|
+
};
|
3702
|
+
};
|
3703
|
+
};
|
3704
|
+
};
|
3705
|
+
} & {
|
3706
|
+
creators: {
|
3707
|
+
index: {
|
3708
|
+
post: {
|
3709
|
+
body: {
|
3710
|
+
icon?: string | undefined;
|
3711
|
+
name: string;
|
3712
|
+
id: string;
|
3713
|
+
addresses: string[];
|
3714
|
+
};
|
3715
|
+
params: {};
|
3716
|
+
query: unknown;
|
3717
|
+
headers: {
|
3718
|
+
authorization: string;
|
3719
|
+
};
|
3720
|
+
response: {
|
3721
|
+
200: {
|
3722
|
+
name: string;
|
3723
|
+
id: string;
|
3724
|
+
icon: string | null;
|
3725
|
+
};
|
3726
|
+
};
|
3727
|
+
};
|
3728
|
+
};
|
3729
|
+
};
|
3730
|
+
} & {
|
3731
|
+
creators: {
|
3732
|
+
":id": {
|
3733
|
+
patch: {
|
3734
|
+
body: {
|
3735
|
+
icon?: string | undefined;
|
3736
|
+
name: string;
|
3737
|
+
addresses: string[];
|
3738
|
+
};
|
3739
|
+
params: {
|
3740
|
+
id: string;
|
3741
|
+
};
|
3742
|
+
query: unknown;
|
3743
|
+
headers: {
|
3744
|
+
authorization: string;
|
3745
|
+
};
|
3746
|
+
response: {
|
3747
|
+
200: {
|
3748
|
+
name: string;
|
3749
|
+
id: string;
|
3750
|
+
icon: string | null;
|
3751
|
+
};
|
3752
|
+
};
|
3753
|
+
};
|
3754
|
+
};
|
3755
|
+
};
|
3756
|
+
};
|
3426
3757
|
} & {
|
3427
3758
|
v3: {
|
3428
3759
|
app: {
|