@merkl/api 0.10.138 → 0.10.140

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/dist/src/eden/index.d.ts +291 -520
  2. package/dist/src/index.d.ts +99 -186
  3. package/dist/src/index.js +1 -1
  4. package/dist/src/libs/deprecated-merklv3/index.js +1 -1
  5. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +0 -21
  6. package/dist/src/modules/v4/blacklist/blacklist.controller.js +2 -2
  7. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +0 -8
  8. package/dist/src/modules/v4/blacklist/blacklist.repository.js +1 -4
  9. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +1 -9
  10. package/dist/src/modules/v4/blacklist/blacklist.service.js +1 -4
  11. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +3 -3
  12. package/dist/src/modules/v4/campaign/campaign.controller.js +8 -6
  13. package/dist/src/modules/v4/campaign/campaign.service.js +1 -2
  14. package/dist/src/modules/v4/chain/chain.controller.js +2 -1
  15. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +20 -26
  16. package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +5 -5
  17. package/dist/src/modules/v4/enso/enso.service.d.ts +1 -1
  18. package/dist/src/modules/v4/{participate/participate.controller.d.ts → interaction/interaction.controller.d.ts} +6 -6
  19. package/dist/src/modules/v4/{participate/participate.controller.js → interaction/interaction.controller.js} +12 -13
  20. package/dist/src/modules/v4/{participate/participate.model.d.ts → interaction/interaction.model.d.ts} +12 -12
  21. package/dist/src/modules/v4/{participate/participate.model.js → interaction/interaction.model.js} +3 -3
  22. package/dist/src/modules/v4/{participate/participate.service.d.ts → interaction/interaction.service.d.ts} +5 -5
  23. package/dist/src/modules/v4/{participate/participate.service.js → interaction/interaction.service.js} +3 -3
  24. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +2 -2
  25. package/dist/src/modules/v4/merklRoot/merklRoot.controller.js +2 -2
  26. package/dist/src/modules/v4/opportunity/opportunity.controller.js +5 -1
  27. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +28 -2
  28. package/dist/src/modules/v4/opportunity/opportunity.repository.js +16 -1
  29. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +2 -1
  30. package/dist/src/modules/v4/opportunity/opportunity.service.js +30 -0
  31. package/dist/src/modules/v4/opportunity/subservices/getClammMetadata.service.js +1 -1
  32. package/dist/src/modules/v4/opportunity/subservices/getDolomiteMetadata.service.js +1 -1
  33. package/dist/src/modules/v4/opportunity/subservices/getErc20SnapshotMetadata.service.js +1 -1
  34. package/dist/src/modules/v4/opportunity/subservices/getJsonAirDropMetadata.service.js +3 -3
  35. package/dist/src/modules/v4/opportunity/subservices/getMorphoMetadata.service.js +2 -2
  36. package/dist/src/modules/v4/opportunity/subservices/getRadiantMetadata.service.js +1 -1
  37. package/dist/src/modules/v4/opportunity/subservices/getSiloMetadata.service.js +1 -1
  38. package/dist/src/modules/v4/price/price.controller.js +3 -0
  39. package/dist/src/modules/v4/reward/reward.controller.d.ts +31 -29
  40. package/dist/src/modules/v4/reward/reward.controller.js +3 -3
  41. package/dist/src/modules/v4/reward/{rewardConvertor.service.d.ts → subservices/converter.d.ts} +2 -2
  42. package/dist/src/modules/v4/reward/{rewardConvertor.service.js → subservices/converter.js} +1 -1
  43. package/dist/src/modules/v4/router.d.ts +99 -186
  44. package/dist/src/modules/v4/router.js +2 -2
  45. package/dist/src/modules/v4/status/status.controller.d.ts +40 -102
  46. package/dist/src/modules/v4/status/status.controller.js +16 -22
  47. package/dist/src/modules/v4/status/status.model.d.ts +33 -26
  48. package/dist/src/modules/v4/status/status.model.js +9 -20
  49. package/dist/src/modules/v4/status/status.repository.d.ts +12 -42
  50. package/dist/src/modules/v4/status/status.repository.js +10 -22
  51. package/dist/src/modules/v4/status/status.service.d.ts +4 -36
  52. package/dist/src/modules/v4/status/status.service.js +9 -18
  53. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.d.ts +1 -1
  54. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.js +1 -1
  55. package/dist/src/modules/v4/user/user.controller.js +3 -2
  56. package/dist/src/routes/v3/ERC20Campaigns.d.ts +99 -186
  57. package/dist/src/routes/v3/blacklist.d.ts +99 -186
  58. package/dist/src/routes/v3/campaigns.d.ts +99 -186
  59. package/dist/src/routes/v3/campaignsInfo.d.ts +99 -186
  60. package/dist/src/routes/v3/multiChainPositions.d.ts +99 -186
  61. package/dist/src/routes/v3/opportunity.d.ts +99 -186
  62. package/dist/src/routes/v3/positions.d.ts +99 -186
  63. package/dist/src/routes/v3/rewards.d.ts +99 -186
  64. package/dist/src/routes/v3/rewards.js +1 -1
  65. package/dist/src/routes/v3/updates.d.ts +99 -186
  66. package/dist/src/routes/v3/userRewards.d.ts +99 -186
  67. package/dist/src/routes/v3/userRewards.js +1 -1
  68. package/dist/tsconfig.package.tsbuildinfo +1 -1
  69. package/package.json +1 -2
  70. package/dist/src/modules/v4/apr/apr.repository.d.ts +0 -0
  71. package/dist/src/modules/v4/apr/apr.repository.js +0 -1
  72. package/dist/src/modules/v4/tvl/tvl.repository.d.ts +0 -0
  73. package/dist/src/modules/v4/tvl/tvl.repository.js +0 -1
