@satrush/api 0.1.0 → 0.1.2

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.d.cts CHANGED
@@ -313,6 +313,9 @@ declare const createClient: (config?: Config) => Client;
313
313
  type ClientOptions = {
314
314
  baseUrl: `${string}://${string}/api` | (string & {});
315
315
  };
316
+ type BadRequestErrorCodeErrorBody = {
317
+ code: 'invalid_path' | 'invalid_query' | 'invalid_body';
318
+ };
316
319
  /**
317
320
  * Board state: the active round pointer, its mining window, the strike
318
321
  * jackpot, the live blockchain slot and the current round's details.
@@ -340,6 +343,16 @@ type BoardDto = {
340
343
  startSlot: U64Dto;
341
344
  strike: StrikeJackpotDto;
342
345
  };
346
+ type FieldError = {
347
+ /**
348
+ * Field name in request.
349
+ */
350
+ field: string;
351
+ /**
352
+ * Validation error message.
353
+ */
354
+ message: string;
355
+ };
343
356
  /**
344
357
  * Signed 128-bit integer encoded as a decimal string.
345
358
  */
@@ -351,6 +364,46 @@ type I64Dto = bigint;
351
364
  type InternalErrorCodeErrorBody = {
352
365
  code: 'internal_error';
353
366
  };
367
+ /**
368
+ * A miner's accumulated protocol state, keyed by its authority wallet.
369
+ */
370
+ type MinerDto = {
371
+ authority: PubkeyDto;
372
+ /**
373
+ * Number of consecutive rounds played.
374
+ */
375
+ currentStreakCount: number;
376
+ /**
377
+ * Accumulated hashrate points.
378
+ */
379
+ hashrateAmount: U64Dto;
380
+ /**
381
+ * Id of the last round the miner played.
382
+ */
383
+ lastMinedRoundId: number;
384
+ /**
385
+ * BTC shares in the Sats Vault not yet claimed.
386
+ */
387
+ unclaimedBtcShares: U64Dto;
388
+ /**
389
+ * USD rewards not yet claimed.
390
+ */
391
+ unclaimedUsdAmount: U64Dto;
392
+ };
393
+ declare const NotificationEntity: {
394
+ readonly STATE_SNAPSHOT: "state_snapshot";
395
+ };
396
+ type NotificationEntity = typeof NotificationEntity[keyof typeof NotificationEntity];
397
+ /**
398
+ * A user's profile: their miner account and currently-open deployments.
399
+ */
400
+ type ProfileDto = {
401
+ /**
402
+ * The authority's open public deployments.
403
+ */
404
+ deployments: Array<PublicDeploymentDto>;
405
+ miner: MinerDto;
406
+ };
354
407
  /**
355
408
  * Pubkey represented as base58 string in JSON and OpenAPI.
356
409
  *
@@ -358,6 +411,24 @@ type InternalErrorCodeErrorBody = {
358
411
  * - OpenAPI: `type: string`, pattern for base58, optional format
359
412
  */
360
413
  type PubkeyDto = string;
414
+ /**
415
+ * A miner's deployment of USD onto a round's tiles.
416
+ */
417
+ type PublicDeploymentDto = {
418
+ address: PubkeyDto;
419
+ /**
420
+ * USD deployed after protocol fees.
421
+ */
422
+ deployedUsdAmount: U64Dto;
423
+ /**
424
+ * Round this deployment belongs to.
425
+ */
426
+ roundId: number;
427
+ /**
428
+ * 21-bit mask of the selected tiles.
429
+ */
430
+ selectionMask: number;
431
+ };
361
432
  /**
362
433
  * Core state of a mining round.
363
434
  */
