@merkl/api 1.14.27 → 1.16.6
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/src/eden/index.d.ts +516 -5
- package/dist/src/engine/deprecated/dynamicData/implementations/EventBased.js.map +1 -1
- package/dist/src/engine/implementations/AaveV4Hub/metadata.d.ts +41 -0
- package/dist/src/engine/implementations/AaveV4Hub/metadata.js.map +1 -0
- package/dist/src/engine/implementations/AaveV4Spoke/metadata.d.ts +40 -0
- package/dist/src/engine/implementations/AaveV4Spoke/metadata.js.map +1 -0
- package/dist/src/engine/implementations/Blend/metadata.js.map +1 -1
- package/dist/src/engine/implementations/Blend/tvl.d.ts +13 -0
- package/dist/src/engine/implementations/Blend/tvl.js.map +1 -0
- package/dist/src/engine/implementations/Ekubo/tvl.js.map +1 -1
- package/dist/src/engine/implementations/FluidVault/tvl.js.map +1 -1
- package/dist/src/engine/implementations/SacHolder/tvl.d.ts +12 -0
- package/dist/src/engine/implementations/SacHolder/tvl.js.map +1 -0
- package/dist/src/engine/implementations/clamm/utils.js.map +1 -1
- package/dist/src/engine/implementations/morphoCollateral/tvl.js.map +1 -1
- package/dist/src/engine/implementations/uniswapv4/tvl.js.map +1 -1
- package/dist/src/engine/metadata/factory.js.map +1 -1
- package/dist/src/engine/tvl/factory.js.map +1 -1
- package/dist/src/engine/tvl/logStates.js.map +1 -1
- package/dist/src/index.d.ts +590 -5
- package/dist/src/jobs/auto-claim-etl/config.d.ts +0 -5
- package/dist/src/jobs/auto-claim-etl/config.js.map +1 -1
- package/dist/src/jobs/auto-claim-etl/index.js.map +1 -1
- package/dist/src/jobs/diff-breakdown-etl/index.js.map +1 -1
- package/dist/src/jobs/diff-etl/index.js.map +1 -1
- package/dist/src/jobs/leaf-breakdown-etl/index.js.map +1 -1
- package/dist/src/jobs/leaf-etl/index.js.map +1 -1
- package/dist/src/jobs/reward-breakdowns-etl/index.js.map +1 -1
- package/dist/src/jobs/rewards-etl/index.js.map +1 -1
- package/dist/src/jobs/tx-executor/hooks/auto-claim.d.ts +10 -0
- package/dist/src/jobs/tx-executor/hooks/auto-claim.js.map +1 -0
- package/dist/src/jobs/tx-executor/hooks/index.d.ts +9 -0
- package/dist/src/jobs/tx-executor/hooks/index.js.map +1 -0
- package/dist/src/jobs/tx-executor/index.d.ts +1 -0
- package/dist/src/jobs/tx-executor/index.js.map +1 -0
- package/dist/src/jobs/tx-executor/process.d.ts +11 -0
- package/dist/src/jobs/tx-executor/process.js.map +1 -0
- package/dist/src/jobs/tx-executor/types.d.ts +56 -0
- package/dist/src/jobs/tx-executor/types.js.map +1 -0
- package/dist/src/jobs/utils/etl.d.ts +4 -32
- package/dist/src/jobs/utils/etl.js.map +1 -1
- package/dist/src/modules/v4/autoclaim/autoclaim.controller.d.ts +430 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.controller.js.map +1 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.model.d.ts +52 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.model.js.map +1 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.pricing.d.ts +10 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.pricing.js.map +1 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.repository.d.ts +260 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.repository.js.map +1 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.service.d.ts +219 -0
- package/dist/src/modules/v4/autoclaim/autoclaim.service.js.map +1 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +16 -4
- package/dist/src/modules/v4/campaign/campaign.formatter.d.ts +2 -1
- package/dist/src/modules/v4/campaign/campaign.formatter.js.map +1 -1
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +4 -2
- package/dist/src/modules/v4/campaign/campaign.model.js.map +1 -1
- package/dist/src/modules/v4/campaign/campaign.query-transformer.d.ts +70 -70
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +11 -0
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +24 -10
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +4 -0
- package/dist/src/modules/v4/campaignStatus/campaignStatus.repository.d.ts +1 -0
- package/dist/src/modules/v4/campaignStatus/campaignStatus.service.d.ts +1 -1
- package/dist/src/modules/v4/campaignToProcess/campaignToProcess.repository.js.map +1 -1
- package/dist/src/modules/v4/config/config.controller.d.ts +1 -0
- package/dist/src/modules/v4/config/config.service.d.ts +1 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +6 -1
- package/dist/src/modules/v4/creator/creator.model.d.ts +1 -0
- package/dist/src/modules/v4/creator/creator.service.d.ts +3 -1
- package/dist/src/modules/v4/credit/credit.controller.d.ts +181 -0
- package/dist/src/modules/v4/credit/credit.controller.js.map +1 -0
- package/dist/src/modules/v4/credit/credit.model.d.ts +20 -0
- package/dist/src/modules/v4/credit/credit.model.js.map +1 -0
- package/dist/src/modules/v4/credit/credit.repository.d.ts +51 -0
- package/dist/src/modules/v4/credit/credit.repository.js.map +1 -0
- package/dist/src/modules/v4/credit/credit.service.d.ts +52 -0
- package/dist/src/modules/v4/credit/credit.service.js.map +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js.map +1 -1
- package/dist/src/modules/v4/enum/enum.service.js.map +1 -1
- package/dist/src/modules/v4/icon/icon.service.d.ts +1 -1
- package/dist/src/modules/v4/icon/icon.service.js.map +1 -1
- package/dist/src/modules/v4/indexingRange/indexingRange.repository.d.ts +5 -0
- package/dist/src/modules/v4/indexingRange/indexingRange.repository.js.map +1 -1
- package/dist/src/modules/v4/leaf/leaf.repository.d.ts +4 -0
- package/dist/src/modules/v4/leaf/leaf.service.d.ts +2 -0
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +16 -0
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +2 -1
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +4 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.js.map +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.query-transformer.d.ts +9 -0
- package/dist/src/modules/v4/opportunity/opportunity.query-transformer.js.map +1 -1
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +6 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +11 -2
- package/dist/src/modules/v4/payload/payload.controller.d.ts +3 -0
- package/dist/src/modules/v4/payload/payload.service.d.ts +4 -0
- package/dist/src/modules/v4/programPayload/programPayload.service.js.map +1 -1
- package/dist/src/modules/v4/protocol/protocol.service.js.map +1 -1
- package/dist/src/modules/v4/reward/reward.service.d.ts +5 -0
- package/dist/src/modules/v4/router.d.ts +590 -5
- package/dist/src/modules/v4/router.js.map +1 -1
- package/dist/src/modules/v4/token/token.service.d.ts +4 -0
- package/dist/src/modules/v4/token/token.service.js.map +1 -1
- package/dist/src/modules/v4/transaction/transaction.service.d.ts +2178 -1650
- package/dist/src/utils/getAPR.d.ts +1299 -1035
- package/dist/src/utils/parseDistributionType.d.ts +268 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/jobs/auto-claim-etl/extract.d.ts +0 -35
- package/dist/src/jobs/auto-claim-etl/extract.js.map +0 -1
- package/dist/src/jobs/auto-claim-etl/load.d.ts +0 -18
- package/dist/src/jobs/auto-claim-etl/load.js.map +0 -1
- package/dist/src/jobs/auto-claim-etl/transform.d.ts +0 -3
- package/dist/src/jobs/auto-claim-etl/transform.js.map +0 -1
- package/dist/src/jobs/auto-claim-etl/types.d.ts +0 -52
- package/dist/src/jobs/auto-claim-etl/types.js.map +0 -1
- package/dist/src/modules/v4/bucket/bucket.model.d.ts +0 -9
- package/dist/src/modules/v4/bucket/bucket.model.js.map +0 -1
- package/dist/src/modules/v4/bucket/bucket.service.d.ts +0 -14
- package/dist/src/modules/v4/bucket/bucket.service.js.map +0 -1
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import Elysia from "elysia";
|
|
2
|
+
export declare const AutoclaimController: Elysia<"/autoclaim", {
|
|
3
|
+
decorator: {};
|
|
4
|
+
store: {};
|
|
5
|
+
derive: {};
|
|
6
|
+
resolve: {};
|
|
7
|
+
}, {
|
|
8
|
+
typebox: {};
|
|
9
|
+
error: {};
|
|
10
|
+
}, {
|
|
11
|
+
schema: {};
|
|
12
|
+
standaloneSchema: {};
|
|
13
|
+
macro: {};
|
|
14
|
+
macroFn: {};
|
|
15
|
+
parser: {};
|
|
16
|
+
response: {};
|
|
17
|
+
}, {
|
|
18
|
+
autoclaim: {
|
|
19
|
+
get: {
|
|
20
|
+
body: unknown;
|
|
21
|
+
params: {};
|
|
22
|
+
query: {
|
|
23
|
+
page?: number | undefined;
|
|
24
|
+
items?: number | undefined;
|
|
25
|
+
chainId?: number | undefined;
|
|
26
|
+
scopeType?: "CAMPAIGN" | "CREATOR" | "TOKEN" | "USER" | undefined;
|
|
27
|
+
creatorId?: string | undefined;
|
|
28
|
+
tokenAddress?: string | undefined;
|
|
29
|
+
userAddress?: string | undefined;
|
|
30
|
+
active?: boolean | undefined;
|
|
31
|
+
};
|
|
32
|
+
headers: unknown;
|
|
33
|
+
response: {
|
|
34
|
+
200: ({
|
|
35
|
+
Campaign: {
|
|
36
|
+
id: string;
|
|
37
|
+
computeChainId: number;
|
|
38
|
+
distributionChainId: number;
|
|
39
|
+
campaignId: string;
|
|
40
|
+
type: string;
|
|
41
|
+
distributionType: import("@package/databases").DistributionType;
|
|
42
|
+
subType: number | null;
|
|
43
|
+
rewardTokenId: string;
|
|
44
|
+
amount: string;
|
|
45
|
+
opportunityId: string;
|
|
46
|
+
startTimestamp: bigint;
|
|
47
|
+
endTimestamp: bigint;
|
|
48
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
|
49
|
+
description: string | null;
|
|
50
|
+
pauseCompute: string | null;
|
|
51
|
+
pausePrecompute: string | null;
|
|
52
|
+
dailyRewards: number;
|
|
53
|
+
apr: number;
|
|
54
|
+
creatorAddress: string;
|
|
55
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
rootCampaignId: string | null;
|
|
58
|
+
parentCampaignId: string | null;
|
|
59
|
+
isPrivate: boolean;
|
|
60
|
+
campaignEncodingHash: string | null;
|
|
61
|
+
} | null;
|
|
62
|
+
Creator: {
|
|
63
|
+
Credit: {
|
|
64
|
+
creatorId: string;
|
|
65
|
+
amount: number;
|
|
66
|
+
} | null;
|
|
67
|
+
} & {
|
|
68
|
+
id: string;
|
|
69
|
+
icon: string | null;
|
|
70
|
+
name: string;
|
|
71
|
+
rebateFee: number;
|
|
72
|
+
hubspotCompanyId: string | null;
|
|
73
|
+
};
|
|
74
|
+
Token: {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string | null;
|
|
77
|
+
chainId: number;
|
|
78
|
+
address: string;
|
|
79
|
+
decimals: number;
|
|
80
|
+
symbol: string;
|
|
81
|
+
displaySymbol: string;
|
|
82
|
+
icon: string;
|
|
83
|
+
verified: boolean;
|
|
84
|
+
isTest: boolean;
|
|
85
|
+
type: import("@package/databases").TokenType;
|
|
86
|
+
isNative: boolean;
|
|
87
|
+
underlyingTokenId: string | null;
|
|
88
|
+
price: number | null;
|
|
89
|
+
updatedAt: number | null;
|
|
90
|
+
priceSource: string | null;
|
|
91
|
+
} | null;
|
|
92
|
+
User: {
|
|
93
|
+
address: string;
|
|
94
|
+
tags: string[];
|
|
95
|
+
creatorId: string | null;
|
|
96
|
+
} | null;
|
|
97
|
+
} & {
|
|
98
|
+
chainId: number;
|
|
99
|
+
scopeType: import("@package/databases").AutoClaimScopeType;
|
|
100
|
+
scopeId: string;
|
|
101
|
+
creatorId: string;
|
|
102
|
+
tokenAddress: string | null;
|
|
103
|
+
campaignId: string | null;
|
|
104
|
+
userAddress: string | null;
|
|
105
|
+
minimumAmount: number | null;
|
|
106
|
+
minimumInterval: number | null;
|
|
107
|
+
active: boolean;
|
|
108
|
+
pricingConfig: import("@prisma/client/runtime/client").JsonValue;
|
|
109
|
+
})[];
|
|
110
|
+
422: {
|
|
111
|
+
type: "validation";
|
|
112
|
+
on: string;
|
|
113
|
+
summary?: string | undefined;
|
|
114
|
+
message?: string | undefined;
|
|
115
|
+
found?: unknown;
|
|
116
|
+
property?: string | undefined;
|
|
117
|
+
expected?: string | undefined;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
} & {
|
|
123
|
+
autoclaim: {
|
|
124
|
+
":chainId": {
|
|
125
|
+
":scopeId": {
|
|
126
|
+
get: {
|
|
127
|
+
body: unknown;
|
|
128
|
+
params: {
|
|
129
|
+
chainId: number;
|
|
130
|
+
scopeId: string;
|
|
131
|
+
};
|
|
132
|
+
query: unknown;
|
|
133
|
+
headers: unknown;
|
|
134
|
+
response: {
|
|
135
|
+
200: {
|
|
136
|
+
Campaign: {
|
|
137
|
+
id: string;
|
|
138
|
+
computeChainId: number;
|
|
139
|
+
distributionChainId: number;
|
|
140
|
+
campaignId: string;
|
|
141
|
+
type: string;
|
|
142
|
+
distributionType: import("@package/databases").DistributionType;
|
|
143
|
+
subType: number | null;
|
|
144
|
+
rewardTokenId: string;
|
|
145
|
+
amount: string;
|
|
146
|
+
opportunityId: string;
|
|
147
|
+
startTimestamp: bigint;
|
|
148
|
+
endTimestamp: bigint;
|
|
149
|
+
params: import("@prisma/client/runtime/client").JsonValue;
|
|
150
|
+
description: string | null;
|
|
151
|
+
pauseCompute: string | null;
|
|
152
|
+
pausePrecompute: string | null;
|
|
153
|
+
dailyRewards: number;
|
|
154
|
+
apr: number;
|
|
155
|
+
creatorAddress: string;
|
|
156
|
+
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
|
157
|
+
createdAt: Date;
|
|
158
|
+
rootCampaignId: string | null;
|
|
159
|
+
parentCampaignId: string | null;
|
|
160
|
+
isPrivate: boolean;
|
|
161
|
+
campaignEncodingHash: string | null;
|
|
162
|
+
} | null;
|
|
163
|
+
Creator: {
|
|
164
|
+
Credit: {
|
|
165
|
+
creatorId: string;
|
|
166
|
+
amount: number;
|
|
167
|
+
} | null;
|
|
168
|
+
} & {
|
|
169
|
+
id: string;
|
|
170
|
+
icon: string | null;
|
|
171
|
+
name: string;
|
|
172
|
+
rebateFee: number;
|
|
173
|
+
hubspotCompanyId: string | null;
|
|
174
|
+
};
|
|
175
|
+
Token: {
|
|
176
|
+
id: string;
|
|
177
|
+
name: string | null;
|
|
178
|
+
chainId: number;
|
|
179
|
+
address: string;
|
|
180
|
+
decimals: number;
|
|
181
|
+
symbol: string;
|
|
182
|
+
displaySymbol: string;
|
|
183
|
+
icon: string;
|
|
184
|
+
verified: boolean;
|
|
185
|
+
isTest: boolean;
|
|
186
|
+
type: import("@package/databases").TokenType;
|
|
187
|
+
isNative: boolean;
|
|
188
|
+
underlyingTokenId: string | null;
|
|
189
|
+
price: number | null;
|
|
190
|
+
updatedAt: number | null;
|
|
191
|
+
priceSource: string | null;
|
|
192
|
+
} | null;
|
|
193
|
+
User: {
|
|
194
|
+
address: string;
|
|
195
|
+
tags: string[];
|
|
196
|
+
creatorId: string | null;
|
|
197
|
+
} | null;
|
|
198
|
+
} & {
|
|
199
|
+
chainId: number;
|
|
200
|
+
scopeType: import("@package/databases").AutoClaimScopeType;
|
|
201
|
+
scopeId: string;
|
|
202
|
+
creatorId: string;
|
|
203
|
+
tokenAddress: string | null;
|
|
204
|
+
campaignId: string | null;
|
|
205
|
+
userAddress: string | null;
|
|
206
|
+
minimumAmount: number | null;
|
|
207
|
+
minimumInterval: number | null;
|
|
208
|
+
active: boolean;
|
|
209
|
+
pricingConfig: import("@prisma/client/runtime/client").JsonValue;
|
|
210
|
+
};
|
|
211
|
+
422: {
|
|
212
|
+
type: "validation";
|
|
213
|
+
on: string;
|
|
214
|
+
summary?: string | undefined;
|
|
215
|
+
message?: string | undefined;
|
|
216
|
+
found?: unknown;
|
|
217
|
+
property?: string | undefined;
|
|
218
|
+
expected?: string | undefined;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
} & {
|
|
226
|
+
autoclaim: {
|
|
227
|
+
post: {
|
|
228
|
+
body: {
|
|
229
|
+
chainId: number;
|
|
230
|
+
scopeType: "CAMPAIGN" | "CREATOR" | "TOKEN" | "USER";
|
|
231
|
+
scopeId: string;
|
|
232
|
+
creatorId: string;
|
|
233
|
+
tokenAddress?: string | undefined;
|
|
234
|
+
campaignId?: string | undefined;
|
|
235
|
+
userAddress?: string | undefined;
|
|
236
|
+
minimumAmount?: number | undefined;
|
|
237
|
+
minimumInterval?: number | undefined;
|
|
238
|
+
pricingConfig?: {
|
|
239
|
+
type: import("@package/resources/enums").PricingConfigType.PER_CLAIM;
|
|
240
|
+
pricePerClaim?: number | undefined;
|
|
241
|
+
allowNegativeCredits?: boolean | undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
};
|
|
244
|
+
params: {};
|
|
245
|
+
query: unknown;
|
|
246
|
+
headers: {
|
|
247
|
+
authorization: string;
|
|
248
|
+
};
|
|
249
|
+
response: {
|
|
250
|
+
200: {
|
|
251
|
+
chainId: number;
|
|
252
|
+
scopeType: import("@package/databases").AutoClaimScopeType;
|
|
253
|
+
scopeId: string;
|
|
254
|
+
creatorId: string;
|
|
255
|
+
tokenAddress: string | null;
|
|
256
|
+
campaignId: string | null;
|
|
257
|
+
userAddress: string | null;
|
|
258
|
+
minimumAmount: number | null;
|
|
259
|
+
minimumInterval: number | null;
|
|
260
|
+
active: boolean;
|
|
261
|
+
pricingConfig: import("@prisma/client/runtime/client").JsonValue;
|
|
262
|
+
};
|
|
263
|
+
422: {
|
|
264
|
+
type: "validation";
|
|
265
|
+
on: string;
|
|
266
|
+
summary?: string | undefined;
|
|
267
|
+
message?: string | undefined;
|
|
268
|
+
found?: unknown;
|
|
269
|
+
property?: string | undefined;
|
|
270
|
+
expected?: string | undefined;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
} & {
|
|
276
|
+
autoclaim: {
|
|
277
|
+
":chainId": {
|
|
278
|
+
":scopeId": {
|
|
279
|
+
tracked: {
|
|
280
|
+
get: {
|
|
281
|
+
body: unknown;
|
|
282
|
+
params: {
|
|
283
|
+
chainId: number;
|
|
284
|
+
scopeId: string;
|
|
285
|
+
};
|
|
286
|
+
query: unknown;
|
|
287
|
+
headers: {
|
|
288
|
+
authorization: string;
|
|
289
|
+
};
|
|
290
|
+
response: {
|
|
291
|
+
200: {
|
|
292
|
+
recipient: string;
|
|
293
|
+
tokenAddress: string;
|
|
294
|
+
tokenSymbol: string;
|
|
295
|
+
tokenDecimals: number;
|
|
296
|
+
tokenIcon: string;
|
|
297
|
+
distributionChainId: number;
|
|
298
|
+
amount: string;
|
|
299
|
+
claimed: string;
|
|
300
|
+
unclaimed: string;
|
|
301
|
+
unclaimedUsd: number;
|
|
302
|
+
proof: string[];
|
|
303
|
+
root: string;
|
|
304
|
+
lastClaimedTimestamp: number | undefined;
|
|
305
|
+
}[];
|
|
306
|
+
422: {
|
|
307
|
+
type: "validation";
|
|
308
|
+
on: string;
|
|
309
|
+
summary?: string | undefined;
|
|
310
|
+
message?: string | undefined;
|
|
311
|
+
found?: unknown;
|
|
312
|
+
property?: string | undefined;
|
|
313
|
+
expected?: string | undefined;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
} & {
|
|
322
|
+
autoclaim: {
|
|
323
|
+
":chainId": {
|
|
324
|
+
":scopeId": {
|
|
325
|
+
claims: {
|
|
326
|
+
get: {
|
|
327
|
+
body: unknown;
|
|
328
|
+
params: {
|
|
329
|
+
chainId: number;
|
|
330
|
+
scopeId: string;
|
|
331
|
+
};
|
|
332
|
+
query: unknown;
|
|
333
|
+
headers: {
|
|
334
|
+
authorization: string;
|
|
335
|
+
};
|
|
336
|
+
response: {
|
|
337
|
+
200: {
|
|
338
|
+
recipient: string;
|
|
339
|
+
tokenAddress: string;
|
|
340
|
+
tokenSymbol: string;
|
|
341
|
+
tokenDecimals: number;
|
|
342
|
+
tokenIcon: string;
|
|
343
|
+
distributionChainId: number;
|
|
344
|
+
amount: string;
|
|
345
|
+
claimed: string;
|
|
346
|
+
unclaimed: string;
|
|
347
|
+
unclaimedUsd: number;
|
|
348
|
+
proof: string[];
|
|
349
|
+
root: string;
|
|
350
|
+
lastClaimedTimestamp: number | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
422: {
|
|
353
|
+
type: "validation";
|
|
354
|
+
on: string;
|
|
355
|
+
summary?: string | undefined;
|
|
356
|
+
message?: string | undefined;
|
|
357
|
+
found?: unknown;
|
|
358
|
+
property?: string | undefined;
|
|
359
|
+
expected?: string | undefined;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
} & {
|
|
368
|
+
autoclaim: {
|
|
369
|
+
":chainId": {
|
|
370
|
+
":scopeId": {
|
|
371
|
+
patch: {
|
|
372
|
+
body: {
|
|
373
|
+
minimumAmount?: number | undefined;
|
|
374
|
+
minimumInterval?: number | undefined;
|
|
375
|
+
active?: boolean | undefined;
|
|
376
|
+
pricingConfig?: {
|
|
377
|
+
type: import("@package/resources/enums").PricingConfigType.PER_CLAIM;
|
|
378
|
+
pricePerClaim?: number | undefined;
|
|
379
|
+
allowNegativeCredits?: boolean | undefined;
|
|
380
|
+
} | null | undefined;
|
|
381
|
+
};
|
|
382
|
+
params: {
|
|
383
|
+
chainId: number;
|
|
384
|
+
scopeId: string;
|
|
385
|
+
};
|
|
386
|
+
query: unknown;
|
|
387
|
+
headers: {
|
|
388
|
+
authorization: string;
|
|
389
|
+
};
|
|
390
|
+
response: {
|
|
391
|
+
200: {
|
|
392
|
+
chainId: number;
|
|
393
|
+
scopeType: import("@package/databases").AutoClaimScopeType;
|
|
394
|
+
scopeId: string;
|
|
395
|
+
creatorId: string;
|
|
396
|
+
tokenAddress: string | null;
|
|
397
|
+
campaignId: string | null;
|
|
398
|
+
userAddress: string | null;
|
|
399
|
+
minimumAmount: number | null;
|
|
400
|
+
minimumInterval: number | null;
|
|
401
|
+
active: boolean;
|
|
402
|
+
pricingConfig: import("@prisma/client/runtime/client").JsonValue;
|
|
403
|
+
};
|
|
404
|
+
422: {
|
|
405
|
+
type: "validation";
|
|
406
|
+
on: string;
|
|
407
|
+
summary?: string | undefined;
|
|
408
|
+
message?: string | undefined;
|
|
409
|
+
found?: unknown;
|
|
410
|
+
property?: string | undefined;
|
|
411
|
+
expected?: string | undefined;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
}, {
|
|
419
|
+
derive: {};
|
|
420
|
+
resolve: {};
|
|
421
|
+
schema: {};
|
|
422
|
+
standaloneSchema: {};
|
|
423
|
+
response: {};
|
|
424
|
+
}, {
|
|
425
|
+
derive: {};
|
|
426
|
+
resolve: {};
|
|
427
|
+
schema: {};
|
|
428
|
+
standaloneSchema: {};
|
|
429
|
+
response: {};
|
|
430
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoclaim.controller.js","sourceRoot":"","sources":["../../../../../../../apps/api/src/modules/v4/autoclaim/autoclaim.controller.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,C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IACE,MAAM,EAAE,oBAAoB;IAC5B,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,uBAAuB;IAChC,YAAY,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACnC,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAAA,CAC9B;IACD,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAE;CAC/D,CACF,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const FindManyAutoClaimConfigDto: import("@sinclair/typebox").TObject<{
|
|
2
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
3
|
+
items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
4
|
+
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
5
|
+
scopeType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"CAMPAIGN">, import("@sinclair/typebox").TLiteral<"TOKEN">, import("@sinclair/typebox").TLiteral<"CREATOR">, import("@sinclair/typebox").TLiteral<"USER">]>>;
|
|
6
|
+
creatorId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
|
+
tokenAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
userAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
active: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const GetByCompositeKeyDto: import("@sinclair/typebox").TObject<{
|
|
12
|
+
chainId: import("@sinclair/typebox").TNumber;
|
|
13
|
+
scopeId: import("@sinclair/typebox").TString;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const CreateAutoClaimConfigDto: import("@sinclair/typebox").TObject<{
|
|
16
|
+
chainId: import("@sinclair/typebox").TNumber;
|
|
17
|
+
scopeType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"CAMPAIGN">, import("@sinclair/typebox").TLiteral<"TOKEN">, import("@sinclair/typebox").TLiteral<"CREATOR">, import("@sinclair/typebox").TLiteral<"USER">]>;
|
|
18
|
+
scopeId: import("@sinclair/typebox").TString;
|
|
19
|
+
creatorId: import("@sinclair/typebox").TString;
|
|
20
|
+
tokenAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
|
+
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
22
|
+
userAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
23
|
+
minimumAmount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
24
|
+
minimumInterval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
25
|
+
pricingConfig: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
26
|
+
type: import("@sinclair/typebox").TEnum<typeof import("@package/resources/enums").PricingConfigType>;
|
|
27
|
+
pricePerClaim: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
28
|
+
allowNegativeCredits: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
29
|
+
}>>;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const UpdateAutoClaimConfigDto: import("@sinclair/typebox").TObject<{
|
|
32
|
+
minimumAmount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
33
|
+
minimumInterval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
34
|
+
active: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
35
|
+
pricingConfig: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
36
|
+
type: import("@sinclair/typebox").TEnum<typeof import("@package/resources/enums").PricingConfigType>;
|
|
37
|
+
pricePerClaim: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
38
|
+
allowNegativeCredits: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
39
|
+
}>, import("@sinclair/typebox").TNull]>>;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const GetClaimsToExecuteDto: import("@sinclair/typebox").TObject<{
|
|
42
|
+
chainId: import("@sinclair/typebox").TNumber;
|
|
43
|
+
scopeId: import("@sinclair/typebox").TString;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const GetClaimsToExecuteQueryDto: import("@sinclair/typebox").TObject<{
|
|
46
|
+
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
47
|
+
items: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
48
|
+
}>;
|
|
49
|
+
export type FindManyAutoClaimConfigModel = typeof FindManyAutoClaimConfigDto.static;
|
|
50
|
+
export type CreateAutoClaimConfigModel = typeof CreateAutoClaimConfigDto.static;
|
|
51
|
+
export type UpdateAutoClaimConfigModel = typeof UpdateAutoClaimConfigDto.static;
|
|
52
|
+
export type GetClaimsToExecuteQueryModel = typeof GetClaimsToExecuteQueryDto.static;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoclaim.model.js","sourceRoot":"","sources":["../../../../../../../apps/api/src/modules/v4/autoclaim/autoclaim.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,gNAAgF;AAEhF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAA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
|
|
2
|
+
import type { TransactionResult } from "../../../jobs/tx-executor/types";
|
|
3
|
+
/** Calculates credit costs for autoclaim operations based on pricing configuration and transaction details */
|
|
4
|
+
export declare abstract class AutoclaimPricingService {
|
|
5
|
+
/**
|
|
6
|
+
* Calculate the USD credit cost for a completed transaction.
|
|
7
|
+
* @returns 0 if no pricingConfig (backward compatible / free)
|
|
8
|
+
*/
|
|
9
|
+
static calculateCost(pricingConfig: PricingConfig | null | undefined, result: TransactionResult): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoclaim.pricing.js","sourceRoot":"","sources":["../../../../../../../apps/api/src/modules/v4/autoclaim/autoclaim.pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI7D,8GAA8G;AAC9G,MAAM,OAAgB,uBAAuB;IAC3C;;;OAGG;IACH,MAAM,CAAC,aAAa,CAAC,aAA+C,EAAE,MAAyB,EAAU;QACvG,IAAI,CAAC,aAAa;YAAE,OAAO,CAAC,CAAC;QAE7B,MAAM,SAAS,GAAI,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAoB,IAAI,CAAC,CAAC;QAEjE,QAAQ,aAAa,CAAC,IAAI,EAAE,CAAC;YAC3B,KAAK,iBAAiB,CAAC,SAAS;gBAC9B,OAAO,SAAS,GAAG,CAAC,aAAa,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC;YACxD;gBACE,OAAO,CAAC,CAAC;QACb,CAAC;IAAA,CACF;CACF"}
|