@theliem/xmarket-sdk 3.1.0 → 3.1.1

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.
@@ -9,9 +9,6 @@
9
9
  "instructions": [
10
10
  {
11
11
  "name": "add_admin",
12
- "docs": [
13
- "Set the admin (owner only). Replaces any existing admin."
14
- ],
15
12
  "discriminator": [
16
13
  177,
17
14
  236,
@@ -25,9 +22,6 @@
25
22
  "accounts": [
26
23
  {
27
24
  "name": "owner",
28
- "docs": [
29
- "Must be the current owner"
30
- ],
31
25
  "signer": true
32
26
  },
33
27
  {
@@ -64,9 +58,6 @@
64
58
  },
65
59
  {
66
60
  "name": "add_to_whitelist",
67
- "docs": [
68
- "Add an address to the question market whitelist (admin only)."
69
- ],
70
61
  "discriminator": [
71
62
  157,
72
63
  211,
@@ -121,9 +112,6 @@
121
112
  },
122
113
  {
123
114
  "name": "approve_presale",
124
- "docs": [
125
- "Whitelist-only: approve presale, create question+condition+market oracle."
126
- ],
127
115
  "discriminator": [
128
116
  145,
129
117
  218,
@@ -325,9 +313,6 @@
325
313
  },
326
314
  {
327
315
  "name": "approve_question",
328
- "docs": [
329
- "Approve a pending question submitted via create_question_with_condition."
330
- ],
331
316
  "discriminator": [
332
317
  54,
333
318
  149,
@@ -346,11 +331,6 @@
346
331
  ],
347
332
  "signer": true
348
333
  },
349
- {
350
- "name": "payer",
351
- "writable": true,
352
- "signer": true
353
- },
354
334
  {
355
335
  "name": "config",
356
336
  "docs": [
@@ -390,9 +370,6 @@
390
370
  },
391
371
  {
392
372
  "name": "collect_presale_revenue",
393
- "docs": [
394
- "Whitelist-only: distribute presale vault revenue to referral/company/creator."
395
- ],
396
373
  "discriminator": [
397
374
  44,
398
375
  142,
@@ -480,9 +457,6 @@
480
457
  },
481
458
  {
482
459
  "name": "collect_trading_fee",
483
- "docs": [
484
- "Whitelist-only: snapshot QT supply so MST holders can claim trading fees."
485
- ],
486
460
  "discriminator": [
487
461
  97,
488
462
  106,
@@ -543,9 +517,6 @@
543
517
  },
544
518
  {
545
519
  "name": "create_presale",
546
- "docs": [
547
- "Any user creates a presale (with initial buy). Routes through presale program."
548
- ],
549
520
  "discriminator": [
550
521
  176,
551
522
  144,
@@ -758,6 +729,13 @@
758
729
  }
759
730
  }
760
731
  },
732
+ {
733
+ "name": "qt_metadata",
734
+ "writable": true
735
+ },
736
+ {
737
+ "name": "token_metadata_program"
738
+ },
761
739
  {
762
740
  "name": "presale_program",
763
741
  "address": "2Rnw1VoEtsUMQ7wkvYZjDehqSqRob6uNkeymDfvKrquB"
@@ -792,10 +770,6 @@
792
770
  },
793
771
  {
794
772
  "name": "create_question_admin",
795
- "docs": [
796
- "Whitelist-only — matches EVM createQuestionAdmin.",
797
- "Atomically creates Question + CTF condition + YES/NO mints. Status = Approved immediately."
798
- ],
799
773
  "discriminator": [
800
774
  166,
801
775
  168,
@@ -810,23 +784,18 @@
810
784
  {
811
785
  "name": "creator",
812
786
  "docs": [
813
- "Whitelisted creator (must be in config.whitelist or be admin/owner)"
787
+ "Whitelisted creator also pays rent"
814
788
  ],
789
+ "writable": true,
815
790
  "signer": true
816
791
  },
817
792
  {
818
793
  "name": "payer",
819
- "docs": [
820
- "Fee payer — can differ from creator (e.g. BE wallet pays rent)"
821
- ],
822
794
  "writable": true,
823
795
  "signer": true
824
796
  },
825
797
  {
826
798
  "name": "config",
827
- "docs": [
828
- "QuestionMarket config"
829
- ],
830
799
  "writable": true,
831
800
  "pda": {
832
801
  "seeds": [
@@ -851,22 +820,13 @@
851
820
  },
852
821
  {
853
822
  "name": "question",
854
- "docs": [
855
- "Question PDA"
856
- ],
857
823
  "writable": true
858
824
  },
859
825
  {
860
- "name": "currency_mint",
861
- "docs": [
862
- "Collateral mint (USDC)"
863
- ]
826
+ "name": "currency_mint"
864
827
  },
865
828
  {
866
- "name": "oracle",
867
- "docs": [
868
- "Oracle config pubkey"
869
- ]
829
+ "name": "oracle"
870
830
  },
871
831
  {
872
832
  "name": "condition",
@@ -915,154 +875,8 @@
915
875
  }
916
876
  ]
917
877
  },
918
- {
919
- "name": "create_question_with_condition",
920
- "docs": [
921
- "User proposal path (future use) — creates Question in Pending state.",
922
- "Requires admin approval via approve_question before trading."
923
- ],
924
- "discriminator": [
925
- 155,
926
- 70,
927
- 42,
928
- 101,
929
- 35,
930
- 123,
931
- 180,
932
- 92
933
- ],
934
- "accounts": [
935
- {
936
- "name": "payer",
937
- "docs": [
938
- "Fee payer — pays rent for all new accounts (can differ from creator)"
939
- ],
940
- "writable": true,
941
- "signer": true
942
- },
943
- {
944
- "name": "creator",
945
- "docs": [
946
- "Creator of the question (identity only, does not pay)"
947
- ],
948
- "signer": true
949
- },
950
- {
951
- "name": "config",
952
- "docs": [
953
- "QuestionMarket config"
954
- ],
955
- "writable": true,
956
- "pda": {
957
- "seeds": [
958
- {
959
- "kind": "const",
960
- "value": [
961
- 99,
962
- 111,
963
- 110,
964
- 102,
965
- 105,
966
- 103
967
- ]
968
- },
969
- {
970
- "kind": "account",
971
- "path": "config.owner",
972
- "account": "QuestionMarketConfig"
973
- }
974
- ]
975
- }
976
- },
977
- {
978
- "name": "question",
979
- "docs": [
980
- "Question PDA"
981
- ],
982
- "writable": true
983
- },
984
- {
985
- "name": "currency_mint",
986
- "docs": [
987
- "Collateral mint (USDC)"
988
- ]
989
- },
990
- {
991
- "name": "oracle",
992
- "docs": [
993
- "Oracle config pubkey (used as oracle identifier in the condition)"
994
- ]
995
- },
996
- {
997
- "name": "condition",
998
- "docs": [
999
- "The Condition PDA that CTF will create"
1000
- ],
1001
- "writable": true
1002
- },
1003
- {
1004
- "name": "yes_mint",
1005
- "docs": [
1006
- "YES Token-2022 mint (created by CTF)"
1007
- ],
1008
- "writable": true
1009
- },
1010
- {
1011
- "name": "no_mint",
1012
- "docs": [
1013
- "NO Token-2022 mint (created by CTF)"
1014
- ],
1015
- "writable": true
1016
- },
1017
- {
1018
- "name": "mint_authority",
1019
- "docs": [
1020
- "Mint authority PDA in CTF"
1021
- ],
1022
- "writable": true
1023
- },
1024
- {
1025
- "name": "collateral_vault",
1026
- "docs": [
1027
- "Shared collateral vault (must exist)"
1028
- ],
1029
- "writable": true
1030
- },
1031
- {
1032
- "name": "conditional_tokens_program",
1033
- "docs": [
1034
- "ConditionalTokens program"
1035
- ]
1036
- },
1037
- {
1038
- "name": "token_program",
1039
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1040
- },
1041
- {
1042
- "name": "system_program",
1043
- "address": "11111111111111111111111111111111"
1044
- },
1045
- {
1046
- "name": "rent",
1047
- "address": "SysvarRent111111111111111111111111111111111"
1048
- }
1049
- ],
1050
- "args": [
1051
- {
1052
- "name": "params",
1053
- "type": {
1054
- "defined": {
1055
- "name": "CreateQuestionWithConditionParams"
1056
- }
1057
- }
1058
- }
1059
- ]
1060
- },
1061
878
  {
1062
879
  "name": "initialize",
1063
- "docs": [
1064
- "Initialize the Question Market config. Caller becomes owner and is auto-whitelisted."
1065
- ],
1066
880
  "discriminator": [
1067
881
  175,
1068
882
  175,
@@ -1126,9 +940,6 @@
1126
940
  },
1127
941
  {
1128
942
  "name": "reject_presale",
1129
- "docs": [
1130
- "Whitelist-only: reject presale so users can refund."
1131
- ],
1132
943
  "discriminator": [
1133
944
  151,
1134
945
  57,
@@ -1186,9 +997,6 @@
1186
997
  },
1187
998
  {
1188
999
  "name": "remove_admin",
1189
- "docs": [
1190
- "Clear the admin (owner only). Sets admin to default pubkey."
1191
- ],
1192
1000
  "discriminator": [
1193
1001
  74,
1194
1002
  202,
@@ -1202,9 +1010,6 @@
1202
1010
  "accounts": [
1203
1011
  {
1204
1012
  "name": "owner",
1205
- "docs": [
1206
- "Must be the current owner"
1207
- ],
1208
1013
  "signer": true
1209
1014
  },
1210
1015
  {
@@ -1236,9 +1041,6 @@
1236
1041
  },
1237
1042
  {
1238
1043
  "name": "remove_from_whitelist",
1239
- "docs": [
1240
- "Remove an address from the question market whitelist (admin only)."
1241
- ],
1242
1044
  "discriminator": [
1243
1045
  7,
1244
1046
  144,
@@ -1292,39 +1094,31 @@
1292
1094
  ]
1293
1095
  },
1294
1096
  {
1295
- "name": "update_config",
1296
- "docs": [
1297
- "Update config settings (admin/owner)."
1298
- ],
1097
+ "name": "resolve_question",
1299
1098
  "discriminator": [
1300
- 29,
1301
- 158,
1302
- 252,
1303
- 191,
1304
- 10,
1305
- 83,
1306
- 219,
1307
- 99
1099
+ 52,
1100
+ 32,
1101
+ 224,
1102
+ 179,
1103
+ 180,
1104
+ 8,
1105
+ 0,
1106
+ 246
1308
1107
  ],
1309
1108
  "accounts": [
1310
1109
  {
1311
- "name": "authority",
1110
+ "name": "payer",
1312
1111
  "docs": [
1313
- "Authority making the update (owner for ownership transfer, admin/owner for other updates)"
1112
+ "Payer for any required fees"
1314
1113
  ],
1315
- "signer": true
1316
- },
1317
- {
1318
- "name": "payer",
1319
1114
  "writable": true,
1320
1115
  "signer": true
1321
1116
  },
1322
1117
  {
1323
1118
  "name": "config",
1324
1119
  "docs": [
1325
- "Question Market config"
1120
+ "QuestionMarket config"
1326
1121
  ],
1327
- "writable": true,
1328
1122
  "pda": {
1329
1123
  "seeds": [
1330
1124
  {
@@ -1345,40 +1139,261 @@
1345
1139
  }
1346
1140
  ]
1347
1141
  }
1348
- }
1349
- ],
1350
- "args": [
1142
+ },
1351
1143
  {
1352
- "name": "params",
1353
- "type": {
1354
- "defined": {
1355
- "name": "UpdateConfigParams"
1356
- }
1144
+ "name": "question",
1145
+ "docs": [
1146
+ "The question to resolve"
1147
+ ],
1148
+ "writable": true,
1149
+ "pda": {
1150
+ "seeds": [
1151
+ {
1152
+ "kind": "const",
1153
+ "value": [
1154
+ 113,
1155
+ 117,
1156
+ 101,
1157
+ 115,
1158
+ 116,
1159
+ 105,
1160
+ 111,
1161
+ 110
1162
+ ]
1163
+ },
1164
+ {
1165
+ "kind": "account",
1166
+ "path": "config"
1167
+ },
1168
+ {
1169
+ "kind": "arg",
1170
+ "path": "question_id"
1171
+ }
1172
+ ]
1357
1173
  }
1358
- }
1359
- ]
1360
- }
1361
- ],
1362
- "accounts": [
1363
- {
1364
- "name": "Question",
1365
- "discriminator": [
1366
- 111,
1367
- 22,
1368
- 150,
1369
- 220,
1370
- 181,
1371
- 122,
1372
- 118,
1373
- 127
1374
- ]
1375
- },
1376
- {
1377
- "name": "QuestionMarketConfig",
1378
- "discriminator": [
1379
- 45,
1380
- 242,
1381
- 195,
1174
+ },
1175
+ {
1176
+ "name": "question_result",
1177
+ "docs": [
1178
+ "Oracle QuestionResult PDA — proves the oracle has resolved",
1179
+ "seeds: [b\"result\", oracle_config, question_id]"
1180
+ ],
1181
+ "pda": {
1182
+ "seeds": [
1183
+ {
1184
+ "kind": "const",
1185
+ "value": [
1186
+ 114,
1187
+ 101,
1188
+ 115,
1189
+ 117,
1190
+ 108,
1191
+ 116
1192
+ ]
1193
+ },
1194
+ {
1195
+ "kind": "account",
1196
+ "path": "config.oracle",
1197
+ "account": "QuestionMarketConfig"
1198
+ },
1199
+ {
1200
+ "kind": "arg",
1201
+ "path": "question_id"
1202
+ }
1203
+ ],
1204
+ "program": {
1205
+ "kind": "account",
1206
+ "path": "oracle_program"
1207
+ }
1208
+ }
1209
+ },
1210
+ {
1211
+ "name": "condition",
1212
+ "docs": [
1213
+ "The Condition account in CTF (will be updated via CPI)"
1214
+ ],
1215
+ "writable": true
1216
+ },
1217
+ {
1218
+ "name": "ctf_program",
1219
+ "docs": [
1220
+ "CTF program (for set_payout CPI)"
1221
+ ]
1222
+ },
1223
+ {
1224
+ "name": "oracle_program",
1225
+ "docs": [
1226
+ "Oracle program (for reading QuestionResult)"
1227
+ ]
1228
+ },
1229
+ {
1230
+ "name": "system_program",
1231
+ "address": "11111111111111111111111111111111"
1232
+ }
1233
+ ],
1234
+ "args": [
1235
+ {
1236
+ "name": "question_id",
1237
+ "type": {
1238
+ "array": [
1239
+ "u8",
1240
+ 32
1241
+ ]
1242
+ }
1243
+ }
1244
+ ]
1245
+ },
1246
+ {
1247
+ "name": "update_config",
1248
+ "discriminator": [
1249
+ 29,
1250
+ 158,
1251
+ 252,
1252
+ 191,
1253
+ 10,
1254
+ 83,
1255
+ 219,
1256
+ 99
1257
+ ],
1258
+ "accounts": [
1259
+ {
1260
+ "name": "authority",
1261
+ "docs": [
1262
+ "Authority making the update (owner for ownership transfer, admin/owner for other updates)"
1263
+ ],
1264
+ "signer": true
1265
+ },
1266
+ {
1267
+ "name": "payer",
1268
+ "writable": true,
1269
+ "signer": true
1270
+ },
1271
+ {
1272
+ "name": "config",
1273
+ "docs": [
1274
+ "Question Market config"
1275
+ ],
1276
+ "writable": true,
1277
+ "pda": {
1278
+ "seeds": [
1279
+ {
1280
+ "kind": "const",
1281
+ "value": [
1282
+ 99,
1283
+ 111,
1284
+ 110,
1285
+ 102,
1286
+ 105,
1287
+ 103
1288
+ ]
1289
+ },
1290
+ {
1291
+ "kind": "account",
1292
+ "path": "config.owner",
1293
+ "account": "QuestionMarketConfig"
1294
+ }
1295
+ ]
1296
+ }
1297
+ }
1298
+ ],
1299
+ "args": [
1300
+ {
1301
+ "name": "params",
1302
+ "type": {
1303
+ "defined": {
1304
+ "name": "UpdateConfigParams"
1305
+ }
1306
+ }
1307
+ }
1308
+ ]
1309
+ },
1310
+ {
1311
+ "name": "update_question_status",
1312
+ "discriminator": [
1313
+ 237,
1314
+ 171,
1315
+ 179,
1316
+ 4,
1317
+ 161,
1318
+ 20,
1319
+ 61,
1320
+ 18
1321
+ ],
1322
+ "accounts": [
1323
+ {
1324
+ "name": "authority",
1325
+ "docs": [
1326
+ "Authority making the status update (admin for reject, oracle for resolve)"
1327
+ ],
1328
+ "signer": true
1329
+ },
1330
+ {
1331
+ "name": "config",
1332
+ "docs": [
1333
+ "Question Market config"
1334
+ ],
1335
+ "writable": true,
1336
+ "pda": {
1337
+ "seeds": [
1338
+ {
1339
+ "kind": "const",
1340
+ "value": [
1341
+ 99,
1342
+ 111,
1343
+ 110,
1344
+ 102,
1345
+ 105,
1346
+ 103
1347
+ ]
1348
+ },
1349
+ {
1350
+ "kind": "account",
1351
+ "path": "config.owner",
1352
+ "account": "QuestionMarketConfig"
1353
+ }
1354
+ ]
1355
+ }
1356
+ },
1357
+ {
1358
+ "name": "question",
1359
+ "docs": [
1360
+ "Question to update"
1361
+ ],
1362
+ "writable": true
1363
+ }
1364
+ ],
1365
+ "args": [
1366
+ {
1367
+ "name": "update_type",
1368
+ "type": {
1369
+ "defined": {
1370
+ "name": "StatusUpdateType"
1371
+ }
1372
+ }
1373
+ }
1374
+ ]
1375
+ }
1376
+ ],
1377
+ "accounts": [
1378
+ {
1379
+ "name": "Question",
1380
+ "discriminator": [
1381
+ 111,
1382
+ 22,
1383
+ 150,
1384
+ 220,
1385
+ 181,
1386
+ 122,
1387
+ 118,
1388
+ 127
1389
+ ]
1390
+ },
1391
+ {
1392
+ "name": "QuestionMarketConfig",
1393
+ "discriminator": [
1394
+ 45,
1395
+ 242,
1396
+ 195,
1382
1397
  220,
1383
1398
  120,
1384
1399
  252,
@@ -1401,6 +1416,19 @@
1401
1416
  194
1402
1417
  ]
1403
1418
  },
1419
+ {
1420
+ "name": "MarketApproved",
1421
+ "discriminator": [
1422
+ 213,
1423
+ 222,
1424
+ 68,
1425
+ 97,
1426
+ 16,
1427
+ 1,
1428
+ 31,
1429
+ 38
1430
+ ]
1431
+ },
1404
1432
  {
1405
1433
  "name": "PresaleApprovedAndMarketCreated",
1406
1434
  "discriminator": [
@@ -1467,16 +1495,16 @@
1467
1495
  ]
1468
1496
  },
1469
1497
  {
1470
- "name": "QuestionCreatedWithCondition",
1498
+ "name": "QuestionCreated",
1471
1499
  "discriminator": [
1472
- 70,
1473
- 243,
1474
- 29,
1475
- 212,
1476
- 242,
1477
- 162,
1478
- 132,
1479
- 234
1500
+ 34,
1501
+ 127,
1502
+ 167,
1503
+ 217,
1504
+ 216,
1505
+ 141,
1506
+ 151,
1507
+ 205
1480
1508
  ]
1481
1509
  },
1482
1510
  {
@@ -1493,16 +1521,29 @@
1493
1521
  ]
1494
1522
  },
1495
1523
  {
1496
- "name": "QuestionMarketWhitelistUpdated",
1524
+ "name": "QuestionResolvedMarket",
1497
1525
  "discriminator": [
1498
- 188,
1499
- 209,
1500
- 117,
1501
- 146,
1502
- 229,
1503
- 12,
1504
- 227,
1505
- 42
1526
+ 103,
1527
+ 113,
1528
+ 100,
1529
+ 154,
1530
+ 213,
1531
+ 211,
1532
+ 64,
1533
+ 126
1534
+ ]
1535
+ },
1536
+ {
1537
+ "name": "QuestionStatusUpdated",
1538
+ "discriminator": [
1539
+ 38,
1540
+ 83,
1541
+ 232,
1542
+ 103,
1543
+ 133,
1544
+ 238,
1545
+ 55,
1546
+ 194
1506
1547
  ]
1507
1548
  }
1508
1549
  ],
@@ -1570,12 +1611,6 @@
1570
1611
  "type": {
1571
1612
  "option": "bool"
1572
1613
  }
1573
- },
1574
- {
1575
- "name": "new_conditional_tokens_program",
1576
- "type": {
1577
- "option": "pubkey"
1578
- }
1579
1614
  }
1580
1615
  ]
1581
1616
  }
@@ -1642,62 +1677,6 @@
1642
1677
  ]
1643
1678
  }
1644
1679
  },
1645
- {
1646
- "name": "CreateQuestionWithConditionParams",
1647
- "docs": [
1648
- "Parameters for creating a question with condition"
1649
- ],
1650
- "type": {
1651
- "kind": "struct",
1652
- "fields": [
1653
- {
1654
- "name": "question_id",
1655
- "docs": [
1656
- "Unique question identifier (32-byte hash)"
1657
- ],
1658
- "type": {
1659
- "array": [
1660
- "u8",
1661
- 32
1662
- ]
1663
- }
1664
- },
1665
- {
1666
- "name": "content_hash",
1667
- "docs": [
1668
- "Hash of question content (for on-chain reference)"
1669
- ],
1670
- "type": {
1671
- "array": [
1672
- "u8",
1673
- 32
1674
- ]
1675
- }
1676
- },
1677
- {
1678
- "name": "hook_program",
1679
- "docs": [
1680
- "Transfer Hook program (guards YES/NO token transfers)"
1681
- ],
1682
- "type": "pubkey"
1683
- },
1684
- {
1685
- "name": "authorized_clob",
1686
- "docs": [
1687
- "The CLOB program authorized to call CTF.transfer_position"
1688
- ],
1689
- "type": "pubkey"
1690
- },
1691
- {
1692
- "name": "expiration_time",
1693
- "docs": [
1694
- "Question expiration timestamp (unix)"
1695
- ],
1696
- "type": "i64"
1697
- }
1698
- ]
1699
- }
1700
- },
1701
1680
  {
1702
1681
  "name": "FeeConfig",
1703
1682
  "type": {
@@ -1810,6 +1789,43 @@
1810
1789
  ]
1811
1790
  }
1812
1791
  },
1792
+ {
1793
+ "name": "MarketApproved",
1794
+ "type": {
1795
+ "kind": "struct",
1796
+ "fields": [
1797
+ {
1798
+ "name": "config",
1799
+ "type": "pubkey"
1800
+ },
1801
+ {
1802
+ "name": "question",
1803
+ "type": "pubkey"
1804
+ },
1805
+ {
1806
+ "name": "question_id",
1807
+ "type": {
1808
+ "array": [
1809
+ "u8",
1810
+ 32
1811
+ ]
1812
+ }
1813
+ },
1814
+ {
1815
+ "name": "condition",
1816
+ "type": "pubkey"
1817
+ },
1818
+ {
1819
+ "name": "approved_by",
1820
+ "type": "pubkey"
1821
+ },
1822
+ {
1823
+ "name": "approved_at",
1824
+ "type": "i64"
1825
+ }
1826
+ ]
1827
+ }
1828
+ },
1813
1829
  {
1814
1830
  "name": "PresaleApprovedAndMarketCreated",
1815
1831
  "type": {
@@ -1896,15 +1912,24 @@
1896
1912
  },
1897
1913
  {
1898
1914
  "name": "Question",
1915
+ "docs": [
1916
+ "Individual question account"
1917
+ ],
1899
1918
  "type": {
1900
1919
  "kind": "struct",
1901
1920
  "fields": [
1902
1921
  {
1903
1922
  "name": "version",
1923
+ "docs": [
1924
+ "Schema version"
1925
+ ],
1904
1926
  "type": "u8"
1905
1927
  },
1906
1928
  {
1907
1929
  "name": "config",
1930
+ "docs": [
1931
+ "Reference to the QuestionMarketConfig"
1932
+ ],
1908
1933
  "type": "pubkey"
1909
1934
  },
1910
1935
  {
@@ -2134,7 +2159,7 @@
2134
2159
  }
2135
2160
  },
2136
2161
  {
2137
- "name": "QuestionCreatedWithCondition",
2162
+ "name": "QuestionCreated",
2138
2163
  "type": {
2139
2164
  "kind": "struct",
2140
2165
  "fields": [
@@ -2156,29 +2181,12 @@
2156
2181
  }
2157
2182
  },
2158
2183
  {
2159
- "name": "condition_id",
2160
- "type": {
2161
- "array": [
2162
- "u8",
2163
- 32
2164
- ]
2165
- }
2166
- },
2167
- {
2168
- "name": "condition",
2169
- "type": "pubkey"
2170
- },
2171
- {
2172
- "name": "yes_mint",
2173
- "type": "pubkey"
2174
- },
2175
- {
2176
- "name": "no_mint",
2184
+ "name": "creator",
2177
2185
  "type": "pubkey"
2178
2186
  },
2179
2187
  {
2180
- "name": "creator",
2181
- "type": "pubkey"
2188
+ "name": "outcome_slot_count",
2189
+ "type": "u8"
2182
2190
  },
2183
2191
  {
2184
2192
  "name": "expiration_time",
@@ -2197,43 +2205,73 @@
2197
2205
  },
2198
2206
  {
2199
2207
  "name": "QuestionMarketConfig",
2208
+ "docs": [
2209
+ "Global configuration for the Question Market program"
2210
+ ],
2200
2211
  "type": {
2201
2212
  "kind": "struct",
2202
2213
  "fields": [
2203
2214
  {
2204
2215
  "name": "version",
2216
+ "docs": [
2217
+ "Schema version"
2218
+ ],
2205
2219
  "type": "u8"
2206
2220
  },
2207
2221
  {
2208
2222
  "name": "owner",
2223
+ "docs": [
2224
+ "Owner with full control (can transfer ownership)"
2225
+ ],
2209
2226
  "type": "pubkey"
2210
2227
  },
2211
2228
  {
2212
2229
  "name": "admin",
2230
+ "docs": [
2231
+ "Admin for day-to-day operations (approve/reject questions)"
2232
+ ],
2213
2233
  "type": "pubkey"
2214
2234
  },
2215
2235
  {
2216
2236
  "name": "conditional_tokens_program",
2237
+ "docs": [
2238
+ "ConditionalTokens program ID for CPI"
2239
+ ],
2217
2240
  "type": "pubkey"
2218
2241
  },
2219
2242
  {
2220
2243
  "name": "oracle",
2244
+ "docs": [
2245
+ "Oracle pubkey that will resolve conditions"
2246
+ ],
2221
2247
  "type": "pubkey"
2222
2248
  },
2223
2249
  {
2224
2250
  "name": "question_count",
2251
+ "docs": [
2252
+ "Total questions created"
2253
+ ],
2225
2254
  "type": "u64"
2226
2255
  },
2227
2256
  {
2228
2257
  "name": "approved_count",
2258
+ "docs": [
2259
+ "Total questions approved (became markets)"
2260
+ ],
2229
2261
  "type": "u64"
2230
2262
  },
2231
2263
  {
2232
2264
  "name": "rejected_count",
2265
+ "docs": [
2266
+ "Total questions rejected"
2267
+ ],
2233
2268
  "type": "u64"
2234
2269
  },
2235
2270
  {
2236
2271
  "name": "whitelist",
2272
+ "docs": [
2273
+ "Whitelist of addresses that can create questions and manage presales"
2274
+ ],
2237
2275
  "type": {
2238
2276
  "array": [
2239
2277
  "pubkey",
@@ -2243,25 +2281,37 @@
2243
2281
  },
2244
2282
  {
2245
2283
  "name": "whitelist_len",
2284
+ "docs": [
2285
+ "Number of entries in whitelist"
2286
+ ],
2246
2287
  "type": "u8"
2247
2288
  },
2248
2289
  {
2249
2290
  "name": "is_paused",
2291
+ "docs": [
2292
+ "Whether the program is paused"
2293
+ ],
2250
2294
  "type": "bool"
2251
2295
  },
2252
2296
  {
2253
2297
  "name": "bump",
2298
+ "docs": [
2299
+ "Bump seed for PDA derivation"
2300
+ ],
2254
2301
  "type": "u8"
2255
2302
  },
2256
2303
  {
2257
2304
  "name": "presale_count",
2258
2305
  "docs": [
2259
- "Counter for presale PDAs — used as seed index"
2306
+ "Total presales created"
2260
2307
  ],
2261
2308
  "type": "u64"
2262
2309
  },
2263
2310
  {
2264
2311
  "name": "_reserved",
2312
+ "docs": [
2313
+ "Reserved space for future upgrades"
2314
+ ],
2265
2315
  "type": {
2266
2316
  "array": [
2267
2317
  "u8",
@@ -2301,7 +2351,7 @@
2301
2351
  }
2302
2352
  },
2303
2353
  {
2304
- "name": "QuestionMarketWhitelistUpdated",
2354
+ "name": "QuestionResolvedMarket",
2305
2355
  "type": {
2306
2356
  "kind": "struct",
2307
2357
  "fields": [
@@ -2310,16 +2360,31 @@
2310
2360
  "type": "pubkey"
2311
2361
  },
2312
2362
  {
2313
- "name": "address",
2363
+ "name": "question",
2314
2364
  "type": "pubkey"
2315
2365
  },
2316
2366
  {
2317
- "name": "added",
2318
- "type": "bool"
2367
+ "name": "question_id",
2368
+ "type": {
2369
+ "array": [
2370
+ "u8",
2371
+ 32
2372
+ ]
2373
+ }
2319
2374
  },
2320
2375
  {
2321
- "name": "updated_by",
2376
+ "name": "condition",
2322
2377
  "type": "pubkey"
2378
+ },
2379
+ {
2380
+ "name": "payout_numerators",
2381
+ "type": {
2382
+ "vec": "u64"
2383
+ }
2384
+ },
2385
+ {
2386
+ "name": "resolved_at",
2387
+ "type": "i64"
2323
2388
  }
2324
2389
  ]
2325
2390
  }
@@ -2347,6 +2412,64 @@
2347
2412
  ]
2348
2413
  }
2349
2414
  },
2415
+ {
2416
+ "name": "QuestionStatusUpdated",
2417
+ "type": {
2418
+ "kind": "struct",
2419
+ "fields": [
2420
+ {
2421
+ "name": "config",
2422
+ "type": "pubkey"
2423
+ },
2424
+ {
2425
+ "name": "question",
2426
+ "type": "pubkey"
2427
+ },
2428
+ {
2429
+ "name": "question_id",
2430
+ "type": {
2431
+ "array": [
2432
+ "u8",
2433
+ 32
2434
+ ]
2435
+ }
2436
+ },
2437
+ {
2438
+ "name": "old_status",
2439
+ "type": "u8"
2440
+ },
2441
+ {
2442
+ "name": "new_status",
2443
+ "type": "u8"
2444
+ },
2445
+ {
2446
+ "name": "updated_by",
2447
+ "type": "pubkey"
2448
+ },
2449
+ {
2450
+ "name": "updated_at",
2451
+ "type": "i64"
2452
+ }
2453
+ ]
2454
+ }
2455
+ },
2456
+ {
2457
+ "name": "StatusUpdateType",
2458
+ "docs": [
2459
+ "Type of status update"
2460
+ ],
2461
+ "type": {
2462
+ "kind": "enum",
2463
+ "variants": [
2464
+ {
2465
+ "name": "Reject"
2466
+ },
2467
+ {
2468
+ "name": "MarkResolved"
2469
+ }
2470
+ ]
2471
+ }
2472
+ },
2350
2473
  {
2351
2474
  "name": "UpdateConfigParams",
2352
2475
  "docs": [
@@ -2385,7 +2508,7 @@
2385
2508
  {
2386
2509
  "name": "new_conditional_tokens_program",
2387
2510
  "docs": [
2388
- "New conditional tokens program ID (optional — update when CTF program is redeployed)"
2511
+ "New ConditionalTokens program (optional)"
2389
2512
  ],
2390
2513
  "type": {
2391
2514
  "option": "pubkey"