viz-js-lib 0.12.7 → 0.13.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.
@@ -1,7 +1,7 @@
1
1
  # VIZ-JS-LIB Coverage Status
2
2
 
3
- **Date:** 03.03.2026
4
- **Based on:** viz-cpp-node documentation
3
+ **Date:** 02.07.2026
4
+ **Based on:** viz-cpp-node documentation + Prediction Markets (Onix, HF14) integration spec
5
5
 
6
6
  ---
7
7
 
@@ -9,14 +9,79 @@
9
9
 
10
10
  | Category | Total | Implemented | Missing | Coverage |
11
11
  |----------|-------|-------------|---------|----------|
12
- | **Regular Operations** | 31 | 31 | 0 | 100% |
13
- | **Virtual Operations** | 22 | 22 | 0 | 100% |
14
- | **Plugin API Methods** | 88 | 86 | 2 | 98% |
12
+ | **Regular Operations** | 54 | 54 | 0 | 100% |
13
+ | **Virtual Operations** | 35 | 35 | 0 | 100% |
14
+ | **Plugin API Methods** | 117 | 115 | 2 | 98% |
15
+
16
+ Includes the HF14 Prediction Markets additions: 23 signed ops + `stakeholder_reward`
17
+ and 12 PM virtual ops in the serializer, and 29 `prediction_market_api` read methods.
15
18
 
16
19
  **Overall Status:** ✅ **FULL COVERAGE**
17
20
 
18
21
  ---
19
22
 
23
+ ## Prediction Markets (Onix, HF14)
24
+
25
+ Op-ids are the exact positions in the global `operation` static_variant (65–100),
26
+ so binary signing produces the correct varint tag. `stakeholder_reward` (65, virtual)
27
+ was added to close the gap before the PM range.
28
+
29
+ ### Signed operations (`viz.broadcast.*`) — auth: active, except `pmDisputeVote` (regular)
30
+
31
+ | ID | Operation | Builder |
32
+ |----|-----------|---------|
33
+ | 66 | `pm_oracle_register` | `pmOracleRegister` |
34
+ | 67 | `pm_oracle_update` | `pmOracleUpdate` |
35
+ | 68 | `pm_create_market` | `pmCreateMarket` |
36
+ | 69 | `pm_oracle_accept_market` | `pmOracleAcceptMarket` |
37
+ | 70 | `pm_place_bet` | `pmPlaceBet` |
38
+ | 71 | `pm_commit_bet` | `pmCommitBet` |
39
+ | 72 | `pm_reveal_bet` | `pmRevealBet` |
40
+ | 73 | `pm_cancel_bet` | `pmCancelBet` |
41
+ | 74 | `pm_add_liquidity` | `pmAddLiquidity` |
42
+ | 75 | `pm_withdraw_liquidity` | `pmWithdrawLiquidity` |
43
+ | 76 | `pm_resolve_market` | `pmResolveMarket` |
44
+ | 77 | `pm_no_contest` | `pmNoContest` |
45
+ | 78 | `pm_dispute_create` | `pmDisputeCreate` |
46
+ | 79 | `pm_dispute_vote` *(regular)* | `pmDisputeVote` |
47
+ | 80 | `pm_dispute_resolve` | `pmDisputeResolve` |
48
+ | 81 | `pm_transfer_position` | `pmTransferPosition` |
49
+ | 82 | `pm_lazy_deposit` | `pmLazyDeposit` |
50
+ | 83 | `pm_lazy_withdraw` | `pmLazyWithdraw` |
51
+ | 91 | `pm_leverage_open` | `pmLeverageOpen` |
52
+ | 92 | `pm_leverage_close` | `pmLeverageClose` |
53
+ | 93 | `pm_leverage_convert` | `pmLeverageConvert` |
54
+ | 98 | `pm_dispute_oracle_respond` | `pmDisputeOracleRespond` |
55
+ | 99 | `pm_unban` | `pmUnban` |
56
+
57
+ ### Virtual operations (serializer decode only)
58
+
59
+ `stakeholder_reward` (65), `pm_batch_settle` (84), `pm_commit_forfeit` (85),
60
+ `pm_auto_payout` (86), `pm_dispute_finalize` (87), `pm_dispute_auto_close` (88),
61
+ `pm_oracle_missed_penalty` (89), `pm_lazy_recall` (90), `pm_leverage_liquidate` (94),
62
+ `pm_leverage_resolve` (95), `pm_market_accepted` (96), `pm_payout` (97),
63
+ `pm_ban_expired` (100).
64
+
65
+ ### API read methods (`viz.api.*`, plugin `prediction_market_api`)
66
+
67
+ `getMarket`, `listMarkets`, `listMarketsByOracle`, `listMarketsByCreator`,
68
+ `getMarketOutcomes`, `getMarketWeightSums`, `getMarketBets`, `getAccountPositions`,
69
+ `getMarketLiquidity`, `getMarketFull`, `getAccountLeveragePositions`,
70
+ `getMarketLeveragePositions`, `getCreatorBan`, `getLeverageQuote`,
71
+ `getLeverageClosePreview`, `getLeverageConvertPreview`, `getOracle`, `listOracles`,
72
+ `getDispute`, `getDisputeVotes`, `getLazyPool`, `getLazyDeposit`, `getLazyAllocations`,
73
+ `getMarketLazyAllocation`, `getPmChainProperties`, `getMarketMeta`,
74
+ `listMarketsByCategory`, `getMarketCategories`, `getMarketKline`.
75
+
76
+ ### Chain properties & helpers
77
+
78
+ - `versioned_chain_properties_update` gains a `chain_properties_hf14` variant (tag 5)
79
+ carrying the PM governance parameters (spec §9).
80
+ - `viz.formatter.predictionMarketCommitment(marketId, account, side, outcomeIndex, amount, minTokens, salt)`
81
+ — byte-exact SHA-256 commitment for the commit-reveal flow.
82
+
83
+ ---
84
+
20
85
  ## Regular Operations (Broadcastable)
21
86
 
22
87
  All user-broadcastable operations are implemented.