@satrush/api 0.1.9 → 0.1.10

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
@@ -1341,6 +1341,10 @@ var epochVaultEntryDtoSchemaResponseTransformer = (data) => {
1341
1341
  data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1342
1342
  return data;
1343
1343
  };
1344
+ var i64DtoSchemaResponseTransformer = (data) => {
1345
+ data = BigInt(data.toString());
1346
+ return data;
1347
+ };
1344
1348
  var minerDtoSchemaResponseTransformer = (data) => {
1345
1349
  data.hashrateAmount = u64DtoSchemaResponseTransformer(data.hashrateAmount);
1346
1350
  data.totalBtcReceived = u64DtoSchemaResponseTransformer(data.totalBtcReceived);
@@ -1353,6 +1357,7 @@ var minerDtoSchemaResponseTransformer = (data) => {
1353
1357
  data.unclaimedHashrateAmount = u64DtoSchemaResponseTransformer(data.unclaimedHashrateAmount);
1354
1358
  data.unclaimedSatsShares = u64DtoSchemaResponseTransformer(data.unclaimedSatsShares);
1355
1359
  data.unclaimedUsdAmount = u64DtoSchemaResponseTransformer(data.unclaimedUsdAmount);
1360
+ data.unrealizedBtcPnl = i64DtoSchemaResponseTransformer(data.unrealizedBtcPnl);
1356
1361
  data.unsettledSatsShares = u64DtoSchemaResponseTransformer(data.unsettledSatsShares);
1357
1362
  data.unsettledUsdAmount = u64DtoSchemaResponseTransformer(data.unsettledUsdAmount);
1358
1363
  return data;
@@ -1420,6 +1425,9 @@ var getUserClaimsResponseTransformer = async (data) => {
1420
1425
  return data;
1421
1426
  };
1422
1427
  var minerDeploymentDtoSchemaResponseTransformer = (data) => {
1428
+ if (data.btcEarned) {
1429
+ data.btcEarned = u64DtoSchemaResponseTransformer(data.btcEarned);
1430
+ }
1423
1431
  data.deployedAt = new Date(data.deployedAt);
1424
1432
  data.deployedUsdAmount = u64DtoSchemaResponseTransformer(data.deployedUsdAmount);
1425
1433
  data.hashrateEarned = u64DtoSchemaResponseTransformer(data.hashrateEarned);
@@ -1757,6 +1765,10 @@ var zMinerClaimDto = z.object({
1757
1765
  });
1758
1766
  var zMinerDeploymentDto = z.object({
1759
1767
  authority: zPubkeyDto,
1768
+ btcEarned: z.optional(z.union([
1769
+ z.null(),
1770
+ zU64Dto
1771
+ ])),
1760
1772
  deployedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1761
1773
  deployedUsdAmount: zU64Dto,
1762
1774
  deployment: zPubkeyDto,
@@ -1800,6 +1812,7 @@ var zMinerDto = z.object({
1800
1812
  unclaimedHashrateAmount: zU64Dto,
1801
1813
  unclaimedSatsShares: zU64Dto,
1802
1814
  unclaimedUsdAmount: zU64Dto,
1815
+ unrealizedBtcPnl: zI64Dto,
1803
1816
  unsettledSatsShares: zU64Dto,
1804
1817
  unsettledUsdAmount: zU64Dto
1805
1818
  });
@@ -1887,6 +1900,10 @@ var zOneBtcVaultIterationDto = z.object({
1887
1900
  id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1888
1901
  prizeBtc: zU64Dto,
1889
1902
  state: zOneBtcStateDto,
1903
+ totalParticipants: z.optional(z.union([
1904
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1905
+ z.null()
1906
+ ])),
1890
1907
  totalTickets: zU64Dto,
1891
1908
  winningTicket: z.optional(z.union([
1892
1909
  z.null(),
@@ -1993,6 +2010,10 @@ var zSatrushConfigDto = z.object({
1993
2010
  });
1994
2011
  var zSatsVaultDto = z.object({
1995
2012
  address: zPubkeyDto,
2013
+ apr: z.optional(z.union([
2014
+ z.number(),
2015
+ z.null()
2016
+ ])),
1996
2017
  btcAmount: zU64Dto,
1997
2018
  btcShares: zU64Dto
1998
2019
  });
package/dist/index.d.cts CHANGED
@@ -691,6 +691,7 @@ type MinerClaimDto = {
691
691
  */
692
692
  type MinerDeploymentDto = {
693
693
  authority: PubkeyDto;
694
+ btcEarned?: null | U64Dto;
694
695
  deployedAt: Date;
695
696
  /**
696
697
  * Gross USD deployed onto the round.
@@ -807,6 +808,11 @@ type MinerDto = {
807
808
  * USD rewards not yet claimed.
808
809
  */
809
810
  unclaimedUsdAmount: U64Dto;
811
+ /**
812
+ * Unrealized PNL in satoshis: `sats_current_value - sats_cost_basis`.
813
+ * Zero while the vault account is not loaded.
814
+ */
815
+ unrealizedBtcPnl: I64Dto;
810
816
  /**
811
817
  * Sats Vault shares pending deployment settlement, estimated at the
812
818
  * vault's current exchange rate.
@@ -1025,6 +1031,11 @@ type OneBtcVaultIterationDto = {
1025
1031
  */
1026
1032
  prizeBtc: U64Dto;
1027
1033
  state: OneBtcStateDto;
1034
+ /**
1035
+ * Unique wallets holding entries, from the rounds indexer. Null when the
1036
+ * iteration is not indexed or the database is unavailable.
1037
+ */
1038
+ totalParticipants?: number | null;
1028
1039
  /**
1029
1040
  * Running ticket counter; also the next purchase's start ticket id.
1030
1041
  */
@@ -1308,6 +1319,12 @@ type SatrushConfigDto = {
1308
1319
  */
1309
1320
  type SatsVaultDto = {
1310
1321
  address: PubkeyDto;
1322
+ /**
1323
+ * Rolling 7-day projected APR as a fraction (0.12 = 12%): the average
1324
+ * hourly share-price return over the trailing 7 days, annualized.
1325
+ * `null` until enough history is indexed.
1326
+ */
1327
+ apr?: number | null;
1311
1328
  /**
1312
1329
  * Total BTC backing outstanding shares.
1313
1330
  */
@@ -2480,6 +2497,7 @@ declare const zMinerClaimDto: z.ZodObject<{
2480
2497
  */
2481
2498
  declare const zMinerDeploymentDto: z.ZodObject<{
2482
2499
  authority: z.ZodString;
2500
+ btcEarned: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2483
2501
  deployedAt: z.ZodPreprocess<z.ZodISODateTime>;
2484
2502
  deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
2485
2503
  deployment: z.ZodString;
@@ -2514,6 +2532,7 @@ declare const zMinerDto: z.ZodObject<{
2514
2532
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
2515
2533
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
2516
2534
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
2535
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
2517
2536
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
2518
2537
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
2519
2538
  }, z.core.$strip>;
@@ -2603,6 +2622,7 @@ declare const zOneBtcVaultIterationDto: z.ZodObject<{
2603
2622
  settled: "settled";
2604
2623
  complete: "complete";
2605
2624
  }>;
2625
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2606
2626
  totalTickets: z.ZodCoercedBigInt<unknown>;
2607
2627
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2608
2628
  }, z.core.$strip>;
@@ -2621,6 +2641,7 @@ declare const zOneBtcVaultDto: z.ZodObject<{
2621
2641
  settled: "settled";
2622
2642
  complete: "complete";
2623
2643
  }>;
2644
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2624
2645
  totalTickets: z.ZodCoercedBigInt<unknown>;
2625
2646
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2626
2647
  }, z.core.$strip>]>>;
@@ -2706,6 +2727,7 @@ declare const zProfileDto: z.ZodObject<{
2706
2727
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
2707
2728
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
2708
2729
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
2730
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
2709
2731
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
2710
2732
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
2711
2733
  }, z.core.$strip>;
@@ -2768,6 +2790,7 @@ declare const zSatrushConfigDto: z.ZodObject<{
2768
2790
  */
2769
2791
  declare const zSatsVaultDto: z.ZodObject<{
2770
2792
  address: z.ZodString;
2793
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2771
2794
  btcAmount: z.ZodCoercedBigInt<unknown>;
2772
2795
  btcShares: z.ZodCoercedBigInt<unknown>;
2773
2796
  }, z.core.$strip>;
@@ -2895,6 +2918,7 @@ declare const zBoardDto: z.ZodObject<{
2895
2918
  settled: "settled";
2896
2919
  complete: "complete";
2897
2920
  }>;
2921
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2898
2922
  totalTickets: z.ZodCoercedBigInt<unknown>;
2899
2923
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2900
2924
  }, z.core.$strip>]>>;
@@ -2942,6 +2966,7 @@ declare const zBoardDto: z.ZodObject<{
2942
2966
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
2943
2967
  satsVault: z.ZodObject<{
2944
2968
  address: z.ZodString;
2969
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2945
2970
  btcAmount: z.ZodCoercedBigInt<unknown>;
2946
2971
  btcShares: z.ZodCoercedBigInt<unknown>;
2947
2972
  }, z.core.$strip>;
@@ -3030,6 +3055,7 @@ declare const zSnapshotDto: z.ZodObject<{
3030
3055
  settled: "settled";
3031
3056
  complete: "complete";
3032
3057
  }>;
3058
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3033
3059
  totalTickets: z.ZodCoercedBigInt<unknown>;
3034
3060
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3035
3061
  }, z.core.$strip>]>>;
@@ -3077,6 +3103,7 @@ declare const zSnapshotDto: z.ZodObject<{
3077
3103
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3078
3104
  satsVault: z.ZodObject<{
3079
3105
  address: z.ZodString;
3106
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3080
3107
  btcAmount: z.ZodCoercedBigInt<unknown>;
3081
3108
  btcShares: z.ZodCoercedBigInt<unknown>;
3082
3109
  }, z.core.$strip>;
@@ -3134,6 +3161,7 @@ declare const zSnapshotDto: z.ZodObject<{
3134
3161
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3135
3162
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3136
3163
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3164
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3137
3165
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3138
3166
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3139
3167
  }, z.core.$strip>;
@@ -3227,6 +3255,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3227
3255
  settled: "settled";
3228
3256
  complete: "complete";
3229
3257
  }>;
3258
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3230
3259
  totalTickets: z.ZodCoercedBigInt<unknown>;
3231
3260
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3232
3261
  }, z.core.$strip>]>>;
@@ -3274,6 +3303,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3274
3303
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3275
3304
  satsVault: z.ZodObject<{
3276
3305
  address: z.ZodString;
3306
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3277
3307
  btcAmount: z.ZodCoercedBigInt<unknown>;
3278
3308
  btcShares: z.ZodCoercedBigInt<unknown>;
3279
3309
  }, z.core.$strip>;
@@ -3331,6 +3361,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3331
3361
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3332
3362
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3333
3363
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3364
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3334
3365
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3335
3366
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3336
3367
  }, z.core.$strip>;
@@ -3430,6 +3461,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3430
3461
  settled: "settled";
3431
3462
  complete: "complete";
3432
3463
  }>;
3464
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3433
3465
  totalTickets: z.ZodCoercedBigInt<unknown>;
3434
3466
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3435
3467
  }, z.core.$strip>]>>;
@@ -3477,6 +3509,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3477
3509
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3478
3510
  satsVault: z.ZodObject<{
3479
3511
  address: z.ZodString;
3512
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3480
3513
  btcAmount: z.ZodCoercedBigInt<unknown>;
3481
3514
  btcShares: z.ZodCoercedBigInt<unknown>;
3482
3515
  }, z.core.$strip>;
@@ -3534,6 +3567,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3534
3567
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3535
3568
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3536
3569
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3570
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3537
3571
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3538
3572
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3539
3573
  }, z.core.$strip>;
@@ -3877,6 +3911,7 @@ declare const zGetBoardResponse: z.ZodObject<{
3877
3911
  settled: "settled";
3878
3912
  complete: "complete";
3879
3913
  }>;
3914
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3880
3915
  totalTickets: z.ZodCoercedBigInt<unknown>;
3881
3916
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3882
3917
  }, z.core.$strip>]>>;
@@ -3924,6 +3959,7 @@ declare const zGetBoardResponse: z.ZodObject<{
3924
3959
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3925
3960
  satsVault: z.ZodObject<{
3926
3961
  address: z.ZodString;
3962
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3927
3963
  btcAmount: z.ZodCoercedBigInt<unknown>;
3928
3964
  btcShares: z.ZodCoercedBigInt<unknown>;
3929
3965
  }, z.core.$strip>;
@@ -4201,6 +4237,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4201
4237
  settled: "settled";
4202
4238
  complete: "complete";
4203
4239
  }>;
4240
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
4204
4241
  totalTickets: z.ZodCoercedBigInt<unknown>;
4205
4242
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
4206
4243
  }, z.core.$strip>]>>;
