@satrush/api 0.1.7 → 0.1.9

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/index.cjs CHANGED
@@ -32,8 +32,10 @@ __export(index_exports, {
32
32
  AutomationStrategyDto: () => AutomationStrategyDto,
33
33
  ClaimTypeDto: () => ClaimTypeDto,
34
34
  EpochStateDto: () => EpochStateDto,
35
+ HashrateActionTypeDto: () => HashrateActionTypeDto,
35
36
  NotificationEntity: () => NotificationEntity,
36
37
  OneBtcStateDto: () => OneBtcStateDto,
38
+ RoundHistoryStateDto: () => RoundHistoryStateDto,
37
39
  RoundStateDto: () => RoundStateDto,
38
40
  SatrushBackendSdk: () => SatrushBackendSdk,
39
41
  SatrushBackendSdkError: () => SatrushBackendSdkError,
@@ -46,24 +48,52 @@ __export(index_exports, {
46
48
  zBadRequestErrorCodeErrorBody: () => zBadRequestErrorCodeErrorBody,
47
49
  zBoardDto: () => zBoardDto,
48
50
  zClaimTypeDto: () => zClaimTypeDto,
51
+ zEpochHistoryApiError400Error: () => zEpochHistoryApiError400Error,
52
+ zEpochHistoryApiError400InvalidRange: () => zEpochHistoryApiError400InvalidRange,
53
+ zEpochHistoryApiError500Error: () => zEpochHistoryApiError500Error,
54
+ zEpochIterationHistoryDto: () => zEpochIterationHistoryDto,
49
55
  zEpochStateDto: () => zEpochStateDto,
50
56
  zEpochVaultDto: () => zEpochVaultDto,
51
57
  zEpochVaultEntryDto: () => zEpochVaultEntryDto,
52
58
  zEpochVaultIterationDto: () => zEpochVaultIterationDto,
53
59
  zEpochWinnerDto: () => zEpochWinnerDto,
60
+ zEpochWinnerHistoryDto: () => zEpochWinnerHistoryDto,
61
+ zEpochWinnersApiError400Error: () => zEpochWinnersApiError400Error,
62
+ zEpochWinnersApiError400InvalidBefore: () => zEpochWinnersApiError400InvalidBefore,
63
+ zEpochWinnersApiError400InvalidRange: () => zEpochWinnersApiError400InvalidRange,
64
+ zEpochWinnersApiError500Error: () => zEpochWinnersApiError500Error,
54
65
  zFieldError: () => zFieldError,
55
66
  zGetBoardData: () => zGetBoardData,
56
67
  zGetBoardResponse: () => zGetBoardResponse,
57
68
  zGetConfigData: () => zGetConfigData,
58
69
  zGetConfigResponse: () => zGetConfigResponse,
59
- zGetLeaderboardData: () => zGetLeaderboardData,
60
- zGetLeaderboardResponse: () => zGetLeaderboardResponse,
70
+ zGetEpochHistoryData: () => zGetEpochHistoryData,
71
+ zGetEpochHistoryResponse: () => zGetEpochHistoryResponse,
72
+ zGetEpochWinnersData: () => zGetEpochWinnersData,
73
+ zGetEpochWinnersResponse: () => zGetEpochWinnersResponse,
74
+ zGetHashrateEarnedLeaderboardData: () => zGetHashrateEarnedLeaderboardData,
75
+ zGetHashrateEarnedLeaderboardResponse: () => zGetHashrateEarnedLeaderboardResponse,
76
+ zGetOneBtcHistoryData: () => zGetOneBtcHistoryData,
77
+ zGetOneBtcHistoryResponse: () => zGetOneBtcHistoryResponse,
78
+ zGetRoundsData: () => zGetRoundsData,
79
+ zGetRoundsPlayedLeaderboardData: () => zGetRoundsPlayedLeaderboardData,
80
+ zGetRoundsPlayedLeaderboardResponse: () => zGetRoundsPlayedLeaderboardResponse,
81
+ zGetRoundsResponse: () => zGetRoundsResponse,
82
+ zGetSatsEarnedLeaderboardData: () => zGetSatsEarnedLeaderboardData,
83
+ zGetSatsEarnedLeaderboardResponse: () => zGetSatsEarnedLeaderboardResponse,
61
84
  zGetUserClaimsData: () => zGetUserClaimsData,
62
85
  zGetUserClaimsResponse: () => zGetUserClaimsResponse,
63
86
  zGetUserDeploymentsData: () => zGetUserDeploymentsData,
64
87
  zGetUserDeploymentsResponse: () => zGetUserDeploymentsResponse,
88
+ zGetUserEpochEntriesData: () => zGetUserEpochEntriesData,
89
+ zGetUserEpochEntriesResponse: () => zGetUserEpochEntriesResponse,
90
+ zGetUserHashrateActionsData: () => zGetUserHashrateActionsData,
91
+ zGetUserHashrateActionsResponse: () => zGetUserHashrateActionsResponse,
92
+ zGetUserOneBtcEntriesData: () => zGetUserOneBtcEntriesData,
93
+ zGetUserOneBtcEntriesResponse: () => zGetUserOneBtcEntriesResponse,
65
94
  zGetUserProfileData: () => zGetUserProfileData,
66
95
  zGetUserProfileResponse: () => zGetUserProfileResponse,
96
+ zHashrateActionTypeDto: () => zHashrateActionTypeDto,
67
97
  zI128Dto: () => zI128Dto,
68
98
  zI64Dto: () => zI64Dto,
69
99
  zInternalErrorCodeErrorBody: () => zInternalErrorCodeErrorBody,
@@ -71,7 +101,14 @@ __export(index_exports, {
71
101
  zMinerClaimDto: () => zMinerClaimDto,
72
102
  zMinerDeploymentDto: () => zMinerDeploymentDto,
73
103
  zMinerDto: () => zMinerDto,
104
+ zMinerEpochEntryDto: () => zMinerEpochEntryDto,
105
+ zMinerHashrateActionDto: () => zMinerHashrateActionDto,
106
+ zMinerOneBtcEntryDto: () => zMinerOneBtcEntryDto,
74
107
  zNotificationEntity: () => zNotificationEntity,
108
+ zOneBtcHistoryApiError400Error: () => zOneBtcHistoryApiError400Error,
109
+ zOneBtcHistoryApiError400InvalidRange: () => zOneBtcHistoryApiError400InvalidRange,
110
+ zOneBtcHistoryApiError500Error: () => zOneBtcHistoryApiError500Error,
111
+ zOneBtcIterationHistoryDto: () => zOneBtcIterationHistoryDto,
75
112
  zOneBtcStateDto: () => zOneBtcStateDto,
76
113
  zOneBtcVaultDto: () => zOneBtcVaultDto,
77
114
  zOneBtcVaultEntryDto: () => zOneBtcVaultEntryDto,
@@ -83,7 +120,14 @@ __export(index_exports, {
83
120
  zPublicAutomationDto: () => zPublicAutomationDto,
84
121
  zPublicDeploymentDto: () => zPublicDeploymentDto,
85
122
  zRoundDto: () => zRoundDto,
123
+ zRoundHistoryDto: () => zRoundHistoryDto,
124
+ zRoundHistoryStateDto: () => zRoundHistoryStateDto,
86
125
  zRoundStateDto: () => zRoundStateDto,
126
+ zRoundsApiError400Error: () => zRoundsApiError400Error,
127
+ zRoundsApiError400InvalidBefore: () => zRoundsApiError400InvalidBefore,
128
+ zRoundsApiError400InvalidIsSatStrike: () => zRoundsApiError400InvalidIsSatStrike,
129
+ zRoundsApiError400InvalidRange: () => zRoundsApiError400InvalidRange,
130
+ zRoundsApiError500Error: () => zRoundsApiError500Error,
87
131
  zSatrushConfigDto: () => zSatrushConfigDto,
88
132
  zSatsVaultDto: () => zSatsVaultDto,
89
133
  zSnapshotDto: () => zSnapshotDto,
@@ -105,8 +149,19 @@ __export(index_exports, {
105
149
  zUserDeploymentsApiError400InvalidBefore: () => zUserDeploymentsApiError400InvalidBefore,
106
150
  zUserDeploymentsApiError400InvalidRange: () => zUserDeploymentsApiError400InvalidRange,
107
151
  zUserDeploymentsApiError500Error: () => zUserDeploymentsApiError500Error,
152
+ zUserHashrateApiError400Error: () => zUserHashrateApiError400Error,
153
+ zUserHashrateApiError400InvalidAddress: () => zUserHashrateApiError400InvalidAddress,
154
+ zUserHashrateApiError400InvalidBefore: () => zUserHashrateApiError400InvalidBefore,
155
+ zUserHashrateApiError400InvalidRange: () => zUserHashrateApiError400InvalidRange,
156
+ zUserHashrateApiError500Error: () => zUserHashrateApiError500Error,
108
157
  zUserProfileApiError400Error: () => zUserProfileApiError400Error,
109
158
  zUserProfileApiError400InvalidAddress: () => zUserProfileApiError400InvalidAddress,
159
+ zUserVaultEntriesApiError400Error: () => zUserVaultEntriesApiError400Error,
160
+ zUserVaultEntriesApiError400InvalidAddress: () => zUserVaultEntriesApiError400InvalidAddress,
161
+ zUserVaultEntriesApiError400InvalidBefore: () => zUserVaultEntriesApiError400InvalidBefore,
162
+ zUserVaultEntriesApiError400InvalidRange: () => zUserVaultEntriesApiError400InvalidRange,
163
+ zUserVaultEntriesApiError400InvalidWinsOnly: () => zUserVaultEntriesApiError400InvalidWinsOnly,
164
+ zUserVaultEntriesApiError500Error: () => zUserVaultEntriesApiError500Error,
110
165
  zValidationErrorCodeErrorBody: () => zValidationErrorCodeErrorBody,
111
166
  zValidationErrorCodeValidationDetailsErrorBody: () => zValidationErrorCodeValidationDetailsErrorBody
112
167
  });
@@ -1101,8 +1156,12 @@ var epochVaultDtoSchemaResponseTransformer = (data) => {
1101
1156
  if (data.currentIteration) {
1102
1157
  data.currentIteration = epochVaultIterationDtoSchemaResponseTransformer(data.currentIteration);
1103
1158
  }
1104
- data.iterationEndsAt = new Date(data.iterationEndsAt);
1105
- data.iterationStartedAt = new Date(data.iterationStartedAt);
1159
+ if (data.iterationEndsAt) {
1160
+ data.iterationEndsAt = new Date(data.iterationEndsAt);
1161
+ }
1162
+ if (data.iterationStartedAt) {
1163
+ data.iterationStartedAt = new Date(data.iterationStartedAt);
1164
+ }
1106
1165
  data.lastTriggerSlot = u64DtoSchemaResponseTransformer(data.lastTriggerSlot);
1107
1166
  data.pendingUsdAmount = u64DtoSchemaResponseTransformer(data.pendingUsdAmount);
1108
1167
  data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
@@ -1154,8 +1213,12 @@ var boardDtoSchemaResponseTransformer = (data) => {
1154
1213
  if (data.previousRound) {
1155
1214
  data.previousRound = roundDtoSchemaResponseTransformer(data.previousRound);
1156
1215
  }
1157
- data.roundEndsAt = new Date(data.roundEndsAt);
1158
- data.roundStartedAt = new Date(data.roundStartedAt);
1216
+ if (data.roundEndsAt) {
1217
+ data.roundEndsAt = new Date(data.roundEndsAt);
1218
+ }
1219
+ if (data.roundStartedAt) {
1220
+ data.roundStartedAt = new Date(data.roundStartedAt);
1221
+ }
1159
1222
  data.satsVault = satsVaultDtoSchemaResponseTransformer(data.satsVault);
1160
1223
  data.startSlot = u64DtoSchemaResponseTransformer(data.startSlot);
1161
1224
  data.strike = strikeJackpotDtoSchemaResponseTransformer(data.strike);
@@ -1173,14 +1236,98 @@ var getConfigResponseTransformer = async (data) => {
1173
1236
  data.data = satrushConfigDtoSchemaResponseTransformer(data.data);
1174
1237
  return data;
1175
1238
  };
1239
+ var epochIterationHistoryDtoSchemaResponseTransformer = (data) => {
1240
+ if (data.endedAt) {
1241
+ data.endedAt = new Date(data.endedAt);
1242
+ }
1243
+ data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
1244
+ data.poolUsdAmount = u64DtoSchemaResponseTransformer(data.poolUsdAmount);
1245
+ data.startedAt = new Date(data.startedAt);
1246
+ data.totalTickets = u64DtoSchemaResponseTransformer(data.totalTickets);
1247
+ if (data.triggeredAt) {
1248
+ data.triggeredAt = new Date(data.triggeredAt);
1249
+ }
1250
+ return data;
1251
+ };
1252
+ var getEpochHistoryResponseTransformer = async (data) => {
1253
+ data.data = data.data.map((item) => epochIterationHistoryDtoSchemaResponseTransformer(item));
1254
+ return data;
1255
+ };
1256
+ var epochWinnerHistoryDtoSchemaResponseTransformer = (data) => {
1257
+ if (data.settledAt) {
1258
+ data.settledAt = new Date(data.settledAt);
1259
+ }
1260
+ if (data.settledAtSlot) {
1261
+ data.settledAtSlot = u64DtoSchemaResponseTransformer(data.settledAtSlot);
1262
+ }
1263
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1264
+ data.wonBtcAmount = u64DtoSchemaResponseTransformer(data.wonBtcAmount);
1265
+ data.wonUsdAmount = u64DtoSchemaResponseTransformer(data.wonUsdAmount);
1266
+ return data;
1267
+ };
1268
+ var getEpochWinnersResponseTransformer = async (data) => {
1269
+ data.data = data.data.map((item) => epochWinnerHistoryDtoSchemaResponseTransformer(item));
1270
+ return data;
1271
+ };
1176
1272
  var leaderboardEntryDtoSchemaResponseTransformer = (data) => {
1273
+ data.totalHashrateEarned = u64DtoSchemaResponseTransformer(data.totalHashrateEarned);
1274
+ data.totalSatsEarned = u64DtoSchemaResponseTransformer(data.totalSatsEarned);
1177
1275
  data.totalUsdDeployed = u64DtoSchemaResponseTransformer(data.totalUsdDeployed);
1178
1276
  return data;
1179
1277
  };
1180
- var getLeaderboardResponseTransformer = async (data) => {
1278
+ var getHashrateEarnedLeaderboardResponseTransformer = async (data) => {
1181
1279
  data.data = data.data.map((item) => leaderboardEntryDtoSchemaResponseTransformer(item));
1182
1280
  return data;
1183
1281
  };
1282
+ var getRoundsPlayedLeaderboardResponseTransformer = async (data) => {
1283
+ data.data = data.data.map((item) => leaderboardEntryDtoSchemaResponseTransformer(item));
1284
+ return data;
1285
+ };
1286
+ var getSatsEarnedLeaderboardResponseTransformer = async (data) => {
1287
+ data.data = data.data.map((item) => leaderboardEntryDtoSchemaResponseTransformer(item));
1288
+ return data;
1289
+ };
1290
+ var oneBtcIterationHistoryDtoSchemaResponseTransformer = (data) => {
1291
+ if (data.endedAt) {
1292
+ data.endedAt = new Date(data.endedAt);
1293
+ }
1294
+ if (data.settledAt) {
1295
+ data.settledAt = new Date(data.settledAt);
1296
+ }
1297
+ data.startedAt = new Date(data.startedAt);
1298
+ data.totalTickets = u64DtoSchemaResponseTransformer(data.totalTickets);
1299
+ return data;
1300
+ };
1301
+ var getOneBtcHistoryResponseTransformer = async (data) => {
1302
+ data.data = data.data.map((item) => oneBtcIterationHistoryDtoSchemaResponseTransformer(item));
1303
+ return data;
1304
+ };
1305
+ var roundHistoryDtoSchemaResponseTransformer = (data) => {
1306
+ if (data.settledAt) {
1307
+ data.settledAt = new Date(data.settledAt);
1308
+ }
1309
+ if (data.startedAt) {
1310
+ data.startedAt = new Date(data.startedAt);
1311
+ }
1312
+ if (data.strikeBonusBtc) {
1313
+ data.strikeBonusBtc = u64DtoSchemaResponseTransformer(data.strikeBonusBtc);
1314
+ }
1315
+ if (data.strikeBonusUsd) {
1316
+ data.strikeBonusUsd = u64DtoSchemaResponseTransformer(data.strikeBonusUsd);
1317
+ }
1318
+ data.totalDeployedUsd = u64DtoSchemaResponseTransformer(data.totalDeployedUsd);
1319
+ if (data.totalPotBtc) {
1320
+ data.totalPotBtc = u64DtoSchemaResponseTransformer(data.totalPotBtc);
1321
+ }
1322
+ if (data.totalPotUsd) {
1323
+ data.totalPotUsd = u64DtoSchemaResponseTransformer(data.totalPotUsd);
1324
+ }
1325
+ return data;
1326
+ };
1327
+ var getRoundsResponseTransformer = async (data) => {
1328
+ data.data = data.data.map((item) => roundHistoryDtoSchemaResponseTransformer(item));
1329
+ return data;
1330
+ };
1184
1331
  var publicAutomationDtoSchemaResponseTransformer = (data) => {
1185
1332
  data.perRoundUsdAmount = u64DtoSchemaResponseTransformer(data.perRoundUsdAmount);
1186
1333
  data.remainingUsdAmount = u64DtoSchemaResponseTransformer(data.remainingUsdAmount);
@@ -1288,6 +1435,47 @@ var getUserDeploymentsResponseTransformer = async (data) => {
1288
1435
  data.data = data.data.map((item) => minerDeploymentDtoSchemaResponseTransformer(item));
1289
1436
  return data;
1290
1437
  };
1438
+ var minerEpochEntryDtoSchemaResponseTransformer = (data) => {
1439
+ if (data.claimedAt) {
1440
+ data.claimedAt = new Date(data.claimedAt);
1441
+ }
1442
+ data.createdAt = new Date(data.createdAt);
1443
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1444
+ if (data.wonBtcAmount) {
1445
+ data.wonBtcAmount = u64DtoSchemaResponseTransformer(data.wonBtcAmount);
1446
+ }
1447
+ if (data.wonUsdAmount) {
1448
+ data.wonUsdAmount = u64DtoSchemaResponseTransformer(data.wonUsdAmount);
1449
+ }
1450
+ return data;
1451
+ };
1452
+ var getUserEpochEntriesResponseTransformer = async (data) => {
1453
+ data.data = data.data.map((item) => minerEpochEntryDtoSchemaResponseTransformer(item));
1454
+ return data;
1455
+ };
1456
+ var minerHashrateActionDtoSchemaResponseTransformer = (data) => {
1457
+ data.executedAt = new Date(data.executedAt);
1458
+ data.hashrateSpent = u64DtoSchemaResponseTransformer(data.hashrateSpent);
1459
+ data.ticketsBought = u64DtoSchemaResponseTransformer(data.ticketsBought);
1460
+ return data;
1461
+ };
1462
+ var getUserHashrateActionsResponseTransformer = async (data) => {
1463
+ data.data = data.data.map((item) => minerHashrateActionDtoSchemaResponseTransformer(item));
1464
+ return data;
1465
+ };
1466
+ var minerOneBtcEntryDtoSchemaResponseTransformer = (data) => {
1467
+ if (data.claimedAt) {
1468
+ data.claimedAt = new Date(data.claimedAt);
1469
+ }
1470
+ data.createdAt = new Date(data.createdAt);
1471
+ data.startTicketId = u64DtoSchemaResponseTransformer(data.startTicketId);
1472
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1473
+ return data;
1474
+ };
1475
+ var getUserOneBtcEntriesResponseTransformer = async (data) => {
1476
+ data.data = data.data.map((item) => minerOneBtcEntryDtoSchemaResponseTransformer(item));
1477
+ return data;
1478
+ };
1291
1479
 
1292
1480
  // src/generated/zod.gen.ts
1293
1481
  var z = __toESM(require("zod"), 1);
@@ -1304,22 +1492,83 @@ var zBadRequestErrorCodeErrorBody = z.object({
1304
1492
  ])
1305
1493
  });
1306
1494
  var zClaimTypeDto = z.enum(["usd", "sats"]);
1495
+ var zEpochHistoryApiError400InvalidRange = z.object({
1496
+ code: z.enum(["invalid_range"])
1497
+ });
1498
+ var zEpochHistoryApiError400Error = z.union([
1499
+ z.object({
1500
+ code: z.literal("invalid_range")
1501
+ }).and(zEpochHistoryApiError400InvalidRange),
1502
+ z.object({
1503
+ code: z.union([
1504
+ z.literal("invalid_body"),
1505
+ z.literal("invalid_path"),
1506
+ z.literal("invalid_query")
1507
+ ])
1508
+ }).and(zBadRequestErrorCodeErrorBody)
1509
+ ]);
1510
+ var zEpochHistoryApiError500Error = z.object({
1511
+ code: z.enum(["internal"])
1512
+ });
1307
1513
  var zEpochStateDto = z.enum([
1308
1514
  "open",
1309
1515
  "settling",
1310
1516
  "settled",
1311
1517
  "complete"
1312
1518
  ]);
1519
+ var zEpochWinnersApiError400InvalidBefore = z.object({
1520
+ code: z.enum(["invalid_before"])
1521
+ });
1522
+ var zEpochWinnersApiError400InvalidRange = z.object({
1523
+ code: z.enum(["invalid_range"])
1524
+ });
1525
+ var zEpochWinnersApiError400Error = z.union([
1526
+ z.object({
1527
+ code: z.literal("invalid_before")
1528
+ }).and(zEpochWinnersApiError400InvalidBefore),
1529
+ z.object({
1530
+ code: z.literal("invalid_range")
1531
+ }).and(zEpochWinnersApiError400InvalidRange),
1532
+ z.object({
1533
+ code: z.union([
1534
+ z.literal("invalid_body"),
1535
+ z.literal("invalid_path"),
1536
+ z.literal("invalid_query")
1537
+ ])
1538
+ }).and(zBadRequestErrorCodeErrorBody)
1539
+ ]);
1540
+ var zEpochWinnersApiError500Error = z.object({
1541
+ code: z.enum(["internal"])
1542
+ });
1313
1543
  var zFieldError = z.object({
1314
1544
  field: z.string(),
1315
1545
  message: z.string()
1316
1546
  });
1547
+ var zHashrateActionTypeDto = z.enum(["buy_epoch_tickets", "buy_one_btc_tickets"]);
1317
1548
  var zI128Dto = z.string();
1318
1549
  var zI64Dto = z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" });
1319
1550
  var zInternalErrorCodeErrorBody = z.object({
1320
1551
  code: z.enum(["internal_error"])
1321
1552
  });
1322
1553
  var zNotificationEntity = z.enum(["state_snapshot"]);
1554
+ var zOneBtcHistoryApiError400InvalidRange = z.object({
1555
+ code: z.enum(["invalid_range"])
1556
+ });
1557
+ var zOneBtcHistoryApiError400Error = z.union([
1558
+ z.object({
1559
+ code: z.literal("invalid_range")
1560
+ }).and(zOneBtcHistoryApiError400InvalidRange),
1561
+ z.object({
1562
+ code: z.union([
1563
+ z.literal("invalid_body"),
1564
+ z.literal("invalid_path"),
1565
+ z.literal("invalid_query")
1566
+ ])
1567
+ }).and(zBadRequestErrorCodeErrorBody)
1568
+ ]);
1569
+ var zOneBtcHistoryApiError500Error = z.object({
1570
+ code: z.enum(["internal"])
1571
+ });
1323
1572
  var zOneBtcStateDto = z.enum([
1324
1573
  "open",
1325
1574
  "settled",
@@ -1334,14 +1583,68 @@ var zPricesDto = z.object({
1334
1583
  sat: z.number()
1335
1584
  });
1336
1585
  var zPubkeyDto = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
1586
+ var zRoundHistoryStateDto = z.enum([
1587
+ "pending",
1588
+ "active",
1589
+ "revealed",
1590
+ "settled",
1591
+ "finished"
1592
+ ]);
1337
1593
  var zRoundStateDto = z.enum([
1338
1594
  "active",
1339
1595
  "revealed",
1340
1596
  "settled",
1341
1597
  "finished"
1342
1598
  ]);
1599
+ var zRoundsApiError400InvalidBefore = z.object({
1600
+ code: z.enum(["invalid_before"])
1601
+ });
1602
+ var zRoundsApiError400InvalidIsSatStrike = z.object({
1603
+ code: z.enum(["invalid_is_sat_strike"])
1604
+ });
1605
+ var zRoundsApiError400InvalidRange = z.object({
1606
+ code: z.enum(["invalid_range"])
1607
+ });
1608
+ var zRoundsApiError400Error = z.union([
1609
+ z.object({
1610
+ code: z.literal("invalid_before")
1611
+ }).and(zRoundsApiError400InvalidBefore),
1612
+ z.object({
1613
+ code: z.literal("invalid_range")
1614
+ }).and(zRoundsApiError400InvalidRange),
1615
+ z.object({
1616
+ code: z.literal("invalid_is_sat_strike")
1617
+ }).and(zRoundsApiError400InvalidIsSatStrike),
1618
+ z.object({
1619
+ code: z.union([
1620
+ z.literal("invalid_body"),
1621
+ z.literal("invalid_path"),
1622
+ z.literal("invalid_query")
1623
+ ])
1624
+ }).and(zBadRequestErrorCodeErrorBody)
1625
+ ]);
1626
+ var zRoundsApiError500Error = z.object({
1627
+ code: z.enum(["internal"])
1628
+ });
1343
1629
  var zU128Dto = z.string();
1344
1630
  var zU64Dto = z.coerce.bigint().min(BigInt("0"), { error: "Invalid value: Expected uint64 to be >= 0" }).max(BigInt("18446744073709551615"), { error: "Invalid value: Expected uint64 to be <= 18446744073709551615" });
1631
+ var zEpochIterationHistoryDto = z.object({
1632
+ address: zPubkeyDto,
1633
+ endedAt: z.optional(z.union([
1634
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1635
+ z.null()
1636
+ ])),
1637
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1638
+ poolBtcAmount: zU64Dto,
1639
+ poolUsdAmount: zU64Dto,
1640
+ startedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1641
+ totalParticipants: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1642
+ totalTickets: zU64Dto,
1643
+ triggeredAt: z.optional(z.union([
1644
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1645
+ z.null()
1646
+ ]))
1647
+ });
1345
1648
  var zEpochVaultEntryDto = z.object({
1346
1649
  address: zPubkeyDto,
1347
1650
  iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
@@ -1387,9 +1690,15 @@ var zEpochVaultDto = z.object({
1387
1690
  z.null(),
1388
1691
  zEpochVaultIterationDto
1389
1692
  ])),
1390
- iterationEndsAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1693
+ iterationEndsAt: z.optional(z.union([
1694
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1695
+ z.null()
1696
+ ])),
1391
1697
  iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1392
- iterationStartedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1698
+ iterationStartedAt: z.optional(z.union([
1699
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1700
+ z.null()
1701
+ ])),
1393
1702
  lastTriggerSlot: zU64Dto,
1394
1703
  pendingUsdAmount: zU64Dto,
1395
1704
  poolBtcAmount: zU64Dto,
@@ -1397,11 +1706,30 @@ var zEpochVaultDto = z.object({
1397
1706
  reservedBtcAmount: zU64Dto,
1398
1707
  reservedUsdAmount: zU64Dto
1399
1708
  });
1709
+ var zEpochWinnerHistoryDto = z.object({
1710
+ authority: zPubkeyDto,
1711
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1712
+ iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1713
+ rank: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1714
+ settledAt: z.optional(z.union([
1715
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1716
+ z.null()
1717
+ ])),
1718
+ settledAtSlot: z.optional(z.union([
1719
+ z.null(),
1720
+ zU64Dto
1721
+ ])),
1722
+ tickets: zU64Dto,
1723
+ wonBtcAmount: zU64Dto,
1724
+ wonUsdAmount: zU64Dto
1725
+ });
1400
1726
  var zLeaderboardEntryDto = z.object({
1401
1727
  authority: zPubkeyDto,
1402
1728
  maxStreak: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1403
1729
  rank: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1730
+ totalHashrateEarned: zU64Dto,
1404
1731
  totalRoundsPlayed: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1732
+ totalSatsEarned: zU64Dto,
1405
1733
  totalUsdDeployed: zU64Dto
1406
1734
  });
1407
1735
  var zMinerClaimDto = z.object({
@@ -1475,6 +1803,79 @@ var zMinerDto = z.object({
1475
1803
  unsettledSatsShares: zU64Dto,
1476
1804
  unsettledUsdAmount: zU64Dto
1477
1805
  });
1806
+ var zMinerEpochEntryDto = z.object({
1807
+ address: zPubkeyDto,
1808
+ authority: zPubkeyDto,
1809
+ claimedAt: z.optional(z.union([
1810
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1811
+ z.null()
1812
+ ])),
1813
+ createdAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1814
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1815
+ isWon: z.optional(z.union([
1816
+ z.boolean(),
1817
+ z.null()
1818
+ ])),
1819
+ iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1820
+ rank: z.optional(z.union([
1821
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1822
+ z.null()
1823
+ ])),
1824
+ tickets: zU64Dto,
1825
+ wonBtcAmount: z.optional(z.union([
1826
+ z.null(),
1827
+ zU64Dto
1828
+ ])),
1829
+ wonUsdAmount: z.optional(z.union([
1830
+ z.null(),
1831
+ zU64Dto
1832
+ ]))
1833
+ });
1834
+ var zMinerHashrateActionDto = z.object({
1835
+ actionType: zHashrateActionTypeDto,
1836
+ authority: zPubkeyDto,
1837
+ executedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1838
+ hashrateSpent: zU64Dto,
1839
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1840
+ signature: z.string(),
1841
+ ticketsBought: zU64Dto
1842
+ });
1843
+ var zMinerOneBtcEntryDto = z.object({
1844
+ address: zPubkeyDto,
1845
+ authority: zPubkeyDto,
1846
+ claimedAt: z.optional(z.union([
1847
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1848
+ z.null()
1849
+ ])),
1850
+ createdAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1851
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1852
+ isWon: z.optional(z.union([
1853
+ z.boolean(),
1854
+ z.null()
1855
+ ])),
1856
+ iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1857
+ startTicketId: zU64Dto,
1858
+ tickets: zU64Dto
1859
+ });
1860
+ var zOneBtcIterationHistoryDto = z.object({
1861
+ address: zPubkeyDto,
1862
+ endedAt: z.optional(z.union([
1863
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1864
+ z.null()
1865
+ ])),
1866
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1867
+ settledAt: z.optional(z.union([
1868
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1869
+ z.null()
1870
+ ])),
1871
+ startedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1872
+ totalParticipants: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1873
+ totalTickets: zU64Dto,
1874
+ winner: z.optional(z.union([
1875
+ z.null(),
1876
+ zPubkeyDto
1877
+ ]))
1878
+ });
1478
1879
  var zOneBtcVaultEntryDto = z.object({
1479
1880
  address: zPubkeyDto,
1480
1881
  iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
@@ -1534,6 +1935,48 @@ var zProfileDto = z.object({
1534
1935
  oneBtcVaultEntries: z.array(zOneBtcVaultEntryDto),
1535
1936
  unsettledDeployments: z.array(zPublicDeploymentDto)
1536
1937
  });
1938
+ var zRoundHistoryDto = z.object({
1939
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1940
+ isSatStrike: z.optional(z.union([
1941
+ z.boolean(),
1942
+ z.null()
1943
+ ])),
1944
+ minersCount: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1945
+ settledAt: z.optional(z.union([
1946
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1947
+ z.null()
1948
+ ])),
1949
+ startedAt: z.optional(z.union([
1950
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1951
+ z.null()
1952
+ ])),
1953
+ state: zRoundHistoryStateDto,
1954
+ strikeBonusBtc: z.optional(z.union([
1955
+ z.null(),
1956
+ zU64Dto
1957
+ ])),
1958
+ strikeBonusUsd: z.optional(z.union([
1959
+ z.null(),
1960
+ zU64Dto
1961
+ ])),
1962
+ totalDeployedUsd: zU64Dto,
1963
+ totalPotBtc: z.optional(z.union([
1964
+ z.null(),
1965
+ zU64Dto
1966
+ ])),
1967
+ totalPotUsd: z.optional(z.union([
1968
+ z.null(),
1969
+ zU64Dto
1970
+ ])),
1971
+ winnersCount: z.optional(z.union([
1972
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1973
+ z.null()
1974
+ ])),
1975
+ winningTile: z.optional(z.union([
1976
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1977
+ z.null()
1978
+ ]))
1979
+ });
1537
1980
  var zSatrushConfigDto = z.object({
1538
1981
  address: zPubkeyDto,
1539
1982
  btcMint: zPubkeyDto,
@@ -1604,9 +2047,15 @@ var zBoardDto = z.object({
1604
2047
  previousRounds: z.array(zPreviousRoundDto),
1605
2048
  prices: zPricesDto,
1606
2049
  roundDuration: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1607
- roundEndsAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2050
+ roundEndsAt: z.optional(z.union([
2051
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2052
+ z.null()
2053
+ ])),
1608
2054
  roundId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1609
- roundStartedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2055
+ roundStartedAt: z.optional(z.union([
2056
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2057
+ z.null()
2058
+ ])),
1610
2059
  satsVault: zSatsVaultDto,
1611
2060
  startSlot: zU64Dto,
1612
2061
  strike: zStrikeJackpotDto
@@ -1685,6 +2134,36 @@ var zUserDeploymentsApiError400Error = z.union([
1685
2134
  var zUserDeploymentsApiError500Error = z.object({
1686
2135
  code: z.enum(["internal"])
1687
2136
  });
2137
+ var zUserHashrateApiError400InvalidAddress = z.object({
2138
+ code: z.enum(["invalid_address"])
2139
+ });
2140
+ var zUserHashrateApiError400InvalidBefore = z.object({
2141
+ code: z.enum(["invalid_before"])
2142
+ });
2143
+ var zUserHashrateApiError400InvalidRange = z.object({
2144
+ code: z.enum(["invalid_range"])
2145
+ });
2146
+ var zUserHashrateApiError400Error = z.union([
2147
+ z.object({
2148
+ code: z.literal("invalid_address")
2149
+ }).and(zUserHashrateApiError400InvalidAddress),
2150
+ z.object({
2151
+ code: z.literal("invalid_before")
2152
+ }).and(zUserHashrateApiError400InvalidBefore),
2153
+ z.object({
2154
+ code: z.literal("invalid_range")
2155
+ }).and(zUserHashrateApiError400InvalidRange),
2156
+ z.object({
2157
+ code: z.union([
2158
+ z.literal("invalid_body"),
2159
+ z.literal("invalid_path"),
2160
+ z.literal("invalid_query")
2161
+ ])
2162
+ }).and(zBadRequestErrorCodeErrorBody)
2163
+ ]);
2164
+ var zUserHashrateApiError500Error = z.object({
2165
+ code: z.enum(["internal"])
2166
+ });
1688
2167
  var zUserProfileApiError400InvalidAddress = z.object({
1689
2168
  code: z.enum(["invalid_address"])
1690
2169
  });
@@ -1700,6 +2179,42 @@ var zUserProfileApiError400Error = z.union([
1700
2179
  ])
1701
2180
  }).and(zBadRequestErrorCodeErrorBody)
1702
2181
  ]);
2182
+ var zUserVaultEntriesApiError400InvalidAddress = z.object({
2183
+ code: z.enum(["invalid_address"])
2184
+ });
2185
+ var zUserVaultEntriesApiError400InvalidBefore = z.object({
2186
+ code: z.enum(["invalid_before"])
2187
+ });
2188
+ var zUserVaultEntriesApiError400InvalidRange = z.object({
2189
+ code: z.enum(["invalid_range"])
2190
+ });
2191
+ var zUserVaultEntriesApiError400InvalidWinsOnly = z.object({
2192
+ code: z.enum(["invalid_wins_only"])
2193
+ });
2194
+ var zUserVaultEntriesApiError400Error = z.union([
2195
+ z.object({
2196
+ code: z.literal("invalid_address")
2197
+ }).and(zUserVaultEntriesApiError400InvalidAddress),
2198
+ z.object({
2199
+ code: z.literal("invalid_before")
2200
+ }).and(zUserVaultEntriesApiError400InvalidBefore),
2201
+ z.object({
2202
+ code: z.literal("invalid_range")
2203
+ }).and(zUserVaultEntriesApiError400InvalidRange),
2204
+ z.object({
2205
+ code: z.literal("invalid_wins_only")
2206
+ }).and(zUserVaultEntriesApiError400InvalidWinsOnly),
2207
+ z.object({
2208
+ code: z.union([
2209
+ z.literal("invalid_body"),
2210
+ z.literal("invalid_path"),
2211
+ z.literal("invalid_query")
2212
+ ])
2213
+ }).and(zBadRequestErrorCodeErrorBody)
2214
+ ]);
2215
+ var zUserVaultEntriesApiError500Error = z.object({
2216
+ code: z.enum(["internal"])
2217
+ });
1703
2218
  var zValidationErrorCodeErrorBody = z.object({
1704
2219
  code: z.enum(["validation_failed"]),
1705
2220
  data: z.optional(z.object({
@@ -1728,14 +2243,79 @@ var zGetConfigData = z.object({
1728
2243
  var zGetConfigResponse = z.object({
1729
2244
  data: zSatrushConfigDto
1730
2245
  });
1731
- var zGetLeaderboardData = z.object({
2246
+ var zGetEpochHistoryData = z.object({
2247
+ body: z.optional(z.never()),
2248
+ path: z.optional(z.never()),
2249
+ query: z.optional(z.object({
2250
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2251
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2252
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2253
+ }))
2254
+ });
2255
+ var zGetEpochHistoryResponse = z.object({
2256
+ data: z.array(zEpochIterationHistoryDto)
2257
+ });
2258
+ var zGetEpochWinnersData = z.object({
2259
+ body: z.optional(z.never()),
2260
+ path: z.optional(z.never()),
2261
+ query: z.optional(z.object({
2262
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2263
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2264
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2265
+ }))
2266
+ });
2267
+ var zGetEpochWinnersResponse = z.object({
2268
+ data: z.array(zEpochWinnerHistoryDto)
2269
+ });
2270
+ var zGetHashrateEarnedLeaderboardData = z.object({
1732
2271
  body: z.optional(z.never()),
1733
2272
  path: z.optional(z.never()),
1734
2273
  query: z.optional(z.never())
1735
2274
  });
1736
- var zGetLeaderboardResponse = z.object({
2275
+ var zGetHashrateEarnedLeaderboardResponse = z.object({
1737
2276
  data: z.array(zLeaderboardEntryDto)
1738
2277
  });
2278
+ var zGetRoundsPlayedLeaderboardData = z.object({
2279
+ body: z.optional(z.never()),
2280
+ path: z.optional(z.never()),
2281
+ query: z.optional(z.never())
2282
+ });
2283
+ var zGetRoundsPlayedLeaderboardResponse = z.object({
2284
+ data: z.array(zLeaderboardEntryDto)
2285
+ });
2286
+ var zGetSatsEarnedLeaderboardData = z.object({
2287
+ body: z.optional(z.never()),
2288
+ path: z.optional(z.never()),
2289
+ query: z.optional(z.never())
2290
+ });
2291
+ var zGetSatsEarnedLeaderboardResponse = z.object({
2292
+ data: z.array(zLeaderboardEntryDto)
2293
+ });
2294
+ var zGetOneBtcHistoryData = z.object({
2295
+ body: z.optional(z.never()),
2296
+ path: z.optional(z.never()),
2297
+ query: z.optional(z.object({
2298
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2299
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2300
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2301
+ }))
2302
+ });
2303
+ var zGetOneBtcHistoryResponse = z.object({
2304
+ data: z.array(zOneBtcIterationHistoryDto)
2305
+ });
2306
+ var zGetRoundsData = z.object({
2307
+ body: z.optional(z.never()),
2308
+ path: z.optional(z.never()),
2309
+ query: z.optional(z.object({
2310
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2311
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2312
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2313
+ isSatStrike: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2314
+ }))
2315
+ });
2316
+ var zGetRoundsResponse = z.object({
2317
+ data: z.array(zRoundHistoryDto)
2318
+ });
1739
2319
  var zSseData = z.object({
1740
2320
  body: z.optional(z.never()),
1741
2321
  path: z.optional(z.never()),
@@ -1782,6 +2362,50 @@ var zGetUserDeploymentsData = z.object({
1782
2362
  var zGetUserDeploymentsResponse = z.object({
1783
2363
  data: z.array(zMinerDeploymentDto)
1784
2364
  });
2365
+ var zGetUserEpochEntriesData = z.object({
2366
+ body: z.optional(z.never()),
2367
+ path: z.object({
2368
+ address: z.string()
2369
+ }),
2370
+ query: z.optional(z.object({
2371
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2372
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2373
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2374
+ winsOnly: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2375
+ }))
2376
+ });
2377
+ var zGetUserEpochEntriesResponse = z.object({
2378
+ data: z.array(zMinerEpochEntryDto)
2379
+ });
2380
+ var zGetUserHashrateActionsData = z.object({
2381
+ body: z.optional(z.never()),
2382
+ path: z.object({
2383
+ address: z.string()
2384
+ }),
2385
+ query: z.optional(z.object({
2386
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2387
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2388
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2389
+ }))
2390
+ });
2391
+ var zGetUserHashrateActionsResponse = z.object({
2392
+ data: z.array(zMinerHashrateActionDto)
2393
+ });
2394
+ var zGetUserOneBtcEntriesData = z.object({
2395
+ body: z.optional(z.never()),
2396
+ path: z.object({
2397
+ address: z.string()
2398
+ }),
2399
+ query: z.optional(z.object({
2400
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2401
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2402
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2403
+ winsOnly: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2404
+ }))
2405
+ });
2406
+ var zGetUserOneBtcEntriesResponse = z.object({
2407
+ data: z.array(zMinerOneBtcEntryDto)
2408
+ });
1785
2409
 
1786
2410
  // src/generated/sdk.gen.ts
1787
2411
  var HeyApiClient = class {
@@ -1835,17 +2459,114 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
1835
2459
  });
1836
2460
  }
1837
2461
  /**
1838
- * Request the top miners by lifetime USD deployed
2462
+ * Request Epoch Vault history
1839
2463
  */
1840
- getLeaderboard(options) {
2464
+ getEpochHistory(parameters, options) {
2465
+ const params = buildClientParams([parameters], [{ args: [
2466
+ { in: "query", key: "before" },
2467
+ { in: "query", key: "after" },
2468
+ { in: "query", key: "limit" }
2469
+ ] }]);
1841
2470
  return (options?.client ?? this.client).get({
1842
- requestValidator: async (data) => await zGetLeaderboardData.parseAsync(data),
1843
- responseTransformer: getLeaderboardResponseTransformer,
1844
- responseValidator: async (data) => await zGetLeaderboardResponse.parseAsync(data),
1845
- url: "/v1/leaderboard",
2471
+ requestValidator: async (data) => await zGetEpochHistoryData.parseAsync(data),
2472
+ responseTransformer: getEpochHistoryResponseTransformer,
2473
+ responseValidator: async (data) => await zGetEpochHistoryResponse.parseAsync(data),
2474
+ url: "/v1/epoch/history",
2475
+ ...options,
2476
+ ...params
2477
+ });
2478
+ }
2479
+ /**
2480
+ * Request Epoch Vault winners
2481
+ */
2482
+ getEpochWinners(parameters, options) {
2483
+ const params = buildClientParams([parameters], [{ args: [
2484
+ { in: "query", key: "before" },
2485
+ { in: "query", key: "after" },
2486
+ { in: "query", key: "limit" }
2487
+ ] }]);
2488
+ return (options?.client ?? this.client).get({
2489
+ requestValidator: async (data) => await zGetEpochWinnersData.parseAsync(data),
2490
+ responseTransformer: getEpochWinnersResponseTransformer,
2491
+ responseValidator: async (data) => await zGetEpochWinnersResponse.parseAsync(data),
2492
+ url: "/v1/epoch/winners",
2493
+ ...options,
2494
+ ...params
2495
+ });
2496
+ }
2497
+ /**
2498
+ * Request the top miners by lifetime hashrate earned
2499
+ */
2500
+ getHashrateEarnedLeaderboard(options) {
2501
+ return (options?.client ?? this.client).get({
2502
+ requestValidator: async (data) => await zGetHashrateEarnedLeaderboardData.parseAsync(data),
2503
+ responseTransformer: getHashrateEarnedLeaderboardResponseTransformer,
2504
+ responseValidator: async (data) => await zGetHashrateEarnedLeaderboardResponse.parseAsync(data),
2505
+ url: "/v1/leaderboard/hashrate-earned",
2506
+ ...options
2507
+ });
2508
+ }
2509
+ /**
2510
+ * Request the top miners by lifetime rounds played
2511
+ */
2512
+ getRoundsPlayedLeaderboard(options) {
2513
+ return (options?.client ?? this.client).get({
2514
+ requestValidator: async (data) => await zGetRoundsPlayedLeaderboardData.parseAsync(data),
2515
+ responseTransformer: getRoundsPlayedLeaderboardResponseTransformer,
2516
+ responseValidator: async (data) => await zGetRoundsPlayedLeaderboardResponse.parseAsync(data),
2517
+ url: "/v1/leaderboard/rounds-played",
1846
2518
  ...options
1847
2519
  });
1848
2520
  }
2521
+ /**
2522
+ * Request the top miners by lifetime sats earned
2523
+ */
2524
+ getSatsEarnedLeaderboard(options) {
2525
+ return (options?.client ?? this.client).get({
2526
+ requestValidator: async (data) => await zGetSatsEarnedLeaderboardData.parseAsync(data),
2527
+ responseTransformer: getSatsEarnedLeaderboardResponseTransformer,
2528
+ responseValidator: async (data) => await zGetSatsEarnedLeaderboardResponse.parseAsync(data),
2529
+ url: "/v1/leaderboard/sats-earned",
2530
+ ...options
2531
+ });
2532
+ }
2533
+ /**
2534
+ * Request 1 BTC Vault history
2535
+ */
2536
+ getOneBtcHistory(parameters, options) {
2537
+ const params = buildClientParams([parameters], [{ args: [
2538
+ { in: "query", key: "before" },
2539
+ { in: "query", key: "after" },
2540
+ { in: "query", key: "limit" }
2541
+ ] }]);
2542
+ return (options?.client ?? this.client).get({
2543
+ requestValidator: async (data) => await zGetOneBtcHistoryData.parseAsync(data),
2544
+ responseTransformer: getOneBtcHistoryResponseTransformer,
2545
+ responseValidator: async (data) => await zGetOneBtcHistoryResponse.parseAsync(data),
2546
+ url: "/v1/one-btc/history",
2547
+ ...options,
2548
+ ...params
2549
+ });
2550
+ }
2551
+ /**
2552
+ * Request rounds history
2553
+ */
2554
+ getRounds(parameters, options) {
2555
+ const params = buildClientParams([parameters], [{ args: [
2556
+ { in: "query", key: "before" },
2557
+ { in: "query", key: "after" },
2558
+ { in: "query", key: "limit" },
2559
+ { in: "query", key: "isSatStrike" }
2560
+ ] }]);
2561
+ return (options?.client ?? this.client).get({
2562
+ requestValidator: async (data) => await zGetRoundsData.parseAsync(data),
2563
+ responseTransformer: getRoundsResponseTransformer,
2564
+ responseValidator: async (data) => await zGetRoundsResponse.parseAsync(data),
2565
+ url: "/v1/rounds",
2566
+ ...options,
2567
+ ...params
2568
+ });
2569
+ }
1849
2570
  /**
1850
2571
  * Subscribe for SSE stream
1851
2572
  */
@@ -1912,6 +2633,65 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
1912
2633
  ...params
1913
2634
  });
1914
2635
  }
2636
+ /**
2637
+ * Request user Epoch Vault entries
2638
+ */
2639
+ getUserEpochEntries(parameters, options) {
2640
+ const params = buildClientParams([parameters], [{ args: [
2641
+ { in: "path", key: "address" },
2642
+ { in: "query", key: "before" },
2643
+ { in: "query", key: "after" },
2644
+ { in: "query", key: "limit" },
2645
+ { in: "query", key: "winsOnly" }
2646
+ ] }]);
2647
+ return (options?.client ?? this.client).get({
2648
+ requestValidator: async (data) => await zGetUserEpochEntriesData.parseAsync(data),
2649
+ responseTransformer: getUserEpochEntriesResponseTransformer,
2650
+ responseValidator: async (data) => await zGetUserEpochEntriesResponse.parseAsync(data),
2651
+ url: "/v1/users/{address}/epoch",
2652
+ ...options,
2653
+ ...params
2654
+ });
2655
+ }
2656
+ /**
2657
+ * Request user hashrate history
2658
+ */
2659
+ getUserHashrateActions(parameters, options) {
2660
+ const params = buildClientParams([parameters], [{ args: [
2661
+ { in: "path", key: "address" },
2662
+ { in: "query", key: "before" },
2663
+ { in: "query", key: "after" },
2664
+ { in: "query", key: "limit" }
2665
+ ] }]);
2666
+ return (options?.client ?? this.client).get({
2667
+ requestValidator: async (data) => await zGetUserHashrateActionsData.parseAsync(data),
2668
+ responseTransformer: getUserHashrateActionsResponseTransformer,
2669
+ responseValidator: async (data) => await zGetUserHashrateActionsResponse.parseAsync(data),
2670
+ url: "/v1/users/{address}/hashrate",
2671
+ ...options,
2672
+ ...params
2673
+ });
2674
+ }
2675
+ /**
2676
+ * Request user 1 BTC Vault entries
2677
+ */
2678
+ getUserOneBtcEntries(parameters, options) {
2679
+ const params = buildClientParams([parameters], [{ args: [
2680
+ { in: "path", key: "address" },
2681
+ { in: "query", key: "before" },
2682
+ { in: "query", key: "after" },
2683
+ { in: "query", key: "limit" },
2684
+ { in: "query", key: "winsOnly" }
2685
+ ] }]);
2686
+ return (options?.client ?? this.client).get({
2687
+ requestValidator: async (data) => await zGetUserOneBtcEntriesData.parseAsync(data),
2688
+ responseTransformer: getUserOneBtcEntriesResponseTransformer,
2689
+ responseValidator: async (data) => await zGetUserOneBtcEntriesResponse.parseAsync(data),
2690
+ url: "/v1/users/{address}/one-btc",
2691
+ ...options,
2692
+ ...params
2693
+ });
2694
+ }
1915
2695
  };
1916
2696
 
1917
2697
  // src/generated/types.gen.ts
@@ -1927,12 +2707,20 @@ var EpochStateDto = {
1927
2707
  SETTLED: "settled",
1928
2708
  COMPLETE: "complete"
1929
2709
  };
2710
+ var HashrateActionTypeDto = { BUY_EPOCH_TICKETS: "buy_epoch_tickets", BUY_ONE_BTC_TICKETS: "buy_one_btc_tickets" };
1930
2711
  var NotificationEntity = { STATE_SNAPSHOT: "state_snapshot" };
1931
2712
  var OneBtcStateDto = {
1932
2713
  OPEN: "open",
1933
2714
  SETTLED: "settled",
1934
2715
  COMPLETE: "complete"
1935
2716
  };
2717
+ var RoundHistoryStateDto = {
2718
+ PENDING: "pending",
2719
+ ACTIVE: "active",
2720
+ REVEALED: "revealed",
2721
+ SETTLED: "settled",
2722
+ FINISHED: "finished"
2723
+ };
1936
2724
  var RoundStateDto = {
1937
2725
  ACTIVE: "active",
1938
2726
  REVEALED: "revealed",
@@ -1989,8 +2777,10 @@ async function unwrap(promise) {
1989
2777
  AutomationStrategyDto,
1990
2778
  ClaimTypeDto,
1991
2779
  EpochStateDto,
2780
+ HashrateActionTypeDto,
1992
2781
  NotificationEntity,
1993
2782
  OneBtcStateDto,
2783
+ RoundHistoryStateDto,
1994
2784
  RoundStateDto,
1995
2785
  SatrushBackendSdk,
1996
2786
  SatrushBackendSdkError,
@@ -2003,24 +2793,52 @@ async function unwrap(promise) {
2003
2793
  zBadRequestErrorCodeErrorBody,
2004
2794
  zBoardDto,
2005
2795
  zClaimTypeDto,
2796
+ zEpochHistoryApiError400Error,
2797
+ zEpochHistoryApiError400InvalidRange,
2798
+ zEpochHistoryApiError500Error,
2799
+ zEpochIterationHistoryDto,
2006
2800
  zEpochStateDto,
2007
2801
  zEpochVaultDto,
2008
2802
  zEpochVaultEntryDto,
2009
2803
  zEpochVaultIterationDto,
2010
2804
  zEpochWinnerDto,
2805
+ zEpochWinnerHistoryDto,
2806
+ zEpochWinnersApiError400Error,
2807
+ zEpochWinnersApiError400InvalidBefore,
2808
+ zEpochWinnersApiError400InvalidRange,
2809
+ zEpochWinnersApiError500Error,
2011
2810
  zFieldError,
2012
2811
  zGetBoardData,
2013
2812
  zGetBoardResponse,
2014
2813
  zGetConfigData,
2015
2814
  zGetConfigResponse,
2016
- zGetLeaderboardData,
2017
- zGetLeaderboardResponse,
2815
+ zGetEpochHistoryData,
2816
+ zGetEpochHistoryResponse,
2817
+ zGetEpochWinnersData,
2818
+ zGetEpochWinnersResponse,
2819
+ zGetHashrateEarnedLeaderboardData,
2820
+ zGetHashrateEarnedLeaderboardResponse,
2821
+ zGetOneBtcHistoryData,
2822
+ zGetOneBtcHistoryResponse,
2823
+ zGetRoundsData,
2824
+ zGetRoundsPlayedLeaderboardData,
2825
+ zGetRoundsPlayedLeaderboardResponse,
2826
+ zGetRoundsResponse,
2827
+ zGetSatsEarnedLeaderboardData,
2828
+ zGetSatsEarnedLeaderboardResponse,
2018
2829
  zGetUserClaimsData,
2019
2830
  zGetUserClaimsResponse,
2020
2831
  zGetUserDeploymentsData,
2021
2832
  zGetUserDeploymentsResponse,
2833
+ zGetUserEpochEntriesData,
2834
+ zGetUserEpochEntriesResponse,
2835
+ zGetUserHashrateActionsData,
2836
+ zGetUserHashrateActionsResponse,
2837
+ zGetUserOneBtcEntriesData,
2838
+ zGetUserOneBtcEntriesResponse,
2022
2839
  zGetUserProfileData,
2023
2840
  zGetUserProfileResponse,
2841
+ zHashrateActionTypeDto,
2024
2842
  zI128Dto,
2025
2843
  zI64Dto,
2026
2844
  zInternalErrorCodeErrorBody,
@@ -2028,7 +2846,14 @@ async function unwrap(promise) {
2028
2846
  zMinerClaimDto,
2029
2847
  zMinerDeploymentDto,
2030
2848
  zMinerDto,
2849
+ zMinerEpochEntryDto,
2850
+ zMinerHashrateActionDto,
2851
+ zMinerOneBtcEntryDto,
2031
2852
  zNotificationEntity,
2853
+ zOneBtcHistoryApiError400Error,
2854
+ zOneBtcHistoryApiError400InvalidRange,
2855
+ zOneBtcHistoryApiError500Error,
2856
+ zOneBtcIterationHistoryDto,
2032
2857
  zOneBtcStateDto,
2033
2858
  zOneBtcVaultDto,
2034
2859
  zOneBtcVaultEntryDto,
@@ -2040,7 +2865,14 @@ async function unwrap(promise) {
2040
2865
  zPublicAutomationDto,
2041
2866
  zPublicDeploymentDto,
2042
2867
  zRoundDto,
2868
+ zRoundHistoryDto,
2869
+ zRoundHistoryStateDto,
2043
2870
  zRoundStateDto,
2871
+ zRoundsApiError400Error,
2872
+ zRoundsApiError400InvalidBefore,
2873
+ zRoundsApiError400InvalidIsSatStrike,
2874
+ zRoundsApiError400InvalidRange,
2875
+ zRoundsApiError500Error,
2044
2876
  zSatrushConfigDto,
2045
2877
  zSatsVaultDto,
2046
2878
  zSnapshotDto,
@@ -2062,8 +2894,19 @@ async function unwrap(promise) {
2062
2894
  zUserDeploymentsApiError400InvalidBefore,
2063
2895
  zUserDeploymentsApiError400InvalidRange,
2064
2896
  zUserDeploymentsApiError500Error,
2897
+ zUserHashrateApiError400Error,
2898
+ zUserHashrateApiError400InvalidAddress,
2899
+ zUserHashrateApiError400InvalidBefore,
2900
+ zUserHashrateApiError400InvalidRange,
2901
+ zUserHashrateApiError500Error,
2065
2902
  zUserProfileApiError400Error,
2066
2903
  zUserProfileApiError400InvalidAddress,
2904
+ zUserVaultEntriesApiError400Error,
2905
+ zUserVaultEntriesApiError400InvalidAddress,
2906
+ zUserVaultEntriesApiError400InvalidBefore,
2907
+ zUserVaultEntriesApiError400InvalidRange,
2908
+ zUserVaultEntriesApiError400InvalidWinsOnly,
2909
+ zUserVaultEntriesApiError500Error,
2067
2910
  zValidationErrorCodeErrorBody,
2068
2911
  zValidationErrorCodeValidationDetailsErrorBody
2069
2912
  });