@satrush/api 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +28 -8
- package/dist/index.d.cts +35 -33
- package/dist/index.d.ts +35 -33
- package/dist/index.js +28 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1156,8 +1156,12 @@ var epochVaultDtoSchemaResponseTransformer = (data) => {
|
|
|
1156
1156
|
if (data.currentIteration) {
|
|
1157
1157
|
data.currentIteration = epochVaultIterationDtoSchemaResponseTransformer(data.currentIteration);
|
|
1158
1158
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1159
|
+
if (data.iterationEndsAt) {
|
|
1160
|
+
data.iterationEndsAt = new Date(data.iterationEndsAt);
|
|
1161
|
+
}
|
|
1162
|
+
if (data.iterationStartedAt) {
|
|
1163
|
+
data.iterationStartedAt = new Date(data.iterationStartedAt);
|
|
1164
|
+
}
|
|
1161
1165
|
data.lastTriggerSlot = u64DtoSchemaResponseTransformer(data.lastTriggerSlot);
|
|
1162
1166
|
data.pendingUsdAmount = u64DtoSchemaResponseTransformer(data.pendingUsdAmount);
|
|
1163
1167
|
data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
|
|
@@ -1209,8 +1213,12 @@ var boardDtoSchemaResponseTransformer = (data) => {
|
|
|
1209
1213
|
if (data.previousRound) {
|
|
1210
1214
|
data.previousRound = roundDtoSchemaResponseTransformer(data.previousRound);
|
|
1211
1215
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1216
|
+
if (data.roundEndsAt) {
|
|
1217
|
+
data.roundEndsAt = new Date(data.roundEndsAt);
|
|
1218
|
+
}
|
|
1219
|
+
if (data.roundStartedAt) {
|
|
1220
|
+
data.roundStartedAt = new Date(data.roundStartedAt);
|
|
1221
|
+
}
|
|
1214
1222
|
data.satsVault = satsVaultDtoSchemaResponseTransformer(data.satsVault);
|
|
1215
1223
|
data.startSlot = u64DtoSchemaResponseTransformer(data.startSlot);
|
|
1216
1224
|
data.strike = strikeJackpotDtoSchemaResponseTransformer(data.strike);
|
|
@@ -1682,9 +1690,15 @@ var zEpochVaultDto = z.object({
|
|
|
1682
1690
|
z.null(),
|
|
1683
1691
|
zEpochVaultIterationDto
|
|
1684
1692
|
])),
|
|
1685
|
-
iterationEndsAt: z.
|
|
1693
|
+
iterationEndsAt: z.optional(z.union([
|
|
1694
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1695
|
+
z.null()
|
|
1696
|
+
])),
|
|
1686
1697
|
iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1687
|
-
iterationStartedAt: z.
|
|
1698
|
+
iterationStartedAt: z.optional(z.union([
|
|
1699
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1700
|
+
z.null()
|
|
1701
|
+
])),
|
|
1688
1702
|
lastTriggerSlot: zU64Dto,
|
|
1689
1703
|
pendingUsdAmount: zU64Dto,
|
|
1690
1704
|
poolBtcAmount: zU64Dto,
|
|
@@ -2033,9 +2047,15 @@ var zBoardDto = z.object({
|
|
|
2033
2047
|
previousRounds: z.array(zPreviousRoundDto),
|
|
2034
2048
|
prices: zPricesDto,
|
|
2035
2049
|
roundDuration: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2036
|
-
roundEndsAt: z.
|
|
2050
|
+
roundEndsAt: z.optional(z.union([
|
|
2051
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
2052
|
+
z.null()
|
|
2053
|
+
])),
|
|
2037
2054
|
roundId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2038
|
-
roundStartedAt: z.
|
|
2055
|
+
roundStartedAt: z.optional(z.union([
|
|
2056
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
2057
|
+
z.null()
|
|
2058
|
+
])),
|
|
2039
2059
|
satsVault: zSatsVaultDto,
|
|
2040
2060
|
startSlot: zU64Dto,
|
|
2041
2061
|
strike: zStrikeJackpotDto
|
package/dist/index.d.cts
CHANGED
|
@@ -367,15 +367,16 @@ type BoardDto = {
|
|
|
367
367
|
roundDuration: number;
|
|
368
368
|
/**
|
|
369
369
|
* Wall-clock time of `end_slot` (in the future while the round is
|
|
370
|
-
* mining), derived the same way.
|
|
370
|
+
* mining), derived the same way. Null while the round is pending.
|
|
371
371
|
*/
|
|
372
|
-
roundEndsAt
|
|
372
|
+
roundEndsAt?: Date | null;
|
|
373
373
|
roundId: number;
|
|
374
374
|
/**
|
|
375
375
|
* Wall-clock time of `start_slot`, derived from the current time and
|
|
376
|
-
* slot assuming exactly 400ms per slot.
|
|
376
|
+
* slot assuming exactly 400ms per slot. Null while the round is pending
|
|
377
|
+
* and its slot window is not yet scheduled.
|
|
377
378
|
*/
|
|
378
|
-
roundStartedAt
|
|
379
|
+
roundStartedAt?: Date | null;
|
|
379
380
|
/**
|
|
380
381
|
* The sats vault balances.
|
|
381
382
|
*/
|
|
@@ -463,13 +464,14 @@ type EpochVaultDto = {
|
|
|
463
464
|
* Wall-clock time the iteration's window closes (start plus the
|
|
464
465
|
* configured iteration duration), derived the same way.
|
|
465
466
|
*/
|
|
466
|
-
iterationEndsAt
|
|
467
|
+
iterationEndsAt?: Date | null;
|
|
467
468
|
iterationId: number;
|
|
468
469
|
/**
|
|
469
470
|
* Wall-clock time of `last_trigger_slot`, derived from the current time
|
|
470
|
-
* and slot assuming exactly 400ms per slot.
|
|
471
|
+
* and slot assuming exactly 400ms per slot. Null when the slot carries
|
|
472
|
+
* the not-yet-scheduled sentinel.
|
|
471
473
|
*/
|
|
472
|
-
iterationStartedAt
|
|
474
|
+
iterationStartedAt?: Date | null;
|
|
473
475
|
/**
|
|
474
476
|
* Slot at which the current iteration's window started.
|
|
475
477
|
*/
|
|
@@ -2418,9 +2420,9 @@ declare const zEpochVaultDto: z.ZodObject<{
|
|
|
2418
2420
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2419
2421
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2420
2422
|
}, z.core.$strip>]>>;
|
|
2421
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2423
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2422
2424
|
iterationId: z.ZodInt;
|
|
2423
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2425
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2424
2426
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
2425
2427
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2426
2428
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2871,9 +2873,9 @@ declare const zBoardDto: z.ZodObject<{
|
|
|
2871
2873
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2872
2874
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2873
2875
|
}, z.core.$strip>]>>;
|
|
2874
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2876
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2875
2877
|
iterationId: z.ZodInt;
|
|
2876
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2878
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2877
2879
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
2878
2880
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2879
2881
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2935,9 +2937,9 @@ declare const zBoardDto: z.ZodObject<{
|
|
|
2935
2937
|
sat: z.ZodNumber;
|
|
2936
2938
|
}, z.core.$strip>;
|
|
2937
2939
|
roundDuration: z.ZodInt;
|
|
2938
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2940
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2939
2941
|
roundId: z.ZodInt;
|
|
2940
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2942
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2941
2943
|
satsVault: z.ZodObject<{
|
|
2942
2944
|
address: z.ZodString;
|
|
2943
2945
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3006,9 +3008,9 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
3006
3008
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3007
3009
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3008
3010
|
}, z.core.$strip>]>>;
|
|
3009
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3011
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3010
3012
|
iterationId: z.ZodInt;
|
|
3011
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3013
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3012
3014
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3013
3015
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3014
3016
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3070,9 +3072,9 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
3070
3072
|
sat: z.ZodNumber;
|
|
3071
3073
|
}, z.core.$strip>;
|
|
3072
3074
|
roundDuration: z.ZodInt;
|
|
3073
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3075
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3074
3076
|
roundId: z.ZodInt;
|
|
3075
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3077
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3076
3078
|
satsVault: z.ZodObject<{
|
|
3077
3079
|
address: z.ZodString;
|
|
3078
3080
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3203,9 +3205,9 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
3203
3205
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3204
3206
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3205
3207
|
}, z.core.$strip>]>>;
|
|
3206
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3208
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3207
3209
|
iterationId: z.ZodInt;
|
|
3208
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3210
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3209
3211
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3210
3212
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3211
3213
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3267,9 +3269,9 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
3267
3269
|
sat: z.ZodNumber;
|
|
3268
3270
|
}, z.core.$strip>;
|
|
3269
3271
|
roundDuration: z.ZodInt;
|
|
3270
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3272
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3271
3273
|
roundId: z.ZodInt;
|
|
3272
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3274
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3273
3275
|
satsVault: z.ZodObject<{
|
|
3274
3276
|
address: z.ZodString;
|
|
3275
3277
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3406,9 +3408,9 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
3406
3408
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3407
3409
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3408
3410
|
}, z.core.$strip>]>>;
|
|
3409
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3411
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3410
3412
|
iterationId: z.ZodInt;
|
|
3411
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3413
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3412
3414
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3413
3415
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3414
3416
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3470,9 +3472,9 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
3470
3472
|
sat: z.ZodNumber;
|
|
3471
3473
|
}, z.core.$strip>;
|
|
3472
3474
|
roundDuration: z.ZodInt;
|
|
3473
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3475
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3474
3476
|
roundId: z.ZodInt;
|
|
3475
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3477
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3476
3478
|
satsVault: z.ZodObject<{
|
|
3477
3479
|
address: z.ZodString;
|
|
3478
3480
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3853,9 +3855,9 @@ declare const zGetBoardResponse: z.ZodObject<{
|
|
|
3853
3855
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3854
3856
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3855
3857
|
}, z.core.$strip>]>>;
|
|
3856
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3858
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3857
3859
|
iterationId: z.ZodInt;
|
|
3858
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3860
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3859
3861
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3860
3862
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3861
3863
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3917,9 +3919,9 @@ declare const zGetBoardResponse: z.ZodObject<{
|
|
|
3917
3919
|
sat: z.ZodNumber;
|
|
3918
3920
|
}, z.core.$strip>;
|
|
3919
3921
|
roundDuration: z.ZodInt;
|
|
3920
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3922
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3921
3923
|
roundId: z.ZodInt;
|
|
3922
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3924
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3923
3925
|
satsVault: z.ZodObject<{
|
|
3924
3926
|
address: z.ZodString;
|
|
3925
3927
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -4177,9 +4179,9 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
4177
4179
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
4178
4180
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
4179
4181
|
}, z.core.$strip>]>>;
|
|
4180
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4182
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4181
4183
|
iterationId: z.ZodInt;
|
|
4182
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4184
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4183
4185
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
4184
4186
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
4185
4187
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -4241,9 +4243,9 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
4241
4243
|
sat: z.ZodNumber;
|
|
4242
4244
|
}, z.core.$strip>;
|
|
4243
4245
|
roundDuration: z.ZodInt;
|
|
4244
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4246
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4245
4247
|
roundId: z.ZodInt;
|
|
4246
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4248
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4247
4249
|
satsVault: z.ZodObject<{
|
|
4248
4250
|
address: z.ZodString;
|
|
4249
4251
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -367,15 +367,16 @@ type BoardDto = {
|
|
|
367
367
|
roundDuration: number;
|
|
368
368
|
/**
|
|
369
369
|
* Wall-clock time of `end_slot` (in the future while the round is
|
|
370
|
-
* mining), derived the same way.
|
|
370
|
+
* mining), derived the same way. Null while the round is pending.
|
|
371
371
|
*/
|
|
372
|
-
roundEndsAt
|
|
372
|
+
roundEndsAt?: Date | null;
|
|
373
373
|
roundId: number;
|
|
374
374
|
/**
|
|
375
375
|
* Wall-clock time of `start_slot`, derived from the current time and
|
|
376
|
-
* slot assuming exactly 400ms per slot.
|
|
376
|
+
* slot assuming exactly 400ms per slot. Null while the round is pending
|
|
377
|
+
* and its slot window is not yet scheduled.
|
|
377
378
|
*/
|
|
378
|
-
roundStartedAt
|
|
379
|
+
roundStartedAt?: Date | null;
|
|
379
380
|
/**
|
|
380
381
|
* The sats vault balances.
|
|
381
382
|
*/
|
|
@@ -463,13 +464,14 @@ type EpochVaultDto = {
|
|
|
463
464
|
* Wall-clock time the iteration's window closes (start plus the
|
|
464
465
|
* configured iteration duration), derived the same way.
|
|
465
466
|
*/
|
|
466
|
-
iterationEndsAt
|
|
467
|
+
iterationEndsAt?: Date | null;
|
|
467
468
|
iterationId: number;
|
|
468
469
|
/**
|
|
469
470
|
* Wall-clock time of `last_trigger_slot`, derived from the current time
|
|
470
|
-
* and slot assuming exactly 400ms per slot.
|
|
471
|
+
* and slot assuming exactly 400ms per slot. Null when the slot carries
|
|
472
|
+
* the not-yet-scheduled sentinel.
|
|
471
473
|
*/
|
|
472
|
-
iterationStartedAt
|
|
474
|
+
iterationStartedAt?: Date | null;
|
|
473
475
|
/**
|
|
474
476
|
* Slot at which the current iteration's window started.
|
|
475
477
|
*/
|
|
@@ -2418,9 +2420,9 @@ declare const zEpochVaultDto: z.ZodObject<{
|
|
|
2418
2420
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2419
2421
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2420
2422
|
}, z.core.$strip>]>>;
|
|
2421
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2423
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2422
2424
|
iterationId: z.ZodInt;
|
|
2423
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2425
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2424
2426
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
2425
2427
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2426
2428
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2871,9 +2873,9 @@ declare const zBoardDto: z.ZodObject<{
|
|
|
2871
2873
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2872
2874
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
2873
2875
|
}, z.core.$strip>]>>;
|
|
2874
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2876
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2875
2877
|
iterationId: z.ZodInt;
|
|
2876
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2878
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2877
2879
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
2878
2880
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
2879
2881
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -2935,9 +2937,9 @@ declare const zBoardDto: z.ZodObject<{
|
|
|
2935
2937
|
sat: z.ZodNumber;
|
|
2936
2938
|
}, z.core.$strip>;
|
|
2937
2939
|
roundDuration: z.ZodInt;
|
|
2938
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2940
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2939
2941
|
roundId: z.ZodInt;
|
|
2940
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
2942
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
2941
2943
|
satsVault: z.ZodObject<{
|
|
2942
2944
|
address: z.ZodString;
|
|
2943
2945
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3006,9 +3008,9 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
3006
3008
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3007
3009
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3008
3010
|
}, z.core.$strip>]>>;
|
|
3009
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3011
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3010
3012
|
iterationId: z.ZodInt;
|
|
3011
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3013
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3012
3014
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3013
3015
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3014
3016
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3070,9 +3072,9 @@ declare const zSnapshotDto: z.ZodObject<{
|
|
|
3070
3072
|
sat: z.ZodNumber;
|
|
3071
3073
|
}, z.core.$strip>;
|
|
3072
3074
|
roundDuration: z.ZodInt;
|
|
3073
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3075
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3074
3076
|
roundId: z.ZodInt;
|
|
3075
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3077
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3076
3078
|
satsVault: z.ZodObject<{
|
|
3077
3079
|
address: z.ZodString;
|
|
3078
3080
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3203,9 +3205,9 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
3203
3205
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3204
3206
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3205
3207
|
}, z.core.$strip>]>>;
|
|
3206
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3208
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3207
3209
|
iterationId: z.ZodInt;
|
|
3208
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3210
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3209
3211
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3210
3212
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3211
3213
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3267,9 +3269,9 @@ declare const zSseResponseSnapshot: z.ZodIntersection<z.ZodObject<{
|
|
|
3267
3269
|
sat: z.ZodNumber;
|
|
3268
3270
|
}, z.core.$strip>;
|
|
3269
3271
|
roundDuration: z.ZodInt;
|
|
3270
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3272
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3271
3273
|
roundId: z.ZodInt;
|
|
3272
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3274
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3273
3275
|
satsVault: z.ZodObject<{
|
|
3274
3276
|
address: z.ZodString;
|
|
3275
3277
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3406,9 +3408,9 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
3406
3408
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3407
3409
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3408
3410
|
}, z.core.$strip>]>>;
|
|
3409
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3411
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3410
3412
|
iterationId: z.ZodInt;
|
|
3411
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3413
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3412
3414
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3413
3415
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3414
3416
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3470,9 +3472,9 @@ declare const zSseResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
3470
3472
|
sat: z.ZodNumber;
|
|
3471
3473
|
}, z.core.$strip>;
|
|
3472
3474
|
roundDuration: z.ZodInt;
|
|
3473
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3475
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3474
3476
|
roundId: z.ZodInt;
|
|
3475
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3477
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3476
3478
|
satsVault: z.ZodObject<{
|
|
3477
3479
|
address: z.ZodString;
|
|
3478
3480
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3853,9 +3855,9 @@ declare const zGetBoardResponse: z.ZodObject<{
|
|
|
3853
3855
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3854
3856
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
3855
3857
|
}, z.core.$strip>]>>;
|
|
3856
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3858
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3857
3859
|
iterationId: z.ZodInt;
|
|
3858
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3860
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3859
3861
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
3860
3862
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
3861
3863
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -3917,9 +3919,9 @@ declare const zGetBoardResponse: z.ZodObject<{
|
|
|
3917
3919
|
sat: z.ZodNumber;
|
|
3918
3920
|
}, z.core.$strip>;
|
|
3919
3921
|
roundDuration: z.ZodInt;
|
|
3920
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3922
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3921
3923
|
roundId: z.ZodInt;
|
|
3922
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
3924
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
3923
3925
|
satsVault: z.ZodObject<{
|
|
3924
3926
|
address: z.ZodString;
|
|
3925
3927
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -4177,9 +4179,9 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
4177
4179
|
winnersClaimed: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
4178
4180
|
winnersSelected: z.ZodOptional<z.ZodUnion<readonly [z.ZodInt, z.ZodNull]>>;
|
|
4179
4181
|
}, z.core.$strip>]>>;
|
|
4180
|
-
iterationEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4182
|
+
iterationEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4181
4183
|
iterationId: z.ZodInt;
|
|
4182
|
-
iterationStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4184
|
+
iterationStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4183
4185
|
lastTriggerSlot: z.ZodCoercedBigInt<unknown>;
|
|
4184
4186
|
pendingUsdAmount: z.ZodCoercedBigInt<unknown>;
|
|
4185
4187
|
poolBtcAmount: z.ZodCoercedBigInt<unknown>;
|
|
@@ -4241,9 +4243,9 @@ declare const zSseResponse2: z.ZodIntersection<z.ZodObject<{
|
|
|
4241
4243
|
sat: z.ZodNumber;
|
|
4242
4244
|
}, z.core.$strip>;
|
|
4243
4245
|
roundDuration: z.ZodInt;
|
|
4244
|
-
roundEndsAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4246
|
+
roundEndsAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4245
4247
|
roundId: z.ZodInt;
|
|
4246
|
-
roundStartedAt: z.ZodPreprocess<z.ZodISODateTime
|
|
4248
|
+
roundStartedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodPreprocess<z.ZodISODateTime>, z.ZodNull]>>;
|
|
4247
4249
|
satsVault: z.ZodObject<{
|
|
4248
4250
|
address: z.ZodString;
|
|
4249
4251
|
btcAmount: z.ZodCoercedBigInt<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -987,8 +987,12 @@ var epochVaultDtoSchemaResponseTransformer = (data) => {
|
|
|
987
987
|
if (data.currentIteration) {
|
|
988
988
|
data.currentIteration = epochVaultIterationDtoSchemaResponseTransformer(data.currentIteration);
|
|
989
989
|
}
|
|
990
|
-
|
|
991
|
-
|
|
990
|
+
if (data.iterationEndsAt) {
|
|
991
|
+
data.iterationEndsAt = new Date(data.iterationEndsAt);
|
|
992
|
+
}
|
|
993
|
+
if (data.iterationStartedAt) {
|
|
994
|
+
data.iterationStartedAt = new Date(data.iterationStartedAt);
|
|
995
|
+
}
|
|
992
996
|
data.lastTriggerSlot = u64DtoSchemaResponseTransformer(data.lastTriggerSlot);
|
|
993
997
|
data.pendingUsdAmount = u64DtoSchemaResponseTransformer(data.pendingUsdAmount);
|
|
994
998
|
data.poolBtcAmount = u64DtoSchemaResponseTransformer(data.poolBtcAmount);
|
|
@@ -1040,8 +1044,12 @@ var boardDtoSchemaResponseTransformer = (data) => {
|
|
|
1040
1044
|
if (data.previousRound) {
|
|
1041
1045
|
data.previousRound = roundDtoSchemaResponseTransformer(data.previousRound);
|
|
1042
1046
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1047
|
+
if (data.roundEndsAt) {
|
|
1048
|
+
data.roundEndsAt = new Date(data.roundEndsAt);
|
|
1049
|
+
}
|
|
1050
|
+
if (data.roundStartedAt) {
|
|
1051
|
+
data.roundStartedAt = new Date(data.roundStartedAt);
|
|
1052
|
+
}
|
|
1045
1053
|
data.satsVault = satsVaultDtoSchemaResponseTransformer(data.satsVault);
|
|
1046
1054
|
data.startSlot = u64DtoSchemaResponseTransformer(data.startSlot);
|
|
1047
1055
|
data.strike = strikeJackpotDtoSchemaResponseTransformer(data.strike);
|
|
@@ -1513,9 +1521,15 @@ var zEpochVaultDto = z.object({
|
|
|
1513
1521
|
z.null(),
|
|
1514
1522
|
zEpochVaultIterationDto
|
|
1515
1523
|
])),
|
|
1516
|
-
iterationEndsAt: z.
|
|
1524
|
+
iterationEndsAt: z.optional(z.union([
|
|
1525
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1526
|
+
z.null()
|
|
1527
|
+
])),
|
|
1517
1528
|
iterationId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1518
|
-
iterationStartedAt: z.
|
|
1529
|
+
iterationStartedAt: z.optional(z.union([
|
|
1530
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1531
|
+
z.null()
|
|
1532
|
+
])),
|
|
1519
1533
|
lastTriggerSlot: zU64Dto,
|
|
1520
1534
|
pendingUsdAmount: zU64Dto,
|
|
1521
1535
|
poolBtcAmount: zU64Dto,
|
|
@@ -1864,9 +1878,15 @@ var zBoardDto = z.object({
|
|
|
1864
1878
|
previousRounds: z.array(zPreviousRoundDto),
|
|
1865
1879
|
prices: zPricesDto,
|
|
1866
1880
|
roundDuration: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1867
|
-
roundEndsAt: z.
|
|
1881
|
+
roundEndsAt: z.optional(z.union([
|
|
1882
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1883
|
+
z.null()
|
|
1884
|
+
])),
|
|
1868
1885
|
roundId: z.int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1869
|
-
roundStartedAt: z.
|
|
1886
|
+
roundStartedAt: z.optional(z.union([
|
|
1887
|
+
z.preprocess((value) => value instanceof Date ? value.toISOString() : value, z.iso.datetime()),
|
|
1888
|
+
z.null()
|
|
1889
|
+
])),
|
|
1870
1890
|
satsVault: zSatsVaultDto,
|
|
1871
1891
|
startSlot: zU64Dto,
|
|
1872
1892
|
strike: zStrikeJackpotDto
|