@@ -4248,6 +4285,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4248
4285
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
4249
4286
  satsVault: z.ZodObject<{
4250
4287
  address: z.ZodString;
4288
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
4251
4289
  btcAmount: z.ZodCoercedBigInt<unknown>;
4252
4290
  btcShares: z.ZodCoercedBigInt<unknown>;
4253
4291
  }, z.core.$strip>;
@@ -4305,6 +4343,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4305
4343
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
4306
4344
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
4307
4345
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
4346
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
4308
4347
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
4309
4348
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
4310
4349
  }, z.core.$strip>;
@@ -4377,6 +4416,7 @@ declare const zGetUserProfileResponse: z.ZodObject<{
4377
4416
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
4378
4417
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
4379
4418
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
4419
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
4380
4420
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
4381
4421
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
4382
4422
  }, z.core.$strip>;
@@ -4437,6 +4477,7 @@ declare const zGetUserDeploymentsData: z.ZodObject<{
4437
4477
  declare const zGetUserDeploymentsResponse: z.ZodObject<{
4438
4478
  data: z.ZodArray<z.ZodObject<{
4439
4479
  authority: z.ZodString;
4480
+ btcEarned: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
4440
4481
  deployedAt: z.ZodPreprocess<z.ZodISODateTime>;
4441
4482
  deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
4442
4483
  deployment: z.ZodString;
package/dist/index.d.ts CHANGED
@@ -691,6 +691,7 @@ type MinerClaimDto = {
691
691
  */
692
692
  type MinerDeploymentDto = {
693
693
  authority: PubkeyDto;
694
+ btcEarned?: null | U64Dto;
694
695
  deployedAt: Date;
695
696
  /**
696
697
  * Gross USD deployed onto the round.
@@ -807,6 +808,11 @@ type MinerDto = {
807
808
  * USD rewards not yet claimed.
808
809
  */
809
810
  unclaimedUsdAmount: U64Dto;
811
+ /**
812
+ * Unrealized PNL in satoshis: `sats_current_value - sats_cost_basis`.
813
+ * Zero while the vault account is not loaded.
814
+ */
815
+ unrealizedBtcPnl: I64Dto;
810
816
  /**
811
817
  * Sats Vault shares pending deployment settlement, estimated at the
812
818
  * vault's current exchange rate.
@@ -1025,6 +1031,11 @@ type OneBtcVaultIterationDto = {
1025
1031
  */
1026
1032
  prizeBtc: U64Dto;
1027
1033
  state: OneBtcStateDto;
1034
+ /**
1035
+ * Unique wallets holding entries, from the rounds indexer. Null when the
1036
+ * iteration is not indexed or the database is unavailable.
1037
+ */
1038
+ totalParticipants?: number | null;
1028
1039
  /**
1029
1040
  * Running ticket counter; also the next purchase's start ticket id.
1030
1041
  */
@@ -1308,6 +1319,12 @@ type SatrushConfigDto = {
1308
1319
  */
1309
1320
  type SatsVaultDto = {
1310
1321
  address: PubkeyDto;
1322
+ /**
1323
+ * Rolling 7-day projected APR as a fraction (0.12 = 12%): the average
1324
+ * hourly share-price return over the trailing 7 days, annualized.
1325
+ * `null` until enough history is indexed.
1326
+ */
1327
+ apr?: number | null;
1311
1328
  /**
1312
1329
  * Total BTC backing outstanding shares.
1313
1330
  */
@@ -2480,6 +2497,7 @@ declare const zMinerClaimDto: z.ZodObject<{
2480
2497
  */
2481
2498
  declare const zMinerDeploymentDto: z.ZodObject<{
2482
2499
  authority: z.ZodString;
2500
+ btcEarned: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2483
2501
  deployedAt: z.ZodPreprocess<z.ZodISODateTime>;
2484
2502
  deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
2485
2503
  deployment: z.ZodString;
@@ -2514,6 +2532,7 @@ declare const zMinerDto: z.ZodObject<{
2514
2532
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
2515
2533
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
2516
2534
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
2535
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
2517
2536
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
2518
2537
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
2519
2538
  }, z.core.$strip>;
@@ -2603,6 +2622,7 @@ declare const zOneBtcVaultIterationDto: z.ZodObject<{
2603
2622
  settled: "settled";
2604
2623
  complete: "complete";
2605
2624
  }>;
2625
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2606
2626
  totalTickets: z.ZodCoercedBigInt<unknown>;
2607
2627
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2608
2628
  }, z.core.$strip>;
@@ -2621,6 +2641,7 @@ declare const zOneBtcVaultDto: z.ZodObject<{
2621
2641
  settled: "settled";
2622
2642
  complete: "complete";
2623
2643
  }>;
2644
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2624
2645
  totalTickets: z.ZodCoercedBigInt<unknown>;
2625
2646
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2626
2647
  }, z.core.$strip>]>>;
@@ -2706,6 +2727,7 @@ declare const zProfileDto: z.ZodObject<{
2706
2727
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
2707
2728
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
2708
2729
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
2730
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
2709
2731
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
2710
2732
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
2711
2733
  }, z.core.$strip>;
@@ -2768,6 +2790,7 @@ declare const zSatrushConfigDto: z.ZodObject<{
2768
2790
  */
2769
2791
  declare const zSatsVaultDto: z.ZodObject<{
2770
2792
  address: z.ZodString;
2793
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2771
2794
  btcAmount: z.ZodCoercedBigInt<unknown>;
2772
2795
  btcShares: z.ZodCoercedBigInt<unknown>;
2773
2796
  }, z.core.$strip>;
@@ -2895,6 +2918,7 @@ declare const zBoardDto: z.ZodObject<{
2895
2918
  settled: "settled";
2896
2919
  complete: "complete";
2897
2920
  }>;
2921
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
2898
2922
  totalTickets: z.ZodCoercedBigInt<unknown>;
2899
2923
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
2900
2924
  }, z.core.$strip>]>>;
@@ -2942,6 +2966,7 @@ declare const zBoardDto: z.ZodObject<{
2942
2966
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
2943
2967
  satsVault: z.ZodObject<{
2944
2968
  address: z.ZodString;
2969
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
2945
2970
  btcAmount: z.ZodCoercedBigInt<unknown>;
2946
2971
  btcShares: z.ZodCoercedBigInt<unknown>;
2947
2972
  }, z.core.$strip>;
@@ -3030,6 +3055,7 @@ declare const zSnapshotDto: z.ZodObject<{
3030
3055
  settled: "settled";
3031
3056
  complete: "complete";
3032
3057
  }>;
3058
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3033
3059
  totalTickets: z.ZodCoercedBigInt<unknown>;
3034
3060
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3035
3061
  }, z.core.$strip>]>>;
@@ -3077,6 +3103,7 @@ declare const zSnapshotDto: z.ZodObject<{
3077
3103
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3078
3104
  satsVault: z.ZodObject<{
3079
3105
  address: z.ZodString;
3106
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3080
3107
  btcAmount: z.ZodCoercedBigInt<unknown>;
3081
3108
  btcShares: z.ZodCoercedBigInt<unknown>;
3082
3109
  }, z.core.$strip>;
@@ -3134,6 +3161,7 @@ declare const zSnapshotDto: z.ZodObject<{
3134
3161
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3135
3162
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3136
3163
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3164
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3137
3165
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3138
3166
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3139
3167
  }, z.core.$strip>;
@@ -3227,6 +3255,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3227
3255
  settled: "settled";
3228
3256
  complete: "complete";
3229
3257
  }>;
3258
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3230
3259
  totalTickets: z.ZodCoercedBigInt<unknown>;
3231
3260
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3232
3261
  }, z.core.$strip>]>>;
@@ -3274,6 +3303,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3274
3303
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3275
3304
  satsVault: z.ZodObject<{
3276
3305
  address: z.ZodString;
3306
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3277
3307
  btcAmount: z.ZodCoercedBigInt<unknown>;
3278
3308
  btcShares: z.ZodCoercedBigInt<unknown>;
3279
3309
  }, z.core.$strip>;
@@ -3331,6 +3361,7 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
3331
3361
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3332
3362
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3333
3363
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3364
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3334
3365
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3335
3366
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3336
3367
  }, z.core.$strip>;
@@ -3430,6 +3461,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3430
3461
  settled: "settled";
3431
3462
  complete: "complete";
3432
3463
  }>;
