@vercora-protocol/sdk 0.0.9 → 0.0.10

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,4692 @@
1
+ {
2
+ "address": "C5QvWnGHeC6o7N68heWFKPvC35eggZ9Mrgqzj86WwrBv",
3
+ "metadata": {
4
+ "name": "vercora",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Vercora prediction market program (Anchor)"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "abandon_market",
12
+ "discriminator": [
13
+ 49,
14
+ 244,
15
+ 193,
16
+ 21,
17
+ 128,
18
+ 114,
19
+ 96,
20
+ 65
21
+ ],
22
+ "accounts": [
23
+ {
24
+ "name": "creator",
25
+ "writable": true,
26
+ "signer": true,
27
+ "relations": [
28
+ "market"
29
+ ]
30
+ },
31
+ {
32
+ "name": "market",
33
+ "writable": true,
34
+ "pda": {
35
+ "seeds": [
36
+ {
37
+ "kind": "const",
38
+ "value": [
39
+ 109,
40
+ 97,
41
+ 114,
42
+ 107,
43
+ 101,
44
+ 116
45
+ ]
46
+ },
47
+ {
48
+ "kind": "account",
49
+ "path": "creator"
50
+ },
51
+ {
52
+ "kind": "arg",
53
+ "path": "args.market_id"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "name": "vault",
60
+ "writable": true,
61
+ "pda": {
62
+ "seeds": [
63
+ {
64
+ "kind": "account",
65
+ "path": "market"
66
+ },
67
+ {
68
+ "kind": "const",
69
+ "value": [
70
+ 118,
71
+ 97,
72
+ 117,
73
+ 108,
74
+ 116
75
+ ]
76
+ }
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ "name": "collateral_mint"
82
+ },
83
+ {
84
+ "name": "collateral_token_program"
85
+ },
86
+ {
87
+ "name": "system_program",
88
+ "address": "11111111111111111111111111111111"
89
+ }
90
+ ],
91
+ "args": [
92
+ {
93
+ "name": "args",
94
+ "type": {
95
+ "defined": {
96
+ "name": "AbandonMarketArgs"
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "name": "add_allowed_collateral_mint",
104
+ "discriminator": [
105
+ 230,
106
+ 100,
107
+ 188,
108
+ 206,
109
+ 152,
110
+ 143,
111
+ 230,
112
+ 229
113
+ ],
114
+ "accounts": [
115
+ {
116
+ "name": "allowed_mint",
117
+ "writable": true,
118
+ "pda": {
119
+ "seeds": [
120
+ {
121
+ "kind": "const",
122
+ "value": [
123
+ 97,
124
+ 108,
125
+ 108,
126
+ 111,
127
+ 119,
128
+ 101,
129
+ 100,
130
+ 45,
131
+ 109,
132
+ 105,
133
+ 110,
134
+ 116
135
+ ]
136
+ },
137
+ {
138
+ "kind": "account",
139
+ "path": "mint"
140
+ }
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "name": "global_config",
146
+ "writable": true,
147
+ "pda": {
148
+ "seeds": [
149
+ {
150
+ "kind": "const",
151
+ "value": [
152
+ 103,
153
+ 108,
154
+ 111,
155
+ 98,
156
+ 97,
157
+ 108,
158
+ 45,
159
+ 99,
160
+ 111,
161
+ 110,
162
+ 102,
163
+ 105,
164
+ 103
165
+ ]
166
+ }
167
+ ]
168
+ }
169
+ },
170
+ {
171
+ "name": "authority",
172
+ "writable": true,
173
+ "signer": true
174
+ },
175
+ {
176
+ "name": "mint"
177
+ },
178
+ {
179
+ "name": "system_program",
180
+ "address": "11111111111111111111111111111111"
181
+ }
182
+ ],
183
+ "args": []
184
+ },
185
+ {
186
+ "name": "close_market_early",
187
+ "discriminator": [
188
+ 249,
189
+ 72,
190
+ 175,
191
+ 9,
192
+ 87,
193
+ 92,
194
+ 121,
195
+ 92
196
+ ],
197
+ "accounts": [
198
+ {
199
+ "name": "signer",
200
+ "signer": true
201
+ },
202
+ {
203
+ "name": "global_config",
204
+ "pda": {
205
+ "seeds": [
206
+ {
207
+ "kind": "const",
208
+ "value": [
209
+ 103,
210
+ 108,
211
+ 111,
212
+ 98,
213
+ 97,
214
+ 108,
215
+ 45,
216
+ 99,
217
+ 111,
218
+ 110,
219
+ 102,
220
+ 105,
221
+ 103
222
+ ]
223
+ }
224
+ ]
225
+ }
226
+ },
227
+ {
228
+ "name": "market",
229
+ "writable": true,
230
+ "pda": {
231
+ "seeds": [
232
+ {
233
+ "kind": "const",
234
+ "value": [
235
+ 109,
236
+ 97,
237
+ 114,
238
+ 107,
239
+ 101,
240
+ 116
241
+ ]
242
+ },
243
+ {
244
+ "kind": "account",
245
+ "path": "market.creator",
246
+ "account": "Market"
247
+ },
248
+ {
249
+ "kind": "arg",
250
+ "path": "args.market_id"
251
+ }
252
+ ]
253
+ }
254
+ }
255
+ ],
256
+ "args": [
257
+ {
258
+ "name": "args",
259
+ "type": {
260
+ "defined": {
261
+ "name": "CloseMarketEarlyArgs"
262
+ }
263
+ }
264
+ }
265
+ ]
266
+ },
267
+ {
268
+ "name": "close_platform_profile",
269
+ "discriminator": [
270
+ 5,
271
+ 89,
272
+ 122,
273
+ 131,
274
+ 64,
275
+ 162,
276
+ 136,
277
+ 186
278
+ ],
279
+ "accounts": [
280
+ {
281
+ "name": "platform_registry",
282
+ "pda": {
283
+ "seeds": [
284
+ {
285
+ "kind": "const",
286
+ "value": [
287
+ 112,
288
+ 108,
289
+ 97,
290
+ 116,
291
+ 102,
292
+ 111,
293
+ 114,
294
+ 109
295
+ ]
296
+ },
297
+ {
298
+ "kind": "arg",
299
+ "path": "platform_id"
300
+ }
301
+ ]
302
+ }
303
+ },
304
+ {
305
+ "name": "platform_profile",
306
+ "writable": true,
307
+ "pda": {
308
+ "seeds": [
309
+ {
310
+ "kind": "const",
311
+ "value": [
312
+ 112,
313
+ 108,
314
+ 97,
315
+ 116,
316
+ 102,
317
+ 111,
318
+ 114,
319
+ 109,
320
+ 45,
321
+ 112,
322
+ 114,
323
+ 111,
324
+ 102,
325
+ 105,
326
+ 108,
327
+ 101
328
+ ]
329
+ },
330
+ {
331
+ "kind": "arg",
332
+ "path": "platform_id"
333
+ }
334
+ ]
335
+ }
336
+ },
337
+ {
338
+ "name": "profile_authority",
339
+ "writable": true,
340
+ "signer": true
341
+ }
342
+ ],
343
+ "args": [
344
+ {
345
+ "name": "platform_id",
346
+ "type": "u32"
347
+ }
348
+ ]
349
+ },
350
+ {
351
+ "name": "close_user_profile",
352
+ "discriminator": [
353
+ 242,
354
+ 80,
355
+ 248,
356
+ 79,
357
+ 81,
358
+ 251,
359
+ 65,
360
+ 113
361
+ ],
362
+ "accounts": [
363
+ {
364
+ "name": "user_profile",
365
+ "writable": true,
366
+ "pda": {
367
+ "seeds": [
368
+ {
369
+ "kind": "const",
370
+ "value": [
371
+ 117,
372
+ 115,
373
+ 101,
374
+ 114,
375
+ 45,
376
+ 112,
377
+ 114,
378
+ 111,
379
+ 102,
380
+ 105,
381
+ 108,
382
+ 101
383
+ ]
384
+ },
385
+ {
386
+ "kind": "account",
387
+ "path": "wallet"
388
+ }
389
+ ]
390
+ }
391
+ },
392
+ {
393
+ "name": "wallet",
394
+ "docs": [
395
+ "Must match the seeds — only the profile owner can close it."
396
+ ],
397
+ "writable": true,
398
+ "signer": true
399
+ }
400
+ ],
401
+ "args": []
402
+ },
403
+ {
404
+ "name": "create_market",
405
+ "discriminator": [
406
+ 103,
407
+ 226,
408
+ 97,
409
+ 235,
410
+ 200,
411
+ 188,
412
+ 251,
413
+ 254
414
+ ],
415
+ "accounts": [
416
+ {
417
+ "name": "payer",
418
+ "writable": true,
419
+ "signer": true
420
+ },
421
+ {
422
+ "name": "market",
423
+ "writable": true,
424
+ "pda": {
425
+ "seeds": [
426
+ {
427
+ "kind": "const",
428
+ "value": [
429
+ 109,
430
+ 97,
431
+ 114,
432
+ 107,
433
+ 101,
434
+ 116
435
+ ]
436
+ },
437
+ {
438
+ "kind": "account",
439
+ "path": "creator"
440
+ },
441
+ {
442
+ "kind": "arg",
443
+ "path": "args.market_id"
444
+ }
445
+ ]
446
+ }
447
+ },
448
+ {
449
+ "name": "vault",
450
+ "writable": true,
451
+ "pda": {
452
+ "seeds": [
453
+ {
454
+ "kind": "account",
455
+ "path": "market"
456
+ },
457
+ {
458
+ "kind": "const",
459
+ "value": [
460
+ 118,
461
+ 97,
462
+ 117,
463
+ 108,
464
+ 116
465
+ ]
466
+ }
467
+ ]
468
+ }
469
+ },
470
+ {
471
+ "name": "collateral_mint"
472
+ },
473
+ {
474
+ "name": "creator",
475
+ "signer": true
476
+ },
477
+ {
478
+ "name": "creator_fee_account"
479
+ },
480
+ {
481
+ "name": "global_config",
482
+ "pda": {
483
+ "seeds": [
484
+ {
485
+ "kind": "const",
486
+ "value": [
487
+ 103,
488
+ 108,
489
+ 111,
490
+ 98,
491
+ 97,
492
+ 108,
493
+ 45,
494
+ 99,
495
+ 111,
496
+ 110,
497
+ 102,
498
+ 105,
499
+ 103
500
+ ]
501
+ }
502
+ ]
503
+ }
504
+ },
505
+ {
506
+ "name": "allowed_mint",
507
+ "pda": {
508
+ "seeds": [
509
+ {
510
+ "kind": "const",
511
+ "value": [
512
+ 97,
513
+ 108,
514
+ 108,
515
+ 111,
516
+ 119,
517
+ 101,
518
+ 100,
519
+ 45,
520
+ 109,
521
+ 105,
522
+ 110,
523
+ 116
524
+ ]
525
+ },
526
+ {
527
+ "kind": "account",
528
+ "path": "collateral_mint"
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ {
534
+ "name": "platform_registry",
535
+ "docs": [
536
+ "Pass when `args.platform_id > 0` (PDA `[\"platform\", platform_id]`)."
537
+ ],
538
+ "optional": true,
539
+ "pda": {
540
+ "seeds": [
541
+ {
542
+ "kind": "const",
543
+ "value": [
544
+ 112,
545
+ 108,
546
+ 97,
547
+ 116,
548
+ 102,
549
+ 111,
550
+ 114,
551
+ 109
552
+ ]
553
+ },
554
+ {
555
+ "kind": "arg",
556
+ "path": "args.platform_id"
557
+ }
558
+ ]
559
+ }
560
+ },
561
+ {
562
+ "name": "market_category",
563
+ "docs": [
564
+ "Pass when `args.category_id > 0` (PDA `[\"market-category\", platform_id, category_id]`)."
565
+ ],
566
+ "optional": true,
567
+ "pda": {
568
+ "seeds": [
569
+ {
570
+ "kind": "const",
571
+ "value": [
572
+ 109,
573
+ 97,
574
+ 114,
575
+ 107,
576
+ 101,
577
+ 116,
578
+ 45,
579
+ 99,
580
+ 97,
581
+ 116,
582
+ 101,
583
+ 103,
584
+ 111,
585
+ 114,
586
+ 121
587
+ ]
588
+ },
589
+ {
590
+ "kind": "arg",
591
+ "path": "args.platform_id"
592
+ },
593
+ {
594
+ "kind": "arg",
595
+ "path": "args.category_id"
596
+ }
597
+ ]
598
+ }
599
+ },
600
+ {
601
+ "name": "collateral_token_program"
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": "args",
615
+ "type": {
616
+ "defined": {
617
+ "name": "CreateMarketArgs"
618
+ }
619
+ }
620
+ }
621
+ ]
622
+ },
623
+ {
624
+ "name": "create_market_category",
625
+ "discriminator": [
626
+ 244,
627
+ 9,
628
+ 114,
629
+ 166,
630
+ 86,
631
+ 220,
632
+ 26,
633
+ 67
634
+ ],
635
+ "accounts": [
636
+ {
637
+ "name": "global_config",
638
+ "pda": {
639
+ "seeds": [
640
+ {
641
+ "kind": "const",
642
+ "value": [
643
+ 103,
644
+ 108,
645
+ 111,
646
+ 98,
647
+ 97,
648
+ 108,
649
+ 45,
650
+ 99,
651
+ 111,
652
+ 110,
653
+ 102,
654
+ 105,
655
+ 103
656
+ ]
657
+ }
658
+ ]
659
+ }
660
+ },
661
+ {
662
+ "name": "platform_registry",
663
+ "writable": true,
664
+ "pda": {
665
+ "seeds": [
666
+ {
667
+ "kind": "const",
668
+ "value": [
669
+ 112,
670
+ 108,
671
+ 97,
672
+ 116,
673
+ 102,
674
+ 111,
675
+ 114,
676
+ 109
677
+ ]
678
+ },
679
+ {
680
+ "kind": "arg",
681
+ "path": "platform_id"
682
+ }
683
+ ]
684
+ }
685
+ },
686
+ {
687
+ "name": "market_category",
688
+ "writable": true,
689
+ "pda": {
690
+ "seeds": [
691
+ {
692
+ "kind": "const",
693
+ "value": [
694
+ 109,
695
+ 97,
696
+ 114,
697
+ 107,
698
+ 101,
699
+ 116,
700
+ 45,
701
+ 99,
702
+ 97,
703
+ 116,
704
+ 101,
705
+ 103,
706
+ 111,
707
+ 114,
708
+ 121
709
+ ]
710
+ },
711
+ {
712
+ "kind": "arg",
713
+ "path": "platform_id"
714
+ },
715
+ {
716
+ "kind": "arg",
717
+ "path": "category_id"
718
+ }
719
+ ]
720
+ }
721
+ },
722
+ {
723
+ "name": "authority",
724
+ "writable": true,
725
+ "signer": true
726
+ },
727
+ {
728
+ "name": "system_program",
729
+ "address": "11111111111111111111111111111111"
730
+ }
731
+ ],
732
+ "args": [
733
+ {
734
+ "name": "platform_id",
735
+ "type": "u32"
736
+ },
737
+ {
738
+ "name": "category_id",
739
+ "type": "u8"
740
+ },
741
+ {
742
+ "name": "name",
743
+ "type": "string"
744
+ }
745
+ ]
746
+ },
747
+ {
748
+ "name": "finalize_resolution",
749
+ "discriminator": [
750
+ 191,
751
+ 74,
752
+ 94,
753
+ 214,
754
+ 45,
755
+ 150,
756
+ 152,
757
+ 125
758
+ ],
759
+ "accounts": [
760
+ {
761
+ "name": "market",
762
+ "writable": true,
763
+ "pda": {
764
+ "seeds": [
765
+ {
766
+ "kind": "const",
767
+ "value": [
768
+ 109,
769
+ 97,
770
+ 114,
771
+ 107,
772
+ 101,
773
+ 116
774
+ ]
775
+ },
776
+ {
777
+ "kind": "account",
778
+ "path": "market.creator",
779
+ "account": "Market"
780
+ },
781
+ {
782
+ "kind": "arg",
783
+ "path": "args.market_id"
784
+ }
785
+ ]
786
+ }
787
+ },
788
+ {
789
+ "name": "market_outcome_0",
790
+ "optional": true
791
+ },
792
+ {
793
+ "name": "market_outcome_1",
794
+ "optional": true
795
+ },
796
+ {
797
+ "name": "market_outcome_2",
798
+ "optional": true
799
+ },
800
+ {
801
+ "name": "market_outcome_3",
802
+ "optional": true
803
+ },
804
+ {
805
+ "name": "market_outcome_4",
806
+ "optional": true
807
+ },
808
+ {
809
+ "name": "market_outcome_5",
810
+ "optional": true
811
+ },
812
+ {
813
+ "name": "market_outcome_6",
814
+ "optional": true
815
+ },
816
+ {
817
+ "name": "market_outcome_7",
818
+ "optional": true
819
+ }
820
+ ],
821
+ "args": [
822
+ {
823
+ "name": "args",
824
+ "type": {
825
+ "defined": {
826
+ "name": "FinalizeResolutionArgs"
827
+ }
828
+ }
829
+ }
830
+ ]
831
+ },
832
+ {
833
+ "name": "initialize_config",
834
+ "discriminator": [
835
+ 208,
836
+ 127,
837
+ 21,
838
+ 1,
839
+ 194,
840
+ 190,
841
+ 196,
842
+ 70
843
+ ],
844
+ "accounts": [
845
+ {
846
+ "name": "global_config",
847
+ "writable": true,
848
+ "pda": {
849
+ "seeds": [
850
+ {
851
+ "kind": "const",
852
+ "value": [
853
+ 103,
854
+ 108,
855
+ 111,
856
+ 98,
857
+ 97,
858
+ 108,
859
+ 45,
860
+ 99,
861
+ 111,
862
+ 110,
863
+ 102,
864
+ 105,
865
+ 103
866
+ ]
867
+ }
868
+ ]
869
+ }
870
+ },
871
+ {
872
+ "name": "authority",
873
+ "docs": [
874
+ "The wallet that signs this tx becomes the primary authority."
875
+ ],
876
+ "writable": true,
877
+ "signer": true
878
+ },
879
+ {
880
+ "name": "secondary_authority",
881
+ "docs": [
882
+ "New secondary authority (does NOT need to sign — the primary authority is responsible).",
883
+ "Pass `Pubkey::default()` to leave it unset."
884
+ ]
885
+ },
886
+ {
887
+ "name": "system_program",
888
+ "address": "11111111111111111111111111111111"
889
+ }
890
+ ],
891
+ "args": [
892
+ {
893
+ "name": "secondary_authority",
894
+ "type": "pubkey"
895
+ },
896
+ {
897
+ "name": "deposit_platform_fee_bps",
898
+ "type": "u16"
899
+ },
900
+ {
901
+ "name": "platform_treasury",
902
+ "type": "pubkey"
903
+ },
904
+ {
905
+ "name": "platform_fee_lamports",
906
+ "type": "u64"
907
+ },
908
+ {
909
+ "name": "parimutuel_withdraw_platform_fee_bps",
910
+ "type": "u16"
911
+ }
912
+ ]
913
+ },
914
+ {
915
+ "name": "initialize_market_mints",
916
+ "discriminator": [
917
+ 150,
918
+ 238,
919
+ 104,
920
+ 206,
921
+ 134,
922
+ 88,
923
+ 76,
924
+ 226
925
+ ],
926
+ "accounts": [
927
+ {
928
+ "name": "payer",
929
+ "writable": true,
930
+ "signer": true
931
+ },
932
+ {
933
+ "name": "market",
934
+ "pda": {
935
+ "seeds": [
936
+ {
937
+ "kind": "const",
938
+ "value": [
939
+ 109,
940
+ 97,
941
+ 114,
942
+ 107,
943
+ 101,
944
+ 116
945
+ ]
946
+ },
947
+ {
948
+ "kind": "account",
949
+ "path": "market.creator",
950
+ "account": "Market"
951
+ },
952
+ {
953
+ "kind": "arg",
954
+ "path": "args.market_id"
955
+ }
956
+ ]
957
+ }
958
+ },
959
+ {
960
+ "name": "token_program",
961
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
962
+ },
963
+ {
964
+ "name": "system_program",
965
+ "address": "11111111111111111111111111111111"
966
+ },
967
+ {
968
+ "name": "outcome_mint_0",
969
+ "writable": true
970
+ },
971
+ {
972
+ "name": "outcome_mint_1",
973
+ "writable": true
974
+ },
975
+ {
976
+ "name": "outcome_mint_2",
977
+ "writable": true
978
+ },
979
+ {
980
+ "name": "outcome_mint_3",
981
+ "writable": true
982
+ },
983
+ {
984
+ "name": "outcome_mint_4",
985
+ "writable": true
986
+ },
987
+ {
988
+ "name": "outcome_mint_5",
989
+ "writable": true
990
+ },
991
+ {
992
+ "name": "outcome_mint_6",
993
+ "writable": true
994
+ },
995
+ {
996
+ "name": "outcome_mint_7",
997
+ "writable": true
998
+ }
999
+ ],
1000
+ "args": [
1001
+ {
1002
+ "name": "args",
1003
+ "type": {
1004
+ "defined": {
1005
+ "name": "InitializeMarketMintsArgs"
1006
+ }
1007
+ }
1008
+ }
1009
+ ]
1010
+ },
1011
+ {
1012
+ "name": "initialize_market_outcome",
1013
+ "discriminator": [
1014
+ 24,
1015
+ 119,
1016
+ 180,
1017
+ 59,
1018
+ 123,
1019
+ 232,
1020
+ 13,
1021
+ 187
1022
+ ],
1023
+ "accounts": [
1024
+ {
1025
+ "name": "payer",
1026
+ "writable": true,
1027
+ "signer": true
1028
+ },
1029
+ {
1030
+ "name": "market",
1031
+ "pda": {
1032
+ "seeds": [
1033
+ {
1034
+ "kind": "const",
1035
+ "value": [
1036
+ 109,
1037
+ 97,
1038
+ 114,
1039
+ 107,
1040
+ 101,
1041
+ 116
1042
+ ]
1043
+ },
1044
+ {
1045
+ "kind": "account",
1046
+ "path": "market.creator",
1047
+ "account": "Market"
1048
+ },
1049
+ {
1050
+ "kind": "arg",
1051
+ "path": "args.market_id"
1052
+ }
1053
+ ]
1054
+ }
1055
+ },
1056
+ {
1057
+ "name": "system_program",
1058
+ "address": "11111111111111111111111111111111"
1059
+ },
1060
+ {
1061
+ "name": "market_outcome",
1062
+ "writable": true
1063
+ }
1064
+ ],
1065
+ "args": [
1066
+ {
1067
+ "name": "args",
1068
+ "type": {
1069
+ "defined": {
1070
+ "name": "InitializeMarketOutcomeArgs"
1071
+ }
1072
+ }
1073
+ }
1074
+ ]
1075
+ },
1076
+ {
1077
+ "name": "initialize_market_resolver",
1078
+ "discriminator": [
1079
+ 195,
1080
+ 54,
1081
+ 0,
1082
+ 135,
1083
+ 56,
1084
+ 129,
1085
+ 135,
1086
+ 99
1087
+ ],
1088
+ "accounts": [
1089
+ {
1090
+ "name": "payer",
1091
+ "writable": true,
1092
+ "signer": true
1093
+ },
1094
+ {
1095
+ "name": "market",
1096
+ "pda": {
1097
+ "seeds": [
1098
+ {
1099
+ "kind": "const",
1100
+ "value": [
1101
+ 109,
1102
+ 97,
1103
+ 114,
1104
+ 107,
1105
+ 101,
1106
+ 116
1107
+ ]
1108
+ },
1109
+ {
1110
+ "kind": "account",
1111
+ "path": "market.creator",
1112
+ "account": "Market"
1113
+ },
1114
+ {
1115
+ "kind": "arg",
1116
+ "path": "args.market_id"
1117
+ }
1118
+ ]
1119
+ }
1120
+ },
1121
+ {
1122
+ "name": "system_program",
1123
+ "address": "11111111111111111111111111111111"
1124
+ },
1125
+ {
1126
+ "name": "resolver",
1127
+ "writable": true
1128
+ }
1129
+ ],
1130
+ "args": [
1131
+ {
1132
+ "name": "args",
1133
+ "type": {
1134
+ "defined": {
1135
+ "name": "InitializeMarketResolverArgs"
1136
+ }
1137
+ }
1138
+ }
1139
+ ]
1140
+ },
1141
+ {
1142
+ "name": "initialize_parimutuel_state",
1143
+ "discriminator": [
1144
+ 73,
1145
+ 2,
1146
+ 25,
1147
+ 61,
1148
+ 222,
1149
+ 225,
1150
+ 184,
1151
+ 112
1152
+ ],
1153
+ "accounts": [
1154
+ {
1155
+ "name": "payer",
1156
+ "writable": true,
1157
+ "signer": true
1158
+ },
1159
+ {
1160
+ "name": "market",
1161
+ "pda": {
1162
+ "seeds": [
1163
+ {
1164
+ "kind": "const",
1165
+ "value": [
1166
+ 109,
1167
+ 97,
1168
+ 114,
1169
+ 107,
1170
+ 101,
1171
+ 116
1172
+ ]
1173
+ },
1174
+ {
1175
+ "kind": "account",
1176
+ "path": "market.creator",
1177
+ "account": "Market"
1178
+ },
1179
+ {
1180
+ "kind": "arg",
1181
+ "path": "args.market_id"
1182
+ }
1183
+ ]
1184
+ }
1185
+ },
1186
+ {
1187
+ "name": "global_config",
1188
+ "pda": {
1189
+ "seeds": [
1190
+ {
1191
+ "kind": "const",
1192
+ "value": [
1193
+ 103,
1194
+ 108,
1195
+ 111,
1196
+ 98,
1197
+ 97,
1198
+ 108,
1199
+ 45,
1200
+ 99,
1201
+ 111,
1202
+ 110,
1203
+ 102,
1204
+ 105,
1205
+ 103
1206
+ ]
1207
+ }
1208
+ ]
1209
+ }
1210
+ },
1211
+ {
1212
+ "name": "parimutuel_state",
1213
+ "writable": true,
1214
+ "pda": {
1215
+ "seeds": [
1216
+ {
1217
+ "kind": "const",
1218
+ "value": [
1219
+ 112,
1220
+ 97,
1221
+ 114,
1222
+ 105
1223
+ ]
1224
+ },
1225
+ {
1226
+ "kind": "account",
1227
+ "path": "market"
1228
+ }
1229
+ ]
1230
+ }
1231
+ },
1232
+ {
1233
+ "name": "system_program",
1234
+ "address": "11111111111111111111111111111111"
1235
+ }
1236
+ ],
1237
+ "args": [
1238
+ {
1239
+ "name": "args",
1240
+ "type": {
1241
+ "defined": {
1242
+ "name": "InitializeParimutuelStateArgs"
1243
+ }
1244
+ }
1245
+ }
1246
+ ]
1247
+ },
1248
+ {
1249
+ "name": "mint_complete_set",
1250
+ "discriminator": [
1251
+ 70,
1252
+ 222,
1253
+ 130,
1254
+ 148,
1255
+ 234,
1256
+ 103,
1257
+ 137,
1258
+ 61
1259
+ ],
1260
+ "accounts": [
1261
+ {
1262
+ "name": "user",
1263
+ "writable": true,
1264
+ "signer": true
1265
+ },
1266
+ {
1267
+ "name": "market",
1268
+ "writable": true,
1269
+ "pda": {
1270
+ "seeds": [
1271
+ {
1272
+ "kind": "const",
1273
+ "value": [
1274
+ 109,
1275
+ 97,
1276
+ 114,
1277
+ 107,
1278
+ 101,
1279
+ 116
1280
+ ]
1281
+ },
1282
+ {
1283
+ "kind": "account",
1284
+ "path": "market.creator",
1285
+ "account": "Market"
1286
+ },
1287
+ {
1288
+ "kind": "arg",
1289
+ "path": "args.market_id"
1290
+ }
1291
+ ]
1292
+ }
1293
+ },
1294
+ {
1295
+ "name": "vault",
1296
+ "writable": true,
1297
+ "pda": {
1298
+ "seeds": [
1299
+ {
1300
+ "kind": "account",
1301
+ "path": "market"
1302
+ },
1303
+ {
1304
+ "kind": "const",
1305
+ "value": [
1306
+ 118,
1307
+ 97,
1308
+ 117,
1309
+ 108,
1310
+ 116
1311
+ ]
1312
+ }
1313
+ ]
1314
+ }
1315
+ },
1316
+ {
1317
+ "name": "collateral_mint"
1318
+ },
1319
+ {
1320
+ "name": "user_collateral_account",
1321
+ "writable": true
1322
+ },
1323
+ {
1324
+ "name": "creator_fee_account",
1325
+ "writable": true
1326
+ },
1327
+ {
1328
+ "name": "global_config",
1329
+ "pda": {
1330
+ "seeds": [
1331
+ {
1332
+ "kind": "const",
1333
+ "value": [
1334
+ 103,
1335
+ 108,
1336
+ 111,
1337
+ 98,
1338
+ 97,
1339
+ 108,
1340
+ 45,
1341
+ 99,
1342
+ 111,
1343
+ 110,
1344
+ 102,
1345
+ 105,
1346
+ 103
1347
+ ]
1348
+ }
1349
+ ]
1350
+ }
1351
+ },
1352
+ {
1353
+ "name": "allowed_mint",
1354
+ "pda": {
1355
+ "seeds": [
1356
+ {
1357
+ "kind": "const",
1358
+ "value": [
1359
+ 97,
1360
+ 108,
1361
+ 108,
1362
+ 111,
1363
+ 119,
1364
+ 101,
1365
+ 100,
1366
+ 45,
1367
+ 109,
1368
+ 105,
1369
+ 110,
1370
+ 116
1371
+ ]
1372
+ },
1373
+ {
1374
+ "kind": "account",
1375
+ "path": "collateral_mint"
1376
+ }
1377
+ ]
1378
+ }
1379
+ },
1380
+ {
1381
+ "name": "platform_treasury_wallet",
1382
+ "docs": [
1383
+ "Wallet from global_config.platform_treasury (SOL + fee destination identity)."
1384
+ ],
1385
+ "writable": true
1386
+ },
1387
+ {
1388
+ "name": "platform_treasury_ata",
1389
+ "docs": [
1390
+ "ATA for collateral mint; mint/owner validated in handler."
1391
+ ],
1392
+ "writable": true
1393
+ },
1394
+ {
1395
+ "name": "collateral_token_program"
1396
+ },
1397
+ {
1398
+ "name": "token_program",
1399
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1400
+ },
1401
+ {
1402
+ "name": "system_program",
1403
+ "address": "11111111111111111111111111111111"
1404
+ }
1405
+ ],
1406
+ "args": [
1407
+ {
1408
+ "name": "args",
1409
+ "type": {
1410
+ "defined": {
1411
+ "name": "MintCompleteSetArgs"
1412
+ }
1413
+ }
1414
+ }
1415
+ ]
1416
+ },
1417
+ {
1418
+ "name": "parimutuel_claim",
1419
+ "discriminator": [
1420
+ 14,
1421
+ 77,
1422
+ 244,
1423
+ 0,
1424
+ 58,
1425
+ 48,
1426
+ 251,
1427
+ 33
1428
+ ],
1429
+ "accounts": [
1430
+ {
1431
+ "name": "user",
1432
+ "writable": true,
1433
+ "signer": true
1434
+ },
1435
+ {
1436
+ "name": "market",
1437
+ "writable": true,
1438
+ "pda": {
1439
+ "seeds": [
1440
+ {
1441
+ "kind": "const",
1442
+ "value": [
1443
+ 109,
1444
+ 97,
1445
+ 114,
1446
+ 107,
1447
+ 101,
1448
+ 116
1449
+ ]
1450
+ },
1451
+ {
1452
+ "kind": "account",
1453
+ "path": "market.creator",
1454
+ "account": "Market"
1455
+ },
1456
+ {
1457
+ "kind": "arg",
1458
+ "path": "args.market_id"
1459
+ }
1460
+ ]
1461
+ }
1462
+ },
1463
+ {
1464
+ "name": "parimutuel_state",
1465
+ "writable": true,
1466
+ "pda": {
1467
+ "seeds": [
1468
+ {
1469
+ "kind": "const",
1470
+ "value": [
1471
+ 112,
1472
+ 97,
1473
+ 114,
1474
+ 105
1475
+ ]
1476
+ },
1477
+ {
1478
+ "kind": "account",
1479
+ "path": "market"
1480
+ }
1481
+ ]
1482
+ }
1483
+ },
1484
+ {
1485
+ "name": "position",
1486
+ "writable": true
1487
+ },
1488
+ {
1489
+ "name": "vault",
1490
+ "writable": true,
1491
+ "pda": {
1492
+ "seeds": [
1493
+ {
1494
+ "kind": "account",
1495
+ "path": "market"
1496
+ },
1497
+ {
1498
+ "kind": "const",
1499
+ "value": [
1500
+ 118,
1501
+ 97,
1502
+ 117,
1503
+ 108,
1504
+ 116
1505
+ ]
1506
+ }
1507
+ ]
1508
+ }
1509
+ },
1510
+ {
1511
+ "name": "collateral_mint"
1512
+ },
1513
+ {
1514
+ "name": "user_collateral_account",
1515
+ "writable": true
1516
+ },
1517
+ {
1518
+ "name": "collateral_token_program"
1519
+ },
1520
+ {
1521
+ "name": "token_program",
1522
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1523
+ }
1524
+ ],
1525
+ "args": [
1526
+ {
1527
+ "name": "args",
1528
+ "type": {
1529
+ "defined": {
1530
+ "name": "ParimutuelClaimArgs"
1531
+ }
1532
+ }
1533
+ }
1534
+ ]
1535
+ },
1536
+ {
1537
+ "name": "parimutuel_stake",
1538
+ "discriminator": [
1539
+ 163,
1540
+ 203,
1541
+ 81,
1542
+ 169,
1543
+ 132,
1544
+ 9,
1545
+ 117,
1546
+ 209
1547
+ ],
1548
+ "accounts": [
1549
+ {
1550
+ "name": "user",
1551
+ "writable": true,
1552
+ "signer": true
1553
+ },
1554
+ {
1555
+ "name": "market",
1556
+ "writable": true,
1557
+ "pda": {
1558
+ "seeds": [
1559
+ {
1560
+ "kind": "const",
1561
+ "value": [
1562
+ 109,
1563
+ 97,
1564
+ 114,
1565
+ 107,
1566
+ 101,
1567
+ 116
1568
+ ]
1569
+ },
1570
+ {
1571
+ "kind": "account",
1572
+ "path": "market.creator",
1573
+ "account": "Market"
1574
+ },
1575
+ {
1576
+ "kind": "arg",
1577
+ "path": "args.market_id"
1578
+ }
1579
+ ]
1580
+ }
1581
+ },
1582
+ {
1583
+ "name": "parimutuel_state",
1584
+ "writable": true,
1585
+ "pda": {
1586
+ "seeds": [
1587
+ {
1588
+ "kind": "const",
1589
+ "value": [
1590
+ 112,
1591
+ 97,
1592
+ 114,
1593
+ 105
1594
+ ]
1595
+ },
1596
+ {
1597
+ "kind": "account",
1598
+ "path": "market"
1599
+ }
1600
+ ]
1601
+ }
1602
+ },
1603
+ {
1604
+ "name": "position",
1605
+ "writable": true
1606
+ },
1607
+ {
1608
+ "name": "vault",
1609
+ "writable": true,
1610
+ "pda": {
1611
+ "seeds": [
1612
+ {
1613
+ "kind": "account",
1614
+ "path": "market"
1615
+ },
1616
+ {
1617
+ "kind": "const",
1618
+ "value": [
1619
+ 118,
1620
+ 97,
1621
+ 117,
1622
+ 108,
1623
+ 116
1624
+ ]
1625
+ }
1626
+ ]
1627
+ }
1628
+ },
1629
+ {
1630
+ "name": "collateral_mint"
1631
+ },
1632
+ {
1633
+ "name": "user_collateral_account",
1634
+ "writable": true
1635
+ },
1636
+ {
1637
+ "name": "creator_fee_account",
1638
+ "writable": true
1639
+ },
1640
+ {
1641
+ "name": "global_config",
1642
+ "pda": {
1643
+ "seeds": [
1644
+ {
1645
+ "kind": "const",
1646
+ "value": [
1647
+ 103,
1648
+ 108,
1649
+ 111,
1650
+ 98,
1651
+ 97,
1652
+ 108,
1653
+ 45,
1654
+ 99,
1655
+ 111,
1656
+ 110,
1657
+ 102,
1658
+ 105,
1659
+ 103
1660
+ ]
1661
+ }
1662
+ ]
1663
+ }
1664
+ },
1665
+ {
1666
+ "name": "platform_treasury_wallet",
1667
+ "writable": true
1668
+ },
1669
+ {
1670
+ "name": "platform_treasury_ata",
1671
+ "writable": true
1672
+ },
1673
+ {
1674
+ "name": "allowed_mint",
1675
+ "pda": {
1676
+ "seeds": [
1677
+ {
1678
+ "kind": "const",
1679
+ "value": [
1680
+ 97,
1681
+ 108,
1682
+ 108,
1683
+ 111,
1684
+ 119,
1685
+ 101,
1686
+ 100,
1687
+ 45,
1688
+ 109,
1689
+ 105,
1690
+ 110,
1691
+ 116
1692
+ ]
1693
+ },
1694
+ {
1695
+ "kind": "account",
1696
+ "path": "collateral_mint"
1697
+ }
1698
+ ]
1699
+ }
1700
+ },
1701
+ {
1702
+ "name": "collateral_token_program"
1703
+ },
1704
+ {
1705
+ "name": "token_program",
1706
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1707
+ },
1708
+ {
1709
+ "name": "system_program",
1710
+ "address": "11111111111111111111111111111111"
1711
+ }
1712
+ ],
1713
+ "args": [
1714
+ {
1715
+ "name": "args",
1716
+ "type": {
1717
+ "defined": {
1718
+ "name": "ParimutuelStakeArgs"
1719
+ }
1720
+ }
1721
+ }
1722
+ ]
1723
+ },
1724
+ {
1725
+ "name": "parimutuel_withdraw",
1726
+ "discriminator": [
1727
+ 189,
1728
+ 252,
1729
+ 247,
1730
+ 233,
1731
+ 149,
1732
+ 69,
1733
+ 178,
1734
+ 110
1735
+ ],
1736
+ "accounts": [
1737
+ {
1738
+ "name": "user",
1739
+ "writable": true,
1740
+ "signer": true
1741
+ },
1742
+ {
1743
+ "name": "market",
1744
+ "writable": true,
1745
+ "pda": {
1746
+ "seeds": [
1747
+ {
1748
+ "kind": "const",
1749
+ "value": [
1750
+ 109,
1751
+ 97,
1752
+ 114,
1753
+ 107,
1754
+ 101,
1755
+ 116
1756
+ ]
1757
+ },
1758
+ {
1759
+ "kind": "account",
1760
+ "path": "market.creator",
1761
+ "account": "Market"
1762
+ },
1763
+ {
1764
+ "kind": "arg",
1765
+ "path": "args.market_id"
1766
+ }
1767
+ ]
1768
+ }
1769
+ },
1770
+ {
1771
+ "name": "creator_fee_account",
1772
+ "writable": true
1773
+ },
1774
+ {
1775
+ "name": "parimutuel_state",
1776
+ "writable": true,
1777
+ "pda": {
1778
+ "seeds": [
1779
+ {
1780
+ "kind": "const",
1781
+ "value": [
1782
+ 112,
1783
+ 97,
1784
+ 114,
1785
+ 105
1786
+ ]
1787
+ },
1788
+ {
1789
+ "kind": "account",
1790
+ "path": "market"
1791
+ }
1792
+ ]
1793
+ }
1794
+ },
1795
+ {
1796
+ "name": "position",
1797
+ "writable": true
1798
+ },
1799
+ {
1800
+ "name": "vault",
1801
+ "writable": true,
1802
+ "pda": {
1803
+ "seeds": [
1804
+ {
1805
+ "kind": "account",
1806
+ "path": "market"
1807
+ },
1808
+ {
1809
+ "kind": "const",
1810
+ "value": [
1811
+ 118,
1812
+ 97,
1813
+ 117,
1814
+ 108,
1815
+ 116
1816
+ ]
1817
+ }
1818
+ ]
1819
+ }
1820
+ },
1821
+ {
1822
+ "name": "collateral_mint"
1823
+ },
1824
+ {
1825
+ "name": "user_collateral_account",
1826
+ "writable": true
1827
+ },
1828
+ {
1829
+ "name": "global_config",
1830
+ "pda": {
1831
+ "seeds": [
1832
+ {
1833
+ "kind": "const",
1834
+ "value": [
1835
+ 103,
1836
+ 108,
1837
+ 111,
1838
+ 98,
1839
+ 97,
1840
+ 108,
1841
+ 45,
1842
+ 99,
1843
+ 111,
1844
+ 110,
1845
+ 102,
1846
+ 105,
1847
+ 103
1848
+ ]
1849
+ }
1850
+ ]
1851
+ }
1852
+ },
1853
+ {
1854
+ "name": "platform_treasury_wallet",
1855
+ "writable": true
1856
+ },
1857
+ {
1858
+ "name": "platform_treasury_ata",
1859
+ "writable": true
1860
+ },
1861
+ {
1862
+ "name": "collateral_token_program"
1863
+ },
1864
+ {
1865
+ "name": "token_program",
1866
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1867
+ },
1868
+ {
1869
+ "name": "system_program",
1870
+ "address": "11111111111111111111111111111111"
1871
+ }
1872
+ ],
1873
+ "args": [
1874
+ {
1875
+ "name": "args",
1876
+ "type": {
1877
+ "defined": {
1878
+ "name": "ParimutuelWithdrawArgs"
1879
+ }
1880
+ }
1881
+ }
1882
+ ]
1883
+ },
1884
+ {
1885
+ "name": "redeem_complete_set",
1886
+ "discriminator": [
1887
+ 73,
1888
+ 220,
1889
+ 176,
1890
+ 168,
1891
+ 65,
1892
+ 16,
1893
+ 70,
1894
+ 239
1895
+ ],
1896
+ "accounts": [
1897
+ {
1898
+ "name": "user",
1899
+ "writable": true,
1900
+ "signer": true
1901
+ },
1902
+ {
1903
+ "name": "market",
1904
+ "writable": true,
1905
+ "pda": {
1906
+ "seeds": [
1907
+ {
1908
+ "kind": "const",
1909
+ "value": [
1910
+ 109,
1911
+ 97,
1912
+ 114,
1913
+ 107,
1914
+ 101,
1915
+ 116
1916
+ ]
1917
+ },
1918
+ {
1919
+ "kind": "account",
1920
+ "path": "market.creator",
1921
+ "account": "Market"
1922
+ },
1923
+ {
1924
+ "kind": "arg",
1925
+ "path": "args.market_id"
1926
+ }
1927
+ ]
1928
+ }
1929
+ },
1930
+ {
1931
+ "name": "vault",
1932
+ "writable": true,
1933
+ "pda": {
1934
+ "seeds": [
1935
+ {
1936
+ "kind": "account",
1937
+ "path": "market"
1938
+ },
1939
+ {
1940
+ "kind": "const",
1941
+ "value": [
1942
+ 118,
1943
+ 97,
1944
+ 117,
1945
+ 108,
1946
+ 116
1947
+ ]
1948
+ }
1949
+ ]
1950
+ }
1951
+ },
1952
+ {
1953
+ "name": "collateral_mint"
1954
+ },
1955
+ {
1956
+ "name": "user_collateral_account",
1957
+ "writable": true
1958
+ },
1959
+ {
1960
+ "name": "outcome_mint_0",
1961
+ "writable": true
1962
+ },
1963
+ {
1964
+ "name": "outcome_mint_1",
1965
+ "writable": true
1966
+ },
1967
+ {
1968
+ "name": "outcome_mint_2",
1969
+ "writable": true
1970
+ },
1971
+ {
1972
+ "name": "outcome_mint_3",
1973
+ "writable": true
1974
+ },
1975
+ {
1976
+ "name": "outcome_mint_4",
1977
+ "writable": true
1978
+ },
1979
+ {
1980
+ "name": "outcome_mint_5",
1981
+ "writable": true
1982
+ },
1983
+ {
1984
+ "name": "outcome_mint_6",
1985
+ "writable": true
1986
+ },
1987
+ {
1988
+ "name": "outcome_mint_7",
1989
+ "writable": true
1990
+ },
1991
+ {
1992
+ "name": "user_outcome_0",
1993
+ "writable": true
1994
+ },
1995
+ {
1996
+ "name": "user_outcome_1",
1997
+ "writable": true
1998
+ },
1999
+ {
2000
+ "name": "user_outcome_2",
2001
+ "writable": true
2002
+ },
2003
+ {
2004
+ "name": "user_outcome_3",
2005
+ "writable": true
2006
+ },
2007
+ {
2008
+ "name": "user_outcome_4",
2009
+ "writable": true
2010
+ },
2011
+ {
2012
+ "name": "user_outcome_5",
2013
+ "writable": true
2014
+ },
2015
+ {
2016
+ "name": "user_outcome_6",
2017
+ "writable": true
2018
+ },
2019
+ {
2020
+ "name": "user_outcome_7",
2021
+ "writable": true
2022
+ },
2023
+ {
2024
+ "name": "collateral_token_program"
2025
+ },
2026
+ {
2027
+ "name": "token_program",
2028
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
2029
+ }
2030
+ ],
2031
+ "args": [
2032
+ {
2033
+ "name": "args",
2034
+ "type": {
2035
+ "defined": {
2036
+ "name": "RedeemCompleteSetArgs"
2037
+ }
2038
+ }
2039
+ }
2040
+ ]
2041
+ },
2042
+ {
2043
+ "name": "redeem_winning",
2044
+ "discriminator": [
2045
+ 191,
2046
+ 44,
2047
+ 57,
2048
+ 7,
2049
+ 31,
2050
+ 46,
2051
+ 190,
2052
+ 162
2053
+ ],
2054
+ "accounts": [
2055
+ {
2056
+ "name": "user",
2057
+ "writable": true,
2058
+ "signer": true
2059
+ },
2060
+ {
2061
+ "name": "market",
2062
+ "writable": true,
2063
+ "pda": {
2064
+ "seeds": [
2065
+ {
2066
+ "kind": "const",
2067
+ "value": [
2068
+ 109,
2069
+ 97,
2070
+ 114,
2071
+ 107,
2072
+ 101,
2073
+ 116
2074
+ ]
2075
+ },
2076
+ {
2077
+ "kind": "account",
2078
+ "path": "market.creator",
2079
+ "account": "Market"
2080
+ },
2081
+ {
2082
+ "kind": "arg",
2083
+ "path": "args.market_id"
2084
+ }
2085
+ ]
2086
+ }
2087
+ },
2088
+ {
2089
+ "name": "vault",
2090
+ "writable": true,
2091
+ "pda": {
2092
+ "seeds": [
2093
+ {
2094
+ "kind": "account",
2095
+ "path": "market"
2096
+ },
2097
+ {
2098
+ "kind": "const",
2099
+ "value": [
2100
+ 118,
2101
+ 97,
2102
+ 117,
2103
+ 108,
2104
+ 116
2105
+ ]
2106
+ }
2107
+ ]
2108
+ }
2109
+ },
2110
+ {
2111
+ "name": "collateral_mint"
2112
+ },
2113
+ {
2114
+ "name": "user_collateral_account",
2115
+ "writable": true
2116
+ },
2117
+ {
2118
+ "name": "outcome_mint_0",
2119
+ "writable": true
2120
+ },
2121
+ {
2122
+ "name": "outcome_mint_1",
2123
+ "writable": true
2124
+ },
2125
+ {
2126
+ "name": "outcome_mint_2",
2127
+ "writable": true
2128
+ },
2129
+ {
2130
+ "name": "outcome_mint_3",
2131
+ "writable": true
2132
+ },
2133
+ {
2134
+ "name": "outcome_mint_4",
2135
+ "writable": true
2136
+ },
2137
+ {
2138
+ "name": "outcome_mint_5",
2139
+ "writable": true
2140
+ },
2141
+ {
2142
+ "name": "outcome_mint_6",
2143
+ "writable": true
2144
+ },
2145
+ {
2146
+ "name": "outcome_mint_7",
2147
+ "writable": true
2148
+ },
2149
+ {
2150
+ "name": "user_winning_outcome",
2151
+ "writable": true
2152
+ },
2153
+ {
2154
+ "name": "global_config",
2155
+ "pda": {
2156
+ "seeds": [
2157
+ {
2158
+ "kind": "const",
2159
+ "value": [
2160
+ 103,
2161
+ 108,
2162
+ 111,
2163
+ 98,
2164
+ 97,
2165
+ 108,
2166
+ 45,
2167
+ 99,
2168
+ 111,
2169
+ 110,
2170
+ 102,
2171
+ 105,
2172
+ 103
2173
+ ]
2174
+ }
2175
+ ]
2176
+ }
2177
+ },
2178
+ {
2179
+ "name": "platform_treasury_wallet",
2180
+ "docs": [
2181
+ "Wallet address that receives the flat SOL fee."
2182
+ ],
2183
+ "writable": true
2184
+ },
2185
+ {
2186
+ "name": "collateral_token_program"
2187
+ },
2188
+ {
2189
+ "name": "token_program",
2190
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
2191
+ },
2192
+ {
2193
+ "name": "system_program",
2194
+ "address": "11111111111111111111111111111111"
2195
+ }
2196
+ ],
2197
+ "args": [
2198
+ {
2199
+ "name": "args",
2200
+ "type": {
2201
+ "defined": {
2202
+ "name": "RedeemWinningArgs"
2203
+ }
2204
+ }
2205
+ }
2206
+ ]
2207
+ },
2208
+ {
2209
+ "name": "register_platform",
2210
+ "discriminator": [
2211
+ 115,
2212
+ 120,
2213
+ 8,
2214
+ 254,
2215
+ 177,
2216
+ 20,
2217
+ 8,
2218
+ 168
2219
+ ],
2220
+ "accounts": [
2221
+ {
2222
+ "name": "global_config",
2223
+ "writable": true,
2224
+ "pda": {
2225
+ "seeds": [
2226
+ {
2227
+ "kind": "const",
2228
+ "value": [
2229
+ 103,
2230
+ 108,
2231
+ 111,
2232
+ 98,
2233
+ 97,
2234
+ 108,
2235
+ 45,
2236
+ 99,
2237
+ 111,
2238
+ 110,
2239
+ 102,
2240
+ 105,
2241
+ 103
2242
+ ]
2243
+ }
2244
+ ]
2245
+ }
2246
+ },
2247
+ {
2248
+ "name": "platform_registry",
2249
+ "writable": true,
2250
+ "pda": {
2251
+ "seeds": [
2252
+ {
2253
+ "kind": "const",
2254
+ "value": [
2255
+ 112,
2256
+ 108,
2257
+ 97,
2258
+ 116,
2259
+ 102,
2260
+ 111,
2261
+ 114,
2262
+ 109
2263
+ ]
2264
+ },
2265
+ {
2266
+ "kind": "account",
2267
+ "path": "global_config.next_platform_id",
2268
+ "account": "GlobalConfig"
2269
+ }
2270
+ ]
2271
+ }
2272
+ },
2273
+ {
2274
+ "name": "authority",
2275
+ "writable": true,
2276
+ "signer": true
2277
+ },
2278
+ {
2279
+ "name": "system_program",
2280
+ "address": "11111111111111111111111111111111"
2281
+ }
2282
+ ],
2283
+ "args": [
2284
+ {
2285
+ "name": "profile_authority",
2286
+ "type": "pubkey"
2287
+ }
2288
+ ]
2289
+ },
2290
+ {
2291
+ "name": "remove_allowed_collateral_mint",
2292
+ "discriminator": [
2293
+ 74,
2294
+ 156,
2295
+ 218,
2296
+ 211,
2297
+ 102,
2298
+ 182,
2299
+ 68,
2300
+ 197
2301
+ ],
2302
+ "accounts": [
2303
+ {
2304
+ "name": "allowed_mint",
2305
+ "writable": true,
2306
+ "pda": {
2307
+ "seeds": [
2308
+ {
2309
+ "kind": "const",
2310
+ "value": [
2311
+ 97,
2312
+ 108,
2313
+ 108,
2314
+ 111,
2315
+ 119,
2316
+ 101,
2317
+ 100,
2318
+ 45,
2319
+ 109,
2320
+ 105,
2321
+ 110,
2322
+ 116
2323
+ ]
2324
+ },
2325
+ {
2326
+ "kind": "account",
2327
+ "path": "mint"
2328
+ }
2329
+ ]
2330
+ }
2331
+ },
2332
+ {
2333
+ "name": "global_config",
2334
+ "pda": {
2335
+ "seeds": [
2336
+ {
2337
+ "kind": "const",
2338
+ "value": [
2339
+ 103,
2340
+ 108,
2341
+ 111,
2342
+ 98,
2343
+ 97,
2344
+ 108,
2345
+ 45,
2346
+ 99,
2347
+ 111,
2348
+ 110,
2349
+ 102,
2350
+ 105,
2351
+ 103
2352
+ ]
2353
+ }
2354
+ ]
2355
+ }
2356
+ },
2357
+ {
2358
+ "name": "authority",
2359
+ "writable": true,
2360
+ "signer": true
2361
+ },
2362
+ {
2363
+ "name": "mint"
2364
+ }
2365
+ ],
2366
+ "args": []
2367
+ },
2368
+ {
2369
+ "name": "revoke_resolution_vote",
2370
+ "discriminator": [
2371
+ 128,
2372
+ 185,
2373
+ 253,
2374
+ 225,
2375
+ 238,
2376
+ 21,
2377
+ 110,
2378
+ 20
2379
+ ],
2380
+ "accounts": [
2381
+ {
2382
+ "name": "resolver_signer",
2383
+ "writable": true,
2384
+ "signer": true
2385
+ },
2386
+ {
2387
+ "name": "market",
2388
+ "writable": true,
2389
+ "pda": {
2390
+ "seeds": [
2391
+ {
2392
+ "kind": "const",
2393
+ "value": [
2394
+ 109,
2395
+ 97,
2396
+ 114,
2397
+ 107,
2398
+ 101,
2399
+ 116
2400
+ ]
2401
+ },
2402
+ {
2403
+ "kind": "account",
2404
+ "path": "market.creator",
2405
+ "account": "Market"
2406
+ },
2407
+ {
2408
+ "kind": "arg",
2409
+ "path": "args.market_id"
2410
+ }
2411
+ ]
2412
+ }
2413
+ },
2414
+ {
2415
+ "name": "resolver"
2416
+ },
2417
+ {
2418
+ "name": "resolution_vote",
2419
+ "writable": true
2420
+ },
2421
+ {
2422
+ "name": "market_outcome",
2423
+ "writable": true
2424
+ }
2425
+ ],
2426
+ "args": [
2427
+ {
2428
+ "name": "args",
2429
+ "type": {
2430
+ "defined": {
2431
+ "name": "RevokeResolutionVoteArgs"
2432
+ }
2433
+ }
2434
+ }
2435
+ ]
2436
+ },
2437
+ {
2438
+ "name": "update_config",
2439
+ "discriminator": [
2440
+ 29,
2441
+ 158,
2442
+ 252,
2443
+ 191,
2444
+ 10,
2445
+ 83,
2446
+ 219,
2447
+ 99
2448
+ ],
2449
+ "accounts": [
2450
+ {
2451
+ "name": "global_config",
2452
+ "writable": true,
2453
+ "pda": {
2454
+ "seeds": [
2455
+ {
2456
+ "kind": "const",
2457
+ "value": [
2458
+ 103,
2459
+ 108,
2460
+ 111,
2461
+ 98,
2462
+ 97,
2463
+ 108,
2464
+ 45,
2465
+ 99,
2466
+ 111,
2467
+ 110,
2468
+ 102,
2469
+ 105,
2470
+ 103
2471
+ ]
2472
+ }
2473
+ ]
2474
+ }
2475
+ },
2476
+ {
2477
+ "name": "authority",
2478
+ "docs": [
2479
+ "Current authority (primary or secondary) — must sign."
2480
+ ],
2481
+ "signer": true
2482
+ },
2483
+ {
2484
+ "name": "new_authority",
2485
+ "docs": [
2486
+ "The new primary authority after this update.",
2487
+ "Does NOT need to sign — pass the same key as `authority` to keep it unchanged."
2488
+ ]
2489
+ }
2490
+ ],
2491
+ "args": [
2492
+ {
2493
+ "name": "secondary_authority",
2494
+ "type": "pubkey"
2495
+ },
2496
+ {
2497
+ "name": "deposit_platform_fee_bps",
2498
+ "type": "u16"
2499
+ },
2500
+ {
2501
+ "name": "platform_treasury",
2502
+ "type": "pubkey"
2503
+ },
2504
+ {
2505
+ "name": "platform_fee_lamports",
2506
+ "type": "u64"
2507
+ },
2508
+ {
2509
+ "name": "parimutuel_withdraw_platform_fee_bps",
2510
+ "type": "u16"
2511
+ }
2512
+ ]
2513
+ },
2514
+ {
2515
+ "name": "update_market_category",
2516
+ "discriminator": [
2517
+ 113,
2518
+ 103,
2519
+ 2,
2520
+ 84,
2521
+ 209,
2522
+ 145,
2523
+ 109,
2524
+ 113
2525
+ ],
2526
+ "accounts": [
2527
+ {
2528
+ "name": "global_config",
2529
+ "pda": {
2530
+ "seeds": [
2531
+ {
2532
+ "kind": "const",
2533
+ "value": [
2534
+ 103,
2535
+ 108,
2536
+ 111,
2537
+ 98,
2538
+ 97,
2539
+ 108,
2540
+ 45,
2541
+ 99,
2542
+ 111,
2543
+ 110,
2544
+ 102,
2545
+ 105,
2546
+ 103
2547
+ ]
2548
+ }
2549
+ ]
2550
+ }
2551
+ },
2552
+ {
2553
+ "name": "market_category",
2554
+ "writable": true,
2555
+ "pda": {
2556
+ "seeds": [
2557
+ {
2558
+ "kind": "const",
2559
+ "value": [
2560
+ 109,
2561
+ 97,
2562
+ 114,
2563
+ 107,
2564
+ 101,
2565
+ 116,
2566
+ 45,
2567
+ 99,
2568
+ 97,
2569
+ 116,
2570
+ 101,
2571
+ 103,
2572
+ 111,
2573
+ 114,
2574
+ 121
2575
+ ]
2576
+ },
2577
+ {
2578
+ "kind": "account",
2579
+ "path": "market_category.platform_id",
2580
+ "account": "MarketCategory"
2581
+ },
2582
+ {
2583
+ "kind": "account",
2584
+ "path": "market_category.category_id",
2585
+ "account": "MarketCategory"
2586
+ }
2587
+ ]
2588
+ }
2589
+ },
2590
+ {
2591
+ "name": "authority",
2592
+ "signer": true
2593
+ }
2594
+ ],
2595
+ "args": [
2596
+ {
2597
+ "name": "name",
2598
+ "type": "string"
2599
+ },
2600
+ {
2601
+ "name": "active",
2602
+ "type": "bool"
2603
+ }
2604
+ ]
2605
+ },
2606
+ {
2607
+ "name": "update_parimutuel_state",
2608
+ "discriminator": [
2609
+ 253,
2610
+ 174,
2611
+ 237,
2612
+ 38,
2613
+ 172,
2614
+ 145,
2615
+ 202,
2616
+ 192
2617
+ ],
2618
+ "accounts": [
2619
+ {
2620
+ "name": "creator",
2621
+ "docs": [
2622
+ "Must be the market creator — enforced by constraint on `market`."
2623
+ ],
2624
+ "writable": true,
2625
+ "signer": true,
2626
+ "relations": [
2627
+ "market"
2628
+ ]
2629
+ },
2630
+ {
2631
+ "name": "market",
2632
+ "docs": [
2633
+ "PDA is derived from the *on-chain* `market.creator` field so that the address",
2634
+ "validation passes regardless of who the caller is. Authorization is then enforced",
2635
+ "by `has_one = creator`, which checks `market.creator == creator.key()` and",
2636
+ "returns `ConfigUnauthorized` when it fails."
2637
+ ],
2638
+ "pda": {
2639
+ "seeds": [
2640
+ {
2641
+ "kind": "const",
2642
+ "value": [
2643
+ 109,
2644
+ 97,
2645
+ 114,
2646
+ 107,
2647
+ 101,
2648
+ 116
2649
+ ]
2650
+ },
2651
+ {
2652
+ "kind": "account",
2653
+ "path": "market.creator",
2654
+ "account": "Market"
2655
+ },
2656
+ {
2657
+ "kind": "arg",
2658
+ "path": "args.market_id"
2659
+ }
2660
+ ]
2661
+ }
2662
+ },
2663
+ {
2664
+ "name": "parimutuel_state",
2665
+ "writable": true,
2666
+ "pda": {
2667
+ "seeds": [
2668
+ {
2669
+ "kind": "const",
2670
+ "value": [
2671
+ 112,
2672
+ 97,
2673
+ 114,
2674
+ 105
2675
+ ]
2676
+ },
2677
+ {
2678
+ "kind": "account",
2679
+ "path": "market"
2680
+ }
2681
+ ]
2682
+ }
2683
+ }
2684
+ ],
2685
+ "args": [
2686
+ {
2687
+ "name": "args",
2688
+ "type": {
2689
+ "defined": {
2690
+ "name": "UpdateParimutuelStateArgs"
2691
+ }
2692
+ }
2693
+ }
2694
+ ]
2695
+ },
2696
+ {
2697
+ "name": "upsert_platform_profile",
2698
+ "discriminator": [
2699
+ 119,
2700
+ 148,
2701
+ 66,
2702
+ 252,
2703
+ 16,
2704
+ 251,
2705
+ 53,
2706
+ 8
2707
+ ],
2708
+ "accounts": [
2709
+ {
2710
+ "name": "platform_registry",
2711
+ "pda": {
2712
+ "seeds": [
2713
+ {
2714
+ "kind": "const",
2715
+ "value": [
2716
+ 112,
2717
+ 108,
2718
+ 97,
2719
+ 116,
2720
+ 102,
2721
+ 111,
2722
+ 114,
2723
+ 109
2724
+ ]
2725
+ },
2726
+ {
2727
+ "kind": "arg",
2728
+ "path": "platform_id"
2729
+ }
2730
+ ]
2731
+ }
2732
+ },
2733
+ {
2734
+ "name": "platform_profile",
2735
+ "writable": true,
2736
+ "pda": {
2737
+ "seeds": [
2738
+ {
2739
+ "kind": "const",
2740
+ "value": [
2741
+ 112,
2742
+ 108,
2743
+ 97,
2744
+ 116,
2745
+ 102,
2746
+ 111,
2747
+ 114,
2748
+ 109,
2749
+ 45,
2750
+ 112,
2751
+ 114,
2752
+ 111,
2753
+ 102,
2754
+ 105,
2755
+ 108,
2756
+ 101
2757
+ ]
2758
+ },
2759
+ {
2760
+ "kind": "arg",
2761
+ "path": "platform_id"
2762
+ }
2763
+ ]
2764
+ }
2765
+ },
2766
+ {
2767
+ "name": "profile_authority",
2768
+ "writable": true,
2769
+ "signer": true
2770
+ },
2771
+ {
2772
+ "name": "system_program",
2773
+ "address": "11111111111111111111111111111111"
2774
+ }
2775
+ ],
2776
+ "args": [
2777
+ {
2778
+ "name": "platform_id",
2779
+ "type": "u32"
2780
+ },
2781
+ {
2782
+ "name": "display_name",
2783
+ "type": "string"
2784
+ },
2785
+ {
2786
+ "name": "url",
2787
+ "type": "string"
2788
+ }
2789
+ ]
2790
+ },
2791
+ {
2792
+ "name": "upsert_user_profile",
2793
+ "discriminator": [
2794
+ 28,
2795
+ 23,
2796
+ 233,
2797
+ 225,
2798
+ 9,
2799
+ 108,
2800
+ 138,
2801
+ 54
2802
+ ],
2803
+ "accounts": [
2804
+ {
2805
+ "name": "user_profile",
2806
+ "writable": true,
2807
+ "pda": {
2808
+ "seeds": [
2809
+ {
2810
+ "kind": "const",
2811
+ "value": [
2812
+ 117,
2813
+ 115,
2814
+ 101,
2815
+ 114,
2816
+ 45,
2817
+ 112,
2818
+ 114,
2819
+ 111,
2820
+ 102,
2821
+ 105,
2822
+ 108,
2823
+ 101
2824
+ ]
2825
+ },
2826
+ {
2827
+ "kind": "account",
2828
+ "path": "wallet"
2829
+ }
2830
+ ]
2831
+ }
2832
+ },
2833
+ {
2834
+ "name": "wallet",
2835
+ "docs": [
2836
+ "The wallet owner — pays rent on first creation, signs all updates."
2837
+ ],
2838
+ "writable": true,
2839
+ "signer": true
2840
+ },
2841
+ {
2842
+ "name": "system_program",
2843
+ "address": "11111111111111111111111111111111"
2844
+ }
2845
+ ],
2846
+ "args": [
2847
+ {
2848
+ "name": "display_name",
2849
+ "type": "string"
2850
+ },
2851
+ {
2852
+ "name": "url",
2853
+ "type": "string"
2854
+ }
2855
+ ]
2856
+ },
2857
+ {
2858
+ "name": "verify_platform_profile",
2859
+ "discriminator": [
2860
+ 6,
2861
+ 217,
2862
+ 93,
2863
+ 232,
2864
+ 216,
2865
+ 31,
2866
+ 64,
2867
+ 255
2868
+ ],
2869
+ "accounts": [
2870
+ {
2871
+ "name": "platform_profile",
2872
+ "writable": true,
2873
+ "pda": {
2874
+ "seeds": [
2875
+ {
2876
+ "kind": "const",
2877
+ "value": [
2878
+ 112,
2879
+ 108,
2880
+ 97,
2881
+ 116,
2882
+ 102,
2883
+ 111,
2884
+ 114,
2885
+ 109,
2886
+ 45,
2887
+ 112,
2888
+ 114,
2889
+ 111,
2890
+ 102,
2891
+ 105,
2892
+ 108,
2893
+ 101
2894
+ ]
2895
+ },
2896
+ {
2897
+ "kind": "arg",
2898
+ "path": "platform_id"
2899
+ }
2900
+ ]
2901
+ }
2902
+ },
2903
+ {
2904
+ "name": "authority",
2905
+ "signer": true
2906
+ },
2907
+ {
2908
+ "name": "global_config",
2909
+ "pda": {
2910
+ "seeds": [
2911
+ {
2912
+ "kind": "const",
2913
+ "value": [
2914
+ 103,
2915
+ 108,
2916
+ 111,
2917
+ 98,
2918
+ 97,
2919
+ 108,
2920
+ 45,
2921
+ 99,
2922
+ 111,
2923
+ 110,
2924
+ 102,
2925
+ 105,
2926
+ 103
2927
+ ]
2928
+ }
2929
+ ]
2930
+ }
2931
+ }
2932
+ ],
2933
+ "args": [
2934
+ {
2935
+ "name": "platform_id",
2936
+ "type": "u32"
2937
+ },
2938
+ {
2939
+ "name": "verified",
2940
+ "type": "bool"
2941
+ }
2942
+ ]
2943
+ },
2944
+ {
2945
+ "name": "verify_user_profile",
2946
+ "discriminator": [
2947
+ 187,
2948
+ 26,
2949
+ 249,
2950
+ 161,
2951
+ 54,
2952
+ 75,
2953
+ 107,
2954
+ 22
2955
+ ],
2956
+ "accounts": [
2957
+ {
2958
+ "name": "user_profile",
2959
+ "docs": [
2960
+ "The profile to verify. Must already exist — user must have called",
2961
+ "`upsert_user_profile` first. The `target_wallet` key is embedded in the",
2962
+ "PDA seeds so the authority must pass the correct account."
2963
+ ],
2964
+ "writable": true,
2965
+ "pda": {
2966
+ "seeds": [
2967
+ {
2968
+ "kind": "const",
2969
+ "value": [
2970
+ 117,
2971
+ 115,
2972
+ 101,
2973
+ 114,
2974
+ 45,
2975
+ 112,
2976
+ 114,
2977
+ 111,
2978
+ 102,
2979
+ 105,
2980
+ 108,
2981
+ 101
2982
+ ]
2983
+ },
2984
+ {
2985
+ "kind": "account",
2986
+ "path": "target_wallet"
2987
+ }
2988
+ ]
2989
+ }
2990
+ },
2991
+ {
2992
+ "name": "target_wallet",
2993
+ "docs": [
2994
+ "The wallet whose profile is being verified (not required to sign)."
2995
+ ]
2996
+ },
2997
+ {
2998
+ "name": "authority",
2999
+ "docs": [
3000
+ "Platform primary or secondary authority."
3001
+ ],
3002
+ "signer": true
3003
+ },
3004
+ {
3005
+ "name": "global_config",
3006
+ "pda": {
3007
+ "seeds": [
3008
+ {
3009
+ "kind": "const",
3010
+ "value": [
3011
+ 103,
3012
+ 108,
3013
+ 111,
3014
+ 98,
3015
+ 97,
3016
+ 108,
3017
+ 45,
3018
+ 99,
3019
+ 111,
3020
+ 110,
3021
+ 102,
3022
+ 105,
3023
+ 103
3024
+ ]
3025
+ }
3026
+ ]
3027
+ }
3028
+ }
3029
+ ],
3030
+ "args": [
3031
+ {
3032
+ "name": "verified",
3033
+ "type": "bool"
3034
+ }
3035
+ ]
3036
+ },
3037
+ {
3038
+ "name": "void_market",
3039
+ "discriminator": [
3040
+ 243,
3041
+ 175,
3042
+ 46,
3043
+ 124,
3044
+ 95,
3045
+ 101,
3046
+ 39,
3047
+ 69
3048
+ ],
3049
+ "accounts": [
3050
+ {
3051
+ "name": "signer",
3052
+ "signer": true
3053
+ },
3054
+ {
3055
+ "name": "global_config",
3056
+ "pda": {
3057
+ "seeds": [
3058
+ {
3059
+ "kind": "const",
3060
+ "value": [
3061
+ 103,
3062
+ 108,
3063
+ 111,
3064
+ 98,
3065
+ 97,
3066
+ 108,
3067
+ 45,
3068
+ 99,
3069
+ 111,
3070
+ 110,
3071
+ 102,
3072
+ 105,
3073
+ 103
3074
+ ]
3075
+ }
3076
+ ]
3077
+ }
3078
+ },
3079
+ {
3080
+ "name": "market",
3081
+ "writable": true,
3082
+ "pda": {
3083
+ "seeds": [
3084
+ {
3085
+ "kind": "const",
3086
+ "value": [
3087
+ 109,
3088
+ 97,
3089
+ 114,
3090
+ 107,
3091
+ 101,
3092
+ 116
3093
+ ]
3094
+ },
3095
+ {
3096
+ "kind": "account",
3097
+ "path": "market.creator",
3098
+ "account": "Market"
3099
+ },
3100
+ {
3101
+ "kind": "arg",
3102
+ "path": "args.market_id"
3103
+ }
3104
+ ]
3105
+ }
3106
+ }
3107
+ ],
3108
+ "args": [
3109
+ {
3110
+ "name": "args",
3111
+ "type": {
3112
+ "defined": {
3113
+ "name": "VoidMarketArgs"
3114
+ }
3115
+ }
3116
+ }
3117
+ ]
3118
+ },
3119
+ {
3120
+ "name": "vote_resolution",
3121
+ "discriminator": [
3122
+ 137,
3123
+ 137,
3124
+ 237,
3125
+ 83,
3126
+ 15,
3127
+ 30,
3128
+ 101,
3129
+ 248
3130
+ ],
3131
+ "accounts": [
3132
+ {
3133
+ "name": "resolver_signer",
3134
+ "writable": true,
3135
+ "signer": true
3136
+ },
3137
+ {
3138
+ "name": "market",
3139
+ "writable": true,
3140
+ "pda": {
3141
+ "seeds": [
3142
+ {
3143
+ "kind": "const",
3144
+ "value": [
3145
+ 109,
3146
+ 97,
3147
+ 114,
3148
+ 107,
3149
+ 101,
3150
+ 116
3151
+ ]
3152
+ },
3153
+ {
3154
+ "kind": "account",
3155
+ "path": "market.creator",
3156
+ "account": "Market"
3157
+ },
3158
+ {
3159
+ "kind": "arg",
3160
+ "path": "args.market_id"
3161
+ }
3162
+ ]
3163
+ }
3164
+ },
3165
+ {
3166
+ "name": "resolver"
3167
+ },
3168
+ {
3169
+ "name": "resolution_vote",
3170
+ "writable": true
3171
+ },
3172
+ {
3173
+ "name": "market_outcome",
3174
+ "docs": [
3175
+ "for invalid `outcome_index` (handler returns `InvalidOutcomeIndex` before touching data)."
3176
+ ],
3177
+ "writable": true
3178
+ },
3179
+ {
3180
+ "name": "system_program",
3181
+ "address": "11111111111111111111111111111111"
3182
+ }
3183
+ ],
3184
+ "args": [
3185
+ {
3186
+ "name": "args",
3187
+ "type": {
3188
+ "defined": {
3189
+ "name": "VoteResolutionArgs"
3190
+ }
3191
+ }
3192
+ }
3193
+ ]
3194
+ }
3195
+ ],
3196
+ "accounts": [
3197
+ {
3198
+ "name": "AllowedMint",
3199
+ "discriminator": [
3200
+ 173,
3201
+ 229,
3202
+ 179,
3203
+ 46,
3204
+ 121,
3205
+ 164,
3206
+ 247,
3207
+ 6
3208
+ ]
3209
+ },
3210
+ {
3211
+ "name": "GlobalConfig",
3212
+ "discriminator": [
3213
+ 149,
3214
+ 8,
3215
+ 156,
3216
+ 202,
3217
+ 160,
3218
+ 252,
3219
+ 176,
3220
+ 217
3221
+ ]
3222
+ },
3223
+ {
3224
+ "name": "Market",
3225
+ "discriminator": [
3226
+ 219,
3227
+ 190,
3228
+ 213,
3229
+ 55,
3230
+ 0,
3231
+ 227,
3232
+ 198,
3233
+ 154
3234
+ ]
3235
+ },
3236
+ {
3237
+ "name": "MarketCategory",
3238
+ "discriminator": [
3239
+ 167,
3240
+ 48,
3241
+ 213,
3242
+ 165,
3243
+ 89,
3244
+ 201,
3245
+ 35,
3246
+ 73
3247
+ ]
3248
+ },
3249
+ {
3250
+ "name": "MarketOutcome",
3251
+ "discriminator": [
3252
+ 131,
3253
+ 12,
3254
+ 34,
3255
+ 52,
3256
+ 115,
3257
+ 137,
3258
+ 62,
3259
+ 114
3260
+ ]
3261
+ },
3262
+ {
3263
+ "name": "ParimutuelPosition",
3264
+ "discriminator": [
3265
+ 10,
3266
+ 84,
3267
+ 157,
3268
+ 190,
3269
+ 166,
3270
+ 250,
3271
+ 7,
3272
+ 202
3273
+ ]
3274
+ },
3275
+ {
3276
+ "name": "ParimutuelState",
3277
+ "discriminator": [
3278
+ 110,
3279
+ 252,
3280
+ 55,
3281
+ 224,
3282
+ 143,
3283
+ 64,
3284
+ 218,
3285
+ 185
3286
+ ]
3287
+ },
3288
+ {
3289
+ "name": "PlatformProfile",
3290
+ "discriminator": [
3291
+ 86,
3292
+ 18,
3293
+ 120,
3294
+ 181,
3295
+ 59,
3296
+ 28,
3297
+ 203,
3298
+ 28
3299
+ ]
3300
+ },
3301
+ {
3302
+ "name": "PlatformRegistry",
3303
+ "discriminator": [
3304
+ 131,
3305
+ 232,
3306
+ 113,
3307
+ 28,
3308
+ 210,
3309
+ 200,
3310
+ 28,
3311
+ 174
3312
+ ]
3313
+ },
3314
+ {
3315
+ "name": "ResolutionVote",
3316
+ "discriminator": [
3317
+ 162,
3318
+ 225,
3319
+ 212,
3320
+ 237,
3321
+ 209,
3322
+ 107,
3323
+ 108,
3324
+ 6
3325
+ ]
3326
+ },
3327
+ {
3328
+ "name": "Resolver",
3329
+ "discriminator": [
3330
+ 108,
3331
+ 125,
3332
+ 211,
3333
+ 206,
3334
+ 52,
3335
+ 124,
3336
+ 132,
3337
+ 79
3338
+ ]
3339
+ },
3340
+ {
3341
+ "name": "UserProfile",
3342
+ "discriminator": [
3343
+ 32,
3344
+ 37,
3345
+ 119,
3346
+ 205,
3347
+ 179,
3348
+ 180,
3349
+ 13,
3350
+ 194
3351
+ ]
3352
+ }
3353
+ ],
3354
+ "errors": [
3355
+ {
3356
+ "code": 6000,
3357
+ "name": "ConfigUnauthorized",
3358
+ "msg": "Global config can only be updated by authority"
3359
+ },
3360
+ {
3361
+ "code": 6001,
3362
+ "name": "MintNotAllowed",
3363
+ "msg": "Collateral mint is not on the allowlist"
3364
+ },
3365
+ {
3366
+ "code": 6002,
3367
+ "name": "MarketClosed",
3368
+ "msg": "Market is closed (early or past close_at)"
3369
+ },
3370
+ {
3371
+ "code": 6003,
3372
+ "name": "MarketNotClosed",
3373
+ "msg": "Market is not closed yet"
3374
+ },
3375
+ {
3376
+ "code": 6004,
3377
+ "name": "MarketAlreadyResolved",
3378
+ "msg": "Market is already resolved"
3379
+ },
3380
+ {
3381
+ "code": 6005,
3382
+ "name": "MarketVoided",
3383
+ "msg": "Market is voided"
3384
+ },
3385
+ {
3386
+ "code": 6006,
3387
+ "name": "MarketNotVoided",
3388
+ "msg": "Market is not voided"
3389
+ },
3390
+ {
3391
+ "code": 6007,
3392
+ "name": "MarketNotResolved",
3393
+ "msg": "Market is not resolved"
3394
+ },
3395
+ {
3396
+ "code": 6008,
3397
+ "name": "CannotVoidResolvedMarket",
3398
+ "msg": "Cannot void an already resolved market"
3399
+ },
3400
+ {
3401
+ "code": 6009,
3402
+ "name": "InvalidOutcomeIndex",
3403
+ "msg": "Invalid outcome index"
3404
+ },
3405
+ {
3406
+ "code": 6010,
3407
+ "name": "NotResolver",
3408
+ "msg": "Signer is not a resolver for this market"
3409
+ },
3410
+ {
3411
+ "code": 6011,
3412
+ "name": "OnlyCreatorOrGlobalAuthority",
3413
+ "msg": "Only market creator or global config authority can perform this action"
3414
+ },
3415
+ {
3416
+ "code": 6012,
3417
+ "name": "InvalidFeeBps",
3418
+ "msg": "Platform fee + creator fee must not exceed 10000 bps"
3419
+ },
3420
+ {
3421
+ "code": 6013,
3422
+ "name": "CloseAtMustBeInFuture",
3423
+ "msg": "Close time must be in the future"
3424
+ },
3425
+ {
3426
+ "code": 6014,
3427
+ "name": "ZeroMintAmount",
3428
+ "msg": "Mint amount must be greater than zero"
3429
+ },
3430
+ {
3431
+ "code": 6015,
3432
+ "name": "InvalidResolutionThreshold",
3433
+ "msg": "Invalid resolution threshold (M must be <= number of resolvers)"
3434
+ },
3435
+ {
3436
+ "code": 6016,
3437
+ "name": "InvalidTreasuryAta",
3438
+ "msg": "Platform treasury token account mint or owner does not match global config"
3439
+ },
3440
+ {
3441
+ "code": 6017,
3442
+ "name": "AlreadyVoted",
3443
+ "msg": "Resolver has already voted; call revoke_resolution_vote before voting again"
3444
+ },
3445
+ {
3446
+ "code": 6018,
3447
+ "name": "NotVoted",
3448
+ "msg": "No active vote to revoke"
3449
+ },
3450
+ {
3451
+ "code": 6019,
3452
+ "name": "OutcomeTallyOverflow",
3453
+ "msg": "Arithmetic overflow in market math"
3454
+ },
3455
+ {
3456
+ "code": 6020,
3457
+ "name": "OutcomeTallyEmpty",
3458
+ "msg": "Resolution vote count for this outcome is zero"
3459
+ },
3460
+ {
3461
+ "code": 6021,
3462
+ "name": "OutcomeLabelEmpty",
3463
+ "msg": "Outcome label cannot be empty"
3464
+ },
3465
+ {
3466
+ "code": 6022,
3467
+ "name": "OutcomeLabelTooLong",
3468
+ "msg": "Outcome label exceeds max length"
3469
+ },
3470
+ {
3471
+ "code": 6023,
3472
+ "name": "OutcomeInvestmentCapExceeded",
3473
+ "msg": "Stake or mint would exceed max_outcome_investment for this outcome"
3474
+ },
3475
+ {
3476
+ "code": 6024,
3477
+ "name": "OutcomeNotInitialized",
3478
+ "msg": "Market outcome PDA not initialized — call initialize_market_outcome first"
3479
+ },
3480
+ {
3481
+ "code": 6025,
3482
+ "name": "InvalidMintCompleteSetRemainingAccounts",
3483
+ "msg": "mint_complete_set: remaining accounts must be [outcome_mint_i, user_ata_i] pairs; len = 2 * outcome_count"
3484
+ },
3485
+ {
3486
+ "code": 6026,
3487
+ "name": "DisplayNameTooLong",
3488
+ "msg": "Display name exceeds 50 bytes"
3489
+ },
3490
+ {
3491
+ "code": 6027,
3492
+ "name": "UrlTooLong",
3493
+ "msg": "URL exceeds 100 bytes"
3494
+ },
3495
+ {
3496
+ "code": 6028,
3497
+ "name": "EmptyTitle",
3498
+ "msg": "Market title cannot be empty"
3499
+ },
3500
+ {
3501
+ "code": 6029,
3502
+ "name": "TitleTooLong",
3503
+ "msg": "Market title exceeds 128 bytes"
3504
+ },
3505
+ {
3506
+ "code": 6030,
3507
+ "name": "MarketCategoryInactive",
3508
+ "msg": "Market category is inactive"
3509
+ },
3510
+ {
3511
+ "code": 6031,
3512
+ "name": "MarketCategoryNameEmpty",
3513
+ "msg": "Market category name cannot be empty"
3514
+ },
3515
+ {
3516
+ "code": 6032,
3517
+ "name": "MarketCategoryNameTooLong",
3518
+ "msg": "Market category name exceeds max length"
3519
+ },
3520
+ {
3521
+ "code": 6033,
3522
+ "name": "InvalidCategoryId",
3523
+ "msg": "category_id must match platform_registry.next_category_id for this platform"
3524
+ },
3525
+ {
3526
+ "code": 6034,
3527
+ "name": "InvalidMarketPlatformCategory",
3528
+ "msg": "platform_id must be non-zero when category_id is non-zero"
3529
+ },
3530
+ {
3531
+ "code": 6035,
3532
+ "name": "InvalidPlatformId",
3533
+ "msg": "Invalid or unregistered platform_id"
3534
+ },
3535
+ {
3536
+ "code": 6036,
3537
+ "name": "InvalidProfileAuthority",
3538
+ "msg": "profile_authority cannot be default pubkey"
3539
+ },
3540
+ {
3541
+ "code": 6037,
3542
+ "name": "WrongMarketType",
3543
+ "msg": "This instruction requires a different market type"
3544
+ },
3545
+ {
3546
+ "code": 6038,
3547
+ "name": "InvalidParimutuelPenalty",
3548
+ "msg": "Parimutuel penalty or split parameters are invalid"
3549
+ },
3550
+ {
3551
+ "code": 6039,
3552
+ "name": "ParimutuelNotInitialized",
3553
+ "msg": "Parimutuel state not initialized for this market"
3554
+ },
3555
+ {
3556
+ "code": 6040,
3557
+ "name": "ParimutuelInsufficientStake",
3558
+ "msg": "Stake or withdrawal amount exceeds balance"
3559
+ },
3560
+ {
3561
+ "code": 6041,
3562
+ "name": "ParimutuelEmptyWinningPool",
3563
+ "msg": "Winning outcome pool is empty — cannot claim"
3564
+ },
3565
+ {
3566
+ "code": 6042,
3567
+ "name": "ParimutuelAlreadyClaimed",
3568
+ "msg": "Position already claimed"
3569
+ },
3570
+ {
3571
+ "code": 6043,
3572
+ "name": "OnlyMarketCreator",
3573
+ "msg": "Only the market creator may initialize resolver accounts"
3574
+ },
3575
+ {
3576
+ "code": 6044,
3577
+ "name": "VaultNotEmpty",
3578
+ "msg": "Vault must be empty before abandoning the market"
3579
+ }
3580
+ ],
3581
+ "types": [
3582
+ {
3583
+ "name": "AbandonMarketArgs",
3584
+ "docs": [
3585
+ "Abandon an incomplete market and recover all rent.",
3586
+ "",
3587
+ "Only the market creator may call this, and only while the vault is empty",
3588
+ "(i.e. no user funds have ever been deposited). This is the primary",
3589
+ "recovery path for markets whose second setup transaction (resolver PDAs /",
3590
+ "pari-mutuel pool) never landed."
3591
+ ],
3592
+ "type": {
3593
+ "kind": "struct",
3594
+ "fields": [
3595
+ {
3596
+ "name": "market_id",
3597
+ "type": "u64"
3598
+ }
3599
+ ]
3600
+ }
3601
+ },
3602
+ {
3603
+ "name": "AllowedMint",
3604
+ "docs": [
3605
+ "Allowlist entry: this SPL mint may be used as `Market.collateral_mint`.",
3606
+ "PDA seeds: `[b\"allowed-mint\", mint.key()]`.",
3607
+ "Created by global authority via `add_allowed_collateral_mint`; removed via `remove_allowed_collateral_mint`."
3608
+ ],
3609
+ "type": {
3610
+ "kind": "struct",
3611
+ "fields": [
3612
+ {
3613
+ "name": "mint",
3614
+ "type": "pubkey"
3615
+ },
3616
+ {
3617
+ "name": "_padding",
3618
+ "type": {
3619
+ "array": [
3620
+ "u8",
3621
+ 30
3622
+ ]
3623
+ }
3624
+ }
3625
+ ]
3626
+ }
3627
+ },
3628
+ {
3629
+ "name": "CloseMarketEarlyArgs",
3630
+ "docs": [
3631
+ "Close the market early. Allowed by market creator or global config primary/secondary authority."
3632
+ ],
3633
+ "type": {
3634
+ "kind": "struct",
3635
+ "fields": [
3636
+ {
3637
+ "name": "market_id",
3638
+ "type": "u64"
3639
+ }
3640
+ ]
3641
+ }
3642
+ },
3643
+ {
3644
+ "name": "CreateMarketArgs",
3645
+ "type": {
3646
+ "kind": "struct",
3647
+ "fields": [
3648
+ {
3649
+ "name": "market_id",
3650
+ "type": "u64"
3651
+ },
3652
+ {
3653
+ "name": "outcome_count",
3654
+ "type": "u8"
3655
+ },
3656
+ {
3657
+ "name": "resolution_threshold",
3658
+ "type": "u8"
3659
+ },
3660
+ {
3661
+ "name": "close_at",
3662
+ "type": "i64"
3663
+ },
3664
+ {
3665
+ "name": "creator_fee_bps",
3666
+ "type": "u16"
3667
+ },
3668
+ {
3669
+ "name": "deposit_platform_fee_bps",
3670
+ "docs": [
3671
+ "0 = use global default — platform fee on **mint complete set** (deposit collateral)."
3672
+ ],
3673
+ "type": "u16"
3674
+ },
3675
+ {
3676
+ "name": "num_resolvers",
3677
+ "docs": [
3678
+ "How many resolver PDAs to initialize (slots 0..num_resolvers-1) via `initialize_market_resolver`."
3679
+ ],
3680
+ "type": "u8"
3681
+ },
3682
+ {
3683
+ "name": "max_outcome_investment",
3684
+ "docs": [
3685
+ "Max net collateral per outcome in mint **base units**; `0` = unlimited."
3686
+ ],
3687
+ "type": "u64"
3688
+ },
3689
+ {
3690
+ "name": "title",
3691
+ "docs": [
3692
+ "UTF-8 market title (1–128 bytes after trim)."
3693
+ ],
3694
+ "type": "string"
3695
+ },
3696
+ {
3697
+ "name": "market_type",
3698
+ "docs": [
3699
+ "[`MarketType::CompleteSet`] (SPL outcomes) or [`MarketType::Parimutuel`] (ledger pool)."
3700
+ ],
3701
+ "type": {
3702
+ "defined": {
3703
+ "name": "MarketType"
3704
+ }
3705
+ }
3706
+ },
3707
+ {
3708
+ "name": "platform_id",
3709
+ "docs": [
3710
+ "`0` = not scoped to a registered platform. Otherwise must match `platform_registry`."
3711
+ ],
3712
+ "type": "u32"
3713
+ },
3714
+ {
3715
+ "name": "category_id",
3716
+ "docs": [
3717
+ "`0` = uncategorized. Otherwise must match a `MarketCategory` for this `platform_id`."
3718
+ ],
3719
+ "type": "u8"
3720
+ }
3721
+ ]
3722
+ }
3723
+ },
3724
+ {
3725
+ "name": "FinalizeResolutionArgs",
3726
+ "docs": [
3727
+ "Check M-of-N using per-outcome tally PDAs and mark the market resolved when threshold is met.",
3728
+ "Anyone can call. No-op if already resolved or threshold not met."
3729
+ ],
3730
+ "type": {
3731
+ "kind": "struct",
3732
+ "fields": [
3733
+ {
3734
+ "name": "market_id",
3735
+ "type": "u64"
3736
+ }
3737
+ ]
3738
+ }
3739
+ },
3740
+ {
3741
+ "name": "GlobalConfig",
3742
+ "docs": [
3743
+ "Singleton program config: fees, treasury, platform id counter, authorities.",
3744
+ "PDA seeds: `[b\"global-config\"]` (exactly one account).",
3745
+ "Initialized in `initialize_config`; updated in `update_config` by primary or secondary authority."
3746
+ ],
3747
+ "type": {
3748
+ "kind": "struct",
3749
+ "fields": [
3750
+ {
3751
+ "name": "authority",
3752
+ "type": "pubkey"
3753
+ },
3754
+ {
3755
+ "name": "secondary_authority",
3756
+ "docs": [
3757
+ "Backup authority — same permissions as `authority`. `Pubkey::default()` disables."
3758
+ ],
3759
+ "type": "pubkey"
3760
+ },
3761
+ {
3762
+ "name": "deposit_platform_fee_bps",
3763
+ "docs": [
3764
+ "Default platform fee on **complete-set mint** and **pari-mutuel stake** (deposit collateral):",
3765
+ "basis points of **net** collateral credited to the vault / pool (`amount` in those instructions).",
3766
+ "Per-market override: `Market::deposit_platform_fee_bps` or `0` to use this."
3767
+ ],
3768
+ "type": "u16"
3769
+ },
3770
+ {
3771
+ "name": "platform_treasury",
3772
+ "docs": [
3773
+ "Wallet that receives platform token fees (ATA derived per collateral mint)."
3774
+ ],
3775
+ "type": "pubkey"
3776
+ },
3777
+ {
3778
+ "name": "platform_fee_lamports",
3779
+ "docs": [
3780
+ "Flat SOL fee (lamports) per user mint, redeem, pari stake, and pari withdraw."
3781
+ ],
3782
+ "type": "u64"
3783
+ },
3784
+ {
3785
+ "name": "next_platform_id",
3786
+ "docs": [
3787
+ "Next `platform_id` to assign in `register_platform` (starts at 1; `0` = none)."
3788
+ ],
3789
+ "type": "u32"
3790
+ },
3791
+ {
3792
+ "name": "parimutuel_withdraw_platform_fee_bps",
3793
+ "docs": [
3794
+ "Platform fee on **pari-mutuel early withdraw**: basis points of **gross** `amount` (withdrawal size).",
3795
+ "Taken from the post-penalty **refund** slice (capped so the user never receives less than zero)."
3796
+ ],
3797
+ "type": "u16"
3798
+ },
3799
+ {
3800
+ "name": "_padding",
3801
+ "type": {
3802
+ "array": [
3803
+ "u8",
3804
+ 40
3805
+ ]
3806
+ }
3807
+ }
3808
+ ]
3809
+ }
3810
+ },
3811
+ {
3812
+ "name": "InitializeMarketMintsArgs",
3813
+ "docs": [
3814
+ "Third step of market creation: initializes **8** outcome mint PDAs (protocol maximum).",
3815
+ "Trading uses only `market.outcome_count` mints; the rest remain empty but rent-funded.",
3816
+ "Decimals are inherited from `market.collateral_decimals` (stored during `create_market`),",
3817
+ "so 1 outcome token ≡ 1 collateral token."
3818
+ ],
3819
+ "type": {
3820
+ "kind": "struct",
3821
+ "fields": [
3822
+ {
3823
+ "name": "market_id",
3824
+ "type": "u64"
3825
+ }
3826
+ ]
3827
+ }
3828
+ },
3829
+ {
3830
+ "name": "InitializeMarketOutcomeArgs",
3831
+ "docs": [
3832
+ "Initializes **one** outcome PDA at `outcome_index` (0..`market.outcome_count`).",
3833
+ "Only `market.creator` may sign as payer."
3834
+ ],
3835
+ "type": {
3836
+ "kind": "struct",
3837
+ "fields": [
3838
+ {
3839
+ "name": "market_id",
3840
+ "type": "u64"
3841
+ },
3842
+ {
3843
+ "name": "outcome_index",
3844
+ "type": "u8"
3845
+ },
3846
+ {
3847
+ "name": "label",
3848
+ "type": "string"
3849
+ }
3850
+ ]
3851
+ }
3852
+ },
3853
+ {
3854
+ "name": "InitializeMarketResolverArgs",
3855
+ "docs": [
3856
+ "Initializes **one** resolver PDA at `resolver_index` (0..`market.num_resolvers`).",
3857
+ "Call once per slot; bundle multiple instructions in one transaction to save round-trips",
3858
+ "(including `initialize_parimutuel_state` for pari-mutuel markets — no ordering constraint).",
3859
+ "Only `market.creator` may sign as payer."
3860
+ ],
3861
+ "type": {
3862
+ "kind": "struct",
3863
+ "fields": [
3864
+ {
3865
+ "name": "market_id",
3866
+ "type": "u64"
3867
+ },
3868
+ {
3869
+ "name": "resolver_index",
3870
+ "type": "u8"
3871
+ },
3872
+ {
3873
+ "name": "resolver_pubkey",
3874
+ "type": "pubkey"
3875
+ }
3876
+ ]
3877
+ }
3878
+ },
3879
+ {
3880
+ "name": "InitializeParimutuelStateArgs",
3881
+ "docs": [
3882
+ "Second step for pari-mutuel markets: creates [`ParimutuelState`] (pools + penalty params)."
3883
+ ],
3884
+ "type": {
3885
+ "kind": "struct",
3886
+ "fields": [
3887
+ {
3888
+ "name": "market_id",
3889
+ "type": "u64"
3890
+ },
3891
+ {
3892
+ "name": "early_withdraw_penalty_bps",
3893
+ "docs": [
3894
+ "Basis points of the withdrawn amount withheld as penalty."
3895
+ ],
3896
+ "type": "u16"
3897
+ },
3898
+ {
3899
+ "name": "penalty_kept_in_pool_bps",
3900
+ "docs": [
3901
+ "Of the withheld penalty, bps that stay in the outcome pool as a bonus for remaining stakers.",
3902
+ "The rest (`penalty_surplus`) goes entirely to the creator fee account."
3903
+ ],
3904
+ "type": "u16"
3905
+ }
3906
+ ]
3907
+ }
3908
+ },
3909
+ {
3910
+ "name": "Market",
3911
+ "docs": [
3912
+ "Core market state: collateral, outcomes, fees, resolution, optional platform/category ids.",
3913
+ "PDA seeds: `[b\"market\", creator.key(), market_id.to_le_bytes()]` (u64 little-endian).",
3914
+ "Collateral vault is a separate PDA: `[market.key(), b\"vault\"]`. Created in `create_market` by the creator."
3915
+ ],
3916
+ "type": {
3917
+ "kind": "struct",
3918
+ "fields": [
3919
+ {
3920
+ "name": "collateral_mint",
3921
+ "type": "pubkey"
3922
+ },
3923
+ {
3924
+ "name": "collateral_decimals",
3925
+ "type": "u8"
3926
+ },
3927
+ {
3928
+ "name": "vault",
3929
+ "type": "pubkey"
3930
+ },
3931
+ {
3932
+ "name": "outcome_count",
3933
+ "type": "u8"
3934
+ },
3935
+ {
3936
+ "name": "close_at",
3937
+ "type": "i64"
3938
+ },
3939
+ {
3940
+ "name": "closed",
3941
+ "type": "bool"
3942
+ },
3943
+ {
3944
+ "name": "resolved_outcome_index",
3945
+ "type": {
3946
+ "option": "u8"
3947
+ }
3948
+ },
3949
+ {
3950
+ "name": "voided",
3951
+ "type": "bool"
3952
+ },
3953
+ {
3954
+ "name": "resolution_threshold",
3955
+ "type": "u8"
3956
+ },
3957
+ {
3958
+ "name": "num_resolvers",
3959
+ "docs": [
3960
+ "Set at creation; this many resolver PDAs must be initialized (slots `0..num_resolvers-1`)."
3961
+ ],
3962
+ "type": "u8"
3963
+ },
3964
+ {
3965
+ "name": "creator",
3966
+ "type": "pubkey"
3967
+ },
3968
+ {
3969
+ "name": "creator_fee_bps",
3970
+ "type": "u16"
3971
+ },
3972
+ {
3973
+ "name": "creator_fee_account",
3974
+ "type": "pubkey"
3975
+ },
3976
+ {
3977
+ "name": "deposit_platform_fee_bps",
3978
+ "docs": [
3979
+ "0 = use global `deposit_platform_fee_bps` — platform fee on **net** deposit for **mint complete set** and **pari stake**."
3980
+ ],
3981
+ "type": "u16"
3982
+ },
3983
+ {
3984
+ "name": "bump",
3985
+ "type": "u8"
3986
+ },
3987
+ {
3988
+ "name": "title",
3989
+ "docs": [
3990
+ "UTF-8 title shown in UIs (max 128 bytes)."
3991
+ ],
3992
+ "type": "string"
3993
+ },
3994
+ {
3995
+ "name": "category_id",
3996
+ "docs": [
3997
+ "`0` = uncategorized. Otherwise pairs with `platform_id` for category PDA derivation."
3998
+ ],
3999
+ "type": "u8"
4000
+ },
4001
+ {
4002
+ "name": "market_type",
4003
+ "type": {
4004
+ "defined": {
4005
+ "name": "MarketType"
4006
+ }
4007
+ }
4008
+ },
4009
+ {
4010
+ "name": "market_id",
4011
+ "docs": [
4012
+ "Stored at creation so the UI can always recover the PDA seed without",
4013
+ "requiring the creator to remember the random u64."
4014
+ ],
4015
+ "type": "u64"
4016
+ },
4017
+ {
4018
+ "name": "max_outcome_investment",
4019
+ "docs": [
4020
+ "Max net collateral per outcome in **smallest units** of `collateral_mint` (same as vault).",
4021
+ "`0` = unlimited. Pari-mutuel: enforced against `ParimutuelState.outcome_pools[i]`.",
4022
+ "Complete-set: enforced against `complete_set_per_outcome_outstanding` (each outcome minted equally)."
4023
+ ],
4024
+ "type": "u64"
4025
+ },
4026
+ {
4027
+ "name": "complete_set_per_outcome_outstanding",
4028
+ "docs": [
4029
+ "Complete-set markets only: current net amount minted per outcome index (all indices equal).",
4030
+ "Unused (stays 0) for pari-mutuel markets."
4031
+ ],
4032
+ "type": "u64"
4033
+ },
4034
+ {
4035
+ "name": "platform_id",
4036
+ "docs": [
4037
+ "Site / partner id for discovery filtering and category scope. `0` = not scoped to a platform."
4038
+ ],
4039
+ "type": "u32"
4040
+ },
4041
+ {
4042
+ "name": "_padding",
4043
+ "type": {
4044
+ "array": [
4045
+ "u8",
4046
+ 40
4047
+ ]
4048
+ }
4049
+ }
4050
+ ]
4051
+ }
4052
+ },
4053
+ {
4054
+ "name": "MarketCategory",
4055
+ "docs": [
4056
+ "Display name for a category under one platform (`platform_id`, `category_id`).",
4057
+ "PDA seeds: `[b\"market-category\", platform_id.to_le_bytes(), category_id.to_le_bytes()]`",
4058
+ "(`category_id` is passed as an instruction arg and must equal `next_category_id` before bump).",
4059
+ "Created in `create_market_category` (global authority); updated in `update_market_category`."
4060
+ ],
4061
+ "type": {
4062
+ "kind": "struct",
4063
+ "fields": [
4064
+ {
4065
+ "name": "platform_id",
4066
+ "type": "u32"
4067
+ },
4068
+ {
4069
+ "name": "category_id",
4070
+ "docs": [
4071
+ "Monotonic per-platform id (matches PDA seed)."
4072
+ ],
4073
+ "type": "u8"
4074
+ },
4075
+ {
4076
+ "name": "name",
4077
+ "type": "string"
4078
+ },
4079
+ {
4080
+ "name": "active",
4081
+ "type": "bool"
4082
+ },
4083
+ {
4084
+ "name": "bump",
4085
+ "type": "u8"
4086
+ },
4087
+ {
4088
+ "name": "_padding",
4089
+ "type": {
4090
+ "array": [
4091
+ "u8",
4092
+ 40
4093
+ ]
4094
+ }
4095
+ }
4096
+ ]
4097
+ }
4098
+ },
4099
+ {
4100
+ "name": "MarketOutcome",
4101
+ "docs": [
4102
+ "Per-outcome label and resolution vote tally for that outcome.",
4103
+ "PDA seeds: `[market.key(), b\"outcome\", outcome_index]` (single-byte index).",
4104
+ "Initialized by market creator in `initialize_market_outcome` (once per outcome index)."
4105
+ ],
4106
+ "type": {
4107
+ "kind": "struct",
4108
+ "fields": [
4109
+ {
4110
+ "name": "resolution_vote_count",
4111
+ "docs": [
4112
+ "Resolver votes currently counting toward this outcome (M-of-N)."
4113
+ ],
4114
+ "type": "u8"
4115
+ },
4116
+ {
4117
+ "name": "bump",
4118
+ "type": "u8"
4119
+ },
4120
+ {
4121
+ "name": "label",
4122
+ "docs": [
4123
+ "UTF-8 label for UIs (max 64 bytes)."
4124
+ ],
4125
+ "type": "string"
4126
+ },
4127
+ {
4128
+ "name": "_padding",
4129
+ "type": {
4130
+ "array": [
4131
+ "u8",
4132
+ 32
4133
+ ]
4134
+ }
4135
+ }
4136
+ ]
4137
+ }
4138
+ },
4139
+ {
4140
+ "name": "MarketType",
4141
+ "docs": [
4142
+ "Market mechanics variant stored in [`Market::market_type`](super::market::Market) (not a separate account).",
4143
+ "Serialized as `u8` (`repr(u8)`); set at `create_market` and immutable thereafter."
4144
+ ],
4145
+ "repr": {
4146
+ "kind": "rust"
4147
+ },
4148
+ "type": {
4149
+ "kind": "enum",
4150
+ "variants": [
4151
+ {
4152
+ "name": "CompleteSet"
4153
+ },
4154
+ {
4155
+ "name": "Parimutuel"
4156
+ }
4157
+ ]
4158
+ }
4159
+ },
4160
+ {
4161
+ "name": "MintCompleteSetArgs",
4162
+ "type": {
4163
+ "kind": "struct",
4164
+ "fields": [
4165
+ {
4166
+ "name": "amount",
4167
+ "docs": [
4168
+ "Collateral base units **credited to the vault** and **minted per outcome token**. Fees are taken on top."
4169
+ ],
4170
+ "type": "u64"
4171
+ },
4172
+ {
4173
+ "name": "market_id",
4174
+ "type": "u64"
4175
+ }
4176
+ ]
4177
+ }
4178
+ },
4179
+ {
4180
+ "name": "ParimutuelClaimArgs",
4181
+ "type": {
4182
+ "kind": "struct",
4183
+ "fields": [
4184
+ {
4185
+ "name": "market_id",
4186
+ "type": "u64"
4187
+ },
4188
+ {
4189
+ "name": "outcome_index",
4190
+ "docs": [
4191
+ "Must equal the resolved winning outcome index."
4192
+ ],
4193
+ "type": "u8"
4194
+ }
4195
+ ]
4196
+ }
4197
+ },
4198
+ {
4199
+ "name": "ParimutuelPosition",
4200
+ "docs": [
4201
+ "User’s pari-mutuel stake ledger for one outcome on one market.",
4202
+ "PDA seeds: `[b\"pari-pos\", market.key(), user.key(), outcome_index]` (single-byte last seed).",
4203
+ "Created/updated by `parimutuel_stake`, `parimutuel_withdraw`, `parimutuel_claim`."
4204
+ ],
4205
+ "type": {
4206
+ "kind": "struct",
4207
+ "fields": [
4208
+ {
4209
+ "name": "market",
4210
+ "type": "pubkey"
4211
+ },
4212
+ {
4213
+ "name": "user",
4214
+ "type": "pubkey"
4215
+ },
4216
+ {
4217
+ "name": "outcome_index",
4218
+ "type": "u8"
4219
+ },
4220
+ {
4221
+ "name": "active_stake",
4222
+ "type": "u64"
4223
+ },
4224
+ {
4225
+ "name": "total_deposited",
4226
+ "type": "u64"
4227
+ },
4228
+ {
4229
+ "name": "total_withdrawn",
4230
+ "type": "u64"
4231
+ },
4232
+ {
4233
+ "name": "claimed",
4234
+ "type": "bool"
4235
+ },
4236
+ {
4237
+ "name": "bump",
4238
+ "type": "u8"
4239
+ },
4240
+ {
4241
+ "name": "_padding",
4242
+ "type": {
4243
+ "array": [
4244
+ "u8",
4245
+ 40
4246
+ ]
4247
+ }
4248
+ }
4249
+ ]
4250
+ }
4251
+ },
4252
+ {
4253
+ "name": "ParimutuelStakeArgs",
4254
+ "type": {
4255
+ "kind": "struct",
4256
+ "fields": [
4257
+ {
4258
+ "name": "market_id",
4259
+ "type": "u64"
4260
+ },
4261
+ {
4262
+ "name": "outcome_index",
4263
+ "type": "u8"
4264
+ },
4265
+ {
4266
+ "name": "amount",
4267
+ "docs": [
4268
+ "Collateral base units **credited to the pari pool** (net stake). Platform and creator token fees",
4269
+ "are `floor(amount * bps / 10000)` each and debited **in addition** to this amount."
4270
+ ],
4271
+ "type": "u64"
4272
+ }
4273
+ ]
4274
+ }
4275
+ },
4276
+ {
4277
+ "name": "ParimutuelState",
4278
+ "docs": [
4279
+ "Pari-mutuel pool totals, penalties, and post-resolution snapshots for one market.",
4280
+ "PDA seeds: `[b\"pari\", market.key()]`.",
4281
+ "Initialized in `initialize_parimutuel_state` (creator); pool params updated in `update_parimutuel_state`."
4282
+ ],
4283
+ "type": {
4284
+ "kind": "struct",
4285
+ "fields": [
4286
+ {
4287
+ "name": "market",
4288
+ "type": "pubkey"
4289
+ },
4290
+ {
4291
+ "name": "total_pool",
4292
+ "docs": [
4293
+ "Sum of `outcome_pools` **plus any unattributed pool-keep bonus** from early exits.",
4294
+ "May exceed `sum(outcome_pools)` once withdrawals with `penalty_kept_in_pool_bps > 0` occur."
4295
+ ],
4296
+ "type": "u64"
4297
+ },
4298
+ {
4299
+ "name": "outcome_pools",
4300
+ "docs": [
4301
+ "Collateral per outcome bucket; index `i < outcome_count` is used.",
4302
+ "Stays aligned with the sum of `active_stake` on side `i`."
4303
+ ],
4304
+ "type": {
4305
+ "array": [
4306
+ "u64",
4307
+ 8
4308
+ ]
4309
+ }
4310
+ },
4311
+ {
4312
+ "name": "early_withdraw_penalty_bps",
4313
+ "docs": [
4314
+ "Basis points of the **withdrawn amount** withheld as penalty (before refund). Example: 500 = 5%."
4315
+ ],
4316
+ "type": "u16"
4317
+ },
4318
+ {
4319
+ "name": "penalty_kept_in_pool_bps",
4320
+ "docs": [
4321
+ "Of the withheld penalty, basis points (of 10 000) that stay in the pool as a bonus for",
4322
+ "remaining stakers / winners. The rest (`penalty_surplus`) goes to the creator fee account."
4323
+ ],
4324
+ "type": "u16"
4325
+ },
4326
+ {
4327
+ "name": "bump",
4328
+ "type": "u8"
4329
+ },
4330
+ {
4331
+ "name": "resolved_total_pool",
4332
+ "docs": [
4333
+ "Snapshot at first claim after resolution (lazy); frozen payout math."
4334
+ ],
4335
+ "type": {
4336
+ "option": "u64"
4337
+ }
4338
+ },
4339
+ {
4340
+ "name": "resolved_winning_outcome_pool",
4341
+ "type": {
4342
+ "option": "u64"
4343
+ }
4344
+ },
4345
+ {
4346
+ "name": "_padding",
4347
+ "type": {
4348
+ "array": [
4349
+ "u8",
4350
+ 40
4351
+ ]
4352
+ }
4353
+ }
4354
+ ]
4355
+ }
4356
+ },
4357
+ {
4358
+ "name": "ParimutuelWithdrawArgs",
4359
+ "type": {
4360
+ "kind": "struct",
4361
+ "fields": [
4362
+ {
4363
+ "name": "market_id",
4364
+ "type": "u64"
4365
+ },
4366
+ {
4367
+ "name": "outcome_index",
4368
+ "type": "u8"
4369
+ },
4370
+ {
4371
+ "name": "amount",
4372
+ "type": "u64"
4373
+ }
4374
+ ]
4375
+ }
4376
+ },
4377
+ {
4378
+ "name": "PlatformProfile",
4379
+ "docs": [
4380
+ "Site / partner metadata for a registered `platform_id` (from `register_platform`).",
4381
+ "PDA seeds: `[b\"platform-profile\", platform_id.to_le_bytes()]`.",
4382
+ "Upserted/closed by `profile_authority` on [`PlatformRegistry`](super::platform_registry::PlatformRegistry); `verified` set by global authority in `verify_platform_profile`."
4383
+ ],
4384
+ "type": {
4385
+ "kind": "struct",
4386
+ "fields": [
4387
+ {
4388
+ "name": "display_name",
4389
+ "type": "string"
4390
+ },
4391
+ {
4392
+ "name": "url",
4393
+ "type": "string"
4394
+ },
4395
+ {
4396
+ "name": "verified",
4397
+ "docs": [
4398
+ "Set exclusively by the platform authority via `verify_platform_profile`."
4399
+ ],
4400
+ "type": "bool"
4401
+ },
4402
+ {
4403
+ "name": "_padding",
4404
+ "type": {
4405
+ "array": [
4406
+ "u8",
4407
+ 40
4408
+ ]
4409
+ }
4410
+ }
4411
+ ]
4412
+ }
4413
+ },
4414
+ {
4415
+ "name": "PlatformRegistry",
4416
+ "docs": [
4417
+ "Per-platform registry: next category id and who may edit [`PlatformProfile`](super::platform_profile::PlatformProfile).",
4418
+ "PDA seeds: `[b\"platform\", platform_id.to_le_bytes()]`.",
4419
+ "Created in `register_platform` (global authority assigns `platform_id` from `GlobalConfig.next_platform_id`)."
4420
+ ],
4421
+ "type": {
4422
+ "kind": "struct",
4423
+ "fields": [
4424
+ {
4425
+ "name": "platform_id",
4426
+ "docs": [
4427
+ "Matches PDA seed (assigned at `register_platform`)."
4428
+ ],
4429
+ "type": "u32"
4430
+ },
4431
+ {
4432
+ "name": "next_category_id",
4433
+ "docs": [
4434
+ "Next `category_id` for [`MarketCategory`] under this platform (`0`..=`255`; max 256 categories)."
4435
+ ],
4436
+ "type": "u8"
4437
+ },
4438
+ {
4439
+ "name": "profile_authority",
4440
+ "docs": [
4441
+ "Signs `upsert_platform_profile` / `close_platform_profile` for this `platform_id`."
4442
+ ],
4443
+ "type": "pubkey"
4444
+ },
4445
+ {
4446
+ "name": "bump",
4447
+ "type": "u8"
4448
+ },
4449
+ {
4450
+ "name": "_padding",
4451
+ "type": {
4452
+ "array": [
4453
+ "u8",
4454
+ 64
4455
+ ]
4456
+ }
4457
+ }
4458
+ ]
4459
+ }
4460
+ },
4461
+ {
4462
+ "name": "RedeemCompleteSetArgs",
4463
+ "type": {
4464
+ "kind": "struct",
4465
+ "fields": [
4466
+ {
4467
+ "name": "market_id",
4468
+ "type": "u64"
4469
+ }
4470
+ ]
4471
+ }
4472
+ },
4473
+ {
4474
+ "name": "RedeemWinningArgs",
4475
+ "type": {
4476
+ "kind": "struct",
4477
+ "fields": [
4478
+ {
4479
+ "name": "market_id",
4480
+ "type": "u64"
4481
+ },
4482
+ {
4483
+ "name": "amount",
4484
+ "type": "u64"
4485
+ }
4486
+ ]
4487
+ }
4488
+ },
4489
+ {
4490
+ "name": "ResolutionVote",
4491
+ "docs": [
4492
+ "Resolver vote state for one slot: whether they voted and which outcome they chose.",
4493
+ "PDA seeds: `[market.key(), b\"vote\", resolver_index]` (single-byte index).",
4494
+ "Written by `vote_resolution` / `revoke_resolution_vote`; `has_voted` gates re-votes until revoke."
4495
+ ],
4496
+ "type": {
4497
+ "kind": "struct",
4498
+ "fields": [
4499
+ {
4500
+ "name": "has_voted",
4501
+ "type": "bool"
4502
+ },
4503
+ {
4504
+ "name": "outcome_index",
4505
+ "type": "u8"
4506
+ },
4507
+ {
4508
+ "name": "_padding",
4509
+ "type": {
4510
+ "array": [
4511
+ "u8",
4512
+ 40
4513
+ ]
4514
+ }
4515
+ }
4516
+ ]
4517
+ }
4518
+ },
4519
+ {
4520
+ "name": "Resolver",
4521
+ "docs": [
4522
+ "Authorized resolver wallet for one slot on a market.",
4523
+ "PDA seeds: `[market.key(), b\"resolver\", resolver_index]` (single-byte index).",
4524
+ "Set by market creator in `initialize_market_resolver`; `vote_resolution` requires `resolver_signer == resolver_pubkey`."
4525
+ ],
4526
+ "type": {
4527
+ "kind": "struct",
4528
+ "fields": [
4529
+ {
4530
+ "name": "resolver_pubkey",
4531
+ "type": "pubkey"
4532
+ },
4533
+ {
4534
+ "name": "_padding",
4535
+ "type": {
4536
+ "array": [
4537
+ "u8",
4538
+ 40
4539
+ ]
4540
+ }
4541
+ }
4542
+ ]
4543
+ }
4544
+ },
4545
+ {
4546
+ "name": "RevokeResolutionVoteArgs",
4547
+ "docs": [
4548
+ "Clears a resolver's active vote (1 → 0): decrements the tally for `outcome_index` and",
4549
+ "sets `has_voted` false. `outcome_index` must match the stored vote."
4550
+ ],
4551
+ "type": {
4552
+ "kind": "struct",
4553
+ "fields": [
4554
+ {
4555
+ "name": "market_id",
4556
+ "type": "u64"
4557
+ },
4558
+ {
4559
+ "name": "resolver_index",
4560
+ "type": "u8"
4561
+ },
4562
+ {
4563
+ "name": "outcome_index",
4564
+ "docs": [
4565
+ "Must equal the current `resolution_vote.outcome_index` while `has_voted` is true."
4566
+ ],
4567
+ "type": "u8"
4568
+ }
4569
+ ]
4570
+ }
4571
+ },
4572
+ {
4573
+ "name": "UpdateParimutuelStateArgs",
4574
+ "docs": [
4575
+ "Update the penalty parameters of a pari-mutuel pool. Only the market creator can call this.",
4576
+ "The market must not be resolved or voided (post-resolution withdrawals are impossible anyway,",
4577
+ "but we guard here to keep state changes predictable)."
4578
+ ],
4579
+ "type": {
4580
+ "kind": "struct",
4581
+ "fields": [
4582
+ {
4583
+ "name": "market_id",
4584
+ "type": "u64"
4585
+ },
4586
+ {
4587
+ "name": "early_withdraw_penalty_bps",
4588
+ "docs": [
4589
+ "New early-exit penalty rate (bps of gross withdrawn amount)."
4590
+ ],
4591
+ "type": "u16"
4592
+ },
4593
+ {
4594
+ "name": "penalty_kept_in_pool_bps",
4595
+ "docs": [
4596
+ "New fraction of the penalty that stays in the pool as a winner bonus (bps of penalty).",
4597
+ "The remainder goes to the creator fee account."
4598
+ ],
4599
+ "type": "u16"
4600
+ }
4601
+ ]
4602
+ }
4603
+ },
4604
+ {
4605
+ "name": "UserProfile",
4606
+ "docs": [
4607
+ "Public profile for a user wallet (display name, URL, verification flag).",
4608
+ "PDA seeds: `[b\"user-profile\", wallet.key()]`.",
4609
+ "Upserted/closed by the wallet in `upsert_user_profile` / `close_user_profile`; `verified` set by global authority in `verify_user_profile`."
4610
+ ],
4611
+ "type": {
4612
+ "kind": "struct",
4613
+ "fields": [
4614
+ {
4615
+ "name": "display_name",
4616
+ "docs": [
4617
+ "Optional display name chosen by the wallet owner. Max `MAX_DISPLAY_NAME_LEN` UTF-8 bytes."
4618
+ ],
4619
+ "type": "string"
4620
+ },
4621
+ {
4622
+ "name": "url",
4623
+ "docs": [
4624
+ "Optional URL (website / social). Max `MAX_URL_LEN` UTF-8 bytes."
4625
+ ],
4626
+ "type": "string"
4627
+ },
4628
+ {
4629
+ "name": "verified",
4630
+ "docs": [
4631
+ "Set exclusively by the platform authority via `verify_user_profile`."
4632
+ ],
4633
+ "type": "bool"
4634
+ },
4635
+ {
4636
+ "name": "_padding",
4637
+ "type": {
4638
+ "array": [
4639
+ "u8",
4640
+ 40
4641
+ ]
4642
+ }
4643
+ }
4644
+ ]
4645
+ }
4646
+ },
4647
+ {
4648
+ "name": "VoidMarketArgs",
4649
+ "docs": [
4650
+ "Void the market. Allowed by market creator or global config primary/secondary authority.",
4651
+ "Rejected if already resolved."
4652
+ ],
4653
+ "type": {
4654
+ "kind": "struct",
4655
+ "fields": [
4656
+ {
4657
+ "name": "market_id",
4658
+ "type": "u64"
4659
+ }
4660
+ ]
4661
+ }
4662
+ },
4663
+ {
4664
+ "name": "VoteResolutionArgs",
4665
+ "docs": [
4666
+ "A resolver casts a vote for an outcome. Requires `has_voted == false` on the vote PDA",
4667
+ "(first vote or after `revoke_resolution_vote`). Increments `MarketOutcome.resolution_vote_count`.",
4668
+ "The `MarketOutcome` PDA must exist (`initialize_market_outcome`)."
4669
+ ],
4670
+ "type": {
4671
+ "kind": "struct",
4672
+ "fields": [
4673
+ {
4674
+ "name": "market_id",
4675
+ "type": "u64"
4676
+ },
4677
+ {
4678
+ "name": "outcome_index",
4679
+ "type": "u8"
4680
+ },
4681
+ {
4682
+ "name": "resolver_index",
4683
+ "docs": [
4684
+ "Resolver slot index; must match `resolver` and be `< market.num_resolvers`."
4685
+ ],
4686
+ "type": "u8"
4687
+ }
4688
+ ]
4689
+ }
4690
+ }
4691
+ ]
4692
+ }