@cypher-zk/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +252 -21
- package/dist/{client-hOLBWshA.d.ts → client-B0EueahJ.d.ts} +587 -21
- package/dist/{cypher-WAYH63ZA.json → cypher-M5PH6UM5.json} +440 -30
- package/dist/index.d.ts +23 -4
- package/dist/index.js +191 -12
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +6 -2
- package/dist/react/index.js +34 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/src/idl/cypher.json +440 -30
- package/src/idl/cypher.ts +440 -30
package/src/idl/cypher.json
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"instructions": [
|
|
10
10
|
{
|
|
11
11
|
"name": "admin_claim_remaining",
|
|
12
|
+
"docs": [
|
|
13
|
+
"Admin claims remaining unclaimed funds once the claim and refund deadlines have passed."
|
|
14
|
+
],
|
|
12
15
|
"discriminator": [
|
|
13
16
|
226,
|
|
14
17
|
176,
|
|
@@ -107,14 +110,92 @@
|
|
|
107
110
|
"writable": true
|
|
108
111
|
},
|
|
109
112
|
{
|
|
110
|
-
"name": "token_program"
|
|
111
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
113
|
+
"name": "token_program"
|
|
112
114
|
}
|
|
113
115
|
],
|
|
114
116
|
"args": []
|
|
115
117
|
},
|
|
118
|
+
{
|
|
119
|
+
"name": "admin_override_resolution",
|
|
120
|
+
"docs": [
|
|
121
|
+
"Admin override of a disputed resolution with a corrected outcome and recomputed payout ratio."
|
|
122
|
+
],
|
|
123
|
+
"discriminator": [
|
|
124
|
+
47,
|
|
125
|
+
117,
|
|
126
|
+
40,
|
|
127
|
+
129,
|
|
128
|
+
108,
|
|
129
|
+
28,
|
|
130
|
+
219,
|
|
131
|
+
96
|
|
132
|
+
],
|
|
133
|
+
"accounts": [
|
|
134
|
+
{
|
|
135
|
+
"name": "admin",
|
|
136
|
+
"signer": true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "global_state",
|
|
140
|
+
"pda": {
|
|
141
|
+
"seeds": [
|
|
142
|
+
{
|
|
143
|
+
"kind": "const",
|
|
144
|
+
"value": [
|
|
145
|
+
103,
|
|
146
|
+
108,
|
|
147
|
+
111,
|
|
148
|
+
98,
|
|
149
|
+
97,
|
|
150
|
+
108,
|
|
151
|
+
95,
|
|
152
|
+
115,
|
|
153
|
+
116,
|
|
154
|
+
97,
|
|
155
|
+
116,
|
|
156
|
+
101
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "market",
|
|
164
|
+
"writable": true,
|
|
165
|
+
"pda": {
|
|
166
|
+
"seeds": [
|
|
167
|
+
{
|
|
168
|
+
"kind": "const",
|
|
169
|
+
"value": [
|
|
170
|
+
109,
|
|
171
|
+
97,
|
|
172
|
+
114,
|
|
173
|
+
107,
|
|
174
|
+
101,
|
|
175
|
+
116
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "account",
|
|
180
|
+
"path": "market.market_id",
|
|
181
|
+
"account": "Market"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"args": [
|
|
188
|
+
{
|
|
189
|
+
"name": "outcome_value",
|
|
190
|
+
"type": "u8"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
116
194
|
{
|
|
117
195
|
"name": "cancel_market",
|
|
196
|
+
"docs": [
|
|
197
|
+
"Cancel a market and return bond to creator (only if no bets placed)."
|
|
198
|
+
],
|
|
118
199
|
"discriminator": [
|
|
119
200
|
205,
|
|
120
201
|
121,
|
|
@@ -221,14 +302,16 @@
|
|
|
221
302
|
"writable": true
|
|
222
303
|
},
|
|
223
304
|
{
|
|
224
|
-
"name": "token_program"
|
|
225
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
305
|
+
"name": "token_program"
|
|
226
306
|
}
|
|
227
307
|
],
|
|
228
308
|
"args": []
|
|
229
309
|
},
|
|
230
310
|
{
|
|
231
311
|
"name": "claim_payout_multi",
|
|
312
|
+
"docs": [
|
|
313
|
+
"Queue MPC computation to verify and pay out a winning MultiOutcome position."
|
|
314
|
+
],
|
|
232
315
|
"discriminator": [
|
|
233
316
|
183,
|
|
234
317
|
30,
|
|
@@ -407,8 +490,7 @@
|
|
|
407
490
|
"writable": true
|
|
408
491
|
},
|
|
409
492
|
{
|
|
410
|
-
"name": "token_program"
|
|
411
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
493
|
+
"name": "token_program"
|
|
412
494
|
}
|
|
413
495
|
],
|
|
414
496
|
"args": [
|
|
@@ -420,6 +502,9 @@
|
|
|
420
502
|
},
|
|
421
503
|
{
|
|
422
504
|
"name": "claim_payout_yesno",
|
|
505
|
+
"docs": [
|
|
506
|
+
"Queue MPC computation to verify and pay out a winning YesNo position."
|
|
507
|
+
],
|
|
423
508
|
"discriminator": [
|
|
424
509
|
224,
|
|
425
510
|
84,
|
|
@@ -598,8 +683,7 @@
|
|
|
598
683
|
"writable": true
|
|
599
684
|
},
|
|
600
685
|
{
|
|
601
|
-
"name": "token_program"
|
|
602
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
686
|
+
"name": "token_program"
|
|
603
687
|
}
|
|
604
688
|
],
|
|
605
689
|
"args": [
|
|
@@ -611,6 +695,9 @@
|
|
|
611
695
|
},
|
|
612
696
|
{
|
|
613
697
|
"name": "claim_refund_multi",
|
|
698
|
+
"docs": [
|
|
699
|
+
"Queue MPC computation to refund a bet on an unresolved MultiOutcome market."
|
|
700
|
+
],
|
|
614
701
|
"discriminator": [
|
|
615
702
|
186,
|
|
616
703
|
255,
|
|
@@ -789,8 +876,7 @@
|
|
|
789
876
|
"writable": true
|
|
790
877
|
},
|
|
791
878
|
{
|
|
792
|
-
"name": "token_program"
|
|
793
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
879
|
+
"name": "token_program"
|
|
794
880
|
}
|
|
795
881
|
],
|
|
796
882
|
"args": [
|
|
@@ -802,6 +888,9 @@
|
|
|
802
888
|
},
|
|
803
889
|
{
|
|
804
890
|
"name": "claim_refund_yesno",
|
|
891
|
+
"docs": [
|
|
892
|
+
"Queue MPC computation to refund a bet on an unresolved YesNo market."
|
|
893
|
+
],
|
|
805
894
|
"discriminator": [
|
|
806
895
|
250,
|
|
807
896
|
69,
|
|
@@ -980,8 +1069,7 @@
|
|
|
980
1069
|
"writable": true
|
|
981
1070
|
},
|
|
982
1071
|
{
|
|
983
|
-
"name": "token_program"
|
|
984
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1072
|
+
"name": "token_program"
|
|
985
1073
|
}
|
|
986
1074
|
],
|
|
987
1075
|
"args": [
|
|
@@ -993,6 +1081,9 @@
|
|
|
993
1081
|
},
|
|
994
1082
|
{
|
|
995
1083
|
"name": "compute_multi_payout_callback",
|
|
1084
|
+
"docs": [
|
|
1085
|
+
"Callback that transfers the computed payout to the winning bettor."
|
|
1086
|
+
],
|
|
996
1087
|
"discriminator": [
|
|
997
1088
|
242,
|
|
998
1089
|
12,
|
|
@@ -1044,8 +1135,7 @@
|
|
|
1044
1135
|
"writable": true
|
|
1045
1136
|
},
|
|
1046
1137
|
{
|
|
1047
|
-
"name": "token_program"
|
|
1048
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1138
|
+
"name": "token_program"
|
|
1049
1139
|
},
|
|
1050
1140
|
{
|
|
1051
1141
|
"name": "system_program",
|
|
@@ -1075,6 +1165,9 @@
|
|
|
1075
1165
|
},
|
|
1076
1166
|
{
|
|
1077
1167
|
"name": "compute_multi_refund_callback",
|
|
1168
|
+
"docs": [
|
|
1169
|
+
"Callback that transfers the computed refund to the bettor."
|
|
1170
|
+
],
|
|
1078
1171
|
"discriminator": [
|
|
1079
1172
|
164,
|
|
1080
1173
|
49,
|
|
@@ -1126,8 +1219,7 @@
|
|
|
1126
1219
|
"writable": true
|
|
1127
1220
|
},
|
|
1128
1221
|
{
|
|
1129
|
-
"name": "token_program"
|
|
1130
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1222
|
+
"name": "token_program"
|
|
1131
1223
|
},
|
|
1132
1224
|
{
|
|
1133
1225
|
"name": "system_program",
|
|
@@ -1157,6 +1249,9 @@
|
|
|
1157
1249
|
},
|
|
1158
1250
|
{
|
|
1159
1251
|
"name": "compute_yesno_payout_callback",
|
|
1252
|
+
"docs": [
|
|
1253
|
+
"Callback that transfers the computed payout to the winning bettor."
|
|
1254
|
+
],
|
|
1160
1255
|
"discriminator": [
|
|
1161
1256
|
154,
|
|
1162
1257
|
174,
|
|
@@ -1208,8 +1303,7 @@
|
|
|
1208
1303
|
"writable": true
|
|
1209
1304
|
},
|
|
1210
1305
|
{
|
|
1211
|
-
"name": "token_program"
|
|
1212
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1306
|
+
"name": "token_program"
|
|
1213
1307
|
},
|
|
1214
1308
|
{
|
|
1215
1309
|
"name": "system_program",
|
|
@@ -1239,6 +1333,9 @@
|
|
|
1239
1333
|
},
|
|
1240
1334
|
{
|
|
1241
1335
|
"name": "compute_yesno_refund_callback",
|
|
1336
|
+
"docs": [
|
|
1337
|
+
"Callback that transfers the computed refund to the bettor."
|
|
1338
|
+
],
|
|
1242
1339
|
"discriminator": [
|
|
1243
1340
|
87,
|
|
1244
1341
|
6,
|
|
@@ -1290,8 +1387,7 @@
|
|
|
1290
1387
|
"writable": true
|
|
1291
1388
|
},
|
|
1292
1389
|
{
|
|
1293
|
-
"name": "token_program"
|
|
1294
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1390
|
+
"name": "token_program"
|
|
1295
1391
|
},
|
|
1296
1392
|
{
|
|
1297
1393
|
"name": "system_program",
|
|
@@ -1321,6 +1417,9 @@
|
|
|
1321
1417
|
},
|
|
1322
1418
|
{
|
|
1323
1419
|
"name": "create_market",
|
|
1420
|
+
"docs": [
|
|
1421
|
+
"Create a new YesNo prediction market (creator pays the bond, sets close time and challenge period)."
|
|
1422
|
+
],
|
|
1324
1423
|
"discriminator": [
|
|
1325
1424
|
103,
|
|
1326
1425
|
226,
|
|
@@ -1455,8 +1554,7 @@
|
|
|
1455
1554
|
"name": "accepted_mint"
|
|
1456
1555
|
},
|
|
1457
1556
|
{
|
|
1458
|
-
"name": "token_program"
|
|
1459
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1557
|
+
"name": "token_program"
|
|
1460
1558
|
},
|
|
1461
1559
|
{
|
|
1462
1560
|
"name": "system_program",
|
|
@@ -1475,11 +1573,18 @@
|
|
|
1475
1573
|
{
|
|
1476
1574
|
"name": "category",
|
|
1477
1575
|
"type": "u8"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"name": "challenge_period",
|
|
1579
|
+
"type": "i64"
|
|
1478
1580
|
}
|
|
1479
1581
|
]
|
|
1480
1582
|
},
|
|
1481
1583
|
{
|
|
1482
1584
|
"name": "create_market_multi",
|
|
1585
|
+
"docs": [
|
|
1586
|
+
"Create a new MultiOutcome prediction market with 2-4 outcomes."
|
|
1587
|
+
],
|
|
1483
1588
|
"discriminator": [
|
|
1484
1589
|
35,
|
|
1485
1590
|
185,
|
|
@@ -1614,8 +1719,7 @@
|
|
|
1614
1719
|
"name": "accepted_mint"
|
|
1615
1720
|
},
|
|
1616
1721
|
{
|
|
1617
|
-
"name": "token_program"
|
|
1618
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1722
|
+
"name": "token_program"
|
|
1619
1723
|
},
|
|
1620
1724
|
{
|
|
1621
1725
|
"name": "system_program",
|
|
@@ -1638,11 +1742,112 @@
|
|
|
1638
1742
|
{
|
|
1639
1743
|
"name": "num_outcomes",
|
|
1640
1744
|
"type": "u8"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"name": "challenge_period",
|
|
1748
|
+
"type": "i64"
|
|
1641
1749
|
}
|
|
1642
1750
|
]
|
|
1643
1751
|
},
|
|
1752
|
+
{
|
|
1753
|
+
"name": "finalize_resolution",
|
|
1754
|
+
"docs": [
|
|
1755
|
+
"Finalize a pending resolution once the challenge window has passed undisputed."
|
|
1756
|
+
],
|
|
1757
|
+
"discriminator": [
|
|
1758
|
+
191,
|
|
1759
|
+
74,
|
|
1760
|
+
94,
|
|
1761
|
+
214,
|
|
1762
|
+
45,
|
|
1763
|
+
150,
|
|
1764
|
+
152,
|
|
1765
|
+
125
|
|
1766
|
+
],
|
|
1767
|
+
"accounts": [
|
|
1768
|
+
{
|
|
1769
|
+
"name": "caller",
|
|
1770
|
+
"signer": true
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"name": "market",
|
|
1774
|
+
"writable": true,
|
|
1775
|
+
"pda": {
|
|
1776
|
+
"seeds": [
|
|
1777
|
+
{
|
|
1778
|
+
"kind": "const",
|
|
1779
|
+
"value": [
|
|
1780
|
+
109,
|
|
1781
|
+
97,
|
|
1782
|
+
114,
|
|
1783
|
+
107,
|
|
1784
|
+
101,
|
|
1785
|
+
116
|
|
1786
|
+
]
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"kind": "account",
|
|
1790
|
+
"path": "market.market_id",
|
|
1791
|
+
"account": "Market"
|
|
1792
|
+
}
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
],
|
|
1797
|
+
"args": []
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"name": "flag_resolution",
|
|
1801
|
+
"docs": [
|
|
1802
|
+
"Flag a pending resolution as disputed during the challenge window."
|
|
1803
|
+
],
|
|
1804
|
+
"discriminator": [
|
|
1805
|
+
144,
|
|
1806
|
+
21,
|
|
1807
|
+
165,
|
|
1808
|
+
219,
|
|
1809
|
+
56,
|
|
1810
|
+
125,
|
|
1811
|
+
121,
|
|
1812
|
+
138
|
|
1813
|
+
],
|
|
1814
|
+
"accounts": [
|
|
1815
|
+
{
|
|
1816
|
+
"name": "flagger",
|
|
1817
|
+
"signer": true
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
"name": "market",
|
|
1821
|
+
"writable": true,
|
|
1822
|
+
"pda": {
|
|
1823
|
+
"seeds": [
|
|
1824
|
+
{
|
|
1825
|
+
"kind": "const",
|
|
1826
|
+
"value": [
|
|
1827
|
+
109,
|
|
1828
|
+
97,
|
|
1829
|
+
114,
|
|
1830
|
+
107,
|
|
1831
|
+
101,
|
|
1832
|
+
116
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
"kind": "account",
|
|
1837
|
+
"path": "market.market_id",
|
|
1838
|
+
"account": "Market"
|
|
1839
|
+
}
|
|
1840
|
+
]
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
],
|
|
1844
|
+
"args": []
|
|
1845
|
+
},
|
|
1644
1846
|
{
|
|
1645
1847
|
"name": "init_payout_multi_comp_def",
|
|
1848
|
+
"docs": [
|
|
1849
|
+
"Register the compute_multi_payout Arcium computation definition."
|
|
1850
|
+
],
|
|
1646
1851
|
"discriminator": [
|
|
1647
1852
|
155,
|
|
1648
1853
|
138,
|
|
@@ -1688,6 +1893,9 @@
|
|
|
1688
1893
|
},
|
|
1689
1894
|
{
|
|
1690
1895
|
"name": "init_payout_yesno_comp_def",
|
|
1896
|
+
"docs": [
|
|
1897
|
+
"Register the compute_yesno_payout Arcium computation definition."
|
|
1898
|
+
],
|
|
1691
1899
|
"discriminator": [
|
|
1692
1900
|
104,
|
|
1693
1901
|
87,
|
|
@@ -1733,6 +1941,9 @@
|
|
|
1733
1941
|
},
|
|
1734
1942
|
{
|
|
1735
1943
|
"name": "init_place_bet_multi_comp_def",
|
|
1944
|
+
"docs": [
|
|
1945
|
+
"Register the place_private_bet_multi Arcium computation definition."
|
|
1946
|
+
],
|
|
1736
1947
|
"discriminator": [
|
|
1737
1948
|
2,
|
|
1738
1949
|
251,
|
|
@@ -1778,6 +1989,9 @@
|
|
|
1778
1989
|
},
|
|
1779
1990
|
{
|
|
1780
1991
|
"name": "init_place_bet_yesno_comp_def",
|
|
1992
|
+
"docs": [
|
|
1993
|
+
"Register the place_private_bet_yesno Arcium computation definition."
|
|
1994
|
+
],
|
|
1781
1995
|
"discriminator": [
|
|
1782
1996
|
160,
|
|
1783
1997
|
105,
|
|
@@ -1823,6 +2037,9 @@
|
|
|
1823
2037
|
},
|
|
1824
2038
|
{
|
|
1825
2039
|
"name": "init_refund_multi_comp_def",
|
|
2040
|
+
"docs": [
|
|
2041
|
+
"Register the compute_multi_refund Arcium computation definition."
|
|
2042
|
+
],
|
|
1826
2043
|
"discriminator": [
|
|
1827
2044
|
166,
|
|
1828
2045
|
248,
|
|
@@ -1868,6 +2085,9 @@
|
|
|
1868
2085
|
},
|
|
1869
2086
|
{
|
|
1870
2087
|
"name": "init_refund_yesno_comp_def",
|
|
2088
|
+
"docs": [
|
|
2089
|
+
"Register the compute_yesno_refund Arcium computation definition."
|
|
2090
|
+
],
|
|
1871
2091
|
"discriminator": [
|
|
1872
2092
|
114,
|
|
1873
2093
|
168,
|
|
@@ -1913,6 +2133,9 @@
|
|
|
1913
2133
|
},
|
|
1914
2134
|
{
|
|
1915
2135
|
"name": "init_reveal_multi_comp_def",
|
|
2136
|
+
"docs": [
|
|
2137
|
+
"Register the reveal_market_outcome_multi Arcium computation definition."
|
|
2138
|
+
],
|
|
1916
2139
|
"discriminator": [
|
|
1917
2140
|
174,
|
|
1918
2141
|
143,
|
|
@@ -1958,6 +2181,9 @@
|
|
|
1958
2181
|
},
|
|
1959
2182
|
{
|
|
1960
2183
|
"name": "init_reveal_yesno_comp_def",
|
|
2184
|
+
"docs": [
|
|
2185
|
+
"Register the reveal_market_outcome_yesno Arcium computation definition."
|
|
2186
|
+
],
|
|
1961
2187
|
"discriminator": [
|
|
1962
2188
|
185,
|
|
1963
2189
|
221,
|
|
@@ -2003,6 +2229,9 @@
|
|
|
2003
2229
|
},
|
|
2004
2230
|
{
|
|
2005
2231
|
"name": "initialize",
|
|
2232
|
+
"docs": [
|
|
2233
|
+
"Initialize the global protocol state: fee rates, treasury, accepted mint, and admin."
|
|
2234
|
+
],
|
|
2006
2235
|
"discriminator": [
|
|
2007
2236
|
175,
|
|
2008
2237
|
175,
|
|
@@ -2069,6 +2298,9 @@
|
|
|
2069
2298
|
},
|
|
2070
2299
|
{
|
|
2071
2300
|
"name": "place_private_bet_multi",
|
|
2301
|
+
"docs": [
|
|
2302
|
+
"Queue an encrypted multi-outcome bet for MPC processing."
|
|
2303
|
+
],
|
|
2072
2304
|
"discriminator": [
|
|
2073
2305
|
43,
|
|
2074
2306
|
95,
|
|
@@ -2276,8 +2508,7 @@
|
|
|
2276
2508
|
}
|
|
2277
2509
|
},
|
|
2278
2510
|
{
|
|
2279
|
-
"name": "token_program"
|
|
2280
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
2511
|
+
"name": "token_program"
|
|
2281
2512
|
}
|
|
2282
2513
|
],
|
|
2283
2514
|
"args": [
|
|
@@ -2324,6 +2555,9 @@
|
|
|
2324
2555
|
},
|
|
2325
2556
|
{
|
|
2326
2557
|
"name": "place_private_bet_multi_callback",
|
|
2558
|
+
"docs": [
|
|
2559
|
+
"Callback that applies the MPC-computed pool totals and entry odds for a MultiOutcome bet."
|
|
2560
|
+
],
|
|
2327
2561
|
"discriminator": [
|
|
2328
2562
|
81,
|
|
2329
2563
|
0,
|
|
@@ -2387,6 +2621,9 @@
|
|
|
2387
2621
|
},
|
|
2388
2622
|
{
|
|
2389
2623
|
"name": "place_private_bet_yesno",
|
|
2624
|
+
"docs": [
|
|
2625
|
+
"Queue an encrypted YES/NO bet for MPC processing."
|
|
2626
|
+
],
|
|
2390
2627
|
"discriminator": [
|
|
2391
2628
|
14,
|
|
2392
2629
|
226,
|
|
@@ -2594,8 +2831,7 @@
|
|
|
2594
2831
|
}
|
|
2595
2832
|
},
|
|
2596
2833
|
{
|
|
2597
|
-
"name": "token_program"
|
|
2598
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
2834
|
+
"name": "token_program"
|
|
2599
2835
|
}
|
|
2600
2836
|
],
|
|
2601
2837
|
"args": [
|
|
@@ -2642,6 +2878,9 @@
|
|
|
2642
2878
|
},
|
|
2643
2879
|
{
|
|
2644
2880
|
"name": "place_private_bet_yesno_callback",
|
|
2881
|
+
"docs": [
|
|
2882
|
+
"Callback that applies the MPC-computed pool totals and entry odds for a YesNo bet."
|
|
2883
|
+
],
|
|
2645
2884
|
"discriminator": [
|
|
2646
2885
|
1,
|
|
2647
2886
|
193,
|
|
@@ -2705,6 +2944,9 @@
|
|
|
2705
2944
|
},
|
|
2706
2945
|
{
|
|
2707
2946
|
"name": "resolve_market_multi",
|
|
2947
|
+
"docs": [
|
|
2948
|
+
"Queue MPC computation to reveal the multi-outcome winner and pools."
|
|
2949
|
+
],
|
|
2708
2950
|
"discriminator": [
|
|
2709
2951
|
237,
|
|
2710
2952
|
84,
|
|
@@ -2835,6 +3077,9 @@
|
|
|
2835
3077
|
},
|
|
2836
3078
|
{
|
|
2837
3079
|
"name": "resolve_market_yesno",
|
|
3080
|
+
"docs": [
|
|
3081
|
+
"Queue MPC computation to reveal the YES/NO outcome and pools."
|
|
3082
|
+
],
|
|
2838
3083
|
"discriminator": [
|
|
2839
3084
|
191,
|
|
2840
3085
|
1,
|
|
@@ -2965,6 +3210,9 @@
|
|
|
2965
3210
|
},
|
|
2966
3211
|
{
|
|
2967
3212
|
"name": "reveal_market_outcome_multi_callback",
|
|
3213
|
+
"docs": [
|
|
3214
|
+
"Callback that writes the revealed outcome, pools, and payout ratio; market enters the challenge window."
|
|
3215
|
+
],
|
|
2968
3216
|
"discriminator": [
|
|
2969
3217
|
114,
|
|
2970
3218
|
103,
|
|
@@ -3024,6 +3272,9 @@
|
|
|
3024
3272
|
},
|
|
3025
3273
|
{
|
|
3026
3274
|
"name": "reveal_market_outcome_yesno_callback",
|
|
3275
|
+
"docs": [
|
|
3276
|
+
"Callback that writes the revealed outcome, pools, and payout ratio; market enters the challenge window."
|
|
3277
|
+
],
|
|
3027
3278
|
"discriminator": [
|
|
3028
3279
|
92,
|
|
3029
3280
|
112,
|
|
@@ -3083,6 +3334,9 @@
|
|
|
3083
3334
|
},
|
|
3084
3335
|
{
|
|
3085
3336
|
"name": "update_accepted_mint",
|
|
3337
|
+
"docs": [
|
|
3338
|
+
"Update the protocol's accepted mint and treasury (admin only)."
|
|
3339
|
+
],
|
|
3086
3340
|
"discriminator": [
|
|
3087
3341
|
6,
|
|
3088
3342
|
166,
|
|
@@ -3139,6 +3393,9 @@
|
|
|
3139
3393
|
},
|
|
3140
3394
|
{
|
|
3141
3395
|
"name": "withdraw_creator_funds",
|
|
3396
|
+
"docs": [
|
|
3397
|
+
"Withdraw creator bond and accumulated LP fees after the market is resolved."
|
|
3398
|
+
],
|
|
3142
3399
|
"discriminator": [
|
|
3143
3400
|
135,
|
|
3144
3401
|
166,
|
|
@@ -3245,8 +3502,7 @@
|
|
|
3245
3502
|
"writable": true
|
|
3246
3503
|
},
|
|
3247
3504
|
{
|
|
3248
|
-
"name": "token_program"
|
|
3249
|
-
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
3505
|
+
"name": "token_program"
|
|
3250
3506
|
}
|
|
3251
3507
|
],
|
|
3252
3508
|
"args": []
|
|
@@ -3372,6 +3628,19 @@
|
|
|
3372
3628
|
124
|
|
3373
3629
|
]
|
|
3374
3630
|
},
|
|
3631
|
+
{
|
|
3632
|
+
"name": "MarketFinalizedEvent",
|
|
3633
|
+
"discriminator": [
|
|
3634
|
+
141,
|
|
3635
|
+
216,
|
|
3636
|
+
158,
|
|
3637
|
+
192,
|
|
3638
|
+
60,
|
|
3639
|
+
222,
|
|
3640
|
+
155,
|
|
3641
|
+
232
|
|
3642
|
+
]
|
|
3643
|
+
},
|
|
3375
3644
|
{
|
|
3376
3645
|
"name": "MarketResolvedEvent",
|
|
3377
3646
|
"discriminator": [
|
|
@@ -3410,6 +3679,32 @@
|
|
|
3410
3679
|
154,
|
|
3411
3680
|
233
|
|
3412
3681
|
]
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
"name": "ResolutionFlaggedEvent",
|
|
3685
|
+
"discriminator": [
|
|
3686
|
+
159,
|
|
3687
|
+
214,
|
|
3688
|
+
98,
|
|
3689
|
+
62,
|
|
3690
|
+
158,
|
|
3691
|
+
28,
|
|
3692
|
+
21,
|
|
3693
|
+
84
|
|
3694
|
+
]
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
"name": "ResolutionOverriddenEvent",
|
|
3698
|
+
"discriminator": [
|
|
3699
|
+
133,
|
|
3700
|
+
175,
|
|
3701
|
+
170,
|
|
3702
|
+
160,
|
|
3703
|
+
47,
|
|
3704
|
+
76,
|
|
3705
|
+
128,
|
|
3706
|
+
87
|
|
3707
|
+
]
|
|
3413
3708
|
}
|
|
3414
3709
|
],
|
|
3415
3710
|
"errors": [
|
|
@@ -3592,6 +3887,36 @@
|
|
|
3592
3887
|
"code": 6035,
|
|
3593
3888
|
"name": "InvalidCategory",
|
|
3594
3889
|
"msg": "Invalid category — must be 0-6"
|
|
3890
|
+
},
|
|
3891
|
+
{
|
|
3892
|
+
"code": 6036,
|
|
3893
|
+
"name": "InvalidChallengePeriod",
|
|
3894
|
+
"msg": "Challenge period must be between 24 and 48 hours"
|
|
3895
|
+
},
|
|
3896
|
+
{
|
|
3897
|
+
"code": 6037,
|
|
3898
|
+
"name": "NotPendingResolution",
|
|
3899
|
+
"msg": "Market is not pending resolution"
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
"code": 6038,
|
|
3903
|
+
"name": "ChallengePeriodNotElapsed",
|
|
3904
|
+
"msg": "Challenge period has not elapsed yet"
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"code": 6039,
|
|
3908
|
+
"name": "ChallengePeriodElapsed",
|
|
3909
|
+
"msg": "Challenge period has already elapsed"
|
|
3910
|
+
},
|
|
3911
|
+
{
|
|
3912
|
+
"code": 6040,
|
|
3913
|
+
"name": "MarketDisputed",
|
|
3914
|
+
"msg": "Market resolution is disputed — admin must override"
|
|
3915
|
+
},
|
|
3916
|
+
{
|
|
3917
|
+
"code": 6041,
|
|
3918
|
+
"name": "MarketNotDisputed",
|
|
3919
|
+
"msg": "Market resolution is not disputed"
|
|
3595
3920
|
}
|
|
3596
3921
|
],
|
|
3597
3922
|
"types": [
|
|
@@ -4594,6 +4919,27 @@
|
|
|
4594
4919
|
"name": "refund_deadline",
|
|
4595
4920
|
"type": "i64"
|
|
4596
4921
|
},
|
|
4922
|
+
{
|
|
4923
|
+
"name": "challenge_period",
|
|
4924
|
+
"docs": [
|
|
4925
|
+
"Configurable dispute window (24-48h), set at creation"
|
|
4926
|
+
],
|
|
4927
|
+
"type": "i64"
|
|
4928
|
+
},
|
|
4929
|
+
{
|
|
4930
|
+
"name": "challenge_deadline",
|
|
4931
|
+
"docs": [
|
|
4932
|
+
"resolution_time + challenge_period — set by the reveal callback"
|
|
4933
|
+
],
|
|
4934
|
+
"type": "i64"
|
|
4935
|
+
},
|
|
4936
|
+
{
|
|
4937
|
+
"name": "disputed",
|
|
4938
|
+
"docs": [
|
|
4939
|
+
"Set true by flag_resolution; blocks finalize_resolution until admin overrides"
|
|
4940
|
+
],
|
|
4941
|
+
"type": "bool"
|
|
4942
|
+
},
|
|
4597
4943
|
{
|
|
4598
4944
|
"name": "bump",
|
|
4599
4945
|
"type": "u8"
|
|
@@ -4657,6 +5003,26 @@
|
|
|
4657
5003
|
]
|
|
4658
5004
|
}
|
|
4659
5005
|
},
|
|
5006
|
+
{
|
|
5007
|
+
"name": "MarketFinalizedEvent",
|
|
5008
|
+
"type": {
|
|
5009
|
+
"kind": "struct",
|
|
5010
|
+
"fields": [
|
|
5011
|
+
{
|
|
5012
|
+
"name": "market",
|
|
5013
|
+
"type": "pubkey"
|
|
5014
|
+
},
|
|
5015
|
+
{
|
|
5016
|
+
"name": "outcome",
|
|
5017
|
+
"type": "u8"
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
"name": "payout_ratio",
|
|
5021
|
+
"type": "u64"
|
|
5022
|
+
}
|
|
5023
|
+
]
|
|
5024
|
+
}
|
|
5025
|
+
},
|
|
4660
5026
|
{
|
|
4661
5027
|
"name": "MarketResolvedEvent",
|
|
4662
5028
|
"type": {
|
|
@@ -5055,6 +5421,50 @@
|
|
|
5055
5421
|
]
|
|
5056
5422
|
}
|
|
5057
5423
|
},
|
|
5424
|
+
{
|
|
5425
|
+
"name": "ResolutionFlaggedEvent",
|
|
5426
|
+
"type": {
|
|
5427
|
+
"kind": "struct",
|
|
5428
|
+
"fields": [
|
|
5429
|
+
{
|
|
5430
|
+
"name": "market",
|
|
5431
|
+
"type": "pubkey"
|
|
5432
|
+
},
|
|
5433
|
+
{
|
|
5434
|
+
"name": "flagged_by",
|
|
5435
|
+
"type": "pubkey"
|
|
5436
|
+
}
|
|
5437
|
+
]
|
|
5438
|
+
}
|
|
5439
|
+
},
|
|
5440
|
+
{
|
|
5441
|
+
"name": "ResolutionOverriddenEvent",
|
|
5442
|
+
"type": {
|
|
5443
|
+
"kind": "struct",
|
|
5444
|
+
"fields": [
|
|
5445
|
+
{
|
|
5446
|
+
"name": "market",
|
|
5447
|
+
"type": "pubkey"
|
|
5448
|
+
},
|
|
5449
|
+
{
|
|
5450
|
+
"name": "old_outcome",
|
|
5451
|
+
"type": "u8"
|
|
5452
|
+
},
|
|
5453
|
+
{
|
|
5454
|
+
"name": "new_outcome",
|
|
5455
|
+
"type": "u8"
|
|
5456
|
+
},
|
|
5457
|
+
{
|
|
5458
|
+
"name": "new_payout_ratio",
|
|
5459
|
+
"type": "u64"
|
|
5460
|
+
},
|
|
5461
|
+
{
|
|
5462
|
+
"name": "admin",
|
|
5463
|
+
"type": "pubkey"
|
|
5464
|
+
}
|
|
5465
|
+
]
|
|
5466
|
+
}
|
|
5467
|
+
},
|
|
5058
5468
|
{
|
|
5059
5469
|
"name": "RevealMarketOutcomeMultiOutput",
|
|
5060
5470
|
"docs": [
|