@cypher-zk/sdk 0.7.4 → 0.7.6
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/dist/{client-BECBXFEY.d.ts → client-C6xXOySs.d.ts} +840 -452
- package/dist/cypher-3HKPZR2F.json +6053 -0
- package/dist/index.d.ts +66 -58
- package/dist/index.js +193 -114
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +6 -2
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/src/idl/cypher.json +780 -438
- package/src/idl/cypher.ts +780 -438
- package/src/idl/cypher.ts.bak +5717 -0
- /package/{dist/cypher-G57ZWFM3.json → src/idl/cypher.json.bak} +0 -0
|
@@ -505,6 +505,30 @@ type Cypher = {
|
|
|
505
505
|
];
|
|
506
506
|
};
|
|
507
507
|
},
|
|
508
|
+
{
|
|
509
|
+
"name": "globalState";
|
|
510
|
+
"pda": {
|
|
511
|
+
"seeds": [
|
|
512
|
+
{
|
|
513
|
+
"kind": "const";
|
|
514
|
+
"value": [
|
|
515
|
+
103,
|
|
516
|
+
108,
|
|
517
|
+
111,
|
|
518
|
+
98,
|
|
519
|
+
97,
|
|
520
|
+
108,
|
|
521
|
+
95,
|
|
522
|
+
115,
|
|
523
|
+
116,
|
|
524
|
+
97,
|
|
525
|
+
116,
|
|
526
|
+
101
|
|
527
|
+
];
|
|
528
|
+
}
|
|
529
|
+
];
|
|
530
|
+
};
|
|
531
|
+
},
|
|
508
532
|
{
|
|
509
533
|
"name": "marketVault";
|
|
510
534
|
"writable": true;
|
|
@@ -600,34 +624,6 @@ type Cypher = {
|
|
|
600
624
|
{
|
|
601
625
|
"name": "signPdaAccount";
|
|
602
626
|
"writable": true;
|
|
603
|
-
"pda": {
|
|
604
|
-
"seeds": [
|
|
605
|
-
{
|
|
606
|
-
"kind": "const";
|
|
607
|
-
"value": [
|
|
608
|
-
65,
|
|
609
|
-
114,
|
|
610
|
-
99,
|
|
611
|
-
105,
|
|
612
|
-
117,
|
|
613
|
-
109,
|
|
614
|
-
83,
|
|
615
|
-
105,
|
|
616
|
-
103,
|
|
617
|
-
110,
|
|
618
|
-
101,
|
|
619
|
-
114,
|
|
620
|
-
65,
|
|
621
|
-
99,
|
|
622
|
-
99,
|
|
623
|
-
111,
|
|
624
|
-
117,
|
|
625
|
-
110,
|
|
626
|
-
116
|
|
627
|
-
];
|
|
628
|
-
}
|
|
629
|
-
];
|
|
630
|
-
};
|
|
631
627
|
},
|
|
632
628
|
{
|
|
633
629
|
"name": "mxeAccount";
|
|
@@ -725,6 +721,30 @@ type Cypher = {
|
|
|
725
721
|
];
|
|
726
722
|
};
|
|
727
723
|
},
|
|
724
|
+
{
|
|
725
|
+
"name": "globalState";
|
|
726
|
+
"pda": {
|
|
727
|
+
"seeds": [
|
|
728
|
+
{
|
|
729
|
+
"kind": "const";
|
|
730
|
+
"value": [
|
|
731
|
+
103,
|
|
732
|
+
108,
|
|
733
|
+
111,
|
|
734
|
+
98,
|
|
735
|
+
97,
|
|
736
|
+
108,
|
|
737
|
+
95,
|
|
738
|
+
115,
|
|
739
|
+
116,
|
|
740
|
+
97,
|
|
741
|
+
116,
|
|
742
|
+
101
|
|
743
|
+
];
|
|
744
|
+
}
|
|
745
|
+
];
|
|
746
|
+
};
|
|
747
|
+
},
|
|
728
748
|
{
|
|
729
749
|
"name": "marketVault";
|
|
730
750
|
"writable": true;
|
|
@@ -793,34 +813,6 @@ type Cypher = {
|
|
|
793
813
|
{
|
|
794
814
|
"name": "signPdaAccount";
|
|
795
815
|
"writable": true;
|
|
796
|
-
"pda": {
|
|
797
|
-
"seeds": [
|
|
798
|
-
{
|
|
799
|
-
"kind": "const";
|
|
800
|
-
"value": [
|
|
801
|
-
65,
|
|
802
|
-
114,
|
|
803
|
-
99,
|
|
804
|
-
105,
|
|
805
|
-
117,
|
|
806
|
-
109,
|
|
807
|
-
83,
|
|
808
|
-
105,
|
|
809
|
-
103,
|
|
810
|
-
110,
|
|
811
|
-
101,
|
|
812
|
-
114,
|
|
813
|
-
65,
|
|
814
|
-
99,
|
|
815
|
-
99,
|
|
816
|
-
111,
|
|
817
|
-
117,
|
|
818
|
-
110,
|
|
819
|
-
116
|
|
820
|
-
];
|
|
821
|
-
}
|
|
822
|
-
];
|
|
823
|
-
};
|
|
824
816
|
},
|
|
825
817
|
{
|
|
826
818
|
"name": "mxeAccount";
|
|
@@ -918,6 +910,30 @@ type Cypher = {
|
|
|
918
910
|
];
|
|
919
911
|
};
|
|
920
912
|
},
|
|
913
|
+
{
|
|
914
|
+
"name": "globalState";
|
|
915
|
+
"pda": {
|
|
916
|
+
"seeds": [
|
|
917
|
+
{
|
|
918
|
+
"kind": "const";
|
|
919
|
+
"value": [
|
|
920
|
+
103,
|
|
921
|
+
108,
|
|
922
|
+
111,
|
|
923
|
+
98,
|
|
924
|
+
97,
|
|
925
|
+
108,
|
|
926
|
+
95,
|
|
927
|
+
115,
|
|
928
|
+
116,
|
|
929
|
+
97,
|
|
930
|
+
116,
|
|
931
|
+
101
|
|
932
|
+
];
|
|
933
|
+
}
|
|
934
|
+
];
|
|
935
|
+
};
|
|
936
|
+
},
|
|
921
937
|
{
|
|
922
938
|
"name": "marketVault";
|
|
923
939
|
"writable": true;
|
|
@@ -986,34 +1002,6 @@ type Cypher = {
|
|
|
986
1002
|
{
|
|
987
1003
|
"name": "signPdaAccount";
|
|
988
1004
|
"writable": true;
|
|
989
|
-
"pda": {
|
|
990
|
-
"seeds": [
|
|
991
|
-
{
|
|
992
|
-
"kind": "const";
|
|
993
|
-
"value": [
|
|
994
|
-
65,
|
|
995
|
-
114,
|
|
996
|
-
99,
|
|
997
|
-
105,
|
|
998
|
-
117,
|
|
999
|
-
109,
|
|
1000
|
-
83,
|
|
1001
|
-
105,
|
|
1002
|
-
103,
|
|
1003
|
-
110,
|
|
1004
|
-
101,
|
|
1005
|
-
114,
|
|
1006
|
-
65,
|
|
1007
|
-
99,
|
|
1008
|
-
99,
|
|
1009
|
-
111,
|
|
1010
|
-
117,
|
|
1011
|
-
110,
|
|
1012
|
-
116
|
|
1013
|
-
];
|
|
1014
|
-
}
|
|
1015
|
-
];
|
|
1016
|
-
};
|
|
1017
1005
|
},
|
|
1018
1006
|
{
|
|
1019
1007
|
"name": "mxeAccount";
|
|
@@ -1111,6 +1099,30 @@ type Cypher = {
|
|
|
1111
1099
|
];
|
|
1112
1100
|
};
|
|
1113
1101
|
},
|
|
1102
|
+
{
|
|
1103
|
+
"name": "globalState";
|
|
1104
|
+
"pda": {
|
|
1105
|
+
"seeds": [
|
|
1106
|
+
{
|
|
1107
|
+
"kind": "const";
|
|
1108
|
+
"value": [
|
|
1109
|
+
103,
|
|
1110
|
+
108,
|
|
1111
|
+
111,
|
|
1112
|
+
98,
|
|
1113
|
+
97,
|
|
1114
|
+
108,
|
|
1115
|
+
95,
|
|
1116
|
+
115,
|
|
1117
|
+
116,
|
|
1118
|
+
97,
|
|
1119
|
+
116,
|
|
1120
|
+
101
|
|
1121
|
+
];
|
|
1122
|
+
}
|
|
1123
|
+
];
|
|
1124
|
+
};
|
|
1125
|
+
},
|
|
1114
1126
|
{
|
|
1115
1127
|
"name": "marketVault";
|
|
1116
1128
|
"writable": true;
|
|
@@ -1179,34 +1191,6 @@ type Cypher = {
|
|
|
1179
1191
|
{
|
|
1180
1192
|
"name": "signPdaAccount";
|
|
1181
1193
|
"writable": true;
|
|
1182
|
-
"pda": {
|
|
1183
|
-
"seeds": [
|
|
1184
|
-
{
|
|
1185
|
-
"kind": "const";
|
|
1186
|
-
"value": [
|
|
1187
|
-
65,
|
|
1188
|
-
114,
|
|
1189
|
-
99,
|
|
1190
|
-
105,
|
|
1191
|
-
117,
|
|
1192
|
-
109,
|
|
1193
|
-
83,
|
|
1194
|
-
105,
|
|
1195
|
-
103,
|
|
1196
|
-
110,
|
|
1197
|
-
101,
|
|
1198
|
-
114,
|
|
1199
|
-
65,
|
|
1200
|
-
99,
|
|
1201
|
-
99,
|
|
1202
|
-
111,
|
|
1203
|
-
117,
|
|
1204
|
-
110,
|
|
1205
|
-
116
|
|
1206
|
-
];
|
|
1207
|
-
}
|
|
1208
|
-
];
|
|
1209
|
-
};
|
|
1210
1194
|
},
|
|
1211
1195
|
{
|
|
1212
1196
|
"name": "mxeAccount";
|
|
@@ -1304,6 +1288,30 @@ type Cypher = {
|
|
|
1304
1288
|
];
|
|
1305
1289
|
};
|
|
1306
1290
|
},
|
|
1291
|
+
{
|
|
1292
|
+
"name": "globalState";
|
|
1293
|
+
"pda": {
|
|
1294
|
+
"seeds": [
|
|
1295
|
+
{
|
|
1296
|
+
"kind": "const";
|
|
1297
|
+
"value": [
|
|
1298
|
+
103,
|
|
1299
|
+
108,
|
|
1300
|
+
111,
|
|
1301
|
+
98,
|
|
1302
|
+
97,
|
|
1303
|
+
108,
|
|
1304
|
+
95,
|
|
1305
|
+
115,
|
|
1306
|
+
116,
|
|
1307
|
+
97,
|
|
1308
|
+
116,
|
|
1309
|
+
101
|
|
1310
|
+
];
|
|
1311
|
+
}
|
|
1312
|
+
];
|
|
1313
|
+
};
|
|
1314
|
+
},
|
|
1307
1315
|
{
|
|
1308
1316
|
"name": "marketVault";
|
|
1309
1317
|
"writable": true;
|
|
@@ -1395,6 +1403,30 @@ type Cypher = {
|
|
|
1395
1403
|
"name": "market";
|
|
1396
1404
|
"writable": true;
|
|
1397
1405
|
},
|
|
1406
|
+
{
|
|
1407
|
+
"name": "globalState";
|
|
1408
|
+
"pda": {
|
|
1409
|
+
"seeds": [
|
|
1410
|
+
{
|
|
1411
|
+
"kind": "const";
|
|
1412
|
+
"value": [
|
|
1413
|
+
103,
|
|
1414
|
+
108,
|
|
1415
|
+
111,
|
|
1416
|
+
98,
|
|
1417
|
+
97,
|
|
1418
|
+
108,
|
|
1419
|
+
95,
|
|
1420
|
+
115,
|
|
1421
|
+
116,
|
|
1422
|
+
97,
|
|
1423
|
+
116,
|
|
1424
|
+
101
|
|
1425
|
+
];
|
|
1426
|
+
}
|
|
1427
|
+
];
|
|
1428
|
+
};
|
|
1429
|
+
},
|
|
1398
1430
|
{
|
|
1399
1431
|
"name": "marketVault";
|
|
1400
1432
|
"writable": true;
|
|
@@ -1479,6 +1511,30 @@ type Cypher = {
|
|
|
1479
1511
|
"name": "market";
|
|
1480
1512
|
"writable": true;
|
|
1481
1513
|
},
|
|
1514
|
+
{
|
|
1515
|
+
"name": "globalState";
|
|
1516
|
+
"pda": {
|
|
1517
|
+
"seeds": [
|
|
1518
|
+
{
|
|
1519
|
+
"kind": "const";
|
|
1520
|
+
"value": [
|
|
1521
|
+
103,
|
|
1522
|
+
108,
|
|
1523
|
+
111,
|
|
1524
|
+
98,
|
|
1525
|
+
97,
|
|
1526
|
+
108,
|
|
1527
|
+
95,
|
|
1528
|
+
115,
|
|
1529
|
+
116,
|
|
1530
|
+
97,
|
|
1531
|
+
116,
|
|
1532
|
+
101
|
|
1533
|
+
];
|
|
1534
|
+
}
|
|
1535
|
+
];
|
|
1536
|
+
};
|
|
1537
|
+
},
|
|
1482
1538
|
{
|
|
1483
1539
|
"name": "marketVault";
|
|
1484
1540
|
"writable": true;
|
|
@@ -1563,6 +1619,30 @@ type Cypher = {
|
|
|
1563
1619
|
"name": "market";
|
|
1564
1620
|
"writable": true;
|
|
1565
1621
|
},
|
|
1622
|
+
{
|
|
1623
|
+
"name": "globalState";
|
|
1624
|
+
"pda": {
|
|
1625
|
+
"seeds": [
|
|
1626
|
+
{
|
|
1627
|
+
"kind": "const";
|
|
1628
|
+
"value": [
|
|
1629
|
+
103,
|
|
1630
|
+
108,
|
|
1631
|
+
111,
|
|
1632
|
+
98,
|
|
1633
|
+
97,
|
|
1634
|
+
108,
|
|
1635
|
+
95,
|
|
1636
|
+
115,
|
|
1637
|
+
116,
|
|
1638
|
+
97,
|
|
1639
|
+
116,
|
|
1640
|
+
101
|
|
1641
|
+
];
|
|
1642
|
+
}
|
|
1643
|
+
];
|
|
1644
|
+
};
|
|
1645
|
+
},
|
|
1566
1646
|
{
|
|
1567
1647
|
"name": "marketVault";
|
|
1568
1648
|
"writable": true;
|
|
@@ -1647,6 +1727,30 @@ type Cypher = {
|
|
|
1647
1727
|
"name": "market";
|
|
1648
1728
|
"writable": true;
|
|
1649
1729
|
},
|
|
1730
|
+
{
|
|
1731
|
+
"name": "globalState";
|
|
1732
|
+
"pda": {
|
|
1733
|
+
"seeds": [
|
|
1734
|
+
{
|
|
1735
|
+
"kind": "const";
|
|
1736
|
+
"value": [
|
|
1737
|
+
103,
|
|
1738
|
+
108,
|
|
1739
|
+
111,
|
|
1740
|
+
98,
|
|
1741
|
+
97,
|
|
1742
|
+
108,
|
|
1743
|
+
95,
|
|
1744
|
+
115,
|
|
1745
|
+
116,
|
|
1746
|
+
97,
|
|
1747
|
+
116,
|
|
1748
|
+
101
|
|
1749
|
+
];
|
|
1750
|
+
}
|
|
1751
|
+
];
|
|
1752
|
+
};
|
|
1753
|
+
},
|
|
1650
1754
|
{
|
|
1651
1755
|
"name": "marketVault";
|
|
1652
1756
|
"writable": true;
|
|
@@ -1754,6 +1858,38 @@ type Cypher = {
|
|
|
1754
1858
|
];
|
|
1755
1859
|
};
|
|
1756
1860
|
},
|
|
1861
|
+
{
|
|
1862
|
+
"name": "marketQuestion";
|
|
1863
|
+
"writable": true;
|
|
1864
|
+
"pda": {
|
|
1865
|
+
"seeds": [
|
|
1866
|
+
{
|
|
1867
|
+
"kind": "const";
|
|
1868
|
+
"value": [
|
|
1869
|
+
109,
|
|
1870
|
+
97,
|
|
1871
|
+
114,
|
|
1872
|
+
107,
|
|
1873
|
+
101,
|
|
1874
|
+
116,
|
|
1875
|
+
95,
|
|
1876
|
+
113,
|
|
1877
|
+
117,
|
|
1878
|
+
101,
|
|
1879
|
+
115,
|
|
1880
|
+
116,
|
|
1881
|
+
105,
|
|
1882
|
+
111,
|
|
1883
|
+
110
|
|
1884
|
+
];
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"kind": "account";
|
|
1888
|
+
"path": "market";
|
|
1889
|
+
}
|
|
1890
|
+
];
|
|
1891
|
+
};
|
|
1892
|
+
},
|
|
1757
1893
|
{
|
|
1758
1894
|
"name": "lpPosition";
|
|
1759
1895
|
"writable": true;
|
|
@@ -1923,6 +2059,38 @@ type Cypher = {
|
|
|
1923
2059
|
];
|
|
1924
2060
|
};
|
|
1925
2061
|
},
|
|
2062
|
+
{
|
|
2063
|
+
"name": "marketQuestion";
|
|
2064
|
+
"writable": true;
|
|
2065
|
+
"pda": {
|
|
2066
|
+
"seeds": [
|
|
2067
|
+
{
|
|
2068
|
+
"kind": "const";
|
|
2069
|
+
"value": [
|
|
2070
|
+
109,
|
|
2071
|
+
97,
|
|
2072
|
+
114,
|
|
2073
|
+
107,
|
|
2074
|
+
101,
|
|
2075
|
+
116,
|
|
2076
|
+
95,
|
|
2077
|
+
113,
|
|
2078
|
+
117,
|
|
2079
|
+
101,
|
|
2080
|
+
115,
|
|
2081
|
+
116,
|
|
2082
|
+
105,
|
|
2083
|
+
111,
|
|
2084
|
+
110
|
|
2085
|
+
];
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"kind": "account";
|
|
2089
|
+
"path": "market";
|
|
2090
|
+
}
|
|
2091
|
+
];
|
|
2092
|
+
};
|
|
2093
|
+
},
|
|
1926
2094
|
{
|
|
1927
2095
|
"name": "lpPosition";
|
|
1928
2096
|
"writable": true;
|
|
@@ -2122,9 +2290,6 @@ type Cypher = {
|
|
|
2122
2290
|
},
|
|
2123
2291
|
{
|
|
2124
2292
|
"name": "initPayoutMultiCompDef";
|
|
2125
|
-
"docs": [
|
|
2126
|
-
"Register the compute_multi_payout Arcium computation definition."
|
|
2127
|
-
];
|
|
2128
2293
|
"discriminator": [
|
|
2129
2294
|
155,
|
|
2130
2295
|
138,
|
|
@@ -2170,9 +2335,6 @@ type Cypher = {
|
|
|
2170
2335
|
},
|
|
2171
2336
|
{
|
|
2172
2337
|
"name": "initPayoutYesnoCompDef";
|
|
2173
|
-
"docs": [
|
|
2174
|
-
"Register the compute_yesno_payout Arcium computation definition."
|
|
2175
|
-
];
|
|
2176
2338
|
"discriminator": [
|
|
2177
2339
|
104,
|
|
2178
2340
|
87,
|
|
@@ -2218,9 +2380,6 @@ type Cypher = {
|
|
|
2218
2380
|
},
|
|
2219
2381
|
{
|
|
2220
2382
|
"name": "initPlaceBetMultiCompDef";
|
|
2221
|
-
"docs": [
|
|
2222
|
-
"Register the place_private_bet_multi Arcium computation definition."
|
|
2223
|
-
];
|
|
2224
2383
|
"discriminator": [
|
|
2225
2384
|
2,
|
|
2226
2385
|
251,
|
|
@@ -2266,9 +2425,6 @@ type Cypher = {
|
|
|
2266
2425
|
},
|
|
2267
2426
|
{
|
|
2268
2427
|
"name": "initPlaceBetYesnoCompDef";
|
|
2269
|
-
"docs": [
|
|
2270
|
-
"Register the place_private_bet_yesno Arcium computation definition."
|
|
2271
|
-
];
|
|
2272
2428
|
"discriminator": [
|
|
2273
2429
|
160,
|
|
2274
2430
|
105,
|
|
@@ -2314,9 +2470,6 @@ type Cypher = {
|
|
|
2314
2470
|
},
|
|
2315
2471
|
{
|
|
2316
2472
|
"name": "initRefundMultiCompDef";
|
|
2317
|
-
"docs": [
|
|
2318
|
-
"Register the compute_multi_refund Arcium computation definition."
|
|
2319
|
-
];
|
|
2320
2473
|
"discriminator": [
|
|
2321
2474
|
166,
|
|
2322
2475
|
248,
|
|
@@ -2362,9 +2515,6 @@ type Cypher = {
|
|
|
2362
2515
|
},
|
|
2363
2516
|
{
|
|
2364
2517
|
"name": "initRefundYesnoCompDef";
|
|
2365
|
-
"docs": [
|
|
2366
|
-
"Register the compute_yesno_refund Arcium computation definition."
|
|
2367
|
-
];
|
|
2368
2518
|
"discriminator": [
|
|
2369
2519
|
114,
|
|
2370
2520
|
168,
|
|
@@ -2410,9 +2560,6 @@ type Cypher = {
|
|
|
2410
2560
|
},
|
|
2411
2561
|
{
|
|
2412
2562
|
"name": "initRevealMultiCompDef";
|
|
2413
|
-
"docs": [
|
|
2414
|
-
"Register the reveal_market_outcome_multi Arcium computation definition."
|
|
2415
|
-
];
|
|
2416
2563
|
"discriminator": [
|
|
2417
2564
|
174,
|
|
2418
2565
|
143,
|
|
@@ -2458,9 +2605,6 @@ type Cypher = {
|
|
|
2458
2605
|
},
|
|
2459
2606
|
{
|
|
2460
2607
|
"name": "initRevealYesnoCompDef";
|
|
2461
|
-
"docs": [
|
|
2462
|
-
"Register the reveal_market_outcome_yesno Arcium computation definition."
|
|
2463
|
-
];
|
|
2464
2608
|
"discriminator": [
|
|
2465
2609
|
185,
|
|
2466
2610
|
221,
|
|
@@ -2504,6 +2648,67 @@ type Cypher = {
|
|
|
2504
2648
|
];
|
|
2505
2649
|
"args": [];
|
|
2506
2650
|
},
|
|
2651
|
+
{
|
|
2652
|
+
"name": "initSignPda";
|
|
2653
|
+
"docs": [
|
|
2654
|
+
"Create the singleton Arcium signer PDA exactly once.",
|
|
2655
|
+
"All queue_computation instructions require this PDA to exist."
|
|
2656
|
+
];
|
|
2657
|
+
"discriminator": [
|
|
2658
|
+
102,
|
|
2659
|
+
179,
|
|
2660
|
+
4,
|
|
2661
|
+
195,
|
|
2662
|
+
198,
|
|
2663
|
+
41,
|
|
2664
|
+
211,
|
|
2665
|
+
183
|
|
2666
|
+
];
|
|
2667
|
+
"accounts": [
|
|
2668
|
+
{
|
|
2669
|
+
"name": "payer";
|
|
2670
|
+
"writable": true;
|
|
2671
|
+
"signer": true;
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
"name": "signPdaAccount";
|
|
2675
|
+
"writable": true;
|
|
2676
|
+
"pda": {
|
|
2677
|
+
"seeds": [
|
|
2678
|
+
{
|
|
2679
|
+
"kind": "const";
|
|
2680
|
+
"value": [
|
|
2681
|
+
65,
|
|
2682
|
+
114,
|
|
2683
|
+
99,
|
|
2684
|
+
105,
|
|
2685
|
+
117,
|
|
2686
|
+
109,
|
|
2687
|
+
83,
|
|
2688
|
+
105,
|
|
2689
|
+
103,
|
|
2690
|
+
110,
|
|
2691
|
+
101,
|
|
2692
|
+
114,
|
|
2693
|
+
65,
|
|
2694
|
+
99,
|
|
2695
|
+
99,
|
|
2696
|
+
111,
|
|
2697
|
+
117,
|
|
2698
|
+
110,
|
|
2699
|
+
116
|
|
2700
|
+
];
|
|
2701
|
+
}
|
|
2702
|
+
];
|
|
2703
|
+
};
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"name": "systemProgram";
|
|
2707
|
+
"address": "11111111111111111111111111111111";
|
|
2708
|
+
}
|
|
2709
|
+
];
|
|
2710
|
+
"args": [];
|
|
2711
|
+
},
|
|
2507
2712
|
{
|
|
2508
2713
|
"name": "initialize";
|
|
2509
2714
|
"docs": [
|
|
@@ -2555,7 +2760,9 @@ type Cypher = {
|
|
|
2555
2760
|
},
|
|
2556
2761
|
{
|
|
2557
2762
|
"name": "acceptedMint";
|
|
2558
|
-
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"name": "tokenProgram";
|
|
2559
2766
|
},
|
|
2560
2767
|
{
|
|
2561
2768
|
"name": "systemProgram";
|
|
@@ -2576,7 +2783,8 @@ type Cypher = {
|
|
|
2576
2783
|
{
|
|
2577
2784
|
"name": "placePrivateBetMulti";
|
|
2578
2785
|
"docs": [
|
|
2579
|
-
"
|
|
2786
|
+
"Step 1 of 2: deposit funds, collect fees, and initialise the position PDA.",
|
|
2787
|
+
"Call submit_bet_multi in the same transaction to queue the MPC computation."
|
|
2580
2788
|
];
|
|
2581
2789
|
"discriminator": [
|
|
2582
2790
|
43,
|
|
@@ -2595,107 +2803,35 @@ type Cypher = {
|
|
|
2595
2803
|
"signer": true;
|
|
2596
2804
|
},
|
|
2597
2805
|
{
|
|
2598
|
-
"name": "
|
|
2599
|
-
"
|
|
2806
|
+
"name": "user";
|
|
2807
|
+
"signer": true;
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"name": "globalState";
|
|
2600
2811
|
"pda": {
|
|
2601
2812
|
"seeds": [
|
|
2602
2813
|
{
|
|
2603
2814
|
"kind": "const";
|
|
2604
2815
|
"value": [
|
|
2605
|
-
65,
|
|
2606
|
-
114,
|
|
2607
|
-
99,
|
|
2608
|
-
105,
|
|
2609
|
-
117,
|
|
2610
|
-
109,
|
|
2611
|
-
83,
|
|
2612
|
-
105,
|
|
2613
2816
|
103,
|
|
2614
|
-
|
|
2615
|
-
101,
|
|
2616
|
-
114,
|
|
2617
|
-
65,
|
|
2618
|
-
99,
|
|
2619
|
-
99,
|
|
2817
|
+
108,
|
|
2620
2818
|
111,
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2819
|
+
98,
|
|
2820
|
+
97,
|
|
2821
|
+
108,
|
|
2822
|
+
95,
|
|
2823
|
+
115,
|
|
2824
|
+
116,
|
|
2825
|
+
97,
|
|
2826
|
+
116,
|
|
2827
|
+
101
|
|
2624
2828
|
];
|
|
2625
2829
|
}
|
|
2626
2830
|
];
|
|
2627
2831
|
};
|
|
2628
2832
|
},
|
|
2629
2833
|
{
|
|
2630
|
-
"name": "
|
|
2631
|
-
},
|
|
2632
|
-
{
|
|
2633
|
-
"name": "mempoolAccount";
|
|
2634
|
-
"writable": true;
|
|
2635
|
-
},
|
|
2636
|
-
{
|
|
2637
|
-
"name": "executingPool";
|
|
2638
|
-
"writable": true;
|
|
2639
|
-
},
|
|
2640
|
-
{
|
|
2641
|
-
"name": "computationAccount";
|
|
2642
|
-
"writable": true;
|
|
2643
|
-
},
|
|
2644
|
-
{
|
|
2645
|
-
"name": "compDefAccount";
|
|
2646
|
-
},
|
|
2647
|
-
{
|
|
2648
|
-
"name": "clusterAccount";
|
|
2649
|
-
"writable": true;
|
|
2650
|
-
},
|
|
2651
|
-
{
|
|
2652
|
-
"name": "poolAccount";
|
|
2653
|
-
"writable": true;
|
|
2654
|
-
"address": "G2sRWJvi3xoyh5k2gY49eG9L8YhAEWQPtNb1zb1GXTtC";
|
|
2655
|
-
},
|
|
2656
|
-
{
|
|
2657
|
-
"name": "clockAccount";
|
|
2658
|
-
"writable": true;
|
|
2659
|
-
"address": "7EbMUTLo5DjdzbN7s8BXeZwXzEwNQb1hScfRvWg8a6ot";
|
|
2660
|
-
},
|
|
2661
|
-
{
|
|
2662
|
-
"name": "systemProgram";
|
|
2663
|
-
"address": "11111111111111111111111111111111";
|
|
2664
|
-
},
|
|
2665
|
-
{
|
|
2666
|
-
"name": "arciumProgram";
|
|
2667
|
-
"address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
2668
|
-
},
|
|
2669
|
-
{
|
|
2670
|
-
"name": "user";
|
|
2671
|
-
"signer": true;
|
|
2672
|
-
},
|
|
2673
|
-
{
|
|
2674
|
-
"name": "globalState";
|
|
2675
|
-
"pda": {
|
|
2676
|
-
"seeds": [
|
|
2677
|
-
{
|
|
2678
|
-
"kind": "const";
|
|
2679
|
-
"value": [
|
|
2680
|
-
103,
|
|
2681
|
-
108,
|
|
2682
|
-
111,
|
|
2683
|
-
98,
|
|
2684
|
-
97,
|
|
2685
|
-
108,
|
|
2686
|
-
95,
|
|
2687
|
-
115,
|
|
2688
|
-
116,
|
|
2689
|
-
97,
|
|
2690
|
-
116,
|
|
2691
|
-
101
|
|
2692
|
-
];
|
|
2693
|
-
}
|
|
2694
|
-
];
|
|
2695
|
-
};
|
|
2696
|
-
},
|
|
2697
|
-
{
|
|
2698
|
-
"name": "market";
|
|
2834
|
+
"name": "market";
|
|
2699
2835
|
"writable": true;
|
|
2700
2836
|
"pda": {
|
|
2701
2837
|
"seeds": [
|
|
@@ -2786,13 +2922,13 @@ type Cypher = {
|
|
|
2786
2922
|
},
|
|
2787
2923
|
{
|
|
2788
2924
|
"name": "tokenProgram";
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"name": "systemProgram";
|
|
2928
|
+
"address": "11111111111111111111111111111111";
|
|
2789
2929
|
}
|
|
2790
2930
|
];
|
|
2791
2931
|
"args": [
|
|
2792
|
-
{
|
|
2793
|
-
"name": "computationOffset";
|
|
2794
|
-
"type": "u64";
|
|
2795
|
-
},
|
|
2796
2932
|
{
|
|
2797
2933
|
"name": "betAmountUsdc";
|
|
2798
2934
|
"type": "u64";
|
|
@@ -2899,7 +3035,8 @@ type Cypher = {
|
|
|
2899
3035
|
{
|
|
2900
3036
|
"name": "placePrivateBetYesno";
|
|
2901
3037
|
"docs": [
|
|
2902
|
-
"
|
|
3038
|
+
"Step 1 of 2: deposit funds, collect fees, and initialise the position PDA.",
|
|
3039
|
+
"Call submit_bet_yesno in the same transaction to queue the MPC computation."
|
|
2903
3040
|
];
|
|
2904
3041
|
"discriminator": [
|
|
2905
3042
|
14,
|
|
@@ -2917,78 +3054,6 @@ type Cypher = {
|
|
|
2917
3054
|
"writable": true;
|
|
2918
3055
|
"signer": true;
|
|
2919
3056
|
},
|
|
2920
|
-
{
|
|
2921
|
-
"name": "signPdaAccount";
|
|
2922
|
-
"writable": true;
|
|
2923
|
-
"pda": {
|
|
2924
|
-
"seeds": [
|
|
2925
|
-
{
|
|
2926
|
-
"kind": "const";
|
|
2927
|
-
"value": [
|
|
2928
|
-
65,
|
|
2929
|
-
114,
|
|
2930
|
-
99,
|
|
2931
|
-
105,
|
|
2932
|
-
117,
|
|
2933
|
-
109,
|
|
2934
|
-
83,
|
|
2935
|
-
105,
|
|
2936
|
-
103,
|
|
2937
|
-
110,
|
|
2938
|
-
101,
|
|
2939
|
-
114,
|
|
2940
|
-
65,
|
|
2941
|
-
99,
|
|
2942
|
-
99,
|
|
2943
|
-
111,
|
|
2944
|
-
117,
|
|
2945
|
-
110,
|
|
2946
|
-
116
|
|
2947
|
-
];
|
|
2948
|
-
}
|
|
2949
|
-
];
|
|
2950
|
-
};
|
|
2951
|
-
},
|
|
2952
|
-
{
|
|
2953
|
-
"name": "mxeAccount";
|
|
2954
|
-
},
|
|
2955
|
-
{
|
|
2956
|
-
"name": "mempoolAccount";
|
|
2957
|
-
"writable": true;
|
|
2958
|
-
},
|
|
2959
|
-
{
|
|
2960
|
-
"name": "executingPool";
|
|
2961
|
-
"writable": true;
|
|
2962
|
-
},
|
|
2963
|
-
{
|
|
2964
|
-
"name": "computationAccount";
|
|
2965
|
-
"writable": true;
|
|
2966
|
-
},
|
|
2967
|
-
{
|
|
2968
|
-
"name": "compDefAccount";
|
|
2969
|
-
},
|
|
2970
|
-
{
|
|
2971
|
-
"name": "clusterAccount";
|
|
2972
|
-
"writable": true;
|
|
2973
|
-
},
|
|
2974
|
-
{
|
|
2975
|
-
"name": "poolAccount";
|
|
2976
|
-
"writable": true;
|
|
2977
|
-
"address": "G2sRWJvi3xoyh5k2gY49eG9L8YhAEWQPtNb1zb1GXTtC";
|
|
2978
|
-
},
|
|
2979
|
-
{
|
|
2980
|
-
"name": "clockAccount";
|
|
2981
|
-
"writable": true;
|
|
2982
|
-
"address": "7EbMUTLo5DjdzbN7s8BXeZwXzEwNQb1hScfRvWg8a6ot";
|
|
2983
|
-
},
|
|
2984
|
-
{
|
|
2985
|
-
"name": "systemProgram";
|
|
2986
|
-
"address": "11111111111111111111111111111111";
|
|
2987
|
-
},
|
|
2988
|
-
{
|
|
2989
|
-
"name": "arciumProgram";
|
|
2990
|
-
"address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
2991
|
-
},
|
|
2992
3057
|
{
|
|
2993
3058
|
"name": "user";
|
|
2994
3059
|
"signer": true;
|
|
@@ -3109,13 +3174,13 @@ type Cypher = {
|
|
|
3109
3174
|
},
|
|
3110
3175
|
{
|
|
3111
3176
|
"name": "tokenProgram";
|
|
3177
|
+
},
|
|
3178
|
+
{
|
|
3179
|
+
"name": "systemProgram";
|
|
3180
|
+
"address": "11111111111111111111111111111111";
|
|
3112
3181
|
}
|
|
3113
3182
|
];
|
|
3114
3183
|
"args": [
|
|
3115
|
-
{
|
|
3116
|
-
"name": "computationOffset";
|
|
3117
|
-
"type": "u64";
|
|
3118
|
-
},
|
|
3119
3184
|
{
|
|
3120
3185
|
"name": "betAmountUsdc";
|
|
3121
3186
|
"type": "u64";
|
|
@@ -3243,34 +3308,6 @@ type Cypher = {
|
|
|
3243
3308
|
{
|
|
3244
3309
|
"name": "signPdaAccount";
|
|
3245
3310
|
"writable": true;
|
|
3246
|
-
"pda": {
|
|
3247
|
-
"seeds": [
|
|
3248
|
-
{
|
|
3249
|
-
"kind": "const";
|
|
3250
|
-
"value": [
|
|
3251
|
-
65,
|
|
3252
|
-
114,
|
|
3253
|
-
99,
|
|
3254
|
-
105,
|
|
3255
|
-
117,
|
|
3256
|
-
109,
|
|
3257
|
-
83,
|
|
3258
|
-
105,
|
|
3259
|
-
103,
|
|
3260
|
-
110,
|
|
3261
|
-
101,
|
|
3262
|
-
114,
|
|
3263
|
-
65,
|
|
3264
|
-
99,
|
|
3265
|
-
99,
|
|
3266
|
-
111,
|
|
3267
|
-
117,
|
|
3268
|
-
110,
|
|
3269
|
-
116
|
|
3270
|
-
];
|
|
3271
|
-
}
|
|
3272
|
-
];
|
|
3273
|
-
};
|
|
3274
3311
|
},
|
|
3275
3312
|
{
|
|
3276
3313
|
"name": "mxeAccount";
|
|
@@ -3376,34 +3413,6 @@ type Cypher = {
|
|
|
3376
3413
|
{
|
|
3377
3414
|
"name": "signPdaAccount";
|
|
3378
3415
|
"writable": true;
|
|
3379
|
-
"pda": {
|
|
3380
|
-
"seeds": [
|
|
3381
|
-
{
|
|
3382
|
-
"kind": "const";
|
|
3383
|
-
"value": [
|
|
3384
|
-
65,
|
|
3385
|
-
114,
|
|
3386
|
-
99,
|
|
3387
|
-
105,
|
|
3388
|
-
117,
|
|
3389
|
-
109,
|
|
3390
|
-
83,
|
|
3391
|
-
105,
|
|
3392
|
-
103,
|
|
3393
|
-
110,
|
|
3394
|
-
101,
|
|
3395
|
-
114,
|
|
3396
|
-
65,
|
|
3397
|
-
99,
|
|
3398
|
-
99,
|
|
3399
|
-
111,
|
|
3400
|
-
117,
|
|
3401
|
-
110,
|
|
3402
|
-
116
|
|
3403
|
-
];
|
|
3404
|
-
}
|
|
3405
|
-
];
|
|
3406
|
-
};
|
|
3407
3416
|
},
|
|
3408
3417
|
{
|
|
3409
3418
|
"name": "mxeAccount";
|
|
@@ -3568,44 +3577,304 @@ type Cypher = {
|
|
|
3568
3577
|
"address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
3569
3578
|
},
|
|
3570
3579
|
{
|
|
3571
|
-
"name": "compDefAccount";
|
|
3580
|
+
"name": "compDefAccount";
|
|
3581
|
+
},
|
|
3582
|
+
{
|
|
3583
|
+
"name": "mxeAccount";
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"name": "computationAccount";
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
"name": "clusterAccount";
|
|
3590
|
+
},
|
|
3591
|
+
{
|
|
3592
|
+
"name": "instructionsSysvar";
|
|
3593
|
+
"address": "Sysvar1nstructions1111111111111111111111111";
|
|
3594
|
+
},
|
|
3595
|
+
{
|
|
3596
|
+
"name": "market";
|
|
3597
|
+
"writable": true;
|
|
3598
|
+
}
|
|
3599
|
+
];
|
|
3600
|
+
"args": [
|
|
3601
|
+
{
|
|
3602
|
+
"name": "output";
|
|
3603
|
+
"type": {
|
|
3604
|
+
"defined": {
|
|
3605
|
+
"name": "signedComputationOutputs";
|
|
3606
|
+
"generics": [
|
|
3607
|
+
{
|
|
3608
|
+
"kind": "type";
|
|
3609
|
+
"type": {
|
|
3610
|
+
"defined": {
|
|
3611
|
+
"name": "revealMarketOutcomeYesnoOutput";
|
|
3612
|
+
};
|
|
3613
|
+
};
|
|
3614
|
+
}
|
|
3615
|
+
];
|
|
3616
|
+
};
|
|
3617
|
+
};
|
|
3618
|
+
}
|
|
3619
|
+
];
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
"name": "submitBetMulti";
|
|
3623
|
+
"docs": [
|
|
3624
|
+
"Step 2 of 2: queue the Arcium MPC computation for a Multi-Outcome bet.",
|
|
3625
|
+
"Must be called in the same transaction as place_private_bet_multi."
|
|
3626
|
+
];
|
|
3627
|
+
"discriminator": [
|
|
3628
|
+
129,
|
|
3629
|
+
124,
|
|
3630
|
+
42,
|
|
3631
|
+
142,
|
|
3632
|
+
109,
|
|
3633
|
+
160,
|
|
3634
|
+
234,
|
|
3635
|
+
222
|
|
3636
|
+
];
|
|
3637
|
+
"accounts": [
|
|
3638
|
+
{
|
|
3639
|
+
"name": "payer";
|
|
3640
|
+
"writable": true;
|
|
3641
|
+
"signer": true;
|
|
3642
|
+
},
|
|
3643
|
+
{
|
|
3644
|
+
"name": "signPdaAccount";
|
|
3645
|
+
"writable": true;
|
|
3646
|
+
},
|
|
3647
|
+
{
|
|
3648
|
+
"name": "mxeAccount";
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
"name": "mempoolAccount";
|
|
3652
|
+
"writable": true;
|
|
3653
|
+
},
|
|
3654
|
+
{
|
|
3655
|
+
"name": "executingPool";
|
|
3656
|
+
"writable": true;
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
"name": "computationAccount";
|
|
3660
|
+
"writable": true;
|
|
3661
|
+
},
|
|
3662
|
+
{
|
|
3663
|
+
"name": "compDefAccount";
|
|
3664
|
+
},
|
|
3665
|
+
{
|
|
3666
|
+
"name": "clusterAccount";
|
|
3667
|
+
"writable": true;
|
|
3668
|
+
},
|
|
3669
|
+
{
|
|
3670
|
+
"name": "poolAccount";
|
|
3671
|
+
"writable": true;
|
|
3672
|
+
"address": "G2sRWJvi3xoyh5k2gY49eG9L8YhAEWQPtNb1zb1GXTtC";
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"name": "clockAccount";
|
|
3676
|
+
"writable": true;
|
|
3677
|
+
"address": "7EbMUTLo5DjdzbN7s8BXeZwXzEwNQb1hScfRvWg8a6ot";
|
|
3678
|
+
},
|
|
3679
|
+
{
|
|
3680
|
+
"name": "systemProgram";
|
|
3681
|
+
"address": "11111111111111111111111111111111";
|
|
3682
|
+
},
|
|
3683
|
+
{
|
|
3684
|
+
"name": "arciumProgram";
|
|
3685
|
+
"address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
3686
|
+
},
|
|
3687
|
+
{
|
|
3688
|
+
"name": "user";
|
|
3689
|
+
"signer": true;
|
|
3690
|
+
},
|
|
3691
|
+
{
|
|
3692
|
+
"name": "market";
|
|
3693
|
+
"pda": {
|
|
3694
|
+
"seeds": [
|
|
3695
|
+
{
|
|
3696
|
+
"kind": "const";
|
|
3697
|
+
"value": [
|
|
3698
|
+
109,
|
|
3699
|
+
97,
|
|
3700
|
+
114,
|
|
3701
|
+
107,
|
|
3702
|
+
101,
|
|
3703
|
+
116
|
|
3704
|
+
];
|
|
3705
|
+
},
|
|
3706
|
+
{
|
|
3707
|
+
"kind": "account";
|
|
3708
|
+
"path": "market.market_id";
|
|
3709
|
+
"account": "market";
|
|
3710
|
+
}
|
|
3711
|
+
];
|
|
3712
|
+
};
|
|
3713
|
+
},
|
|
3714
|
+
{
|
|
3715
|
+
"name": "position";
|
|
3716
|
+
"writable": true;
|
|
3717
|
+
"pda": {
|
|
3718
|
+
"seeds": [
|
|
3719
|
+
{
|
|
3720
|
+
"kind": "const";
|
|
3721
|
+
"value": [
|
|
3722
|
+
112,
|
|
3723
|
+
111,
|
|
3724
|
+
115,
|
|
3725
|
+
105,
|
|
3726
|
+
116,
|
|
3727
|
+
105,
|
|
3728
|
+
111,
|
|
3729
|
+
110
|
|
3730
|
+
];
|
|
3731
|
+
},
|
|
3732
|
+
{
|
|
3733
|
+
"kind": "account";
|
|
3734
|
+
"path": "market";
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"kind": "account";
|
|
3738
|
+
"path": "user";
|
|
3739
|
+
}
|
|
3740
|
+
];
|
|
3741
|
+
};
|
|
3742
|
+
}
|
|
3743
|
+
];
|
|
3744
|
+
"args": [
|
|
3745
|
+
{
|
|
3746
|
+
"name": "computationOffset";
|
|
3747
|
+
"type": "u64";
|
|
3748
|
+
}
|
|
3749
|
+
];
|
|
3750
|
+
},
|
|
3751
|
+
{
|
|
3752
|
+
"name": "submitBetYesno";
|
|
3753
|
+
"docs": [
|
|
3754
|
+
"Step 2 of 2: queue the Arcium MPC computation for a YesNo bet.",
|
|
3755
|
+
"Must be called in the same transaction as place_private_bet_yesno."
|
|
3756
|
+
];
|
|
3757
|
+
"discriminator": [
|
|
3758
|
+
93,
|
|
3759
|
+
47,
|
|
3760
|
+
148,
|
|
3761
|
+
213,
|
|
3762
|
+
120,
|
|
3763
|
+
184,
|
|
3764
|
+
242,
|
|
3765
|
+
105
|
|
3766
|
+
];
|
|
3767
|
+
"accounts": [
|
|
3768
|
+
{
|
|
3769
|
+
"name": "payer";
|
|
3770
|
+
"writable": true;
|
|
3771
|
+
"signer": true;
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
"name": "signPdaAccount";
|
|
3775
|
+
"writable": true;
|
|
3572
3776
|
},
|
|
3573
3777
|
{
|
|
3574
3778
|
"name": "mxeAccount";
|
|
3575
3779
|
},
|
|
3780
|
+
{
|
|
3781
|
+
"name": "mempoolAccount";
|
|
3782
|
+
"writable": true;
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
"name": "executingPool";
|
|
3786
|
+
"writable": true;
|
|
3787
|
+
},
|
|
3576
3788
|
{
|
|
3577
3789
|
"name": "computationAccount";
|
|
3790
|
+
"writable": true;
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "compDefAccount";
|
|
3578
3794
|
},
|
|
3579
3795
|
{
|
|
3580
3796
|
"name": "clusterAccount";
|
|
3797
|
+
"writable": true;
|
|
3581
3798
|
},
|
|
3582
3799
|
{
|
|
3583
|
-
"name": "
|
|
3584
|
-
"
|
|
3800
|
+
"name": "poolAccount";
|
|
3801
|
+
"writable": true;
|
|
3802
|
+
"address": "G2sRWJvi3xoyh5k2gY49eG9L8YhAEWQPtNb1zb1GXTtC";
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
"name": "clockAccount";
|
|
3806
|
+
"writable": true;
|
|
3807
|
+
"address": "7EbMUTLo5DjdzbN7s8BXeZwXzEwNQb1hScfRvWg8a6ot";
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
"name": "systemProgram";
|
|
3811
|
+
"address": "11111111111111111111111111111111";
|
|
3812
|
+
},
|
|
3813
|
+
{
|
|
3814
|
+
"name": "arciumProgram";
|
|
3815
|
+
"address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
3816
|
+
},
|
|
3817
|
+
{
|
|
3818
|
+
"name": "user";
|
|
3819
|
+
"signer": true;
|
|
3585
3820
|
},
|
|
3586
3821
|
{
|
|
3587
3822
|
"name": "market";
|
|
3823
|
+
"pda": {
|
|
3824
|
+
"seeds": [
|
|
3825
|
+
{
|
|
3826
|
+
"kind": "const";
|
|
3827
|
+
"value": [
|
|
3828
|
+
109,
|
|
3829
|
+
97,
|
|
3830
|
+
114,
|
|
3831
|
+
107,
|
|
3832
|
+
101,
|
|
3833
|
+
116
|
|
3834
|
+
];
|
|
3835
|
+
},
|
|
3836
|
+
{
|
|
3837
|
+
"kind": "account";
|
|
3838
|
+
"path": "market.market_id";
|
|
3839
|
+
"account": "market";
|
|
3840
|
+
}
|
|
3841
|
+
];
|
|
3842
|
+
};
|
|
3843
|
+
},
|
|
3844
|
+
{
|
|
3845
|
+
"name": "position";
|
|
3588
3846
|
"writable": true;
|
|
3847
|
+
"pda": {
|
|
3848
|
+
"seeds": [
|
|
3849
|
+
{
|
|
3850
|
+
"kind": "const";
|
|
3851
|
+
"value": [
|
|
3852
|
+
112,
|
|
3853
|
+
111,
|
|
3854
|
+
115,
|
|
3855
|
+
105,
|
|
3856
|
+
116,
|
|
3857
|
+
105,
|
|
3858
|
+
111,
|
|
3859
|
+
110
|
|
3860
|
+
];
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
"kind": "account";
|
|
3864
|
+
"path": "market";
|
|
3865
|
+
},
|
|
3866
|
+
{
|
|
3867
|
+
"kind": "account";
|
|
3868
|
+
"path": "user";
|
|
3869
|
+
}
|
|
3870
|
+
];
|
|
3871
|
+
};
|
|
3589
3872
|
}
|
|
3590
3873
|
];
|
|
3591
3874
|
"args": [
|
|
3592
3875
|
{
|
|
3593
|
-
"name": "
|
|
3594
|
-
"type":
|
|
3595
|
-
"defined": {
|
|
3596
|
-
"name": "signedComputationOutputs";
|
|
3597
|
-
"generics": [
|
|
3598
|
-
{
|
|
3599
|
-
"kind": "type";
|
|
3600
|
-
"type": {
|
|
3601
|
-
"defined": {
|
|
3602
|
-
"name": "revealMarketOutcomeYesnoOutput";
|
|
3603
|
-
};
|
|
3604
|
-
};
|
|
3605
|
-
}
|
|
3606
|
-
];
|
|
3607
|
-
};
|
|
3608
|
-
};
|
|
3876
|
+
"name": "computationOffset";
|
|
3877
|
+
"type": "u64";
|
|
3609
3878
|
}
|
|
3610
3879
|
];
|
|
3611
3880
|
},
|
|
@@ -3660,10 +3929,12 @@ type Cypher = {
|
|
|
3660
3929
|
},
|
|
3661
3930
|
{
|
|
3662
3931
|
"name": "newMint";
|
|
3663
|
-
"address": "8AF9BABNWwEhipRxtXPYoWSZW24SKjUn6YqbKd9ZqhwB";
|
|
3664
3932
|
},
|
|
3665
3933
|
{
|
|
3666
3934
|
"name": "newTreasury";
|
|
3935
|
+
},
|
|
3936
|
+
{
|
|
3937
|
+
"name": "tokenProgram";
|
|
3667
3938
|
}
|
|
3668
3939
|
];
|
|
3669
3940
|
"args": [];
|
|
@@ -3745,6 +4016,30 @@ type Cypher = {
|
|
|
3745
4016
|
];
|
|
3746
4017
|
};
|
|
3747
4018
|
},
|
|
4019
|
+
{
|
|
4020
|
+
"name": "globalState";
|
|
4021
|
+
"pda": {
|
|
4022
|
+
"seeds": [
|
|
4023
|
+
{
|
|
4024
|
+
"kind": "const";
|
|
4025
|
+
"value": [
|
|
4026
|
+
103,
|
|
4027
|
+
108,
|
|
4028
|
+
111,
|
|
4029
|
+
98,
|
|
4030
|
+
97,
|
|
4031
|
+
108,
|
|
4032
|
+
95,
|
|
4033
|
+
115,
|
|
4034
|
+
116,
|
|
4035
|
+
97,
|
|
4036
|
+
116,
|
|
4037
|
+
101
|
|
4038
|
+
];
|
|
4039
|
+
}
|
|
4040
|
+
];
|
|
4041
|
+
};
|
|
4042
|
+
},
|
|
3748
4043
|
{
|
|
3749
4044
|
"name": "marketVault";
|
|
3750
4045
|
"writable": true;
|
|
@@ -3850,6 +4145,19 @@ type Cypher = {
|
|
|
3850
4145
|
198,
|
|
3851
4146
|
154
|
|
3852
4147
|
];
|
|
4148
|
+
},
|
|
4149
|
+
{
|
|
4150
|
+
"name": "marketQuestion";
|
|
4151
|
+
"discriminator": [
|
|
4152
|
+
219,
|
|
4153
|
+
157,
|
|
4154
|
+
242,
|
|
4155
|
+
187,
|
|
4156
|
+
242,
|
|
4157
|
+
173,
|
|
4158
|
+
54,
|
|
4159
|
+
128
|
|
4160
|
+
];
|
|
3853
4161
|
}
|
|
3854
4162
|
];
|
|
3855
4163
|
"events": [
|
|
@@ -4127,78 +4435,88 @@ type Cypher = {
|
|
|
4127
4435
|
},
|
|
4128
4436
|
{
|
|
4129
4437
|
"code": 6028;
|
|
4438
|
+
"name": "computationAlreadyQueued";
|
|
4439
|
+
"msg": "Computation already queued for this position";
|
|
4440
|
+
},
|
|
4441
|
+
{
|
|
4442
|
+
"code": 6029;
|
|
4130
4443
|
"name": "abortedComputation";
|
|
4131
4444
|
"msg": "MPC computation was aborted";
|
|
4132
4445
|
},
|
|
4133
4446
|
{
|
|
4134
|
-
"code":
|
|
4447
|
+
"code": 6030;
|
|
4135
4448
|
"name": "computationVerificationFailed";
|
|
4136
4449
|
"msg": "Computation output verification failed";
|
|
4137
4450
|
},
|
|
4138
4451
|
{
|
|
4139
|
-
"code":
|
|
4452
|
+
"code": 6031;
|
|
4140
4453
|
"name": "cannotWithdrawFromUnresolved";
|
|
4141
4454
|
"msg": "Cannot withdraw from unresolved market — bond forfeited";
|
|
4142
4455
|
},
|
|
4143
4456
|
{
|
|
4144
|
-
"code":
|
|
4457
|
+
"code": 6032;
|
|
4145
4458
|
"name": "adminAlreadyClaimed";
|
|
4146
4459
|
"msg": "Admin already claimed remaining funds";
|
|
4147
4460
|
},
|
|
4148
4461
|
{
|
|
4149
|
-
"code":
|
|
4462
|
+
"code": 6033;
|
|
4150
4463
|
"name": "wrongMarketType";
|
|
4151
4464
|
"msg": "Wrong market type for this instruction";
|
|
4152
4465
|
},
|
|
4153
4466
|
{
|
|
4154
|
-
"code":
|
|
4467
|
+
"code": 6034;
|
|
4155
4468
|
"name": "wrongMint";
|
|
4156
4469
|
"msg": "Mint does not match accepted mint";
|
|
4157
4470
|
},
|
|
4158
4471
|
{
|
|
4159
|
-
"code":
|
|
4472
|
+
"code": 6035;
|
|
4160
4473
|
"name": "notAcceptedMint";
|
|
4161
4474
|
"msg": "Mint is not the protocol-accepted mint for this cluster";
|
|
4162
4475
|
},
|
|
4163
4476
|
{
|
|
4164
|
-
"code":
|
|
4477
|
+
"code": 6036;
|
|
4165
4478
|
"name": "invalidCategory";
|
|
4166
4479
|
"msg": "Invalid category — must be 0-6";
|
|
4167
4480
|
},
|
|
4168
4481
|
{
|
|
4169
|
-
"code":
|
|
4482
|
+
"code": 6037;
|
|
4170
4483
|
"name": "invalidChallengePeriod";
|
|
4171
4484
|
"msg": "Challenge period must be between 24 and 48 hours";
|
|
4172
4485
|
},
|
|
4173
4486
|
{
|
|
4174
|
-
"code":
|
|
4487
|
+
"code": 6038;
|
|
4175
4488
|
"name": "bondTooSmall";
|
|
4176
4489
|
"msg": "Creator bond is below the protocol minimum";
|
|
4177
4490
|
},
|
|
4178
4491
|
{
|
|
4179
|
-
"code":
|
|
4492
|
+
"code": 6039;
|
|
4180
4493
|
"name": "notPendingResolution";
|
|
4181
4494
|
"msg": "Market is not pending resolution";
|
|
4182
4495
|
},
|
|
4183
4496
|
{
|
|
4184
|
-
"code":
|
|
4497
|
+
"code": 6040;
|
|
4185
4498
|
"name": "challengePeriodNotElapsed";
|
|
4186
4499
|
"msg": "Challenge period has not elapsed yet";
|
|
4187
4500
|
},
|
|
4188
4501
|
{
|
|
4189
|
-
"code":
|
|
4502
|
+
"code": 6041;
|
|
4190
4503
|
"name": "challengePeriodElapsed";
|
|
4191
4504
|
"msg": "Challenge period has already elapsed";
|
|
4192
4505
|
},
|
|
4193
4506
|
{
|
|
4194
|
-
"code":
|
|
4507
|
+
"code": 6042;
|
|
4195
4508
|
"name": "marketDisputed";
|
|
4196
4509
|
"msg": "Market resolution is disputed — admin must override";
|
|
4197
4510
|
},
|
|
4198
4511
|
{
|
|
4199
|
-
"code":
|
|
4512
|
+
"code": 6043;
|
|
4200
4513
|
"name": "marketNotDisputed";
|
|
4201
4514
|
"msg": "Market resolution is not disputed";
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
"code": 6044;
|
|
4518
|
+
"name": "unauthorizedUser";
|
|
4519
|
+
"msg": "User does not match position owner";
|
|
4202
4520
|
}
|
|
4203
4521
|
];
|
|
4204
4522
|
"types": [
|
|
@@ -4783,6 +5101,13 @@ type Cypher = {
|
|
|
4783
5101
|
"name": "claimed";
|
|
4784
5102
|
"type": "bool";
|
|
4785
5103
|
},
|
|
5104
|
+
{
|
|
5105
|
+
"name": "computationQueued";
|
|
5106
|
+
"docs": [
|
|
5107
|
+
"Set to true by submit_bet_* to prevent double-queuing the computation."
|
|
5108
|
+
];
|
|
5109
|
+
"type": "bool";
|
|
5110
|
+
},
|
|
4786
5111
|
{
|
|
4787
5112
|
"name": "bump";
|
|
4788
5113
|
"type": "u8";
|
|
@@ -5019,19 +5344,6 @@ type Cypher = {
|
|
|
5019
5344
|
"name": "marketId";
|
|
5020
5345
|
"type": "u64";
|
|
5021
5346
|
},
|
|
5022
|
-
{
|
|
5023
|
-
"name": "question";
|
|
5024
|
-
"type": {
|
|
5025
|
-
"array": [
|
|
5026
|
-
"u8",
|
|
5027
|
-
200
|
|
5028
|
-
];
|
|
5029
|
-
};
|
|
5030
|
-
},
|
|
5031
|
-
{
|
|
5032
|
-
"name": "questionLen";
|
|
5033
|
-
"type": "u8";
|
|
5034
|
-
},
|
|
5035
5347
|
{
|
|
5036
5348
|
"name": "marketType";
|
|
5037
5349
|
"docs": [
|
|
@@ -5305,6 +5617,36 @@ type Cypher = {
|
|
|
5305
5617
|
];
|
|
5306
5618
|
};
|
|
5307
5619
|
},
|
|
5620
|
+
{
|
|
5621
|
+
"name": "marketQuestion";
|
|
5622
|
+
"docs": [
|
|
5623
|
+
"Question text for a market — split out of Market to free 201 bytes from",
|
|
5624
|
+
"every instruction that loads Market (bet, resolve, payout, refund, etc.).",
|
|
5625
|
+
"Seeds: [\"market_question\", market.key()]"
|
|
5626
|
+
];
|
|
5627
|
+
"type": {
|
|
5628
|
+
"kind": "struct";
|
|
5629
|
+
"fields": [
|
|
5630
|
+
{
|
|
5631
|
+
"name": "question";
|
|
5632
|
+
"type": {
|
|
5633
|
+
"array": [
|
|
5634
|
+
"u8",
|
|
5635
|
+
200
|
|
5636
|
+
];
|
|
5637
|
+
};
|
|
5638
|
+
},
|
|
5639
|
+
{
|
|
5640
|
+
"name": "questionLen";
|
|
5641
|
+
"type": "u8";
|
|
5642
|
+
},
|
|
5643
|
+
{
|
|
5644
|
+
"name": "bump";
|
|
5645
|
+
"type": "u8";
|
|
5646
|
+
}
|
|
5647
|
+
];
|
|
5648
|
+
};
|
|
5649
|
+
},
|
|
5308
5650
|
{
|
|
5309
5651
|
"name": "marketResolvedEvent";
|
|
5310
5652
|
"type": {
|
|
@@ -6029,13 +6371,12 @@ declare function fetchGlobalState(client: CypherClient): Promise<GlobalStateAcco
|
|
|
6029
6371
|
|
|
6030
6372
|
/**
|
|
6031
6373
|
* Decoded `Market` account. Encrypted-pool ciphertexts stay as raw
|
|
6032
|
-
* `Uint8Array` (32 bytes each)
|
|
6033
|
-
*
|
|
6374
|
+
* `Uint8Array` (32 bytes each). The question text lives in the separate
|
|
6375
|
+
* `MarketQuestion` PDA — use `fetchMarketQuestion(client, marketPda)` to
|
|
6376
|
+
* retrieve it.
|
|
6034
6377
|
*/
|
|
6035
6378
|
interface MarketAccount {
|
|
6036
6379
|
marketId: bigint;
|
|
6037
|
-
question: string;
|
|
6038
|
-
questionLen: number;
|
|
6039
6380
|
marketType: number;
|
|
6040
6381
|
numOutcomes: number;
|
|
6041
6382
|
category: number;
|
|
@@ -6068,19 +6409,15 @@ interface MarketAccount {
|
|
|
6068
6409
|
resolutionDeadline: bigint;
|
|
6069
6410
|
claimDeadline: bigint;
|
|
6070
6411
|
refundDeadline: bigint;
|
|
6071
|
-
/** Configurable dispute window (24–48h), set at create time. (v0.2+) */
|
|
6072
6412
|
challengePeriod: bigint;
|
|
6073
|
-
/** `resolution_time + challenge_period` — set by the reveal callback. (v0.2+) */
|
|
6074
6413
|
challengeDeadline: bigint;
|
|
6075
|
-
/** Set true by `flag_resolution`; blocks `finalize_resolution`. (v0.2+) */
|
|
6076
6414
|
disputed: boolean;
|
|
6077
6415
|
bump: number;
|
|
6078
6416
|
vaultBump: number;
|
|
6079
6417
|
}
|
|
6080
6418
|
/**
|
|
6081
6419
|
* Fetch a single market by id or by PDA. Returns `null` if the account
|
|
6082
|
-
* doesn't exist
|
|
6083
|
-
* "does this exist?" check.
|
|
6420
|
+
* doesn't exist.
|
|
6084
6421
|
*/
|
|
6085
6422
|
declare function fetchMarket(client: CypherClient, idOrPda: bigint | number | PublicKey): Promise<MarketAccount | null>;
|
|
6086
6423
|
/** Fetch every market on the program. Expensive — prefer filtered variants. */
|
|
@@ -6116,6 +6453,8 @@ interface EncryptedPositionAccount {
|
|
|
6116
6453
|
/** Plaintext net stake after on-chain fees — checked by circuit. */
|
|
6117
6454
|
netAmount: bigint;
|
|
6118
6455
|
claimed: boolean;
|
|
6456
|
+
/** Set to true by `submit_bet_*` to prevent double-queuing the computation. */
|
|
6457
|
+
computationQueued: boolean;
|
|
6119
6458
|
bump: number;
|
|
6120
6459
|
}
|
|
6121
6460
|
/** Fetch a single `EncryptedPosition` by `(market, user)`. */
|
|
@@ -6153,6 +6492,27 @@ declare function fetchLpPositionsByProvider(client: CypherClient, provider: Publ
|
|
|
6153
6492
|
account: LpPositionAccount;
|
|
6154
6493
|
}>>;
|
|
6155
6494
|
|
|
6495
|
+
/** Decoded `MarketQuestion` account — holds the UTF-8 question for a market. */
|
|
6496
|
+
interface MarketQuestionAccount {
|
|
6497
|
+
/** UTF-8 question string, trimmed to `questionLen` bytes. */
|
|
6498
|
+
question: string;
|
|
6499
|
+
questionLen: number;
|
|
6500
|
+
bump: number;
|
|
6501
|
+
}
|
|
6502
|
+
/**
|
|
6503
|
+
* Fetch the `MarketQuestion` PDA for a given market PDA. Returns `null` if
|
|
6504
|
+
* not found (e.g., market pre-dates question extraction).
|
|
6505
|
+
*/
|
|
6506
|
+
declare function fetchMarketQuestion(client: CypherClient, market: PublicKey): Promise<MarketQuestionAccount | null>;
|
|
6507
|
+
/**
|
|
6508
|
+
* Batch-fetch question text for many market PDAs in one `getMultipleAccountsInfo`
|
|
6509
|
+
* call. Returns a map from market PDA (base58) → question string. Missing or
|
|
6510
|
+
* malformed accounts are omitted from the map (callers should default to "").
|
|
6511
|
+
*/
|
|
6512
|
+
declare function fetchMarketQuestions(client: CypherClient, markets: Array<{
|
|
6513
|
+
publicKey: PublicKey;
|
|
6514
|
+
}>): Promise<Map<string, string>>;
|
|
6515
|
+
|
|
6156
6516
|
/** Arguments accepted by `initialize`. */
|
|
6157
6517
|
interface InitializeParams {
|
|
6158
6518
|
/** Protocol fee in basis points (max 100 = 1%). */
|
|
@@ -6337,9 +6697,15 @@ interface WithdrawCreatorFundsParams {
|
|
|
6337
6697
|
/** `withdraw_creator_funds` — creator pulls bond + accumulated LP fees after resolve. */
|
|
6338
6698
|
declare function withdrawCreatorFundsIx(client: CypherClient, params: WithdrawCreatorFundsParams): Promise<TransactionInstruction>;
|
|
6339
6699
|
|
|
6340
|
-
/**
|
|
6700
|
+
/**
|
|
6701
|
+
* Arguments for step 1 of bet placement: deposit funds and initialise the
|
|
6702
|
+
* position PDA. Does NOT include `computationOffset` or arcium accounts —
|
|
6703
|
+
* those belong to `SubmitBetParams` (step 2).
|
|
6704
|
+
*
|
|
6705
|
+
* Both instructions MUST be submitted in the same transaction.
|
|
6706
|
+
*/
|
|
6341
6707
|
interface PlacePrivateBetParams {
|
|
6342
|
-
/** Tx payer + signer; usually the user.
|
|
6708
|
+
/** Tx payer + signer; usually the user. */
|
|
6343
6709
|
payer: PublicKey;
|
|
6344
6710
|
/** The user placing the bet (signer; the position is keyed by this pubkey). */
|
|
6345
6711
|
user: PublicKey;
|
|
@@ -6349,8 +6715,6 @@ interface PlacePrivateBetParams {
|
|
|
6349
6715
|
acceptedMint: PublicKey;
|
|
6350
6716
|
/** Protocol treasury SPL token account — from `GlobalState.protocol_treasury`. */
|
|
6351
6717
|
protocolTreasury: PublicKey;
|
|
6352
|
-
/** Random `u64` per request — use `randomComputationOffset()`. */
|
|
6353
|
-
computationOffset: bigint | number;
|
|
6354
6718
|
/** Gross bet amount (micro-USDC). On-chain net is computed via fee math. */
|
|
6355
6719
|
betAmountUsdc: bigint | number;
|
|
6356
6720
|
/** 32-byte ciphertext of net amount (from `encryptBetInput`). */
|
|
@@ -6361,13 +6725,42 @@ interface PlacePrivateBetParams {
|
|
|
6361
6725
|
userX25519Pubkey: Uint8Array;
|
|
6362
6726
|
/** u128 nonce that produced the two ciphertexts. */
|
|
6363
6727
|
nonce: bigint;
|
|
6364
|
-
/** Address lookup table for the MXE (pass `fetchMxeLookupTable(client).lut`). */
|
|
6365
|
-
addressLookupTable: PublicKey;
|
|
6366
6728
|
}
|
|
6367
|
-
/** `place_private_bet_yesno` —
|
|
6729
|
+
/** Step 1 of 2: `place_private_bet_yesno` — deposit and create position. */
|
|
6368
6730
|
declare function placePrivateBetYesnoIx(client: CypherClient, params: PlacePrivateBetParams): Promise<TransactionInstruction>;
|
|
6369
|
-
/** `place_private_bet_multi` —
|
|
6731
|
+
/** Step 1 of 2: `place_private_bet_multi` — deposit and create position. */
|
|
6370
6732
|
declare function placePrivateBetMultiIx(client: CypherClient, params: PlacePrivateBetParams): Promise<TransactionInstruction>;
|
|
6733
|
+
/**
|
|
6734
|
+
* Arguments for step 2 of bet placement: queue the Arcium MPC computation.
|
|
6735
|
+
* Must be in the same transaction as the matching `placePrivateBet*Ix`.
|
|
6736
|
+
*/
|
|
6737
|
+
interface SubmitBetParams {
|
|
6738
|
+
/** Tx payer + signer. */
|
|
6739
|
+
payer: PublicKey;
|
|
6740
|
+
/** The user who placed the bet (signer). */
|
|
6741
|
+
user: PublicKey;
|
|
6742
|
+
/** Market id (used to derive the market PDA). */
|
|
6743
|
+
marketId: bigint | number;
|
|
6744
|
+
/** Random u64 per request — use `randomComputationOffset()`. */
|
|
6745
|
+
computationOffset: bigint | number;
|
|
6746
|
+
/** Address lookup table for the MXE. */
|
|
6747
|
+
addressLookupTable: PublicKey;
|
|
6748
|
+
}
|
|
6749
|
+
/** Step 2 of 2: `submit_bet_yesno` — queue MPC computation for a YesNo bet. */
|
|
6750
|
+
declare function submitBetYesnoIx(client: CypherClient, params: SubmitBetParams): Promise<TransactionInstruction>;
|
|
6751
|
+
/** Step 2 of 2: `submit_bet_multi` — queue MPC computation for a Multi-Outcome bet. */
|
|
6752
|
+
declare function submitBetMultiIx(client: CypherClient, params: SubmitBetParams): Promise<TransactionInstruction>;
|
|
6753
|
+
|
|
6754
|
+
interface InitSignPdaParams {
|
|
6755
|
+
/** Tx payer + signer. Run once per deployment. */
|
|
6756
|
+
payer: PublicKey;
|
|
6757
|
+
}
|
|
6758
|
+
/**
|
|
6759
|
+
* Create the singleton Arcium signer PDA (`b"ArciumSignerAccount"`).
|
|
6760
|
+
* Must be called once before any `queue_computation` instruction can run.
|
|
6761
|
+
* Admin-only in practice; permissionless on-chain.
|
|
6762
|
+
*/
|
|
6763
|
+
declare function initSignPdaIx(client: CypherClient, params: InitSignPdaParams): Promise<TransactionInstruction>;
|
|
6371
6764
|
|
|
6372
6765
|
/** Shared shape of `resolve_market_yesno` and `resolve_market_multi`. */
|
|
6373
6766
|
interface ResolveMarketParams {
|
|
@@ -6512,12 +6905,13 @@ interface SendIxOptions {
|
|
|
6512
6905
|
* Wrap a single instruction in a legacy `Transaction`, sign with the
|
|
6513
6906
|
* provider's wallet (plus any extra `signers`), and send via the Anchor
|
|
6514
6907
|
* provider. Returns the confirmed signature.
|
|
6515
|
-
*
|
|
6516
|
-
* Errors are reshaped through `parseCypherError` so the caller gets a
|
|
6517
|
-
* `ParsedCypherError` (when the program rejected the call) instead of
|
|
6518
|
-
* Anchor's nested error objects.
|
|
6519
6908
|
*/
|
|
6520
6909
|
declare function sendIx(client: CypherClient, ix: TransactionInstruction, opts?: SendIxOptions): Promise<string>;
|
|
6910
|
+
/**
|
|
6911
|
+
* Pack multiple instructions into a single `Transaction` and send. Use this
|
|
6912
|
+
* when instructions must be atomic (e.g., `place_private_bet_*` + `submit_bet_*`).
|
|
6913
|
+
*/
|
|
6914
|
+
declare function sendTx(client: CypherClient, ixs: TransactionInstruction[], opts?: SendIxOptions): Promise<string>;
|
|
6521
6915
|
/**
|
|
6522
6916
|
* Send an instruction that queues an Arcium computation, then block until
|
|
6523
6917
|
* the MPC nodes finalize the callback. Returns both the queue tx
|
|
@@ -6645,12 +7039,6 @@ interface PlaceBetInputs {
|
|
|
6645
7039
|
computationOffset?: bigint;
|
|
6646
7040
|
/** Override timeout for the Arcium finalization wait. */
|
|
6647
7041
|
timeoutMs?: number;
|
|
6648
|
-
/**
|
|
6649
|
-
* Optional fine-grained progress callback. Fires with stage events the
|
|
6650
|
-
* action passes through (validating → fetching-state → encrypting →
|
|
6651
|
-
* submitting → awaiting-callback → refetching → done). Use this to
|
|
6652
|
-
* drive multi-step UI ("Encrypting…", "Awaiting MPC nodes…", etc.).
|
|
6653
|
-
*/
|
|
6654
7042
|
onProgress?: ProgressCallback;
|
|
6655
7043
|
}
|
|
6656
7044
|
interface PlaceBetResult {
|
|
@@ -6659,31 +7047,24 @@ interface PlaceBetResult {
|
|
|
6659
7047
|
computationOffset: bigint;
|
|
6660
7048
|
/**
|
|
6661
7049
|
* The user's x25519 keypair. **The frontend MUST persist `privateKey`**
|
|
6662
|
-
*
|
|
6663
|
-
* later decrypt the position when claiming or displaying.
|
|
7050
|
+
* — it's the only way to later decrypt the position when claiming.
|
|
6664
7051
|
*/
|
|
6665
7052
|
userKeypair: UserCryptoKeypair;
|
|
6666
7053
|
/** Position PDA refetched after the callback updates entryOdds. */
|
|
6667
7054
|
position: EncryptedPositionAccount | null;
|
|
6668
7055
|
}
|
|
6669
7056
|
/**
|
|
6670
|
-
* End-to-end private bet:
|
|
7057
|
+
* End-to-end private bet (two-phase):
|
|
6671
7058
|
*
|
|
6672
7059
|
* 1. Validate market is `Active` and gross amount ≥ `min_bet`.
|
|
6673
7060
|
* 2. Compute fees → net amount; assert it stays positive.
|
|
6674
7061
|
* 3. Fetch the MXE public key (cached) and the MXE LUT (cached).
|
|
6675
7062
|
* 4. Generate (or accept) a user x25519 keypair.
|
|
6676
|
-
* 5. Encrypt `(netAmount, side)` with
|
|
6677
|
-
*
|
|
6678
|
-
*
|
|
6679
|
-
*
|
|
6680
|
-
*
|
|
6681
|
-
* 8. Refetch the position so the caller sees `entryOdds` + `netAmount`.
|
|
6682
|
-
*
|
|
6683
|
-
* The on-chain circuit will reject the queue if `encrypted_amount` does
|
|
6684
|
-
* not equal `bet_amount - protocol_fee - lp_fee` (audit finding H-1
|
|
6685
|
-
* defense). We compute the same value client-side and hard-fail if the
|
|
6686
|
-
* fee math gives a different result.
|
|
7063
|
+
* 5. Encrypt `(netAmount, side)` with a fresh nonce.
|
|
7064
|
+
* 6. Build `place_private_bet_*` (deposit ix) + `submit_bet_*` (MPC queue ix).
|
|
7065
|
+
* 7. Send **both instructions in a single transaction**.
|
|
7066
|
+
* 8. Await callback finalization.
|
|
7067
|
+
* 9. Refetch the position.
|
|
6687
7068
|
*/
|
|
6688
7069
|
declare function placeBetAction(client: CypherClient, inputs: PlaceBetInputs): Promise<PlaceBetResult>;
|
|
6689
7070
|
|
|
@@ -6944,6 +7325,10 @@ declare class CypherClient {
|
|
|
6944
7325
|
account: MarketAccount;
|
|
6945
7326
|
}>>;
|
|
6946
7327
|
};
|
|
7328
|
+
readonly marketQuestions: {
|
|
7329
|
+
/** Fetch the question text for a market PDA. */
|
|
7330
|
+
fetch: (market: PublicKey) => Promise<MarketQuestionAccount | null>;
|
|
7331
|
+
};
|
|
6947
7332
|
readonly positions: {
|
|
6948
7333
|
fetch: (market: PublicKey, user: PublicKey) => Promise<EncryptedPositionAccount | null>;
|
|
6949
7334
|
byUser: (user: PublicKey) => Promise<Array<{
|
|
@@ -7056,6 +7441,7 @@ declare class CypherClient {
|
|
|
7056
7441
|
initializeIx: (params: InitializeParams) => Promise<TransactionInstruction>;
|
|
7057
7442
|
updateAcceptedMintIx: (params: UpdateAcceptedMintParams) => Promise<TransactionInstruction>;
|
|
7058
7443
|
adminClaimRemainingIx: (params: AdminClaimRemainingParams) => Promise<TransactionInstruction>;
|
|
7444
|
+
initSignPdaIx: (params: InitSignPdaParams) => Promise<TransactionInstruction>;
|
|
7059
7445
|
};
|
|
7060
7446
|
readonly compDefs: {
|
|
7061
7447
|
initIx: (methodName: InitCompDefMethodName, params: InitCompDefParams) => Promise<TransactionInstruction>;
|
|
@@ -7070,6 +7456,8 @@ declare class CypherClient {
|
|
|
7070
7456
|
readonly bets: {
|
|
7071
7457
|
placeYesnoIx: (params: PlacePrivateBetParams) => Promise<TransactionInstruction>;
|
|
7072
7458
|
placeMultiIx: (params: PlacePrivateBetParams) => Promise<TransactionInstruction>;
|
|
7459
|
+
submitYesnoIx: (params: SubmitBetParams) => Promise<TransactionInstruction>;
|
|
7460
|
+
submitMultiIx: (params: SubmitBetParams) => Promise<TransactionInstruction>;
|
|
7073
7461
|
};
|
|
7074
7462
|
readonly resolveIx: {
|
|
7075
7463
|
yesnoIx: (params: ResolveMarketParams) => Promise<TransactionInstruction>;
|
|
@@ -7090,4 +7478,4 @@ declare class CypherClient {
|
|
|
7090
7478
|
constructor(opts: CypherClientOptions);
|
|
7091
7479
|
}
|
|
7092
7480
|
|
|
7093
|
-
export {
|
|
7481
|
+
export { KNOWN_MINTS as $, type AdminOverrideResolutionInputs as A, BPS_DENOMINATOR as B, CypherClient as C, type ComputationResult as D, type EncryptedPositionAccount as E, type FinalizeResolutionInputs as F, type GlobalStateAccount as G, type CreateMarketMultiParams as H, type CreatorWithdrawnEvent as I, type CypherClientOptions as J, type CypherEventName as K, DEFAULT_CLAIM_PERIOD_SECS as L, type MarketAccount as M, DEFAULT_REFUND_PERIOD_SECS as N, DEFAULT_RESOLUTION_WINDOW_SECS as O, type PlaceBetResult as P, type EventCallback as Q, type ResolutionActionResult as R, type SubscribeOptions as S, type EventSubscription as T, type FinalizeResolutionParams as U, type FlagResolutionParams as V, INIT_COMP_DEF_INSTRUCTIONS as W, type InitCompDefMethodName as X, type InitCompDefParams as Y, type InitSignPdaParams as Z, type InitializeParams as _, type CancelMarketParams as a, fetchLpPositionsByProvider as a$, type LpPositionAccount as a0, MAX_CHALLENGE_PERIOD_SECS as a1, MAX_LP_FEE_BPS as a2, MAX_OUTCOMES_MULTI as a3, MAX_PROTOCOL_FEE_BPS as a4, MAX_QUESTION_BYTES as a5, MIN_BET_USDC as a6, MIN_CHALLENGE_PERIOD_SECS as a7, MIN_CREATOR_BOND as a8, MIN_OUTCOMES_MULTI as a9, type Wallet as aA, type WithdrawCreatorFundsParams as aB, adminClaimRemainingIx as aC, adminOverrideResolutionAction as aD, adminOverrideResolutionIx as aE, awaitComputation as aF, buildAllInitCompDefIx as aG, cancelMarketAction as aH, cancelMarketIx as aI, claimPayoutAction as aJ, claimPayoutMultiIx as aK, claimPayoutYesnoIx as aL, claimRefundAction as aM, claimRefundMultiIx as aN, claimRefundYesnoIx as aO, compDefOffsetBytes as aP, compDefOffsetU32 as aQ, createCipher as aR, createMarketAction as aS, createMarketIx as aT, createMarketMultiAction as aU, createMarketMultiIx as aV, createUserKeypair as aW, deriveSharedSecret as aX, fetchAllMarkets as aY, fetchGlobalState as aZ, fetchLpPosition as a_, type MarketCancelledEvent as aa, MarketCategory as ab, type MarketCategoryValue as ac, type MarketCreatedEvent as ad, type MarketFinalizedEvent as ae, type MarketQuestionAccount as af, type MarketResolvedEvent as ag, MarketState as ah, type MarketStateValue as ai, MarketType as aj, type MarketTypeValue as ak, ODDS_SCALE as al, PROGRAM_ID as am, type PayoutClaimedEvent as an, type PlacePrivateBetParams as ao, type PollEventsOptions as ap, type PolledEvent as aq, type ProgressCallback as ar, type RefundClaimedEvent as as, type ResolutionFlaggedEvent as at, type ResolutionOverriddenEvent as au, type ResolveMarketParams as av, type SendIxOptions as aw, type SubmitBetParams as ax, type UpdateAcceptedMintParams as ay, type UserCryptoKeypair as az, type ClaimResult as b, fetchMarket as b0, fetchMarketQuestion as b1, fetchMarketQuestions as b2, fetchMarketsByCreator as b3, fetchMarketsByState as b4, fetchMxePublicKey as b5, fetchPosition as b6, fetchPositionsForMarket as b7, fetchUserPositions as b8, finalizeResolutionAction as b9, readonlyWallet as bA, resolveMarketAction as bB, resolveMarketMultiIx as bC, resolveMarketYesnoIx as bD, sendIx as bE, sendIxAndAwaitArcium as bF, sendTx as bG, submitBetMultiIx as bH, submitBetYesnoIx as bI, subscribeAll as bJ, subscribeEvent as bK, updateAcceptedMintIx as bL, withdrawCreatorFundsAction as bM, withdrawCreatorFundsIx as bN, finalizeResolutionIx as ba, flagResolutionAction as bb, flagResolutionIx as bc, freshNonce as bd, initCompDefIx as be, initSignPdaIx as bf, initializeIx as bg, keypairToWallet as bh, leBytesToBigInt as bi, onBetPlaced as bj, onCreatorWithdrawn as bk, onMarketCancelled as bl, onMarketCreated as bm, onMarketFinalized as bn, onMarketResolved as bo, onPayoutClaimed as bp, onRefundClaimed as bq, onResolutionFlagged as br, onResolutionOverridden as bs, parseLogs as bt, parseLogsFor as bu, placeBetAction as bv, placePrivateBetMultiIx as bw, placePrivateBetYesnoIx as bx, pollEvents as by, randomComputationOffset as bz, type ClaimInputs as c, type CreateMarketResult as d, type CreateMarketParams as e, type FlagResolutionInputs as f, type PlaceBetInputs as g, type ResolveMarketResult as h, type ResolveMarketInputs as i, type CypherEvent as j, type Cypher as k, type CircuitName as l, ACCOUNT_DISCRIMINATOR_SIZE as m, ALL_CIRCUITS as n, ALL_EVENT_NAMES as o, type ActionProgressEvent as p, type ActionStage as q, type AdminClaimRemainingParams as r, type AdminOverrideResolutionParams as s, type AwaitComputationOptions as t, type BetPlacedEvent as u, CIRCUITS as v, CLUSTERS as w, type ClaimParams as x, type ClusterConfig as y, type ClusterName as z };
|