3464
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3433
3465
  totalTickets: z.ZodCoercedBigInt<unknown>;
3434
3466
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3435
3467
  }, z.core.$strip>]>>;
@@ -3477,6 +3509,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3477
3509
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3478
3510
  satsVault: z.ZodObject<{
3479
3511
  address: z.ZodString;
3512
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3480
3513
  btcAmount: z.ZodCoercedBigInt<unknown>;
3481
3514
  btcShares: z.ZodCoercedBigInt<unknown>;
3482
3515
  }, z.core.$strip>;
@@ -3534,6 +3567,7 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
3534
3567
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
3535
3568
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
3536
3569
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
3570
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
3537
3571
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
3538
3572
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
3539
3573
  }, z.core.$strip>;
@@ -3877,6 +3911,7 @@ declare const zGetBoardResponse: z.ZodObject<{
3877
3911
  settled: "settled";
3878
3912
  complete: "complete";
3879
3913
  }>;
3914
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
3880
3915
  totalTickets: z.ZodCoercedBigInt<unknown>;
3881
3916
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
3882
3917
  }, z.core.$strip>]>>;
@@ -3924,6 +3959,7 @@ declare const zGetBoardResponse: z.ZodObject<{
3924
3959
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
3925
3960
  satsVault: z.ZodObject<{
3926
3961
  address: z.ZodString;
3962
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
3927
3963
  btcAmount: z.ZodCoercedBigInt<unknown>;
3928
3964
  btcShares: z.ZodCoercedBigInt<unknown>;
3929
3965
  }, z.core.$strip>;
@@ -4201,6 +4237,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4201
4237
  settled: "settled";
4202
4238
  complete: "complete";
4203
4239
  }>;