@@ -391,6 +462,55 @@ declare const RoundStateDto: {
391
462
  * Lifecycle state of a round.
392
463
  */
393
464
  type RoundStateDto = typeof RoundStateDto[keyof typeof RoundStateDto];
465
+ /**
466
+ * Protocol configuration: token mints and fee rates.
467
+ */
468
+ type SatrushConfigDto = {
469
+ address: PubkeyDto;
470
+ /**
471
+ * BTC mint (initially cbBTC).
472
+ */
473
+ btcMint: PubkeyDto;
474
+ /**
475
+ * Epoch Vault fee in basis points.
476
+ */
477
+ epochFeeBps: number;
478
+ /**
479
+ * 1 BTC Vault fee in basis points.
480
+ */
481
+ oneBtcFeeBps: number;
482
+ /**
483
+ * Protocol fee in basis points.
484
+ */
485
+ protocolFeeBps: number;
486
+ /**
487
+ * Sats Vault claim fee in basis points.
488
+ */
489
+ satsVaultClaimFeeBps: number;
490
+ /**
491
+ * Sats Vault round fee in basis points.
492
+ */
493
+ satsVaultRoundFeeBps: number;
494
+ /**
495
+ * Strike jackpot fee in basis points.
496
+ */
497
+ strikeFeeBps: number;
498
+ /**
499
+ * USD mint (initially USDC).
500
+ */
501
+ usdMint: PubkeyDto;
502
+ };
503
+ type SnapshotDto = {
504
+ board: BoardDto;
505
+ entity: NotificationEntity;
506
+ profile?: null | ProfileDto;
507
+ };
508
+ type SseResponse = {
509
+ entity: 'state_snapshot';
510
+ } & SseResponseSnapshot;
511
+ type SseResponseSnapshot = SnapshotDto & {
512
+ entity: 'state_snapshot';
513
+ };
394
514
  /**
395
515
  * Strike jackpot balances tracked on the board.
396
516
  */
@@ -427,6 +547,26 @@ type U128Dto = bigint;
427
547
  * Unsigned 64-bit integer encoded as a decimal string.
428
548
  */
429
549
  type U64Dto = bigint;
550
+ type UserProfileApiError400Error = ({
551
+ code: 'invalid_address';
552
+ } & UserProfileApiError400InvalidAddress) | ({
553
+ code: 'invalid_body' | 'invalid_path' | 'invalid_query';
554
+ } & BadRequestErrorCodeErrorBody);
555
+ type UserProfileApiError400InvalidAddress = {
556
+ code: 'invalid_address';
557
+ };
558
+ type ValidationErrorCodeErrorBody = {
559
+ code: 'validation_failed';
560
+ data?: {
561
+ errors: Array<FieldError>;
562
+ };
563
+ };
564
+ type ValidationErrorCodeValidationDetailsErrorBody = {
565
+ code: 'validation_failed';
566
+ data?: {
567
+ errors: Array<FieldError>;
568
+ };
569
+ };
430
570
  type GetBoardData = {
431
571
  body?: never;
432
572
  path?: never;
@@ -443,6 +583,73 @@ type GetBoardResponses = {
443
583
  };
444
584
  };
445
585
  type GetBoardResponse = GetBoardResponses[keyof GetBoardResponses];
586
+ type GetConfigData = {
587
+ body?: never;
588
+ path?: never;
589
+ query?: never;
590
+ url: '/v1/config';
591
+ };
592
+ type GetConfigErrors = {
593
+ 500: InternalErrorCodeErrorBody;
594
+ };
595
+ type GetConfigError = GetConfigErrors[keyof GetConfigErrors];
596
+ type GetConfigResponses = {
597
+ 200: {
598
+ data: SatrushConfigDto;
599
+ };
600
+ };
601
+ type GetConfigResponse = GetConfigResponses[keyof GetConfigResponses];
602
+ type SseData = {
603
+ body?: never;
604
+ path?: never;
605
+ query?: {
606
+ /**
607
+ * Wallet address (base58); when set, snapshots for this client also carry
608
+ * that wallet's profile.
609
+ */
610
+ wallet?: string;
611
+ };
612
+ url: '/v1/streams/sse';
613
+ };
614
+ type SseErrors = {
615
+ 400: BadRequestErrorCodeErrorBody;
616
+ 422: ValidationErrorCodeErrorBody;
617
+ /**
618
+ * Internal error
619
+ */
620
+ 500: unknown;
621
+ };
622
+ type SseError = SseErrors[keyof SseErrors];
623
+ type SseResponses = {
624
+ /**
625
+ * Server-Sent Events stream
626
+ */
627
+ 200: SseResponse;
628
+ };
629
+ type SseResponse2 = SseResponses[keyof SseResponses];
630
+ type GetUserProfileData = {
631
+ body?: never;
632
+ path: {
633
+ /**
634
+ * User wallet address (base58)
635
+ */
636
+ address: string;
637
+ };
638
+ query?: never;
639
+ url: '/v1/user/{address}/profile';
640
+ };
641
+ type GetUserProfileErrors = {
642
+ 400: UserProfileApiError400Error;
643
+ 422: ValidationErrorCodeErrorBody;
644
+ 500: InternalErrorCodeErrorBody;
645
+ };
646
+ type GetUserProfileError = GetUserProfileErrors[keyof GetUserProfileErrors];
647
+ type GetUserProfileResponses = {
648
+ 200: {
649
+ data: ProfileDto;
650
+ };
651
+ };
652
+ type GetUserProfileResponse = GetUserProfileResponses[keyof GetUserProfileResponses];
446
653
 
447
654
  type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
448
655
  /**
@@ -479,8 +686,35 @@ declare class SatrushBackendSdk extends HeyApiClient {
479
686
  * Request board
480
687
  */
481
688
  getBoard<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<GetBoardResponses, GetBoardErrors, ThrowOnError, "fields">;
689
+ /**
690
+ * Request config
691
+ */
692
+ getConfig<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<GetConfigResponses, GetConfigErrors, ThrowOnError, "fields">;
693
+ /**
694
+ * Subscribe for SSE stream
695
+ */
696
+ sse<ThrowOnError extends boolean = false>(parameters?: {
697
+ wallet?: string;
698
+ }, options?: Options<never, ThrowOnError>): Promise<ServerSentEventsResult<SseResponses, SseErrors>>;
699
+ /**
700
+ * Request user profile
701
+ */
702
+ getUserProfile<ThrowOnError extends boolean = false>(parameters: {
703
+ address: string;
704
+ }, options?: Options<never, ThrowOnError>): RequestResult<GetUserProfileResponses, GetUserProfileErrors, ThrowOnError, "fields">;
482
705
  }
