@merkl/api 0.18.9 → 0.18.10

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.
Files changed (100) hide show
  1. package/dist/src/backgroundJobs/index.js +1 -1
  2. package/dist/src/backgroundJobs/jobs/campaignsCacheUpdater.js +1 -1
  3. package/dist/src/eden/index.d.ts +521 -518
  4. package/dist/src/factories/opportunityMetadata/implementations/Clamm.js +1 -1
  5. package/dist/src/index.d.ts +111 -110
  6. package/dist/src/index.js +1 -1
  7. package/dist/src/jobs/etl/pendings.js +1 -1
  8. package/dist/src/jobs/etl/reward-breakdowns.js +1 -1
  9. package/dist/src/jobs/etl/rewards.js +1 -1
  10. package/dist/src/jobs/etl/update-euler-vaults.js +1 -1
  11. package/dist/src/libs/campaigns/campaignTypes/EventBasedDynamicData.js +1 -1
  12. package/dist/src/libs/campaigns/campaignTypes/RadiantDynamicData.js +1 -1
  13. package/dist/src/libs/campaigns/campaignTypes/UniswapV4DynamicData.js +1 -1
  14. package/dist/src/libs/campaigns/utils/getEulerV2Vaults.js +1 -1
  15. package/dist/src/libs/campaigns/utils/getUniswapV4Pools.js +1 -1
  16. package/dist/src/libs/getTokensList.d.ts +3 -0
  17. package/dist/src/libs/positions/erc20/index.js +1 -0
  18. package/dist/src/libs/staticCampaigns.js +1 -1
  19. package/dist/src/modules/v4/accounting/accounting.controller.d.ts +6 -6
  20. package/dist/src/modules/v4/accounting/accounting.repository.d.ts +16 -16
  21. package/dist/src/modules/v4/accounting/accounting.repository.js +1 -1
  22. package/dist/src/modules/v4/accounting/accounting.service.d.ts +2 -2
  23. package/dist/src/modules/v4/blacklist/blacklist.repository.js +1 -1
  24. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +20 -20
  25. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +29 -29
  26. package/dist/src/modules/v4/campaign/campaign.repository.js +1 -1
  27. package/dist/src/modules/v4/campaign/campaign.service.d.ts +26 -26
  28. package/dist/src/modules/v4/chain/chain.repository.js +1 -1
  29. package/dist/src/modules/v4/computedValue/computedValue.repository.js +1 -1
  30. package/dist/src/modules/v4/creator/creator.repository.js +1 -1
  31. package/dist/src/modules/v4/enso/enso.service.d.ts +2 -2
  32. package/dist/src/modules/v4/explorer/explorer.repository.js +1 -1
  33. package/dist/src/modules/v4/liquidity/liquidity.controller.d.ts +1 -1
  34. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +3 -3
  35. package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +3 -3
  36. package/dist/src/modules/v4/merklRoot/merklRoot.repository.js +1 -1
  37. package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +3 -3
  38. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +34 -34
  39. package/dist/src/modules/v4/opportunity/opportunity.converter.js +1 -1
  40. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +1 -1
  41. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +57 -57
  42. package/dist/src/modules/v4/opportunity/opportunity.repository.js +1 -1
  43. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +35 -35
  44. package/dist/src/modules/v4/price/price.repository.js +1 -1
  45. package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +11 -11
  46. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +3 -3
  47. package/dist/src/modules/v4/protocol/protocol.repository.js +1 -1
  48. package/dist/src/modules/v4/referral/referral.controller.d.ts +1 -1
  49. package/dist/src/modules/v4/reward/reward.controller.d.ts +6 -6
  50. package/dist/src/modules/v4/reward/reward.repository.d.ts +3 -3
  51. package/dist/src/modules/v4/reward/reward.repository.js +1 -1
  52. package/dist/src/modules/v4/reward/reward.service.d.ts +17 -17
  53. package/dist/src/modules/v4/router.d.ts +102 -102
  54. package/dist/src/modules/v4/status/status.controller.d.ts +2 -2
  55. package/dist/src/modules/v4/status/status.repository.d.ts +2 -2
  56. package/dist/src/modules/v4/status/status.repository.js +1 -1
  57. package/dist/src/modules/v4/status/status.service.d.ts +2 -2
  58. package/dist/src/modules/v4/token/token.controller.d.ts +12 -12
  59. package/dist/src/modules/v4/token/token.repository.d.ts +4 -9
  60. package/dist/src/modules/v4/token/token.repository.js +3 -9
  61. package/dist/src/modules/v4/token/token.service.d.ts +10 -10
  62. package/dist/src/modules/v4/token/token.service.js +1 -1
  63. package/dist/src/modules/v4/user/user.controller.d.ts +6 -6
  64. package/dist/src/modules/v4/user/user.repository.js +1 -1
  65. package/dist/src/modules/v4/user/user.service.js +1 -1
  66. package/dist/src/routes/v3/campaign/delay.js +1 -1
  67. package/dist/src/routes/v3/campaignClaims.d.ts +1 -1
  68. package/dist/src/routes/v3/campaignClaims.js +1 -1
  69. package/dist/src/routes/v3/campaigns.d.ts +3 -2
  70. package/dist/src/routes/v3/campaigns.js +21 -59
  71. package/dist/src/routes/v3/multiChainPositions.js +1 -0
  72. package/dist/src/routes/v3/opportunity.d.ts +1 -1
  73. package/dist/src/routes/v3/parse.d.ts +1 -1
  74. package/dist/src/routes/v3/positions.js +1 -0
  75. package/dist/src/routes/v3/recipients.d.ts +1 -1
  76. package/dist/src/routes/v3/rewardsReport.d.ts +1 -1
  77. package/dist/src/routes/v3/router.d.ts +9 -8
  78. package/dist/src/routes/v3/token.d.ts +1 -1
  79. package/dist/src/utils/execute.d.ts +3 -13
  80. package/dist/src/utils/execute.js +77 -1
  81. package/dist/src/utils/generic.d.ts +1 -18
  82. package/dist/src/utils/generic.js +2 -76
  83. package/dist/src/utils/hashArray.d.ts +1 -0
  84. package/dist/src/utils/hashArray.js +4 -1
  85. package/dist/src/utils/queries/allCampaigns.d.ts +0 -4
  86. package/dist/src/utils/queries/allCampaigns.js +0 -39
  87. package/dist/tsconfig.package.tsbuildinfo +1 -1
  88. package/package.json +1 -1
  89. package/dist/src/utils/addString.d.ts +0 -2
  90. package/dist/src/utils/addString.js +0 -6
  91. package/dist/src/utils/crypto.d.ts +0 -1
  92. package/dist/src/utils/crypto.js +0 -4
  93. package/dist/src/utils/queries/activeCampaigns.d.ts +0 -3
  94. package/dist/src/utils/queries/activeCampaigns.js +0 -22
  95. package/dist/src/utils/validation.d.ts +0 -5
  96. package/dist/src/utils/validation.js +0 -20
  97. /package/dist/{src/utils/prisma.d.ts → database/index.d.ts} +0 -0
  98. /package/dist/{src/utils/prisma.js → database/index.js} +0 -0
  99. /package/dist/src/utils/{camelToKebabCase.d.ts → caseChanges.d.ts} +0 -0
  100. /package/dist/src/utils/{camelToKebabCase.js → caseChanges.js} +0 -0