4240
+ totalParticipants: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
4204
4241
  totalTickets: z.ZodCoercedBigInt<unknown>;
4205
4242
  winningTicket: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
4206
4243
  }, z.core.$strip>]>>;
@@ -4248,6 +4285,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4248
4285
  roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
4249
4286
  satsVault: z.ZodObject<{
4250
4287
  address: z.ZodString;
4288
+ apr: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodNull]>>;
4251
4289
  btcAmount: z.ZodCoercedBigInt<unknown>;
4252
4290
  btcShares: z.ZodCoercedBigInt<unknown>;
4253
4291
  }, z.core.$strip>;
@@ -4305,6 +4343,7 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
4305
4343
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
4306
4344
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
4307
4345
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
4346
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
4308
4347
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
4309
4348
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
4310
4349
  }, z.core.$strip>;
@@ -4377,6 +4416,7 @@ declare const zGetUserProfileResponse: z.ZodObject<{
4377
4416
  unclaimedHashrateAmount: z.ZodCoercedBigInt<unknown>;
4378
4417
  unclaimedSatsShares: z.ZodCoercedBigInt<unknown>;
4379
4418
  unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
4419
+ unrealizedBtcPnl: z.ZodCoercedBigInt<unknown>;
4380
4420
  unsettledSatsShares: z.ZodCoercedBigInt<unknown>;
4381
4421
  unsettledUsdAmount: z.ZodCoercedBigInt<unknown>;
4382
4422
  }, z.core.$strip>;