483
706
 
707
+ declare const zBadRequestErrorCodeErrorBody: z.ZodObject<{
708
+ code: z.ZodEnum<{
709
+ invalid_path: "invalid_path";
710
+ invalid_query: "invalid_query";
711
+ invalid_body: "invalid_body";
712
+ }>;
713
+ }, z.core.$strip>;
714
+ declare const zFieldError: z.ZodObject<{
715
+ field: z.ZodString;
716
+ message: z.ZodString;
717
+ }, z.core.$strip>;
484
718
  /**
485
719
  * Signed 128-bit integer encoded as a decimal string.
486
720
  */
@@ -494,6 +728,9 @@ declare const zInternalErrorCodeErrorBody: z.ZodObject<{
494
728
  internal_error: "internal_error";
495
729
  }>;
496
730
  }, z.core.$strip>;
731
+ declare const zNotificationEntity: z.ZodEnum<{
732
+ state_snapshot: "state_snapshot";
733
+ }>;
497
734
  /**
498
735
  * Pubkey represented as base58 string in JSON and OpenAPI.
499
736
  *
@@ -510,6 +747,20 @@ declare const zRoundStateDto: z.ZodEnum<{
510
747
  settled: "settled";
511
748
  finished: "finished";
512
749
  }>;
750
+ /**
751
+ * Protocol configuration: token mints and fee rates.
752
+ */
753
+ declare const zSatrushConfigDto: z.ZodObject<{
754
+ address: z.ZodString;
755
+ btcMint: z.ZodString;
756
+ epochFeeBps: z.ZodInt;
757
+ oneBtcFeeBps: z.ZodInt;
758
+ protocolFeeBps: z.ZodInt;
759
+ satsVaultClaimFeeBps: z.ZodInt;
760
+ satsVaultRoundFeeBps: z.ZodInt;
761
+ strikeFeeBps: z.ZodInt;
762
+ usdMint: z.ZodString;
763
+ }, z.core.$strip>;
513
764
  /**
514
765
  * Unsigned 128-bit integer encoded as a decimal string.
515
766
  */
@@ -518,6 +769,45 @@ declare const zU128Dto: z.ZodString;
518
769
  * Unsigned 64-bit integer encoded as a decimal string.
519
770
  */
520
771
  declare const zU64Dto: z.ZodCoercedBigInt<unknown>;
772
+ /**
773
+ * A miner's accumulated protocol state, keyed by its authority wallet.
774
+ */
775
+ declare const zMinerDto: z.ZodObject<{
776
+ authority: z.ZodString;
777
+ currentStreakCount: z.ZodInt;
778
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
779
+ lastMinedRoundId: z.ZodInt;
780
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
781
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
782
+ }, z.core.$strip>;
783
+ /**
784
+ * A miner's deployment of USD onto a round's tiles.
785
+ */
786
+ declare const zPublicDeploymentDto: z.ZodObject<{
787
+ address: z.ZodString;
788
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
789
+ roundId: z.ZodInt;
790
+ selectionMask: z.ZodInt;
791
+ }, z.core.$strip>;
792
+ /**
793
+ * A user's profile: their miner account and currently-open deployments.
794
+ */
795
+ declare const zProfileDto: z.ZodObject<{
796
+ deployments: z.ZodArray<z.ZodObject<{
797
+ address: z.ZodString;
798
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
799
+ roundId: z.ZodInt;
800
+ selectionMask: z.ZodInt;
801
+ }, z.core.$strip>>;
802
+ miner: z.ZodObject<{
803
+ authority: z.ZodString;
804
+ currentStreakCount: z.ZodInt;
805
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
806
+ lastMinedRoundId: z.ZodInt;
807
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
808
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
809
+ }, z.core.$strip>;
810
+ }, z.core.$strip>;
521
811
  /**
522
812
  * Strike jackpot balances tracked on the board.
523
813
  */
@@ -630,6 +920,313 @@ declare const zBoardDto: z.ZodObject<{
630
920
  usdAmount: z.ZodCoercedBigInt<unknown>;
631
921
  }, z.core.$strip>;
