viz-js-lib 0.13.4 → 0.14.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.
- package/api-frontend/app.js +2 -0
- package/dist/statistics.html +1 -1
- package/dist/viz-tests.min.js +1 -1
- package/dist/viz-tests.min.js.gz +0 -0
- package/dist/viz.min.js +4 -4
- package/dist/viz.min.js.gz +0 -0
- package/lib/api/methods.js +9 -1
- package/lib/auth/serializer/src/ChainTypes.js +2 -0
- package/lib/auth/serializer/src/operations.js +18 -3
- package/lib/auth/serializer/src/types.js +12 -0
- package/lib/formatter.js +20 -5
- package/package.json +1 -1
- package/test/methods_by_version.js +2 -0
- package/test/pm_create_market_order_test.js +50 -0
- package/test/pm_dispute_oracle_history_test.js +66 -0
package/api-frontend/app.js
CHANGED
|
@@ -66,6 +66,7 @@ const METHODS = [
|
|
|
66
66
|
{api:"prediction_market_api",method:"get_market",params:["market_id"]},
|
|
67
67
|
{api:"prediction_market_api",method:"list_markets",params:["status","from","limit","show_risky"]},
|
|
68
68
|
{api:"prediction_market_api",method:"list_markets_by_oracle",params:["oracle","from","limit"]},
|
|
69
|
+
{api:"prediction_market_api",method:"list_markets_awaiting_resolution",params:["oracle","from","limit"]},
|
|
69
70
|
{api:"prediction_market_api",method:"list_markets_by_creator",params:["creator","from","limit"]},
|
|
70
71
|
{api:"prediction_market_api",method:"get_market_outcomes",params:["market_id"]},
|
|
71
72
|
{api:"prediction_market_api",method:"get_market_weight_sums",params:["market_id"]},
|
|
@@ -464,6 +465,7 @@ const SPEC = {
|
|
|
464
465
|
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
466
|
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
467
|
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"}}},
|
|
468
|
+
list_markets_awaiting_resolution: {d:"Lists markets awaiting this oracle's result: active markets whose betting window has closed (betting_expiration ≤ now) and are not yet resolved. Cheaper than scanning the oracle's full history — walks only the pending prefix.",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
469
|
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
470
|
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
471
|
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"}}},
|