@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.
@@ -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: Kickstarter & { contributorsCount: number };
72
+ kickstarter: KickstarterDetails;
76
73
  }>(`/kickstarters/${encodeURIComponent(idOrSlug)}`);
77
74
  return data.kickstarter;
78
75
  } catch (error) {
@@ -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;