# VIZ-JS-LIB Coverage Status

**Date:** 02.07.2026
**Based on:** viz-cpp-node documentation + Prediction Markets (Onix, HF14) integration spec

---

## Summary

| Category | Total | Implemented | Missing | Coverage |
|----------|-------|-------------|---------|----------|
| **Regular Operations** | 54 | 54 | 0 | 100% |
| **Virtual Operations** | 36 | 36 | 0 | 100% |
| **Plugin API Methods** | 117 | 115 | 2 | 98% |

Includes the HF14 Prediction Markets additions: 23 signed ops + `stakeholder_reward`
and 13 PM virtual ops in the serializer, and 29 `prediction_market_api` read methods.

**Overall Status:** ✅ **FULL COVERAGE**

---

## Prediction Markets (Onix, HF14)

Op-ids are the exact positions in the global `operation` static_variant (65–101),
so binary signing produces the correct varint tag. `stakeholder_reward` (65, virtual)
was added to close the gap before the PM range.

### Signed operations (`viz.broadcast.*`) — auth: active, except `pmDisputeVote` (regular)

| ID | Operation | Builder |
|----|-----------|---------|
| 66 | `pm_oracle_register` | `pmOracleRegister` |
| 67 | `pm_oracle_update` | `pmOracleUpdate` |
| 68 | `pm_create_market` | `pmCreateMarket` |
| 69 | `pm_oracle_accept_market` | `pmOracleAcceptMarket` |
| 70 | `pm_place_bet` | `pmPlaceBet` |
| 71 | `pm_commit_bet` | `pmCommitBet` |
| 72 | `pm_reveal_bet` | `pmRevealBet` |
| 73 | `pm_cancel_bet` | `pmCancelBet` |
| 74 | `pm_add_liquidity` | `pmAddLiquidity` |
| 75 | `pm_withdraw_liquidity` | `pmWithdrawLiquidity` |
| 76 | `pm_resolve_market` | `pmResolveMarket` |
| 77 | `pm_no_contest` | `pmNoContest` |
| 78 | `pm_dispute_create` | `pmDisputeCreate` |
| 79 | `pm_dispute_vote` *(regular)* | `pmDisputeVote` |
| 80 | `pm_dispute_resolve` | `pmDisputeResolve` |
| 81 | `pm_transfer_position` | `pmTransferPosition` |
| 82 | `pm_lazy_deposit` | `pmLazyDeposit` |
| 83 | `pm_lazy_withdraw` | `pmLazyWithdraw` |
| 91 | `pm_leverage_open` | `pmLeverageOpen` |
| 92 | `pm_leverage_close` | `pmLeverageClose` |
| 93 | `pm_leverage_convert` | `pmLeverageConvert` |
| 98 | `pm_dispute_oracle_respond` | `pmDisputeOracleRespond` |
| 99 | `pm_unban` | `pmUnban` |

### Virtual operations (serializer decode only)

`stakeholder_reward` (65), `pm_batch_settle` (84), `pm_commit_forfeit` (85),
`pm_auto_payout` (86), `pm_dispute_finalize` (87), `pm_dispute_auto_close` (88),
`pm_oracle_missed_penalty` (89), `pm_lazy_recall` (90), `pm_leverage_liquidate` (94),
`pm_leverage_resolve` (95), `pm_market_accepted` (96), `pm_payout` (97),
`pm_ban_expired` (100), `pm_market_expired` (101).

### API read methods (`viz.api.*`, plugin `prediction_market_api`)

`getMarket`, `listMarkets`, `listMarketsByOracle`, `listMarketsByCreator`,
`getMarketOutcomes`, `getMarketWeightSums`, `getMarketBets`, `getAccountPositions`,
`getMarketLiquidity`, `getMarketFull`, `getAccountLeveragePositions`,
`getMarketLeveragePositions`, `getCreatorBan`, `getLeverageQuote`,
`getLeverageClosePreview`, `getLeverageConvertPreview`, `getOracle`, `listOracles`,
`getDispute`, `getDisputeVotes`, `getLazyPool`, `getLazyDeposit`, `getLazyAllocations`,
`getMarketLazyAllocation`, `getPmChainProperties`, `getMarketMeta`,
`listMarketsByCategory`, `getMarketCategories`, `getMarketKline`.