632
922
  }, z.core.$strip>;
923
+ declare const zSnapshotDto: z.ZodObject<{
924
+ board: z.ZodObject<{
925
+ activeRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
926
+ address: z.ZodString;
927
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
928
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
929
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
930
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
931
+ id: z.ZodInt;
932
+ minersCount: z.ZodInt;
933
+ revealedMinersCount: z.ZodInt;
934
+ settledMinersCount: z.ZodInt;
935
+ state: z.ZodEnum<{
936
+ active: "active";
937
+ revealed: "revealed";
938
+ settled: "settled";
939
+ finished: "finished";
940
+ }>;
941
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
942
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
943
+ tileStakes: z.ZodArray<z.ZodObject<{
944
+ deployCount: z.ZodInt;
945
+ stake: z.ZodCoercedBigInt<unknown>;
946
+ }, z.core.$strip>>;
947
+ winnersCount: z.ZodInt;
948
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
949
+ }, z.core.$strip>]>>;
950
+ address: z.ZodString;
951
+ currentSlot: z.ZodCoercedBigInt<unknown>;
952
+ endSlot: z.ZodCoercedBigInt<unknown>;
953
+ previousRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
954
+ address: z.ZodString;
955
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
956
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
957
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
958
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
959
+ id: z.ZodInt;
960
+ minersCount: z.ZodInt;
961
+ revealedMinersCount: z.ZodInt;
962
+ settledMinersCount: z.ZodInt;
963
+ state: z.ZodEnum<{
964
+ active: "active";
965
+ revealed: "revealed";
966
+ settled: "settled";
967
+ finished: "finished";
968
+ }>;
969
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
970
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
971
+ tileStakes: z.ZodArray<z.ZodObject<{
972
+ deployCount: z.ZodInt;
973
+ stake: z.ZodCoercedBigInt<unknown>;
974
+ }, z.core.$strip>>;
975
+ winnersCount: z.ZodInt;
976
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
977
+ }, z.core.$strip>]>>;
978
+ roundDuration: z.ZodInt;
979
+ roundId: z.ZodInt;
980
+ startSlot: z.ZodCoercedBigInt<unknown>;
981
+ strike: z.ZodObject<{
982
+ btcAmount: z.ZodCoercedBigInt<unknown>;
983
+ lastTriggerRoundId: z.ZodInt;
984
+ pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
985
+ usdAmount: z.ZodCoercedBigInt<unknown>;
986
+ }, z.core.$strip>;
987
+ }, z.core.$strip>;
988
+ entity: z.ZodEnum<{
989
+ state_snapshot: "state_snapshot";
990
+ }>;
991
+ profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
992
+ deployments: z.ZodArray<z.ZodObject<{
993
+ address: z.ZodString;
994
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
995
+ roundId: z.ZodInt;
996
+ selectionMask: z.ZodInt;
997
+ }, z.core.$strip>>;
998
+ miner: z.ZodObject<{
999
+ authority: z.ZodString;
1000
+ currentStreakCount: z.ZodInt;
1001
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
1002
+ lastMinedRoundId: z.ZodInt;
1003
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
1004
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
1005
+ }, z.core.$strip>;
1006
+ }, z.core.$strip>]>>;
1007
+ }, z.core.$strip>;
1008
+ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
1009
+ board: z.ZodObject<{
1010
+ activeRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1011
+ address: z.ZodString;
1012
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1013
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1014
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1015
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1016
+ id: z.ZodInt;
1017
+ minersCount: z.ZodInt;
1018
+ revealedMinersCount: z.ZodInt;
1019
+ settledMinersCount: z.ZodInt;
1020
+ state: z.ZodEnum<{
1021
+ active: "active";
1022
+ revealed: "revealed";
1023
+ settled: "settled";
1024
+ finished: "finished";
1025
+ }>;
1026
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1027
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1028
+ tileStakes: z.ZodArray<z.ZodObject<{
1029
+ deployCount: z.ZodInt;
1030
+ stake: z.ZodCoercedBigInt<unknown>;
1031
+ }, z.core.$strip>>;
1032
+ winnersCount: z.ZodInt;
1033
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1034
+ }, z.core.$strip>]>>;
1035
+ address: z.ZodString;
1036
+ currentSlot: z.ZodCoercedBigInt<unknown>;
1037
+ endSlot: z.ZodCoercedBigInt<unknown>;
1038
+ previousRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1039
+ address: z.ZodString;
1040
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1041
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1042
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1043
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1044
+ id: z.ZodInt;
1045
+ minersCount: z.ZodInt;
1046
+ revealedMinersCount: z.ZodInt;
1047
+ settledMinersCount: z.ZodInt;
1048
+ state: z.ZodEnum<{
1049
+ active: "active";
1050
+ revealed: "revealed";
1051
+ settled: "settled";
1052
+ finished: "finished";
1053
+ }>;
1054
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1055
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1056
+ tileStakes: z.ZodArray<z.ZodObject<{
1057
+ deployCount: z.ZodInt;
1058
+ stake: z.ZodCoercedBigInt<unknown>;
1059
+ }, z.core.$strip>>;
1060
+ winnersCount: z.ZodInt;
1061
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1062
+ }, z.core.$strip>]>>;
1063
+ roundDuration: z.ZodInt;
1064
+ roundId: z.ZodInt;
1065
+ startSlot: z.ZodCoercedBigInt<unknown>;
1066
+ strike: z.ZodObject<{
1067
+ btcAmount: z.ZodCoercedBigInt<unknown>;
1068
+ lastTriggerRoundId: z.ZodInt;
1069
+ pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1070
+ usdAmount: z.ZodCoercedBigInt<unknown>;
1071
+ }, z.core.$strip>;
1072
+ }, z.core.$strip>;
1073
+ entity: z.ZodEnum<{
1074
+ state_snapshot: "state_snapshot";
1075
+ }>;
1076
+ profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1077
+ deployments: z.ZodArray<z.ZodObject<{
1078
+ address: z.ZodString;
1079
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1080
+ roundId: z.ZodInt;
1081
+ selectionMask: z.ZodInt;
1082
+ }, z.core.$strip>>;
1083
+ miner: z.ZodObject<{
1084
+ authority: z.ZodString;
1085
+ currentStreakCount: z.ZodInt;
1086
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
1087
+ lastMinedRoundId: z.ZodInt;
1088
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
1089
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
1090
+ }, z.core.$strip>;
1091
+ }, z.core.$strip>]>>;
1092
+ }, z.core.$strip>, z.ZodObject<{
1093
+ entity: z.ZodEnum<{
1094
+ state_snapshot: "state_snapshot";
1095
+ }>;
1096
+ }, z.core.$strip>>;
1097
+ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
1098
+ entity: z.ZodLiteral<"state_snapshot">;
1099
+ }, z.core.$strip>, z.ZodIntersection<z.ZodObject<{
1100
+ board: z.ZodObject<{
1101
+ activeRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1102
+ address: z.ZodString;
1103
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1104
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1105
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1106
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1107
+ id: z.ZodInt;
1108
+ minersCount: z.ZodInt;
1109
+ revealedMinersCount: z.ZodInt;
1110
+ settledMinersCount: z.ZodInt;
1111
+ state: z.ZodEnum<{
1112
+ active: "active";
1113
+ revealed: "revealed";
1114
+ settled: "settled";
1115
+ finished: "finished";
1116
+ }>;
1117
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1118
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1119
+ tileStakes: z.ZodArray<z.ZodObject<{
1120
+ deployCount: z.ZodInt;
1121
+ stake: z.ZodCoercedBigInt<unknown>;
1122
+ }, z.core.$strip>>;
1123
+ winnersCount: z.ZodInt;
1124
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1125
+ }, z.core.$strip>]>>;
1126
+ address: z.ZodString;
1127
+ currentSlot: z.ZodCoercedBigInt<unknown>;
1128
+ endSlot: z.ZodCoercedBigInt<unknown>;
1129
+ previousRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1130
+ address: z.ZodString;
1131
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1132
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1133
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1134
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1135
+ id: z.ZodInt;
1136
+ minersCount: z.ZodInt;
1137
+ revealedMinersCount: z.ZodInt;
1138
+ settledMinersCount: z.ZodInt;
1139
+ state: z.ZodEnum<{
1140
+ active: "active";
1141
+ revealed: "revealed";
1142
+ settled: "settled";
1143
+ finished: "finished";
1144
+ }>;
1145
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1146
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1147
+ tileStakes: z.ZodArray<z.ZodObject<{
1148
+ deployCount: z.ZodInt;
1149
+ stake: z.ZodCoercedBigInt<unknown>;
1150
+ }, z.core.$strip>>;
1151
+ winnersCount: z.ZodInt;
1152
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1153
+ }, z.core.$strip>]>>;
1154
+ roundDuration: z.ZodInt;
1155
+ roundId: z.ZodInt;
1156
+ startSlot: z.ZodCoercedBigInt<unknown>;
1157
+ strike: z.ZodObject<{
1158
+ btcAmount: z.ZodCoercedBigInt<unknown>;
1159
+ lastTriggerRoundId: z.ZodInt;
1160
+ pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1161
+ usdAmount: z.ZodCoercedBigInt<unknown>;
1162
+ }, z.core.$strip>;
1163
+ }, z.core.$strip>;
1164
+ entity: z.ZodEnum<{
1165
+ state_snapshot: "state_snapshot";
1166
+ }>;
1167
+ profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1168
+ deployments: z.ZodArray<z.ZodObject<{
1169
+ address: z.ZodString;
1170
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1171
+ roundId: z.ZodInt;
1172
+ selectionMask: z.ZodInt;
1173
+ }, z.core.$strip>>;
1174
+ miner: z.ZodObject<{
1175
+ authority: z.ZodString;
1176
+ currentStreakCount: z.ZodInt;
1177
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
1178
+ lastMinedRoundId: z.ZodInt;
1179
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
1180
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
1181
+ }, z.core.$strip>;
1182
+ }, z.core.$strip>]>>;
1183
+ }, z.core.$strip>, z.ZodObject<{
1184
+ entity: z.ZodEnum<{
1185
+ state_snapshot: "state_snapshot";
1186
+ }>;
1187
+ }, z.core.$strip>>>;
1188
+ declare const zUserProfileApiError400InvalidAddress: z.ZodObject<{
1189
+ code: z.ZodEnum<{
1190
+ invalid_address: "invalid_address";
1191
+ }>;
1192
+ }, z.core.$strip>;
1193
+ declare const zUserProfileApiError400Error: z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1194
+ code: z.ZodLiteral<"invalid_address">;
1195
+ }, z.core.$strip>, z.ZodObject<{
1196
+ code: z.ZodEnum<{
1197
+ invalid_address: "invalid_address";
1198
+ }>;
1199
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1200
+ code: z.ZodUnion<readonly [z.ZodLiteral<"invalid_body">, z.ZodLiteral<"invalid_path">, z.ZodLiteral<"invalid_query">]>;
1201
+ }, z.core.$strip>, z.ZodObject<{
1202
+ code: z.ZodEnum<{
1203
+ invalid_path: "invalid_path";
1204
+ invalid_query: "invalid_query";
1205
+ invalid_body: "invalid_body";
1206
+ }>;
1207
+ }, z.core.$strip>>]>;
1208
+ declare const zValidationErrorCodeErrorBody: z.ZodObject<{
1209
+ code: z.ZodEnum<{
1210
+ validation_failed: "validation_failed";
1211
+ }>;
1212
+ data: z.ZodOptional<z.ZodObject<{
1213
+ errors: z.ZodArray<z.ZodObject<{
1214
+ field: z.ZodString;
1215
+ message: z.ZodString;
1216
+ }, z.core.$strip>>;
1217
+ }, z.core.$strip>>;
1218
+ }, z.core.$strip>;
1219
+ declare const zValidationErrorCodeValidationDetailsErrorBody: z.ZodObject<{
1220
+ code: z.ZodEnum<{
1221
+ validation_failed: "validation_failed";
1222
+ }>;
1223
+ data: z.ZodOptional<z.ZodObject<{
1224
+ errors: z.ZodArray<z.ZodObject<{
1225
+ field: z.ZodString;
1226
+ message: z.ZodString;
1227
+ }, z.core.$strip>>;
1228
+ }, z.core.$strip>>;
1229
+ }, z.core.$strip>;
633
1230
  declare const zGetBoardData: z.ZodObject<{
634
1231
  body: z.ZodOptional<z.ZodNever>;
635
1232
  path: z.ZodOptional<z.ZodNever>;
@@ -702,11 +1299,158 @@ declare const zGetBoardResponse: z.ZodObject<{
702
1299
  }, z.core.$strip>;
703
1300
  }, z.core.$strip>;
