@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.
@@ -62,6 +62,25 @@ interface RefundClaimedEvent {
62
62
  user: PublicKey;
63
63
  refundAmount: bigint;
64
64
  }
65
+ /** v0.2+: a bettor flagged the just-revealed resolution during the challenge window. */
66
+ interface ResolutionFlaggedEvent {
67
+ market: PublicKey;
68
+ flaggedBy: PublicKey;
69
+ }
70
+ /** v0.2+: the challenge window elapsed undisputed and the market moved to RESOLVED. */
71
+ interface MarketFinalizedEvent {
72
+ market: PublicKey;
73
+ outcome: number;
74
+ payoutRatio: bigint;
75
+ }
76
+ /** v0.2+: admin override on a disputed resolution. */
77
+ interface ResolutionOverriddenEvent {
78
+ market: PublicKey;
79
+ oldOutcome: number;
80
+ newOutcome: number;
81
+ newPayoutRatio: bigint;
82
+ admin: PublicKey;
83
+ }
65
84
  /** Discriminated union of every Cypher program event. */
66
85
  type CypherEvent = {
67
86
  name: "MarketCreatedEvent";
@@ -84,6 +103,15 @@ type CypherEvent = {
84
103
  } | {
85
104
  name: "RefundClaimedEvent";
86
105
  data: RefundClaimedEvent;
106
+ } | {
107
+ name: "ResolutionFlaggedEvent";
108
+ data: ResolutionFlaggedEvent;
109
+ } | {
110
+ name: "MarketFinalizedEvent";
111
+ data: MarketFinalizedEvent;
112
+ } | {
113
+ name: "ResolutionOverriddenEvent";
114
+ data: ResolutionOverriddenEvent;
87
115
  };
88
116
  /** The set of all event names the Cypher program emits. */
89
117
  type CypherEventName = CypherEvent["name"];
@@ -167,6 +195,16 @@ declare const DEFAULT_CLAIM_PERIOD_SECS: number;
167
195
  * on unresolved markets. After this elapses, the admin may sweep.
168
196
  */
169
197
  declare const DEFAULT_REFUND_PERIOD_SECS: number;
198
+ /**
199
+ * Minimum challenge / dispute window per market (seconds). Set at create-time;
200
+ * the contract rejects any `challenge_period` below this floor.
201
+ */
202
+ declare const MIN_CHALLENGE_PERIOD_SECS: number;
203
+ /**
204
+ * Maximum challenge / dispute window per market (seconds). Set at create-time;
205
+ * the contract rejects any `challenge_period` above this ceiling.
206
+ */
207
+ declare const MAX_CHALLENGE_PERIOD_SECS: number;
170
208
  /** Maximum protocol fee rate (basis points). 1% absolute ceiling. */
171
209
  declare const MAX_PROTOCOL_FEE_BPS = 100;
172
210
  /** Maximum LP fee rate (basis points). 5% absolute ceiling. */
@@ -175,12 +213,21 @@ declare const MAX_LP_FEE_BPS = 500;
175
213
  declare const BPS_DENOMINATOR = 10000n;
176
214
  /** Fixed-point scale on `Market.payout_ratio` and `entry_odds`. */
177
215
  declare const ODDS_SCALE = 1000000000n;
178
- /** Lifecycle states for a market. */
216
+ /**
217
+ * Lifecycle states for a market.
218
+ *
219
+ * `PendingResolution` (v0.2+): the reveal callback ran and outcome/pools are
220
+ * now plaintext on the Market account, but the market is still in the
221
+ * challenge window. `claim_deadline` / `refund_deadline` are NOT set yet
222
+ * — `finalize_resolution` (anyone, after window) or
223
+ * `admin_override_resolution` (admin, when disputed) flips to `Resolved`.
224
+ */
179
225
  declare const MarketState: {
180
226
  readonly Active: 0;
181
227
  readonly Closed: 1;
182
228
  readonly Resolved: 2;
183
229
  readonly Unresolved: 3;
230
+ readonly PendingResolution: 4;
184
231
  };
185
232
  type MarketStateValue = (typeof MarketState)[keyof typeof MarketState];
186
233
  /** Market type: simple YES/NO vs 2–4 outcome. */
@@ -226,6 +273,9 @@ type Cypher = {
226
273
  "instructions": [
227
274
  {
228
275
  "name": "adminClaimRemaining";
276
+ "docs": [
277
+ "Admin claims remaining unclaimed funds once the claim and refund deadlines have passed."
278
+ ];
229
279
  "discriminator": [
230
280
  226,
231
281
  176,
@@ -325,13 +375,91 @@ type Cypher = {
325
375
  },
326
376
  {
327
377
  "name": "tokenProgram";
328
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
329
378
  }
330
379
  ];
331
380
  "args": [];
332
381
  },
382
+ {
383
+ "name": "adminOverrideResolution";
384
+ "docs": [
385
+ "Admin override of a disputed resolution with a corrected outcome and recomputed payout ratio."
386
+ ];
387
+ "discriminator": [
388
+ 47,
389
+ 117,
390
+ 40,
391
+ 129,
392
+ 108,
393
+ 28,
394
+ 219,
395
+ 96
396
+ ];
397
+ "accounts": [
398
+ {
399
+ "name": "admin";
400
+ "signer": true;
401
+ },
402
+ {
403
+ "name": "globalState";
404
+ "pda": {
405
+ "seeds": [
406
+ {
407
+ "kind": "const";
408
+ "value": [
409
+ 103,
410
+ 108,
411
+ 111,
412
+ 98,
413
+ 97,
414
+ 108,
415
+ 95,
416
+ 115,
417
+ 116,
418
+ 97,
419
+ 116,
420
+ 101
421
+ ];
422
+ }
423
+ ];
424
+ };
425
+ },
426
+ {
427
+ "name": "market";
428
+ "writable": true;
429
+ "pda": {
430
+ "seeds": [
431
+ {
432
+ "kind": "const";
433
+ "value": [
434
+ 109,
435
+ 97,
436
+ 114,
437
+ 107,
438
+ 101,
439
+ 116
440
+ ];
441
+ },
442
+ {
443
+ "kind": "account";
444
+ "path": "market.market_id";
445
+ "account": "market";
446
+ }
447
+ ];
448
+ };
449
+ }
450
+ ];
451
+ "args": [
452
+ {
453
+ "name": "outcomeValue";
454
+ "type": "u8";
455
+ }
456
+ ];
457
+ },
333
458
  {
334
459
  "name": "cancelMarket";
460
+ "docs": [
461
+ "Cancel a market and return bond to creator (only if no bets placed)."
462
+ ];
335
463
  "discriminator": [
336
464
  205,
337
465
  121,
@@ -439,13 +567,15 @@ type Cypher = {
439
567
  },
440
568
  {
441
569
  "name": "tokenProgram";
442
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
443
570
  }
444
571
  ];
445
572
  "args": [];
446
573
  },
447
574
  {
448
575
  "name": "claimPayoutMulti";
576
+ "docs": [
577
+ "Queue MPC computation to verify and pay out a winning MultiOutcome position."
578
+ ];
449
579
  "discriminator": [
450
580
  183,
451
581
  30,
@@ -625,7 +755,6 @@ type Cypher = {
625
755
  },
626
756
  {
627
757
  "name": "tokenProgram";
628
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
629
758
  }
630
759
  ];
631
760
  "args": [
@@ -637,6 +766,9 @@ type Cypher = {
637
766
  },
638
767
  {
639
768
  "name": "claimPayoutYesno";
769
+ "docs": [
770
+ "Queue MPC computation to verify and pay out a winning YesNo position."
771
+ ];
640
772
  "discriminator": [
641
773
  224,
642
774
  84,
@@ -816,7 +948,6 @@ type Cypher = {
816
948
  },
817
949
  {
818
950
  "name": "tokenProgram";
819
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
820
951
  }
821
952
  ];
822
953
  "args": [
@@ -828,6 +959,9 @@ type Cypher = {
828
959
  },
829
960
  {
830
961
  "name": "claimRefundMulti";
962
+ "docs": [
963
+ "Queue MPC computation to refund a bet on an unresolved MultiOutcome market."
964
+ ];
831
965
  "discriminator": [
832
966
  186,
833
967
  255,
@@ -1007,7 +1141,6 @@ type Cypher = {
1007
1141
  },
1008
1142
  {
1009
1143
  "name": "tokenProgram";
1010
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1011
1144
  }
1012
1145
  ];
1013
1146
  "args": [
@@ -1019,6 +1152,9 @@ type Cypher = {
1019
1152
  },
1020
1153
  {
1021
1154
  "name": "claimRefundYesno";
1155
+ "docs": [
1156
+ "Queue MPC computation to refund a bet on an unresolved YesNo market."
1157
+ ];
1022
1158
  "discriminator": [
1023
1159
  250,
1024
1160
  69,
@@ -1198,7 +1334,6 @@ type Cypher = {
1198
1334
  },
1199
1335
  {
1200
1336
  "name": "tokenProgram";
1201
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1202
1337
  }
1203
1338
  ];
1204
1339
  "args": [
@@ -1210,6 +1345,9 @@ type Cypher = {
1210
1345
  },
1211
1346
  {
1212
1347
  "name": "computeMultiPayoutCallback";
1348
+ "docs": [
1349
+ "Callback that transfers the computed payout to the winning bettor."
1350
+ ];
1213
1351
  "discriminator": [
1214
1352
  242,
1215
1353
  12,
@@ -1262,7 +1400,6 @@ type Cypher = {
1262
1400
  },
1263
1401
  {
1264
1402
  "name": "tokenProgram";
1265
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1266
1403
  },
1267
1404
  {
1268
1405
  "name": "systemProgram";
@@ -1292,6 +1429,9 @@ type Cypher = {
1292
1429
  },
1293
1430
  {
1294
1431
  "name": "computeMultiRefundCallback";
1432
+ "docs": [
1433
+ "Callback that transfers the computed refund to the bettor."
1434
+ ];
1295
1435
  "discriminator": [
1296
1436
  164,
1297
1437
  49,
@@ -1344,7 +1484,6 @@ type Cypher = {
1344
1484
  },
1345
1485
  {
1346
1486
  "name": "tokenProgram";
1347
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1348
1487
  },
1349
1488
  {
1350
1489
  "name": "systemProgram";
@@ -1374,6 +1513,9 @@ type Cypher = {
1374
1513
  },
1375
1514
  {
1376
1515
  "name": "computeYesnoPayoutCallback";
1516
+ "docs": [
1517
+ "Callback that transfers the computed payout to the winning bettor."
1518
+ ];
1377
1519
  "discriminator": [
1378
1520
  154,
1379
1521
  174,
@@ -1426,7 +1568,6 @@ type Cypher = {
1426
1568
  },
1427
1569
  {
1428
1570
  "name": "tokenProgram";
1429
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1430
1571
  },
1431
1572
  {
1432
1573
  "name": "systemProgram";
@@ -1456,6 +1597,9 @@ type Cypher = {
1456
1597
  },
1457
1598
  {
1458
1599
  "name": "computeYesnoRefundCallback";
1600
+ "docs": [
1601
+ "Callback that transfers the computed refund to the bettor."
1602
+ ];
1459
1603
  "discriminator": [
1460
1604
  87,
1461
1605
  6,
@@ -1508,7 +1652,6 @@ type Cypher = {
1508
1652
  },
1509
1653
  {
1510
1654
  "name": "tokenProgram";
1511
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1512
1655
  },
1513
1656
  {
1514
1657
  "name": "systemProgram";
@@ -1538,6 +1681,9 @@ type Cypher = {
1538
1681
  },
1539
1682
  {
1540
1683
  "name": "createMarket";
1684
+ "docs": [
1685
+ "Create a new YesNo prediction market (creator pays the bond, sets close time and challenge period)."
1686
+ ];
1541
1687
  "discriminator": [
1542
1688
  103,
1543
1689
  226,
@@ -1673,7 +1819,6 @@ type Cypher = {
1673
1819
  },
1674
1820
  {
1675
1821
  "name": "tokenProgram";
1676
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1677
1822
  },
1678
1823
  {
1679
1824
  "name": "systemProgram";
@@ -1692,11 +1837,18 @@ type Cypher = {
1692
1837
  {
1693
1838
  "name": "category";
1694
1839
  "type": "u8";
1840
+ },
1841
+ {
1842
+ "name": "challengePeriod";
1843
+ "type": "i64";
1695
1844
  }
1696
1845
  ];
1697
1846
  },
1698
1847
  {
1699
1848
  "name": "createMarketMulti";
1849
+ "docs": [
1850
+ "Create a new MultiOutcome prediction market with 2-4 outcomes."
1851
+ ];
1700
1852
  "discriminator": [
1701
1853
  35,
1702
1854
  185,
@@ -1832,7 +1984,6 @@ type Cypher = {
1832
1984
  },
1833
1985
  {
1834
1986
  "name": "tokenProgram";
1835
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1836
1987
  },
1837
1988
  {
1838
1989
  "name": "systemProgram";
@@ -1855,11 +2006,112 @@ type Cypher = {
1855
2006
  {
1856
2007
  "name": "numOutcomes";
1857
2008
  "type": "u8";
2009
+ },
2010
+ {
2011
+ "name": "challengePeriod";
2012
+ "type": "i64";
1858
2013
  }
1859
2014
  ];
1860
2015
  },
2016
+ {
2017
+ "name": "finalizeResolution";
2018
+ "docs": [
2019
+ "Finalize a pending resolution once the challenge window has passed undisputed."
2020
+ ];
2021
+ "discriminator": [
2022
+ 191,
2023
+ 74,
2024
+ 94,
2025
+ 214,
2026
+ 45,
2027
+ 150,
2028
+ 152,
2029
+ 125
2030
+ ];
2031
+ "accounts": [
2032
+ {
2033
+ "name": "caller";
2034
+ "signer": true;
2035
+ },
2036
+ {
2037
+ "name": "market";
2038
+ "writable": true;
2039
+ "pda": {
2040
+ "seeds": [
2041
+ {
2042
+ "kind": "const";
2043
+ "value": [
2044
+ 109,
2045
+ 97,
2046
+ 114,
2047
+ 107,
2048
+ 101,
2049
+ 116
2050
+ ];
2051
+ },
2052
+ {
2053
+ "kind": "account";
2054
+ "path": "market.market_id";
2055
+ "account": "market";
2056
+ }
2057
+ ];
2058
+ };
2059
+ }
2060
+ ];
2061
+ "args": [];
2062
+ },
2063
+ {
2064
+ "name": "flagResolution";
2065
+ "docs": [
2066
+ "Flag a pending resolution as disputed during the challenge window."
2067
+ ];
2068
+ "discriminator": [
2069
+ 144,
2070
+ 21,
2071
+ 165,
2072
+ 219,
2073
+ 56,
2074
+ 125,
2075
+ 121,
2076
+ 138
2077
+ ];
2078
+ "accounts": [
2079
+ {
2080
+ "name": "flagger";
2081
+ "signer": true;
2082
+ },
2083
+ {
2084
+ "name": "market";
2085
+ "writable": true;
2086
+ "pda": {
2087
+ "seeds": [
2088
+ {
2089
+ "kind": "const";
2090
+ "value": [
2091
+ 109,
2092
+ 97,
2093
+ 114,
2094
+ 107,
2095
+ 101,
2096
+ 116
2097
+ ];
2098
+ },
2099
+ {
2100
+ "kind": "account";
2101
+ "path": "market.market_id";
2102
+ "account": "market";
2103
+ }
2104
+ ];
2105
+ };
2106
+ }
2107
+ ];
2108
+ "args": [];
2109
+ },
1861
2110
  {
1862
2111
  "name": "initPayoutMultiCompDef";
2112
+ "docs": [
2113
+ "Register the compute_multi_payout Arcium computation definition."
2114
+ ];
1863
2115
  "discriminator": [
1864
2116
  155,
1865
2117
  138,
@@ -1905,6 +2157,9 @@ type Cypher = {
1905
2157
  },
1906
2158
  {
1907
2159
  "name": "initPayoutYesnoCompDef";
2160
+ "docs": [
2161
+ "Register the compute_yesno_payout Arcium computation definition."
2162
+ ];
1908
2163
  "discriminator": [
1909
2164
  104,
1910
2165
  87,
@@ -1950,6 +2205,9 @@ type Cypher = {
1950
2205
  },
1951
2206
  {
1952
2207
  "name": "initPlaceBetMultiCompDef";
2208
+ "docs": [
2209
+ "Register the place_private_bet_multi Arcium computation definition."
2210
+ ];
1953
2211
  "discriminator": [
1954
2212
  2,
1955
2213
  251,
@@ -1995,6 +2253,9 @@ type Cypher = {
1995
2253
  },
1996
2254
  {
1997
2255
  "name": "initPlaceBetYesnoCompDef";
2256
+ "docs": [
2257
+ "Register the place_private_bet_yesno Arcium computation definition."
2258
+ ];
1998
2259
  "discriminator": [
1999
2260
  160,
2000
2261
  105,
@@ -2040,6 +2301,9 @@ type Cypher = {
2040
2301
  },
2041
2302
  {
2042
2303
  "name": "initRefundMultiCompDef";
2304
+ "docs": [
2305
+ "Register the compute_multi_refund Arcium computation definition."
2306
+ ];
2043
2307
  "discriminator": [
2044
2308
  166,
2045
2309
  248,
@@ -2085,6 +2349,9 @@ type Cypher = {
2085
2349
  },
2086
2350
  {
2087
2351
  "name": "initRefundYesnoCompDef";
2352
+ "docs": [
2353
+ "Register the compute_yesno_refund Arcium computation definition."
2354
+ ];
2088
2355
  "discriminator": [
2089
2356
  114,
2090
2357
  168,
@@ -2130,6 +2397,9 @@ type Cypher = {
2130
2397
  },
2131
2398
  {
2132
2399
  "name": "initRevealMultiCompDef";
2400
+ "docs": [
2401
+ "Register the reveal_market_outcome_multi Arcium computation definition."
2402
+ ];
2133
2403
  "discriminator": [
2134
2404
  174,
2135
2405
  143,
@@ -2175,6 +2445,9 @@ type Cypher = {
2175
2445
  },
2176
2446
  {
2177
2447
  "name": "initRevealYesnoCompDef";
2448
+ "docs": [
2449
+ "Register the reveal_market_outcome_yesno Arcium computation definition."
2450
+ ];
2178
2451
  "discriminator": [
2179
2452
  185,
2180
2453
  221,
@@ -2220,6 +2493,9 @@ type Cypher = {
2220
2493
  },
2221
2494
  {
2222
2495
  "name": "initialize";
2496
+ "docs": [
2497
+ "Initialize the global protocol state: fee rates, treasury, accepted mint, and admin."
2498
+ ];
2223
2499
  "discriminator": [
2224
2500
  175,
2225
2501
  175,
@@ -2286,6 +2562,9 @@ type Cypher = {
2286
2562
  },
2287
2563
  {
2288
2564
  "name": "placePrivateBetMulti";
2565
+ "docs": [
2566
+ "Queue an encrypted multi-outcome bet for MPC processing."
2567
+ ];
2289
2568
  "discriminator": [
2290
2569
  43,
2291
2570
  95,
@@ -2494,7 +2773,6 @@ type Cypher = {
2494
2773
  },
2495
2774
  {
2496
2775
  "name": "tokenProgram";
2497
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
2498
2776
  }
2499
2777
  ];
2500
2778
  "args": [
@@ -2541,6 +2819,9 @@ type Cypher = {
2541
2819
  },
2542
2820
  {
2543
2821
  "name": "placePrivateBetMultiCallback";
2822
+ "docs": [
2823
+ "Callback that applies the MPC-computed pool totals and entry odds for a MultiOutcome bet."
2824
+ ];
2544
2825
  "discriminator": [
2545
2826
  81,
2546
2827
  0,
@@ -2604,6 +2885,9 @@ type Cypher = {
2604
2885
  },
2605
2886
  {
2606
2887
  "name": "placePrivateBetYesno";
2888
+ "docs": [
2889
+ "Queue an encrypted YES/NO bet for MPC processing."
2890
+ ];
2607
2891
  "discriminator": [
2608
2892
  14,
2609
2893
  226,
@@ -2812,7 +3096,6 @@ type Cypher = {
2812
3096
  },
2813
3097
  {
2814
3098
  "name": "tokenProgram";
2815
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
2816
3099
  }
2817
3100
  ];
2818
3101
  "args": [
@@ -2859,6 +3142,9 @@ type Cypher = {
2859
3142
  },
2860
3143
  {
2861
3144
  "name": "placePrivateBetYesnoCallback";
3145
+ "docs": [
3146
+ "Callback that applies the MPC-computed pool totals and entry odds for a YesNo bet."
3147
+ ];
2862
3148
  "discriminator": [
2863
3149
  1,
2864
3150
  193,
@@ -2922,6 +3208,9 @@ type Cypher = {
2922
3208
  },
2923
3209
  {
2924
3210
  "name": "resolveMarketMulti";
3211
+ "docs": [
3212
+ "Queue MPC computation to reveal the multi-outcome winner and pools."
3213
+ ];
2925
3214
  "discriminator": [
2926
3215
  237,
2927
3216
  84,
@@ -3052,6 +3341,9 @@ type Cypher = {
3052
3341
  },
3053
3342
  {
3054
3343
  "name": "resolveMarketYesno";
3344
+ "docs": [
3345
+ "Queue MPC computation to reveal the YES/NO outcome and pools."
3346
+ ];
3055
3347
  "discriminator": [
3056
3348
  191,
3057
3349
  1,
@@ -3182,6 +3474,9 @@ type Cypher = {
3182
3474
  },
3183
3475
  {
3184
3476
  "name": "revealMarketOutcomeMultiCallback";
3477
+ "docs": [
3478
+ "Callback that writes the revealed outcome, pools, and payout ratio; market enters the challenge window."
3479
+ ];
3185
3480
  "discriminator": [
3186
3481
  114,
3187
3482
  103,
@@ -3241,6 +3536,9 @@ type Cypher = {
3241
3536
  },
3242
3537
  {
3243
3538
  "name": "revealMarketOutcomeYesnoCallback";
3539
+ "docs": [
3540
+ "Callback that writes the revealed outcome, pools, and payout ratio; market enters the challenge window."
3541
+ ];
3244
3542
  "discriminator": [
3245
3543
  92,
3246
3544
  112,
@@ -3300,6 +3598,9 @@ type Cypher = {
3300
3598
  },
3301
3599
  {
3302
3600
  "name": "updateAcceptedMint";
3601
+ "docs": [
3602
+ "Update the protocol's accepted mint and treasury (admin only)."
3603
+ ];
3303
3604
  "discriminator": [
3304
3605
  6,
3305
3606
  166,
@@ -3356,6 +3657,9 @@ type Cypher = {
3356
3657
  },
3357
3658
  {
3358
3659
  "name": "withdrawCreatorFunds";
3660
+ "docs": [
3661
+ "Withdraw creator bond and accumulated LP fees after the market is resolved."
3662
+ ];
3359
3663
  "discriminator": [
3360
3664
  135,
3361
3665
  166,
@@ -3463,7 +3767,6 @@ type Cypher = {
3463
3767
  },
3464
3768
  {
3465
3769
  "name": "tokenProgram";
3466
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
3467
3770
  }
3468
3771
  ];
3469
3772
  "args": [];
@@ -3589,6 +3892,19 @@ type Cypher = {
3589
3892
  124
3590
3893
  ];
3591
3894
  },
3895
+ {
3896
+ "name": "marketFinalizedEvent";
3897
+ "discriminator": [
3898
+ 141,
3899
+ 216,
3900
+ 158,
3901
+ 192,
3902
+ 60,
3903
+ 222,
3904
+ 155,
3905
+ 232
3906
+ ];
3907
+ },
3592
3908
  {
3593
3909
  "name": "marketResolvedEvent";
3594
3910
  "discriminator": [
@@ -3627,6 +3943,32 @@ type Cypher = {
3627
3943
  154,
3628
3944
  233
3629
3945
  ];
3946
+ },
3947
+ {
3948
+ "name": "resolutionFlaggedEvent";
3949
+ "discriminator": [
3950
+ 159,
3951
+ 214,
3952
+ 98,
3953
+ 62,
3954
+ 158,
3955
+ 28,
3956
+ 21,
3957
+ 84
3958
+ ];
3959
+ },
3960
+ {
3961
+ "name": "resolutionOverriddenEvent";
3962
+ "discriminator": [
3963
+ 133,
3964
+ 175,
3965
+ 170,
3966
+ 160,
3967
+ 47,
3968
+ 76,
3969
+ 128,
3970
+ 87
3971
+ ];
3630
3972
  }
3631
3973
  ];
3632
3974
  "errors": [
@@ -3809,6 +4151,36 @@ type Cypher = {
3809
4151
  "code": 6035;
3810
4152
  "name": "invalidCategory";
3811
4153
  "msg": "Invalid category — must be 0-6";
4154
+ },
4155
+ {
4156
+ "code": 6036;
4157
+ "name": "invalidChallengePeriod";
4158
+ "msg": "Challenge period must be between 24 and 48 hours";
4159
+ },
4160
+ {
4161
+ "code": 6037;
4162
+ "name": "notPendingResolution";
4163
+ "msg": "Market is not pending resolution";
4164
+ },
4165
+ {
4166
+ "code": 6038;
4167
+ "name": "challengePeriodNotElapsed";
4168
+ "msg": "Challenge period has not elapsed yet";
4169
+ },
4170
+ {
4171
+ "code": 6039;
4172
+ "name": "challengePeriodElapsed";
4173
+ "msg": "Challenge period has already elapsed";
4174
+ },
4175
+ {
4176
+ "code": 6040;
4177
+ "name": "marketDisputed";
4178
+ "msg": "Market resolution is disputed — admin must override";
4179
+ },
4180
+ {
4181
+ "code": 6041;
4182
+ "name": "marketNotDisputed";
4183
+ "msg": "Market resolution is not disputed";
3812
4184
  }
3813
4185
  ];
3814
4186
  "types": [
@@ -4811,6 +5183,27 @@ type Cypher = {
4811
5183
  "name": "refundDeadline";
4812
5184
  "type": "i64";
4813
5185
  },
5186
+ {
5187
+ "name": "challengePeriod";
5188
+ "docs": [
5189
+ "Configurable dispute window (24-48h), set at creation"
5190
+ ];
5191
+ "type": "i64";
5192
+ },
5193
+ {
5194
+ "name": "challengeDeadline";
5195
+ "docs": [
5196
+ "resolution_time + challenge_period — set by the reveal callback"
5197
+ ];
5198
+ "type": "i64";
5199
+ },
5200
+ {
5201
+ "name": "disputed";
5202
+ "docs": [
5203
+ "Set true by flag_resolution; blocks finalize_resolution until admin overrides"
5204
+ ];
5205
+ "type": "bool";
5206
+ },
4814
5207
  {
4815
5208
  "name": "bump";
4816
5209
  "type": "u8";
@@ -4874,6 +5267,26 @@ type Cypher = {
4874
5267
  ];
4875
5268
  };
4876
5269
  },
5270
+ {
5271
+ "name": "marketFinalizedEvent";
5272
+ "type": {
5273
+ "kind": "struct";
5274
+ "fields": [
5275
+ {
5276
+ "name": "market";
5277
+ "type": "pubkey";
5278
+ },
5279
+ {
5280
+ "name": "outcome";
5281
+ "type": "u8";
5282
+ },
5283
+ {
5284
+ "name": "payoutRatio";
5285
+ "type": "u64";
5286
+ }
5287
+ ];
5288
+ };
5289
+ },
4877
5290
  {
4878
5291
  "name": "marketResolvedEvent";
4879
5292
  "type": {
@@ -5272,6 +5685,50 @@ type Cypher = {
5272
5685
  ];
5273
5686
  };
5274
5687
  },
5688
+ {
5689
+ "name": "resolutionFlaggedEvent";
5690
+ "type": {
5691
+ "kind": "struct";
5692
+ "fields": [
5693
+ {
5694
+ "name": "market";
5695
+ "type": "pubkey";
5696
+ },
5697
+ {
5698
+ "name": "flaggedBy";
5699
+ "type": "pubkey";
5700
+ }
5701
+ ];
5702
+ };
5703
+ },
5704
+ {
5705
+ "name": "resolutionOverriddenEvent";
5706
+ "type": {
5707
+ "kind": "struct";
5708
+ "fields": [
5709
+ {
5710
+ "name": "market";
5711
+ "type": "pubkey";
5712
+ },
5713
+ {
5714
+ "name": "oldOutcome";
5715
+ "type": "u8";
5716
+ },
5717
+ {
5718
+ "name": "newOutcome";
5719
+ "type": "u8";
5720
+ },
5721
+ {
5722
+ "name": "newPayoutRatio";
5723
+ "type": "u64";
5724
+ },
5725
+ {
5726
+ "name": "admin";
5727
+ "type": "pubkey";
5728
+ }
5729
+ ];
5730
+ };
5731
+ },
5275
5732
  {
5276
5733
  "name": "revealMarketOutcomeMultiOutput";
5277
5734
  "docs": [
@@ -5593,6 +6050,12 @@ interface MarketAccount {
5593
6050
  resolutionDeadline: bigint;
5594
6051
  claimDeadline: bigint;
5595
6052
  refundDeadline: bigint;
6053
+ /** Configurable dispute window (24–48h), set at create time. (v0.2+) */
6054
+ challengePeriod: bigint;
6055
+ /** `resolution_time + challenge_period` — set by the reveal callback. (v0.2+) */
6056
+ challengeDeadline: bigint;
6057
+ /** Set true by `flag_resolution`; blocks `finalize_resolution`. (v0.2+) */
6058
+ disputed: boolean;
5596
6059
  bump: number;
5597
6060
  vaultBump: number;
5598
6061
  }
@@ -5809,6 +6272,13 @@ interface CreateMarketParams {
5809
6272
  * before building this instruction.
5810
6273
  */
5811
6274
  expectedMarketId: bigint | number;
6275
+ /**
6276
+ * v0.2+: configurable dispute window length in seconds.
6277
+ * Must be within [`MIN_CHALLENGE_PERIOD_SECS`, `MAX_CHALLENGE_PERIOD_SECS`]
6278
+ * (24h–48h). After the reveal callback, the market sits in
6279
+ * `PendingResolution` for this long, during which anyone can flag.
6280
+ */
6281
+ challengePeriod: bigint | number;
5812
6282
  }
5813
6283
  /**
5814
6284
  * Build a `create_market` instruction (YesNo).
@@ -5912,6 +6382,41 @@ declare function claimRefundYesnoIx(client: CypherClient, params: ClaimParams):
5912
6382
  /** `claim_refund_multi` — refund on a multi market that never resolved. */
5913
6383
  declare function claimRefundMultiIx(client: CypherClient, params: ClaimParams): Promise<TransactionInstruction>;
5914
6384
 
6385
+ interface FlagResolutionParams {
6386
+ /** The user flagging the resolution (signer). Permissionless. */
6387
+ flagger: PublicKey;
6388
+ marketId: bigint | number;
6389
+ }
6390
+ /** `flag_resolution` — anyone can flag a pending resolution during the window. */
6391
+ declare function flagResolutionIx(client: CypherClient, params: FlagResolutionParams): Promise<TransactionInstruction>;
6392
+ interface FinalizeResolutionParams {
6393
+ /** The user calling finalize (signer). Permissionless. */
6394
+ caller: PublicKey;
6395
+ marketId: bigint | number;
6396
+ }
6397
+ /**
6398
+ * `finalize_resolution` — anyone can call once the challenge window has
6399
+ * elapsed undisputed. Flips the market from `PendingResolution` → `Resolved`
6400
+ * and sets the `claim_deadline` / `refund_deadline`.
6401
+ */
6402
+ declare function finalizeResolutionIx(client: CypherClient, params: FinalizeResolutionParams): Promise<TransactionInstruction>;
6403
+ interface AdminOverrideResolutionParams {
6404
+ /** Admin signer — must match `GlobalState.admin`. */
6405
+ admin: PublicKey;
6406
+ marketId: bigint | number;
6407
+ /**
6408
+ * Corrected outcome. YesNo: 0 or 1. Multi: in `[0, numOutcomes)`.
6409
+ * Recomputes `payout_ratio` from the on-chain revealed pools.
6410
+ */
6411
+ outcomeValue: number;
6412
+ }
6413
+ /**
6414
+ * `admin_override_resolution` — admin-only escape hatch for disputed markets.
6415
+ * Recomputes payout_ratio from already-revealed plaintext pools and flips
6416
+ * the market to `Resolved` (no Arcium computation involved).
6417
+ */
6418
+ declare function adminOverrideResolutionIx(client: CypherClient, params: AdminOverrideResolutionParams): Promise<TransactionInstruction>;
6419
+
5915
6420
  /** Outcome returned by `awaitComputation`. */
5916
6421
  interface ComputationResult {
5917
6422
  /** Always `"finalized"` on success (we throw otherwise). */
@@ -6019,13 +6524,16 @@ interface CreateMarketResult {
6019
6524
  market: MarketAccount | null;
6020
6525
  }
6021
6526
  /** Create a YES/NO market end-to-end. */
6022
- declare function createMarketAction(client: CypherClient, inputs: Omit<CreateMarketParams, "expectedMarketId" | "acceptedMint"> & {
6527
+ declare function createMarketAction(client: CypherClient, inputs: Omit<CreateMarketParams, "expectedMarketId" | "acceptedMint" | "challengePeriod"> & {
6023
6528
  acceptedMint?: PublicKey;
6529
+ /** v0.2+: defaults to MIN_CHALLENGE_PERIOD_SECS (24h) if omitted. */
6530
+ challengePeriod?: bigint | number;
6024
6531
  onProgress?: ProgressCallback;
6025
6532
  }): Promise<CreateMarketResult>;
6026
6533
  /** Create a multi-outcome market (2–4 outcomes) end-to-end. */
6027
- declare function createMarketMultiAction(client: CypherClient, inputs: Omit<CreateMarketMultiParams, "expectedMarketId" | "acceptedMint"> & {
6534
+ declare function createMarketMultiAction(client: CypherClient, inputs: Omit<CreateMarketMultiParams, "expectedMarketId" | "acceptedMint" | "challengePeriod"> & {
6028
6535
  acceptedMint?: PublicKey;
6536
+ challengePeriod?: bigint | number;
6029
6537
  onProgress?: ProgressCallback;
6030
6538
  }): Promise<CreateMarketResult>;
6031
6539
  /** Cancel a market that has no bets. Returns the post-cancel `Market`. */
@@ -6199,6 +6707,43 @@ declare function claimPayoutAction(client: CypherClient, inputs: ClaimInputs): P
6199
6707
  /** Claim refund (any bettor on a market that never resolved). */
6200
6708
  declare function claimRefundAction(client: CypherClient, inputs: ClaimInputs): Promise<ClaimResult>;
6201
6709
 
6710
+ interface FlagResolutionInputs {
6711
+ flagger: PublicKey;
6712
+ marketId: bigint | number;
6713
+ onProgress?: ProgressCallback;
6714
+ }
6715
+ interface FinalizeResolutionInputs {
6716
+ caller: PublicKey;
6717
+ marketId: bigint | number;
6718
+ onProgress?: ProgressCallback;
6719
+ }
6720
+ interface AdminOverrideResolutionInputs {
6721
+ admin: PublicKey;
6722
+ marketId: bigint | number;
6723
+ outcomeValue: number;
6724
+ onProgress?: ProgressCallback;
6725
+ }
6726
+ interface ResolutionActionResult {
6727
+ signature: string;
6728
+ market: MarketAccount | null;
6729
+ }
6730
+ /**
6731
+ * Flag a pending resolution as disputed during the challenge window.
6732
+ * Permissionless — anyone can flag.
6733
+ */
6734
+ declare function flagResolutionAction(client: CypherClient, inputs: FlagResolutionInputs): Promise<ResolutionActionResult>;
6735
+ /**
6736
+ * Finalize a pending resolution after the challenge window has elapsed
6737
+ * undisputed. Permissionless — anyone can call.
6738
+ */
6739
+ declare function finalizeResolutionAction(client: CypherClient, inputs: FinalizeResolutionInputs): Promise<ResolutionActionResult>;
6740
+ /**
6741
+ * Admin override of a disputed resolution. Recomputes `payout_ratio` from
6742
+ * the already-revealed plaintext pools using the same formula as the
6743
+ * reveal circuits.
6744
+ */
6745
+ declare function adminOverrideResolutionAction(client: CypherClient, inputs: AdminOverrideResolutionInputs): Promise<ResolutionActionResult>;
6746
+
6202
6747
  /** Callback signature for all per-event subscription helpers. */
6203
6748
  type EventCallback<T> = (data: T, raw: CypherEvent) => void;
6204
6749
  /** Options shared by all subscription helpers. */
@@ -6259,6 +6804,12 @@ declare function onCreatorWithdrawn(connection: Connection, callback: EventCallb
6259
6804
  declare function onPayoutClaimed(connection: Connection, callback: EventCallback<PayoutClaimedEvent>, opts?: SubscribeOptions): EventSubscription;
6260
6805
  /** Subscribe to `RefundClaimedEvent` emissions. */
6261
6806
  declare function onRefundClaimed(connection: Connection, callback: EventCallback<RefundClaimedEvent>, opts?: SubscribeOptions): EventSubscription;
6807
+ /** v0.2+: subscribe to `ResolutionFlaggedEvent`. */
6808
+ declare function onResolutionFlagged(connection: Connection, callback: EventCallback<ResolutionFlaggedEvent>, opts?: SubscribeOptions): EventSubscription;
6809
+ /** v0.2+: subscribe to `MarketFinalizedEvent`. */
6810
+ declare function onMarketFinalized(connection: Connection, callback: EventCallback<MarketFinalizedEvent>, opts?: SubscribeOptions): EventSubscription;
6811
+ /** v0.2+: subscribe to `ResolutionOverriddenEvent`. */
6812
+ declare function onResolutionOverridden(connection: Connection, callback: EventCallback<ResolutionOverriddenEvent>, opts?: SubscribeOptions): EventSubscription;
6262
6813
  interface PollEventsOptions {
6263
6814
  /** Only return events from signatures after this one (exclusive). */
6264
6815
  afterSignature?: string;
@@ -6379,12 +6930,15 @@ declare class CypherClient {
6379
6930
  */
6380
6931
  readonly actions: {
6381
6932
  /** Create a YES/NO market. Fetches GlobalState for marketId + mint automatically. */
6382
- createMarket: (inputs: Omit<CreateMarketParams, "expectedMarketId" | "acceptedMint"> & {
6933
+ createMarket: (inputs: Omit<CreateMarketParams, "expectedMarketId" | "acceptedMint" | "challengePeriod"> & {
6383
6934
  acceptedMint?: PublicKey;
6935
+ /** v0.2+: defaults to MIN_CHALLENGE_PERIOD_SECS (24h) if omitted. */
6936
+ challengePeriod?: bigint | number;
6384
6937
  }) => Promise<CreateMarketResult>;
6385
6938
  /** Create a multi-outcome market (2–4 outcomes). */
6386
- createMarketMulti: (inputs: Omit<CreateMarketMultiParams, "expectedMarketId" | "acceptedMint"> & {
6939
+ createMarketMulti: (inputs: Omit<CreateMarketMultiParams, "expectedMarketId" | "acceptedMint" | "challengePeriod"> & {
6387
6940
  acceptedMint?: PublicKey;
6941
+ challengePeriod?: bigint | number;
6388
6942
  }) => Promise<CreateMarketResult>;
6389
6943
  /** Cancel a market with zero bets. Returns bond to creator. */
6390
6944
  cancelMarket: (inputs: Omit<CancelMarketParams, "acceptedMint"> & {
@@ -6407,6 +6961,12 @@ declare class CypherClient {
6407
6961
  claimPayout: (inputs: ClaimInputs) => Promise<ClaimResult>;
6408
6962
  /** Claim refund on an unresolved market past its deadline. */
6409
6963
  claimRefund: (inputs: ClaimInputs) => Promise<ClaimResult>;
6964
+ /** v0.2+: flag a pending resolution as disputed (permissionless). */
6965
+ flagResolution: (inputs: FlagResolutionInputs) => Promise<ResolutionActionResult>;
6966
+ /** v0.2+: finalize a pending resolution after the challenge window elapses undisputed (permissionless). */
6967
+ finalizeResolution: (inputs: FinalizeResolutionInputs) => Promise<ResolutionActionResult>;
6968
+ /** v0.2+: admin override on a disputed market. */
6969
+ adminOverrideResolution: (inputs: AdminOverrideResolutionInputs) => Promise<ResolutionActionResult>;
6410
6970
  };
6411
6971
  /**
6412
6972
  * Event subscription helpers. Subscribe via WebSocket (`onLogs`) or
@@ -6477,7 +7037,13 @@ declare class CypherClient {
6477
7037
  refundYesnoIx: (params: ClaimParams) => Promise<TransactionInstruction>;
6478
7038
  refundMultiIx: (params: ClaimParams) => Promise<TransactionInstruction>;
6479
7039
  };
7040
+ /** v0.2+: dispute / challenge-window instruction builders. */
7041
+ readonly resolutionIx: {
7042
+ flagIx: (params: FlagResolutionParams) => Promise<TransactionInstruction>;
7043
+ finalizeIx: (params: FinalizeResolutionParams) => Promise<TransactionInstruction>;
7044
+ adminOverrideIx: (params: AdminOverrideResolutionParams) => Promise<TransactionInstruction>;
7045
+ };
6480
7046
  constructor(opts: CypherClientOptions);
6481
7047
  }
6482
7048
 
6483
- export { MIN_OUTCOMES_MULTI as $, ACCOUNT_DISCRIMINATOR_SIZE as A, BPS_DENOMINATOR as B, CypherClient as C, type CypherClientOptions as D, type EncryptedPositionAccount as E, type CypherEventName as F, type GlobalStateAccount as G, DEFAULT_CLAIM_PERIOD_SECS as H, DEFAULT_REFUND_PERIOD_SECS as I, DEFAULT_RESOLUTION_WINDOW_SECS as J, type EventCallback as K, type EventSubscription as L, type MarketAccount as M, INIT_COMP_DEF_INSTRUCTIONS as N, type InitCompDefMethodName as O, type PlaceBetResult as P, type InitCompDefParams as Q, type ResolveMarketResult as R, type SubscribeOptions as S, type InitializeParams as T, KNOWN_MINTS as U, type LpPositionAccount as V, MAX_LP_FEE_BPS as W, MAX_OUTCOMES_MULTI as X, MAX_PROTOCOL_FEE_BPS as Y, MAX_QUESTION_BYTES as Z, MIN_BET_USDC as _, type CancelMarketParams as a, onMarketResolved as a$, type MarketCancelledEvent as a0, MarketCategory as a1, type MarketCategoryValue as a2, type MarketCreatedEvent as a3, type MarketResolvedEvent as a4, MarketState as a5, type MarketStateValue as a6, MarketType as a7, type MarketTypeValue as a8, ODDS_SCALE as a9, createCipher as aA, createMarketAction as aB, createMarketIx as aC, createMarketMultiAction as aD, createMarketMultiIx as aE, createUserKeypair as aF, deriveSharedSecret as aG, fetchAllMarkets as aH, fetchGlobalState as aI, fetchLpPosition as aJ, fetchLpPositionsByProvider as aK, fetchMarket as aL, fetchMarketsByCreator as aM, fetchMarketsByState as aN, fetchMxePublicKey as aO, fetchPosition as aP, fetchPositionsForMarket as aQ, fetchUserPositions as aR, freshNonce as aS, initCompDefIx as aT, initializeIx as aU, keypairToWallet as aV, leBytesToBigInt as aW, onBetPlaced as aX, onCreatorWithdrawn as aY, onMarketCancelled as aZ, onMarketCreated as a_, PROGRAM_ID as aa, type PayoutClaimedEvent as ab, type PlacePrivateBetParams as ac, type PollEventsOptions as ad, type PolledEvent as ae, type ProgressCallback as af, type RefundClaimedEvent as ag, type ResolveMarketParams as ah, type SendIxOptions as ai, type UpdateAcceptedMintParams as aj, type UserCryptoKeypair as ak, type Wallet as al, type WithdrawCreatorFundsParams as am, adminClaimRemainingIx as an, awaitComputation as ao, buildAllInitCompDefIx as ap, cancelMarketAction as aq, cancelMarketIx as ar, claimPayoutAction as as, claimPayoutMultiIx as at, claimPayoutYesnoIx as au, claimRefundAction as av, claimRefundMultiIx as aw, claimRefundYesnoIx as ax, compDefOffsetBytes as ay, compDefOffsetU32 as az, type ClaimResult as b, onPayoutClaimed as b0, onRefundClaimed as b1, parseLogs as b2, parseLogsFor as b3, placeBetAction as b4, placePrivateBetMultiIx as b5, placePrivateBetYesnoIx as b6, pollEvents as b7, randomComputationOffset as b8, readonlyWallet as b9, resolveMarketAction as ba, resolveMarketMultiIx as bb, resolveMarketYesnoIx as bc, sendIx as bd, sendIxAndAwaitArcium as be, subscribeAll as bf, subscribeEvent as bg, updateAcceptedMintIx as bh, withdrawCreatorFundsAction as bi, withdrawCreatorFundsIx as bj, type ClaimInputs as c, type CreateMarketResult as d, type CreateMarketParams as e, type PlaceBetInputs as f, type ResolveMarketInputs as g, type CypherEvent as h, type Cypher as i, type CircuitName as j, ALL_CIRCUITS as k, ALL_EVENT_NAMES as l, type ActionProgressEvent as m, type ActionStage as n, type AdminClaimRemainingParams as o, type AwaitComputationOptions as p, type BetPlacedEvent as q, CIRCUITS as r, CLUSTERS as s, CREATOR_BOND as t, type ClaimParams as u, type ClusterConfig as v, type ClusterName as w, type ComputationResult as x, type CreateMarketMultiParams as y, type CreatorWithdrawnEvent as z };
7049
+ export { KNOWN_MINTS as $, type AdminOverrideResolutionInputs as A, BPS_DENOMINATOR as B, CypherClient as C, type ClusterName as D, type EncryptedPositionAccount as E, type FinalizeResolutionInputs as F, type GlobalStateAccount as G, type ComputationResult as H, type CreateMarketMultiParams as I, type CreatorWithdrawnEvent as J, type CypherClientOptions as K, type CypherEventName as L, type MarketAccount as M, DEFAULT_CLAIM_PERIOD_SECS as N, DEFAULT_REFUND_PERIOD_SECS as O, type PlaceBetResult as P, DEFAULT_RESOLUTION_WINDOW_SECS as Q, type ResolutionActionResult as R, type SubscribeOptions as S, type EventCallback as T, type EventSubscription as U, type FinalizeResolutionParams as V, type FlagResolutionParams as W, INIT_COMP_DEF_INSTRUCTIONS as X, type InitCompDefMethodName as Y, type InitCompDefParams as Z, type InitializeParams as _, type CancelMarketParams as a, fetchMarketsByState 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_OUTCOMES_MULTI as a8, type MarketCancelledEvent as a9, adminOverrideResolutionAction as aA, adminOverrideResolutionIx as aB, awaitComputation as aC, buildAllInitCompDefIx as aD, cancelMarketAction as aE, cancelMarketIx as aF, claimPayoutAction as aG, claimPayoutMultiIx as aH, claimPayoutYesnoIx as aI, claimRefundAction as aJ, claimRefundMultiIx as aK, claimRefundYesnoIx as aL, compDefOffsetBytes as aM, compDefOffsetU32 as aN, createCipher as aO, createMarketAction as aP, createMarketIx as aQ, createMarketMultiAction as aR, createMarketMultiIx as aS, createUserKeypair as aT, deriveSharedSecret as aU, fetchAllMarkets as aV, fetchGlobalState as aW, fetchLpPosition as aX, fetchLpPositionsByProvider as aY, fetchMarket as aZ, fetchMarketsByCreator as a_, MarketCategory as aa, type MarketCategoryValue as ab, type MarketCreatedEvent as ac, type MarketFinalizedEvent as ad, type MarketResolvedEvent as ae, MarketState as af, type MarketStateValue as ag, MarketType as ah, type MarketTypeValue as ai, ODDS_SCALE as aj, PROGRAM_ID as ak, type PayoutClaimedEvent as al, type PlacePrivateBetParams as am, type PollEventsOptions as an, type PolledEvent as ao, type ProgressCallback as ap, type RefundClaimedEvent as aq, type ResolutionFlaggedEvent as ar, type ResolutionOverriddenEvent as as, type ResolveMarketParams as at, type SendIxOptions as au, type UpdateAcceptedMintParams as av, type UserCryptoKeypair as aw, type Wallet as ax, type WithdrawCreatorFundsParams as ay, adminClaimRemainingIx as az, type ClaimResult as b, fetchMxePublicKey as b0, fetchPosition as b1, fetchPositionsForMarket as b2, fetchUserPositions as b3, finalizeResolutionAction as b4, finalizeResolutionIx as b5, flagResolutionAction as b6, flagResolutionIx as b7, freshNonce as b8, initCompDefIx as b9, subscribeAll as bA, subscribeEvent as bB, updateAcceptedMintIx as bC, withdrawCreatorFundsAction as bD, withdrawCreatorFundsIx as bE, initializeIx as ba, keypairToWallet as bb, leBytesToBigInt as bc, onBetPlaced as bd, onCreatorWithdrawn as be, onMarketCancelled as bf, onMarketCreated as bg, onMarketFinalized as bh, onMarketResolved as bi, onPayoutClaimed as bj, onRefundClaimed as bk, onResolutionFlagged as bl, onResolutionOverridden as bm, parseLogs as bn, parseLogsFor as bo, placeBetAction as bp, placePrivateBetMultiIx as bq, placePrivateBetYesnoIx as br, pollEvents as bs, randomComputationOffset as bt, readonlyWallet as bu, resolveMarketAction as bv, resolveMarketMultiIx as bw, resolveMarketYesnoIx as bx, sendIx as by, sendIxAndAwaitArcium 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, CREATOR_BOND as x, type ClaimParams as y, type ClusterConfig as z };