@merkl/api 0.10.316 → 0.10.317

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.
@@ -2263,8 +2263,16 @@ declare const eden: {
2263
2263
  };
2264
2264
  fetch?: RequestInit | undefined;
2265
2265
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2266
- [x: string]: any;
2267
- 200: any;
2266
+ 200: {
2267
+ version: string;
2268
+ chainId: string;
2269
+ createdAt: number;
2270
+ meta: {
2271
+ name: string;
2272
+ txBuilderVersion: string;
2273
+ };
2274
+ transactions: import("../modules/v4/programPayload").transaction[];
2275
+ };
2268
2276
  }>>;
2269
2277
  };
2270
2278
  config: {
@@ -2320,8 +2328,16 @@ declare const eden: {
2320
2328
  };
2321
2329
  fetch?: RequestInit | undefined;
2322
2330
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2323
- [x: string]: any;
2324
- 200: any;
2331
+ 200: {
2332
+ version: string;
2333
+ chainId: string;
2334
+ createdAt: number;
2335
+ meta: {
2336
+ name: string;
2337
+ txBuilderVersion: string;
2338
+ };
2339
+ transactions: import("../modules/v4/programPayload").transaction[];
2340
+ } | null;
2325
2341
  }>>;
2326
2342
  withAmounts: {
2327
2343
  post: (body: {
@@ -2339,8 +2355,64 @@ declare const eden: {
2339
2355
  };
2340
2356
  fetch?: RequestInit | undefined;
2341
2357
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2342
- [x: string]: any;
2343
- 200: any;
2358
+ 200: {
2359
+ version: string;
2360
+ chainId: string;
2361
+ createdAt: number;
2362
+ meta: {
2363
+ name: string;
2364
+ txBuilderVersion: string;
2365
+ };
2366
+ transactions: import("../modules/v4/programPayload").transaction[];
2367
+ } | null;
2368
+ }>>;
2369
+ };
2370
+ };
2371
+ payload: {
2372
+ "from-config": {
2373
+ post: (body: {
2374
+ url?: string | undefined;
2375
+ endTimestamp?: number | undefined;
2376
+ poolAddress?: string | undefined;
2377
+ marketId?: string | undefined;
2378
+ strategy?: string | undefined;
2379
+ poolId?: string | undefined;
2380
+ contract?: string | undefined;
2381
+ forwarders?: {}[] | undefined;
2382
+ targetToken?: string | undefined;
2383
+ isOutOfRangeIncentivized?: boolean | undefined;
2384
+ weightFees?: number | undefined;
2385
+ weightToken0?: number | undefined;
2386
+ weightToken1?: number | undefined;
2387
+ usesBlockNumber?: boolean | undefined;
2388
+ snapshotTimestamp?: number | undefined;
2389
+ snapshotBlockNumber?: number | undefined;
2390
+ jsonUrl?: string | undefined;
2391
+ subCampaignType?: number | undefined;
2392
+ repository?: string | undefined;
2393
+ capInUSD?: string | undefined;
2394
+ compFork?: number | undefined;
2395
+ evkAddress?: string | undefined;
2396
+ collateralAddress?: string | undefined;
2397
+ hooks: {}[];
2398
+ creator: string;
2399
+ startTimestamp: number;
2400
+ computeChainId: number;
2401
+ distributionChainId: number;
2402
+ amount: string;
2403
+ blacklist: string[];
2404
+ rewardToken: string;
2405
+ campaignType: number;
2406
+ whitelist: string[];
2407
+ }, options?: {
2408
+ headers?: Record<string, unknown> | undefined;
2409
+ query?: Record<string, unknown> | undefined;
2410
+ fetch?: RequestInit | undefined;
2411
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
2412
+ 200: {
2413
+ safePayload: import("../modules/v4/programPayload").safePayload;
2414
+ nonEncodedConfig: any;
2415
+ };
2344
2416
  }>>;
2345
2417
  };
2346
2418
  };
@@ -5756,8 +5828,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5756
5828
  };
5757
5829
  headers: unknown;
5758
5830
  response: {
5759
- [x: string]: any;
5760
- 200: any;
5831
+ 200: {
5832
+ version: string;
5833
+ chainId: string;
5834
+ createdAt: number;
5835
+ meta: {
5836
+ name: string;
5837
+ txBuilderVersion: string;
5838
+ };
5839
+ transactions: import("../modules/v4/programPayload").transaction[];
5840
+ };
5761
5841
  };