### Chain properties & helpers

- `versioned_chain_properties_update` gains a `chain_properties_hf14` variant (tag 5)
  carrying the PM governance parameters (spec §9).
- `viz.formatter.predictionMarketCommitment(marketId, account, side, outcomeIndex, amount, minTokens, salt)`
  — byte-exact SHA-256 commitment for the commit-reveal flow.

### Delta — 2026-07 (oracle-accept window + lazy-pool min-fee)

Two consensus additions surfaced through existing read methods — no new signed op.
The serializer gained one virtual op (`pm_market_expired`, 101, added above).

- `getPmChainProperties` now also returns `pm_oracle_accept_window_sec` (uint32, seconds,
  default 3600) and `pm_lazy_min_liquidity_fee_percent` (uint16, bp, default 200). These are
  pass-through fields — no client code change needed to read them.
- `pm_market_object` now carries a read-only `accept_deadline` (time): `created_time +
  pm_oracle_accept_window_sec` on pending markets, `0` (epoch) on markets active at creation.
  Surfaced pass-through via `getMarket`/`getMarketFull`.
- `pm_market_expired` (vop 101): `oracle`, `creator`, `market_id` (int64),
  `refunded_liquidity` (asset) — emitted when the oracle-accept window lapses and the cron
  refunds the creator's seed liquidity (creation fee forfeited). A rejected market emits no
  vop — detect via `status = -1`.

---

## Regular Operations (Broadcastable)

All user-broadcastable operations are implemented.

| ID | Operation | Auth | Status | Serializer | Broadcast |
|----|-----------|------|--------|------------|-----------|
| 0 | `vote` *(deprecated)* | regular | ✅ Complete | ✅ | ✅ |
| 1 | `content` *(deprecated)* | regular | ✅ Complete | ✅ | ✅ |
| 2 | `transfer` | active/master | ✅ Complete | ✅ | ✅ |
| 3 | `transfer_to_vesting` | active | ✅ Complete | ✅ | ✅ |
| 4 | `withdraw_vesting` | active | ✅ Complete | ✅ | ✅ |
| 5 | `account_update` | master/active | ✅ Complete | ✅ | ✅ |
| 6 | `witness_update` | active | ✅ Complete | ✅ | ✅ |
| 7 | `account_witness_vote` | active | ✅ Complete | ✅ | ✅ |
| 8 | `account_witness_proxy` | active | ✅ Complete | ✅ | ✅ |
| 9 | `delete_content` *(deprecated)* | regular | ✅ Complete | ✅ | ✅ |
| 10 | `custom` | active/regular | ✅ Complete | ✅ | ✅ |
| 11 | `set_withdraw_vesting_route` | active | ✅ Complete | ✅ | ✅ |
| 12 | `request_account_recovery` | active | ✅ Complete | ✅ | ✅ |
| 13 | `recover_account` | master×2 | ✅ Complete | ✅ | ✅ |
| 14 | `change_recovery_account` | master | ✅ Complete | ✅ | ✅ |
| 15 | `escrow_transfer` | active | ✅ Complete | ✅ | ✅ |
| 16 | `escrow_dispute` | active | ✅ Complete | ✅ | ✅ |
| 17 | `escrow_release` | active | ✅ Complete | ✅ | ✅ |
| 18 | `escrow_approve` | active | ✅ Complete | ✅ | ✅ |
| 19 | `delegate_vesting_shares` | active | ✅ Complete | ✅ | ✅ |
| 20 | `account_create` | active | ✅ Complete | ✅ | ✅ |
| 21 | `account_metadata` | regular | ✅ Complete | ✅ | ✅ |
| 22 | `proposal_create` | active | ✅ Complete | ✅ | ✅ |
| 23 | `proposal_update` | varies | ✅ Complete | ✅ | ✅ |
| 24 | `proposal_delete` | active | ✅ Complete | ✅ | ✅ |
| 25 | `chain_properties_update` | active | ✅ Complete | ✅ | ✅ |
| 35 | `committee_worker_create_request` | regular | ✅ Complete | ✅ | ✅ |
| 36 | `committee_worker_cancel_request` | regular | ✅ Complete | ✅ | ✅ |
| 37 | `committee_vote_request` | regular | ✅ Complete | ✅ | ✅ |
| 43 | `create_invite` | active | ✅ Complete | ✅ | ✅ |
| 44 | `claim_invite_balance` | active | ✅ Complete | ✅ | ✅ |
| 45 | `invite_registration` | active | ✅ Complete | ✅ | ✅ |
| 46 | `versioned_chain_properties_update` | active | ✅ Complete | ✅ | ✅ |
| 47 | `award` | regular | ✅ Complete | ✅ | ✅ |
| 50 | `set_paid_subscription` | active | ✅ Complete | ✅ | ✅ |
| 51 | `paid_subscribe` | active | ✅ Complete | ✅ | ✅ |
| 54 | `set_account_price` | master | ✅ Complete | ✅ | ✅ |
| 55 | `set_subaccount_price` | master | ✅ Complete | ✅ | ✅ |
| 56 | `buy_account` | active | ✅ Complete | ✅ | ✅ |
| 58 | `use_invite_balance` | active | ✅ Complete | ✅ | ✅ |
| 60 | `fixed_award` | regular | ✅ Complete | ✅ | ✅ |
| 61 | `target_account_sale` | master | ✅ Complete | ✅ | ✅ |

