@satrush/api 0.1.4 → 0.1.5
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 +36 -0
- package/dist/index.d.cts +142 -5
- package/dist/index.d.ts +142 -5
- package/dist/index.js +33 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/index.ts
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
|
+
AutomationStrategyDto: () => AutomationStrategyDto,
|
|
32
33
|
EpochStateDto: () => EpochStateDto,
|
|
33
34
|
NotificationEntity: () => NotificationEntity,
|
|
34
35
|
OneBtcStateDto: () => OneBtcStateDto,
|
|
@@ -40,6 +41,7 @@ __export(index_exports, {
|
|
|
40
41
|
isSatrushSdkError: () => isSatrushSdkError,
|
|
41
42
|
satrushSdkErrorInterceptor: () => satrushSdkErrorInterceptor,
|
|
42
43
|
unwrap: () => unwrap,
|
|
44
|
+
zAutomationStrategyDto: () => zAutomationStrategyDto,
|
|
43
45
|
zBadRequestErrorCodeErrorBody: () => zBadRequestErrorCodeErrorBody,
|
|
44
46
|
zBoardDto: () => zBoardDto,
|
|
45
47
|
zEpochStateDto: () => zEpochStateDto,
|
|
@@ -66,6 +68,7 @@ __export(index_exports, {
|
|
|
66
68
|
zPricesDto: () => zPricesDto,
|
|
67
69
|
zProfileDto: () => zProfileDto,
|
|
68
70
|
zPubkeyDto: () => zPubkeyDto,
|
|
71
|
+
zPublicAutomationDto: () => zPublicAutomationDto,
|
|
69
72
|
zPublicDeploymentDto: () => zPublicDeploymentDto,
|
|
70
73
|
zRoundDto: () => zRoundDto,
|
|
71
74
|
zRoundStateDto: () => zRoundStateDto,
|
|
@@ -1133,6 +1136,11 @@ var getBoardResponseTransformer = async (data) => {
|
|
|
1133
1136
|
data.data = boardDtoSchemaResponseTransformer(data.data);
|
|
1134
1137
|
return data;
|
|
1135
1138
|
};
|
|
1139
|
+
var publicAutomationDtoSchemaResponseTransformer = (data) => {
|
|
1140
|
+
data.perRoundUsdAmount = u64DtoSchemaResponseTransformer(data.perRoundUsdAmount);
|
|
1141
|
+
data.remainingUsdAmount = u64DtoSchemaResponseTransformer(data.remainingUsdAmount);
|
|
1142
|
+
return data;
|
|
1143
|
+
};
|
|
1136
1144
|
var publicDeploymentDtoSchemaResponseTransformer = (data) => {
|
|
1137
1145
|
data.deployedUsdAmount = u64DtoSchemaResponseTransformer(data.deployedUsdAmount);
|
|
1138
1146
|
return data;
|
|
@@ -1153,6 +1161,9 @@ var oneBtcVaultEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
1153
1161
|
return data;
|
|
1154
1162
|
};
|
|
1155
1163
|
var profileDtoSchemaResponseTransformer = (data) => {
|
|
1164
|
+
if (data.automation) {
|
|
1165
|
+
data.automation = publicAutomationDtoSchemaResponseTransformer(data.automation);
|
|
1166
|
+
}
|
|
1156
1167
|
data.deployments = data.deployments.map((item) => publicDeploymentDtoSchemaResponseTransformer(item));
|
|
1157
1168
|
data.epochVaultEntries = data.epochVaultEntries.map((item) => epochVaultEntryDtoSchemaResponseTransformer(item));
|
|
1158
1169
|
data.miner = minerDtoSchemaResponseTransformer(data.miner);
|
|
@@ -1185,6 +1196,11 @@ var getUserProfileResponseTransformer = async (data) => {
|
|
|
1185
1196
|
|
|
1186
1197
|
// src/generated/zod.gen.ts
|
|
1187
1198
|
var z = __toESM(require("zod"), 1);
|
|
1199
|
+
var zAutomationStrategyDto = z.enum([
|
|
1200
|
+
"static",
|
|
1201
|
+
"random",
|
|
1202
|
+
"discretionary"
|
|
1203
|
+
]);
|
|
1188
1204
|
var zBadRequestErrorCodeErrorBody = z.object({
|
|
1189
1205
|
code: z.enum([
|
|
1190
1206
|
"invalid_path",
|
|
@@ -1327,6 +1343,14 @@ var zOneBtcVaultDto = z.object({
|
|
|
1327
1343
|
pendingUsdAmount: zU64Dto,
|
|
1328
1344
|
reservedBtcAmount: zU64Dto
|
|
1329
1345
|
});
|
|
1346
|
+
var zPublicAutomationDto = z.object({
|
|
1347
|
+
address: zPubkeyDto,
|
|
1348
|
+
perRoundUsdAmount: zU64Dto,
|
|
1349
|
+
reload: z.boolean(),
|
|
1350
|
+
remainingUsdAmount: zU64Dto,
|
|
1351
|
+
selectionMask: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1352
|
+
strategy: zAutomationStrategyDto
|
|
1353
|
+
});
|
|
1330
1354
|
var zPublicDeploymentDto = z.object({
|
|
1331
1355
|
address: zPubkeyDto,
|
|
1332
1356
|
deployedUsdAmount: zU64Dto,
|
|
@@ -1334,6 +1358,10 @@ var zPublicDeploymentDto = z.object({
|
|
|
1334
1358
|
selectionMask: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1335
1359
|
});
|
|
1336
1360
|
var zProfileDto = z.object({
|
|
1361
|
+
automation: z.optional(z.union([
|
|
1362
|
+
z.null(),
|
|
1363
|
+
zPublicAutomationDto
|
|
1364
|
+
])),
|
|
1337
1365
|
deployments: z.array(zPublicDeploymentDto),
|
|
1338
1366
|
epochVaultEntries: z.array(zEpochVaultEntryDto),
|
|
1339
1367
|
miner: zMinerDto,
|
|
@@ -1552,6 +1580,11 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
|
|
|
1552
1580
|
};
|
|
1553
1581
|
|
|
1554
1582
|
// src/generated/types.gen.ts
|
|
1583
|
+
var AutomationStrategyDto = {
|
|
1584
|
+
STATIC: "static",
|
|
1585
|
+
RANDOM: "random",
|
|
1586
|
+
DISCRETIONARY: "discretionary"
|
|
1587
|
+
};
|
|
1555
1588
|
var EpochStateDto = {
|
|
1556
1589
|
OPEN: "open",
|
|
1557
1590
|
SETTLING: "settling",
|
|
@@ -1617,6 +1650,7 @@ async function unwrap(promise) {
|
|
|
1617
1650
|
}
|
|
1618
1651
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1619
1652
|
0 && (module.exports = {
|
|
1653
|
+
AutomationStrategyDto,
|
|
1620
1654
|
EpochStateDto,
|
|
1621
1655
|
NotificationEntity,
|
|
1622
1656
|
OneBtcStateDto,
|
|
@@ -1628,6 +1662,7 @@ async function unwrap(promise) {
|
|
|
1628
1662
|
isSatrushSdkError,
|
|
1629
1663
|
satrushSdkErrorInterceptor,
|
|
1630
1664
|
unwrap,
|
|
1665
|
+
zAutomationStrategyDto,
|
|
1631
1666
|
zBadRequestErrorCodeErrorBody,
|
|
1632
1667
|
zBoardDto,
|
|
1633
1668
|
zEpochStateDto,
|
|
@@ -1654,6 +1689,7 @@ async function unwrap(promise) {
|
|
|
1654
1689
|
zPricesDto,
|
|
1655
1690
|
zProfileDto,
|
|
1656
1691
|
zPubkeyDto,
|
|
1692
|
+
zPublicAutomationDto,
|
|
1657
1693
|
zPublicDeploymentDto,
|
|
1658
1694
|
zRoundDto,
|
|
1659
1695
|
zRoundStateDto,
|
package/dist/index.d.cts
CHANGED
|
@@ -313,6 +313,18 @@ declare const createClient: (config?: Config) => Client;
|
|
|
313
313
|
type ClientOptions = {
|
|
314
314
|
baseUrl: `${string}://${string}/api` | (string & {});
|
|
315
315
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Tile-selection strategy of an automation.
|
|
318
|
+
*/
|
|
319
|
+
declare const AutomationStrategyDto: {
|
|
320
|
+
readonly STATIC: "static";
|
|
321
|
+
readonly RANDOM: "random";
|
|
322
|
+
readonly DISCRETIONARY: "discretionary";
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Tile-selection strategy of an automation.
|
|
326
|
+
*/
|
|
327
|
+
type AutomationStrategyDto = typeof AutomationStrategyDto[keyof typeof AutomationStrategyDto];
|
|
316
328
|
type BadRequestErrorCodeErrorBody = {
|
|
317
329
|
code: 'invalid_path' | 'invalid_query' | 'invalid_body';
|
|
318
330
|
};
|
|
@@ -594,10 +606,11 @@ type PricesDto = {
|
|
|
594
606
|
sat: number;
|
|
595
607
|
};
|
|
596
608
|
/**
|
|
597
|
-
* A user's profile: their miner account, currently-open
|
|
598
|
-
* entries.
|
|
609
|
+
* A user's profile: their miner account, active automation, currently-open
|
|
610
|
+
* deployments and vault entries.
|
|
599
611
|
*/
|
|
600
612
|
type ProfileDto = {
|
|
613
|
+
automation?: null | PublicAutomationDto;
|
|
601
614
|
/**
|
|
602
615
|
* The authority's open public deployments.
|
|
603
616
|
*/
|
|
@@ -619,6 +632,34 @@ type ProfileDto = {
|
|
|
619
632
|
* - OpenAPI: `type: string`, pattern for base58, optional format
|
|
620
633
|
*/
|
|
621
634
|
type PubkeyDto = string;
|
|
635
|
+
/**
|
|
636
|
+
* A miner's public automation: the platform's crank plays one deployment per
|
|
637
|
+
* round on their behalf until the escrow can no longer cover a round.
|
|
638
|
+
*/
|
|
639
|
+
type PublicAutomationDto = {
|
|
640
|
+
address: PubkeyDto;
|
|
641
|
+
/**
|
|
642
|
+
* Gross deploy size per round; fee legs are charged on top of it.
|
|
643
|
+
*/
|
|
644
|
+
perRoundUsdAmount: U64Dto;
|
|
645
|
+
/**
|
|
646
|
+
* Whether settled USD winnings reload the remaining amount.
|
|
647
|
+
*/
|
|
648
|
+
reload: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Escrowed funds still available.
|
|
651
|
+
*/
|
|
652
|
+
remainingUsdAmount: U64Dto;
|
|
653
|
+
/**
|
|
654
|
+
* Static: the mask used every round. Random: seeds the tile count.
|
|
655
|
+
* Discretionary: 0.
|
|
656
|
+
*/
|
|
657
|
+
selectionMask: number;
|
|
658
|
+
/**
|
|
659
|
+
* Tile-selection strategy.
|
|
660
|
+
*/
|
|
661
|
+
strategy: AutomationStrategyDto;
|
|
662
|
+
};
|
|
622
663
|
/**
|
|
623
664
|
* A miner's deployment of USD onto a round's tiles.
|
|
624
665
|
*/
|
|
@@ -926,6 +967,14 @@ declare class SatrushBackendSdk extends HeyApiClient {
|
|
|
926
967
|
}, options?: Options<never, ThrowOnError>): RequestResult<GetUserProfileResponses, GetUserProfileErrors, ThrowOnError, "fields">;
|
|
927
968
|
}
|
|
928
969
|
|
|
970
|
+
/**
|
|
971
|
+
* Tile-selection strategy of an automation.
|
|
972
|
+
*/
|
|
973
|
+
declare const zAutomationStrategyDto: z.ZodEnum<{
|
|
974
|
+
static: "static";
|
|
975
|
+
random: "random";
|
|
976
|
+
discretionary: "discretionary";
|
|
977
|
+
}>;
|
|
929
978
|
declare const zBadRequestErrorCodeErrorBody: z.ZodObject<{
|
|
930
979
|
code: z.ZodEnum<{
|
|
931
980
|
invalid_path: "invalid_path";
|
|
@@ -1150,6 +1199,22 @@ declare const zOneBtcVaultDto: z.ZodObject<{
|
|
|
1150
1199
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1151
1200
|
reservedBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
1152
1201
|
}, z.core.$strip>;
|
|
1202
|
+
/**
|
|
1203
|
+
* A miner's public automation: the platform's crank plays one deployment per
|
|
1204
|
+
* round on their behalf until the escrow can no longer cover a round.
|
|
1205
|
+
*/
|
|
1206
|
+
declare const zPublicAutomationDto: z.ZodObject<{
|
|
1207
|
+
address: z.ZodString;
|
|
1208
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1209
|
+
reload: z.ZodBoolean;
|
|
1210
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1211
|
+
selectionMask: z.ZodInt;
|
|
1212
|
+
strategy: z.ZodEnum<{
|
|
1213
|
+
static: "static";
|
|
1214
|
+
random: "random";
|
|
1215
|
+
discretionary: "discretionary";
|
|
1216
|
+
}>;
|
|
1217
|
+
}, z.core.$strip>;
|
|
1153
1218
|
/**
|
|
1154
1219
|
* A miner's deployment of USD onto a round's tiles.
|
|
1155
1220
|
*/
|
|
@@ -1160,10 +1225,22 @@ declare const zPublicDeploymentDto: z.ZodObject<{
|
|
|
1160
1225
|
selectionMask: z.ZodInt;
|
|
1161
1226
|
}, z.core.$strip>;
|
|
1162
1227
|
/**
|
|
1163
|
-
* A user's profile: their miner account, currently-open
|
|
1164
|
-
* entries.
|
|
1228
|
+
* A user's profile: their miner account, active automation, currently-open
|
|
1229
|
+
* deployments and vault entries.
|
|
1165
1230
|
*/
|
|
1166
1231
|
declare const zProfileDto: z.ZodObject<{
|
|
1232
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1233
|
+
address: z.ZodString;
|
|
1234
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1235
|
+
reload: z.ZodBoolean;
|
|
1236
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1237
|
+
selectionMask: z.ZodInt;
|
|
1238
|
+
strategy: z.ZodEnum<{
|
|
1239
|
+
static: "static";
|
|
1240
|
+
random: "random";
|
|
1241
|
+
discretionary: "discretionary";
|
|
1242
|
+
}>;
|
|
1243
|
+
}, z.core.$strip>]>>;
|
|
1167
1244
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1168
1245
|
address: z.ZodString;
|
|
1169
1246
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1502,6 +1579,18 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
1502
1579
|
state_snapshot: "state_snapshot";
|
|
1503
1580
|
}>;
|
|
1504
1581
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1582
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1583
|
+
address: z.ZodString;
|
|
1584
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1585
|
+
reload: z.ZodBoolean;
|
|
1586
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1587
|
+
selectionMask: z.ZodInt;
|
|
1588
|
+
strategy: z.ZodEnum<{
|
|
1589
|
+
static: "static";
|
|
1590
|
+
random: "random";
|
|
1591
|
+
discretionary: "discretionary";
|
|
1592
|
+
}>;
|
|
1593
|
+
}, z.core.$strip>]>>;
|
|
1505
1594
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1506
1595
|
address: z.ZodString;
|
|
1507
1596
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1660,6 +1749,18 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
1660
1749
|
state_snapshot: "state_snapshot";
|
|
1661
1750
|
}>;
|
|
1662
1751
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1752
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1753
|
+
address: z.ZodString;
|
|
1754
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1755
|
+
reload: z.ZodBoolean;
|
|
1756
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1757
|
+
selectionMask: z.ZodInt;
|
|
1758
|
+
strategy: z.ZodEnum<{
|
|
1759
|
+
static: "static";
|
|
1760
|
+
random: "random";
|
|
1761
|
+
discretionary: "discretionary";
|
|
1762
|
+
}>;
|
|
1763
|
+
}, z.core.$strip>]>>;
|
|
1663
1764
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1664
1765
|
address: z.ZodString;
|
|
1665
1766
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1824,6 +1925,18 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
1824
1925
|
state_snapshot: "state_snapshot";
|
|
1825
1926
|
}>;
|
|
1826
1927
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1928
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1929
|
+
address: z.ZodString;
|
|
1930
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1931
|
+
reload: z.ZodBoolean;
|
|
1932
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1933
|
+
selectionMask: z.ZodInt;
|
|
1934
|
+
strategy: z.ZodEnum<{
|
|
1935
|
+
static: "static";
|
|
1936
|
+
random: "random";
|
|
1937
|
+
discretionary: "discretionary";
|
|
1938
|
+
}>;
|
|
1939
|
+
}, z.core.$strip>]>>;
|
|
1827
1940
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1828
1941
|
address: z.ZodString;
|
|
1829
1942
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2192,6 +2305,18 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
2192
2305
|
state_snapshot: "state_snapshot";
|
|
2193
2306
|
}>;
|
|
2194
2307
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2308
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2309
|
+
address: z.ZodString;
|
|
2310
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2311
|
+
reload: z.ZodBoolean;
|
|
2312
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2313
|
+
selectionMask: z.ZodInt;
|
|
2314
|
+
strategy: z.ZodEnum<{
|
|
2315
|
+
static: "static";
|
|
2316
|
+
random: "random";
|
|
2317
|
+
discretionary: "discretionary";
|
|
2318
|
+
}>;
|
|
2319
|
+
}, z.core.$strip>]>>;
|
|
2195
2320
|
deployments: z.ZodArray<z.ZodObject<{
|
|
2196
2321
|
address: z.ZodString;
|
|
2197
2322
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2234,6 +2359,18 @@ declare const zGetUserProfileData: z.ZodObject<{
|
|
|
2234
2359
|
}, z.core.$strip>;
|
|
2235
2360
|
declare const zGetUserProfileResponse: z.ZodObject<{
|
|
2236
2361
|
data: z.ZodObject<{
|
|
2362
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2363
|
+
address: z.ZodString;
|
|
2364
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2365
|
+
reload: z.ZodBoolean;
|
|
2366
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2367
|
+
selectionMask: z.ZodInt;
|
|
2368
|
+
strategy: z.ZodEnum<{
|
|
2369
|
+
static: "static";
|
|
2370
|
+
random: "random";
|
|
2371
|
+
discretionary: "discretionary";
|
|
2372
|
+
}>;
|
|
2373
|
+
}, z.core.$strip>]>>;
|
|
2237
2374
|
deployments: z.ZodArray<z.ZodObject<{
|
|
2238
2375
|
address: z.ZodString;
|
|
2239
2376
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2286,4 +2423,4 @@ declare class SatrushBackendSdkError<TCause = unknown> extends Error {
|
|
|
2286
2423
|
declare const satrushSdkErrorInterceptor: (error: unknown, response?: Response) => SatrushBackendSdkError<unknown>;
|
|
2287
2424
|
declare const isSatrushSdkError: <TCause = unknown>(error: unknown) => error is SatrushBackendSdkError<TCause>;
|
|
2288
2425
|
|
|
2289
|
-
export { type BadRequestErrorCodeErrorBody, type BoardDto, type ClientOptions, EpochStateDto, type EpochVaultDto, type EpochVaultEntryDto, type EpochVaultIterationDto, type EpochWinnerDto, 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, OneBtcStateDto, type OneBtcVaultDto, type OneBtcVaultEntryDto, type OneBtcVaultIterationDto, type Options, type PricesDto, type ProfileDto, type PubkeyDto, type PublicDeploymentDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type SatrushConfigDto, type SatsVaultDto, 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, zEpochStateDto, zEpochVaultDto, zEpochVaultEntryDto, zEpochVaultIterationDto, zEpochWinnerDto, zFieldError, zGetBoardData, zGetBoardResponse, zGetConfigData, zGetConfigResponse, zGetUserProfileData, zGetUserProfileResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zMinerDto, zNotificationEntity, zOneBtcStateDto, zOneBtcVaultDto, zOneBtcVaultEntryDto, zOneBtcVaultIterationDto, zPricesDto, zProfileDto, zPubkeyDto, zPublicDeploymentDto, zRoundDto, zRoundStateDto, zSatrushConfigDto, zSatsVaultDto, zSnapshotDto, zSseData, zSseResponse, zSseResponse2, zSseResponseSnapshot, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto, zUserProfileApiError400Error, zUserProfileApiError400InvalidAddress, zValidationErrorCodeErrorBody, zValidationErrorCodeValidationDetailsErrorBody };
|
|
2426
|
+
export { AutomationStrategyDto, type BadRequestErrorCodeErrorBody, type BoardDto, type ClientOptions, EpochStateDto, type EpochVaultDto, type EpochVaultEntryDto, type EpochVaultIterationDto, type EpochWinnerDto, 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, OneBtcStateDto, type OneBtcVaultDto, type OneBtcVaultEntryDto, type OneBtcVaultIterationDto, type Options, type PricesDto, type ProfileDto, type PubkeyDto, type PublicAutomationDto, type PublicDeploymentDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type SatrushConfigDto, type SatsVaultDto, 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, zAutomationStrategyDto, zBadRequestErrorCodeErrorBody, zBoardDto, zEpochStateDto, zEpochVaultDto, zEpochVaultEntryDto, zEpochVaultIterationDto, zEpochWinnerDto, zFieldError, zGetBoardData, zGetBoardResponse, zGetConfigData, zGetConfigResponse, zGetUserProfileData, zGetUserProfileResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zMinerDto, zNotificationEntity, zOneBtcStateDto, zOneBtcVaultDto, zOneBtcVaultEntryDto, zOneBtcVaultIterationDto, zPricesDto, zProfileDto, zPubkeyDto, zPublicAutomationDto, zPublicDeploymentDto, zRoundDto, zRoundStateDto, zSatrushConfigDto, zSatsVaultDto, zSnapshotDto, zSseData, zSseResponse, zSseResponse2, zSseResponseSnapshot, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto, zUserProfileApiError400Error, zUserProfileApiError400InvalidAddress, zValidationErrorCodeErrorBody, zValidationErrorCodeValidationDetailsErrorBody };
|
package/dist/index.d.ts
CHANGED
|
@@ -313,6 +313,18 @@ declare const createClient: (config?: Config) => Client;
|
|
|
313
313
|
type ClientOptions = {
|
|
314
314
|
baseUrl: `${string}://${string}/api` | (string & {});
|
|
315
315
|
};
|
|
316
|
+
/**
|
|
317
|
+
* Tile-selection strategy of an automation.
|
|
318
|
+
*/
|
|
319
|
+
declare const AutomationStrategyDto: {
|
|
320
|
+
readonly STATIC: "static";
|
|
321
|
+
readonly RANDOM: "random";
|
|
322
|
+
readonly DISCRETIONARY: "discretionary";
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Tile-selection strategy of an automation.
|
|
326
|
+
*/
|
|
327
|
+
type AutomationStrategyDto = typeof AutomationStrategyDto[keyof typeof AutomationStrategyDto];
|
|
316
328
|
type BadRequestErrorCodeErrorBody = {
|
|
317
329
|
code: 'invalid_path' | 'invalid_query' | 'invalid_body';
|
|
318
330
|
};
|
|
@@ -594,10 +606,11 @@ type PricesDto = {
|
|
|
594
606
|
sat: number;
|
|
595
607
|
};
|
|
596
608
|
/**
|
|
597
|
-
* A user's profile: their miner account, currently-open
|
|
598
|
-
* entries.
|
|
609
|
+
* A user's profile: their miner account, active automation, currently-open
|
|
610
|
+
* deployments and vault entries.
|
|
599
611
|
*/
|
|
600
612
|
type ProfileDto = {
|
|
613
|
+
automation?: null | PublicAutomationDto;
|
|
601
614
|
/**
|
|
602
615
|
* The authority's open public deployments.
|
|
603
616
|
*/
|
|
@@ -619,6 +632,34 @@ type ProfileDto = {
|
|
|
619
632
|
* - OpenAPI: `type: string`, pattern for base58, optional format
|
|
620
633
|
*/
|
|
621
634
|
type PubkeyDto = string;
|
|
635
|
+
/**
|
|
636
|
+
* A miner's public automation: the platform's crank plays one deployment per
|
|
637
|
+
* round on their behalf until the escrow can no longer cover a round.
|
|
638
|
+
*/
|
|
639
|
+
type PublicAutomationDto = {
|
|
640
|
+
address: PubkeyDto;
|
|
641
|
+
/**
|
|
642
|
+
* Gross deploy size per round; fee legs are charged on top of it.
|
|
643
|
+
*/
|
|
644
|
+
perRoundUsdAmount: U64Dto;
|
|
645
|
+
/**
|
|
646
|
+
* Whether settled USD winnings reload the remaining amount.
|
|
647
|
+
*/
|
|
648
|
+
reload: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Escrowed funds still available.
|
|
651
|
+
*/
|
|
652
|
+
remainingUsdAmount: U64Dto;
|
|
653
|
+
/**
|
|
654
|
+
* Static: the mask used every round. Random: seeds the tile count.
|
|
655
|
+
* Discretionary: 0.
|
|
656
|
+
*/
|
|
657
|
+
selectionMask: number;
|
|
658
|
+
/**
|
|
659
|
+
* Tile-selection strategy.
|
|
660
|
+
*/
|
|
661
|
+
strategy: AutomationStrategyDto;
|
|
662
|
+
};
|
|
622
663
|
/**
|
|
623
664
|
* A miner's deployment of USD onto a round's tiles.
|
|
624
665
|
*/
|
|
@@ -926,6 +967,14 @@ declare class SatrushBackendSdk extends HeyApiClient {
|
|
|
926
967
|
}, options?: Options<never, ThrowOnError>): RequestResult<GetUserProfileResponses, GetUserProfileErrors, ThrowOnError, "fields">;
|
|
927
968
|
}
|
|
928
969
|
|
|
970
|
+
/**
|
|
971
|
+
* Tile-selection strategy of an automation.
|
|
972
|
+
*/
|
|
973
|
+
declare const zAutomationStrategyDto: z.ZodEnum<{
|
|
974
|
+
static: "static";
|
|
975
|
+
random: "random";
|
|
976
|
+
discretionary: "discretionary";
|
|
977
|
+
}>;
|
|
929
978
|
declare const zBadRequestErrorCodeErrorBody: z.ZodObject<{
|
|
930
979
|
code: z.ZodEnum<{
|
|
931
980
|
invalid_path: "invalid_path";
|
|
@@ -1150,6 +1199,22 @@ declare const zOneBtcVaultDto: z.ZodObject<{
|
|
|
1150
1199
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1151
1200
|
reservedBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
1152
1201
|
}, z.core.$strip>;
|
|
1202
|
+
/**
|
|
1203
|
+
* A miner's public automation: the platform's crank plays one deployment per
|
|
1204
|
+
* round on their behalf until the escrow can no longer cover a round.
|
|
1205
|
+
*/
|
|
1206
|
+
declare const zPublicAutomationDto: z.ZodObject<{
|
|
1207
|
+
address: z.ZodString;
|
|
1208
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1209
|
+
reload: z.ZodBoolean;
|
|
1210
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1211
|
+
selectionMask: z.ZodInt;
|
|
1212
|
+
strategy: z.ZodEnum<{
|
|
1213
|
+
static: "static";
|
|
1214
|
+
random: "random";
|
|
1215
|
+
discretionary: "discretionary";
|
|
1216
|
+
}>;
|
|
1217
|
+
}, z.core.$strip>;
|
|
1153
1218
|
/**
|
|
1154
1219
|
* A miner's deployment of USD onto a round's tiles.
|
|
1155
1220
|
*/
|
|
@@ -1160,10 +1225,22 @@ declare const zPublicDeploymentDto: z.ZodObject<{
|
|
|
1160
1225
|
selectionMask: z.ZodInt;
|
|
1161
1226
|
}, z.core.$strip>;
|
|
1162
1227
|
/**
|
|
1163
|
-
* A user's profile: their miner account, currently-open
|
|
1164
|
-
* entries.
|
|
1228
|
+
* A user's profile: their miner account, active automation, currently-open
|
|
1229
|
+
* deployments and vault entries.
|
|
1165
1230
|
*/
|
|
1166
1231
|
declare const zProfileDto: z.ZodObject<{
|
|
1232
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1233
|
+
address: z.ZodString;
|
|
1234
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1235
|
+
reload: z.ZodBoolean;
|
|
1236
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1237
|
+
selectionMask: z.ZodInt;
|
|
1238
|
+
strategy: z.ZodEnum<{
|
|
1239
|
+
static: "static";
|
|
1240
|
+
random: "random";
|
|
1241
|
+
discretionary: "discretionary";
|
|
1242
|
+
}>;
|
|
1243
|
+
}, z.core.$strip>]>>;
|
|
1167
1244
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1168
1245
|
address: z.ZodString;
|
|
1169
1246
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1502,6 +1579,18 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
1502
1579
|
state_snapshot: "state_snapshot";
|
|
1503
1580
|
}>;
|
|
1504
1581
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1582
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1583
|
+
address: z.ZodString;
|
|
1584
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1585
|
+
reload: z.ZodBoolean;
|
|
1586
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1587
|
+
selectionMask: z.ZodInt;
|
|
1588
|
+
strategy: z.ZodEnum<{
|
|
1589
|
+
static: "static";
|
|
1590
|
+
random: "random";
|
|
1591
|
+
discretionary: "discretionary";
|
|
1592
|
+
}>;
|
|
1593
|
+
}, z.core.$strip>]>>;
|
|
1505
1594
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1506
1595
|
address: z.ZodString;
|
|
1507
1596
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1660,6 +1749,18 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
1660
1749
|
state_snapshot: "state_snapshot";
|
|
1661
1750
|
}>;
|
|
1662
1751
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1752
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1753
|
+
address: z.ZodString;
|
|
1754
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1755
|
+
reload: z.ZodBoolean;
|
|
1756
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1757
|
+
selectionMask: z.ZodInt;
|
|
1758
|
+
strategy: z.ZodEnum<{
|
|
1759
|
+
static: "static";
|
|
1760
|
+
random: "random";
|
|
1761
|
+
discretionary: "discretionary";
|
|
1762
|
+
}>;
|
|
1763
|
+
}, z.core.$strip>]>>;
|
|
1663
1764
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1664
1765
|
address: z.ZodString;
|
|
1665
1766
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -1824,6 +1925,18 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
1824
1925
|
state_snapshot: "state_snapshot";
|
|
1825
1926
|
}>;
|
|
1826
1927
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1928
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
1929
|
+
address: z.ZodString;
|
|
1930
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1931
|
+
reload: z.ZodBoolean;
|
|
1932
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
1933
|
+
selectionMask: z.ZodInt;
|
|
1934
|
+
strategy: z.ZodEnum<{
|
|
1935
|
+
static: "static";
|
|
1936
|
+
random: "random";
|
|
1937
|
+
discretionary: "discretionary";
|
|
1938
|
+
}>;
|
|
1939
|
+
}, z.core.$strip>]>>;
|
|
1827
1940
|
deployments: z.ZodArray<z.ZodObject<{
|
|
1828
1941
|
address: z.ZodString;
|
|
1829
1942
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2192,6 +2305,18 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
2192
2305
|
state_snapshot: "state_snapshot";
|
|
2193
2306
|
}>;
|
|
2194
2307
|
profile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2308
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2309
|
+
address: z.ZodString;
|
|
2310
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2311
|
+
reload: z.ZodBoolean;
|
|
2312
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2313
|
+
selectionMask: z.ZodInt;
|
|
2314
|
+
strategy: z.ZodEnum<{
|
|
2315
|
+
static: "static";
|
|
2316
|
+
random: "random";
|
|
2317
|
+
discretionary: "discretionary";
|
|
2318
|
+
}>;
|
|
2319
|
+
}, z.core.$strip>]>>;
|
|
2195
2320
|
deployments: z.ZodArray<z.ZodObject<{
|
|
2196
2321
|
address: z.ZodString;
|
|
2197
2322
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2234,6 +2359,18 @@ declare const zGetUserProfileData: z.ZodObject<{
|
|
|
2234
2359
|
}, z.core.$strip>;
|
|
2235
2360
|
declare const zGetUserProfileResponse: z.ZodObject<{
|
|
2236
2361
|
data: z.ZodObject<{
|
|
2362
|
+
automation: z.ZodOptional<z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
2363
|
+
address: z.ZodString;
|
|
2364
|
+
perRoundUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2365
|
+
reload: z.ZodBoolean;
|
|
2366
|
+
remainingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2367
|
+
selectionMask: z.ZodInt;
|
|
2368
|
+
strategy: z.ZodEnum<{
|
|
2369
|
+
static: "static";
|
|
2370
|
+
random: "random";
|
|
2371
|
+
discretionary: "discretionary";
|
|
2372
|
+
}>;
|
|
2373
|
+
}, z.core.$strip>]>>;
|
|
2237
2374
|
deployments: z.ZodArray<z.ZodObject<{
|
|
2238
2375
|
address: z.ZodString;
|
|
2239
2376
|
deployedUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2286,4 +2423,4 @@ declare class SatrushBackendSdkError<TCause = unknown> extends Error {
|
|
|
2286
2423
|
declare const satrushSdkErrorInterceptor: (error: unknown, response?: Response) => SatrushBackendSdkError<unknown>;
|
|
2287
2424
|
declare const isSatrushSdkError: <TCause = unknown>(error: unknown) => error is SatrushBackendSdkError<TCause>;
|
|
2288
2425
|
|
|
2289
|
-
export { type BadRequestErrorCodeErrorBody, type BoardDto, type ClientOptions, EpochStateDto, type EpochVaultDto, type EpochVaultEntryDto, type EpochVaultIterationDto, type EpochWinnerDto, 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, OneBtcStateDto, type OneBtcVaultDto, type OneBtcVaultEntryDto, type OneBtcVaultIterationDto, type Options, type PricesDto, type ProfileDto, type PubkeyDto, type PublicDeploymentDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type SatrushConfigDto, type SatsVaultDto, 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, zEpochStateDto, zEpochVaultDto, zEpochVaultEntryDto, zEpochVaultIterationDto, zEpochWinnerDto, zFieldError, zGetBoardData, zGetBoardResponse, zGetConfigData, zGetConfigResponse, zGetUserProfileData, zGetUserProfileResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zMinerDto, zNotificationEntity, zOneBtcStateDto, zOneBtcVaultDto, zOneBtcVaultEntryDto, zOneBtcVaultIterationDto, zPricesDto, zProfileDto, zPubkeyDto, zPublicDeploymentDto, zRoundDto, zRoundStateDto, zSatrushConfigDto, zSatsVaultDto, zSnapshotDto, zSseData, zSseResponse, zSseResponse2, zSseResponseSnapshot, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto, zUserProfileApiError400Error, zUserProfileApiError400InvalidAddress, zValidationErrorCodeErrorBody, zValidationErrorCodeValidationDetailsErrorBody };
|
|
2426
|
+
export { AutomationStrategyDto, type BadRequestErrorCodeErrorBody, type BoardDto, type ClientOptions, EpochStateDto, type EpochVaultDto, type EpochVaultEntryDto, type EpochVaultIterationDto, type EpochWinnerDto, 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, OneBtcStateDto, type OneBtcVaultDto, type OneBtcVaultEntryDto, type OneBtcVaultIterationDto, type Options, type PricesDto, type ProfileDto, type PubkeyDto, type PublicAutomationDto, type PublicDeploymentDto, type RoundDto, RoundStateDto, SatrushBackendSdk, SatrushBackendSdkError, type SatrushConfigDto, type SatsVaultDto, 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, zAutomationStrategyDto, zBadRequestErrorCodeErrorBody, zBoardDto, zEpochStateDto, zEpochVaultDto, zEpochVaultEntryDto, zEpochVaultIterationDto, zEpochWinnerDto, zFieldError, zGetBoardData, zGetBoardResponse, zGetConfigData, zGetConfigResponse, zGetUserProfileData, zGetUserProfileResponse, zI128Dto, zI64Dto, zInternalErrorCodeErrorBody, zMinerDto, zNotificationEntity, zOneBtcStateDto, zOneBtcVaultDto, zOneBtcVaultEntryDto, zOneBtcVaultIterationDto, zPricesDto, zProfileDto, zPubkeyDto, zPublicAutomationDto, zPublicDeploymentDto, zRoundDto, zRoundStateDto, zSatrushConfigDto, zSatsVaultDto, zSnapshotDto, zSseData, zSseResponse, zSseResponse2, zSseResponseSnapshot, zStrikeJackpotDto, zTileStakeDto, zU128Dto, zU64Dto, zUserProfileApiError400Error, zUserProfileApiError400InvalidAddress, zValidationErrorCodeErrorBody, zValidationErrorCodeValidationDetailsErrorBody };
|
package/dist/index.js
CHANGED
|
@@ -1044,6 +1044,11 @@ var getBoardResponseTransformer = async (data) => {
|
|
|
1044
1044
|
data.data = boardDtoSchemaResponseTransformer(data.data);
|
|
1045
1045
|
return data;
|
|
1046
1046
|
};
|
|
1047
|
+
var publicAutomationDtoSchemaResponseTransformer = (data) => {
|
|
1048
|
+
data.perRoundUsdAmount = u64DtoSchemaResponseTransformer(data.perRoundUsdAmount);
|
|
1049
|
+
data.remainingUsdAmount = u64DtoSchemaResponseTransformer(data.remainingUsdAmount);
|
|
1050
|
+
return data;
|
|
1051
|
+
};
|
|
1047
1052
|
var publicDeploymentDtoSchemaResponseTransformer = (data) => {
|
|
1048
1053
|
data.deployedUsdAmount = u64DtoSchemaResponseTransformer(data.deployedUsdAmount);
|
|
1049
1054
|
return data;
|
|
@@ -1064,6 +1069,9 @@ var oneBtcVaultEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
1064
1069
|
return data;
|
|
1065
1070
|
};
|
|
1066
1071
|
var profileDtoSchemaResponseTransformer = (data) => {
|
|
1072
|
+
if (data.automation) {
|
|
1073
|
+
data.automation = publicAutomationDtoSchemaResponseTransformer(data.automation);
|
|
1074
|
+
}
|
|
1067
1075
|
data.deployments = data.deployments.map((item) => publicDeploymentDtoSchemaResponseTransformer(item));
|
|
1068
1076
|
data.epochVaultEntries = data.epochVaultEntries.map((item) => epochVaultEntryDtoSchemaResponseTransformer(item));
|
|
1069
1077
|
data.miner = minerDtoSchemaResponseTransformer(data.miner);
|
|
@@ -1096,6 +1104,11 @@ var getUserProfileResponseTransformer = async (data) => {
|
|
|
1096
1104
|
|
|
1097
1105
|
// src/generated/zod.gen.ts
|
|
1098
1106
|
import * as z from "zod";
|
|
1107
|
+
var zAutomationStrategyDto = z.enum([
|
|
1108
|
+
"static",
|
|
1109
|
+
"random",
|
|
1110
|
+
"discretionary"
|
|
1111
|
+
]);
|
|
1099
1112
|
var zBadRequestErrorCodeErrorBody = z.object({
|
|
1100
1113
|
code: z.enum([
|
|
1101
1114
|
"invalid_path",
|
|
@@ -1238,6 +1251,14 @@ var zOneBtcVaultDto = z.object({
|
|
|
1238
1251
|
pendingUsdAmount: zU64Dto,
|
|
1239
1252
|
reservedBtcAmount: zU64Dto
|
|
1240
1253
|
});
|
|
1254
|
+
var zPublicAutomationDto = z.object({
|
|
1255
|
+
address: zPubkeyDto,
|
|
1256
|
+
perRoundUsdAmount: zU64Dto,
|
|
1257
|
+
reload: z.boolean(),
|
|
1258
|
+
remainingUsdAmount: zU64Dto,
|
|
1259
|
+
selectionMask: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1260
|
+
strategy: zAutomationStrategyDto
|
|
1261
|
+
});
|
|
1241
1262
|
var zPublicDeploymentDto = z.object({
|
|
1242
1263
|
address: zPubkeyDto,
|
|
1243
1264
|
deployedUsdAmount: zU64Dto,
|
|
@@ -1245,6 +1266,10 @@ var zPublicDeploymentDto = z.object({
|
|
|
1245
1266
|
selectionMask: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
1246
1267
|
});
|
|
1247
1268
|
var zProfileDto = z.object({
|
|
1269
|
+
automation: z.optional(z.union([
|
|
1270
|
+
z.null(),
|
|
1271
|
+
zPublicAutomationDto
|
|
1272
|
+
])),
|
|
1248
1273
|
deployments: z.array(zPublicDeploymentDto),
|
|
1249
1274
|
epochVaultEntries: z.array(zEpochVaultEntryDto),
|
|
1250
1275
|
miner: zMinerDto,
|
|
@@ -1463,6 +1488,11 @@ var SatrushBackendSdk = class _SatrushBackendSdk extends HeyApiClient {
|
|
|
1463
1488
|
};
|
|
1464
1489
|
|
|
1465
1490
|
// src/generated/types.gen.ts
|
|
1491
|
+
var AutomationStrategyDto = {
|
|
1492
|
+
STATIC: "static",
|
|
1493
|
+
RANDOM: "random",
|
|
1494
|
+
DISCRETIONARY: "discretionary"
|
|
1495
|
+
};
|
|
1466
1496
|
var EpochStateDto = {
|
|
1467
1497
|
OPEN: "open",
|
|
1468
1498
|
SETTLING: "settling",
|
|
@@ -1527,6 +1557,7 @@ async function unwrap(promise) {
|
|
|
1527
1557
|
return unwrapData(res);
|
|
1528
1558
|
}
|
|
1529
1559
|
export {
|
|
1560
|
+
AutomationStrategyDto,
|
|
1530
1561
|
EpochStateDto,
|
|
1531
1562
|
NotificationEntity,
|
|
1532
1563
|
OneBtcStateDto,
|
|
@@ -1538,6 +1569,7 @@ export {
|
|
|
1538
1569
|
isSatrushSdkError,
|
|
1539
1570
|
satrushSdkErrorInterceptor,
|
|
1540
1571
|
unwrap,
|
|
1572
|
+
zAutomationStrategyDto,
|
|
1541
1573
|
zBadRequestErrorCodeErrorBody,
|
|
1542
1574
|
zBoardDto,
|
|
1543
1575
|
zEpochStateDto,
|
|
@@ -1564,6 +1596,7 @@ export {
|
|
|
1564
1596
|
zPricesDto,
|
|
1565
1597
|
zProfileDto,
|
|
1566
1598
|
zPubkeyDto,
|
|
1599
|
+
zPublicAutomationDto,
|
|
1567
1600
|
zPublicDeploymentDto,
|
|
1568
1601
|
zRoundDto,
|
|
1569
1602
|
zRoundStateDto,
|