704
1301
  type GetBoardResponseZodType = z.infer<typeof zGetBoardResponse>;
1302
+ declare const zGetConfigData: z.ZodObject<{
1303
+ body: z.ZodOptional<z.ZodNever>;
1304
+ path: z.ZodOptional<z.ZodNever>;
1305
+ query: z.ZodOptional<z.ZodNever>;
1306
+ }, z.core.$strip>;
1307
+ declare const zGetConfigResponse: z.ZodObject<{
1308
+ data: z.ZodObject<{
1309
+ address: z.ZodString;
1310
+ btcMint: z.ZodString;
1311
+ epochFeeBps: z.ZodInt;
1312
+ oneBtcFeeBps: z.ZodInt;
1313
+ protocolFeeBps: z.ZodInt;
1314
+ satsVaultClaimFeeBps: z.ZodInt;
1315
+ satsVaultRoundFeeBps: z.ZodInt;
1316
+ strikeFeeBps: z.ZodInt;
1317
+ usdMint: z.ZodString;
1318
+ }, z.core.$strip>;
1319
+ }, z.core.$strip>;
1320
+ type GetConfigResponseZodType = z.infer<typeof zGetConfigResponse>;
1321
+ declare const zSseData: z.ZodObject<{
1322
+ body: z.ZodOptional<z.ZodNever>;
1323
+ path: z.ZodOptional<z.ZodNever>;
1324
+ query: z.ZodOptional<z.ZodObject<{
1325
+ wallet: z.ZodOptional<z.ZodString>;
1326
+ }, z.core.$strip>>;
1327
+ }, z.core.$strip>;
1328
+ /**
1329
+ * Server-Sent Events stream
1330
+ */
1331
+ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
1332
+ entity: z.ZodLiteral<"state_snapshot">;
1333
+ }, z.core.$strip>, z.ZodIntersection<z.ZodObject<{
1334
+ board: z.ZodObject<{
1335
+ activeRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1336
+ address: z.ZodString;
1337
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1338
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1339
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1340
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1341
+ id: z.ZodInt;
1342
+ minersCount: z.ZodInt;
1343
+ revealedMinersCount: z.ZodInt;
1344
+ settledMinersCount: z.ZodInt;
1345
+ state: z.ZodEnum<{
1346
+ active: "active";
1347
+ revealed: "revealed";
1348
+ settled: "settled";
1349
+ finished: "finished";
1350
+ }>;
1351
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1352
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1353
+ tileStakes: z.ZodArray<z.ZodObject<{
1354
+ deployCount: z.ZodInt;
1355
+ stake: z.ZodCoercedBigInt<unknown>;
1356
+ }, z.core.$strip>>;
1357
+ winnersCount: z.ZodInt;
1358
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1359
+ }, z.core.$strip>]>>;
1360
+ address: z.ZodString;
1361
+ currentSlot: z.ZodCoercedBigInt<unknown>;
1362
+ endSlot: z.ZodCoercedBigInt<unknown>;
1363
+ previousRound: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1364
+ address: z.ZodString;
1365
+ deployedBtcAmount: z.ZodCoercedBigInt<unknown>;
1366
+ deployedPendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1367
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1368
+ deployedUsdOnWinningTileAmount: z.ZodCoercedBigInt<unknown>;
1369
+ id: z.ZodInt;
1370
+ minersCount: z.ZodInt;
1371
+ revealedMinersCount: z.ZodInt;
1372
+ settledMinersCount: z.ZodInt;
1373
+ state: z.ZodEnum<{
1374
+ active: "active";
1375
+ revealed: "revealed";
1376
+ settled: "settled";
1377
+ finished: "finished";
1378
+ }>;
1379
+ strikeBonusBtc: z.ZodCoercedBigInt<unknown>;
1380
+ strikeBonusUsd: z.ZodCoercedBigInt<unknown>;
1381
+ tileStakes: z.ZodArray<z.ZodObject<{
1382
+ deployCount: z.ZodInt;
1383
+ stake: z.ZodCoercedBigInt<unknown>;
1384
+ }, z.core.$strip>>;
1385
+ winnersCount: z.ZodInt;
1386
+ winningTile: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
1387
+ }, z.core.$strip>]>>;
1388
+ roundDuration: z.ZodInt;
1389
+ roundId: z.ZodInt;
1390
+ startSlot: z.ZodCoercedBigInt<unknown>;
1391
+ strike: z.ZodObject<{
1392
+ btcAmount: z.ZodCoercedBigInt<unknown>;
1393
+ lastTriggerRoundId: z.ZodInt;
1394
+ pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
1395
+ usdAmount: z.ZodCoercedBigInt<unknown>;
1396
+ }, z.core.$strip>;
1397
+ }, z.core.$strip>;
1398
+ entity: z.ZodEnum<{
1399
+ state_snapshot: "state_snapshot";
1400
+ }>;
1401
+ profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
1402
+ deployments: z.ZodArray<z.ZodObject<{
1403
+ address: z.ZodString;
1404
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1405
+ roundId: z.ZodInt;
1406
+ selectionMask: z.ZodInt;
1407
+ }, z.core.$strip>>;
1408
+ miner: z.ZodObject<{
1409
+ authority: z.ZodString;
1410
+ currentStreakCount: z.ZodInt;
1411
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
1412
+ lastMinedRoundId: z.ZodInt;
1413
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
1414
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
1415
+ }, z.core.$strip>;
1416
+ }, z.core.$strip>]>>;
1417
+ }, z.core.$strip>, z.ZodObject<{
1418
+ entity: z.ZodEnum<{
1419
+ state_snapshot: "state_snapshot";
1420
+ }>;
1421
+ }, z.core.$strip>>>;
1422
+ type SseResponseZodType = z.infer<typeof zSseResponse2>;
1423
+ declare const zGetUserProfileData: z.ZodObject<{
1424
+ body: z.ZodOptional<z.ZodNever>;
1425
+ path: z.ZodObject<{
1426
+ address: z.ZodString;
1427
+ }, z.core.$strip>;
1428
+ query: z.ZodOptional<z.ZodNever>;
1429
+ }, z.core.$strip>;
1430
+ declare const zGetUserProfileResponse: z.ZodObject<{
1431
+ data: z.ZodObject<{
1432
+ deployments: z.ZodArray<z.ZodObject<{
1433
+ address: z.ZodString;
1434
+ deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
1435
+ roundId: z.ZodInt;
1436
+ selectionMask: z.ZodInt;
1437
+ }, z.core.$strip>>;
1438
+ miner: z.ZodObject<{
1439
+ authority: z.ZodString;
1440
+ currentStreakCount: z.ZodInt;
1441
+ hashrateAmount: z.ZodCoercedBigInt<unknown>;
1442
+ lastMinedRoundId: z.ZodInt;
1443
+ unclaimedBtcShares: z.ZodCoercedBigInt<unknown>;
1444
+ unclaimedUsdAmount: z.ZodCoercedBigInt<unknown>;
1445
+ }, z.core.$strip>;
1446
+ }, z.core.$strip>;
1447
+ }, z.core.$strip>;
1448
+ type GetUserProfileResponseZodType = z.infer<typeof zGetUserProfileResponse>;
705
1449
 