---

## Virtual Operations (Read-Only)

All virtual operations have serializer definitions for parsing.

| ID | Operation | Trigger | Status | Serializer |
|----|-----------|---------|--------|------------|
| 26 | `author_reward` | Content payout | ✅ Complete | ✅ |
| 27 | `curation_reward` | Content payout | ✅ Complete | ✅ |
| 28 | `content_reward` | Content payout | ✅ Complete | ✅ |
| 29 | `fill_vesting_withdraw` | Withdrawal interval | ✅ Complete | ✅ |
| 30 | `shutdown_witness` | Witness deactivated | ✅ Complete | ✅ |
| 31 | `hardfork` | Hardfork activation | ✅ Complete | ✅ |
| 32 | `content_payout_update` | Content payout update | ✅ Complete | ✅ |
| 33 | `content_benefactor_reward` | Content payout | ✅ Complete | ✅ |
| 34 | `return_vesting_delegation` | Delegation limbo ends | ✅ Complete | ✅ |
| 38 | `committee_cancel_request` | Request expires | ✅ Complete | ✅ |
| 39 | `committee_approve_request` | Request approved | ✅ Complete | ✅ |
| 40 | `committee_payout_request` | Payout processed | ✅ Complete | ✅ |
| 41 | `committee_pay_request` | Worker paid | ✅ Complete | ✅ |
| 42 | `witness_reward` | Block produced | ✅ Complete | ✅ |
| 48 | `receive_award` | Award given | ✅ Complete | ✅ |
| 49 | `benefactor_award` | Award with beneficiary | ✅ Complete | ✅ |
| 52 | `paid_subscription_action` | Subscription payment | ✅ Complete | ✅ |
| 53 | `cancel_paid_subscription` | Subscription ends | ✅ Complete | ✅ |
| 57 | `account_sale` | Account sold | ✅ Complete | ✅ |
| 59 | `expire_escrow_ratification` | Escrow deadline missed | ✅ Complete | ✅ |
| 62 | `bid` | Bid placed (HF11) | ✅ Complete | ✅ |
| 63 | `outbid` | Outbid (HF11) | ✅ Complete | ✅ |

---

## Plugin API Coverage

