@merkl/api 0.10.115 → 0.10.117
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/database/api/.generated/default.d.ts +1 -1
- package/dist/database/api/.generated/edge.d.ts +1 -1
- package/dist/database/api/.generated/index.d.ts +335 -311
- package/dist/database/api/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/api/.generated/package.json +15 -2
- package/dist/database/api/.generated/runtime/library.d.ts +195 -79
- package/dist/database/api/.generated/schema.prisma +1 -1
- package/dist/database/api/.generated/wasm.d.ts +1 -1
- package/dist/database/engine/.generated/default.d.ts +1 -1
- package/dist/database/engine/.generated/edge.d.ts +1 -1
- package/dist/database/engine/.generated/index.d.ts +16 -104
- package/dist/database/engine/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/dist/database/engine/.generated/package.json +14 -1
- package/dist/database/engine/.generated/runtime/library.d.ts +195 -79
- package/dist/database/engine/.generated/wasm.d.ts +1 -1
- package/dist/src/eden/index.d.ts +543 -426
- package/dist/src/index.d.ts +188 -141
- package/dist/src/modules/v4/accounting/accounting.controller.d.ts +1 -1
- package/dist/src/modules/v4/accounting/accounting.repository.d.ts +8 -8
- package/dist/src/modules/v4/accounting/accounting.service.d.ts +1 -1
- package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +5 -3
- package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +2 -2
- package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +5 -3
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +14 -14
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +27 -27
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +28 -28
- package/dist/src/modules/v4/chain/chain.controller.d.ts +5 -5
- package/dist/src/modules/v4/chain/chain.repository.d.ts +6 -6
- package/dist/src/modules/v4/chain/chain.service.d.ts +5 -5
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +4 -2
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +2 -2
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +2 -1
- package/dist/src/modules/v4/explorer/explorer.repository.d.ts +2 -2
- package/dist/src/modules/v4/explorer/explorer.service.d.ts +2 -2
- package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +22 -3
- package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +4 -4
- package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +4 -4
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +36 -36
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +94 -94
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +57 -57
- package/dist/src/modules/v4/price/price.controller.d.ts +8 -8
- package/dist/src/modules/v4/price/price.repository.d.ts +10 -10
- package/dist/src/modules/v4/price/price.service.d.ts +8 -8
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +12 -12
- package/dist/src/modules/v4/reward/reward.controller.d.ts +32 -8
- package/dist/src/modules/v4/reward/reward.model.d.ts +9 -9
- package/dist/src/modules/v4/reward/reward.repository.d.ts +42 -39
- package/dist/src/modules/v4/reward/reward.service.d.ts +134 -131
- package/dist/src/modules/v4/router.d.ts +188 -141
- package/dist/src/modules/v4/status/status.controller.d.ts +17 -17
- package/dist/src/modules/v4/status/status.repository.d.ts +32 -32
- package/dist/src/modules/v4/status/status.service.d.ts +20 -20
- package/dist/src/modules/v4/user/user.controller.d.ts +44 -44
- package/dist/src/modules/v4/user/user.repository.d.ts +3 -3
- package/dist/src/modules/v4/user/user.service.d.ts +3 -3
- package/dist/src/routes/v3/ERC20Campaigns.d.ts +188 -141
- package/dist/src/routes/v3/blacklist.d.ts +188 -141
- package/dist/src/routes/v3/campaigns.d.ts +188 -141
- package/dist/src/routes/v3/campaignsInfo.d.ts +188 -141
- package/dist/src/routes/v3/multiChainPositions.d.ts +188 -141
- package/dist/src/routes/v3/opportunity.d.ts +188 -141
- package/dist/src/routes/v3/positions.d.ts +188 -141
- package/dist/src/routes/v3/rewards.d.ts +188 -141
- package/dist/src/routes/v3/rootForTimestamp.d.ts +2 -2
- package/dist/src/routes/v3/updates.d.ts +188 -141
- package/dist/src/routes/v3/userRewards.d.ts +188 -141
- package/dist/src/utils/bigintToString.d.ts +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/src/libs/campaigns/getRewards.d.ts +0 -29
@@ -2,7 +2,7 @@ import type { CacheKeys } from "../../../cache/keys";
|
|
2
2
|
import type { Chain } from "../../../../database/api/.generated";
|
3
3
|
import { Campaign, type CampaignDynamicData, type ChainId } from "@sdk";
|
4
4
|
import { type LightOpportunityFromDB, type Opportunity } from "../opportunity";
|
5
|
-
import type {
|
5
|
+
import type { CampaignIdModel, CreateManyBreakdownModel, CreateManyRewardModel, DailyRewardsRecord, RewardBreakdown, UpdatePendingModel } from "./reward.model";
|
6
6
|
import { RewardRepository } from "./reward.repository";
|
7
7
|
export declare abstract class RewardService {
|
8
8
|
static hashId(root: string, recipient: string, rewardTokenId: string): string;
|
@@ -17,55 +17,55 @@ export declare abstract class RewardService {
|
|
17
17
|
campaignId: string;
|
18
18
|
opportunity: {
|
19
19
|
Chain: {
|
20
|
-
id: number;
|
21
20
|
name: string;
|
21
|
+
id: number;
|
22
22
|
icon: string;
|
23
23
|
};
|
24
24
|
Tokens: {
|
25
|
-
|
25
|
+
symbol: string;
|
26
26
|
name: string | null;
|
27
|
+
id: string;
|
27
28
|
chainId: number;
|
28
29
|
address: string;
|
29
|
-
decimals: number;
|
30
|
-
symbol: string;
|
31
30
|
icon: string;
|
31
|
+
decimals: number;
|
32
32
|
verified: boolean;
|
33
33
|
price: number | null;
|
34
34
|
}[];
|
35
35
|
Protocols: {
|
36
|
-
id: string;
|
37
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
38
36
|
name: string;
|
39
|
-
description: string;
|
40
37
|
url: string;
|
38
|
+
description: string;
|
39
|
+
id: string;
|
40
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
41
41
|
icon: string;
|
42
42
|
}[];
|
43
43
|
MainProtocol: {
|
44
|
-
id: string;
|
45
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
46
44
|
name: string;
|
47
|
-
description: string;
|
48
45
|
url: string;
|
46
|
+
description: string;
|
47
|
+
id: string;
|
48
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
49
49
|
icon: string;
|
50
50
|
} | null;
|
51
51
|
} & {
|
52
|
-
id: string;
|
53
|
-
chainId: number;
|
54
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
55
|
-
identifier: string;
|
56
52
|
name: string;
|
53
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
54
|
+
id: string;
|
57
55
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
56
|
+
tags: string[];
|
57
|
+
identifier: string;
|
58
|
+
chainId: number;
|
58
59
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
59
60
|
mainProtocolId: string | null;
|
60
61
|
tvl: number;
|
61
62
|
apr: number;
|
62
63
|
dailyRewards: number;
|
63
|
-
tags: string[];
|
64
64
|
};
|
65
65
|
reason: string;
|
66
|
+
pending: string;
|
66
67
|
amount: string;
|
67
68
|
claimed: string;
|
68
|
-
pending: string;
|
69
69
|
auxiliaryData1: string | null;
|
70
70
|
auxiliaryData2: string | null;
|
71
71
|
};
|
@@ -76,13 +76,13 @@ export declare abstract class RewardService {
|
|
76
76
|
*/
|
77
77
|
static format(rewards: Awaited<ReturnType<typeof RewardRepository.getByRecipient>>): {
|
78
78
|
token: {
|
79
|
-
|
79
|
+
symbol: string;
|
80
80
|
name: string | null;
|
81
|
+
id: string;
|
81
82
|
chainId: number;
|
82
83
|
address: string;
|
83
|
-
decimals: number;
|
84
|
-
symbol: string;
|
85
84
|
icon: string;
|
85
|
+
decimals: number;
|
86
86
|
verified: boolean;
|
87
87
|
price: number | null;
|
88
88
|
};
|
@@ -90,75 +90,75 @@ export declare abstract class RewardService {
|
|
90
90
|
campaignId: string;
|
91
91
|
opportunity: {
|
92
92
|
Chain: {
|
93
|
-
id: number;
|
94
93
|
name: string;
|
94
|
+
id: number;
|
95
95
|
icon: string;
|
96
96
|
};
|
97
97
|
Tokens: {
|
98
|
-
|
98
|
+
symbol: string;
|
99
99
|
name: string | null;
|
100
|
+
id: string;
|
100
101
|
chainId: number;
|
101
102
|
address: string;
|
102
|
-
decimals: number;
|
103
|
-
symbol: string;
|
104
103
|
icon: string;
|
104
|
+
decimals: number;
|
105
105
|
verified: boolean;
|
106
106
|
price: number | null;
|
107
107
|
}[];
|
108
108
|
Protocols: {
|
109
|
-
id: string;
|
110
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
111
109
|
name: string;
|
112
|
-
description: string;
|
113
110
|
url: string;
|
111
|
+
description: string;
|
112
|
+
id: string;
|
113
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
114
114
|
icon: string;
|
115
115
|
}[];
|
116
116
|
MainProtocol: {
|
117
|
-
id: string;
|
118
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
119
117
|
name: string;
|
120
|
-
description: string;
|
121
118
|
url: string;
|
119
|
+
description: string;
|
120
|
+
id: string;
|
121
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
122
122
|
icon: string;
|
123
123
|
} | null;
|
124
124
|
} & {
|
125
|
-
id: string;
|
126
|
-
chainId: number;
|
127
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
128
|
-
identifier: string;
|
129
125
|
name: string;
|
126
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
127
|
+
id: string;
|
130
128
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
129
|
+
tags: string[];
|
130
|
+
identifier: string;
|
131
|
+
chainId: number;
|
131
132
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
132
133
|
mainProtocolId: string | null;
|
133
134
|
tvl: number;
|
134
135
|
apr: number;
|
135
136
|
dailyRewards: number;
|
136
|
-
tags: string[];
|
137
137
|
};
|
138
138
|
reason: string;
|
139
|
+
pending: string;
|
139
140
|
amount: string;
|
140
141
|
claimed: string;
|
141
|
-
pending: string;
|
142
142
|
auxiliaryData1: string | null;
|
143
143
|
auxiliaryData2: string | null;
|
144
144
|
}[];
|
145
145
|
claimed: bigint;
|
146
146
|
amount: bigint;
|
147
147
|
pending: bigint;
|
148
|
-
root: string;
|
149
148
|
recipient: string;
|
149
|
+
root: string;
|
150
150
|
proofs: string[];
|
151
151
|
}[];
|
152
152
|
static createManyBreakdown(data: CreateManyBreakdownModel): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload | undefined>;
|
153
153
|
static getByRecipient(recipient: string, roots: string[], withToken?: boolean): Promise<({
|
154
154
|
RewardToken: {
|
155
|
-
|
155
|
+
symbol: string;
|
156
156
|
name: string | null;
|
157
|
+
id: string;
|
157
158
|
chainId: number;
|
158
159
|
address: string;
|
159
|
-
decimals: number;
|
160
|
-
symbol: string;
|
161
160
|
icon: string;
|
161
|
+
decimals: number;
|
162
162
|
verified: boolean;
|
163
163
|
price: number | null;
|
164
164
|
};
|
@@ -167,69 +167,69 @@ export declare abstract class RewardService {
|
|
167
167
|
campaignId: string;
|
168
168
|
Opportunity: {
|
169
169
|
Chain: {
|
170
|
-
id: number;
|
171
170
|
name: string;
|
171
|
+
id: number;
|
172
172
|
icon: string;
|
173
173
|
};
|
174
174
|
Tokens: {
|
175
|
-
|
175
|
+
symbol: string;
|
176
176
|
name: string | null;
|
177
|
+
id: string;
|
177
178
|
chainId: number;
|
178
179
|
address: string;
|
179
|
-
decimals: number;
|
180
|
-
symbol: string;
|
181
180
|
icon: string;
|
181
|
+
decimals: number;
|
182
182
|
verified: boolean;
|
183
183
|
price: number | null;
|
184
184
|
}[];
|
185
185
|
Protocols: {
|
186
|
-
id: string;
|
187
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
188
186
|
name: string;
|
189
|
-
description: string;
|
190
187
|
url: string;
|
188
|
+
description: string;
|
189
|
+
id: string;
|
190
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
191
191
|
icon: string;
|
192
192
|
}[];
|
193
193
|
MainProtocol: {
|
194
|
-
id: string;
|
195
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
196
194
|
name: string;
|
197
|
-
description: string;
|
198
195
|
url: string;
|
196
|
+
description: string;
|
197
|
+
id: string;
|
198
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
199
199
|
icon: string;
|
200
200
|
} | null;
|
201
201
|
} & {
|
202
|
-
id: string;
|
203
|
-
chainId: number;
|
204
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
205
|
-
identifier: string;
|
206
202
|
name: string;
|
203
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
204
|
+
id: string;
|
207
205
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
206
|
+
tags: string[];
|
207
|
+
identifier: string;
|
208
|
+
chainId: number;
|
208
209
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
209
210
|
mainProtocolId: string | null;
|
210
211
|
tvl: number;
|
211
212
|
apr: number;
|
212
213
|
dailyRewards: number;
|
213
|
-
tags: string[];
|
214
214
|
};
|
215
215
|
};
|
216
216
|
} & {
|
217
|
-
id: number;
|
218
|
-
protocolId: string | null;
|
219
217
|
reason: string;
|
218
|
+
pending: string;
|
219
|
+
id: number;
|
220
|
+
campaignId: string;
|
220
221
|
amount: string;
|
222
|
+
protocolId: string | null;
|
221
223
|
claimed: string;
|
222
|
-
pending: string;
|
223
224
|
auxiliaryData1: string | null;
|
224
225
|
auxiliaryData2: string | null;
|
225
226
|
rewardId: string;
|
226
|
-
campaignId: string;
|
227
227
|
})[];
|
228
228
|
} & {
|
229
229
|
id: string;
|
230
|
-
root: string;
|
231
230
|
recipient: string;
|
232
231
|
rewardTokenId: string;
|
232
|
+
root: string;
|
233
233
|
proofs: string[];
|
234
234
|
})[]>;
|
235
235
|
/**
|
@@ -249,7 +249,7 @@ export declare abstract class RewardService {
|
|
249
249
|
}[];
|
250
250
|
/**
|
251
251
|
* Applies the splitBreakdownByOpportunity function to each rewards in the array
|
252
|
-
* @param rewards return type for most of the
|
252
|
+
* @param rewards return type for most of the rewards functions
|
253
253
|
* @returns rewards with updated breakdowns, including the opportunity they belong to
|
254
254
|
*/
|
255
255
|
static splitRewardsBreakdownByOpportunity(rewards: Awaited<ReturnType<typeof RewardService.getUserRewardsByChain>>): (Omit<{
|
@@ -258,13 +258,13 @@ export declare abstract class RewardService {
|
|
258
258
|
}, "rewards"> & {
|
259
259
|
rewards: (Omit<{
|
260
260
|
token: {
|
261
|
-
|
261
|
+
symbol: string;
|
262
262
|
name: string | null;
|
263
|
+
id: string;
|
263
264
|
chainId: number;
|
264
265
|
address: string;
|
265
|
-
decimals: number;
|
266
|
-
symbol: string;
|
267
266
|
icon: string;
|
267
|
+
decimals: number;
|
268
268
|
verified: boolean;
|
269
269
|
price: number | null;
|
270
270
|
};
|
@@ -272,63 +272,63 @@ export declare abstract class RewardService {
|
|
272
272
|
campaignId: string;
|
273
273
|
opportunity: {
|
274
274
|
Chain: {
|
275
|
-
id: number;
|
276
275
|
name: string;
|
276
|
+
id: number;
|
277
277
|
icon: string;
|
278
278
|
};
|
279
279
|
Tokens: {
|
280
|
-
|
280
|
+
symbol: string;
|
281
281
|
name: string | null;
|
282
|
+
id: string;
|
282
283
|
chainId: number;
|
283
284
|
address: string;
|
284
|
-
decimals: number;
|
285
|
-
symbol: string;
|
286
285
|
icon: string;
|
286
|
+
decimals: number;
|
287
287
|
verified: boolean;
|
288
288
|
price: number | null;
|
289
289
|
}[];
|
290
290
|
Protocols: {
|
291
|
-
id: string;
|
292
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
293
291
|
name: string;
|
294
|
-
description: string;
|
295
292
|
url: string;
|
293
|
+
description: string;
|
294
|
+
id: string;
|
295
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
296
296
|
icon: string;
|
297
297
|
}[];
|
298
298
|
MainProtocol: {
|
299
|
-
id: string;
|
300
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
301
299
|
name: string;
|
302
|
-
description: string;
|
303
300
|
url: string;
|
301
|
+
description: string;
|
302
|
+
id: string;
|
303
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
304
304
|
icon: string;
|
305
305
|
} | null;
|
306
306
|
} & {
|
307
|
-
id: string;
|
308
|
-
chainId: number;
|
309
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
310
|
-
identifier: string;
|
311
307
|
name: string;
|
308
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
309
|
+
id: string;
|
312
310
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
311
|
+
tags: string[];
|
312
|
+
identifier: string;
|
313
|
+
chainId: number;
|
313
314
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
314
315
|
mainProtocolId: string | null;
|
315
316
|
tvl: number;
|
316
317
|
apr: number;
|
317
318
|
dailyRewards: number;
|
318
|
-
tags: string[];
|
319
319
|
};
|
320
320
|
reason: string;
|
321
|
+
pending: string;
|
321
322
|
amount: string;
|
322
323
|
claimed: string;
|
323
|
-
pending: string;
|
324
324
|
auxiliaryData1: string | null;
|
325
325
|
auxiliaryData2: string | null;
|
326
326
|
}[];
|
327
327
|
claimed: bigint;
|
328
328
|
amount: bigint;
|
329
329
|
pending: bigint;
|
330
|
-
root: string;
|
331
330
|
recipient: string;
|
331
|
+
root: string;
|
332
332
|
proofs: string[];
|
333
333
|
}, "breakdowns"> & {
|
334
334
|
breakdowns: {
|
@@ -348,13 +348,13 @@ export declare abstract class RewardService {
|
|
348
348
|
}, "rewards"> & {
|
349
349
|
rewards: (Omit<{
|
350
350
|
token: {
|
351
|
-
|
351
|
+
symbol: string;
|
352
352
|
name: string | null;
|
353
|
+
id: string;
|
353
354
|
chainId: number;
|
354
355
|
address: string;
|
355
|
-
decimals: number;
|
356
|
-
symbol: string;
|
357
356
|
icon: string;
|
357
|
+
decimals: number;
|
358
358
|
verified: boolean;
|
359
359
|
price: number | null;
|
360
360
|
};
|
@@ -362,86 +362,86 @@ export declare abstract class RewardService {
|
|
362
362
|
campaignId: string;
|
363
363
|
opportunity: {
|
364
364
|
Chain: {
|
365
|
-
id: number;
|
366
365
|
name: string;
|
366
|
+
id: number;
|
367
367
|
icon: string;
|
368
368
|
};
|
369
369
|
Tokens: {
|
370
|
-
|
370
|
+
symbol: string;
|
371
371
|
name: string | null;
|
372
|
+
id: string;
|
372
373
|
chainId: number;
|
373
374
|
address: string;
|
374
|
-
decimals: number;
|
375
|
-
symbol: string;
|
376
375
|
icon: string;
|
376
|
+
decimals: number;
|
377
377
|
verified: boolean;
|
378
378
|
price: number | null;
|
379
379
|
}[];
|
380
380
|
Protocols: {
|
381
|
-
id: string;
|
382
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
383
381
|
name: string;
|
384
|
-
description: string;
|
385
382
|
url: string;
|
383
|
+
description: string;
|
384
|
+
id: string;
|
385
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
386
386
|
icon: string;
|
387
387
|
}[];
|
388
388
|
MainProtocol: {
|
389
|
-
id: string;
|
390
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
391
389
|
name: string;
|
392
|
-
description: string;
|
393
390
|
url: string;
|
391
|
+
description: string;
|
392
|
+
id: string;
|
393
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
394
394
|
icon: string;
|
395
395
|
} | null;
|
396
396
|
} & {
|
397
|
-
id: string;
|
398
|
-
chainId: number;
|
399
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
400
|
-
identifier: string;
|
401
397
|
name: string;
|
398
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
399
|
+
id: string;
|
402
400
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
401
|
+
tags: string[];
|
402
|
+
identifier: string;
|
403
|
+
chainId: number;
|
403
404
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
404
405
|
mainProtocolId: string | null;
|
405
406
|
tvl: number;
|
406
407
|
apr: number;
|
407
408
|
dailyRewards: number;
|
408
|
-
tags: string[];
|
409
409
|
};
|
410
410
|
reason: string;
|
411
|
+
pending: string;
|
411
412
|
amount: string;
|
412
413
|
claimed: string;
|
413
|
-
pending: string;
|
414
414
|
auxiliaryData1: string | null;
|
415
415
|
auxiliaryData2: string | null;
|
416
416
|
}[];
|
417
417
|
claimed: bigint;
|
418
418
|
amount: bigint;
|
419
419
|
pending: bigint;
|
420
|
-
root: string;
|
421
420
|
recipient: string;
|
421
|
+
root: string;
|
422
422
|
proofs: string[];
|
423
423
|
}, "breakdowns"> & {
|
424
424
|
breakdowns: {
|
425
425
|
campaignId: string;
|
426
426
|
reason: string;
|
427
|
+
pending: string;
|
427
428
|
amount: string;
|
428
429
|
claimed: string;
|
429
|
-
pending: string;
|
430
430
|
auxiliaryData1: string | null;
|
431
431
|
auxiliaryData2: string | null;
|
432
432
|
}[];
|
433
433
|
})[];
|
434
434
|
})[];
|
435
|
-
static findManyRootsOnChain(chainId: ChainId): Promise<
|
435
|
+
static findManyRootsOnChain(chainId: ChainId): Promise<string[]>;
|
436
436
|
static checkLastClaim(chainId: number, user: string, roots: CacheKeys["CurrentRoot"]["returns"], rewards: Awaited<ReturnType<typeof RewardService.getByRecipient>>): Promise<({
|
437
437
|
RewardToken: {
|
438
|
-
|
438
|
+
symbol: string;
|
439
439
|
name: string | null;
|
440
|
+
id: string;
|
440
441
|
chainId: number;
|
441
442
|
address: string;
|
442
|
-
decimals: number;
|
443
|
-
symbol: string;
|
444
443
|
icon: string;
|
444
|
+
decimals: number;
|
445
445
|
verified: boolean;
|
446
446
|
price: number | null;
|
447
447
|
};
|
@@ -450,69 +450,69 @@ export declare abstract class RewardService {
|
|
450
450
|
campaignId: string;
|
451
451
|
Opportunity: {
|
452
452
|
Chain: {
|
453
|
-
id: number;
|
454
453
|
name: string;
|
454
|
+
id: number;
|
455
455
|
icon: string;
|
456
456
|
};
|
457
457
|
Tokens: {
|
458
|
-
|
458
|
+
symbol: string;
|
459
459
|
name: string | null;
|
460
|
+
id: string;
|
460
461
|
chainId: number;
|
461
462
|
address: string;
|
462
|
-
decimals: number;
|
463
|
-
symbol: string;
|
464
463
|
icon: string;
|
464
|
+
decimals: number;
|
465
465
|
verified: boolean;
|
466
466
|
price: number | null;
|
467
467
|
}[];
|
468
468
|
Protocols: {
|
469
|
-
id: string;
|
470
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
471
469
|
name: string;
|
472
|
-
description: string;
|
473
470
|
url: string;
|
471
|
+
description: string;
|
472
|
+
id: string;
|
473
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
474
474
|
icon: string;
|
475
475
|
}[];
|
476
476
|
MainProtocol: {
|
477
|
-
id: string;
|
478
|
-
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
479
477
|
name: string;
|
480
|
-
description: string;
|
481
478
|
url: string;
|
479
|
+
description: string;
|
480
|
+
id: string;
|
481
|
+
tags: import("../../../../database/api/.generated").$Enums.ProtocolTag[];
|
482
482
|
icon: string;
|
483
483
|
} | null;
|
484
484
|
} & {
|
485
|
-
id: string;
|
486
|
-
chainId: number;
|
487
|
-
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
488
|
-
identifier: string;
|
489
485
|
name: string;
|
486
|
+
type: import("../../../../database/api/.generated").$Enums.CampaignType;
|
487
|
+
id: string;
|
490
488
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
489
|
+
tags: string[];
|
490
|
+
identifier: string;
|
491
|
+
chainId: number;
|
491
492
|
action: import("../../../../database/api/.generated").$Enums.OpportunityAction;
|
492
493
|
mainProtocolId: string | null;
|
493
494
|
tvl: number;
|
494
495
|
apr: number;
|
495
496
|
dailyRewards: number;
|
496
|
-
tags: string[];
|
497
497
|
};
|
498
498
|
};
|
499
499
|
} & {
|
500
|
-
id: number;
|
501
|
-
protocolId: string | null;
|
502
500
|
reason: string;
|
501
|
+
pending: string;
|
502
|
+
id: number;
|
503
|
+
campaignId: string;
|
503
504
|
amount: string;
|
505
|
+
protocolId: string | null;
|
504
506
|
claimed: string;
|
505
|
-
pending: string;
|
506
507
|
auxiliaryData1: string | null;
|
507
508
|
auxiliaryData2: string | null;
|
508
509
|
rewardId: string;
|
509
|
-
campaignId: string;
|
510
510
|
})[];
|
511
511
|
} & {
|
512
512
|
id: string;
|
513
|
-
root: string;
|
514
513
|
recipient: string;
|
515
514
|
rewardTokenId: string;
|
515
|
+
root: string;
|
516
516
|
proofs: string[];
|
517
517
|
})[]>;
|
518
518
|
static getUserRewardsByChain(user: string, withToken: boolean, chainFilter?: ChainId[]): Promise<{
|
@@ -520,14 +520,17 @@ export declare abstract class RewardService {
|
|
520
520
|
rewards: Awaited<ReturnType<(typeof RewardService)["format"]>>;
|
521
521
|
}[]>;
|
522
522
|
static updatePendings(data: UpdatePendingModel): Promise<boolean>;
|
523
|
-
static count(query: GetRewardsQueryModel): Promise<{
|
524
|
-
count: number;
|
525
|
-
} | null>;
|
526
523
|
static countAllchains(): Promise<Record<string, {
|
527
524
|
breakdown: number;
|
528
525
|
rewards: Record<string, number>;
|
529
526
|
}>>;
|
530
|
-
static
|
531
|
-
static
|
527
|
+
static breakdownForCampaign(query: CampaignIdModel): Promise<import("./reward.model").BreakdownForCampaignsRaw[]>;
|
528
|
+
static count(query: CampaignIdModel): Promise<{
|
529
|
+
count: number;
|
530
|
+
}>;
|
531
|
+
static total(query: CampaignIdModel): Promise<{
|
532
|
+
campaignId: string;
|
533
|
+
amount: bigint;
|
534
|
+
}>;
|
532
535
|
static extractDailyRewardsRecordFromDynamicData<C extends Campaign>(type: C, dynamicData: CampaignDynamicData<C>[], timestamp?: bigint): Promise<DailyRewardsRecord["model"]>;
|
533
536
|
}
|