@merkl/api 0.15.35 → 0.15.37
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 +15 -10
- package/dist/src/index.d.ts +3 -2
- package/dist/src/modules/v4/router.d.ts +3 -2
- package/dist/src/modules/v4/status/status.controller.d.ts +3 -2
- package/dist/src/modules/v4/status/status.repository.d.ts +1 -0
- package/dist/src/modules/v4/status/status.repository.js +1 -0
- package/dist/src/modules/v4/status/status.service.d.ts +3 -2
- package/dist/src/modules/v4/status/status.service.js +13 -4
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/eden/index.d.ts
CHANGED
@@ -2683,7 +2683,7 @@ declare const eden: {
|
|
2683
2683
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
2684
2684
|
200: {
|
2685
2685
|
delay: number;
|
2686
|
-
|
2686
|
+
computedUntil: bigint;
|
2687
2687
|
startTimestamp: bigint;
|
2688
2688
|
endTimestamp: bigint;
|
2689
2689
|
CampaignStatus: {
|
@@ -2696,6 +2696,7 @@ declare const eden: {
|
|
2696
2696
|
}[];
|
2697
2697
|
Opportunity: {
|
2698
2698
|
name: string;
|
2699
|
+
id: string;
|
2699
2700
|
};
|
2700
2701
|
computeChainId: number;
|
2701
2702
|
distributionChainId: number;
|
@@ -2715,7 +2716,7 @@ declare const eden: {
|
|
2715
2716
|
tree: string;
|
2716
2717
|
lastTree: string;
|
2717
2718
|
admin: string;
|
2718
|
-
adminUrl
|
2719
|
+
adminUrl?: string;
|
2719
2720
|
distributor: string;
|
2720
2721
|
distributionCreator: string;
|
2721
2722
|
endOfDisputePeriod: number;
|
@@ -5766,7 +5767,7 @@ declare const eden: {
|
|
5766
5767
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
5767
5768
|
200: {
|
5768
5769
|
delay: number;
|
5769
|
-
|
5770
|
+
computedUntil: bigint;
|
5770
5771
|
startTimestamp: bigint;
|
5771
5772
|
endTimestamp: bigint;
|
5772
5773
|
CampaignStatus: {
|
@@ -5779,6 +5780,7 @@ declare const eden: {
|
|
5779
5780
|
}[];
|
5780
5781
|
Opportunity: {
|
5781
5782
|
name: string;
|
5783
|
+
id: string;
|
5782
5784
|
};
|
5783
5785
|
computeChainId: number;
|
5784
5786
|
distributionChainId: number;
|
@@ -5798,7 +5800,7 @@ declare const eden: {
|
|
5798
5800
|
tree: string;
|
5799
5801
|
lastTree: string;
|
5800
5802
|
admin: string;
|
5801
|
-
adminUrl
|
5803
|
+
adminUrl?: string;
|
5802
5804
|
distributor: string;
|
5803
5805
|
distributionCreator: string;
|
5804
5806
|
endOfDisputePeriod: number;
|
@@ -10173,7 +10175,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10173
10175
|
response: {
|
10174
10176
|
200: {
|
10175
10177
|
delay: number;
|
10176
|
-
|
10178
|
+
computedUntil: bigint;
|
10177
10179
|
startTimestamp: bigint;
|
10178
10180
|
endTimestamp: bigint;
|
10179
10181
|
CampaignStatus: {
|
@@ -10186,6 +10188,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10186
10188
|
}[];
|
10187
10189
|
Opportunity: {
|
10188
10190
|
name: string;
|
10191
|
+
id: string;
|
10189
10192
|
};
|
10190
10193
|
computeChainId: number;
|
10191
10194
|
distributionChainId: number;
|
@@ -10210,7 +10213,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
10210
10213
|
tree: string;
|
10211
10214
|
lastTree: string;
|
10212
10215
|
admin: string;
|
10213
|
-
adminUrl
|
10216
|
+
adminUrl?: string;
|
10214
10217
|
distributor: string;
|
10215
10218
|
distributionCreator: string;
|
10216
10219
|
endOfDisputePeriod: number;
|
@@ -14281,7 +14284,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
14281
14284
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
14282
14285
|
200: {
|
14283
14286
|
delay: number;
|
14284
|
-
|
14287
|
+
computedUntil: bigint;
|
14285
14288
|
startTimestamp: bigint;
|
14286
14289
|
endTimestamp: bigint;
|
14287
14290
|
CampaignStatus: {
|
@@ -14294,6 +14297,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
14294
14297
|
}[];
|
14295
14298
|
Opportunity: {
|
14296
14299
|
name: string;
|
14300
|
+
id: string;
|
14297
14301
|
};
|
14298
14302
|
computeChainId: number;
|
14299
14303
|
distributionChainId: number;
|
@@ -14313,7 +14317,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
14313
14317
|
tree: string;
|
14314
14318
|
lastTree: string;
|
14315
14319
|
admin: string;
|
14316
|
-
adminUrl
|
14320
|
+
adminUrl?: string;
|
14317
14321
|
distributor: string;
|
14318
14322
|
distributionCreator: string;
|
14319
14323
|
endOfDisputePeriod: number;
|
@@ -17364,7 +17368,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
17364
17368
|
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
17365
17369
|
200: {
|
17366
17370
|
delay: number;
|
17367
|
-
|
17371
|
+
computedUntil: bigint;
|
17368
17372
|
startTimestamp: bigint;
|
17369
17373
|
endTimestamp: bigint;
|
17370
17374
|
CampaignStatus: {
|
@@ -17377,6 +17381,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
17377
17381
|
}[];
|
17378
17382
|
Opportunity: {
|
17379
17383
|
name: string;
|
17384
|
+
id: string;
|
17380
17385
|
};
|
17381
17386
|
computeChainId: number;
|
17382
17387
|
distributionChainId: number;
|
@@ -17396,7 +17401,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
|
|
17396
17401
|
tree: string;
|
17397
17402
|
lastTree: string;
|
17398
17403
|
admin: string;
|
17399
|
-
adminUrl
|
17404
|
+
adminUrl?: string;
|
17400
17405
|
distributor: string;
|
17401
17406
|
distributionCreator: string;
|
17402
17407
|
endOfDisputePeriod: number;
|
package/dist/src/index.d.ts
CHANGED
@@ -3309,7 +3309,7 @@ declare const app: Elysia<"", false, {
|
|
3309
3309
|
response: {
|
3310
3310
|
200: {
|
3311
3311
|
delay: number;
|
3312
|
-
|
3312
|
+
computedUntil: bigint;
|
3313
3313
|
startTimestamp: bigint;
|
3314
3314
|
endTimestamp: bigint;
|
3315
3315
|
CampaignStatus: {
|
@@ -3322,6 +3322,7 @@ declare const app: Elysia<"", false, {
|
|
3322
3322
|
}[];
|
3323
3323
|
Opportunity: {
|
3324
3324
|
name: string;
|
3325
|
+
id: string;
|
3325
3326
|
};
|
3326
3327
|
computeChainId: number;
|
3327
3328
|
distributionChainId: number;
|
@@ -3346,7 +3347,7 @@ declare const app: Elysia<"", false, {
|
|
3346
3347
|
tree: string;
|
3347
3348
|
lastTree: string;
|
3348
3349
|
admin: string;
|
3349
|
-
adminUrl
|
3350
|
+
adminUrl?: string;
|
3350
3351
|
distributor: string;
|
3351
3352
|
distributionCreator: string;
|
3352
3353
|
endOfDisputePeriod: number;
|
@@ -3179,7 +3179,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3179
3179
|
response: {
|
3180
3180
|
200: {
|
3181
3181
|
delay: number;
|
3182
|
-
|
3182
|
+
computedUntil: bigint;
|
3183
3183
|
startTimestamp: bigint;
|
3184
3184
|
endTimestamp: bigint;
|
3185
3185
|
CampaignStatus: {
|
@@ -3192,6 +3192,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3192
3192
|
}[];
|
3193
3193
|
Opportunity: {
|
3194
3194
|
name: string;
|
3195
|
+
id: string;
|
3195
3196
|
};
|
3196
3197
|
computeChainId: number;
|
3197
3198
|
distributionChainId: number;
|
@@ -3216,7 +3217,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3216
3217
|
tree: string;
|
3217
3218
|
lastTree: string;
|
3218
3219
|
admin: string;
|
3219
|
-
adminUrl
|
3220
|
+
adminUrl?: string;
|
3220
3221
|
distributor: string;
|
3221
3222
|
distributionCreator: string;
|
3222
3223
|
endOfDisputePeriod: number;
|
@@ -128,7 +128,7 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
|
|
128
128
|
response: {
|
129
129
|
200: {
|
130
130
|
delay: number;
|
131
|
-
|
131
|
+
computedUntil: bigint;
|
132
132
|
startTimestamp: bigint;
|
133
133
|
endTimestamp: bigint;
|
134
134
|
CampaignStatus: {
|
@@ -141,6 +141,7 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
|
|
141
141
|
}[];
|
142
142
|
Opportunity: {
|
143
143
|
name: string;
|
144
|
+
id: string;
|
144
145
|
};
|
145
146
|
computeChainId: number;
|
146
147
|
distributionChainId: number;
|
@@ -165,7 +166,7 @@ export declare const StatusController: Elysia<"/campaign-status", false, {
|
|
165
166
|
tree: string;
|
166
167
|
lastTree: string;
|
167
168
|
admin: string;
|
168
|
-
adminUrl
|
169
|
+
adminUrl?: string;
|
169
170
|
distributor: string;
|
170
171
|
distributionCreator: string;
|
171
172
|
endOfDisputePeriod: number;
|
@@ -40,7 +40,7 @@ export declare class StatusService {
|
|
40
40
|
tree: string;
|
41
41
|
lastTree: string;
|
42
42
|
admin: string;
|
43
|
-
adminUrl
|
43
|
+
adminUrl?: string;
|
44
44
|
distributor: string;
|
45
45
|
distributionCreator: string;
|
46
46
|
endOfDisputePeriod: number;
|
@@ -49,7 +49,7 @@ export declare class StatusService {
|
|
49
49
|
}>>;
|
50
50
|
static findManyDelay(query: DelayModel): Promise<{
|
51
51
|
delay: number;
|
52
|
-
|
52
|
+
computedUntil: bigint;
|
53
53
|
startTimestamp: bigint;
|
54
54
|
endTimestamp: bigint;
|
55
55
|
CampaignStatus: {
|
@@ -62,6 +62,7 @@ export declare class StatusService {
|
|
62
62
|
}[];
|
63
63
|
Opportunity: {
|
64
64
|
name: string;
|
65
|
+
id: string;
|
65
66
|
};
|
66
67
|
computeChainId: number;
|
67
68
|
distributionChainId: number;
|
@@ -61,12 +61,21 @@ export class StatusService {
|
|
61
61
|
const res = {};
|
62
62
|
for (const [index, chainIdString] of Object.keys(merklRoots).entries()) {
|
63
63
|
const chainId = Number.parseInt(chainIdString);
|
64
|
-
console.log(chainId, registry(chainId)?.Merkl);
|
65
64
|
const delayedCampaigns = delayedCampaignPromises[index].status === "rejected" ? [] : delayedCampaignPromises[index].value;
|
65
|
+
if (!registry(chainId)?.Merkl?.DistributionCreator ||
|
66
|
+
!registry(chainId)?.Merkl?.Distributor ||
|
67
|
+
!registry(chainId)?.AngleLabs) {
|
68
|
+
continue;
|
69
|
+
}
|
70
|
+
let adminUrl = undefined;
|
71
|
+
try {
|
72
|
+
adminUrl = getMultisigURL(chainId, registry(chainId)?.AngleLabs ?? "");
|
73
|
+
}
|
74
|
+
catch { }
|
66
75
|
res[chainId] = {
|
67
76
|
...merklRoots[chainId],
|
68
77
|
admin: registry(chainId)?.AngleLabs,
|
69
|
-
adminUrl
|
78
|
+
adminUrl,
|
70
79
|
distributor: registry(chainId)?.Merkl?.Distributor,
|
71
80
|
distributionCreator: registry(chainId)?.Merkl?.DistributionCreator,
|
72
81
|
delayed: delayedCampaigns,
|
@@ -83,8 +92,8 @@ export class StatusService {
|
|
83
92
|
Math.min(now, endTimestamp, Number.parseInt((x.CampaignStatus?.[0]?.computedUntil ?? x.startTimestamp).toString()));
|
84
93
|
return {
|
85
94
|
...x,
|
86
|
-
delay
|
87
|
-
|
95
|
+
delay,
|
96
|
+
computedUntil: x.CampaignStatus?.[0]?.computedUntil ?? x.startTimestamp,
|
88
97
|
};
|
89
98
|
})
|
90
99
|
.sort((a, b) => b.delay - a.delay)
|