@merkl/api 0.10.126 → 0.10.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -85,5 +85,5 @@
85
85
  "access": "public",
86
86
  "registry": "https://registry.npmjs.org/"
87
87
  },
88
- "version": "v0.10.126"
88
+ "version": "v0.10.127"
89
89
  }
@@ -53,6 +53,18 @@ declare const eden: {
53
53
  value: number;
54
54
  campaignId: string;
55
55
  dailyRewardsRecordId: string;
56
+ token: {
57
+ symbol: string;
58
+ name: string | null;
59
+ id: string;
60
+ chainId: number;
61
+ address: string;
62
+ icon: string;
63
+ decimals: number;
64
+ verified: boolean;
65
+ price: number | null;
66
+ };
67
+ amount: bigint;
56
68
  }[];
57
69
  };
58
70
  id: string;
@@ -131,6 +143,18 @@ declare const eden: {
131
143
  value: number;
132
144
  campaignId: string;
133
145
  dailyRewardsRecordId: string;
146
+ token: {
147
+ symbol: string;
148
+ name: string | null;
149
+ id: string;
150
+ chainId: number;
151
+ address: string;
152
+ icon: string;
153
+ decimals: number;
154
+ verified: boolean;
155
+ price: number | null;
156
+ };
157
+ amount: bigint;
134
158
  }[];
135
159
  };
136
160
  id: string;
@@ -282,6 +306,18 @@ declare const eden: {
282
306
  value: number;
283
307
  campaignId: string;
284
308
  dailyRewardsRecordId: string;
309
+ token: {
310
+ symbol: string;
311
+ name: string | null;
312
+ id: string;
313
+ chainId: number;
314
+ address: string;
315
+ icon: string;
316
+ decimals: number;
317
+ verified: boolean;
318
+ price: number | null;
319
+ };
320
+ amount: bigint;
285
321
  }[];
286
322
  };
287
323
  id: string;
@@ -1853,6 +1889,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
1853
1889
  value: number;
1854
1890
  campaignId: string;
1855
1891
  dailyRewardsRecordId: string;
1892
+ token: {
1893
+ symbol: string;
1894
+ name: string | null;
1895
+ id: string;
1896
+ chainId: number;
1897
+ address: string;
1898
+ icon: string;
1899
+ decimals: number;
1900
+ verified: boolean;
1901
+ price: number | null;
1902
+ };
1903
+ amount: bigint;
1856
1904
  }[];
1857
1905
  };
1858
1906
  id: string;
@@ -1940,6 +1988,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
1940
1988
  value: number;
1941
1989
  campaignId: string;
1942
1990
  dailyRewardsRecordId: string;
1991
+ token: {
1992
+ symbol: string;
1993
+ name: string | null;
1994
+ id: string;
1995
+ chainId: number;
1996
+ address: string;
1997
+ icon: string;
1998
+ decimals: number;
1999
+ verified: boolean;
2000
+ price: number | null;
2001
+ };
2002
+ amount: bigint;
1943
2003
  }[];
1944
2004
  };
1945
2005
  id: string;
@@ -2074,6 +2134,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
2074
2134
  value: number;
2075
2135
  campaignId: string;
2076
2136
  dailyRewardsRecordId: string;
2137
+ token: {
2138
+ symbol: string;
2139
+ name: string | null;
2140
+ id: string;
2141
+ chainId: number;
2142
+ address: string;
2143
+ icon: string;
2144
+ decimals: number;
2145
+ verified: boolean;
2146
+ price: number | null;
2147
+ };
2148
+ amount: bigint;
2077
2149
  }[];
2078
2150
  };
2079
2151
  id: string;
@@ -3979,6 +4051,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
3979
4051
  value: number;
3980
4052
  campaignId: string;
3981
4053
  dailyRewardsRecordId: string;
4054
+ token: {
4055
+ symbol: string;
4056
+ name: string | null;
4057
+ id: string;
4058
+ chainId: number;
4059
+ address: string;
4060
+ icon: string;
4061
+ decimals: number;
4062
+ verified: boolean;
4063
+ price: number | null;
4064
+ };
4065
+ amount: bigint;
3982
4066
  }[];
