@jinn-network/sdk 0.1.0

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.
@@ -0,0 +1,834 @@
1
+ import { z } from 'zod';
2
+ export declare const DecimalProbabilitySchema: z.ZodString;
3
+ export declare const IsoDateTimeSchema: z.ZodString;
4
+ export declare const PredictionV1ClaimPolicySchema: z.ZodObject<{
5
+ kind: z.ZodLiteral<"parallel">;
6
+ maxClaims: z.ZodNumber;
7
+ maxClaimsPerSolver: z.ZodNumber;
8
+ claimWindow: z.ZodLiteral<"task-window">;
9
+ selection: z.ZodLiteral<"all-valid-solutions-scored">;
10
+ economics: z.ZodLiteral<"testnet-flat">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ kind: "parallel";
13
+ maxClaims: number;
14
+ maxClaimsPerSolver: number;
15
+ claimWindow: "task-window";
16
+ selection: "all-valid-solutions-scored";
17
+ economics: "testnet-flat";
18
+ }, {
19
+ kind: "parallel";
20
+ maxClaims: number;
21
+ maxClaimsPerSolver: number;
22
+ claimWindow: "task-window";
23
+ selection: "all-valid-solutions-scored";
24
+ economics: "testnet-flat";
25
+ }>;
26
+ export declare const PredictionV1SpecSchema: z.ZodObject<{
27
+ question: z.ZodObject<{
28
+ kind: z.ZodLiteral<"binary">;
29
+ text: z.ZodString;
30
+ yesLabel: z.ZodLiteral<"YES">;
31
+ noLabel: z.ZodLiteral<"NO">;
32
+ }, "strip", z.ZodTypeAny, {
33
+ kind: "binary";
34
+ text: string;
35
+ yesLabel: "YES";
36
+ noLabel: "NO";
37
+ }, {
38
+ kind: "binary";
39
+ text: string;
40
+ yesLabel: "YES";
41
+ noLabel: "NO";
42
+ }>;
43
+ source: z.ZodObject<{
44
+ type: z.ZodLiteral<"prediction-market">;
45
+ venue: z.ZodLiteral<"polymarket">;
46
+ url: z.ZodString;
47
+ identifiers: z.ZodObject<{
48
+ marketId: z.ZodString;
49
+ conditionId: z.ZodString;
50
+ yesTokenId: z.ZodString;
51
+ noTokenId: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ marketId: string;
54
+ conditionId: string;
55
+ yesTokenId: string;
56
+ noTokenId: string;
57
+ }, {
58
+ marketId: string;
59
+ conditionId: string;
60
+ yesTokenId: string;
61
+ noTokenId: string;
62
+ }>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ type: "prediction-market";
65
+ venue: "polymarket";
66
+ url: string;
67
+ identifiers: {
68
+ marketId: string;
69
+ conditionId: string;
70
+ yesTokenId: string;
71
+ noTokenId: string;
72
+ };
73
+ }, {
74
+ type: "prediction-market";
75
+ venue: "polymarket";
76
+ url: string;
77
+ identifiers: {
78
+ marketId: string;
79
+ conditionId: string;
80
+ yesTokenId: string;
81
+ noTokenId: string;
82
+ };
83
+ }>;
84
+ resolution: z.ZodObject<{
85
+ expectedResolutionTime: z.ZodString;
86
+ rulesText: z.ZodString;
87
+ rulesUrl: z.ZodString;
88
+ timezone: z.ZodOptional<z.ZodString>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ expectedResolutionTime: string;
91
+ rulesText: string;
92
+ rulesUrl: string;
93
+ timezone?: string | undefined;
94
+ }, {
95
+ expectedResolutionTime: string;
96
+ rulesText: string;
97
+ rulesUrl: string;
98
+ timezone?: string | undefined;
99
+ }>;
100
+ consensusSnapshot: z.ZodObject<{
101
+ sampledAt: z.ZodString;
102
+ probabilityYes: z.ZodString;
103
+ method: z.ZodLiteral<"best-bid-ask-midpoint">;
104
+ bestBidYes: z.ZodString;
105
+ bestAskYes: z.ZodString;
106
+ spread: z.ZodString;
107
+ source: z.ZodLiteral<"polymarket-clob">;
108
+ }, "strip", z.ZodTypeAny, {
109
+ source: "polymarket-clob";
110
+ sampledAt: string;
111
+ probabilityYes: string;
112
+ method: "best-bid-ask-midpoint";
113
+ bestBidYes: string;
114
+ bestAskYes: string;
115
+ spread: string;
116
+ }, {
117
+ source: "polymarket-clob";
118
+ sampledAt: string;
119
+ probabilityYes: string;
120
+ method: "best-bid-ask-midpoint";
121
+ bestBidYes: string;
122
+ bestAskYes: string;
123
+ spread: string;
124
+ }>;
125
+ eligibilitySnapshot: z.ZodObject<{
126
+ sampledAt: z.ZodString;
127
+ timeToResolutionHours: z.ZodNumber;
128
+ liquidityUsd: z.ZodString;
129
+ volume24hUsd: z.ZodString;
130
+ orderbookAgeSeconds: z.ZodNumber;
131
+ selectionReason: z.ZodString;
132
+ }, "strip", z.ZodTypeAny, {
133
+ sampledAt: string;
134
+ timeToResolutionHours: number;
135
+ liquidityUsd: string;
136
+ volume24hUsd: string;
137
+ orderbookAgeSeconds: number;
138
+ selectionReason: string;
139
+ }, {
140
+ sampledAt: string;
141
+ timeToResolutionHours: number;
142
+ liquidityUsd: string;
143
+ volume24hUsd: string;
144
+ orderbookAgeSeconds: number;
145
+ selectionReason: string;
146
+ }>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ question: {
149
+ kind: "binary";
150
+ text: string;
151
+ yesLabel: "YES";
152
+ noLabel: "NO";
153
+ };
154
+ source: {
155
+ type: "prediction-market";
156
+ venue: "polymarket";
157
+ url: string;
158
+ identifiers: {
159
+ marketId: string;
160
+ conditionId: string;
161
+ yesTokenId: string;
162
+ noTokenId: string;
163
+ };
164
+ };
165
+ resolution: {
166
+ expectedResolutionTime: string;
167
+ rulesText: string;
168
+ rulesUrl: string;
169
+ timezone?: string | undefined;
170
+ };
171
+ consensusSnapshot: {
172
+ source: "polymarket-clob";
173
+ sampledAt: string;
174
+ probabilityYes: string;
175
+ method: "best-bid-ask-midpoint";
176
+ bestBidYes: string;
177
+ bestAskYes: string;
178
+ spread: string;
179
+ };
180
+ eligibilitySnapshot: {
181
+ sampledAt: string;
182
+ timeToResolutionHours: number;
183
+ liquidityUsd: string;
184
+ volume24hUsd: string;
185
+ orderbookAgeSeconds: number;
186
+ selectionReason: string;
187
+ };
188
+ }, {
189
+ question: {
190
+ kind: "binary";
191
+ text: string;
192
+ yesLabel: "YES";
193
+ noLabel: "NO";
194
+ };
195
+ source: {
196
+ type: "prediction-market";
197
+ venue: "polymarket";
198
+ url: string;
199
+ identifiers: {
200
+ marketId: string;
201
+ conditionId: string;
202
+ yesTokenId: string;
203
+ noTokenId: string;
204
+ };
205
+ };
206
+ resolution: {
207
+ expectedResolutionTime: string;
208
+ rulesText: string;
209
+ rulesUrl: string;
210
+ timezone?: string | undefined;
211
+ };
212
+ consensusSnapshot: {
213
+ source: "polymarket-clob";
214
+ sampledAt: string;
215
+ probabilityYes: string;
216
+ method: "best-bid-ask-midpoint";
217
+ bestBidYes: string;
218
+ bestAskYes: string;
219
+ spread: string;
220
+ };
221
+ eligibilitySnapshot: {
222
+ sampledAt: string;
223
+ timeToResolutionHours: number;
224
+ liquidityUsd: string;
225
+ volume24hUsd: string;
226
+ orderbookAgeSeconds: number;
227
+ selectionReason: string;
228
+ };
229
+ }>;
230
+ export type PredictionV1Spec = z.infer<typeof PredictionV1SpecSchema>;
231
+ export declare const PredictionV1TaskSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
232
+ id: z.ZodString;
233
+ description: z.ZodString;
234
+ solverType: z.ZodLiteral<"prediction.v1">;
235
+ role: z.ZodOptional<z.ZodEnum<["restoration", "evaluation"]>>;
236
+ window: z.ZodObject<{
237
+ startTs: z.ZodNumber;
238
+ endTs: z.ZodNumber;
239
+ }, "strip", z.ZodTypeAny, {
240
+ startTs: number;
241
+ endTs: number;
242
+ }, {
243
+ startTs: number;
244
+ endTs: number;
245
+ }>;
246
+ claimPolicy: z.ZodObject<{
247
+ kind: z.ZodLiteral<"parallel">;
248
+ maxClaims: z.ZodNumber;
249
+ maxClaimsPerSolver: z.ZodNumber;
250
+ claimWindow: z.ZodLiteral<"task-window">;
251
+ selection: z.ZodLiteral<"all-valid-solutions-scored">;
252
+ economics: z.ZodLiteral<"testnet-flat">;
253
+ }, "strip", z.ZodTypeAny, {
254
+ kind: "parallel";
255
+ maxClaims: number;
256
+ maxClaimsPerSolver: number;
257
+ claimWindow: "task-window";
258
+ selection: "all-valid-solutions-scored";
259
+ economics: "testnet-flat";
260
+ }, {
261
+ kind: "parallel";
262
+ maxClaims: number;
263
+ maxClaimsPerSolver: number;
264
+ claimWindow: "task-window";
265
+ selection: "all-valid-solutions-scored";
266
+ economics: "testnet-flat";
267
+ }>;
268
+ spec: z.ZodObject<{
269
+ question: z.ZodObject<{
270
+ kind: z.ZodLiteral<"binary">;
271
+ text: z.ZodString;
272
+ yesLabel: z.ZodLiteral<"YES">;
273
+ noLabel: z.ZodLiteral<"NO">;
274
+ }, "strip", z.ZodTypeAny, {
275
+ kind: "binary";
276
+ text: string;
277
+ yesLabel: "YES";
278
+ noLabel: "NO";
279
+ }, {
280
+ kind: "binary";
281
+ text: string;
282
+ yesLabel: "YES";
283
+ noLabel: "NO";
284
+ }>;
285
+ source: z.ZodObject<{
286
+ type: z.ZodLiteral<"prediction-market">;
287
+ venue: z.ZodLiteral<"polymarket">;
288
+ url: z.ZodString;
289
+ identifiers: z.ZodObject<{
290
+ marketId: z.ZodString;
291
+ conditionId: z.ZodString;
292
+ yesTokenId: z.ZodString;
293
+ noTokenId: z.ZodString;
294
+ }, "strip", z.ZodTypeAny, {
295
+ marketId: string;
296
+ conditionId: string;
297
+ yesTokenId: string;
298
+ noTokenId: string;
299
+ }, {
300
+ marketId: string;
301
+ conditionId: string;
302
+ yesTokenId: string;
303
+ noTokenId: string;
304
+ }>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ type: "prediction-market";
307
+ venue: "polymarket";
308
+ url: string;
309
+ identifiers: {
310
+ marketId: string;
311
+ conditionId: string;
312
+ yesTokenId: string;
313
+ noTokenId: string;
314
+ };
315
+ }, {
316
+ type: "prediction-market";
317
+ venue: "polymarket";
318
+ url: string;
319
+ identifiers: {
320
+ marketId: string;
321
+ conditionId: string;
322
+ yesTokenId: string;
323
+ noTokenId: string;
324
+ };
325
+ }>;
326
+ resolution: z.ZodObject<{
327
+ expectedResolutionTime: z.ZodString;
328
+ rulesText: z.ZodString;
329
+ rulesUrl: z.ZodString;
330
+ timezone: z.ZodOptional<z.ZodString>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ expectedResolutionTime: string;
333
+ rulesText: string;
334
+ rulesUrl: string;
335
+ timezone?: string | undefined;
336
+ }, {
337
+ expectedResolutionTime: string;
338
+ rulesText: string;
339
+ rulesUrl: string;
340
+ timezone?: string | undefined;
341
+ }>;
342
+ consensusSnapshot: z.ZodObject<{
343
+ sampledAt: z.ZodString;
344
+ probabilityYes: z.ZodString;
345
+ method: z.ZodLiteral<"best-bid-ask-midpoint">;
346
+ bestBidYes: z.ZodString;
347
+ bestAskYes: z.ZodString;
348
+ spread: z.ZodString;
349
+ source: z.ZodLiteral<"polymarket-clob">;
350
+ }, "strip", z.ZodTypeAny, {
351
+ source: "polymarket-clob";
352
+ sampledAt: string;
353
+ probabilityYes: string;
354
+ method: "best-bid-ask-midpoint";
355
+ bestBidYes: string;
356
+ bestAskYes: string;
357
+ spread: string;
358
+ }, {
359
+ source: "polymarket-clob";
360
+ sampledAt: string;
361
+ probabilityYes: string;
362
+ method: "best-bid-ask-midpoint";
363
+ bestBidYes: string;
364
+ bestAskYes: string;
365
+ spread: string;
366
+ }>;
367
+ eligibilitySnapshot: z.ZodObject<{
368
+ sampledAt: z.ZodString;
369
+ timeToResolutionHours: z.ZodNumber;
370
+ liquidityUsd: z.ZodString;
371
+ volume24hUsd: z.ZodString;
372
+ orderbookAgeSeconds: z.ZodNumber;
373
+ selectionReason: z.ZodString;
374
+ }, "strip", z.ZodTypeAny, {
375
+ sampledAt: string;
376
+ timeToResolutionHours: number;
377
+ liquidityUsd: string;
378
+ volume24hUsd: string;
379
+ orderbookAgeSeconds: number;
380
+ selectionReason: string;
381
+ }, {
382
+ sampledAt: string;
383
+ timeToResolutionHours: number;
384
+ liquidityUsd: string;
385
+ volume24hUsd: string;
386
+ orderbookAgeSeconds: number;
387
+ selectionReason: string;
388
+ }>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ question: {
391
+ kind: "binary";
392
+ text: string;
393
+ yesLabel: "YES";
394
+ noLabel: "NO";
395
+ };
396
+ source: {
397
+ type: "prediction-market";
398
+ venue: "polymarket";
399
+ url: string;
400
+ identifiers: {
401
+ marketId: string;
402
+ conditionId: string;
403
+ yesTokenId: string;
404
+ noTokenId: string;
405
+ };
406
+ };
407
+ resolution: {
408
+ expectedResolutionTime: string;
409
+ rulesText: string;
410
+ rulesUrl: string;
411
+ timezone?: string | undefined;
412
+ };
413
+ consensusSnapshot: {
414
+ source: "polymarket-clob";
415
+ sampledAt: string;
416
+ probabilityYes: string;
417
+ method: "best-bid-ask-midpoint";
418
+ bestBidYes: string;
419
+ bestAskYes: string;
420
+ spread: string;
421
+ };
422
+ eligibilitySnapshot: {
423
+ sampledAt: string;
424
+ timeToResolutionHours: number;
425
+ liquidityUsd: string;
426
+ volume24hUsd: string;
427
+ orderbookAgeSeconds: number;
428
+ selectionReason: string;
429
+ };
430
+ }, {
431
+ question: {
432
+ kind: "binary";
433
+ text: string;
434
+ yesLabel: "YES";
435
+ noLabel: "NO";
436
+ };
437
+ source: {
438
+ type: "prediction-market";
439
+ venue: "polymarket";
440
+ url: string;
441
+ identifiers: {
442
+ marketId: string;
443
+ conditionId: string;
444
+ yesTokenId: string;
445
+ noTokenId: string;
446
+ };
447
+ };
448
+ resolution: {
449
+ expectedResolutionTime: string;
450
+ rulesText: string;
451
+ rulesUrl: string;
452
+ timezone?: string | undefined;
453
+ };
454
+ consensusSnapshot: {
455
+ source: "polymarket-clob";
456
+ sampledAt: string;
457
+ probabilityYes: string;
458
+ method: "best-bid-ask-midpoint";
459
+ bestBidYes: string;
460
+ bestAskYes: string;
461
+ spread: string;
462
+ };
463
+ eligibilitySnapshot: {
464
+ sampledAt: string;
465
+ timeToResolutionHours: number;
466
+ liquidityUsd: string;
467
+ volume24hUsd: string;
468
+ orderbookAgeSeconds: number;
469
+ selectionReason: string;
470
+ };
471
+ }>;
472
+ eligibility: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ description: string;
475
+ id: string;
476
+ solverType: "prediction.v1";
477
+ window: {
478
+ startTs: number;
479
+ endTs: number;
480
+ };
481
+ claimPolicy: {
482
+ kind: "parallel";
483
+ maxClaims: number;
484
+ maxClaimsPerSolver: number;
485
+ claimWindow: "task-window";
486
+ selection: "all-valid-solutions-scored";
487
+ economics: "testnet-flat";
488
+ };
489
+ spec: {
490
+ question: {
491
+ kind: "binary";
492
+ text: string;
493
+ yesLabel: "YES";
494
+ noLabel: "NO";
495
+ };
496
+ source: {
497
+ type: "prediction-market";
498
+ venue: "polymarket";
499
+ url: string;
500
+ identifiers: {
501
+ marketId: string;
502
+ conditionId: string;
503
+ yesTokenId: string;
504
+ noTokenId: string;
505
+ };
506
+ };
507
+ resolution: {
508
+ expectedResolutionTime: string;
509
+ rulesText: string;
510
+ rulesUrl: string;
511
+ timezone?: string | undefined;
512
+ };
513
+ consensusSnapshot: {
514
+ source: "polymarket-clob";
515
+ sampledAt: string;
516
+ probabilityYes: string;
517
+ method: "best-bid-ask-midpoint";
518
+ bestBidYes: string;
519
+ bestAskYes: string;
520
+ spread: string;
521
+ };
522
+ eligibilitySnapshot: {
523
+ sampledAt: string;
524
+ timeToResolutionHours: number;
525
+ liquidityUsd: string;
526
+ volume24hUsd: string;
527
+ orderbookAgeSeconds: number;
528
+ selectionReason: string;
529
+ };
530
+ };
531
+ eligibility: Record<string, unknown>;
532
+ role?: "restoration" | "evaluation" | undefined;
533
+ }, {
534
+ description: string;
535
+ id: string;
536
+ solverType: "prediction.v1";
537
+ window: {
538
+ startTs: number;
539
+ endTs: number;
540
+ };
541
+ claimPolicy: {
542
+ kind: "parallel";
543
+ maxClaims: number;
544
+ maxClaimsPerSolver: number;
545
+ claimWindow: "task-window";
546
+ selection: "all-valid-solutions-scored";
547
+ economics: "testnet-flat";
548
+ };
549
+ spec: {
550
+ question: {
551
+ kind: "binary";
552
+ text: string;
553
+ yesLabel: "YES";
554
+ noLabel: "NO";
555
+ };
556
+ source: {
557
+ type: "prediction-market";
558
+ venue: "polymarket";
559
+ url: string;
560
+ identifiers: {
561
+ marketId: string;
562
+ conditionId: string;
563
+ yesTokenId: string;
564
+ noTokenId: string;
565
+ };
566
+ };
567
+ resolution: {
568
+ expectedResolutionTime: string;
569
+ rulesText: string;
570
+ rulesUrl: string;
571
+ timezone?: string | undefined;
572
+ };
573
+ consensusSnapshot: {
574
+ source: "polymarket-clob";
575
+ sampledAt: string;
576
+ probabilityYes: string;
577
+ method: "best-bid-ask-midpoint";
578
+ bestBidYes: string;
579
+ bestAskYes: string;
580
+ spread: string;
581
+ };
582
+ eligibilitySnapshot: {
583
+ sampledAt: string;
584
+ timeToResolutionHours: number;
585
+ liquidityUsd: string;
586
+ volume24hUsd: string;
587
+ orderbookAgeSeconds: number;
588
+ selectionReason: string;
589
+ };
590
+ };
591
+ role?: "restoration" | "evaluation" | undefined;
592
+ eligibility?: Record<string, unknown> | undefined;
593
+ }>, {
594
+ description: string;
595
+ id: string;
596
+ solverType: "prediction.v1";
597
+ window: {
598
+ startTs: number;
599
+ endTs: number;
600
+ };
601
+ claimPolicy: {
602
+ kind: "parallel";
603
+ maxClaims: number;
604
+ maxClaimsPerSolver: number;
605
+ claimWindow: "task-window";
606
+ selection: "all-valid-solutions-scored";
607
+ economics: "testnet-flat";
608
+ };
609
+ spec: {
610
+ question: {
611
+ kind: "binary";
612
+ text: string;
613
+ yesLabel: "YES";
614
+ noLabel: "NO";
615
+ };
616
+ source: {
617
+ type: "prediction-market";
618
+ venue: "polymarket";
619
+ url: string;
620
+ identifiers: {
621
+ marketId: string;
622
+ conditionId: string;
623
+ yesTokenId: string;
624
+ noTokenId: string;
625
+ };
626
+ };
627
+ resolution: {
628
+ expectedResolutionTime: string;
629
+ rulesText: string;
630
+ rulesUrl: string;
631
+ timezone?: string | undefined;
632
+ };
633
+ consensusSnapshot: {
634
+ source: "polymarket-clob";
635
+ sampledAt: string;
636
+ probabilityYes: string;
637
+ method: "best-bid-ask-midpoint";
638
+ bestBidYes: string;
639
+ bestAskYes: string;
640
+ spread: string;
641
+ };
642
+ eligibilitySnapshot: {
643
+ sampledAt: string;
644
+ timeToResolutionHours: number;
645
+ liquidityUsd: string;
646
+ volume24hUsd: string;
647
+ orderbookAgeSeconds: number;
648
+ selectionReason: string;
649
+ };
650
+ };
651
+ eligibility: Record<string, unknown>;
652
+ role?: "restoration" | "evaluation" | undefined;
653
+ }, {
654
+ description: string;
655
+ id: string;
656
+ solverType: "prediction.v1";
657
+ window: {
658
+ startTs: number;
659
+ endTs: number;
660
+ };
661
+ claimPolicy: {
662
+ kind: "parallel";
663
+ maxClaims: number;
664
+ maxClaimsPerSolver: number;
665
+ claimWindow: "task-window";
666
+ selection: "all-valid-solutions-scored";
667
+ economics: "testnet-flat";
668
+ };
669
+ spec: {
670
+ question: {
671
+ kind: "binary";
672
+ text: string;
673
+ yesLabel: "YES";
674
+ noLabel: "NO";
675
+ };
676
+ source: {
677
+ type: "prediction-market";
678
+ venue: "polymarket";
679
+ url: string;
680
+ identifiers: {
681
+ marketId: string;
682
+ conditionId: string;
683
+ yesTokenId: string;
684
+ noTokenId: string;
685
+ };
686
+ };
687
+ resolution: {
688
+ expectedResolutionTime: string;
689
+ rulesText: string;
690
+ rulesUrl: string;
691
+ timezone?: string | undefined;
692
+ };
693
+ consensusSnapshot: {
694
+ source: "polymarket-clob";
695
+ sampledAt: string;
696
+ probabilityYes: string;
697
+ method: "best-bid-ask-midpoint";
698
+ bestBidYes: string;
699
+ bestAskYes: string;
700
+ spread: string;
701
+ };
702
+ eligibilitySnapshot: {
703
+ sampledAt: string;
704
+ timeToResolutionHours: number;
705
+ liquidityUsd: string;
706
+ volume24hUsd: string;
707
+ orderbookAgeSeconds: number;
708
+ selectionReason: string;
709
+ };
710
+ };
711
+ role?: "restoration" | "evaluation" | undefined;
712
+ eligibility?: Record<string, unknown> | undefined;
713
+ }>, {
714
+ description: string;
715
+ id: string;
716
+ solverType: "prediction.v1";
717
+ window: {
718
+ startTs: number;
719
+ endTs: number;
720
+ };
721
+ claimPolicy: {
722
+ kind: "parallel";
723
+ maxClaims: number;
724
+ maxClaimsPerSolver: number;
725
+ claimWindow: "task-window";
726
+ selection: "all-valid-solutions-scored";
727
+ economics: "testnet-flat";
728
+ };
729
+ spec: {
730
+ question: {
731
+ kind: "binary";
732
+ text: string;
733
+ yesLabel: "YES";
734
+ noLabel: "NO";
735
+ };
736
+ source: {
737
+ type: "prediction-market";
738
+ venue: "polymarket";
739
+ url: string;
740
+ identifiers: {
741
+ marketId: string;
742
+ conditionId: string;
743
+ yesTokenId: string;
744
+ noTokenId: string;
745
+ };
746
+ };
747
+ resolution: {
748
+ expectedResolutionTime: string;
749
+ rulesText: string;
750
+ rulesUrl: string;
751
+ timezone?: string | undefined;
752
+ };
753
+ consensusSnapshot: {
754
+ source: "polymarket-clob";
755
+ sampledAt: string;
756
+ probabilityYes: string;
757
+ method: "best-bid-ask-midpoint";
758
+ bestBidYes: string;
759
+ bestAskYes: string;
760
+ spread: string;
761
+ };
762
+ eligibilitySnapshot: {
763
+ sampledAt: string;
764
+ timeToResolutionHours: number;
765
+ liquidityUsd: string;
766
+ volume24hUsd: string;
767
+ orderbookAgeSeconds: number;
768
+ selectionReason: string;
769
+ };
770
+ };
771
+ eligibility: Record<string, unknown>;
772
+ role?: "restoration" | "evaluation" | undefined;
773
+ }, {
774
+ description: string;
775
+ id: string;
776
+ solverType: "prediction.v1";
777
+ window: {
778
+ startTs: number;
779
+ endTs: number;
780
+ };
781
+ claimPolicy: {
782
+ kind: "parallel";
783
+ maxClaims: number;
784
+ maxClaimsPerSolver: number;
785
+ claimWindow: "task-window";
786
+ selection: "all-valid-solutions-scored";
787
+ economics: "testnet-flat";
788
+ };
789
+ spec: {
790
+ question: {
791
+ kind: "binary";
792
+ text: string;
793
+ yesLabel: "YES";
794
+ noLabel: "NO";
795
+ };
796
+ source: {
797
+ type: "prediction-market";
798
+ venue: "polymarket";
799
+ url: string;
800
+ identifiers: {
801
+ marketId: string;
802
+ conditionId: string;
803
+ yesTokenId: string;
804
+ noTokenId: string;
805
+ };
806
+ };
807
+ resolution: {
808
+ expectedResolutionTime: string;
809
+ rulesText: string;
810
+ rulesUrl: string;
811
+ timezone?: string | undefined;
812
+ };
813
+ consensusSnapshot: {
814
+ source: "polymarket-clob";
815
+ sampledAt: string;
816
+ probabilityYes: string;
817
+ method: "best-bid-ask-midpoint";
818
+ bestBidYes: string;
819
+ bestAskYes: string;
820
+ spread: string;
821
+ };
822
+ eligibilitySnapshot: {
823
+ sampledAt: string;
824
+ timeToResolutionHours: number;
825
+ liquidityUsd: string;
826
+ volume24hUsd: string;
827
+ orderbookAgeSeconds: number;
828
+ selectionReason: string;
829
+ };
830
+ };
831
+ role?: "restoration" | "evaluation" | undefined;
832
+ eligibility?: Record<string, unknown> | undefined;
833
+ }>;
834
+ export type PredictionV1Task = z.infer<typeof PredictionV1TaskSchema>;