package/dist/src/index.js CHANGED
@@ -2,6 +2,7 @@ import { cors } from "@elysiajs/cors";
2
2
  import { swagger } from "@elysiajs/swagger";
3
3
  import axios from "axios";
4
4
  import { Elysia } from "elysia";
5
+ import { apiDbClient, engineDbClient } from "../database";
5
6
  import { redisClient } from "./cache/redis";
6
7
  import { v4 } from "./modules/v4/router";
7
8
  import { v1 } from "./routes/v1/router";
@@ -9,7 +10,6 @@ import { v2 } from "./routes/v2/router";
9
10
  import { v3 } from "./routes/v3/router";
10
11
  import { errorHandler } from "./utils/error";
11
12
  import { log } from "./utils/logger";
12
- import { apiDbClient, engineDbClient } from "./utils/prisma";
13
13
  // Axios with bun workaround
14
14
  axios.defaults.headers.common["Accept-Encoding"] = "gzip";
15
15
  const PORT = process.env.PORT || 3000;
@@ -2,7 +2,7 @@
2
2
  if (!process.env.ENV || !process.env.FILENAME)
3
3
  throw new Error("[ENV]: missing variable");
4
4
  import { log } from "@/utils/logger";
5
- import { apiDbClient } from "@/utils/prisma";
5
+ import { apiDbClient } from "@db";
6
6
  import { NETWORK_LABELS, withRetry } from "@sdk";
7
7
  import { S3Client } from "bun";
8
8
  import moment from "moment";