### database_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_block_header` | ✅ | |
| `get_block` | ✅ | |
| `get_irreversible_block_header` | ✅ | |
| `get_irreversible_block` | ✅ | |
| `set_block_applied_callback` | ✅ | WebSocket subscription |
| `get_config` | ✅ | |
| `get_dynamic_global_properties` | ✅ | |
| `get_chain_properties` | ✅ | |
| `get_hardfork_version` | ✅ | |
| `get_next_scheduled_hardfork` | ✅ | |
| `get_accounts` | ✅ | |
| `lookup_account_names` | ✅ | |
| `lookup_accounts` | ✅ | |
| `get_account_count` | ✅ | |
| `get_owner_history` | ✅ | Legacy naming |
| `get_master_history` | ✅ | Current naming |
| `get_recovery_request` | ✅ | |
| `get_escrow` | ✅ | |
| `get_withdraw_routes` | ✅ | |
| `get_vesting_delegations` | ✅ | |
| `get_expiring_vesting_delegations` | ✅ | |
| `get_transaction_hex` | ✅ | |
| `get_required_signatures` | ✅ | |
| `get_potential_signatures` | ✅ | |
| `verify_authority` | ✅ | |
| `verify_account_authority` | ✅ | |
| `get_database_info` | ✅ | |
| `get_proposed_transaction` | ✅ | |
| `get_proposed_transactions` | ✅ | |
| `get_accounts_on_sale` | ✅ | |
| `get_accounts_on_auction` | ✅ | |
| `get_subaccounts_on_sale` | ✅ | |

### network_broadcast_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `broadcast_transaction` | ✅ | Async broadcast |
| `broadcast_transaction_synchronous` | ✅ | Wait for inclusion |
| `broadcast_transaction_with_callback` | ✅ | Callback on confirm |
| `broadcast_block` | ✅ | For witnesses |

### witness_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_active_witnesses` | ✅ | |
| `get_witness_schedule` | ✅ | |
| `get_witnesses` | ✅ | |
| `get_witness_by_account` | ✅ | |
| `get_witnesses_by_vote` | ✅ | |
| `get_witnesses_by_counted_vote` | ✅ | |
| `get_witness_count` | ✅ | |
| `lookup_witness_accounts` | ✅ | |
| `get_miner_queue` | ✅ | |

### account_by_key (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_key_references` | ✅ | |

### account_history (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_account_history` | ✅ | |

### operation_history (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_ops_in_block` | ✅ | |
| `get_transaction` | ✅ | |

### committee_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_committee_request` | ✅ | |
| `get_committee_request_votes` | ✅ | |
| `get_committee_requests_list` | ✅ | |

### invite_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_invites_list` | ✅ | |
| `get_invite_by_id` | ✅ | |
| `get_invite_by_key` | ✅ | |

### paid_subscription_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_paid_subscriptions` | ✅ | |
| `get_paid_subscription_options` | ✅ | |
| `get_paid_subscription_status` | ✅ | |
| `get_active_paid_subscriptions` | ✅ | |
| `get_inactive_paid_subscriptions` | ✅ | |

### custom_protocol_api (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_account` | ✅ | |

### auth_util (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `check_authority_signature` | ✅ | |

### block_info (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_block_info` | ✅ | |
| `get_blocks_with_info` | ✅ | |

### raw_block (Active)

| Method | Status | Notes |
|--------|--------|-------|
| `get_raw_block` | ✅ | |

### follow (Deprecated)

| Method | Status | Notes |
|--------|--------|-------|
| `get_followers` | ✅ | |
| `get_following` | ✅ | |
| `get_follow_count` | ✅ | |
| `get_feed_entries` | ✅ | |
| `get_feed` | ✅ | |
| `get_blog_entries` | ✅ | |
| `get_blog` | ✅ | |
| `get_reblogged_by` | ✅ | |
| `get_blog_authors` | ✅ | |

### tags (Deprecated)