@@ -4437,6 +4477,7 @@ declare const zGetUserDeploymentsData: z.ZodObject<{
4437
4477
  declare const zGetUserDeploymentsResponse: z.ZodObject<{
4438
4478
  data: z.ZodArray<z.ZodObject<{
4439
4479
  authority: z.ZodString;
4480
+ btcEarned: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodCoercedBigInt<unknown>]>>;
4440
4481
  deployedAt: z.ZodPreprocess<z.ZodISODateTime>;
4441
4482
  deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
4442
4483
  deployment: z.ZodString;
package/dist/index.js CHANGED
@@ -1172,6 +1172,10 @@ var epochVaultEntryDtoSchemaResponseTransformer = (data) => {
1172
1172
  data.tickets = u64DtoSchemaResponseTransformer(data.tickets);
1173
1173
  return data;
1174
1174
  };
1175
+ var i64DtoSchemaResponseTransformer = (data) => {
1176
+ data = BigInt(data.toString());
1177
+ return data;
1178
+ };
1175
1179
  var minerDtoSchemaResponseTransformer = (data) => {
1176
1180
  data.hashrateAmount = u64DtoSchemaResponseTransformer(data.hashrateAmount);
1177
1181
  data.totalBtcReceived = u64DtoSchemaResponseTransformer(data.totalBtcReceived);
@@ -1184,6 +1188,7 @@ var minerDtoSchemaResponseTransformer = (data) => {
1184
1188
  data.unclaimedHashrateAmount = u64DtoSchemaResponseTransformer(data.unclaimedHashrateAmount);
1185
1189
  data.unclaimedSatsShares = u64DtoSchemaResponseTransformer(data.unclaimedSatsShares);
1186
1190
  data.unclaimedUsdAmount = u64DtoSchemaResponseTransformer(data.unclaimedUsdAmount);
1191
+ data.unrealizedBtcPnl = i64DtoSchemaResponseTransformer(data.unrealizedBtcPnl);
1187
1192
  data.unsettledSatsShares = u64DtoSchemaResponseTransformer(data.unsettledSatsShares);
1188
1193
  data.unsettledUsdAmount = u64DtoSchemaResponseTransformer(data.unsettledUsdAmount);
1189
1194
  return data;
@@ -1251,6 +1256,9 @@ var getUserClaimsResponseTransformer = async (data) => {
1251
1256
  return data;
1252
1257
  };
1253
1258
  var minerDeploymentDtoSchemaResponseTransformer = (data) => {
1259
+ if (data.btcEarned) {
1260
+ data.btcEarned = u64DtoSchemaResponseTransformer(data.btcEarned);
1261
+ }
1254
1262
  data.deployedAt = new Date(data.deployedAt);
1255
1263
  data.deployedUsdAmount = u64DtoSchemaResponseTransformer(data.deployedUsdAmount);
1256
1264
  data.hashrateEarned = u64DtoSchemaResponseTransformer(data.hashrateEarned);
@@ -1588,6 +1596,10 @@ var zMinerClaimDto = z.object({
1588
1596
  });
1589
1597
  var zMinerDeploymentDto = z.object({
1590
1598
  authority: zPubkeyDto,
1599
+ btcEarned: z.optional(z.union([
1600
+ z.null(),
1601
+ zU64Dto
1602
+ ])),
1591
1603
  deployedAt: z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
1592
1604
  deployedUsdAmount: zU64Dto,
1593
1605
  deployment: zPubkeyDto,
@@ -1631,6 +1643,7 @@ var zMinerDto = z.object({
1631
1643
  unclaimedHashrateAmount: zU64Dto,
1632
1644
  unclaimedSatsShares: zU64Dto,
1633
1645
  unclaimedUsdAmount: zU64Dto,
1646
+ unrealizedBtcPnl: zI64Dto,
1634
1647
  unsettledSatsShares: zU64Dto,
1635
1648
  unsettledUsdAmount: zU64Dto
1636
1649
  });
@@ -1718,6 +1731,10 @@ var zOneBtcVaultIterationDto = z.object({
1718
1731
  id: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1719
1732
  prizeBtc: zU64Dto,
1720
1733
  state: zOneBtcStateDto,
1734
+ totalParticipants: z.optional(z.union([
1735
+ z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1736
+ z.null()
1737
+ ])),
1721
1738
  totalTickets: zU64Dto,
1722
1739
  winningTicket: z.optional(z.union([
1723
1740
  z.null(),
@@ -1824,6 +1841,10 @@ var zSatrushConfigDto = z.object({
1824
1841
  });
1825
1842
  var zSatsVaultDto = z.object({
1826
1843
  address: zPubkeyDto,
1844
+ apr: z.optional(z.union([
1845
+ z.number(),
1846
+ z.null()
1847
+ ])),
1827
1848
  btcAmount: zU64Dto,
1828
1849
  btcShares: zU64Dto
1829
1850
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@satrush/api",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",