@theliem/xmarket-sdk 1.0.12

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,2215 @@
1
+ {
2
+ "address": "A6N1F8MRsdgcojAx8p6FaECvw8mo8w6qJcWsbKQBANK4",
3
+ "metadata": {
4
+ "name": "conditional_tokens",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Conditional Tokens program for XMarket prediction platform"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "initialize_ctf_config",
12
+ "docs": [
13
+ "One-time setup. Caller becomes the CTF owner.",
14
+ "PDA init ensures this can only be called once."
15
+ ],
16
+ "discriminator": [
17
+ 110,
18
+ 148,
19
+ 53,
20
+ 34,
21
+ 122,
22
+ 228,
23
+ 77,
24
+ 132
25
+ ],
26
+ "accounts": [
27
+ {
28
+ "name": "payer",
29
+ "writable": true,
30
+ "signer": true
31
+ },
32
+ {
33
+ "name": "ctf_config",
34
+ "writable": true,
35
+ "pda": {
36
+ "seeds": [
37
+ {
38
+ "kind": "const",
39
+ "value": [
40
+ 99,
41
+ 116,
42
+ 102,
43
+ 95,
44
+ 99,
45
+ 111,
46
+ 110,
47
+ 102,
48
+ 105,
49
+ 103
50
+ ]
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "name": "system_program",
57
+ "address": "11111111111111111111111111111111"
58
+ }
59
+ ],
60
+ "args": []
61
+ },
62
+ {
63
+ "name": "initialize_vault",
64
+ "docs": [
65
+ "Initialize a shared collateral vault for a given collateral mint (e.g. USDC).",
66
+ "One vault per collateral type, shared across all conditions.",
67
+ "Requires ctf_config authority — only CTF owner can create vaults."
68
+ ],
69
+ "discriminator": [
70
+ 48,
71
+ 191,
72
+ 163,
73
+ 44,
74
+ 71,
75
+ 129,
76
+ 63,
77
+ 164
78
+ ],
79
+ "accounts": [
80
+ {
81
+ "name": "authority",
82
+ "docs": [
83
+ "Must be the CTF owner (as stored in ctf_config)"
84
+ ],
85
+ "writable": true,
86
+ "signer": true
87
+ },
88
+ {
89
+ "name": "payer",
90
+ "docs": [
91
+ "Payer for account creation (can differ from authority)"
92
+ ],
93
+ "writable": true,
94
+ "signer": true
95
+ },
96
+ {
97
+ "name": "ctf_config",
98
+ "docs": [
99
+ "CTF config — verifies authority is the CTF owner"
100
+ ],
101
+ "pda": {
102
+ "seeds": [
103
+ {
104
+ "kind": "const",
105
+ "value": [
106
+ 99,
107
+ 116,
108
+ 102,
109
+ 95,
110
+ 99,
111
+ 111,
112
+ 110,
113
+ 102,
114
+ 105,
115
+ 103
116
+ ]
117
+ }
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "name": "collateral_mint",
123
+ "docs": [
124
+ "The collateral token mint (e.g., USDC)"
125
+ ]
126
+ },
127
+ {
128
+ "name": "collateral_vault",
129
+ "docs": [
130
+ "The collateral vault state account"
131
+ ],
132
+ "writable": true,
133
+ "pda": {
134
+ "seeds": [
135
+ {
136
+ "kind": "const",
137
+ "value": [
138
+ 99,
139
+ 111,
140
+ 108,
141
+ 108,
142
+ 97,
143
+ 116,
144
+ 101,
145
+ 114,
146
+ 97,
147
+ 108,
148
+ 95,
149
+ 118,
150
+ 97,
151
+ 117,
152
+ 108,
153
+ 116
154
+ ]
155
+ },
156
+ {
157
+ "kind": "account",
158
+ "path": "collateral_mint"
159
+ }
160
+ ]
161
+ }
162
+ },
163
+ {
164
+ "name": "vault_token_account",
165
+ "docs": [
166
+ "The vault token account (holds ALL collateral for this mint type)"
167
+ ],
168
+ "writable": true,
169
+ "pda": {
170
+ "seeds": [
171
+ {
172
+ "kind": "const",
173
+ "value": [
174
+ 118,
175
+ 97,
176
+ 117,
177
+ 108,
178
+ 116,
179
+ 95,
180
+ 116,
181
+ 111,
182
+ 107,
183
+ 101,
184
+ 110
185
+ ]
186
+ },
187
+ {
188
+ "kind": "account",
189
+ "path": "collateral_mint"
190
+ }
191
+ ]
192
+ }
193
+ },
194
+ {
195
+ "name": "system_program",
196
+ "address": "11111111111111111111111111111111"
197
+ },
198
+ {
199
+ "name": "token_program",
200
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
201
+ },
202
+ {
203
+ "name": "rent",
204
+ "address": "SysvarRent111111111111111111111111111111111"
205
+ }
206
+ ],
207
+ "args": []
208
+ },
209
+ {
210
+ "name": "merge_position",
211
+ "docs": [
212
+ "Merge YES + NO tokens back into collateral.",
213
+ "User must have equal amounts of both outcome tokens."
214
+ ],
215
+ "discriminator": [
216
+ 226,
217
+ 29,
218
+ 189,
219
+ 110,
220
+ 130,
221
+ 19,
222
+ 223,
223
+ 219
224
+ ],
225
+ "accounts": [
226
+ {
227
+ "name": "user",
228
+ "signer": true
229
+ },
230
+ {
231
+ "name": "payer",
232
+ "docs": [
233
+ "Pays tx fee (BE wallet — user wallet needs zero SOL)"
234
+ ],
235
+ "writable": true,
236
+ "signer": true
237
+ },
238
+ {
239
+ "name": "condition",
240
+ "writable": true
241
+ },
242
+ {
243
+ "name": "collateral_vault",
244
+ "writable": true,
245
+ "pda": {
246
+ "seeds": [
247
+ {
248
+ "kind": "const",
249
+ "value": [
250
+ 99,
251
+ 111,
252
+ 108,
253
+ 108,
254
+ 97,
255
+ 116,
256
+ 101,
257
+ 114,
258
+ 97,
259
+ 108,
260
+ 95,
261
+ 118,
262
+ 97,
263
+ 117,
264
+ 108,
265
+ 116
266
+ ]
267
+ },
268
+ {
269
+ "kind": "account",
270
+ "path": "condition.collateral_mint",
271
+ "account": "Condition"
272
+ }
273
+ ]
274
+ }
275
+ },
276
+ {
277
+ "name": "vault_token_account",
278
+ "writable": true
279
+ },
280
+ {
281
+ "name": "user_collateral",
282
+ "writable": true
283
+ },
284
+ {
285
+ "name": "yes_mint",
286
+ "writable": true
287
+ },
288
+ {
289
+ "name": "user_yes_ata",
290
+ "writable": true
291
+ },
292
+ {
293
+ "name": "no_mint",
294
+ "writable": true
295
+ },
296
+ {
297
+ "name": "user_no_ata",
298
+ "writable": true
299
+ },
300
+ {
301
+ "name": "yes_position",
302
+ "writable": true
303
+ },
304
+ {
305
+ "name": "no_position",
306
+ "writable": true
307
+ },
308
+ {
309
+ "name": "token_program",
310
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
311
+ },
312
+ {
313
+ "name": "token_2022_program",
314
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
315
+ },
316
+ {
317
+ "name": "system_program",
318
+ "address": "11111111111111111111111111111111"
319
+ }
320
+ ],
321
+ "args": [
322
+ {
323
+ "name": "amount",
324
+ "type": "u64"
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ "name": "merge_positions_for_clob",
330
+ "docs": [
331
+ "Merge YES + NO tokens from two parties into USDC, paying each seller directly.",
332
+ "ONLY callable by condition.authorized_clob (CLOB config PDA) via CPI."
333
+ ],
334
+ "discriminator": [
335
+ 138,
336
+ 221,
337
+ 37,
338
+ 161,
339
+ 154,
340
+ 189,
341
+ 110,
342
+ 254
343
+ ],
344
+ "accounts": [
345
+ {
346
+ "name": "clob_authority",
347
+ "signer": true
348
+ },
349
+ {
350
+ "name": "payer",
351
+ "writable": true,
352
+ "signer": true
353
+ },
354
+ {
355
+ "name": "condition",
356
+ "writable": true
357
+ },
358
+ {
359
+ "name": "collateral_vault",
360
+ "writable": true,
361
+ "pda": {
362
+ "seeds": [
363
+ {
364
+ "kind": "const",
365
+ "value": [
366
+ 99,
367
+ 111,
368
+ 108,
369
+ 108,
370
+ 97,
371
+ 116,
372
+ 101,
373
+ 114,
374
+ 97,
375
+ 108,
376
+ 95,
377
+ 118,
378
+ 97,
379
+ 117,
380
+ 108,
381
+ 116
382
+ ]
383
+ },
384
+ {
385
+ "kind": "account",
386
+ "path": "condition.collateral_mint",
387
+ "account": "Condition"
388
+ }
389
+ ]
390
+ }
391
+ },
392
+ {
393
+ "name": "vault_token_account",
394
+ "writable": true
395
+ },
396
+ {
397
+ "name": "yes_mint",
398
+ "writable": true
399
+ },
400
+ {
401
+ "name": "from_yes"
402
+ },
403
+ {
404
+ "name": "from_yes_ata",
405
+ "writable": true
406
+ },
407
+ {
408
+ "name": "from_yes_position",
409
+ "writable": true
410
+ },
411
+ {
412
+ "name": "to_yes_collateral",
413
+ "writable": true
414
+ },
415
+ {
416
+ "name": "no_mint",
417
+ "writable": true
418
+ },
419
+ {
420
+ "name": "from_no"
421
+ },
422
+ {
423
+ "name": "from_no_ata",
424
+ "writable": true
425
+ },
426
+ {
427
+ "name": "from_no_position",
428
+ "writable": true
429
+ },
430
+ {
431
+ "name": "to_no_collateral",
432
+ "writable": true
433
+ },
434
+ {
435
+ "name": "token_2022_program",
436
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
437
+ },
438
+ {
439
+ "name": "token_program",
440
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
441
+ },
442
+ {
443
+ "name": "system_program",
444
+ "address": "11111111111111111111111111111111"
445
+ }
446
+ ],
447
+ "args": [
448
+ {
449
+ "name": "fill_amount",
450
+ "type": "u64"
451
+ },
452
+ {
453
+ "name": "yes_payout",
454
+ "type": "u64"
455
+ },
456
+ {
457
+ "name": "no_payout",
458
+ "type": "u64"
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ "name": "mint_positions_for_clob",
464
+ "docs": [
465
+ "Mint YES + NO tokens to two recipients after CLOB has deposited combined collateral.",
466
+ "ONLY callable by condition.authorized_clob (CLOB config PDA) via CPI."
467
+ ],
468
+ "discriminator": [
469
+ 233,
470
+ 148,
471
+ 204,
472
+ 16,
473
+ 187,
474
+ 18,
475
+ 58,
476
+ 113
477
+ ],
478
+ "accounts": [
479
+ {
480
+ "name": "clob_authority",
481
+ "docs": [
482
+ "CLOB config PDA — signs via invoke_signed from CLOB program.",
483
+ "Must match condition.authorized_clob."
484
+ ],
485
+ "signer": true
486
+ },
487
+ {
488
+ "name": "payer",
489
+ "docs": [
490
+ "Pays rent for new Position PDAs."
491
+ ],
492
+ "writable": true,
493
+ "signer": true
494
+ },
495
+ {
496
+ "name": "condition",
497
+ "writable": true
498
+ },
499
+ {
500
+ "name": "collateral_vault",
501
+ "writable": true,
502
+ "pda": {
503
+ "seeds": [
504
+ {
505
+ "kind": "const",
506
+ "value": [
507
+ 99,
508
+ 111,
509
+ 108,
510
+ 108,
511
+ 97,
512
+ 116,
513
+ 101,
514
+ 114,
515
+ 97,
516
+ 108,
517
+ 95,
518
+ 118,
519
+ 97,
520
+ 117,
521
+ 108,
522
+ 116
523
+ ]
524
+ },
525
+ {
526
+ "kind": "account",
527
+ "path": "condition.collateral_mint",
528
+ "account": "Condition"
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ {
534
+ "name": "vault_token_account",
535
+ "docs": [
536
+ "Read-only — balance checked to verify CLOB already deposited collateral."
537
+ ]
538
+ },
539
+ {
540
+ "name": "yes_mint",
541
+ "writable": true
542
+ },
543
+ {
544
+ "name": "recipient_yes"
545
+ },
546
+ {
547
+ "name": "recipient_yes_ata",
548
+ "writable": true
549
+ },
550
+ {
551
+ "name": "yes_position",
552
+ "writable": true
553
+ },
554
+ {
555
+ "name": "no_mint",
556
+ "writable": true
557
+ },
558
+ {
559
+ "name": "recipient_no"
560
+ },
561
+ {
562
+ "name": "recipient_no_ata",
563
+ "writable": true
564
+ },
565
+ {
566
+ "name": "no_position",
567
+ "writable": true
568
+ },
569
+ {
570
+ "name": "mint_authority",
571
+ "pda": {
572
+ "seeds": [
573
+ {
574
+ "kind": "const",
575
+ "value": [
576
+ 109,
577
+ 105,
578
+ 110,
579
+ 116,
580
+ 95,
581
+ 97,
582
+ 117,
583
+ 116,
584
+ 104,
585
+ 111,
586
+ 114,
587
+ 105,
588
+ 116,
589
+ 121
590
+ ]
591
+ },
592
+ {
593
+ "kind": "account",
594
+ "path": "condition"
595
+ }
596
+ ]
597
+ }
598
+ },
599
+ {
600
+ "name": "token_2022_program",
601
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
602
+ },
603
+ {
604
+ "name": "token_program",
605
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
606
+ },
607
+ {
608
+ "name": "system_program",
609
+ "address": "11111111111111111111111111111111"
610
+ }
611
+ ],
612
+ "args": [
613
+ {
614
+ "name": "fill_amount",
615
+ "type": "u64"
616
+ },
617
+ {
618
+ "name": "yes_cost",
619
+ "type": "u64"
620
+ },
621
+ {
622
+ "name": "no_cost",
623
+ "type": "u64"
624
+ }
625
+ ]
626
+ },
627
+ {
628
+ "name": "prepare_condition",
629
+ "docs": [
630
+ "Prepare a new binary condition: creates Condition PDA + YES/NO Token-2022 mints.",
631
+ "Called by QuestionMarket via CPI when a question is created."
632
+ ],
633
+ "discriminator": [
634
+ 245,
635
+ 103,
636
+ 50,
637
+ 34,
638
+ 239,
639
+ 55,
640
+ 114,
641
+ 1
642
+ ],
643
+ "accounts": [
644
+ {
645
+ "name": "oracle",
646
+ "docs": [
647
+ "The oracle config pubkey that will resolve this condition"
648
+ ]
649
+ },
650
+ {
651
+ "name": "condition",
652
+ "docs": [
653
+ "Condition PDA — seeds: [CONDITION_SEED, oracle, question_id]"
654
+ ],
655
+ "writable": true,
656
+ "pda": {
657
+ "seeds": [
658
+ {
659
+ "kind": "const",
660
+ "value": [
661
+ 99,
662
+ 111,
663
+ 110,
664
+ 100,
665
+ 105,
666
+ 116,
667
+ 105,
668
+ 111,
669
+ 110
670
+ ]
671
+ },
672
+ {
673
+ "kind": "account",
674
+ "path": "oracle"
675
+ },
676
+ {
677
+ "kind": "arg",
678
+ "path": "question_id"
679
+ }
680
+ ]
681
+ }
682
+ },
683
+ {
684
+ "name": "yes_mint",
685
+ "docs": [
686
+ "YES Token-2022 mint — deterministic PDA from [YES_MINT_SEED, condition]"
687
+ ],
688
+ "writable": true,
689
+ "pda": {
690
+ "seeds": [
691
+ {
692
+ "kind": "const",
693
+ "value": [
694
+ 121,
695
+ 101,
696
+ 115,
697
+ 95,
698
+ 109,
699
+ 105,
700
+ 110,
701
+ 116
702
+ ]
703
+ },
704
+ {
705
+ "kind": "account",
706
+ "path": "condition"
707
+ }
708
+ ]
709
+ }
710
+ },
711
+ {
712
+ "name": "no_mint",
713
+ "docs": [
714
+ "NO Token-2022 mint — deterministic PDA from [NO_MINT_SEED, condition]"
715
+ ],
716
+ "writable": true,
717
+ "pda": {
718
+ "seeds": [
719
+ {
720
+ "kind": "const",
721
+ "value": [
722
+ 110,
723
+ 111,
724
+ 95,
725
+ 109,
726
+ 105,
727
+ 110,
728
+ 116
729
+ ]
730
+ },
731
+ {
732
+ "kind": "account",
733
+ "path": "condition"
734
+ }
735
+ ]
736
+ }
737
+ },
738
+ {
739
+ "name": "mint_authority",
740
+ "docs": [
741
+ "Mint authority PDA — signs mint_to / burn during split/merge/redeem",
742
+ "seeds: [MINT_AUTHORITY_SEED, condition]"
743
+ ],
744
+ "pda": {
745
+ "seeds": [
746
+ {
747
+ "kind": "const",
748
+ "value": [
749
+ 109,
750
+ 105,
751
+ 110,
752
+ 116,
753
+ 95,
754
+ 97,
755
+ 117,
756
+ 116,
757
+ 104,
758
+ 111,
759
+ 114,
760
+ 105,
761
+ 116,
762
+ 121
763
+ ]
764
+ },
765
+ {
766
+ "kind": "account",
767
+ "path": "condition"
768
+ }
769
+ ]
770
+ }
771
+ },
772
+ {
773
+ "name": "collateral_mint",
774
+ "docs": [
775
+ "Collateral mint (USDC)"
776
+ ]
777
+ },
778
+ {
779
+ "name": "collateral_vault",
780
+ "docs": [
781
+ "Shared collateral vault (must be initialized first)"
782
+ ],
783
+ "writable": true,
784
+ "pda": {
785
+ "seeds": [
786
+ {
787
+ "kind": "const",
788
+ "value": [
789
+ 99,
790
+ 111,
791
+ 108,
792
+ 108,
793
+ 97,
794
+ 116,
795
+ 101,
796
+ 114,
797
+ 97,
798
+ 108,
799
+ 95,
800
+ 118,
801
+ 97,
802
+ 117,
803
+ 108,
804
+ 116
805
+ ]
806
+ },
807
+ {
808
+ "kind": "account",
809
+ "path": "collateral_mint"
810
+ }
811
+ ]
812
+ }
813
+ },
814
+ {
815
+ "name": "payer",
816
+ "writable": true,
817
+ "signer": true
818
+ },
819
+ {
820
+ "name": "token_program",
821
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
822
+ },
823
+ {
824
+ "name": "system_program",
825
+ "address": "11111111111111111111111111111111"
826
+ },
827
+ {
828
+ "name": "rent",
829
+ "address": "SysvarRent111111111111111111111111111111111"
830
+ }
831
+ ],
832
+ "args": [
833
+ {
834
+ "name": "question_id",
835
+ "type": {
836
+ "array": [
837
+ "u8",
838
+ 32
839
+ ]
840
+ }
841
+ },
842
+ {
843
+ "name": "hook_program",
844
+ "type": "pubkey"
845
+ },
846
+ {
847
+ "name": "authorized_clob",
848
+ "type": "pubkey"
849
+ }
850
+ ]
851
+ },
852
+ {
853
+ "name": "redeem_positions",
854
+ "docs": [
855
+ "Redeem positions after resolution.",
856
+ "Burns all outcome tokens; winning token holders receive USDC proportional to payout."
857
+ ],
858
+ "discriminator": [
859
+ 72,
860
+ 165,
861
+ 213,
862
+ 89,
863
+ 22,
864
+ 234,
865
+ 44,
866
+ 236
867
+ ],
868
+ "accounts": [
869
+ {
870
+ "name": "user",
871
+ "signer": true
872
+ },
873
+ {
874
+ "name": "payer",
875
+ "docs": [
876
+ "Pays tx fee (BE wallet — user wallet needs zero SOL)"
877
+ ],
878
+ "writable": true,
879
+ "signer": true
880
+ },
881
+ {
882
+ "name": "condition",
883
+ "writable": true
884
+ },
885
+ {
886
+ "name": "collateral_vault",
887
+ "writable": true,
888
+ "pda": {
889
+ "seeds": [
890
+ {
891
+ "kind": "const",
892
+ "value": [
893
+ 99,
894
+ 111,
895
+ 108,
896
+ 108,
897
+ 97,
898
+ 116,
899
+ 101,
900
+ 114,
901
+ 97,
902
+ 108,
903
+ 95,
904
+ 118,
905
+ 97,
906
+ 117,
907
+ 108,
908
+ 116
909
+ ]
910
+ },
911
+ {
912
+ "kind": "account",
913
+ "path": "condition.collateral_mint",
914
+ "account": "Condition"
915
+ }
916
+ ]
917
+ }
918
+ },
919
+ {
920
+ "name": "vault_token_account",
921
+ "writable": true
922
+ },
923
+ {
924
+ "name": "user_collateral",
925
+ "writable": true
926
+ },
927
+ {
928
+ "name": "yes_mint",
929
+ "writable": true
930
+ },
931
+ {
932
+ "name": "user_yes_ata",
933
+ "writable": true
934
+ },
935
+ {
936
+ "name": "no_mint",
937
+ "writable": true
938
+ },
939
+ {
940
+ "name": "user_no_ata",
941
+ "writable": true
942
+ },
943
+ {
944
+ "name": "yes_position",
945
+ "writable": true
946
+ },
947
+ {
948
+ "name": "no_position",
949
+ "writable": true
950
+ },
951
+ {
952
+ "name": "token_program",
953
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
954
+ },
955
+ {
956
+ "name": "token_2022_program",
957
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
958
+ },
959
+ {
960
+ "name": "system_program",
961
+ "address": "11111111111111111111111111111111"
962
+ }
963
+ ],
964
+ "args": []
965
+ },
966
+ {
967
+ "name": "report_payouts",
968
+ "docs": [
969
+ "Report payouts directly as the oracle — resolves the condition.",
970
+ "The signer must match condition.oracle."
971
+ ],
972
+ "discriminator": [
973
+ 133,
974
+ 122,
975
+ 65,
976
+ 66,
977
+ 174,
978
+ 245,
979
+ 105,
980
+ 71
981
+ ],
982
+ "accounts": [
983
+ {
984
+ "name": "oracle",
985
+ "docs": [
986
+ "The oracle resolving the condition (must match condition.oracle)"
987
+ ],
988
+ "signer": true
989
+ },
990
+ {
991
+ "name": "condition",
992
+ "docs": [
993
+ "The condition being resolved"
994
+ ],
995
+ "writable": true
996
+ }
997
+ ],
998
+ "args": [
999
+ {
1000
+ "name": "payout_numerators",
1001
+ "type": {
1002
+ "vec": "u64"
1003
+ }
1004
+ }
1005
+ ]
1006
+ },
1007
+ {
1008
+ "name": "set_payout",
1009
+ "docs": [
1010
+ "Set payout and mark condition as resolved — ONLY callable by QuestionMarket via CPI."
1011
+ ],
1012
+ "discriminator": [
1013
+ 55,
1014
+ 43,
1015
+ 132,
1016
+ 51,
1017
+ 227,
1018
+ 169,
1019
+ 242,
1020
+ 195
1021
+ ],
1022
+ "accounts": [
1023
+ {
1024
+ "name": "authority",
1025
+ "docs": [
1026
+ "QuestionMarket config PDA or Oracle config PDA — must sign via CPI"
1027
+ ],
1028
+ "signer": true
1029
+ },
1030
+ {
1031
+ "name": "condition",
1032
+ "writable": true
1033
+ }
1034
+ ],
1035
+ "args": [
1036
+ {
1037
+ "name": "payout_numerators",
1038
+ "type": {
1039
+ "vec": "u64"
1040
+ }
1041
+ }
1042
+ ]
1043
+ },
1044
+ {
1045
+ "name": "split_position",
1046
+ "docs": [
1047
+ "Split collateral (USDC) into YES + NO Token-2022 tokens.",
1048
+ "User gets equal amounts of both. ATAs are created if needed."
1049
+ ],
1050
+ "discriminator": [
1051
+ 172,
1052
+ 241,
1053
+ 221,
1054
+ 138,
1055
+ 161,
1056
+ 29,
1057
+ 253,
1058
+ 42
1059
+ ],
1060
+ "accounts": [
1061
+ {
1062
+ "name": "user",
1063
+ "docs": [
1064
+ "Economic actor — must hold collateral, receives YES/NO tokens"
1065
+ ],
1066
+ "signer": true
1067
+ },
1068
+ {
1069
+ "name": "payer",
1070
+ "docs": [
1071
+ "Pays rent for new ATAs / Position PDAs (can be BE wallet)"
1072
+ ],
1073
+ "writable": true,
1074
+ "signer": true
1075
+ },
1076
+ {
1077
+ "name": "condition",
1078
+ "writable": true
1079
+ },
1080
+ {
1081
+ "name": "collateral_vault",
1082
+ "writable": true,
1083
+ "pda": {
1084
+ "seeds": [
1085
+ {
1086
+ "kind": "const",
1087
+ "value": [
1088
+ 99,
1089
+ 111,
1090
+ 108,
1091
+ 108,
1092
+ 97,
1093
+ 116,
1094
+ 101,
1095
+ 114,
1096
+ 97,
1097
+ 108,
1098
+ 95,
1099
+ 118,
1100
+ 97,
1101
+ 117,
1102
+ 108,
1103
+ 116
1104
+ ]
1105
+ },
1106
+ {
1107
+ "kind": "account",
1108
+ "path": "condition.collateral_mint",
1109
+ "account": "Condition"
1110
+ }
1111
+ ]
1112
+ }
1113
+ },
1114
+ {
1115
+ "name": "vault_token_account",
1116
+ "writable": true
1117
+ },
1118
+ {
1119
+ "name": "user_collateral",
1120
+ "writable": true
1121
+ },
1122
+ {
1123
+ "name": "yes_mint",
1124
+ "writable": true
1125
+ },
1126
+ {
1127
+ "name": "user_yes_ata",
1128
+ "writable": true,
1129
+ "pda": {
1130
+ "seeds": [
1131
+ {
1132
+ "kind": "account",
1133
+ "path": "user"
1134
+ },
1135
+ {
1136
+ "kind": "account",
1137
+ "path": "token_2022_program"
1138
+ },
1139
+ {
1140
+ "kind": "account",
1141
+ "path": "yes_mint"
1142
+ }
1143
+ ],
1144
+ "program": {
1145
+ "kind": "const",
1146
+ "value": [
1147
+ 140,
1148
+ 151,
1149
+ 37,
1150
+ 143,
1151
+ 78,
1152
+ 36,
1153
+ 137,
1154
+ 241,
1155
+ 187,
1156
+ 61,
1157
+ 16,
1158
+ 41,
1159
+ 20,
1160
+ 142,
1161
+ 13,
1162
+ 131,
1163
+ 11,
1164
+ 90,
1165
+ 19,
1166
+ 153,
1167
+ 218,
1168
+ 255,
1169
+ 16,
1170
+ 132,
1171
+ 4,
1172
+ 142,
1173
+ 123,
1174
+ 216,
1175
+ 219,
1176
+ 233,
1177
+ 248,
1178
+ 89
1179
+ ]
1180
+ }
1181
+ }
1182
+ },
1183
+ {
1184
+ "name": "no_mint",
1185
+ "writable": true
1186
+ },
1187
+ {
1188
+ "name": "user_no_ata",
1189
+ "writable": true,
1190
+ "pda": {
1191
+ "seeds": [
1192
+ {
1193
+ "kind": "account",
1194
+ "path": "user"
1195
+ },
1196
+ {
1197
+ "kind": "account",
1198
+ "path": "token_2022_program"
1199
+ },
1200
+ {
1201
+ "kind": "account",
1202
+ "path": "no_mint"
1203
+ }
1204
+ ],
1205
+ "program": {
1206
+ "kind": "const",
1207
+ "value": [
1208
+ 140,
1209
+ 151,
1210
+ 37,
1211
+ 143,
1212
+ 78,
1213
+ 36,
1214
+ 137,
1215
+ 241,
1216
+ 187,
1217
+ 61,
1218
+ 16,
1219
+ 41,
1220
+ 20,
1221
+ 142,
1222
+ 13,
1223
+ 131,
1224
+ 11,
1225
+ 90,
1226
+ 19,
1227
+ 153,
1228
+ 218,
1229
+ 255,
1230
+ 16,
1231
+ 132,
1232
+ 4,
1233
+ 142,
1234
+ 123,
1235
+ 216,
1236
+ 219,
1237
+ 233,
1238
+ 248,
1239
+ 89
1240
+ ]
1241
+ }
1242
+ }
1243
+ },
1244
+ {
1245
+ "name": "yes_position",
1246
+ "writable": true
1247
+ },
1248
+ {
1249
+ "name": "no_position",
1250
+ "writable": true
1251
+ },
1252
+ {
1253
+ "name": "mint_authority",
1254
+ "pda": {
1255
+ "seeds": [
1256
+ {
1257
+ "kind": "const",
1258
+ "value": [
1259
+ 109,
1260
+ 105,
1261
+ 110,
1262
+ 116,
1263
+ 95,
1264
+ 97,
1265
+ 117,
1266
+ 116,
1267
+ 104,
1268
+ 111,
1269
+ 114,
1270
+ 105,
1271
+ 116,
1272
+ 121
1273
+ ]
1274
+ },
1275
+ {
1276
+ "kind": "account",
1277
+ "path": "condition"
1278
+ }
1279
+ ]
1280
+ }
1281
+ },
1282
+ {
1283
+ "name": "token_program",
1284
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1285
+ },
1286
+ {
1287
+ "name": "token_2022_program",
1288
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1289
+ },
1290
+ {
1291
+ "name": "associated_token_program",
1292
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1293
+ },
1294
+ {
1295
+ "name": "system_program",
1296
+ "address": "11111111111111111111111111111111"
1297
+ }
1298
+ ],
1299
+ "args": [
1300
+ {
1301
+ "name": "amount",
1302
+ "type": "u64"
1303
+ }
1304
+ ]
1305
+ },
1306
+ {
1307
+ "name": "transfer_position",
1308
+ "docs": [
1309
+ "Transfer positions between users — ONLY callable by the authorized CLOB program.",
1310
+ "Used during order matching to redistribute YES/NO tokens."
1311
+ ],
1312
+ "discriminator": [
1313
+ 139,
1314
+ 130,
1315
+ 102,
1316
+ 147,
1317
+ 135,
1318
+ 77,
1319
+ 113,
1320
+ 222
1321
+ ],
1322
+ "accounts": [
1323
+ {
1324
+ "name": "payer",
1325
+ "docs": [
1326
+ "Wallet that pays for creating `to_position` if it does not yet exist.",
1327
+ "Must be a system-owned account (no data) so System Program can debit it.",
1328
+ "Typically the operator keypair from the CLOB program."
1329
+ ],
1330
+ "writable": true,
1331
+ "signer": true
1332
+ },
1333
+ {
1334
+ "name": "clob_authority",
1335
+ "docs": [
1336
+ "The CLOB program must sign this instruction"
1337
+ ],
1338
+ "signer": true
1339
+ },
1340
+ {
1341
+ "name": "condition"
1342
+ },
1343
+ {
1344
+ "name": "outcome_mint",
1345
+ "writable": true
1346
+ },
1347
+ {
1348
+ "name": "from_user"
1349
+ },
1350
+ {
1351
+ "name": "from_token_account",
1352
+ "writable": true
1353
+ },
1354
+ {
1355
+ "name": "from_position",
1356
+ "writable": true
1357
+ },
1358
+ {
1359
+ "name": "to_user"
1360
+ },
1361
+ {
1362
+ "name": "to_token_account",
1363
+ "writable": true
1364
+ },
1365
+ {
1366
+ "name": "to_position",
1367
+ "writable": true
1368
+ },
1369
+ {
1370
+ "name": "token_2022_program",
1371
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1372
+ },
1373
+ {
1374
+ "name": "system_program",
1375
+ "address": "11111111111111111111111111111111"
1376
+ }
1377
+ ],
1378
+ "args": [
1379
+ {
1380
+ "name": "outcome_index",
1381
+ "type": "u8"
1382
+ },
1383
+ {
1384
+ "name": "amount",
1385
+ "type": "u64"
1386
+ }
1387
+ ]
1388
+ },
1389
+ {
1390
+ "name": "update_authorized_clob",
1391
+ "docs": [
1392
+ "Update the authorized CLOB on a condition — only callable by the condition's oracle."
1393
+ ],
1394
+ "discriminator": [
1395
+ 163,
1396
+ 149,
1397
+ 236,
1398
+ 248,
1399
+ 250,
1400
+ 46,
1401
+ 128,
1402
+ 223
1403
+ ],
1404
+ "accounts": [
1405
+ {
1406
+ "name": "oracle",
1407
+ "docs": [
1408
+ "The oracle that owns this condition — must sign"
1409
+ ],
1410
+ "writable": true,
1411
+ "signer": true
1412
+ },
1413
+ {
1414
+ "name": "condition",
1415
+ "docs": [
1416
+ "Condition PDA to update"
1417
+ ],
1418
+ "writable": true
1419
+ }
1420
+ ],
1421
+ "args": [
1422
+ {
1423
+ "name": "new_authorized_clob",
1424
+ "type": "pubkey"
1425
+ }
1426
+ ]
1427
+ }
1428
+ ],
1429
+ "accounts": [
1430
+ {
1431
+ "name": "CollateralVault",
1432
+ "discriminator": [
1433
+ 19,
1434
+ 189,
1435
+ 95,
1436
+ 155,
1437
+ 100,
1438
+ 9,
1439
+ 159,
1440
+ 145
1441
+ ]
1442
+ },
1443
+ {
1444
+ "name": "Condition",
1445
+ "discriminator": [
1446
+ 138,
1447
+ 226,
1448
+ 74,
1449
+ 204,
1450
+ 104,
1451
+ 23,
1452
+ 135,
1453
+ 63
1454
+ ]
1455
+ },
1456
+ {
1457
+ "name": "CtfConfig",
1458
+ "discriminator": [
1459
+ 156,
1460
+ 152,
1461
+ 80,
1462
+ 131,
1463
+ 186,
1464
+ 23,
1465
+ 9,
1466
+ 244
1467
+ ]
1468
+ },
1469
+ {
1470
+ "name": "Position",
1471
+ "discriminator": [
1472
+ 170,
1473
+ 188,
1474
+ 143,
1475
+ 228,
1476
+ 122,
1477
+ 64,
1478
+ 247,
1479
+ 208
1480
+ ]
1481
+ }
1482
+ ],
1483
+ "events": [
1484
+ {
1485
+ "name": "ConditionPrepared",
1486
+ "discriminator": [
1487
+ 78,
1488
+ 133,
1489
+ 221,
1490
+ 12,
1491
+ 90,
1492
+ 145,
1493
+ 68,
1494
+ 113
1495
+ ]
1496
+ },
1497
+ {
1498
+ "name": "ConditionResolved",
1499
+ "discriminator": [
1500
+ 35,
1501
+ 167,
1502
+ 14,
1503
+ 224,
1504
+ 166,
1505
+ 189,
1506
+ 149,
1507
+ 24
1508
+ ]
1509
+ },
1510
+ {
1511
+ "name": "PayoutsReported",
1512
+ "discriminator": [
1513
+ 2,
1514
+ 216,
1515
+ 13,
1516
+ 200,
1517
+ 42,
1518
+ 178,
1519
+ 34,
1520
+ 244
1521
+ ]
1522
+ },
1523
+ {
1524
+ "name": "PositionMerged",
1525
+ "discriminator": [
1526
+ 239,
1527
+ 79,
1528
+ 71,
1529
+ 159,
1530
+ 201,
1531
+ 11,
1532
+ 107,
1533
+ 245
1534
+ ]
1535
+ },
1536
+ {
1537
+ "name": "PositionSplit",
1538
+ "discriminator": [
1539
+ 5,
1540
+ 144,
1541
+ 121,
1542
+ 43,
1543
+ 146,
1544
+ 210,
1545
+ 116,
1546
+ 5
1547
+ ]
1548
+ },
1549
+ {
1550
+ "name": "PositionsMergedForClob",
1551
+ "discriminator": [
1552
+ 182,
1553
+ 0,
1554
+ 82,
1555
+ 207,
1556
+ 229,
1557
+ 77,
1558
+ 31,
1559
+ 155
1560
+ ]
1561
+ },
1562
+ {
1563
+ "name": "PositionsMintedForClob",
1564
+ "discriminator": [
1565
+ 150,
1566
+ 144,
1567
+ 43,
1568
+ 197,
1569
+ 57,
1570
+ 189,
1571
+ 82,
1572
+ 7
1573
+ ]
1574
+ },
1575
+ {
1576
+ "name": "PositionsRedeemed",
1577
+ "discriminator": [
1578
+ 120,
1579
+ 95,
1580
+ 137,
1581
+ 254,
1582
+ 147,
1583
+ 217,
1584
+ 106,
1585
+ 74
1586
+ ]
1587
+ },
1588
+ {
1589
+ "name": "TransferBatch",
1590
+ "discriminator": [
1591
+ 11,
1592
+ 228,
1593
+ 95,
1594
+ 88,
1595
+ 4,
1596
+ 149,
1597
+ 139,
1598
+ 92
1599
+ ]
1600
+ },
1601
+ {
1602
+ "name": "TransferSingle",
1603
+ "discriminator": [
1604
+ 139,
1605
+ 49,
1606
+ 113,
1607
+ 204,
1608
+ 250,
1609
+ 194,
1610
+ 38,
1611
+ 75
1612
+ ]
1613
+ },
1614
+ {
1615
+ "name": "VaultInitialized",
1616
+ "discriminator": [
1617
+ 180,
1618
+ 43,
1619
+ 207,
1620
+ 2,
1621
+ 18,
1622
+ 71,
1623
+ 3,
1624
+ 75
1625
+ ]
1626
+ }
1627
+ ],
1628
+ "types": [
1629
+ {
1630
+ "name": "CollateralVault",
1631
+ "docs": [
1632
+ "Global collateral vault - ONE vault per collateral type (e.g., USDC)",
1633
+ "Shared by ALL conditions using this collateral",
1634
+ "Similar to how EVM CTF contract holds all collateral in one place"
1635
+ ],
1636
+ "type": {
1637
+ "kind": "struct",
1638
+ "fields": [
1639
+ {
1640
+ "name": "version",
1641
+ "type": "u8"
1642
+ },
1643
+ {
1644
+ "name": "collateral_mint",
1645
+ "type": "pubkey"
1646
+ },
1647
+ {
1648
+ "name": "vault_token_account",
1649
+ "docs": [
1650
+ "The token account holding all collateral"
1651
+ ],
1652
+ "type": "pubkey"
1653
+ },
1654
+ {
1655
+ "name": "total_locked",
1656
+ "docs": [
1657
+ "Total collateral locked across ALL conditions"
1658
+ ],
1659
+ "type": "u64"
1660
+ },
1661
+ {
1662
+ "name": "condition_count",
1663
+ "docs": [
1664
+ "Number of conditions using this vault"
1665
+ ],
1666
+ "type": "u64"
1667
+ },
1668
+ {
1669
+ "name": "bump",
1670
+ "docs": [
1671
+ "Bump seed for this PDA"
1672
+ ],
1673
+ "type": "u8"
1674
+ },
1675
+ {
1676
+ "name": "vault_bump",
1677
+ "docs": [
1678
+ "Bump seed for the vault token account PDA"
1679
+ ],
1680
+ "type": "u8"
1681
+ },
1682
+ {
1683
+ "name": "_reserved",
1684
+ "docs": [
1685
+ "Reserved for future use"
1686
+ ],
1687
+ "type": {
1688
+ "array": [
1689
+ "u8",
1690
+ 64
1691
+ ]
1692
+ }
1693
+ }
1694
+ ]
1695
+ }
1696
+ },
1697
+ {
1698
+ "name": "Condition",
1699
+ "type": {
1700
+ "kind": "struct",
1701
+ "fields": [
1702
+ {
1703
+ "name": "version",
1704
+ "type": "u8"
1705
+ },
1706
+ {
1707
+ "name": "oracle",
1708
+ "type": "pubkey"
1709
+ },
1710
+ {
1711
+ "name": "question_id",
1712
+ "type": {
1713
+ "array": [
1714
+ "u8",
1715
+ 32
1716
+ ]
1717
+ }
1718
+ },
1719
+ {
1720
+ "name": "outcome_slot_count",
1721
+ "type": "u8"
1722
+ },
1723
+ {
1724
+ "name": "payout_numerators",
1725
+ "docs": [
1726
+ "Fixed-size payout array (binary only: index 0=NO, 1=YES)."
1727
+ ],
1728
+ "type": {
1729
+ "array": [
1730
+ "u64",
1731
+ 2
1732
+ ]
1733
+ }
1734
+ },
1735
+ {
1736
+ "name": "payout_denominator",
1737
+ "type": "u64"
1738
+ },
1739
+ {
1740
+ "name": "total_collateral",
1741
+ "type": "u64"
1742
+ },
1743
+ {
1744
+ "name": "collateral_mint",
1745
+ "type": "pubkey"
1746
+ },
1747
+ {
1748
+ "name": "collateral_vault",
1749
+ "type": "pubkey"
1750
+ },
1751
+ {
1752
+ "name": "yes_mint",
1753
+ "type": "pubkey"
1754
+ },
1755
+ {
1756
+ "name": "no_mint",
1757
+ "type": "pubkey"
1758
+ },
1759
+ {
1760
+ "name": "hook_program",
1761
+ "type": "pubkey"
1762
+ },
1763
+ {
1764
+ "name": "authorized_clob",
1765
+ "type": "pubkey"
1766
+ },
1767
+ {
1768
+ "name": "is_resolved",
1769
+ "type": "bool"
1770
+ },
1771
+ {
1772
+ "name": "resolved_at",
1773
+ "type": "i64"
1774
+ },
1775
+ {
1776
+ "name": "bump",
1777
+ "type": "u8"
1778
+ },
1779
+ {
1780
+ "name": "_reserved",
1781
+ "type": {
1782
+ "array": [
1783
+ "u8",
1784
+ 64
1785
+ ]
1786
+ }
1787
+ }
1788
+ ]
1789
+ }
1790
+ },
1791
+ {
1792
+ "name": "ConditionPrepared",
1793
+ "type": {
1794
+ "kind": "struct",
1795
+ "fields": [
1796
+ {
1797
+ "name": "condition",
1798
+ "type": "pubkey"
1799
+ },
1800
+ {
1801
+ "name": "oracle",
1802
+ "type": "pubkey"
1803
+ },
1804
+ {
1805
+ "name": "question_id",
1806
+ "type": {
1807
+ "array": [
1808
+ "u8",
1809
+ 32
1810
+ ]
1811
+ }
1812
+ },
1813
+ {
1814
+ "name": "yes_mint",
1815
+ "type": "pubkey"
1816
+ },
1817
+ {
1818
+ "name": "no_mint",
1819
+ "type": "pubkey"
1820
+ },
1821
+ {
1822
+ "name": "hook_program",
1823
+ "type": "pubkey"
1824
+ },
1825
+ {
1826
+ "name": "authorized_clob",
1827
+ "type": "pubkey"
1828
+ },
1829
+ {
1830
+ "name": "collateral_mint",
1831
+ "type": "pubkey"
1832
+ },
1833
+ {
1834
+ "name": "collateral_vault",
1835
+ "type": "pubkey"
1836
+ }
1837
+ ]
1838
+ }
1839
+ },
1840
+ {
1841
+ "name": "ConditionResolved",
1842
+ "type": {
1843
+ "kind": "struct",
1844
+ "fields": [
1845
+ {
1846
+ "name": "condition",
1847
+ "type": "pubkey"
1848
+ },
1849
+ {
1850
+ "name": "oracle",
1851
+ "type": "pubkey"
1852
+ },
1853
+ {
1854
+ "name": "question_id",
1855
+ "type": {
1856
+ "array": [
1857
+ "u8",
1858
+ 32
1859
+ ]
1860
+ }
1861
+ },
1862
+ {
1863
+ "name": "payout_numerators",
1864
+ "type": {
1865
+ "vec": "u64"
1866
+ }
1867
+ },
1868
+ {
1869
+ "name": "resolved_at",
1870
+ "type": "i64"
1871
+ }
1872
+ ]
1873
+ }
1874
+ },
1875
+ {
1876
+ "name": "CtfConfig",
1877
+ "type": {
1878
+ "kind": "struct",
1879
+ "fields": [
1880
+ {
1881
+ "name": "version",
1882
+ "type": "u8"
1883
+ },
1884
+ {
1885
+ "name": "owner",
1886
+ "type": "pubkey"
1887
+ },
1888
+ {
1889
+ "name": "bump",
1890
+ "type": "u8"
1891
+ }
1892
+ ]
1893
+ }
1894
+ },
1895
+ {
1896
+ "name": "PayoutsReported",
1897
+ "docs": [
1898
+ "Event emitted when payouts are reported"
1899
+ ],
1900
+ "type": {
1901
+ "kind": "struct",
1902
+ "fields": [
1903
+ {
1904
+ "name": "condition",
1905
+ "type": "pubkey"
1906
+ },
1907
+ {
1908
+ "name": "oracle",
1909
+ "type": "pubkey"
1910
+ },
1911
+ {
1912
+ "name": "payout_numerators",
1913
+ "type": {
1914
+ "vec": "u64"
1915
+ }
1916
+ },
1917
+ {
1918
+ "name": "payout_denominator",
1919
+ "type": "u64"
1920
+ },
1921
+ {
1922
+ "name": "resolved_at",
1923
+ "type": "i64"
1924
+ }
1925
+ ]
1926
+ }
1927
+ },
1928
+ {
1929
+ "name": "Position",
1930
+ "docs": [
1931
+ "ERC-1155 style position tracking",
1932
+ "Instead of SPL token mints, we track balances directly in PDAs",
1933
+ "One Position account per (owner, condition, outcome_index) tuple",
1934
+ "",
1935
+ "This matches how ERC-1155 works:",
1936
+ "- mapping(uint256 tokenId => mapping(address owner => uint256 balance))",
1937
+ "",
1938
+ "Where tokenId = hash(conditionId, outcomeIndex)"
1939
+ ],
1940
+ "type": {
1941
+ "kind": "struct",
1942
+ "fields": [
1943
+ {
1944
+ "name": "version",
1945
+ "type": "u8"
1946
+ },
1947
+ {
1948
+ "name": "owner",
1949
+ "type": "pubkey"
1950
+ },
1951
+ {
1952
+ "name": "condition",
1953
+ "docs": [
1954
+ "The condition this position belongs to"
1955
+ ],
1956
+ "type": "pubkey"
1957
+ },
1958
+ {
1959
+ "name": "outcome_index",
1960
+ "docs": [
1961
+ "The outcome index (0-based)"
1962
+ ],
1963
+ "type": "u8"
1964
+ },
1965
+ {
1966
+ "name": "balance",
1967
+ "docs": [
1968
+ "Position balance (like ERC-1155 balanceOf)"
1969
+ ],
1970
+ "type": "u64"
1971
+ },
1972
+ {
1973
+ "name": "bump",
1974
+ "docs": [
1975
+ "Bump seed for PDA derivation"
1976
+ ],
1977
+ "type": "u8"
1978
+ },
1979
+ {
1980
+ "name": "_reserved",
1981
+ "docs": [
1982
+ "Reserved for future use"
1983
+ ],
1984
+ "type": {
1985
+ "array": [
1986
+ "u8",
1987
+ 32
1988
+ ]
1989
+ }
1990
+ }
1991
+ ]
1992
+ }
1993
+ },
1994
+ {
1995
+ "name": "PositionMerged",
1996
+ "type": {
1997
+ "kind": "struct",
1998
+ "fields": [
1999
+ {
2000
+ "name": "condition",
2001
+ "type": "pubkey"
2002
+ },
2003
+ {
2004
+ "name": "user",
2005
+ "type": "pubkey"
2006
+ },
2007
+ {
2008
+ "name": "amount",
2009
+ "type": "u64"
2010
+ }
2011
+ ]
2012
+ }
2013
+ },
2014
+ {
2015
+ "name": "PositionSplit",
2016
+ "type": {
2017
+ "kind": "struct",
2018
+ "fields": [
2019
+ {
2020
+ "name": "condition",
2021
+ "type": "pubkey"
2022
+ },
2023
+ {
2024
+ "name": "user",
2025
+ "type": "pubkey"
2026
+ },
2027
+ {
2028
+ "name": "amount",
2029
+ "type": "u64"
2030
+ }
2031
+ ]
2032
+ }
2033
+ },
2034
+ {
2035
+ "name": "PositionsMergedForClob",
2036
+ "type": {
2037
+ "kind": "struct",
2038
+ "fields": [
2039
+ {
2040
+ "name": "condition",
2041
+ "type": "pubkey"
2042
+ },
2043
+ {
2044
+ "name": "from_yes",
2045
+ "type": "pubkey"
2046
+ },
2047
+ {
2048
+ "name": "from_no",
2049
+ "type": "pubkey"
2050
+ },
2051
+ {
2052
+ "name": "fill_amount",
2053
+ "type": "u64"
2054
+ },
2055
+ {
2056
+ "name": "yes_payout",
2057
+ "type": "u64"
2058
+ },
2059
+ {
2060
+ "name": "no_payout",
2061
+ "type": "u64"
2062
+ }
2063
+ ]
2064
+ }
2065
+ },
2066
+ {
2067
+ "name": "PositionsMintedForClob",
2068
+ "type": {
2069
+ "kind": "struct",
2070
+ "fields": [
2071
+ {
2072
+ "name": "condition",
2073
+ "type": "pubkey"
2074
+ },
2075
+ {
2076
+ "name": "recipient_yes",
2077
+ "type": "pubkey"
2078
+ },
2079
+ {
2080
+ "name": "recipient_no",
2081
+ "type": "pubkey"
2082
+ },
2083
+ {
2084
+ "name": "fill_amount",
2085
+ "type": "u64"
2086
+ },
2087
+ {
2088
+ "name": "yes_cost",
2089
+ "type": "u64"
2090
+ },
2091
+ {
2092
+ "name": "no_cost",
2093
+ "type": "u64"
2094
+ }
2095
+ ]
2096
+ }
2097
+ },
2098
+ {
2099
+ "name": "PositionsRedeemed",
2100
+ "type": {
2101
+ "kind": "struct",
2102
+ "fields": [
2103
+ {
2104
+ "name": "condition",
2105
+ "type": "pubkey"
2106
+ },
2107
+ {
2108
+ "name": "user",
2109
+ "type": "pubkey"
2110
+ },
2111
+ {
2112
+ "name": "yes_burned",
2113
+ "type": "u64"
2114
+ },
2115
+ {
2116
+ "name": "no_burned",
2117
+ "type": "u64"
2118
+ },
2119
+ {
2120
+ "name": "payout",
2121
+ "type": "u64"
2122
+ }
2123
+ ]
2124
+ }
2125
+ },
2126
+ {
2127
+ "name": "TransferBatch",
2128
+ "docs": [
2129
+ "Event emitted on batch transfers (like ERC-1155 TransferBatch)"
2130
+ ],
2131
+ "type": {
2132
+ "kind": "struct",
2133
+ "fields": [
2134
+ {
2135
+ "name": "operator",
2136
+ "type": "pubkey"
2137
+ },
2138
+ {
2139
+ "name": "from",
2140
+ "type": "pubkey"
2141
+ },
2142
+ {
2143
+ "name": "to",
2144
+ "type": "pubkey"
2145
+ },
2146
+ {
2147
+ "name": "condition",
2148
+ "type": "pubkey"
2149
+ },
2150
+ {
2151
+ "name": "outcome_indices",
2152
+ "type": "bytes"
2153
+ },
2154
+ {
2155
+ "name": "amounts",
2156
+ "type": {
2157
+ "vec": "u64"
2158
+ }
2159
+ }
2160
+ ]
2161
+ }
2162
+ },
2163
+ {
2164
+ "name": "TransferSingle",
2165
+ "docs": [
2166
+ "Event emitted on position transfers (like ERC-1155 TransferSingle)"
2167
+ ],
2168
+ "type": {
2169
+ "kind": "struct",
2170
+ "fields": [
2171
+ {
2172
+ "name": "operator",
2173
+ "type": "pubkey"
2174
+ },
2175
+ {
2176
+ "name": "from",
2177
+ "type": "pubkey"
2178
+ },
2179
+ {
2180
+ "name": "to",
2181
+ "type": "pubkey"
2182
+ },
2183
+ {
2184
+ "name": "condition",
2185
+ "type": "pubkey"
2186
+ },
2187
+ {
2188
+ "name": "outcome_index",
2189
+ "type": "u8"
2190
+ },
2191
+ {
2192
+ "name": "amount",
2193
+ "type": "u64"
2194
+ }
2195
+ ]
2196
+ }
2197
+ },
2198
+ {
2199
+ "name": "VaultInitialized",
2200
+ "type": {
2201
+ "kind": "struct",
2202
+ "fields": [
2203
+ {
2204
+ "name": "collateral_mint",
2205
+ "type": "pubkey"
2206
+ },
2207
+ {
2208
+ "name": "vault_token_account",
2209
+ "type": "pubkey"
2210
+ }
2211
+ ]
2212
+ }
2213
+ }
2214
+ ]
2215
+ }