5762
5842
  };
5763
5843
  };
@@ -5828,8 +5908,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5828
5908
  };
5829
5909
  headers: unknown;
5830
5910
  response: {
5831
- [x: string]: any;
5832
- 200: any;
5911
+ 200: {
5912
+ version: string;
5913
+ chainId: string;
5914
+ createdAt: number;
5915
+ meta: {
5916
+ name: string;
5917
+ txBuilderVersion: string;
5918
+ };
5919
+ transactions: import("../modules/v4/programPayload").transaction[];
5920
+ } | null;
5833
5921
  };
5834
5922
  };
5835
5923
  };
@@ -5854,8 +5942,69 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5854
5942
  };
5855
5943
  headers: unknown;
5856
5944
  response: {
5857
- [x: string]: any;
5858
- 200: any;
5945
+ 200: {
5946
+ version: string;
5947
+ chainId: string;
5948
+ createdAt: number;
5949
+ meta: {
5950
+ name: string;
5951
+ txBuilderVersion: string;
5952
+ };
5953
+ transactions: import("../modules/v4/programPayload").transaction[];
5954
+ } | null;
5955
+ };
5956
+ };
5957
+ };
5958
+ };
5959
+ };
5960
+ } & {
5961
+ "program-payload": {
5962
+ payload: {
5963
+ "from-config": {
5964
+ post: {
5965
+ body: {
5966
+ url?: string | undefined;
5967
+ endTimestamp?: number | undefined;
5968
+ poolAddress?: string | undefined;
5969
+ marketId?: string | undefined;
5970
+ strategy?: string | undefined;
5971
+ poolId?: string | undefined;
5972
+ contract?: string | undefined;
5973
+ forwarders?: {}[] | undefined;
5974
+ targetToken?: string | undefined;
5975
+ isOutOfRangeIncentivized?: boolean | undefined;
5976
+ weightFees?: number | undefined;
5977
+ weightToken0?: number | undefined;
5978
+ weightToken1?: number | undefined;
5979
+ usesBlockNumber?: boolean | undefined;
5980
+ snapshotTimestamp?: number | undefined;
5981
+ snapshotBlockNumber?: number | undefined;
5982
+ jsonUrl?: string | undefined;
5983
+ subCampaignType?: number | undefined;
5984
+ repository?: string | undefined;
5985
+ capInUSD?: string | undefined;
5986
+ compFork?: number | undefined;
5987
+ evkAddress?: string | undefined;
5988
+ collateralAddress?: string | undefined;
5989
+ hooks: {}[];
5990
+ creator: string;
5991
+ startTimestamp: number;
5992
+ computeChainId: number;
5993
+ distributionChainId: number;
5994
+ amount: string;
5995
+ blacklist: string[];
5996
+ rewardToken: string;
5997
+ campaignType: number;
5998
+ whitelist: string[];
5999
+ };
6000
+ params: {};
6001
+ query: unknown;
6002
+ headers: unknown;
6003
+ response: {
6004
+ 200: {
6005
+ safePayload: import("../modules/v4/programPayload").safePayload;
6006
+ nonEncodedConfig: any;
6007
+ };
5859
6008
  };
5860
6009
  };
5861
6010
  };
@@ -8909,8 +9058,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8909
9058
  };
8910
9059
  fetch?: RequestInit | undefined;
8911
9060
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8912
- [x: string]: any;
8913
- 200: any;
9061
+ 200: {
9062
+ version: string;
9063
+ chainId: string;
9064
+ createdAt: number;
9065
+ meta: {
9066
+ name: string;
9067
+ txBuilderVersion: string;
9068
+ };
9069
+ transactions: import("../modules/v4/programPayload").transaction[];
9070
+ };
8914
9071
  }>>;
8915
9072
  };
8916
9073
  config: {
@@ -8966,8 +9123,16 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8966
9123
  };
8967
9124
  fetch?: RequestInit | undefined;
8968
9125
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8969
- [x: string]: any;
8970
- 200: any;
9126
+ 200: {
9127
+ version: string;
9128
+ chainId: string;
9129
+ createdAt: number;
9130
+ meta: {
9131
+ name: string;
9132
+ txBuilderVersion: string;
9133
+ };
9134
+ transactions: import("../modules/v4/programPayload").transaction[];
9135
+ } | null;
8971
9136
  }>>;