3983
4067
  };
3984
4068
  id: string;
@@ -4057,6 +4141,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4057
4141
  value: number;
4058
4142
  campaignId: string;
4059
4143
  dailyRewardsRecordId: string;
4144
+ token: {
4145
+ symbol: string;
4146
+ name: string | null;
4147
+ id: string;
4148
+ chainId: number;
4149
+ address: string;
4150
+ icon: string;
4151
+ decimals: number;
4152
+ verified: boolean;
4153
+ price: number | null;
4154
+ };
4155
+ amount: bigint;
4060
4156
  }[];
4061
4157
  };
4062
4158
  id: string;
@@ -4208,6 +4304,18 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
4208
4304
  value: number;
4209
4305
  campaignId: string;
4210
4306
  dailyRewardsRecordId: string;
4307
+ token: {
4308
+ symbol: string;
4309
+ name: string | null;
4310
+ id: string;
4311
+ chainId: number;
4312
+ address: string;
4313
+ icon: string;
4314
+ decimals: number;
4315
+ verified: boolean;
4316
+ price: number | null;
4317
+ };
4318
+ amount: bigint;
4211
4319
  }[];
4212
4320
  };
4213
4321
  id: string;
@@ -110,6 +110,18 @@ declare const app: Elysia<"", false, {
110
110
  value: number;
111
111
  campaignId: string;
112
112
  dailyRewardsRecordId: string;
113
+ token: {
114
+ symbol: string;
115
+ name: string | null;
116
+ id: string;
117
+ chainId: number;
118
+ address: string;
119
+ icon: string;
120
+ decimals: number;
121
+ verified: boolean;
122
+ price: number | null;
123
+ };
124
+ amount: bigint;
113
125
  }[];
114
126
  };
115
127
  id: string;
@@ -197,6 +209,18 @@ declare const app: Elysia<"", false, {
197
209
  value: number;
198
210
  campaignId: string;
199
211
  dailyRewardsRecordId: string;
212
+ token: {
213
+ symbol: string;
214
+ name: string | null;
215
+ id: string;
216
+ chainId: number;
217
+ address: string;
218
+ icon: string;
219
+ decimals: number;
220
+ verified: boolean;
221
+ price: number | null;
222
+ };
223
+ amount: bigint;
200
224
  }[];
201
225
  };
202
226
  id: string;
@@ -331,6 +355,18 @@ declare const app: Elysia<"", false, {
331
355
  value: number;
332
356
  campaignId: string;
333
357
  dailyRewardsRecordId: string;
358
+ token: {
359
+ symbol: string;
360
+ name: string | null;
361
+ id: string;
362
+ chainId: number;
363
+ address: string;
364
+ icon: string;
365
+ decimals: number;
366
+ verified: boolean;
367
+ price: number | null;
368
+ };
369
+ amount: bigint;
334
370
  }[];
335
371
  };
336
372
  id: string;
@@ -196,4 +196,12 @@ export declare abstract class CampaignService {
196
196
  * @returns
197
197
  */
198
198
  static fetchDynamicData<C extends CampaignType>(chainId: number, campaignType: CampaignType, campaigns: CampaignParameters<ConvertedCampaignType<C>>[]): Promise<any>;
199
+ /**
200
+ * Shortcut to get daily amount from total
201
+ * @param start timestamp
202
+ * @param end timestamp
203
+ * @param amount
204
+ * @returns daily token amount
205
+ */
206
+ static getDailyAmount<T extends bigint | number>(start: T, end: T, amount: bigint): bigint;
199
207
  }
@@ -83,6 +83,18 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
83
83
  value: number;
84
84
  campaignId: string;
85
85
  dailyRewardsRecordId: string;
86
+ token: {
87
+ symbol: string;
88
+ name: string | null;
89
+ id: string;
90
+ chainId: number;
91
+ address: string;
92
+ icon: string;
93
+ decimals: number;
94
+ verified: boolean;
95
+ price: number | null;
96
+ };
97
+ amount: bigint;
86
98
  }[];
