@satrush/api 0.1.13 → 0.1.15

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.js CHANGED
@@ -984,6 +984,9 @@ var epochVaultIterationDtoSchemaResponseTransformer = (data) => {
984
984
  return data;
985
985
  };
986
986
  var epochVaultDtoSchemaResponseTransformer = (data) => {
987
+ data.activePendingUsdAmount = u64DtoSchemaResponseTransformer(data.activePendingUsdAmount);
988
+ data.activePoolBtcAmount = u64DtoSchemaResponseTransformer(data.activePoolBtcAmount);
989
+ data.activePoolUsdAmount = u64DtoSchemaResponseTransformer(data.activePoolUsdAmount);
987
990
  if (data.currentIteration) {
988
991
  data.currentIteration = epochVaultIterationDtoSchemaResponseTransformer(data.currentIteration);
989
992
  }
@@ -1030,6 +1033,8 @@ var strikeJackpotDtoSchemaResponseTransformer = (data) => {
1030
1033
  data.lastTriggerAt = new Date(data.lastTriggerAt);
1031
1034
  }
1032
1035
  data.pendingUsdAmount = u64DtoSchemaResponseTransformer(data.pendingUsdAmount);
1036
+ data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
1037
+ data.poolUsdAmount = u64DtoSchemaResponseTransformer(data.poolUsdAmount);
1033
1038
  data.usdAmount = u64DtoSchemaResponseTransformer(data.usdAmount);
1034
1039
  return data;
1035
1040
  };
@@ -1084,6 +1089,53 @@ var getEpochHistoryResponseTransformer = async (data) => {
1084
1089
  data.data = data.data.map((item) => epochIterationHistoryDtoSchemaResponseTransformer(item));
1085
1090
  return data;
1086
1091
  };