@@ -3,7 +3,7 @@ if (!process.env.DATABASE_API_URL || !process.env.ENV || !process.env.CHAIN_ID |
3
3
  throw new Error("[ENV]: missing variable");
4
4
  import { BucketService } from "@/modules/v4/bucket/bucket.service";
5
5
  import { log } from "@/utils/logger";
6
- import { apiDbClient } from "@/utils/prisma";
6
+ import { apiDbClient } from "@db";
7
7
  import { S3Client } from "bun";
8
8
  import moment from "moment";
9
9
  // ─── Global Variables ────────────────────────────────────────
@@ -2,7 +2,7 @@
2
2
  if (!process.env.ENV || !process.env.CHAIN_ID || !process.env.ROOT)
3
3
  throw new Error("[ENV]: missing variable");
4
4
  import { log } from "@/utils/logger";
5
- import { apiDbClient } from "@/utils/prisma";
5
+ import { apiDbClient } from "@db";
6
6
  import { withRetry } from "@sdk";
7
7
  import { S3Client } from "bun";
8
8
  import moment from "moment";
@@ -3,7 +3,7 @@ import { fetchEulerVaultName } from "@/libs/campaigns/campaignTypes/ERC20SubType
3
3
  import { LoggedEntityType, getEulerV2Vaults } from "@/libs/campaigns/utils/getEulerV2Vaults";
4
4
  import { batchMulticallCallWithRetry } from "@/utils/generic";
5
5
  import { log } from "@/utils/logger";
6
- import { apiDbClient } from "@/utils/prisma";
6
+ import { apiDbClient } from "@db";
7
7
  import { ERC20Interface, EULER_ADDRESSES, EulerEVKInterface, EulerVaultLensInterface, NETWORK_LABELS, eulerChainIds, } from "@sdk";
8
8
  import _ from "lodash";
9
9
  async function computeCollatListAndReturnVaults(chainId, vaults) {
@@ -1,5 +1,5 @@
1
1
  import { BucketService } from "@/modules/v4/bucket/bucket.service";
2
- import { engineDbClient } from "@/utils/prisma";
2
+ import { engineDbClient } from "@db";
3
3
  import { BN2Number, ChainInteractionService, NETWORK_LABELS, } from "@sdk";
4
4
  import moment from "moment";
5
5
  import { log } from "../../../utils/logger";
@@ -1,5 +1,5 @@
1
1
  import { ComputedValueService } from "@/modules/v4/computedValue";
2
- import { engineDbClient } from "@/utils/prisma";
2
+ import { engineDbClient } from "@db";
3
3
  import { BN2Number, ERC20Interface, NULL_ADDRESS, RadiantInterface, RadiantPoolInterface, YEAR, } from "@sdk";
4
4
  import { Contract } from "ethers";
5
5
  import { log } from "../../../utils/logger";
@@ -1,5 +1,5 @@
1
1
  import { BucketService } from "@/modules/v4/bucket/bucket.service";
2
- import { engineDbClient } from "@/utils/prisma";
2
+ import { engineDbClient } from "@db";
3
3
  import { BN2Number, ChainInteractionService, EAprBreakdownType, NETWORK_LABELS, UniswapV4Addresses, UniswapV4StateViewInterface, getSqrtRatioAtTick, shortenAddress, } from "@sdk";
4
4
  import moment from "moment";
5
5
  import { log } from "../../../utils/logger";
@@ -1,8 +1,8 @@
1
1
  import { Redis } from "@/cache";
2
2
  import { batchMulticallCallWithRetry } from "@/utils/generic";
3
3
  import { log } from "@/utils/logger";
4
- import { apiDbClient } from "@/utils/prisma";
5
4
  import { providers } from "@/utils/providers";
5
+ import { apiDbClient } from "@db";
6
6
  import { ChainInteractionService, ERC20Interface, EULER_ADDRESSES, EulerEVKInterface, EulerVaultLensInterface, EulerVault__factory, NETWORK_LABELS, eulerChainIds, getContractCreationBlock, } from "@sdk";
7
7
  import { getAddress } from "ethers/lib/utils";
8
8
  import _ from "lodash";
@@ -1,7 +1,7 @@
1
1
  import { Redis } from "@/cache";
2
2
  import { log } from "@/utils/logger";
3
- import { apiDbClient } from "@/utils/prisma";
4
3
  import { providers } from "@/utils/providers";
4
+ import { apiDbClient } from "@db";
5
5
  import { ChainInteractionService, ERC20Interface, NETWORK_LABELS, NULL_ADDRESS, UniswapV4Addresses, UniswapV4PoolManagerInterface, getContractCreationBlock, } from "@sdk";
6
6
  import { safeFetchLogs } from "./fetchLogs";
7
7
  import { LoggedEntityType } from "./getEulerV2Vaults";
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated The whole file is deprecated
3
+ */
1
4
  export interface Token {
2
5
  readonly name: string;
3
6
  readonly address: string;
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { BN2Number, ERC20Interface } from "@sdk";
2
3
  import { getAddress } from "ethers/lib/utils";
3
4
  export async function getERC20UserPositions(user, _chainId, tokens) {
@@ -1,5 +1,5 @@
1
1
  import { Redis } from "@/cache";
2
- import { engineDbClient } from "@/utils/prisma";
2
+ import { engineDbClient } from "@db";
3
3
  async function staticCampaigns(chainId) {
4
4
  return await engineDbClient.campaigns.findMany({
5
5
  where: {
@@ -27,9 +27,9 @@ export declare const AccountingController: Elysia<"/accounting", false, {
27
27
  response: {
28
28
  200: {
29
29
  id: string;
30
- timestamp: number;
31
- chainId: number;
32
30
  datetime: Date;
31
+ chainId: number;
32
+ timestamp: number;
33
33
  recipient: string;
34
34
  fromTokenId: string;
35
35
  toTokenId: string;
@@ -70,8 +70,8 @@ export declare const AccountingController: Elysia<"/accounting", false, {
70
70
  get: {
71
71
  body: unknown;
72
72
  params: {
73
- month: number;
74
73
  year: number;
74
+ month: number;
75
75
  };
76
76
  query: unknown;
77
77
  headers: {
@@ -128,8 +128,8 @@ export declare const AccountingController: Elysia<"/accounting", false, {
128
128
  body: unknown;
129
129
  params: {
130
130
  chainId: number;
131
- month: number;
132
131
  year: number;
132
+ month: number;
133
133
  };
134
134
  query: unknown;
135
135
  headers: {
@@ -184,9 +184,9 @@ export declare const AccountingController: Elysia<"/accounting", false, {
184
184
  body: unknown;
185
185
  params: {
186
186
  chainId: number;
187
- tokenAddress: string;
188
- month: number;
189
187
  year: number;
188
+ month: number;
189
+ tokenAddress: string;
190
190
  };
191
191
  query: unknown;
192
192
  headers: {
@@ -2,9 +2,9 @@ import type { GetTransactionsQueryModel } from "@/modules/v4/accounting";
2
2
  export declare class AccountingRepository {
3
3
  static findMany(query: GetTransactionsQueryModel): Promise<{
4
4
  id: string;
5
- timestamp: number;
6
- chainId: number;
7
5
  datetime: Date;
6
+ chainId: number;
7
+ timestamp: number;
8
8
  recipient: string;
9
9
  fromTokenId: string;
10
10
  toTokenId: string;
@@ -14,9 +14,9 @@ export declare class AccountingRepository {
14
14
  }[]>;
15
15
  static getByTokenForDumper(fromTokenId: string): Promise<{
16
16
  id: string;
17
- timestamp: number;
18
- chainId: number;
19
17
  datetime: Date;
18
+ chainId: number;
19
+ timestamp: number;
20
20
  recipient: string;
21
21
  fromTokenId: string;
22
22
  toTokenId: string;
@@ -26,9 +26,9 @@ export declare class AccountingRepository {
26
26
  }[]>;
27
27
  static getForMonthForRecipient(recipient: string, toTokenId: string, month: number, year: number): Promise<{
28
28
  id: string;
29
- timestamp: number;
30
- chainId: number;
31
29
  datetime: Date;
30
+ chainId: number;
31
+ timestamp: number;
32
32
  recipient: string;
33
33
  fromTokenId: string;
34
34
  toTokenId: string;
@@ -38,9 +38,9 @@ export declare class AccountingRepository {
38
38
  }[]>;
39
39
  static getForMultisigBetweenDates(startDate: Date, endDate: Date): Promise<{
40
40
  id: string;
41
- timestamp: number;
42
- chainId: number;
43
41
  datetime: Date;
42
+ chainId: number;
43
+ timestamp: number;
44
44
  recipient: string;
45
45
  fromTokenId: string;
46
46
  toTokenId: string;
@@ -50,9 +50,9 @@ export declare class AccountingRepository {
50
50
  }[]>;
51
51
  static getForMultisig(): Promise<{
52
52
  id: string;
53
- timestamp: number;
54
- chainId: number;
55
53
  datetime: Date;
54
+ chainId: number;
55
+ timestamp: number;
56
56
  recipient: string;
57
57
  fromTokenId: string;
58
58
  toTokenId: string;
@@ -62,9 +62,9 @@ export declare class AccountingRepository {
62
62
  }[]>;
63
63
  static getForMultisigByChain(chainId: number): Promise<{
64
64
  id: string;
65
- timestamp: number;
66
- chainId: number;
67
65
  datetime: Date;
66
+ chainId: number;
67
+ timestamp: number;
68
68
  recipient: string;
69
69
  fromTokenId: string;
70
70
  toTokenId: string;
@@ -74,9 +74,9 @@ export declare class AccountingRepository {
74
74
  }[]>;
75
75
  static getForMultisigByChainBetweenDates(chainId: number, startDate: Date, endDate: Date): Promise<{
76
76
  id: string;
77
- timestamp: number;
78
- chainId: number;
79
77
  datetime: Date;
78
+ chainId: number;
79
+ timestamp: number;
80
80
  recipient: string;
81
81
  fromTokenId: string;
82
82
  toTokenId: string;
@@ -86,9 +86,9 @@ export declare class AccountingRepository {
86
86
  }[]>;
87
87
  static getForDumperBetweenDates(fromTokenId: string, startDate: Date, endDate: Date): Promise<{
88
88
  id: string;
89
- timestamp: number;
90
- chainId: number;
91
89
  datetime: Date;
90
+ chainId: number;
91
+ timestamp: number;
92
92
  recipient: string;
93
93
  fromTokenId: string;
94
94
  toTokenId: string;
@@ -1,4 +1,4 @@
1
- import { apiDbClient } from "@/utils/prisma";
1
+ import { apiDbClient } from "@db";
2
2
  export class AccountingRepository {
3
3
  static async findMany(query) {
4
4
  const { page: _page, items: _items } = query;
@@ -5,9 +5,9 @@ export declare class AccountingService {
5
5
  static getTokenId(chainId: number, address: string): string;
6
6
  static findMany(query: GetTransactionsQueryModel): Promise<{
7
7
  id: string;
8
- timestamp: number;
9
- chainId: number;
10
8
  datetime: Date;
9
+ chainId: number;
10
+ timestamp: number;
11
11
  recipient: string;
12
12
  fromTokenId: string;
13
13
  toTokenId: string;
@@ -1,4 +1,4 @@
1
- import { apiDbClient } from "@/utils/prisma";
1
+ import { apiDbClient } from "@db";
2
2
  import { NULL_ADDRESS } from "@sdk";
3
3
  export class BlacklistRepository {
4
4
  static async findMany() {
@@ -22,12 +22,12 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
22
22
  type: number;
23
23
  params: string;
24
24
  creator: string;
25
- chainId: number;
26
- startTimestamp: string;
27
- endTimestamp: string;
28
25
  computeChainId: number;
29
26
  campaignId: string;
30
27
  amount: string;
28
+ startTimestamp: string;
29
+ endTimestamp: string;
30
+ chainId: number;
31
31
  rewardTokenAddress: string;
32
32
  opportunityIdentifier: string;
33
33
  };
@@ -42,14 +42,14 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
42
42
  type: string;
43
43
  params: import("database/api/.generated/runtime/library").JsonValue;
44
44
  subType: number | null;
45
- startTimestamp: bigint;
46
- endTimestamp: bigint;
47
45
  computeChainId: number;
48
46
  distributionChainId: number;
49
47
  campaignId: string;
50
48
  rewardTokenId: string;
51
49
  amount: string;
52
50
  opportunityId: string;
51
+ startTimestamp: bigint;
52
+ endTimestamp: bigint;
53
53
  creatorAddress: string;
54
54
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
55
55
  } | undefined;
@@ -129,14 +129,14 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
129
129
  type: string;
130
130
  params: import("database/api/.generated/runtime/library").JsonValue;
131
131
  subType: number | null;
132
- startTimestamp: bigint;
133
- endTimestamp: bigint;
134
132
  computeChainId: number;
135
133
  distributionChainId: number;
136
134
  campaignId: string;
137
135
  rewardTokenId: string;
138
136
  amount: string;
139
137
  opportunityId: string;
138
+ startTimestamp: bigint;
139
+ endTimestamp: bigint;
140
140
  creatorAddress: string;
141
141
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
142
142
  };
@@ -172,16 +172,16 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
172
172
  items?: number | undefined;
173
173
  subType?: number | undefined;
174
174
  page?: number | undefined;
175
- chainId?: number | undefined;
176
- startTimestamp?: string | undefined;
177
- endTimestamp?: string | undefined;
178
- tokenAddress?: string | undefined;
179
175
  types?: string[] | undefined;
180
176
  campaignId?: string | undefined;
181
177
  opportunityId?: string | undefined;
178
+ startTimestamp?: string | undefined;
179
+ endTimestamp?: string | undefined;
182
180
  creatorAddress?: string | undefined;
181
+ chainId?: number | undefined;
183
182
  creatorId?: string | undefined;
184
183
  mainParameter?: string | undefined;
184
+ tokenAddress?: string | undefined;
185
185
  test?: boolean | undefined;
186
186
  creatorTag?: string | undefined;
187
187
  distributionChainIds?: number[] | undefined;
@@ -204,8 +204,8 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
204
204
  id: string;
205
205
  name: string | null;
206
206
  icon: string;
207
- chainId: number;
208
207
  address: string;
208
+ chainId: number;
209
209
  decimals: number;
210
210
  verified: boolean;
211
211
  isTest: boolean;
@@ -239,8 +239,8 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
239
239
  status: import("@db/api").$Enums.Status;
240
240
  tags: string[];
241
241
  identifier: string;
242
- chainId: number;
243
242
  action: import("@db/api").$Enums.OpportunityAction;
243
+ chainId: number;
244
244
  depositUrl: string | null;
245
245
  mainProtocolId: string | null;
246
246
  tvl: number;
@@ -285,8 +285,8 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
285
285
  id: string;
286
286
  name: string | null;
287
287
  icon: string;
288
- chainId: number;
289
288
  address: string;
289
+ chainId: number;
290
290
  decimals: number;
291
291
  verified: boolean;
292
292
  isTest: boolean;
@@ -320,8 +320,8 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
320
320
  status: import("@db/api").$Enums.Status;
321
321
  tags: string[];
322
322
  identifier: string;
323
- chainId: number;
324
323
  action: import("@db/api").$Enums.OpportunityAction;
324
+ chainId: number;
325
325
  depositUrl: string | null;
326
326
  mainProtocolId: string | null;
327
327
  tvl: number;
@@ -353,16 +353,16 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
353
353
  items?: number | undefined;
354
354
  subType?: number | undefined;
355
355
  page?: number | undefined;
356
- chainId?: number | undefined;
357
- startTimestamp?: string | undefined;
358
- endTimestamp?: string | undefined;
359
- tokenAddress?: string | undefined;
360
356
  types?: string[] | undefined;
361
357
  campaignId?: string | undefined;
362
358
  opportunityId?: string | undefined;
359
+ startTimestamp?: string | undefined;
360
+ endTimestamp?: string | undefined;
363
361
  creatorAddress?: string | undefined;
362
+ chainId?: number | undefined;
364
363
  creatorId?: string | undefined;
365
364
  mainParameter?: string | undefined;
365
+ tokenAddress?: string | undefined;
366
366
  test?: boolean | undefined;
367
367
  creatorTag?: string | undefined;
368
368
  distributionChainIds?: number[] | undefined;
@@ -387,8 +387,8 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
387
387
  headers: unknown;
388
388
  response: {
389
389
  200: {
390
- endTimestamp: bigint;
391
390
  campaignId: string;
391
+ endTimestamp: bigint;
392
392
  CampaignStatus: {
393
393
  status: import("@db/api").$Enums.RunStatus;
394
394
  computedUntil: bigint;
@@ -293,8 +293,8 @@ export declare abstract class CampaignRepository {
293
293
  status: import("@db/api").$Enums.Status;
294
294
  tags: string[];
295
295
  identifier: string;
296
- chainId: number;
297
296
  action: import("@db/api").$Enums.OpportunityAction;
297
+ chainId: number;
298
298
  depositUrl: string | null;
299
299
  mainProtocolId: string | null;
300
300
  tvl: number;
@@ -306,14 +306,14 @@ export declare abstract class CampaignRepository {
306
306
  type: string;
307
307
  params: Prisma.JsonValue;
308
308
  subType: number | null;
309
- startTimestamp: bigint;
310
- endTimestamp: bigint;
311
309
  computeChainId: number;
312
310
  distributionChainId: number;
313
311
  campaignId: string;
314
312
  rewardTokenId: string;
315
313
  amount: string;
316
314
  opportunityId: string;
315
+ startTimestamp: bigint;
316
+ endTimestamp: bigint;
317
317
  creatorAddress: string;
318
318
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
319
319
  })[]>;
@@ -336,8 +336,8 @@ export declare abstract class CampaignRepository {
336
336
  status: import("@db/api").$Enums.Status;
337
337
  tags: string[];
338
338
  identifier: string;
339
- chainId: number;
340
339
  action: import("@db/api").$Enums.OpportunityAction;
340
+ chainId: number;
341
341
  depositUrl: string | null;
342
342
  mainProtocolId: string | null;
343
343
  tvl: number;
@@ -349,14 +349,14 @@ export declare abstract class CampaignRepository {
349
349
  type: string;
350
350
  params: Prisma.JsonValue;
351
351
  subType: number | null;
352
- startTimestamp: bigint;
353
- endTimestamp: bigint;
354
352
  computeChainId: number;
355
353
  distributionChainId: number;
356
354
  campaignId: string;
357
355
  rewardTokenId: string;
358
356
  amount: string;
359
357
  opportunityId: string;
358
+ startTimestamp: bigint;
359
+ endTimestamp: bigint;
360
360
  creatorAddress: string;
361
361
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
362
362
  })[]>;
@@ -378,8 +378,8 @@ export declare abstract class CampaignRepository {
378
378
  id: string;
379
379
  name: string | null;
380
380
  icon: string;
381
- chainId: number;
382
381
  address: string;
382
+ chainId: number;
383
383
  decimals: number;
384
384
  displaySymbol: string;
385
385
  verified: boolean;
@@ -394,8 +394,8 @@ export declare abstract class CampaignRepository {
394
394
  status: import("@db/api").$Enums.Status;
395
395
  tags: string[];
396
396
  identifier: string;
397
- chainId: number;
398
397
  action: import("@db/api").$Enums.OpportunityAction;
398
+ chainId: number;
399
399
  depositUrl: string | null;
400
400
  mainProtocolId: string | null;
401
401
  tvl: number;
@@ -407,14 +407,14 @@ export declare abstract class CampaignRepository {
407
407
  type: string;
408
408
  params: Prisma.JsonValue;
409
409
  subType: number | null;
410
- startTimestamp: bigint;
411
- endTimestamp: bigint;
412
410
  computeChainId: number;
413
411
  distributionChainId: number;
414
412
  campaignId: string;
415
413
  rewardTokenId: string;
416
414
  amount: string;
417
415
  opportunityId: string;
416
+ startTimestamp: bigint;
417
+ endTimestamp: bigint;
418
418
  creatorAddress: string;
419
419
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
420
420
  })[]>;
@@ -449,14 +449,14 @@ export declare abstract class CampaignRepository {
449
449
  type: string;
450
450
  params: Prisma.JsonValue;
451
451
  subType: number | null;
452
- startTimestamp: bigint;
453
- endTimestamp: bigint;
454
452
  computeChainId: number;
455
453
  distributionChainId: number;
456
454
  campaignId: string;
457
455
  rewardTokenId: string;
458
456
  amount: string;
459
457
  opportunityId: string;
458
+ startTimestamp: bigint;
459
+ endTimestamp: bigint;
460
460
  creatorAddress: string;
461
461
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
462
462
  } | undefined>;
@@ -469,12 +469,12 @@ export declare abstract class CampaignRepository {
469
469
  static getFromEngineDbWithId(campaignIds: CampaignUnique[]): Promise<{
470
470
  index: number;
471
471
  creator: string;
472
- chainId: number;
473
- startTimestamp: number;
474
- endTimestamp: number;
475
472
  computeChainId: number;
476
473
  campaignId: string;
477
474
  amount: string;
475
+ startTimestamp: number;
476
+ endTimestamp: number;
477
+ chainId: number;
478
478
  rewardToken: string;
479
479
  campaignType: number;
480
480
  campaignSubType: number;
@@ -497,8 +497,8 @@ export declare abstract class CampaignRepository {
497
497
  id: string;
498
498
  name: string | null;
499
499
  icon: string;
500
- chainId: number;
501
500
  address: string;
501
+ chainId: number;
502
502
  decimals: number;
503
503
  displaySymbol: string;
504
504
  verified: boolean;
@@ -524,14 +524,14 @@ export declare abstract class CampaignRepository {
524
524
  type: string;
525
525
  params: Prisma.JsonValue;
526
526
  subType: number | null;
527
- startTimestamp: bigint;
528
- endTimestamp: bigint;
529
527
  computeChainId: number;
530
528
  distributionChainId: number;
531
529
  campaignId: string;
532
530
  rewardTokenId: string;
533
531
  amount: string;
534
532
  opportunityId: string;
533
+ startTimestamp: bigint;
534
+ endTimestamp: bigint;
535
535
  creatorAddress: string;
536
536
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
537
537
  }) | null>;
@@ -551,8 +551,8 @@ export declare abstract class CampaignRepository {
551
551
  id: string;
552
552
  name: string | null;
553
553
  icon: string;
554
- chainId: number;
555
554
  address: string;
555
+ chainId: number;
556
556
  decimals: number;
557
557
  displaySymbol: string;
558
558
  verified: boolean;
@@ -567,8 +567,8 @@ export declare abstract class CampaignRepository {
567
567
  status: import("@db/api").$Enums.Status;
568
568
  tags: string[];
569
569
  identifier: string;
570
- chainId: number;
571
570
  action: import("@db/api").$Enums.OpportunityAction;
571
+ chainId: number;
572
572
  depositUrl: string | null;
573
573
  mainProtocolId: string | null;
574
574
  tvl: number;
@@ -593,20 +593,20 @@ export declare abstract class CampaignRepository {
593
593
  type: string;
594
594
  params: Prisma.JsonValue;
595
595
  subType: number | null;
596
- startTimestamp: bigint;
597
- endTimestamp: bigint;
598
596
  computeChainId: number;
599
597
  distributionChainId: number;
600
598
  campaignId: string;
601
599
  rewardTokenId: string;
602
600
  amount: string;
603
601
  opportunityId: string;
602
+ startTimestamp: bigint;
603
+ endTimestamp: bigint;
604
604
  creatorAddress: string;
605
605
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
606
606
  }>;
607
607
  static findCampaignsToProcess(distributionChainId: ChainId): Promise<{
608
- endTimestamp: bigint;
609
608
  campaignId: string;
609
+ endTimestamp: bigint;
610
610
  CampaignStatus: {
611
611
  status: import("@db/api").$Enums.RunStatus;
612
612
  computedUntil: bigint;
@@ -629,8 +629,8 @@ export declare abstract class CampaignRepository {
629
629
  id: string;
630
630
  name: string | null;
631
631
  icon: string;
632
- chainId: number;
633
632
  address: string;
633
+ chainId: number;
634
634
  decimals: number;
635
635
  displaySymbol: string;
636
636
  verified: boolean;
@@ -645,8 +645,8 @@ export declare abstract class CampaignRepository {
645
645
  status: import("@db/api").$Enums.Status;
646
646
  tags: string[];
647
647
  identifier: string;
648
- chainId: number;
649
648
  action: import("@db/api").$Enums.OpportunityAction;
649
+ chainId: number;
650
650
  depositUrl: string | null;
651
651
  mainProtocolId: string | null;
652
652
  tvl: number;
@@ -671,14 +671,14 @@ export declare abstract class CampaignRepository {
671
671
  type: string;
672
672
  params: Prisma.JsonValue;
673
673
  subType: number | null;
674
- startTimestamp: bigint;
675
- endTimestamp: bigint;
676
674
  computeChainId: number;
677
675
  distributionChainId: number;
678
676
  campaignId: string;
679
677
  rewardTokenId: string;
680
678
  amount: string;
681
679
  opportunityId: string;
680
+ startTimestamp: bigint;
681
+ endTimestamp: bigint;
682
682
  creatorAddress: string;
683
683
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
684
684
  })[]>;
@@ -693,14 +693,14 @@ export declare abstract class CampaignRepository {
693
693
  type: string;
694
694
  params: Prisma.JsonValue;
695
695
  subType: number | null;
696
- startTimestamp: bigint;
697
- endTimestamp: bigint;
698
696
  computeChainId: number;
699
697
  distributionChainId: number;
700
698
  campaignId: string;
701
699
  rewardTokenId: string;
702
700
  amount: string;
703
701
  opportunityId: string;
702
+ startTimestamp: bigint;
703
+ endTimestamp: bigint;
704
704
  creatorAddress: string;
705
705
  manualOverrides: import("@db/api").$Enums.CampaignManualOverride[];
706
706
  }>;