87
99
  };
88
100
  id: string;
@@ -170,6 +182,18 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
170
182
  value: number;
171
183
  campaignId: string;
172
184
  dailyRewardsRecordId: string;
185
+ token: {
186
+ symbol: string;
187
+ name: string | null;
188
+ id: string;
189
+ chainId: number;
190
+ address: string;
191
+ icon: string;
192
+ decimals: number;
193
+ verified: boolean;
194
+ price: number | null;
195
+ };
196
+ amount: bigint;
173
197
  }[];
174
198
  };
175
199
  id: string;
@@ -304,6 +328,18 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
304
328
  value: number;
305
329
  campaignId: string;
306
330
  dailyRewardsRecordId: string;
331
+ token: {
332
+ symbol: string;
333
+ name: string | null;
334
+ id: string;
335
+ chainId: number;
336
+ address: string;
337
+ icon: string;
338
+ decimals: number;
339
+ verified: boolean;
340
+ price: number | null;
341
+ };
342
+ amount: bigint;
307
343
  }[];
308
344
  };
309
345
  id: string;
@@ -68,12 +68,29 @@ export declare abstract class OpportunityRepository {
68
68
  cumulated: number;
69
69
  })[];
70
70
  DailyRewardsRecords: ({
71
- DailyRewardsBreakdown: {
71
+ DailyRewardsBreakdown: ({
72
+ Campaign: {
73
+ startTimestamp: bigint;
74
+ endTimestamp: bigint;
75
+ amount: string;
76
+ RewardToken: {
77
+ symbol: string;
78
+ name: string | null;
79
+ id: string;
80
+ chainId: number;
81
+ address: string;
82
+ icon: string;
83
+ decimals: number;
84
+ verified: boolean;
85
+ price: number | null;
86
+ };
87
+ };
88
+ } & {
72
89
  id: number;
73
90
  value: number;
74
91
  campaignId: string;
75
92
  dailyRewardsRecordId: string;
76
- }[];
93
+ })[];
77
94
  } & {
78
95
  total: number;
79
96
  id: string;
@@ -193,12 +210,29 @@ export declare abstract class OpportunityRepository {
193
210
  cumulated: number;
194
211
  })[];
195
212
  DailyRewardsRecords: ({
196
- DailyRewardsBreakdown: {
213
+ DailyRewardsBreakdown: ({
214
+ Campaign: {
215
+ startTimestamp: bigint;
216
+ endTimestamp: bigint;
217
+ amount: string;
218
+ RewardToken: {
219
+ symbol: string;
220
+ name: string | null;
221
+ id: string;
222
+ chainId: number;
223
+ address: string;
224
+ icon: string;
225
+ decimals: number;
226
+ verified: boolean;
227
+ price: number | null;
228
+ };
229
+ };
230
+ } & {
197
231
  id: number;
198
232
  value: number;
199
233
  campaignId: string;
200
234
  dailyRewardsRecordId: string;
201
- }[];
235
+ })[];
202
236
  } & {
203
237
  total: number;
204
238
  id: string;
@@ -311,12 +345,29 @@ export declare abstract class OpportunityRepository {
311
345
  cumulated: number;
312
346
  })[];
313
347
  DailyRewardsRecords: ({
314
- DailyRewardsBreakdown: {
348
+ DailyRewardsBreakdown: ({
349
+ Campaign: {
350
+ startTimestamp: bigint;
351
+ endTimestamp: bigint;
352
+ amount: string;
353
+ RewardToken: {
354
+ symbol: string;
355
+ name: string | null;
356
+ id: string;
357
+ chainId: number;
358
+ address: string;
359
+ icon: string;
360
+ decimals: number;
361
+ verified: boolean;
362
+ price: number | null;
363
+ };
364
+ };
365
+ } & {
315
366
  id: number;
316
367
  value: number;
317
368
  campaignId: string;
318
369
  dailyRewardsRecordId: string;
319
- }[];
370
+ })[];
320
371
  } & {
321
372
  total: number;
322
373
  id: string;
@@ -65,6 +65,18 @@ export declare abstract class OpportunityService {
65
65
  value: number;
66
66
  campaignId: string;
67
67
  dailyRewardsRecordId: string;
68
+ token: {
69
+ symbol: string;
70
+ name: string | null;
71
+ id: string;
72
+ chainId: number;
73
+ address: string;
74
+ icon: string;
75
+ decimals: number;
76
+ verified: boolean;
77
+ price: number | null;
78
+ };
79
+ amount: bigint;
68
80
  }[];
69
81
  };
70
82
  id: string;
@@ -173,6 +185,18 @@ export declare abstract class OpportunityService {
173
185
  value: number;
174
186
  campaignId: string;
175
187
  dailyRewardsRecordId: string;
188
+ token: {
189
+ symbol: string;
190
+ name: string | null;
191
+ id: string;
192
+ chainId: number;
193
+ address: string;
194
+ icon: string;
195
+ decimals: number;
196
+ verified: boolean;
197
+ price: number | null;
198
+ };
199
+ amount: bigint;
176
200
  }[];
177
201
  };
178
202
  id: string;
@@ -249,6 +273,18 @@ export declare abstract class OpportunityService {
249
273
  value: number;
250
274
  campaignId: string;
251
275
  dailyRewardsRecordId: string;
276
+ token: {
277
+ symbol: string;
278
+ name: string | null;
279
+ id: string;
280
+ chainId: number;
281
+ address: string;
282
+ icon: string;
283
+ decimals: number;
284
+ verified: boolean;
285
+ price: number | null;
286
+ };
287
+ amount: bigint;
252
288
  }[];
253
289
  };
254
290
  id: string;
@@ -330,6 +366,18 @@ export declare abstract class OpportunityService {
330
366
  value: number;
331
367
  campaignId: string;
332
368
  dailyRewardsRecordId: string;
369
+ token: {
370
+ symbol: string;
371
+ name: string | null;
372
+ id: string;
373
+ chainId: number;
374
+ address: string;
375
+ icon: string;
376
+ decimals: number;
377
+ verified: boolean;
378
+ price: number | null;
379
+ };
380
+ amount: bigint;
333
381
  }[];
334
382
  };