8972
9137
  withAmounts: {
8973
9138
  post: (body: {
@@ -8985,8 +9150,64 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8985
9150
  };
8986
9151
  fetch?: RequestInit | undefined;
8987
9152
  }) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8988
- [x: string]: any;
8989
- 200: any;
9153
+ 200: {
9154
+ version: string;
9155
+ chainId: string;
9156
+ createdAt: number;
9157
+ meta: {
9158
+ name: string;
9159
+ txBuilderVersion: string;
9160
+ };
9161
+ transactions: import("../modules/v4/programPayload").transaction[];
9162
+ } | null;
9163
+ }>>;
9164
+ };
9165
+ };
9166
+ payload: {
9167
+ "from-config": {
9168
+ post: (body: {
9169
+ url?: string | undefined;
9170
+ endTimestamp?: number | undefined;
9171
+ poolAddress?: string | undefined;
9172
+ marketId?: string | undefined;
9173
+ strategy?: string | undefined;
9174
+ poolId?: string | undefined;
9175
+ contract?: string | undefined;
9176
+ forwarders?: {}[] | undefined;
9177
+ targetToken?: string | undefined;
9178
+ isOutOfRangeIncentivized?: boolean | undefined;
9179
+ weightFees?: number | undefined;
9180
+ weightToken0?: number | undefined;
9181
+ weightToken1?: number | undefined;
9182
+ usesBlockNumber?: boolean | undefined;
9183
+ snapshotTimestamp?: number | undefined;
9184
+ snapshotBlockNumber?: number | undefined;
9185
+ jsonUrl?: string | undefined;
9186
+ subCampaignType?: number | undefined;
9187
+ repository?: string | undefined;
9188
+ capInUSD?: string | undefined;
9189
+ compFork?: number | undefined;
9190
+ evkAddress?: string | undefined;
9191
+ collateralAddress?: string | undefined;
9192
+ hooks: {}[];
9193
+ creator: string;
9194
+ startTimestamp: number;
9195
+ computeChainId: number;
9196
+ distributionChainId: number;
9197
+ amount: string;
9198
+ blacklist: string[];
9199
+ rewardToken: string;
9200
+ campaignType: number;
9201
+ whitelist: string[];
9202
+ }, options?: {
9203
+ headers?: Record<string, unknown> | undefined;
9204
+ query?: Record<string, unknown> | undefined;
9205
+ fetch?: RequestInit | undefined;
9206
+ } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
9207
+ 200: {
9208
+ safePayload: import("../modules/v4/programPayload").safePayload;
9209
+ nonEncodedConfig: any;
9210
+ };
8990
9211
  }>>;
8991
9212
  };
8992
9213
  };
@@ -2807,8 +2807,16 @@ declare const app: Elysia<"", false, {
2807
2807
  };
2808
2808
  headers: unknown;
2809
2809
  response: {
2810
- [x: string]: any;
2811
- 200: any;
2810
+ 200: {
2811
+ version: string;
2812
+ chainId: string;
2813
+ createdAt: number;
2814
+ meta: {
2815
+ name: string;
2816
+ txBuilderVersion: string;
2817
+ };
2818
+ transactions: import("./modules/v4/programPayload").transaction[];
2819
+ };
2812
2820
  };
2813
2821
  };
2814
2822
  };
@@ -2879,8 +2887,16 @@ declare const app: Elysia<"", false, {
2879
2887
  };
2880
2888
  headers: unknown;
2881
2889
  response: {
2882
- [x: string]: any;
2883
- 200: any;
2890
+ 200: {
2891
+ version: string;
2892
+ chainId: string;
2893
+ createdAt: number;
2894
+ meta: {
2895
+ name: string;
2896
+ txBuilderVersion: string;
2897
+ };
2898
+ transactions: import("./modules/v4/programPayload").transaction[];
2899
+ } | null;
2884
2900
  };
2885
2901
  };
2886
2902
  };
@@ -2905,8 +2921,69 @@ declare const app: Elysia<"", false, {
2905
2921
  };
2906
2922
  headers: unknown;