706
- type HasOnlyDataKey<T> = T extends object ? (Exclude<keyof T, "data"> extends never ? true : false) : false;
1450
+ type HasOnlyDataKey<T> = T extends object ? Exclude<keyof T, 'data'> extends never ? true : false : false;
707
1451
  type UnwrapData<T> = T extends {
708
1452
  data: infer U;
709
- } ? (HasOnlyDataKey<T> extends true ? U : T) : T;
1453
+ } ? HasOnlyDataKey<T> extends true ? U : T : T;
710
1454
  type ExtractData<T> = T extends {
711
1455
  data: infer D;
712
1456
  error?: undefined;
@@ -725,4 +1469,4 @@ declare class SatrushBackendSdkError<TCause = unknown> extends Error {
725
1469
  declare const satrushSdkErrorInterceptor: (error: unknown, response?: Response) => SatrushBackendSdkError<unknown>;
726
1470
  declare const isSatrushSdkError: <TCause = unknown>(error: unknown) => error is SatrushBackendSdkError<TCause>;
727
1471
 
728
- export { type BoardDto, type ClientOptions, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponseZodType, type GetBoardResponses, type I128Dto, type I64Dto, type InternalErrorCodeErrorBody, type Options, type PubkeyDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type ServerSentEventsOptions, type ServerSentEventsResult, type StreamEvent, type StrikeJackpotDto, type TileStakeDto, type U128Dto, type U64Dto, createClient, createSseClient, isSatrushSdkError, satrushSdkErrorInterceptor, unwrap, zBoardDto, zGetBoardData, zGetBoardResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zPubkeyDto, zRoundDto, zRoundStateDto, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto };
1472
+ export { type BadRequestErrorCodeErrorBody, type BoardDto, type ClientOptions, type FieldError, type GetBoardData, type GetBoardError, type GetBoardErrors, type GetBoardResponse, type GetBoardResponseZodType, type GetBoardResponses, type GetConfigData, type GetConfigError, type GetConfigErrors, type GetConfigResponse, type GetConfigResponseZodType, type GetConfigResponses, type GetUserProfileData, type GetUserProfileError, type GetUserProfileErrors, type GetUserProfileResponse, type GetUserProfileResponseZodType, type GetUserProfileResponses, type I128Dto, type I64Dto, type InternalErrorCodeErrorBody, type MinerDto, NotificationEntity, type Options, type ProfileDto, type PubkeyDto, type PublicDeploymentDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type SatrushConfigDto, type ServerSentEventsOptions, type ServerSentEventsResult, type SnapshotDto, type SseData, type SseError, type SseErrors, type SseResponse, type SseResponse2, type SseResponseSnapshot, type SseResponseZodType, type SseResponses, type StreamEvent, type StrikeJackpotDto, type TileStakeDto, type U128Dto, type U64Dto, type UserProfileApiError400Error, type UserProfileApiError400InvalidAddress, type ValidationErrorCodeErrorBody, type ValidationErrorCodeValidationDetailsErrorBody, createClient, createSseClient, isSatrushSdkError, satrushSdkErrorInterceptor, unwrap, zBadRequestErrorCodeErrorBody, zBoardDto, zFieldError, zGetBoardData, zGetBoardResponse, zGetConfigData, zGetConfigResponse, zGetUserProfileData, zGetUserProfileResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zMinerDto, zNotificationEntity, zProfileDto, zPubkeyDto, zPublicDeploymentDto, zRoundDto, zRoundStateDto, zSatrushConfigDto, zSnapshotDto, zSseData, zSseResponse, zSseResponse2, zSseResponseSnapshot, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto, zUserProfileApiError400Error, zUserProfileApiError400InvalidAddress, zValidationErrorCodeErrorBody, zValidationErrorCodeValidationDetailsErrorBody };