@glowlabs-org/utils 0.2.69 → 0.2.71
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/cjs/lib/control-api/kickstarter-router.d.ts +2 -4
- package/dist/cjs/lib/types/index.d.ts +16 -0
- package/dist/cjs/wallets-router-BlUnsu7X.js.map +1 -1
- package/dist/esm/lib/control-api/kickstarter-router.d.ts +2 -4
- package/dist/esm/lib/types/index.d.ts +16 -0
- package/dist/esm/wallets-router-0gtxkell.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/control-api/kickstarter-router.ts +3 -6
- package/src/lib/types/index.ts +18 -0
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
KickstarterCreateResponse,
|
|
8
8
|
CommitKickstarterPayload,
|
|
9
9
|
CommitKickstarterResponse,
|
|
10
|
+
KickstarterDetails,
|
|
10
11
|
} from "../types";
|
|
11
12
|
|
|
12
13
|
function parseApiError(error: unknown): string {
|
|
@@ -65,14 +66,10 @@ export function KickstarterRouter(baseUrl: string) {
|
|
|
65
66
|
|
|
66
67
|
const fetchKickstarter = async (
|
|
67
68
|
idOrSlug: string
|
|
68
|
-
): Promise<
|
|
69
|
-
Kickstarter & {
|
|
70
|
-
contributorsCount: number;
|
|
71
|
-
}
|
|
72
|
-
> => {
|
|
69
|
+
): Promise<KickstarterDetails> => {
|
|
73
70
|
try {
|
|
74
71
|
const data = await request<{
|
|
75
|
-
kickstarter:
|
|
72
|
+
kickstarter: KickstarterDetails;
|
|
76
73
|
}>(`/kickstarters/${encodeURIComponent(idOrSlug)}`);
|
|
77
74
|
return data.kickstarter;
|
|
78
75
|
} catch (error) {
|
package/src/lib/types/index.ts
CHANGED
|
@@ -229,6 +229,12 @@ export interface Kickstarter {
|
|
|
229
229
|
kickoffStakeEventId?: string;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
export interface KickstarterDetails extends Kickstarter {
|
|
233
|
+
contributorsCount: number;
|
|
234
|
+
farmCount: number;
|
|
235
|
+
solarFarmApplications: SolarFarmApplication[];
|
|
236
|
+
}
|
|
237
|
+
|
|
232
238
|
export interface CommitKickstarterPayload {
|
|
233
239
|
wallet: string; // 0x-prefixed 40-char hex
|
|
234
240
|
amount: string; // atomic GCTL, must equal stakeTargetGctl/KICKSTARTER_STAKE_PERCENTAGE
|
|
@@ -277,8 +283,20 @@ export interface SponsoredFarm {
|
|
|
277
283
|
}[];
|
|
278
284
|
}
|
|
279
285
|
|
|
286
|
+
export interface SolarFarmApplication {
|
|
287
|
+
applicationId: string;
|
|
288
|
+
farmId: string | null;
|
|
289
|
+
farmOwnerWallet: string;
|
|
290
|
+
regionId: number;
|
|
291
|
+
gcaWallet: string;
|
|
292
|
+
protocolDepositUSDC6Decimals: string;
|
|
293
|
+
status: "audit_fees_paid" | "completed";
|
|
294
|
+
createdAt: string;
|
|
295
|
+
}
|
|
296
|
+
|
|
280
297
|
export interface RegionDetails extends RegionWithMetadata {
|
|
281
298
|
sponsoredFarms: SponsoredFarm[];
|
|
299
|
+
solarFarmApplications: SolarFarmApplication[];
|
|
282
300
|
glwPerWeek: number;
|
|
283
301
|
usdgPerWeek: number;
|
|
284
302
|
gctlPerWeek: number;
|