2907
2923
  response: {
2908
- [x: string]: any;
2909
- 200: any;
2924
+ 200: {
2925
+ version: string;
2926
+ chainId: string;
2927
+ createdAt: number;
2928
+ meta: {
2929
+ name: string;
2930
+ txBuilderVersion: string;
2931
+ };
2932
+ transactions: import("./modules/v4/programPayload").transaction[];
2933
+ } | null;
2934
+ };
2935
+ };
2936
+ };
2937
+ };
2938
+ };
2939
+ } & {
2940
+ "program-payload": {
2941
+ payload: {
2942
+ "from-config": {
2943
+ post: {
2944
+ body: {
2945
+ url?: string | undefined;
2946
+ endTimestamp?: number | undefined;
2947
+ poolAddress?: string | undefined;
2948
+ marketId?: string | undefined;
2949
+ strategy?: string | undefined;
2950
+ poolId?: string | undefined;
2951
+ contract?: string | undefined;
2952
+ forwarders?: {}[] | undefined;
2953
+ targetToken?: string | undefined;
2954
+ isOutOfRangeIncentivized?: boolean | undefined;
2955
+ weightFees?: number | undefined;
2956
+ weightToken0?: number | undefined;
2957
+ weightToken1?: number | undefined;
2958
+ usesBlockNumber?: boolean | undefined;
2959
+ snapshotTimestamp?: number | undefined;
2960
+ snapshotBlockNumber?: number | undefined;
2961
+ jsonUrl?: string | undefined;
2962
+ subCampaignType?: number | undefined;
2963
+ repository?: string | undefined;
2964
+ capInUSD?: string | undefined;
2965
+ compFork?: number | undefined;
2966
+ evkAddress?: string | undefined;
2967
+ collateralAddress?: string | undefined;
2968
+ hooks: {}[];
2969
+ creator: string;
2970
+ startTimestamp: number;
2971
+ computeChainId: number;
2972
+ distributionChainId: number;
2973
+ amount: string;
2974
+ blacklist: string[];
2975
+ rewardToken: string;
2976
+ campaignType: number;
2977
+ whitelist: string[];
2978
+ };
2979
+ params: {};
2980
+ query: unknown;
2981
+ headers: unknown;
2982
+ response: {
2983
+ 200: {
2984
+ safePayload: import("./modules/v4/programPayload").safePayload;
2985
+ nonEncodedConfig: any;
2986
+ };
2910
2987
  };
2911
2988
  };
2912
2989
  };
@@ -29,8 +29,16 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
29
29
  };
30
30
  headers: unknown;
31
31
  response: {
32
- [x: string]: any;
33
- 200: any;
32
+ 200: {
33
+ version: string;
34
+ chainId: string;
35
+ createdAt: number;
36
+ meta: {
37
+ name: string;
38
+ txBuilderVersion: string;
39
+ };
40
+ transactions: import("./programPayload.model").transaction[];
41
+ };
34
42
  };
35
43
  };
36
44
  };
@@ -101,8 +109,16 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
101
109
  };
102
110
  headers: unknown;
103
111
  response: {
104
- [x: string]: any;
105
- 200: any;
112
+ 200: {
113
+ version: string;
114
+ chainId: string;
115
+ createdAt: number;
116
+ meta: {
117
+ name: string;
118
+ txBuilderVersion: string;
119
+ };
120
+ transactions: import("./programPayload.model").transaction[];
121
+ } | null;
106
122
  };
107
123
  };
108
124
  };
@@ -127,8 +143,69 @@ export declare const ProgramPayloadController: Elysia<"/program-payload", false,
127
143
  };
128
144
  headers: unknown;