| Method | Status | Notes |
|--------|--------|-------|
| `get_trending_tags` | ✅ | |
| `get_tags_used_by_author` | ✅ | |
| `get_discussions_by_payout` | ✅ | |
| `get_discussions_by_trending` | ✅ | |
| `get_discussions_by_created` | ✅ | |
| `get_discussions_by_active` | ✅ | |
| `get_discussions_by_cashout` | ✅ | |
| `get_discussions_by_votes` | ✅ | |
| `get_discussions_by_children` | ✅ | |
| `get_discussions_by_hot` | ✅ | |
| `get_discussions_by_feed` | ✅ | |
| `get_discussions_by_blog` | ✅ | |
| `get_discussions_by_contents` | ✅ | |
| `get_discussions_by_author_before_date` | ✅ | |
| `get_languages` | ✅ | |

### social_network (Deprecated)

| Method | Status | Notes |
|--------|--------|-------|
| `get_replies_by_last_update` | ✅ | |
| `get_content` | ✅ | |
| `get_content_replies` | ✅ | |
| `get_all_content_replies` | ✅ | |
| `get_active_votes` | ✅ | |
| `get_account_votes` | ✅ | |

### private_message (Deprecated - Not Implemented)

| Method | Status | Notes |
|--------|--------|-------|
| `get_inbox` | ⚠️ N/A | Deprecated plugin, not implemented |
| `get_outbox` | ⚠️ N/A | Deprecated plugin, not implemented |

---

## Plugin Status Summary

| Plugin | Status | API Methods | Category |
|--------|--------|-------------|----------|
| `chain` | Active | None | Core |
| `json_rpc` | Active | None | Core |
| `webserver` | Active | None | Infrastructure |
| `p2p` | Active | None | Infrastructure |
| `database_api` | ✅ Active | 32 | API |
| `network_broadcast_api` | ✅ Active | 4 | API |
| `witness_api` | ✅ Active | 9 | API |
| `account_by_key` | ✅ Active | 1 | Index/API |
| `account_history` | ✅ Active | 1 | Index/API |
| `operation_history` | ✅ Active | 2 | Index/API |
| `committee_api` | ✅ Active | 3 | API |
| `invite_api` | ✅ Active | 3 | API |
| `paid_subscription_api` | ✅ Active | 5 | API |
| `custom_protocol_api` | ✅ Active | 1 | API |
| `auth_util` | ✅ Active | 1 | API |
| `block_info` | ✅ Active | 2 | API |
| `raw_block` | ✅ Active | 1 | API |
| `follow` | ⚠️ Deprecated | 9 | Index/API |
| `tags` | ⚠️ Deprecated | 15 | Index/API |
| `social_network` | ⚠️ Deprecated | 6 | API |
| `private_message` | ⚠️ Deprecated | 0 (N/A) | Index/API |
| `witness` | Active | None | Producer |
| `debug_node` | Dev only | N/A | Debug |
| `mongo_db` | Active | None | External |

---

## Files Reference

| File | Description |
|------|-------------|
| `src/broadcast/operations.js` | Broadcast operation definitions with params and auth roles |
| `src/api/methods.js` | API method definitions for all plugins |
| `src/auth/serializer/src/operations.js` | Binary serialization definitions for all operations |

---

## Legend

- ✅ **Complete** - Fully implemented and working
- ⚠️ **Deprecated** - Working but deprecated in VIZ protocol
- ❌ **Missing** - Not implemented
- N/A - Not applicable

---

## Changes Made (03.03.2026)

Added missing API methods to `src/api/methods.js`:

1. **database_api**
   - `get_master_history` - Current naming for master key history
   - `set_block_applied_callback` - WebSocket block subscription

2. **auth_util**
   - `check_authority_signature` - Verify signature against authority

3. **block_info**
   - `get_block_info` - Extended block information
   - `get_blocks_with_info` - Multiple blocks with info

4. **raw_block**
   - `get_raw_block` - Raw serialized block data

**Note:** `private_message` plugin methods (`get_inbox`, `get_outbox`) are deprecated and intentionally not implemented.