1092
+ var epochIterationWinnerDtoSchemaResponseTransformer = (data) => {
1093
+ if (data.claimedAt) {
1094
+ data.claimedAt = new Date(data.claimedAt);
1095
+ }
1096
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1097
+ data.wonBtcAmount = u64DtoSchemaResponseTransformer(data.wonBtcAmount);
1098
+ data.wonUsdAmount = u64DtoSchemaResponseTransformer(data.wonUsdAmount);
1099
+ return data;
1100
+ };
1101
+ var epochIterationDetailsDtoSchemaResponseTransformer = (data) => {
1102
+ if (data.endedAt) {
1103
+ data.endedAt = new Date(data.endedAt);
1104
+ }
1105
+ data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
1106
+ data.poolUsdAmount = u64DtoSchemaResponseTransformer(data.poolUsdAmount);
1107
+ data.startedAt = new Date(data.startedAt);
1108
+ data.totalTickets = u64DtoSchemaResponseTransformer(data.totalTickets);
1109
+ if (data.triggeredAt) {
1110
+ data.triggeredAt = new Date(data.triggeredAt);
1111
+ }
1112
+ if (data.winners) {
1113
+ data.winners = data.winners.map((item) => epochIterationWinnerDtoSchemaResponseTransformer(item));
1114
+ }
1115
+ return data;
1116
+ };
1117
+ var getEpochIterationResponseTransformer = async (data) => {
1118
+ data.data = epochIterationDetailsDtoSchemaResponseTransformer(data.data);
1119
+ return data;
1120
+ };
1121
+ var epochIterationParticipantDtoSchemaResponseTransformer = (data) => {
1122
+ if (data.claimedAt) {
1123
+ data.claimedAt = new Date(data.claimedAt);
1124
+ }
1125
+ data.createdAt = new Date(data.createdAt);
1126
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1127
+ if (data.wonBtcAmount) {
1128
+ data.wonBtcAmount = u64DtoSchemaResponseTransformer(data.wonBtcAmount);
1129
+ }
1130
+ if (data.wonUsdAmount) {
1131
+ data.wonUsdAmount = u64DtoSchemaResponseTransformer(data.wonUsdAmount);
1132
+ }
1133
+ return data;
1134
+ };
1135
+ var getEpochIterationParticipantsResponseTransformer = async (data) => {
1136
+ data.data = data.data.map((item) => epochIterationParticipantDtoSchemaResponseTransformer(item));
1137
+ return data;
1138
+ };
1087
1139
  var epochWinnerHistoryDtoSchemaResponseTransformer = (data) => {
1088
1140
  if (data.settledAt) {
1089
1141
  data.settledAt = new Date(data.settledAt);
@@ -1127,12 +1179,54 @@ var oneBtcIterationHistoryDtoSchemaResponseTransformer = (data) => {
1127
1179
  }
1128
1180
  data.startedAt = new Date(data.startedAt);
1129
1181
  data.totalTickets = u64DtoSchemaResponseTransformer(data.totalTickets);
1182
+ if (data.winnerTickets) {
1183
+ data.winnerTickets = u64DtoSchemaResponseTransformer(data.winnerTickets);
1184
+ }
1130
1185
  return data;
1131
1186
  };
1132
1187
  var getOneBtcHistoryResponseTransformer = async (data) => {
1133
1188
  data.data = data.data.map((item) => oneBtcIterationHistoryDtoSchemaResponseTransformer(item));
1134
1189
  return data;
1135
1190
  };
1191
+ var oneBtcIterationWinnerDtoSchemaResponseTransformer = (data) => {
1192
+ if (data.claimedAt) {
1193
+ data.claimedAt = new Date(data.claimedAt);
1194
+ }
1195
+ if (data.tickets) {
1196
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1197
+ }
1198
+ return data;
1199
+ };
1200
+ var oneBtcIterationDetailsDtoSchemaResponseTransformer = (data) => {
1201
+ if (data.endedAt) {
1202
+ data.endedAt = new Date(data.endedAt);
1203
+ }
1204
+ if (data.settledAt) {
1205
+ data.settledAt = new Date(data.settledAt);
1206
+ }
1207
+ data.startedAt = new Date(data.startedAt);
1208
+ data.totalTickets = u64DtoSchemaResponseTransformer(data.totalTickets);
1209
+ if (data.winner) {
1210
+ data.winner = oneBtcIterationWinnerDtoSchemaResponseTransformer(data.winner);
1211
+ }
1212
+ return data;
1213
+ };
1214
+ var getOneBtcIterationResponseTransformer = async (data) => {
1215
+ data.data = oneBtcIterationDetailsDtoSchemaResponseTransformer(data.data);
1216
+ return data;
1217
+ };
1218
+ var oneBtcIterationParticipantDtoSchemaResponseTransformer = (data) => {
1219
+ if (data.claimedAt) {
1220
+ data.claimedAt = new Date(data.claimedAt);
1221
+ }
1222
+ data.firstEntryAt = new Date(data.firstEntryAt);
1223
+ data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1224
+ return data;
1225
+ };
1226
+ var getOneBtcIterationParticipantsResponseTransformer = async (data) => {
1227
+ data.data = data.data.map((item) => oneBtcIterationParticipantDtoSchemaResponseTransformer(item));
1228
+ return data;
1229
+ };
1136
1230
  var roundHistoryDtoSchemaResponseTransformer = (data) => {
1137
1231
  if (data.settledAt) {
1138
1232
  data.settledAt = new Date(data.settledAt);
@@ -1177,6 +1271,82 @@ var getRoundsResponseTransformer = async (data) => {
1177
1271
  data.data = data.data.map((item) => roundHistoryDtoSchemaResponseTransformer(item));
1178
1272
  return data;
1179
1273
  };
1274
+ var roundDeploymentDtoSchemaResponseTransformer = (data) => {
1275
+ if (data.btcEarned) {
1276
+ data.btcEarned = u64DtoSchemaResponseTransformer(data.btcEarned);
1277
+ }
1278
+ data.deployedAt = new Date(data.deployedAt);
1279
+ data.deployedUsdAmount = u64DtoSchemaResponseTransformer(data.deployedUsdAmount);
1280
+ data.hashrateEarned = u64DtoSchemaResponseTransformer(data.hashrateEarned);
1281
+ data.satsSharesEarned = u64DtoSchemaResponseTransformer(data.satsSharesEarned);
1282
+ if (data.settledAt) {
1283
+ data.settledAt = new Date(data.settledAt);
1284
+ }
1285
+ data.totalUsdStakeAmount = u64DtoSchemaResponseTransformer(data.totalUsdStakeAmount);
1286
+ data.usdEarned = u64DtoSchemaResponseTransformer(data.usdEarned);
1287
+ if (data.winningUsdStakeAmount) {
1288
+ data.winningUsdStakeAmount = u64DtoSchemaResponseTransformer(data.winningUsdStakeAmount);
1289
+ }
1290
+ return data;
1291
+ };
1292
+ var roundDetailsDtoSchemaResponseTransformer = (data) => {
1293
+ data.deployedAt = new Date(data.deployedAt);
1294
+ data.deployments = data.deployments.map((item) => roundDeploymentDtoSchemaResponseTransformer(item));
1295
+ if (data.epochFeeUsd) {
1296
+ data.epochFeeUsd = u64DtoSchemaResponseTransformer(data.epochFeeUsd);
1297
+ }
1298
+ if (data.oneBtcFeeUsd) {
1299
+ data.oneBtcFeeUsd = u64DtoSchemaResponseTransformer(data.oneBtcFeeUsd);
1300
+ }
1301
+ if (data.protocolFeeUsd) {
1302
+ data.protocolFeeUsd = u64DtoSchemaResponseTransformer(data.protocolFeeUsd);
1303
+ }
1304
+ if (data.settledAt) {
1305
+ data.settledAt = new Date(data.settledAt);
1306
+ }
1307
+ if (data.startedAt) {
1308
+ data.startedAt = new Date(data.startedAt);
1309
+ }
1310
+ if (data.strikeBonusBtc) {
1311
+ data.strikeBonusBtc = u64DtoSchemaResponseTransformer(data.strikeBonusBtc);
1312
+ }
1313
+ if (data.strikeBonusUsd) {
1314
+ data.strikeBonusUsd = u64DtoSchemaResponseTransformer(data.strikeBonusUsd);
1315
+ }
1316
+ if (data.strikeEpochBtc) {
1317
+ data.strikeEpochBtc = u64DtoSchemaResponseTransformer(data.strikeEpochBtc);
1318
+ }
1319
+ if (data.strikeEpochUsd) {
1320
+ data.strikeEpochUsd = u64DtoSchemaResponseTransformer(data.strikeEpochUsd);
1321
+ }
1322
+ if (data.strikeFeeUsd) {
1323
+ data.strikeFeeUsd = u64DtoSchemaResponseTransformer(data.strikeFeeUsd);
1324
+ }
1325
+ if (data.strikeReserveBtc) {
1326
+ data.strikeReserveBtc = u64DtoSchemaResponseTransformer(data.strikeReserveBtc);
1327
+ }
1328
+ if (data.strikeReserveUsd) {
1329
+ data.strikeReserveUsd = u64DtoSchemaResponseTransformer(data.strikeReserveUsd);
1330
+ }
1331
+ if (data.strikeSeedFromReserveBtc) {
1332
+ data.strikeSeedFromReserveBtc = u64DtoSchemaResponseTransformer(data.strikeSeedFromReserveBtc);
1333
+ }
1334
+ if (data.strikeSeedFromReserveUsd) {
1335
+ data.strikeSeedFromReserveUsd = u64DtoSchemaResponseTransformer(data.strikeSeedFromReserveUsd);
1336
+ }
1337
+ data.totalDeployedUsd = u64DtoSchemaResponseTransformer(data.totalDeployedUsd);
1338
+ if (data.totalPotBtc) {
1339
+ data.totalPotBtc = u64DtoSchemaResponseTransformer(data.totalPotBtc);
1340
+ }
1341
+ if (data.totalPotUsd) {
1342
+ data.totalPotUsd = u64DtoSchemaResponseTransformer(data.totalPotUsd);
1343
+ }
1344
+ return data;
1345
+ };
1346
+ var getRoundResponseTransformer = async (data) => {
1347
+ data.data = roundDetailsDtoSchemaResponseTransformer(data.data);
1348
+ return data;
1349
+ };
1180
1350
  var publicAutomationDtoSchemaResponseTransformer = (data) => {
1181
1351
  data.perRoundUsdAmount = u64DtoSchemaResponseTransformer(data.perRoundUsdAmount);
1182
1352
  data.remainingUsdAmount = u64DtoSchemaResponseTransformer(data.remainingUsdAmount);
@@ -1373,6 +1543,33 @@ var zEpochHistoryApiError400Error = z.union([
1373
1543
  var zEpochHistoryApiError500Error = z.object({
1374
1544
  code: z.enum(["internal"])
1375
1545
  });
1546
+ var zEpochIterationApiError404Error = z.object({
1547
+ code: z.enum(["not_found"])
1548
+ });
1549
+ var zEpochIterationApiError500Error = z.object({
1550
+ code: z.enum(["internal"])
1551
+ });
1552
+ var zEpochIterationParticipantsApiError400InvalidRange = z.object({
1553
+ code: z.enum(["invalid_range"])
1554
+ });
1555
+ var zEpochIterationParticipantsApiError400Error = z.union([
1556
+ z.object({
1557
+ code: z.literal("invalid_range")
1558
+ }).and(zEpochIterationParticipantsApiError400InvalidRange),
1559
+ z.object({
1560
+ code: z.union([
1561
+ z.literal("invalid_body"),
1562
+ z.literal("invalid_path"),
1563
+ z.literal("invalid_query")
1564
+ ])
1565
+ }).and(zBadRequestErrorCodeErrorBody)
1566
+ ]);
1567
+ var zEpochIterationParticipantsApiError404Error = z.object({
1568
+ code: z.enum(["not_found"])
1569
+ });
1570
+ var zEpochIterationParticipantsApiError500Error = z.object({
1571
+ code: z.enum(["internal"])
1572
+ });
1376
1573
  var zEpochStateDto = z.enum([
1377
1574
  "open",
1378
1575
  "settling",
@@ -1432,6 +1629,33 @@ var zOneBtcHistoryApiError400Error = z.union([
1432
1629
  var zOneBtcHistoryApiError500Error = z.object({
1433
1630
  code: z.enum(["internal"])
1434
1631
  });
1632
+ var zOneBtcIterationApiError404Error = z.object({
1633
+ code: z.enum(["not_found"])
1634
+ });
1635
+ var zOneBtcIterationApiError500Error = z.object({
1636
+ code: z.enum(["internal"])
1637
+ });
1638
+ var zOneBtcIterationParticipantsApiError400InvalidRange = z.object({
1639
+ code: z.enum(["invalid_range"])
1640
+ });
1641
+ var zOneBtcIterationParticipantsApiError400Error = z.union([
1642
+ z.object({
1643
+ code: z.literal("invalid_range")
1644
+ }).and(zOneBtcIterationParticipantsApiError400InvalidRange),
1645
+ z.object({
1646
+ code: z.union([
1647
+ z.literal("invalid_body"),
1648
+ z.literal("invalid_path"),
1649
+ z.literal("invalid_query")
1650
+ ])
1651
+ }).and(zBadRequestErrorCodeErrorBody)
1652
+ ]);
1653
+ var zOneBtcIterationParticipantsApiError404Error = z.object({
1654
+ code: z.enum(["not_found"])
1655
+ });
1656
+ var zOneBtcIterationParticipantsApiError500Error = z.object({
1657
+ code: z.enum(["internal"])
1658
+ });
1435
1659
  var zOneBtcStateDto = z.enum([
1436
1660
  "open",
1437
1661
  "settled",
@@ -1446,6 +1670,12 @@ var zPricesDto = z.object({
1446
1670
  sat: z.number()
1447
1671
  });
1448
1672
  var zPubkeyDto = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
1673
+ var zRoundDetailsApiError404Error = z.object({
1674
+ code: z.enum(["not_found"])
1675
+ });
1676
+ var zRoundDetailsApiError500Error = z.object({
1677
+ code: z.enum(["internal"])
1678
+ });
1449
1679
  var zRoundHistoryStateDto = z.enum([
1450
1680
  "pending",
1451
1681
  "active",
@@ -1499,6 +1729,10 @@ var zEpochIterationHistoryDto = z.object({
1499
1729
  ])),
1500
1730
  id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1501
1731
  poolBtcAmount: zU64Dto,
1732
+ poolCombinedUsdAmount: z.optional(z.union([
1733
+ z.number(),
1734
+ z.null()
1735
+ ])),
1502
1736
  poolUsdAmount: zU64Dto,
1503
1737
  startedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1504
1738
  totalParticipants: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
@@ -1508,6 +1742,80 @@ var zEpochIterationHistoryDto = z.object({
1508
1742
  z.null()
1509
1743
  ]))
1510
1744
  });
1745
+ var zEpochIterationParticipantDto = z.object({
1746
+ authority: zPubkeyDto,
1747
+ claimedAt: z.optional(z.union([
1748
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1749
+ z.null()
1750
+ ])),
1751
+ createdAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1752
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1753
+ isWon: z.optional(z.union([
1754
+ z.boolean(),
1755
+ z.null()
1756
+ ])),
1757
+ rank: z.optional(z.union([
1758
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1759
+ z.null()
1760
+ ])),
1761
+ tickets: zU64Dto,
1762
+ wonBtcAmount: z.optional(z.union([
1763
+ z.null(),
1764
+ zU64Dto
1765
+ ])),
1766
+ wonCombinedUsdAmount: z.optional(z.union([
1767
+ z.number(),
1768
+ z.null()
1769
+ ])),
1770
+ wonUsdAmount: z.optional(z.union([
1771
+ z.null(),
1772
+ zU64Dto
1773
+ ]))
1774
+ });
1775
+ var zEpochIterationWinnerDto = z.object({
1776
+ authority: zPubkeyDto,
1777
+ claimedAt: z.optional(z.union([
1778
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1779
+ z.null()
1780
+ ])),
1781
+ rank: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1782
+ tickets: zU64Dto,
1783
+ wonBtcAmount: zU64Dto,
1784
+ wonCombinedUsdAmount: z.optional(z.union([
1785
+ z.number(),
1786
+ z.null()
1787
+ ])),
1788
+ wonUsdAmount: zU64Dto
1789
+ });
1790
+ var zEpochIterationDetailsDto = z.object({
1791
+ address: zPubkeyDto,
1792
+ btcPrice: z.optional(z.union([
1793
+ z.number(),
1794
+ z.null()
1795
+ ])),
1796
+ endedAt: z.optional(z.union([
1797
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1798
+ z.null()
1799
+ ])),
1800
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1801
+ poolBtcAmount: zU64Dto,
1802
+ poolCombinedUsdAmount: z.optional(z.union([
1803
+ z.number(),
1804
+ z.null()
1805
+ ])),
1806
+ poolUsdAmount: zU64Dto,
1807
+ startedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1808
+ totalParticipants: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1809
+ totalTickets: zU64Dto,
1810
+ triggeredAt: z.optional(z.union([
1811
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1812
+ z.null()
1813
+ ])),
1814
+ winners: z.optional(z.union([
1815
+ z.array(zEpochIterationWinnerDto),
1816
+ z.null()
1817
+ ]))
1818
+ });
1511
1819
  var zEpochVaultEntryDto = z.object({
1512
1820
  address: zPubkeyDto,
1513
1821
  iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
@@ -1548,6 +1856,10 @@ var zEpochVaultIterationDto = z.object({
1548
1856
  ]))
1549
1857
  });
1550
1858
  var zEpochVaultDto = z.object({
1859
+ activePendingUsdAmount: zU64Dto,
1860
+ activePoolBtcAmount: zU64Dto,
1861
+ activePoolCombinedUsdAmount: z.number(),
1862
+ activePoolUsdAmount: zU64Dto,
1551
1863
  address: zPubkeyDto,
1552
1864
  currentIteration: z.optional(z.union([
1553
1865
  z.null(),
@@ -1624,6 +1936,10 @@ var zMinerDeploymentDto = z.object({
1624
1936
  z.null(),
1625
1937
  zU64Dto
1626
1938
  ])),
1939
+ btcEarnedUsd: z.optional(z.union([
1940
+ z.number(),
1941
+ z.null()
1942
+ ])),
1627
1943
  deployedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1628
1944
  deployedUsdAmount: zU64Dto,
1629
1945
  deployment: zPubkeyDto,
@@ -1698,6 +2014,10 @@ var zMinerEpochEntryDto = z.object({
1698
2014
  z.null(),
1699
2015
  zU64Dto
1700
2016
  ])),
2017
+ wonCombinedUsdAmount: z.optional(z.union([
2018
+ z.number(),
2019
+ z.null()
2020
+ ])),
1701
2021
  wonUsdAmount: z.optional(z.union([
1702
2022
  z.null(),
1703
2023
  zU64Dto
@@ -1750,6 +2070,62 @@ var zOneBtcIterationHistoryDto = z.object({
1750
2070
  winner: z.optional(z.union([
1751
2071
  z.null(),
1752
2072
  zPubkeyDto
2073
+ ])),
2074
+ winnerTickets: z.optional(z.union([
2075
+ z.null(),
2076
+ zU64Dto
2077
+ ]))
2078
+ });
2079
+ var zOneBtcIterationParticipantDto = z.object({
2080
+ authority: zPubkeyDto,
2081
+ claimedAt: z.optional(z.union([
2082
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2083
+ z.null()
2084
+ ])),
2085
+ firstEntryAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2086
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2087
+ isWon: z.optional(z.union([
2088
+ z.boolean(),
2089
+ z.null()
2090
+ ])),
2091
+ tickets: zU64Dto
2092
+ });
2093
+ var zOneBtcIterationWinnerDto = z.object({
2094
+ authority: zPubkeyDto,
2095
+ claimedAt: z.optional(z.union([
2096
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2097
+ z.null()
2098
+ ])),
2099
+ tickets: z.optional(z.union([
2100
+ z.null(),
2101
+ zU64Dto
2102
+ ]))
2103
+ });
2104
+ var zOneBtcIterationDetailsDto = z.object({
2105
+ address: zPubkeyDto,
2106
+ btcPrice: z.optional(z.union([
2107
+ z.number(),
2108
+ z.null()
2109
+ ])),
2110
+ endedAt: z.optional(z.union([
2111
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2112
+ z.null()
2113
+ ])),
2114
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2115
+ settledAt: z.optional(z.union([
2116
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2117
+ z.null()
2118
+ ])),
2119
+ startedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2120
+ totalParticipants: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2121
+ totalTickets: zU64Dto,
2122
+ usdAmount: z.optional(z.union([
2123
+ z.number(),
2124
+ z.null()
2125
+ ])),
2126
+ winner: z.optional(z.union([
2127
+ z.null(),
2128
+ zOneBtcIterationWinnerDto
1753
2129
  ]))
1754
2130
  });
1755
2131
  var zOneBtcVaultEntryDto = z.object({
@@ -1815,6 +2191,139 @@ var zProfileDto = z.object({
1815
2191
  oneBtcVaultEntries: z.array(zOneBtcVaultEntryDto),
1816
2192
  unsettledDeployments: z.array(zPublicDeploymentDto)
1817
2193
  });
2194
+ var zRoundDeploymentDto = z.object({
2195
+ authority: zPubkeyDto,
2196
+ btcEarned: z.optional(z.union([
2197
+ z.null(),
2198
+ zU64Dto
2199
+ ])),
2200
+ btcEarnedUsd: z.optional(z.union([
2201
+ z.number(),
2202
+ z.null()
2203
+ ])),
2204
+ deployedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2205
+ deployedUsdAmount: zU64Dto,
2206
+ deployment: zPubkeyDto,
2207
+ hashrateEarned: zU64Dto,
2208
+ isAutomation: z.boolean(),
2209
+ isWon: z.optional(z.union([
2210
+ z.boolean(),
2211
+ z.null()
2212
+ ])),
2213
+ satsSharesEarned: zU64Dto,
2214
+ selectedTiles: z.optional(z.union([
2215
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2216
+ z.null()
2217
+ ])),
2218
+ settledAt: z.optional(z.union([
2219
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2220
+ z.null()
2221
+ ])),
2222
+ totalUsdStakeAmount: zU64Dto,
2223
+ usdEarned: zU64Dto,
2224
+ winningUsdStakeAmount: z.optional(z.union([
2225
+ z.null(),
2226
+ zU64Dto
2227
+ ]))
2228
+ });
2229
+ var zRoundDetailsDto = z.object({
2230
+ address: zPubkeyDto,
2231
+ deployedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2232
+ deployments: z.array(zRoundDeploymentDto),
2233
+ epochFeeUsd: z.optional(z.union([
2234
+ z.null(),
2235
+ zU64Dto
2236
+ ])),
2237
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2238
+ isHashrateBoosted: z.optional(z.union([
2239
+ z.boolean(),
2240
+ z.null()
2241
+ ])),
2242
+ isSatStrike: z.optional(z.union([
2243
+ z.boolean(),
2244
+ z.null()
2245
+ ])),
2246
+ minersCount: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2247
+ oneBtcFeeUsd: z.optional(z.union([
2248
+ z.null(),
2249
+ zU64Dto
2250
+ ])),
2251
+ protocolFeeUsd: z.optional(z.union([
2252
+ z.null(),
2253
+ zU64Dto
2254
+ ])),
2255
+ settledAt: z.optional(z.union([
2256
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2257
+ z.null()
2258
+ ])),
2259
+ settledMiners: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2260
+ startedAt: z.optional(z.union([
2261
+ z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
2262
+ z.null()
2263
+ ])),
2264
+ state: zRoundHistoryStateDto,
2265
+ strikeBonusBtc: z.optional(z.union([
2266
+ z.null(),
2267
+ zU64Dto
2268
+ ])),
2269
+ strikeBonusCombinedUsd: z.optional(z.union([
2270
+ z.number(),
2271
+ z.null()
2272
+ ])),
2273
+ strikeBonusUsd: z.optional(z.union([
2274
+ z.null(),
2275
+ zU64Dto
2276
+ ])),
2277
+ strikeEpochBtc: z.optional(z.union([
2278
+ z.null(),
2279
+ zU64Dto
2280
+ ])),
2281
+ strikeEpochUsd: z.optional(z.union([
2282
+ z.null(),
2283
+ zU64Dto
2284
+ ])),
2285
+ strikeFeeUsd: z.optional(z.union([
2286
+ z.null(),
2287
+ zU64Dto
2288
+ ])),
2289
+ strikeReserveBtc: z.optional(z.union([
2290
+ z.null(),
2291
+ zU64Dto
2292
+ ])),
2293
+ strikeReserveUsd: z.optional(z.union([
2294
+ z.null(),
2295
+ zU64Dto
2296
+ ])),
2297
+ strikeSeedFromReserveBtc: z.optional(z.union([
2298
+ z.null(),
2299
+ zU64Dto
2300
+ ])),
2301
+ strikeSeedFromReserveUsd: z.optional(z.union([
2302
+ z.null(),
2303
+ zU64Dto
2304
+ ])),
2305
+ totalDeployedUsd: zU64Dto,
2306
+ totalPotBtc: z.optional(z.union([
2307
+ z.null(),
2308
+ zU64Dto
2309
+ ])),
2310
+ totalPotCombinedUsd: z.optional(z.union([
2311
+ z.number(),
2312
+ z.null()
2313
+ ])),
2314
+ totalPotUsd: z.optional(z.union([
2315
+ z.null(),
2316
+ zU64Dto
2317
+ ])),
2318
+ winnersCount: z.optional(z.union([
2319
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2320
+ z.null()
2321
+ ])),
2322
+ winningTile: z.optional(z.union([
2323
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2324
+ z.null()
2325
+ ]))
2326
+ });
1818
2327
  var zRoundHistoryDto = z.object({
1819
2328
  id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1820
2329
  isHashrateBoosted: z.optional(z.union([
@@ -1839,6 +2348,10 @@ var zRoundHistoryDto = z.object({
1839
2348
  z.null(),
1840
2349
  zU64Dto
1841
2350
  ])),
2351
+ strikeBonusCombinedUsd: z.optional(z.union([
2352
+ z.number(),
2353
+ z.null()
2354
+ ])),
1842
2355
  strikeBonusUsd: z.optional(z.union([
1843
2356
  z.null(),
1844
2357
  zU64Dto
@@ -1872,6 +2385,10 @@ var zRoundHistoryDto = z.object({
1872
2385
  z.null(),
1873
2386
  zU64Dto
1874
2387
  ])),
2388
+ totalPotCombinedUsd: z.optional(z.union([
2389
+ z.number(),
2390
+ z.null()
2391
+ ])),
1875
2392
  totalPotUsd: z.optional(z.union([
1876
2393
  z.null(),
1877
2394
  zU64Dto
@@ -1916,6 +2433,9 @@ var zStrikeJackpotDto = z.object({
1916
2433
  ])),
1917
2434
  lastTriggerRoundId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1918
2435
  pendingUsdAmount: zU64Dto,
2436
+ poolBtcAmount: zU64Dto,
2437
+ poolCombinedUsdAmount: z.number(),
2438
+ poolUsdAmount: zU64Dto,
1919
2439
  usdAmount: zU64Dto
1920
2440
  });
1921
2441
  var zTileStakeDto = z.object({
@@ -1925,6 +2445,7 @@ var zTileStakeDto = z.object({
1925
2445
  var zRoundDto = z.object({
1926
2446
  address: zPubkeyDto,
1927
2447
  deployedBtcAmount: zU64Dto,
2448
+ deployedCombinedUsdAmount: z.number(),
1928
2449
  deployedPendingUsdAmount: zU64Dto,
1929
2450
  deployedUsdAmount: zU64Dto,
1930
2451
  deployedUsdOnWinningTileAmount: zU64Dto,
@@ -2169,6 +2690,30 @@ var zGetEpochHistoryData = z.object({
2169
2690
  var zGetEpochHistoryResponse = z.object({
2170
2691
  data: z.array(zEpochIterationHistoryDto)
2171
2692
  });
2693
+ var zGetEpochIterationData = z.object({
2694
+ body: z.optional(z.never()),
2695
+ path: z.object({
2696
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
2697
+ }),
2698
+ query: z.optional(z.never())
2699
+ });
2700
+ var zGetEpochIterationResponse = z.object({
2701
+ data: zEpochIterationDetailsDto
2702
+ });
2703
+ var zGetEpochIterationParticipantsData = z.object({
2704
+ body: z.optional(z.never()),
2705
+ path: z.object({
2706
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
2707
+ }),
2708
+ query: z.optional(z.object({
2709
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2710
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2711
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2712
+ }))
2713
+ });
2714
+ var zGetEpochIterationParticipantsResponse = z.object({
2715
+ data: z.array(zEpochIterationParticipantDto)
2716
+ });
2172
2717
  var zGetEpochWinnersData = z.object({
2173
2718
  body: z.optional(z.never()),
2174
2719
  path: z.optional(z.never()),
@@ -2217,6 +2762,30 @@ var zGetOneBtcHistoryData = z.object({
2217
2762
  var zGetOneBtcHistoryResponse = z.object({
2218
2763
  data: z.array(zOneBtcIterationHistoryDto)
2219
2764
  });
2765
+ var zGetOneBtcIterationData = z.object({
2766
+ body: z.optional(z.never()),
2767
+ path: z.object({
2768
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
2769
+ }),
2770
+ query: z.optional(z.never())
2771
+ });
2772
+ var zGetOneBtcIterationResponse = z.object({
2773
+ data: zOneBtcIterationDetailsDto
2774
+ });
2775
+ var zGetOneBtcIterationParticipantsData = z.object({
2776
+ body: z.optional(z.never()),
2777
+ path: z.object({
2778
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
2779
+ }),
2780
+ query: z.optional(z.object({
2781
+ before: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2782
+ after: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })),
2783
+ limit: z.optional(z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }))
2784
+ }))
2785
+ });
2786
+ var zGetOneBtcIterationParticipantsResponse = z.object({
2787
+ data: z.array(zOneBtcIterationParticipantDto)
2788
+ });
2220
2789
  var zGetRoundsData = z.object({
2221
2790
  body: z.optional(z.never()),
2222
2791
  path: z.optional(z.never()),
@@ -2230,6 +2799,16 @@ var zGetRoundsData = z.object({
2230
2799
  var zGetRoundsResponse = z.object({
2231
2800
  data: z.array(zRoundHistoryDto)
2232
2801
  });
2802
+ var zGetRoundData = z.object({
2803
+ body: z.optional(z.never()),
2804
+ path: z.object({
2805
+ id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
2806
+ }),
2807
+ query: z.optional(z.never())
2808
+ });
2809
+ var zGetRoundResponse = z.object({
2810
+ data: zRoundDetailsDto
2811
+ });
2233
2812
  var zSseData = z.object({
2234
2813
  body: z.optional(z.never()),
2235
2814
  path: z.optional(z.never()),
@@ -2390,6 +2969,39 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
2390
2969
  ...params
2391
2970
  });
2392
2971
  }
2972
+ /**
2973
+ * Request Epoch Vault iteration details
2974
+ */
2975
+ getEpochIteration(parameters, options) {
2976
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
2977
+ return (options?.client ?? this.client).get({
2978
+ requestValidator: async (data) => await zGetEpochIterationData.parseAsync(data),
2979
+ responseTransformer: getEpochIterationResponseTransformer,
2980
+ responseValidator: async (data) => await zGetEpochIterationResponse.parseAsync(data),
2981
+ url: "/v1/epoch/iterations/{id}",
2982
+ ...options,
2983
+ ...params
2984
+ });
2985
+ }
2986
+ /**
2987
+ * Request Epoch Vault iteration participants
2988
+ */
2989
+ getEpochIterationParticipants(parameters, options) {
2990
+ const params = buildClientParams([parameters], [{ args: [
2991
+ { in: "path", key: "id" },
2992
+ { in: "query", key: "before" },
2993
+ { in: "query", key: "after" },
2994
+ { in: "query", key: "limit" }
2995
+ ] }]);
2996
+ return (options?.client ?? this.client).get({
2997
+ requestValidator: async (data) => await zGetEpochIterationParticipantsData.parseAsync(data),
2998
+ responseTransformer: getEpochIterationParticipantsResponseTransformer,
2999
+ responseValidator: async (data) => await zGetEpochIterationParticipantsResponse.parseAsync(data),
3000
+ url: "/v1/epoch/iterations/{id}/participants",
3001
+ ...options,
3002
+ ...params
3003
+ });
3004
+ }
2393
3005
  /**
2394
3006
  * Request Epoch Vault winners
2395
3007
  */
@@ -2462,6 +3074,39 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
2462
3074
  ...params
2463
3075
  });
2464
3076
  }
3077
+ /**
3078
+ * Request 1 BTC Vault iteration details
3079
+ */
3080
+ getOneBtcIteration(parameters, options) {
3081
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
3082
+ return (options?.client ?? this.client).get({
3083
+ requestValidator: async (data) => await zGetOneBtcIterationData.parseAsync(data),
3084
+ responseTransformer: getOneBtcIterationResponseTransformer,
3085
+ responseValidator: async (data) => await zGetOneBtcIterationResponse.parseAsync(data),
3086
+ url: "/v1/one-btc/iterations/{id}",
3087
+ ...options,
3088
+ ...params
3089
+ });
3090
+ }
3091
+ /**
3092
+ * Request 1 BTC Vault iteration participants
3093
+ */
3094
+ getOneBtcIterationParticipants(parameters, options) {
3095
+ const params = buildClientParams([parameters], [{ args: [
3096
+ { in: "path", key: "id" },
3097
+ { in: "query", key: "before" },
3098
+ { in: "query", key: "after" },
3099
+ { in: "query", key: "limit" }
3100
+ ] }]);
3101
+ return (options?.client ?? this.client).get({
3102
+ requestValidator: async (data) => await zGetOneBtcIterationParticipantsData.parseAsync(data),
3103
+ responseTransformer: getOneBtcIterationParticipantsResponseTransformer,
3104
+ responseValidator: async (data) => await zGetOneBtcIterationParticipantsResponse.parseAsync(data),
3105
+ url: "/v1/one-btc/iterations/{id}/participants",
3106
+ ...options,
3107
+ ...params
3108
+ });
3109
+ }
2465
3110
  /**
2466
3111
  * Request rounds history
2467
3112
  */
@@ -2481,6 +3126,20 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
2481
3126
  ...params
2482
3127
  });
2483
3128
  }
3129
+ /**
3130
+ * Request round details
3131
+ */
3132
+ getRound(parameters, options) {
3133
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
3134
+ return (options?.client ?? this.client).get({
3135
+ requestValidator: async (data) => await zGetRoundData.parseAsync(data),
3136
+ responseTransformer: getRoundResponseTransformer,
3137
+ responseValidator: async (data) => await zGetRoundResponse.parseAsync(data),
3138
+ url: "/v1/rounds/{id}",
3139
+ ...options,
3140
+ ...params
3141
+ });
3142
+ }
2484
3143
  /**
2485
3144
  * Subscribe for SSE stream
2486
3145
  */
@@ -2709,7 +3368,16 @@ export {
2709
3368
  zEpochHistoryApiError400Error,
2710
3369
  zEpochHistoryApiError400InvalidRange,
2711
3370
  zEpochHistoryApiError500Error,
3371
+ zEpochIterationApiError404Error,
3372
+ zEpochIterationApiError500Error,
3373
+ zEpochIterationDetailsDto,
2712
3374
  zEpochIterationHistoryDto,
3375
+ zEpochIterationParticipantDto,
3376
+ zEpochIterationParticipantsApiError400Error,
3377
+ zEpochIterationParticipantsApiError400InvalidRange,
3378
+ zEpochIterationParticipantsApiError404Error,
3379
+ zEpochIterationParticipantsApiError500Error,
3380
+ zEpochIterationWinnerDto,
2713
3381
  zEpochStateDto,
2714
3382
  zEpochVaultDto,
2715
3383
  zEpochVaultEntryDto,
@@ -2727,12 +3395,22 @@ export {
2727
3395
  zGetConfigResponse,
2728
3396
  zGetEpochHistoryData,
2729
3397
  zGetEpochHistoryResponse,
3398
+ zGetEpochIterationData,
3399
+ zGetEpochIterationParticipantsData,
3400
+ zGetEpochIterationParticipantsResponse,
3401
+ zGetEpochIterationResponse,
2730
3402
  zGetEpochWinnersData,
2731
3403
  zGetEpochWinnersResponse,
2732
3404
  zGetHashrateEarnedLeaderboardData,
2733
3405
  zGetHashrateEarnedLeaderboardResponse,
2734
3406
  zGetOneBtcHistoryData,
2735
3407
  zGetOneBtcHistoryResponse,
3408
+ zGetOneBtcIterationData,
3409
+ zGetOneBtcIterationParticipantsData,
3410
+ zGetOneBtcIterationParticipantsResponse,
3411
+ zGetOneBtcIterationResponse,
3412
+ zGetRoundData,
3413
+ zGetRoundResponse,
2736
3414
  zGetRoundsData,
2737
3415
  zGetRoundsPlayedLeaderboardData,
2738
3416
  zGetRoundsPlayedLeaderboardResponse,
@@ -2766,7 +3444,16 @@ export {
2766
3444
  zOneBtcHistoryApiError400Error,
2767
3445
  zOneBtcHistoryApiError400InvalidRange,
2768
3446
  zOneBtcHistoryApiError500Error,
3447
+ zOneBtcIterationApiError404Error,
3448
+ zOneBtcIterationApiError500Error,
3449
+ zOneBtcIterationDetailsDto,
2769
3450
  zOneBtcIterationHistoryDto,
3451
+ zOneBtcIterationParticipantDto,
3452
+ zOneBtcIterationParticipantsApiError400Error,
3453
+ zOneBtcIterationParticipantsApiError400InvalidRange,
3454
+ zOneBtcIterationParticipantsApiError404Error,
3455
+ zOneBtcIterationParticipantsApiError500Error,
3456
+ zOneBtcIterationWinnerDto,
2770
3457
  zOneBtcStateDto,
2771
3458
  zOneBtcVaultDto,
2772
3459
  zOneBtcVaultEntryDto,
@@ -2777,6 +3464,10 @@ export {
2777
3464
  zPubkeyDto,
2778
3465
  zPublicAutomationDto,
2779
3466
  zPublicDeploymentDto,
3467
+ zRoundDeploymentDto,
3468
+ zRoundDetailsApiError404Error,
3469
+ zRoundDetailsApiError500Error,
3470
+ zRoundDetailsDto,
2780
3471
  zRoundDto,
2781
3472
  zRoundHistoryDto,
2782
3473
  zRoundHistoryStateDto,