129
145
  response: {
130
- [x: string]: any;
131
- 200: any;
146
+ 200: {
147
+ version: string;
148
+ chainId: string;
149
+ createdAt: number;
150
+ meta: {
151
+ name: string;
152
+ txBuilderVersion: string;
153
+ };
154
+ transactions: import("./programPayload.model").transaction[];
155
+ } | null;
156
+ };
157
+ };
158
+ };
159
+ };
160
+ };
161
+ } & {
162
+ "program-payload": {
163
+ payload: {
164
+ "from-config": {
165
+ post: {
166
+ body: {
167
+ url?: string | undefined;
168
+ endTimestamp?: number | undefined;
169
+ poolAddress?: string | undefined;
170
+ marketId?: string | undefined;
171
+ strategy?: string | undefined;
172
+ poolId?: string | undefined;
173
+ contract?: string | undefined;
174
+ forwarders?: {}[] | undefined;
175
+ targetToken?: string | undefined;
176
+ isOutOfRangeIncentivized?: boolean | undefined;
177
+ weightFees?: number | undefined;
178
+ weightToken0?: number | undefined;
179
+ weightToken1?: number | undefined;
180
+ usesBlockNumber?: boolean | undefined;
181
+ snapshotTimestamp?: number | undefined;
182
+ snapshotBlockNumber?: number | undefined;
183
+ jsonUrl?: string | undefined;
184
+ subCampaignType?: number | undefined;
185
+ repository?: string | undefined;
186
+ capInUSD?: string | undefined;
187
+ compFork?: number | undefined;
188
+ evkAddress?: string | undefined;
189
+ collateralAddress?: string | undefined;
190
+ hooks: {}[];
191
+ creator: string;
192
+ startTimestamp: number;
193
+ computeChainId: number;
194
+ distributionChainId: number;
195
+ amount: string;
196
+ blacklist: string[];
197
+ rewardToken: string;
198
+ campaignType: number;
199
+ whitelist: string[];
200
+ };
201
+ params: {};
202
+ query: unknown;
203
+ headers: unknown;
204
+ response: {
205
+ 200: {
206
+ safePayload: import("./programPayload.model").safePayload;
207
+ nonEncodedConfig: any;
208
+ };
132
209
  };
133
210
  };
134
211
  };
@@ -1,7 +1,7 @@
1
1
  // import { AuthorizationHeadersDto, BackOfficeGuard } from "../../../guards/BackOffice.guard";
2
2
  import Elysia from "elysia";
3
3
  import { throwOnUnsupportedChainId } from "src/utils/throw";
4
- import { CampaignAmountsInputDto, CampaignPayloadInputDto, ProgramPayloadInputDto } from "./programPayload.model";
4
+ import { CampaignAmountsInputDto, CampaignPayloadInputDto, ProgramPayloadInputDto, SinglePayloadInputDto, } from "./programPayload.model";
5
5
  import { ProgramPayloadService } from "./programPayload.service";
6
6
  // ─── ProgramPaylod Controller ───────────────────────────────────────────────────────
7
7
  export const ProgramPayloadController = new Elysia({ prefix: "/program-payload", detail: { tags: ["ProgramPayload"] } })
@@ -25,6 +25,7 @@ export const ProgramPayloadController = new Elysia({ prefix: "/program-payload",
25
25
  // BackOfficeGuard({ headers });
26
26
  throwOnUnsupportedChainId(query.distributionChainId);
27
27
  },
28
+ detail: { description: "Generate the configuration for a specific hardcoded campaign from a program" },
28
29
  })
29
30
  .get("/campaignData", async ({ query }) => {
30
31
  return ProgramPayloadService.buildCampaignData(query);
@@ -35,6 +36,7 @@ export const ProgramPayloadController = new Elysia({ prefix: "/program-payload",
35
36
  // BackOfficeGuard({ headers });
36
37
  throwOnUnsupportedChainId(query.distributionChainId);
37
38
  },
39
+ detail: { description: "Generate the campaign data for a specific hardcoded campaign from a program" },
38
40
  })
39
41
  .get("/program", async ({ query }) => {
40
42
  return ProgramPayloadService.buildProgramPayload(query);
@@ -45,6 +47,7 @@ export const ProgramPayloadController = new Elysia({ prefix: "/program-payload",
45
47
  // BackOfficeGuard({ headers });
46
48
  throwOnUnsupportedChainId(query.distributionChainId);
47
49
  },
50
+ detail: { description: "Generate the complete payload for a program" },
48
51
  })
49
52
  .post("/program/withAmounts", async ({ query, body }) => {
50
53
  return ProgramPayloadService.buildProgramPayloadWithAmounts(query, body);
@@ -54,4 +57,11 @@ export const ProgramPayloadController = new Elysia({ prefix: "/program-payload",
54
57
  beforeHandle: ({ query }) => {
55
58
  throwOnUnsupportedChainId(query.distributionChainId);
56
59
  },
60
+ detail: { description: "Generate the payload with the campaigns and amounts provided" },
61
+ })
62
+ .post("/payload/from-config", async ({ body }) => {
63
+ return ProgramPayloadService.buildPayloadFromConfig(body);
64
+ }, {
65
+ body: SinglePayloadInputDto,
66
+ detail: { description: "BETA FEATURE : Generate the payload from a config file." },
57
67
  });