@@ -113,35 +113,37 @@ export declare const RewardController: Elysia<"/rewards", false, {
113
113
  };
114
114
  } & {
115
115
  rewards: {
116
- pendings: {
117
- post: {
118
- body: {
119
- distributionChainId: number;
120
- campaignId: string;
121
- root: string;
122
- rewardToken: string;
123
- toUpdate: {
124
- auxiliaryData1?: string | undefined;
125
- auxiliaryData2?: string | undefined;
126
- reason: string;
127
- pending: string;
128
- recipient: string;
129
- }[];
130
- toCreate: {
131
- auxiliaryData1?: string | undefined;
132
- auxiliaryData2?: string | undefined;
133
- reason: string;
134
- pending: string;
135
- recipient: string;
136
- }[];
137
- };
138
- params: {};
139
- query: unknown;
140
- headers: {
141
- authorization: string;
142
- };
143
- response: {
144
- 200: boolean;
116
+ engine: {
117
+ pendings: {
118
+ post: {
119
+ body: {
120
+ distributionChainId: number;
121
+ campaignId: string;
122
+ root: string;
123
+ rewardToken: string;
124
+ toUpdate: {
125
+ auxiliaryData1?: string | undefined;
126
+ auxiliaryData2?: string | undefined;
127
+ reason: string;
128
+ pending: string;
129
+ recipient: string;
130
+ }[];
131
+ toCreate: {
132
+ auxiliaryData1?: string | undefined;
133
+ auxiliaryData2?: string | undefined;
134
+ reason: string;
135
+ pending: string;
136
+ recipient: string;
137
+ }[];
138
+ };
139
+ params: {};
140
+ query: unknown;
141
+ headers: {
142
+ authorization: string;
143
+ };
144
+ response: {
145
+ 200: boolean;
146
+ };
145
147
  };
146
148
  };
147
149
  };
@@ -33,19 +33,19 @@ export const RewardController = new Elysia({ prefix: "/rewards", detail: { tags:
33
33
  beforeHandle: EngineGuard,
34
34
  })
35
35
  // ─── Create Many Pending Rewards ─────────────────────────────────────
36
- .post("/pendings", async ({ body }) => await RewardService.updatePendings(body), {
36
+ .post("/engine/pendings", async ({ body }) => await RewardService.updatePendings(body), {
37
37
  headers: AuthorizationHeadersDto,
38
38
  body: UpdatePendingDto,
39
39
  beforeHandle: EngineGuard,
40
40
  })
41
- // ─── Get Reward Count By Chain And Root ───────────────────────────────────────
41
+ // ─── Get Reward Count By Chain And Root ──────────────────────────────
42
42
  .get("/count", async ({ query }) => await RewardService.count(query), {
43
43
  query: CampaignIdDto,
44
44
  beforeHandle: ({ query }) => {
45
45
  throwOnUnsupportedChainId(query.chainId);
46
46
  },
47
47
  })
48
- // ─── Get Reward Count By Chain And Root ───────────────────────────────────────
48
+ // ─── Get Reward Count By Chain And Root ──────────────────────────────
49
49
  .get("/count/chains", async () => await RewardService.countAllchains(), {
50
50
  headers: AuthorizationHeadersDto,
51
51
  beforeHandle: BackOfficeGuard,
@@ -1,6 +1,6 @@
1
1
  import type { MerklAPIType, MerklChainId } from "@sdk";
2
- import type { RewardV3Model, UserRewardV3Model } from "./reward.model";
3
- import { RewardService } from "./reward.service";
2
+ import type { RewardV3Model, UserRewardV3Model } from "../reward.model";
3
+ import { RewardService } from "../reward.service";
4
4
  export declare abstract class RewardConvertorService {
5
5
  /**
6
6
  * Convert the v4 reward data to the v3 model used in the v3/userRewards route
@@ -1,4 +1,4 @@
1
- import { RewardService } from "./reward.service";
1
+ import { RewardService } from "../reward.service";
2
2
  export class RewardConvertorService {
3
3
  /**
4
4
  * Convert the v4 reward data to the v3 model used in the v3/userRewards route
@@ -580,7 +580,7 @@ export declare const v4: Elysia<"/v4", false, {
580
580
  };
581
581
  };
582
582
  } & {
583
- campaignsToProcess: {
583
+ "campaigns-to-process": {
584
584
  index: {
585
585
  get: {
586
586
  body: unknown;
@@ -602,7 +602,7 @@ export declare const v4: Elysia<"/v4", false, {
602
602
  };
603
603
  };
604
604
  } & {
605
- campaignsToProcess: {
605
+ "campaigns-to-process": {
606
606
  count: {
607
607
  get: {
608
608
  body: unknown;
@@ -618,7 +618,7 @@ export declare const v4: Elysia<"/v4", false, {
618
618
  };
619
619
  };
620
620
  } & {
621
- campaignsToProcess: {
621
+ "campaigns-to-process": {
622
622
  index: {
623
623
  post: {
624
624
  body: unknown;
@@ -917,35 +917,37 @@ export declare const v4: Elysia<"/v4", false, {
917
917
  };
918
918
  } & {
919
919
  rewards: {
920
- pendings: {
921
- post: {
922
- body: {
923
- distributionChainId: number;
924
- campaignId: string;
925
- root: string;
926
- rewardToken: string;
927
- toUpdate: {
928
- auxiliaryData1?: string | undefined;
929
- auxiliaryData2?: string | undefined;
930
- reason: string;
931
- pending: string;
932
- recipient: string;
933
- }[];
934
- toCreate: {
935
- auxiliaryData1?: string | undefined;
936
- auxiliaryData2?: string | undefined;
937
- reason: string;
938
- pending: string;
939
- recipient: string;
940
- }[];
941
- };
942
- params: {};
943
- query: unknown;
944
- headers: {
945
- authorization: string;
946
- };
947
- response: {
948
- 200: boolean;
920
+ engine: {
921
+ pendings: {
922
+ post: {
923
+ body: {
924
+ distributionChainId: number;
925
+ campaignId: string;
926
+ root: string;
927
+ rewardToken: string;
928
+ toUpdate: {
929
+ auxiliaryData1?: string | undefined;
930
+ auxiliaryData2?: string | undefined;
931
+ reason: string;
932
+ pending: string;
933
+ recipient: string;
934
+ }[];
935
+ toCreate: {
936
+ auxiliaryData1?: string | undefined;
937
+ auxiliaryData2?: string | undefined;
938
+ reason: string;
939
+ pending: string;
940
+ recipient: string;
941
+ }[];
942
+ };
943
+ params: {};
944
+ query: unknown;
945
+ headers: {
946
+ authorization: string;
947
+ };
948
+ response: {
949
+ 200: boolean;
950
+ };
949
951
  };
950
952
  };
951
953
  };
@@ -1253,27 +1255,6 @@ export declare const v4: Elysia<"/v4", false, {
1253
1255
  v4: {
1254
1256
  blacklists: {
1255
1257
  index: {
1256
- get: {
1257
- body: unknown;
1258
- params: {};
1259
- query: unknown;
1260
- headers: unknown;
1261
- response: {
1262
- 200: {
1263
- id: string;
1264
- chainId: number;
1265
- poolAddress: string;
1266
- userAddress: string;
1267
- arrestTimestamp: bigint;
1268
- arrestDetails: import("database/api/.generated/runtime/library").JsonValue;
1269
- }[];
1270
- };
1271
- };
1272
- };
1273
- };
1274
- } & {
1275
- blacklists: {
1276
- all: {
1277
1258
  get: {
1278
1259
  body: unknown;
1279
1260
  params: {};
@@ -1700,7 +1681,7 @@ export declare const v4: Elysia<"/v4", false, {
1700
1681
  } & {
1701
1682
  v4: {
1702
1683
  roots: {
1703
- timestamps: {
1684
+ index: {
1704
1685
  get: {
1705
1686
  body: unknown;
1706
1687
  params: {};
@@ -1723,7 +1704,7 @@ export declare const v4: Elysia<"/v4", false, {
1723
1704
  };
1724
1705
  } & {
1725
1706
  roots: {
1726
- index: {
1707
+ live: {
1727
1708
  get: {
1728
1709
  body: unknown;
1729
1710
  params: {};
@@ -1742,7 +1723,7 @@ export declare const v4: Elysia<"/v4", false, {
1742
1723
  };
1743
1724
  } & {
1744
1725
  v4: {
1745
- participate: {
1726
+ interaction: {
1746
1727
  targets: {
1747
1728
  get: {
1748
1729
  body: unknown;
@@ -1754,13 +1735,13 @@ export declare const v4: Elysia<"/v4", false, {
1754
1735
  };
1755
1736
  headers: unknown;
1756
1737
  response: {
1757
- 200: import("./participate/participate.model").ParticipateTarget[] | undefined;
1738
+ 200: import("./interaction/interaction.model").InteractionTarget[] | undefined;
1758
1739
  };
1759
1740
  };
1760
1741
  };
1761
1742
  };
1762
1743
  } & {
1763
- participate: {
1744
+ interaction: {
1764
1745
  protocols: {
1765
1746
  get: {
1766
1747
  body: unknown;
@@ -1783,7 +1764,7 @@ export declare const v4: Elysia<"/v4", false, {
1783
1764
  };
1784
1765
  };
1785
1766
  } & {
1786
- participate: {
1767
+ interaction: {
1787
1768
  quote: {
1788
1769
  get: {
1789
1770
  body: unknown;
@@ -1809,7 +1790,7 @@ export declare const v4: Elysia<"/v4", false, {
1809
1790
  };
1810
1791
  };
1811
1792
  } & {
1812
- participate: {
1793
+ interaction: {
1813
1794
  transaction: {
1814
1795
  get: {
1815
1796
  body: unknown;
@@ -2031,31 +2012,25 @@ export declare const v4: Elysia<"/v4", false, {
2031
2012
  };
2032
2013
  } & {
2033
2014
  v4: {
2034
- dynamicData: {
2035
- chainId: {
2036
- ":chainId": {
2037
- token: {
2038
- ":tokenAddress": {
2039
- get: {
2040
- body: unknown;
2041
- params: {
2042
- chainId: number;
2043
- tokenAddress: string;
2044
- };
2045
- query: unknown;
2046
- headers: {
2047
- authorization: string;
2048
- };
2049
- response: {
2050
- 200: {
2051
- tvl: number;
2052
- totalSupply: number;
2053
- cardName: string;
2054
- blacklistedSupply: number;
2055
- priceTargetToken: number;
2056
- };
2057
- };
2058
- };
2015
+ "dynamic-data": {
2016
+ index: {
2017
+ get: {
2018
+ body: unknown;
2019
+ params: {};
2020
+ query: {
2021
+ chainId: number;
2022
+ tokenAddress: string;
2023
+ };
2024
+ headers: {
2025
+ authorization: string;
2026
+ };
2027
+ response: {
2028
+ 200: {
2029
+ tvl: number;
2030
+ totalSupply: number;
2031
+ cardName: string;
2032
+ blacklistedSupply: number;
2033
+ priceTargetToken: number;
2059
2034
  };
2060
2035
  };
2061
2036
  };
@@ -2064,11 +2039,11 @@ export declare const v4: Elysia<"/v4", false, {
2064
2039
  };
2065
2040
  } & {
2066
2041
  v4: {
2067
- campaignStatus: {
2042
+ "campaign-status": {
2068
2043
  engine: {
2069
- post: {
2070
- body: {
2071
- status: {
2044
+ ":campaignId": {
2045
+ put: {
2046
+ body: {
2072
2047
  value: "SUCCESS";
2073
2048
  computedUntil: number;
2074
2049
  } | {
@@ -2082,90 +2057,74 @@ export declare const v4: Elysia<"/v4", false, {
2082
2057
  details: string;
2083
2058
  value: "FAILED";
2084
2059
  };
2085
- campaignId: string;
2086
- distributionChain: number;
2087
- };
2088
- params: {};
2089
- query: unknown;
2090
- headers: {
2091
- authorization: string;
2092
- };
2093
- response: {
2094
- 200: void;
2060
+ params: {
2061
+ campaignId: string;
2062
+ };
2063
+ query: unknown;
2064
+ headers: {
2065
+ authorization: string;
2066
+ };
2067
+ response: {
2068
+ 200: void;
2069
+ };
2095
2070
  };
2096
2071
  };
2097
2072
  };
2098
2073
  };
2099
2074
  } & {
2100
- campaignStatus: {
2101
- index: {
2102
- get: {
2103
- body: unknown;
2104
- params: {};
2105
- query: unknown;
2106
- headers: unknown;
2107
- response: {
2108
- 200: {
2109
- error: string;
2110
- details: import("database/api/.generated/runtime/library").JsonValue;
2111
- status: import("../../../database/api/.generated").$Enums.RunStatus;
2075
+ "campaign-status": {
2076
+ engine: {
2077
+ overlaps: {
2078
+ get: {
2079
+ body: unknown;
2080
+ params: {};
2081
+ query: {
2112
2082
  campaignId: string;
2113
- computedUntil: bigint;
2114
- processingStarted: bigint;
2115
- }[];
2083
+ distributionChain: number;
2084
+ };
2085
+ headers: {
2086
+ authorization: string;
2087
+ };
2088
+ response: {
2089
+ 200: boolean;
2090
+ };
2116
2091
  };
2117
2092
  };
2118
2093
  };
2119
2094
  };
2120
2095
  } & {
2121
- campaignStatus: {
2122
- status: {
2096
+ "campaign-status": {
2097
+ index: {
2123
2098
  get: {
2124
2099
  body: unknown;
2125
2100
  params: {};
2126
2101
  query: {
2127
- status: "PROCESSING" | "SUCCESS" | "FAILED" | "SKIPPED" | ("PROCESSING" | "SUCCESS" | "FAILED" | "SKIPPED")[];
2102
+ status?: "PROCESSING" | "SUCCESS" | "FAILED" | "SKIPPED" | ("PROCESSING" | "SUCCESS" | "FAILED" | "SKIPPED")[] | undefined;
2103
+ computeChainId?: number | undefined;
2128
2104
  };
2129
2105
  headers: unknown;
2130
2106
  response: {
2131
- 200: ({
2132
- Campaign: {
2133
- type: import("../../../database/api/.generated").$Enums.CampaignType;
2134
- id: string;
2135
- params: import("database/api/.generated/runtime/library").JsonValue;
2136
- subType: number | null;
2137
- startTimestamp: bigint;
2138
- endTimestamp: bigint;
2139
- computeChainId: number;
2140
- distributionChainId: number;
2141
- campaignId: string;
2142
- rewardTokenId: string;
2143
- amount: string;
2144
- opportunityId: string;
2145
- creatorAddress: string;
2146
- };
2147
- } & {
2107
+ 200: {
2148
2108
  error: string;
2149
2109
  details: import("database/api/.generated/runtime/library").JsonValue;
2150
2110
  status: import("../../../database/api/.generated").$Enums.RunStatus;
2151
2111
  campaignId: string;
2152
2112
  computedUntil: bigint;
2153
2113
  processingStarted: bigint;
2154
- })[];
2114
+ }[];
2155
2115
  };
2156
2116
  };
2157
2117
  };
2158
2118
  };
2159
2119
  } & {
2160
- campaignStatus: {
2161
- unique: {
2120
+ "campaign-status": {
2121
+ ":campaignId": {
2162
2122
  get: {
2163
2123
  body: unknown;
2164
- params: {};
2165
- query: {
2124
+ params: {
2166
2125
  campaignId: string;
2167
- distributionChain: number;
2168
2126
  };
2127
+ query: unknown;
2169
2128
  headers: unknown;
2170
2129
  response: {
2171
2130
  200: {
@@ -2180,52 +2139,6 @@ export declare const v4: Elysia<"/v4", false, {
2180
2139
  };
2181
2140
  };
2182
2141
  };
2183
- } & {
2184
- campaignStatus: {
2185
- computeChain: {
2186
- ":chainId": {
2187
- get: {
2188
- body: unknown;
2189
- params: {
2190
- chainId: number;
2191
- };
2192
- query: unknown;
2193
- headers: unknown;
2194
- response: {
2195
- 200: {
2196
- error: string;
2197
- details: import("database/api/.generated/runtime/library").JsonValue;
2198
- status: import("../../../database/api/.generated").$Enums.RunStatus;
2199
- campaignId: string;
2200
- computedUntil: bigint;
2201
- processingStarted: bigint;
2202
- }[];
2203
- };
2204
- };
2205
- };
2206
- };
2207
- };
2208
- } & {
2209
- campaignStatus: {
2210
- engine: {
2211
- overlaps: {
2212
- get: {
2213
- body: unknown;
2214
- params: {};
2215
- query: {
2216
- campaignId: string;
2217
- distributionChain: number;
2218
- };
2219
- headers: {
2220
- authorization: string;
2221
- };
2222
- response: {
2223
- 200: boolean;
2224
- };
2225
- };
2226
- };
2227
- };
2228
- };
2229
2142
  };
2230
2143
  }, {
2231
2144
  derive: {};
@@ -14,8 +14,8 @@ import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
14
14
  import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
15
15
  import Elysia from "elysia";
16
16
  import { DynamicDataController } from "./dynamicData";
17
+ import { InteractionController } from "./interaction/interaction.controller";
17
18
  import { MerklRootController } from "./merklRoot";
18
- import { ParticipateController } from "./participate/participate.controller";
19
19
  import { StatusController } from "./status";
20
20
  import { UserController } from "./user";
21
21
  // ─── V4 Router ───────────────────────────────────────────────────────────────
@@ -51,7 +51,7 @@ export const v4 = new Elysia({ tags: ["v4"], prefix: "/v4" })
51
51
  .use(BlacklistController)
52
52
  .use(UserController)
53
53
  .use(MerklRootController)
54
- .use(ParticipateController)
54
+ .use(InteractionController)
55
55
  .use(AccountingController)
56
56
  .use(DynamicDataController)
57
57
  .use(StatusController);