@glowlabs-org/utils 0.2.150 → 0.2.152
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/browser.js +1 -1
- package/dist/cjs/{farms-router-CMpG0RGM.js → farms-router-DwbBMkUd.js} +39 -3
- package/dist/cjs/farms-router-DwbBMkUd.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/control-api/control-router.d.ts +4 -2
- package/dist/cjs/lib/control-api/region-router.d.ts +2 -1
- package/dist/cjs/lib/types/index.d.ts +49 -16
- package/dist/esm/browser.js +2 -2
- package/dist/esm/{farms-router-wk3VSuCV.js → farms-router-C0g4hf2Z.js} +39 -3
- package/dist/esm/farms-router-C0g4hf2Z.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/control-api/control-router.d.ts +4 -2
- package/dist/esm/lib/control-api/region-router.d.ts +2 -1
- package/dist/esm/lib/types/index.d.ts +49 -16
- package/package.json +1 -1
- package/src/lib/control-api/control-router.ts +53 -8
- package/src/lib/control-api/region-router.ts +13 -0
- package/src/lib/types/index.ts +52 -16
- package/dist/cjs/farms-router-CMpG0RGM.js.map +0 -1
- package/dist/esm/farms-router-wk3VSuCV.js.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -13,8 +13,8 @@ import { parseUnits, formatUnits } from 'viem';
|
|
|
13
13
|
import { MerkleTree } from 'merkletreejs';
|
|
14
14
|
import { solidityPackedKeccak256, keccak256 } from 'ethers';
|
|
15
15
|
import Decimal from 'decimal.js';
|
|
16
|
-
import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-
|
|
17
|
-
export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-
|
|
16
|
+
import { H as HUB_URL, U as USDG_WEIGHT_DECIMAL_PRECISION, G as GLOW_WEIGHT_DECIMAL_PRECISION, M as MAX_WEIGHT } from './farms-router-C0g4hf2Z.js';
|
|
17
|
+
export { C as ControlRouter, F as FarmsRouter, d as KICKSTARTER_STATUS, K as KickstarterRouter, O as OFF_CHAIN_PAYMENT_CURRENCIES, P as PAYMENT_CURRENCIES, b as REGIONS, R as RegionRouter, S as STAKING_DIRECTIONS, T as TRANSFER_TYPES, W as WalletsRouter, c as configureSentry, u as useForwarder, a as useOffchainFractions } from './farms-router-C0g4hf2Z.js';
|
|
18
18
|
|
|
19
19
|
const GENESIS_TIMESTAMP = 1700352000;
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StakeRequest, RegionStake, WalletRegionStake, WalletRegionUnlocked, WalletRegionCommittedBalance, TransferDetails, GlwRegionRewardsResponse, MintedEventsResponse, StakeEventsResponse, FailedOperationsResponse, PendingTransfersResponse, PendingTransferType, RestakeRequest, MigrationAmountResponse } from "../types";
|
|
1
|
+
import type { StakeRequest, RegionStake, WalletRegionStake, WalletRegionUnlocked, WalletRegionCommittedBalance, TransferDetails, GlwRegionRewardsResponse, MintedEventsResponse, StakeEventsResponse, FailedOperationsResponse, PendingTransfersResponse, PendingTransferType, RestakeRequest, MigrationAmountResponse, RetryFailedOperationResponse, FarmRewardSplit } from "../types";
|
|
2
2
|
export interface PayProtocolDepositUsingStakedControlRequest {
|
|
3
3
|
wallet: string;
|
|
4
4
|
regionId: number;
|
|
@@ -28,6 +28,7 @@ export declare function ControlRouter(baseUrl: string): {
|
|
|
28
28
|
readonly fetchGctlPrice: () => Promise<string>;
|
|
29
29
|
readonly fetchGlwPrice: () => Promise<string>;
|
|
30
30
|
readonly fetchCirculatingSupply: () => Promise<string>;
|
|
31
|
+
readonly fetchHoldersCount: () => Promise<number>;
|
|
31
32
|
readonly fetchLastNonce: (wallet: string) => Promise<string>;
|
|
32
33
|
readonly fetchMintedEvents: (page?: number, limit?: number) => Promise<MintedEventsResponse>;
|
|
33
34
|
readonly fetchStakeEvents: (page?: number, limit?: number, regionId?: number) => Promise<StakeEventsResponse>;
|
|
@@ -39,11 +40,12 @@ export declare function ControlRouter(baseUrl: string): {
|
|
|
39
40
|
readonly fetchWalletRegionCommittedBalance: (wallet: string, regionId: number) => Promise<WalletRegionCommittedBalance>;
|
|
40
41
|
readonly fetchTransferDetails: (txId: string) => Promise<TransferDetails>;
|
|
41
42
|
readonly fetchGlwRegionRewards: () => Promise<GlwRegionRewardsResponse>;
|
|
43
|
+
readonly fetchFarmRewardSplits: (farmId: string) => Promise<FarmRewardSplit[]>;
|
|
42
44
|
readonly fetchMigrationAmount: (wallet: string) => Promise<MigrationAmountResponse>;
|
|
43
45
|
readonly stakeGctl: (stakeRequest: StakeRequest) => Promise<boolean>;
|
|
44
46
|
readonly unstakeGctl: (unstakeRequest: StakeRequest) => Promise<boolean>;
|
|
45
47
|
readonly restakeGctl: (restakeRequest: RestakeRequest) => Promise<boolean>;
|
|
46
|
-
readonly retryFailedOperation: (operationId: string) => Promise<
|
|
48
|
+
readonly retryFailedOperation: (operationId: string) => Promise<RetryFailedOperationResponse>;
|
|
47
49
|
readonly payProtocolDepositUsingStakedControl: (paymentRequest: PayProtocolDepositUsingStakedControlRequest) => Promise<PayProtocolDepositUsingStakedControlResponse>;
|
|
48
50
|
readonly migrateUser: (migrateRequest: MigrateUserRequest) => Promise<MigrateUserResponse>;
|
|
49
51
|
readonly isStaking: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegionWithMetadata, ActivationConfig, ActivationEvent, RegionDetails, SponsoredFarm, ActiveRegionsSummaryResponse, InstallerApplicationPayload, InstallerApplicationResponse } from "../types";
|
|
1
|
+
import type { RegionWithMetadata, ActivationConfig, ActivationEvent, RegionDetails, SponsoredFarm, ActiveRegionsSummaryResponse, RecentRegionActivityResponse, InstallerApplicationPayload, InstallerApplicationResponse } from "../types";
|
|
2
2
|
export declare function RegionRouter(baseUrl: string): {
|
|
3
3
|
readonly fetchRegions: (params?: {
|
|
4
4
|
isActive?: boolean;
|
|
@@ -8,6 +8,7 @@ export declare function RegionRouter(baseUrl: string): {
|
|
|
8
8
|
readonly fetchRegionByIdOrSlug: (idOrSlug: string) => Promise<RegionDetails>;
|
|
9
9
|
readonly fetchRegionSolarFarms: (regionId: number) => Promise<SponsoredFarm[]>;
|
|
10
10
|
readonly fetchActiveSummary: () => Promise<ActiveRegionsSummaryResponse>;
|
|
11
|
+
readonly fetchRecentActivity: () => Promise<RecentRegionActivityResponse>;
|
|
11
12
|
readonly getRegionByCode: (code: string) => RegionWithMetadata | null;
|
|
12
13
|
readonly applyInstallerCertification: (payload: InstallerApplicationPayload) => Promise<InstallerApplicationResponse>;
|
|
13
14
|
readonly regions: RegionWithMetadata[];
|
|
@@ -311,18 +311,17 @@ export interface RegionDetails extends RegionWithMetadata {
|
|
|
311
311
|
carbonCreditsIssued: number;
|
|
312
312
|
carbonCreditsPerWeek: number;
|
|
313
313
|
}
|
|
314
|
-
export interface
|
|
315
|
-
id: string;
|
|
316
|
-
regionId: number;
|
|
317
|
-
wallet: string;
|
|
314
|
+
export interface ActiveRegionDataPoint {
|
|
318
315
|
epoch: number;
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
316
|
+
timestamp: number;
|
|
317
|
+
gctlStaked: string;
|
|
318
|
+
pendingUnstake: string;
|
|
319
|
+
pendingRestakeOut: string;
|
|
320
|
+
pendingRestakeIn: string;
|
|
321
|
+
netPending: string;
|
|
322
|
+
eventCount: number;
|
|
323
|
+
firstEventTimestamp?: number;
|
|
324
|
+
lastEventTimestamp?: number;
|
|
326
325
|
}
|
|
327
326
|
export interface ActiveRegionSummary {
|
|
328
327
|
id: number;
|
|
@@ -330,20 +329,47 @@ export interface ActiveRegionSummary {
|
|
|
330
329
|
code: string;
|
|
331
330
|
slug: string;
|
|
332
331
|
isUs: boolean;
|
|
333
|
-
|
|
332
|
+
currentGctlStaked: string;
|
|
334
333
|
glwRewardPerWeek: string;
|
|
335
334
|
rewardShare: string;
|
|
336
|
-
|
|
337
|
-
pendingRestakeOut: string;
|
|
338
|
-
pendingRestakeIn: string;
|
|
339
|
-
events: ActiveRegionStakeEvent[];
|
|
335
|
+
data: ActiveRegionDataPoint[];
|
|
340
336
|
}
|
|
341
337
|
export interface ActiveRegionsSummaryResponse {
|
|
338
|
+
metadata: {
|
|
339
|
+
epochs: number[];
|
|
340
|
+
epochTimestamps: {
|
|
341
|
+
[epoch: string]: number;
|
|
342
|
+
};
|
|
343
|
+
currentEpoch: number;
|
|
344
|
+
};
|
|
342
345
|
total: {
|
|
343
346
|
totalGctlStaked: string;
|
|
344
347
|
totalGlwRewards: string;
|
|
345
348
|
};
|
|
346
349
|
regions: ActiveRegionSummary[];
|
|
350
|
+
aggregate: {
|
|
351
|
+
epochs: number[];
|
|
352
|
+
timestamps: number[];
|
|
353
|
+
totalGctlStaked: string[];
|
|
354
|
+
totalPendingUnstake: string[];
|
|
355
|
+
totalNetPending: string[];
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
export interface RegionActivityPeriod {
|
|
359
|
+
stakes: number;
|
|
360
|
+
unstakes: number;
|
|
361
|
+
restakes: number;
|
|
362
|
+
immediateUnstakes: number;
|
|
363
|
+
netChange: string;
|
|
364
|
+
}
|
|
365
|
+
export interface RegionActivity {
|
|
366
|
+
regionId: number;
|
|
367
|
+
regionName: string;
|
|
368
|
+
last24h: RegionActivityPeriod;
|
|
369
|
+
last7d: RegionActivityPeriod;
|
|
370
|
+
}
|
|
371
|
+
export interface RecentRegionActivityResponse {
|
|
372
|
+
activity: RegionActivity[];
|
|
347
373
|
}
|
|
348
374
|
export interface InstallerApplicationPayload {
|
|
349
375
|
wallet: string;
|
|
@@ -577,4 +603,11 @@ export interface FarmRewardSplitsResponse {
|
|
|
577
603
|
export interface FarmRewardSplitsErrorResponse {
|
|
578
604
|
error: string;
|
|
579
605
|
}
|
|
606
|
+
export interface HoldersCountResponse {
|
|
607
|
+
holders: number;
|
|
608
|
+
}
|
|
609
|
+
export interface RetryFailedOperationResponse {
|
|
610
|
+
success?: boolean;
|
|
611
|
+
queued?: boolean;
|
|
612
|
+
}
|
|
580
613
|
export type { MintedEvent as ControlMintedEvent };
|
package/package.json
CHANGED
|
@@ -19,7 +19,20 @@ import type {
|
|
|
19
19
|
PendingTransferType,
|
|
20
20
|
RestakeRequest,
|
|
21
21
|
MigrationAmountResponse,
|
|
22
|
+
HoldersCountResponse,
|
|
23
|
+
RetryFailedOperationResponse,
|
|
24
|
+
FarmRewardSplitsResponse,
|
|
25
|
+
FarmRewardSplitsErrorResponse,
|
|
26
|
+
FarmRewardSplit,
|
|
22
27
|
} from "../types";
|
|
28
|
+
|
|
29
|
+
interface FetchGctlBalanceResponse {
|
|
30
|
+
gctl_balance: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface FetchCommittedBalanceResponse {
|
|
34
|
+
gctl_committed_balance: string;
|
|
35
|
+
}
|
|
23
36
|
import {
|
|
24
37
|
sentryAddBreadcrumb,
|
|
25
38
|
sentryCaptureException,
|
|
@@ -69,6 +82,9 @@ function parseApiError(error: unknown): string {
|
|
|
69
82
|
// --------------------------------------------------------------------------
|
|
70
83
|
|
|
71
84
|
export function ControlRouter(baseUrl: string) {
|
|
85
|
+
if (!baseUrl) {
|
|
86
|
+
throw new Error("CONTROL API base URL is not set");
|
|
87
|
+
}
|
|
72
88
|
// ----------------------- Internal helpers --------------------------------
|
|
73
89
|
const request = async <T>(path: string, init?: RequestInit): Promise<T> => {
|
|
74
90
|
const res = await fetch(`${baseUrl}${path}`, init);
|
|
@@ -82,7 +98,7 @@ export function ControlRouter(baseUrl: string) {
|
|
|
82
98
|
// ----------------------- GETters -----------------------------------------
|
|
83
99
|
const fetchGctlBalance = async (wallet: string): Promise<string> => {
|
|
84
100
|
try {
|
|
85
|
-
const data = await request<
|
|
101
|
+
const data = await request<FetchGctlBalanceResponse>(
|
|
86
102
|
`/balance/${wallet}`
|
|
87
103
|
);
|
|
88
104
|
return (data?.gctl_balance ?? "0").toString();
|
|
@@ -93,7 +109,7 @@ export function ControlRouter(baseUrl: string) {
|
|
|
93
109
|
|
|
94
110
|
const fetchCommittedBalance = async (wallet: string): Promise<string> => {
|
|
95
111
|
try {
|
|
96
|
-
const data = await request<
|
|
112
|
+
const data = await request<FetchCommittedBalanceResponse>(
|
|
97
113
|
`/committed-balance/${wallet}`
|
|
98
114
|
);
|
|
99
115
|
return (data?.gctl_committed_balance ?? "0").toString();
|
|
@@ -138,6 +154,15 @@ export function ControlRouter(baseUrl: string) {
|
|
|
138
154
|
}
|
|
139
155
|
};
|
|
140
156
|
|
|
157
|
+
const fetchHoldersCount = async (): Promise<number> => {
|
|
158
|
+
try {
|
|
159
|
+
const data = await request<HoldersCountResponse>(`/holders/count`);
|
|
160
|
+
return data.holders;
|
|
161
|
+
} catch (error) {
|
|
162
|
+
throw new Error(parseApiError(error));
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
141
166
|
// Build pagination query helper
|
|
142
167
|
const buildPaginationQuery = (page?: number, limit?: number) => {
|
|
143
168
|
const p = page ?? 1;
|
|
@@ -225,6 +250,21 @@ export function ControlRouter(baseUrl: string) {
|
|
|
225
250
|
}
|
|
226
251
|
};
|
|
227
252
|
|
|
253
|
+
const fetchFarmRewardSplits = async (
|
|
254
|
+
farmId: string
|
|
255
|
+
): Promise<FarmRewardSplit[]> => {
|
|
256
|
+
try {
|
|
257
|
+
if (!farmId) throw new Error("Farm ID is required");
|
|
258
|
+
const data = await request<
|
|
259
|
+
FarmRewardSplitsResponse | FarmRewardSplitsErrorResponse
|
|
260
|
+
>(`/farms/${encodeURIComponent(farmId)}/reward-splits`);
|
|
261
|
+
if ("error" in data) throw new Error(data.error);
|
|
262
|
+
return data.rewardSplits ?? [];
|
|
263
|
+
} catch (error) {
|
|
264
|
+
throw new Error(parseApiError(error));
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
228
268
|
// Exposed query with error parsing
|
|
229
269
|
const getTransferDetails = async (txId: string): Promise<TransferDetails> => {
|
|
230
270
|
try {
|
|
@@ -399,7 +439,7 @@ export function ControlRouter(baseUrl: string) {
|
|
|
399
439
|
|
|
400
440
|
const retryFailedOperation = async (
|
|
401
441
|
operationId: string
|
|
402
|
-
): Promise<
|
|
442
|
+
): Promise<RetryFailedOperationResponse> => {
|
|
403
443
|
isRetryingFailedOperation = true;
|
|
404
444
|
try {
|
|
405
445
|
sentryAddBreadcrumb({
|
|
@@ -408,11 +448,14 @@ export function ControlRouter(baseUrl: string) {
|
|
|
408
448
|
level: "info",
|
|
409
449
|
data: { baseUrl, operationId },
|
|
410
450
|
});
|
|
411
|
-
await request(
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
451
|
+
const response = await request<RetryFailedOperationResponse>(
|
|
452
|
+
`/operations/failed/${operationId}/retry`,
|
|
453
|
+
{
|
|
454
|
+
method: "POST",
|
|
455
|
+
headers: { "Content-Type": "application/json" },
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
return response;
|
|
416
459
|
} catch (error) {
|
|
417
460
|
sentryCaptureException(error, {
|
|
418
461
|
action: "retryFailedOperation",
|
|
@@ -520,6 +563,7 @@ export function ControlRouter(baseUrl: string) {
|
|
|
520
563
|
fetchGctlPrice,
|
|
521
564
|
fetchGlwPrice,
|
|
522
565
|
fetchCirculatingSupply,
|
|
566
|
+
fetchHoldersCount,
|
|
523
567
|
fetchLastNonce,
|
|
524
568
|
fetchMintedEvents,
|
|
525
569
|
fetchStakeEvents,
|
|
@@ -531,6 +575,7 @@ export function ControlRouter(baseUrl: string) {
|
|
|
531
575
|
fetchWalletRegionCommittedBalance,
|
|
532
576
|
fetchTransferDetails: getTransferDetails,
|
|
533
577
|
fetchGlwRegionRewards,
|
|
578
|
+
fetchFarmRewardSplits,
|
|
534
579
|
fetchMigrationAmount,
|
|
535
580
|
|
|
536
581
|
// Mutations
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
RegionDetails,
|
|
10
10
|
SponsoredFarm,
|
|
11
11
|
ActiveRegionsSummaryResponse,
|
|
12
|
+
RecentRegionActivityResponse,
|
|
12
13
|
InstallerApplicationPayload,
|
|
13
14
|
InstallerApplicationResponse,
|
|
14
15
|
} from "../types";
|
|
@@ -133,6 +134,17 @@ export function RegionRouter(baseUrl: string) {
|
|
|
133
134
|
}
|
|
134
135
|
};
|
|
135
136
|
|
|
137
|
+
const fetchRecentActivity =
|
|
138
|
+
async (): Promise<RecentRegionActivityResponse> => {
|
|
139
|
+
try {
|
|
140
|
+
return await request<RecentRegionActivityResponse>(
|
|
141
|
+
`/regions/active/recent-activity`
|
|
142
|
+
);
|
|
143
|
+
} catch (error) {
|
|
144
|
+
throw new Error(parseApiError(error));
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
136
148
|
const applyInstallerCertification = async (
|
|
137
149
|
payload: InstallerApplicationPayload
|
|
138
150
|
): Promise<InstallerApplicationResponse> => {
|
|
@@ -205,6 +217,7 @@ export function RegionRouter(baseUrl: string) {
|
|
|
205
217
|
fetchRegionByIdOrSlug,
|
|
206
218
|
fetchRegionSolarFarms,
|
|
207
219
|
fetchActiveSummary,
|
|
220
|
+
fetchRecentActivity,
|
|
208
221
|
getRegionByCode,
|
|
209
222
|
applyInstallerCertification,
|
|
210
223
|
|
package/src/lib/types/index.ts
CHANGED
|
@@ -377,18 +377,17 @@ export interface RegionDetails extends RegionWithMetadata {
|
|
|
377
377
|
carbonCreditsPerWeek: number;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
export interface
|
|
381
|
-
id: string;
|
|
382
|
-
regionId: number;
|
|
383
|
-
wallet: string;
|
|
380
|
+
export interface ActiveRegionDataPoint {
|
|
384
381
|
epoch: number;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
382
|
+
timestamp: number;
|
|
383
|
+
gctlStaked: string;
|
|
384
|
+
pendingUnstake: string;
|
|
385
|
+
pendingRestakeOut: string;
|
|
386
|
+
pendingRestakeIn: string;
|
|
387
|
+
netPending: string;
|
|
388
|
+
eventCount: number;
|
|
389
|
+
firstEventTimestamp?: number;
|
|
390
|
+
lastEventTimestamp?: number;
|
|
392
391
|
}
|
|
393
392
|
|
|
394
393
|
export interface ActiveRegionSummary {
|
|
@@ -397,21 +396,49 @@ export interface ActiveRegionSummary {
|
|
|
397
396
|
code: string;
|
|
398
397
|
slug: string;
|
|
399
398
|
isUs: boolean;
|
|
400
|
-
|
|
399
|
+
currentGctlStaked: string;
|
|
401
400
|
glwRewardPerWeek: string;
|
|
402
401
|
rewardShare: string;
|
|
403
|
-
|
|
404
|
-
pendingRestakeOut: string;
|
|
405
|
-
pendingRestakeIn: string;
|
|
406
|
-
events: ActiveRegionStakeEvent[];
|
|
402
|
+
data: ActiveRegionDataPoint[];
|
|
407
403
|
}
|
|
408
404
|
|
|
409
405
|
export interface ActiveRegionsSummaryResponse {
|
|
406
|
+
metadata: {
|
|
407
|
+
epochs: number[];
|
|
408
|
+
epochTimestamps: { [epoch: string]: number };
|
|
409
|
+
currentEpoch: number;
|
|
410
|
+
};
|
|
410
411
|
total: {
|
|
411
412
|
totalGctlStaked: string;
|
|
412
413
|
totalGlwRewards: string;
|
|
413
414
|
};
|
|
414
415
|
regions: ActiveRegionSummary[];
|
|
416
|
+
aggregate: {
|
|
417
|
+
epochs: number[];
|
|
418
|
+
timestamps: number[];
|
|
419
|
+
totalGctlStaked: string[];
|
|
420
|
+
totalPendingUnstake: string[];
|
|
421
|
+
totalNetPending: string[];
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface RegionActivityPeriod {
|
|
426
|
+
stakes: number;
|
|
427
|
+
unstakes: number;
|
|
428
|
+
restakes: number;
|
|
429
|
+
immediateUnstakes: number;
|
|
430
|
+
netChange: string; // atomic units (can be negative)
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export interface RegionActivity {
|
|
434
|
+
regionId: number;
|
|
435
|
+
regionName: string;
|
|
436
|
+
last24h: RegionActivityPeriod;
|
|
437
|
+
last7d: RegionActivityPeriod;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface RecentRegionActivityResponse {
|
|
441
|
+
activity: RegionActivity[];
|
|
415
442
|
}
|
|
416
443
|
|
|
417
444
|
export interface InstallerApplicationPayload {
|
|
@@ -703,6 +730,15 @@ export interface FarmRewardSplitsErrorResponse {
|
|
|
703
730
|
error: string;
|
|
704
731
|
}
|
|
705
732
|
|
|
733
|
+
export interface HoldersCountResponse {
|
|
734
|
+
holders: number;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export interface RetryFailedOperationResponse {
|
|
738
|
+
success?: boolean;
|
|
739
|
+
queued?: boolean;
|
|
740
|
+
}
|
|
741
|
+
|
|
706
742
|
// ---------------------------------------------------------------------------
|
|
707
743
|
// Barrel exports (convenience)
|
|
708
744
|
// ---------------------------------------------------------------------------
|