335
383
  id: string;
@@ -31,7 +31,10 @@ export type DailyRewardsRecord = Resource<"DailyRewardsRecord", "opportunityId"
31
31
  * @description Describes one rewards value of a campaign
32
32
  * @see {@link Resource}
33
33
  */
34
- export type DailyRewardsBreakdown = Resource<"DailyRewardsBreakdown", "id" | "dailyRewardsRecordId">;
34
+ export type DailyRewardsBreakdown = Resource<"DailyRewardsBreakdown", "id" | "dailyRewardsRecordId", {
35
+ token: Token["model"];
36
+ amount: bigint;
37
+ }>;
35
38
  export declare const CreateManyBreakdownDto: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
36
39
  distributionChainId: import("@sinclair/typebox").TNumber;
37
40
  rewardToken: import("@sinclair/typebox").TString;
@@ -92,6 +92,18 @@ export declare const v4: Elysia<"/v4", false, {
92
92
  value: number;
93
93
  campaignId: string;
94
94
  dailyRewardsRecordId: string;
95
+ token: {
96
+ symbol: string;
97
+ name: string | null;
98
+ id: string;
99
+ chainId: number;
100
+ address: string;
101
+ icon: string;
102
+ decimals: number;
103
+ verified: boolean;
104
+ price: number | null;
105
+ };
106
+ amount: bigint;
95
107
  }[];
96
108
  };
97
109
  id: string;
@@ -179,6 +191,18 @@ export declare const v4: Elysia<"/v4", false, {
179
191
  value: number;
180
192
  campaignId: string;
181
193
  dailyRewardsRecordId: string;
194
+ token: {
195
+ symbol: string;
196
+ name: string | null;
197
+ id: string;
198
+ chainId: number;
199
+ address: string;
200
+ icon: string;
201
+ decimals: number;
202
+ verified: boolean;
203
+ price: number | null;
204
+ };
205
+ amount: bigint;
182
206
  }[];
