viz-js-lib 0.13.2 → 0.13.4
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/api-frontend/app.js +61 -1
- package/api-frontend/jsonrpc-api-spec.json +685 -0
- package/dist/statistics.html +1 -1
- package/dist/viz-tests.min.js.gz +0 -0
- package/dist/viz.min.js.gz +0 -0
- package/package.json +1 -1
package/api-frontend/app.js
CHANGED
|
@@ -62,7 +62,36 @@ const METHODS = [
|
|
|
62
62
|
{api:"auth_util",method:"check_authority_signature",params:["account_name","level","signatures"]},
|
|
63
63
|
{api:"block_info",method:"get_block_info",params:["start_block_num","count"]},
|
|
64
64
|
{api:"block_info",method:"get_blocks_with_info",params:["start_block_num","count"]},
|
|
65
|
-
{api:"raw_block",method:"get_raw_block",params:["block_num"]}
|
|
65
|
+
{api:"raw_block",method:"get_raw_block",params:["block_num"]},
|
|
66
|
+
{api:"prediction_market_api",method:"get_market",params:["market_id"]},
|
|
67
|
+
{api:"prediction_market_api",method:"list_markets",params:["status","from","limit","show_risky"]},
|
|
68
|
+
{api:"prediction_market_api",method:"list_markets_by_oracle",params:["oracle","from","limit"]},
|
|
69
|
+
{api:"prediction_market_api",method:"list_markets_by_creator",params:["creator","from","limit"]},
|
|
70
|
+
{api:"prediction_market_api",method:"get_market_outcomes",params:["market_id"]},
|
|
71
|
+
{api:"prediction_market_api",method:"get_market_weight_sums",params:["market_id"]},
|
|
72
|
+
{api:"prediction_market_api",method:"get_market_bets",params:["market_id","from","limit"]},
|
|
73
|
+
{api:"prediction_market_api",method:"get_account_positions",params:["account","from","limit"]},
|
|
74
|
+
{api:"prediction_market_api",method:"get_market_liquidity",params:["market_id","from","limit"]},
|
|
75
|
+
{api:"prediction_market_api",method:"get_market_full",params:["market_id","account"]},
|
|
76
|
+
{api:"prediction_market_api",method:"get_account_leverage_positions",params:["account","from","limit"]},
|
|
77
|
+
{api:"prediction_market_api",method:"get_market_leverage_positions",params:["market_id","from","limit"]},
|
|
78
|
+
{api:"prediction_market_api",method:"get_creator_ban",params:["account"]},
|
|
79
|
+
{api:"prediction_market_api",method:"get_leverage_quote",params:["market_id","outcome_index","collateral"]},
|
|
80
|
+
{api:"prediction_market_api",method:"get_leverage_close_preview",params:["position_id"]},
|
|
81
|
+
{api:"prediction_market_api",method:"get_leverage_convert_preview",params:["position_id"]},
|
|
82
|
+
{api:"prediction_market_api",method:"get_oracle",params:["owner"]},
|
|
83
|
+
{api:"prediction_market_api",method:"list_oracles",params:["from","limit"]},
|
|
84
|
+
{api:"prediction_market_api",method:"get_dispute",params:["market_id"]},
|
|
85
|
+
{api:"prediction_market_api",method:"get_dispute_votes",params:["market_id"]},
|
|
86
|
+
{api:"prediction_market_api",method:"get_lazy_pool"},
|
|
87
|
+
{api:"prediction_market_api",method:"get_lazy_deposit",params:["account"]},
|
|
88
|
+
{api:"prediction_market_api",method:"get_lazy_allocations",params:["from","limit"]},
|
|
89
|
+
{api:"prediction_market_api",method:"get_market_lazy_allocation",params:["market_id"]},
|
|
90
|
+
{api:"prediction_market_api",method:"get_pm_chain_properties"},
|
|
91
|
+
{api:"prediction_market_api",method:"get_market_meta",params:["market_id"]},
|
|
92
|
+
{api:"prediction_market_api",method:"list_markets_by_category",params:["category","from","limit","jurisdiction","subcategory","tag","sort"]},
|
|
93
|
+
{api:"prediction_market_api",method:"get_market_categories"},
|
|
94
|
+
{api:"prediction_market_api",method:"get_market_kline",params:["market_id","from","limit"]},
|
|
66
95
|
];
|
|
67
96
|
|
|
68
97
|
// ─── Derived structures ─────────────────────────────────────────────────────
|
|
@@ -430,6 +459,37 @@ const SPEC = {
|
|
|
430
459
|
},
|
|
431
460
|
raw_block: {
|
|
432
461
|
get_raw_block: {d:"Returns a raw block by block number, including the base64-encoded serialized binary.",p:{block_num:{c:"Block Number",d:"Height of the block to retrieve in raw form."}}}
|
|
462
|
+
},
|
|
463
|
+
prediction_market_api: {
|
|
464
|
+
get_market: {d:"Returns the prediction market object for the given ID. Throws if the market does not exist.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
465
|
+
list_markets: {d:"Lists markets filtered by status, paginated. show_risky reveals under-insured markets.",p:{status:{c:"Status",d:"Market status filter (numeric enum).",t:"integer"},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"},show_risky:{c:"Show risky",d:"Include under-insured (risky) markets; defaults to false.",t:"boolean"}}},
|
|
466
|
+
list_markets_by_oracle: {d:"Lists markets assigned to the given oracle account, paginated.",p:{oracle:{c:"Oracle",d:"Oracle account name."},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
467
|
+
list_markets_by_creator: {d:"Lists markets created by the given account, paginated.",p:{creator:{c:"Creator",d:"Market creator account name."},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
468
|
+
get_market_outcomes: {d:"Returns the outcome objects of a market (empty for binary markets).",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
469
|
+
get_market_weight_sums: {d:"Returns per-outcome amount and curve weight sums for a market.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
470
|
+
get_market_bets: {d:"Lists the bets placed on a market, paginated.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
471
|
+
get_account_positions: {d:"Returns an account's market positions (bet, expected_payout, market_status, resolved_outcome), paginated.",p:{account:{c:"Account",d:"VIZ account name."},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
472
|
+
get_market_liquidity: {d:"Lists liquidity-provider entries for a market, paginated.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
473
|
+
get_market_full: {d:"Enriched market view (market, outcomes, weight_sums, oracle, meta); when an account is given, also that account's positions, leverage and LP.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},account:{c:"Account",d:"VIZ account name."}}},
|
|
474
|
+
get_account_leverage_positions: {d:"Lists an account's leverage positions, paginated.",p:{account:{c:"Account",d:"VIZ account name."},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
475
|
+
get_market_leverage_positions: {d:"Lists leverage positions open on a market, paginated.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
476
|
+
get_creator_ban: {d:"Returns the market-creation ban record for an account. Throws if there is none.",p:{account:{c:"Account",d:"VIZ account name."}}},
|
|
477
|
+
get_leverage_quote: {d:"Read-only projection of leverage margin math: max leverage, up to 12 slider stops, and failed_constraints.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},outcome_index:{c:"Outcome index",d:"Index of the outcome within the market.",t:"integer"},collateral:{c:"Collateral",d:"Collateral amount (integer shares).",t:"integer"}}},
|
|
478
|
+
get_leverage_close_preview: {d:"Read-only preview of closing a leverage position.",p:{position_id:{c:"Position ID",d:"Leverage position object ID.",t:"integer"}}},
|
|
479
|
+
get_leverage_convert_preview: {d:"Read-only preview of converting a leverage position.",p:{position_id:{c:"Position ID",d:"Leverage position object ID.",t:"integer"}}},
|
|
480
|
+
get_oracle: {d:"Returns an oracle account with its non-consensus reliability_score (basis points). Throws if there is none.",p:{owner:{c:"Owner",d:"Oracle owner account name."}}},
|
|
481
|
+
list_oracles: {d:"Lists registered oracle accounts, paginated.",p:{from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
482
|
+
get_dispute: {d:"Returns the dispute object for a market. Throws if there is none.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
483
|
+
get_dispute_votes: {d:"Returns dispute votes with legacy tally and a stake-weighted quorum/verdict projection; returns a default object when there is no dispute.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
484
|
+
get_lazy_pool: {d:"Returns the global lazy pool object."},
|
|
485
|
+
get_lazy_deposit: {d:"Returns an account's lazy deposit. Throws if there is none.",p:{account:{c:"Account",d:"VIZ account name."}}},
|
|
486
|
+
get_lazy_allocations: {d:"Lists lazy-pool allocations, paginated.",p:{from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}},
|
|
487
|
+
get_market_lazy_allocation: {d:"Returns the lazy allocation for a market. Throws if there is none.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
488
|
+
get_pm_chain_properties: {d:"Returns the median-voted prediction-market governance chain properties."},
|
|
489
|
+
get_market_meta: {d:"Returns the off-chain (non-consensus, prunable) metadata for a market. Throws if there is none.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"}}},
|
|
490
|
+
list_markets_by_category: {d:"Lists markets in a taxonomy category with optional jurisdiction/subcategory/tag filters and sort order.",p:{category:{c:"Category",d:"Taxonomy category name."},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"},jurisdiction:{c:"Jurisdiction",d:"Optional jurisdiction filter; defaults to empty."},subcategory:{c:"Subcategory",d:"Optional subcategory filter; defaults to empty."},tag:{c:"Tag",d:"Optional tag filter; defaults to empty."},sort:{c:"Sort",d:"Sort order: newest | oldest | volume | expiration; defaults to newest."}}},
|
|
491
|
+
get_market_categories: {d:"Returns market categories and subcategory counts plus the top-20 hot tags."},
|
|
492
|
+
get_market_kline: {d:"Returns time-series weight snapshots (k-line) for a market, paged offset-from-newest.",p:{market_id:{c:"Market ID",d:"Prediction market object ID.",t:"integer"},from:{c:"From",d:"Pagination start offset (0-based).",t:"integer"},limit:{c:"Limit",d:"Maximum rows to return (≤ 1000).",t:"integer"}}}
|
|
433
493
|
}
|
|
434
494
|
};
|
|
435
495
|
function getMethodSpec(plugin, method) {
|