183
207
  };
184
208
  id: string;
@@ -313,6 +337,18 @@ export declare const v4: Elysia<"/v4", false, {
313
337
  value: number;
314
338
  campaignId: string;
315
339
  dailyRewardsRecordId: string;
340
+ token: {
341
+ symbol: string;
342
+ name: string | null;
343
+ id: string;
344
+ chainId: number;
345
+ address: string;
346
+ icon: string;
347
+ decimals: number;
348
+ verified: boolean;
349
+ price: number | null;
350
+ };
351
+ amount: bigint;
316
352
  }[];
317
353
  };
318
354
  id: string;
@@ -118,6 +118,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
118
118
  value: number;
119
119
  campaignId: string;
120
120
  dailyRewardsRecordId: string;
121
+ token: {
122
+ symbol: string;
123
+ name: string | null;
124
+ id: string;
125
+ chainId: number;
126
+ address: string;
127
+ icon: string;
128
+ decimals: number;
129
+ verified: boolean;
130
+ price: number | null;
131
+ };
132
+ amount: bigint;
121
133
  }[];
122
134
  };
123
135
  id: string;
@@ -205,6 +217,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
205
217
  value: number;
206
218
  campaignId: string;
207
219
  dailyRewardsRecordId: string;
220
+ token: {
221
+ symbol: string;
222
+ name: string | null;
223
+ id: string;
224
+ chainId: number;
225
+ address: string;
226
+ icon: string;
227
+ decimals: number;
228
+ verified: boolean;
229
+ price: number | null;
230
+ };
231
+ amount: bigint;
208
232
  }[];
209
233
  };
210
234
  id: string;
@@ -339,6 +363,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
339
363
  value: number;
340
364
  campaignId: string;
341
365
  dailyRewardsRecordId: string;
366
+ token: {
367
+ symbol: string;
368
+ name: string | null;
369
+ id: string;
370
+ chainId: number;
371
+ address: string;
372
+ icon: string;
373
+ decimals: number;
374
+ verified: boolean;
375
+ price: number | null;
376
+ };
377
+ amount: bigint;
342
378
  }[];
343
379
  };
344
380
  id: string;
@@ -116,6 +116,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
116
116
  value: number;
117
117
  campaignId: string;
118
118
  dailyRewardsRecordId: string;
119
+ token: {
120
+ symbol: string;
121
+ name: string | null;
122
+ id: string;
123
+ chainId: number;
124
+ address: string;
125
+ icon: string;
126
+ decimals: number;
127
+ verified: boolean;
128
+ price: number | null;
129
+ };
130
+ amount: bigint;
119
131
  }[];
120
132
  };
121
133
  id: string;
@@ -203,6 +215,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
203
215
  value: number;
204
216
  campaignId: string;
205
217
  dailyRewardsRecordId: string;
218
+ token: {
219
+ symbol: string;
220
+ name: string | null;
221
+ id: string;
222
+ chainId: number;
223
+ address: string;
224
+ icon: string;
225
+ decimals: number;
226
+ verified: boolean;
227
+ price: number | null;
228
+ };
229
+ amount: bigint;
206
230
  }[];
207
231
  };
208
232
  id: string;
@@ -337,6 +361,18 @@ declare const _default: (app: App) => import("elysia").default<"", false, {
337
361
  value: number;
338
362
  campaignId: string;
339
363
  dailyRewardsRecordId: string;
364
+ token: {
365
+ symbol: string;
366
+ name: string | null;
367
+ id: string;
368
+ chainId: number;
369
+ address: string;
370
+ icon: string;
371
+ decimals: number;
372
+ verified: boolean;
373
+ price: number | null;
374
+ };
375
+ amount: bigint;
340
376
  }[];
341
377
  };
342
378
  id: string;