@orangecharts/wrun-chart-host 0.8.0 → 0.9.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/README.md +2 -1
- package/dist/constants/feature-flags.constants.d.ts +4 -0
- package/dist/constants/feature-flags.constants.js +27 -0
- package/dist/constants/marketCapabilities.constants.d.ts +14 -9
- package/dist/constants/marketCapabilities.constants.js +36 -13
- package/dist/constants/opra-compliance.constants.d.ts +14 -0
- package/dist/constants/opra-compliance.constants.js +14 -0
- package/dist/constants/option-venues.constants.d.ts +11 -6
- package/dist/constants/option-venues.constants.js +5 -2
- package/dist/host-env.d.ts +10 -4
- package/dist/host-ports.types.d.ts +39 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
- package/dist/interfaces/opra-realtime.interface.js +10 -10
- package/dist/interfaces/wrun-runtime.interface.d.ts +34 -13
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +53 -10
- package/dist/kscript-data/controls/live-trades-merge.util.js +81 -16
- package/dist/market-data/billing.interface.d.ts +138 -17
- package/dist/market-data/billing.interface.js +25 -8
- package/dist/market-data/venues/index.d.ts +3 -3
- package/dist/market-data/venues/opra.contract.copy.json +5 -3
- package/dist/market-data/venues/opra.d.ts +3 -3
- package/dist/market-data/venues/opra.js +5 -4
- package/dist/replay/replayLadder.js +3 -1
- package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
- package/dist/utility/chart/crypto-index.leaf.js +2 -2
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +5 -2
- package/dist/utility/chart/index-mode.util.js +23 -13
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +28 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +30 -24
- package/dist/utility/chart/marketKind.util.d.ts +12 -10
- package/dist/utility/chart/marketKind.util.js +17 -7
- package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
- package/dist/utility/chart/om-panel-push-style.util.js +17 -15
- package/dist/utility/chart/om-panel.util.js +6 -6
- package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
- package/dist/utility/chart/profile-block-size.util.js +7 -0
- package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
- package/dist/utility/chart/quote-perp.leaf.js +20 -0
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -0
- package/dist/utility/chart/wrun-run-result.util.js +4 -1
- package/dist/utility/common/transformations.util.d.ts +7 -0
- package/dist/utility/common/transformations.util.js +11 -0
- package/dist/utility/options/option-venue.util.d.ts +3 -3
- package/dist/utility/options/option-venue.util.js +3 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +1 -1
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
- package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +13 -5
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +11 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +63 -9
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +8 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +12 -0
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +5 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +11 -5
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +31 -10
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +33 -1
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +95 -6
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +25 -5
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +55 -18
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +146 -40
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
- package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +147 -9
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +345 -11
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
- package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +92 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +122 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
- package/dist/utility/wrun/wrun-frames.js +5 -5
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +33 -17
- package/dist/utility/wrun/wrun-hud-looks.util.js +30 -16
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-live-intake.util.js +136 -21
- package/dist/utility/wrun/wrun-live-tick.util.js +91 -38
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +166 -48
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +216 -33
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +314 -56
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
- package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +3 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +55 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +51 -7
- package/dist/utility/wrun/wrun-option-views.util.js +151 -28
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +34 -6
- package/dist/utility/wrun/wrun-overlay-run.util.js +416 -171
- package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
- package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
- package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-pack.util.js +20 -9
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +27 -15
- package/dist/utility/wrun/wrun-panel-style.util.js +42 -20
- package/dist/utility/wrun/wrun-param-map.util.d.ts +7 -6
- package/dist/utility/wrun/wrun-param-map.util.js +8 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +10 -2
- package/dist/utility/wrun/wrun-param-values.util.js +2 -0
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
- package/dist/utility/wrun/wrun-refusal.util.js +10 -1
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +92 -40
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
- package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
- package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
- package/dist/workers/utils/volume-profile.worker.util.js +5 -2
- package/dist/workers/wrun/wrun-abi-host.js +3 -2
- package/package.json +11 -11
|
@@ -2,6 +2,7 @@ import { MARKET_CAPABILITIES, ONCHAIN_POOL_CAPABILITIES, } from '../../constants
|
|
|
2
2
|
import { isBlkExchange } from '../blk-market.util.js';
|
|
3
3
|
import { ECONOMIC_EXCHANGES, FRED_EXCHANGE } from '../../constants/economic.constants.js';
|
|
4
4
|
import { CRYPTO_INDEX_EXCHANGES } from './crypto-index.leaf.js';
|
|
5
|
+
import { QUOTE_PERP_EXCHANGES } from './quote-perp.leaf.js';
|
|
5
6
|
import { isCmeGoverned, normalizeExchangeCode } from './cme-realtime.util.js';
|
|
6
7
|
import { isGovernedPlaneExchange } from '../v2/gate-plane.util.js';
|
|
7
8
|
import { isOmTargetPane } from './om-target.util.js';
|
|
@@ -80,6 +81,11 @@ const EXCHANGE_TO_KIND = {
|
|
|
80
81
|
// Crypto-wide indices (CRYPTOCAP): value prints 24/7 with no trades,
|
|
81
82
|
// volume or book behind them (crypto-index.leaf owns the list).
|
|
82
83
|
...Object.fromEntries(CRYPTO_INDEX_EXCHANGES.map((code) => [code, 'cryptoIndex'])),
|
|
84
|
+
// Perpetual venues that publish quotes, never trades (Variational): TICKER
|
|
85
|
+
// candles and prints, funding and open interest, no trades, volume or book
|
|
86
|
+
// (quote-perp.leaf owns the list). Unlisted, they read as crypto and ask for
|
|
87
|
+
// trades the gateway never serves them.
|
|
88
|
+
...Object.fromEntries(QUOTE_PERP_EXCHANGES.map((code) => [code, 'quotePerp'])),
|
|
83
89
|
// Polymarket
|
|
84
90
|
POLYMARKET: 'polymarket',
|
|
85
91
|
// Hip3 (Hyperliquid synthetic derivatives)
|
|
@@ -285,8 +291,9 @@ export function checkIsForexCommodityOrFutures(exchange) {
|
|
|
285
291
|
* the engine's `'fred'` (single-value series treatment); `'cryptoIndex'`
|
|
286
292
|
* maps to `'crypto'`: the indices print 24/7 (about every 250 ms after a
|
|
287
293
|
* price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
|
|
288
|
-
* treatment's own shape, gap policy included.
|
|
289
|
-
* the
|
|
294
|
+
* treatment's own shape, gap policy included. `'quotePerp'` maps to
|
|
295
|
+
* `'crypto'` too: its perpetuals quote around the clock onto uniform minute
|
|
296
|
+
* bars. FE-internal code always sees the honest venue kind.
|
|
290
297
|
*/
|
|
291
298
|
export function toTitanMarketKind(kind) {
|
|
292
299
|
if (kind === 'futures' || kind === 'options')
|
|
@@ -295,18 +302,21 @@ export function toTitanMarketKind(kind) {
|
|
|
295
302
|
return 'polymarket';
|
|
296
303
|
if (kind === 'economic')
|
|
297
304
|
return 'fred';
|
|
298
|
-
if (kind === 'cryptoIndex')
|
|
305
|
+
if (kind === 'cryptoIndex' || kind === 'quotePerp')
|
|
299
306
|
return 'crypto';
|
|
300
307
|
return kind;
|
|
301
308
|
}
|
|
302
309
|
/**
|
|
303
310
|
* True when TitanCharts must omit the dedicated 'volume' legend overlay:
|
|
304
|
-
* economic series, forex/commodity venues
|
|
305
|
-
* per-bar volume. Governed CME futures
|
|
306
|
-
* bars, so they keep it.
|
|
311
|
+
* economic series, forex/commodity venues, the crypto indices and the
|
|
312
|
+
* quote-priced perpetual venues ship no per-bar volume. Governed CME futures
|
|
313
|
+
* DO ship contracts volume on TRADE_AGG bars, so they keep it.
|
|
307
314
|
*/
|
|
308
315
|
export function venueOmitsVolumeOverlay(exchange) {
|
|
309
|
-
|
|
316
|
+
if (checkIsEconomic(exchange) || checkIsForexOrCommodity(exchange))
|
|
317
|
+
return true;
|
|
318
|
+
const kind = getMarketKind(exchange);
|
|
319
|
+
return kind === 'cryptoIndex' || kind === 'quotePerp';
|
|
310
320
|
}
|
|
311
321
|
export function checkIsDex(exchange) {
|
|
312
322
|
return getMarketKind(exchange) === 'dex';
|
|
@@ -43,13 +43,13 @@ export declare function invalidSeriesStyleWord(series: Record<string, unknown>,
|
|
|
43
43
|
* style word it does not declare (a declared word always wins). Tuned against the approved mock
|
|
44
44
|
* (openmarket mocks/yzi-chart-style), within what the engine draws:
|
|
45
45
|
*
|
|
46
|
-
* - bars, histogram
|
|
47
|
-
*
|
|
48
|
-
* -
|
|
49
|
-
* `
|
|
50
|
-
* -
|
|
51
|
-
*
|
|
52
|
-
*
|
|
46
|
+
* - bars, histogram, line, scatter: no chrome word, so the plain default both lanes share
|
|
47
|
+
* (`hairlines`, wrunPanelChrome): value hairlines, no frame, no vertical grid.
|
|
48
|
+
* - bars, histogram: bars at about half their slot with a rounded data end (`bar_width`,
|
|
49
|
+
* `bar_radius`).
|
|
50
|
+
* - line: a smoothed stroke and a fading fill.
|
|
51
|
+
* - scatter: points in the engine's own default teal at half opacity, so a dense cloud reads as
|
|
52
|
+
* density. A row's own colour wins.
|
|
53
53
|
* - pie: no frame, 2 px gaps between slices and the total in the hole when the pie has one.
|
|
54
54
|
* Slices keep their leader-line labels (name and percent); a pie that declares
|
|
55
55
|
* `legend_style: 'title'` lists them as chips beside the title instead, as on the wrun lane
|
|
@@ -63,6 +63,8 @@ const guide = shape({
|
|
|
63
63
|
const ALL = ['bars', 'line', 'scatter', 'histogram', 'pie', 'heatmap', 'table', 'tiles'];
|
|
64
64
|
const AXIS = ['line', 'bars', 'histogram', 'scatter'];
|
|
65
65
|
const BARS = ['bars', 'histogram'];
|
|
66
|
+
/** A chrome word the sheet type gains without a key here fails to compile. */
|
|
67
|
+
const CHROME_WORDS = Object.keys({ box: 1, grid: 1, none: 1, hairlines: 1 });
|
|
66
68
|
/** Every panel style word: its valid values and the kinds it applies to (the SDK's table, plus
|
|
67
69
|
* the two bar words). A word the interface gains without a rule here fails to compile. */
|
|
68
70
|
const PANEL_WORD_RULES = {
|
|
@@ -71,7 +73,7 @@ const PANEL_WORD_RULES = {
|
|
|
71
73
|
stats_row: { kinds: ['line'], valid: bool },
|
|
72
74
|
font_family: { kinds: ALL, valid: oneOf(WRUN_FONT_FAMILIES) },
|
|
73
75
|
hover_card: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie', 'heatmap', 'tiles'], valid: bool },
|
|
74
|
-
chrome: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie'], valid: oneOf(
|
|
76
|
+
chrome: { kinds: ['line', 'bars', 'histogram', 'scatter', 'pie'], valid: oneOf(CHROME_WORDS) },
|
|
75
77
|
format: { kinds: ALL, valid: format },
|
|
76
78
|
decimals: { kinds: ALL, valid: decimals },
|
|
77
79
|
signed: { kinds: ALL, valid: bool },
|
|
@@ -192,8 +194,8 @@ export const PANEL_SERIES_STYLE_WORDS = new Set(Object.keys(SERIES_WORD_RULES));
|
|
|
192
194
|
/** The words the kit does not validate yet: checked on the wrun lane too. */
|
|
193
195
|
const APP_CHECKED_WORDS = new Set(['bar_width', 'bar_radius']);
|
|
194
196
|
/** The SDK's conditions past the kind table: x words need a numeric x (or a scatter), the side
|
|
195
|
-
* box needs place side, a pie
|
|
196
|
-
* one (wrunPanelAllowsWord and refineWrunPanelStyle). */
|
|
197
|
+
* box needs place side, a pie's chrome is box or none, chips are a line legend and pane a line or
|
|
198
|
+
* bars one (wrunPanelAllowsWord and refineWrunPanelStyle). */
|
|
197
199
|
function fitsPanel(scope, word, value) {
|
|
198
200
|
const numeric = scope.x === 'index' || scope.x === 'number';
|
|
199
201
|
switch (word) {
|
|
@@ -207,7 +209,7 @@ function fitsPanel(scope, word, value) {
|
|
|
207
209
|
case 'height_px':
|
|
208
210
|
return scope.place === 'side';
|
|
209
211
|
case 'chrome':
|
|
210
|
-
return
|
|
212
|
+
return scope.kind !== 'pie' || value === 'box' || value === 'none';
|
|
211
213
|
case 'legend_style':
|
|
212
214
|
if (value === 'chips')
|
|
213
215
|
return scope.kind === 'line';
|
|
@@ -250,13 +252,13 @@ export function invalidSeriesStyleWord(series, kind) {
|
|
|
250
252
|
* style word it does not declare (a declared word always wins). Tuned against the approved mock
|
|
251
253
|
* (openmarket mocks/yzi-chart-style), within what the engine draws:
|
|
252
254
|
*
|
|
253
|
-
* - bars, histogram
|
|
254
|
-
*
|
|
255
|
-
* -
|
|
256
|
-
* `
|
|
257
|
-
* -
|
|
258
|
-
*
|
|
259
|
-
*
|
|
255
|
+
* - bars, histogram, line, scatter: no chrome word, so the plain default both lanes share
|
|
256
|
+
* (`hairlines`, wrunPanelChrome): value hairlines, no frame, no vertical grid.
|
|
257
|
+
* - bars, histogram: bars at about half their slot with a rounded data end (`bar_width`,
|
|
258
|
+
* `bar_radius`).
|
|
259
|
+
* - line: a smoothed stroke and a fading fill.
|
|
260
|
+
* - scatter: points in the engine's own default teal at half opacity, so a dense cloud reads as
|
|
261
|
+
* density. A row's own colour wins.
|
|
260
262
|
* - pie: no frame, 2 px gaps between slices and the total in the hole when the pie has one.
|
|
261
263
|
* Slices keep their leader-line labels (name and percent); a pie that declares
|
|
262
264
|
* `legend_style: 'title'` lists them as chips beside the title instead, as on the wrun lane
|
|
@@ -266,10 +268,10 @@ export function invalidSeriesStyleWord(series, kind) {
|
|
|
266
268
|
* - heatmap, tiles: no word to quiet them; today's look stands.
|
|
267
269
|
*/
|
|
268
270
|
export const OM_PANEL_QUIET_DEFAULTS = {
|
|
269
|
-
bars: {
|
|
270
|
-
histogram: {
|
|
271
|
-
line: {
|
|
272
|
-
scatter: {
|
|
271
|
+
bars: { bar_width: 0.52, bar_radius: 3 },
|
|
272
|
+
histogram: { bar_width: 0.52, bar_radius: 3 },
|
|
273
|
+
line: { smooth: true, fill_fade: true },
|
|
274
|
+
scatter: { color: '#43d3c380' },
|
|
273
275
|
pie: { chrome: 'none', slice_gap: 2 },
|
|
274
276
|
table: { border_width: 0, grid_lines: 'rows', grid_width: 1 },
|
|
275
277
|
};
|
|
@@ -60,7 +60,6 @@ const FONT_WEIGHTS = new Set(['normal', 'medium', 'bold']);
|
|
|
60
60
|
const VALUE_FORMATS = new Set(WRUN_VALUE_FORMATS);
|
|
61
61
|
/** The pane kinds whose `chrome` word reaches the engine as `chromeStyle`. */
|
|
62
62
|
const CHROME_KINDS = new Set(['line', 'bars', 'histogram', 'scatter', 'pie']);
|
|
63
|
-
const DEFAULT_HEATMAP_PALETTE = ['#e06c75', '#7a7f93', '#98c379'];
|
|
64
63
|
/** Chart-shaped panels (bars, curves, scatter, pie, heatmap, tiles) keep one weight below the chart. */
|
|
65
64
|
export const PANEL_CHART_GRID_HEIGHT = 0.22;
|
|
66
65
|
/** The engine's table defaults: 12 px text with 8 px cell padding gives 28 px rows, 8 px edge padding. */
|
|
@@ -674,9 +673,10 @@ export function translatePanelToEngine(frame, ctx = {}) {
|
|
|
674
673
|
let settings;
|
|
675
674
|
if (panel.x === 'time') {
|
|
676
675
|
const sorted = [...rows].sort((a, b) => a[0] - b[0]);
|
|
677
|
-
if (effective
|
|
678
|
-
// The rich curve
|
|
679
|
-
//
|
|
676
|
+
if (effective !== 'box') {
|
|
677
|
+
// The rich curve (every chrome but box, the hairlines default too)
|
|
678
|
+
// spaces points by their time (gaps stay gaps) and labels the axis
|
|
679
|
+
// in the chart's display timezone (SC37).
|
|
680
680
|
panelRows = sorted.map((row) => [timeKeyMs(row[0]), ...row.slice(1)]);
|
|
681
681
|
settings = {
|
|
682
682
|
series,
|
|
@@ -770,11 +770,11 @@ export function translatePanelToEngine(frame, ctx = {}) {
|
|
|
770
770
|
const yKeys = [...new Set(rows.map((row) => row[1]))];
|
|
771
771
|
const xIndices = new Map(xKeys.map((key, index) => [key, index]));
|
|
772
772
|
const yIndices = new Map(yKeys.map((key, index) => [key, index]));
|
|
773
|
+
// The palette is the heatmap mapper's (wrunHeatmapStyle: the declared or
|
|
774
|
+
// default stops; none under the engine's signed scale, SC06).
|
|
773
775
|
const settings = {
|
|
774
776
|
rowLabels: yKeys.map(String),
|
|
775
777
|
colLabels: xKeys.map(String),
|
|
776
|
-
// The signed scale is the engine's own diverging default (SC06).
|
|
777
|
-
...(panel.scale === 'signed' ? {} : { palette: [...DEFAULT_HEATMAP_PALETTE] }),
|
|
778
778
|
fontFamily,
|
|
779
779
|
};
|
|
780
780
|
const result = finish('matrix', rows.map((row) => [yIndices.get(row[1]), xIndices.get(row[0]), row[2]]), settings);
|
|
@@ -44,6 +44,22 @@ export declare function resolveProfileRowHeight(settings: ProfileRowSettings, mi
|
|
|
44
44
|
* re-grid refetch.
|
|
45
45
|
*/
|
|
46
46
|
export declare function resolveAdoptedProfileBlockSize(servedBlockSize: unknown, persistedMinimumBarHeight: unknown): number | null;
|
|
47
|
+
/**
|
|
48
|
+
* The block an answer's rows are built on: the overlay's held base when the
|
|
49
|
+
* served block is finer and the base is a whole multiple of it, else the
|
|
50
|
+
* served block. The gateway serves each answer on its own row (the requested
|
|
51
|
+
* row raised to the coarsest grid in the window, tsdb-gateway docs/vp-grid.md),
|
|
52
|
+
* so a short window can answer finer than the base a long window adopted
|
|
53
|
+
* (COINBASE BTC-USD 1d, 2026-10-22: the history on 10, the forming-tail poll
|
|
54
|
+
* on 5). Built on the base, those rows merge whole into base rows the way a
|
|
55
|
+
* "Ticks per bar" multiple merges them, so an overlay keeps one grid and its
|
|
56
|
+
* newest columns stop drawing on another one. A served block that is coarser,
|
|
57
|
+
* or does not nest (a legacy grid), keeps its own grid. Shared by the workers
|
|
58
|
+
* (the grid they build on) and the response adopt (which then has nothing to
|
|
59
|
+
* adopt), so both read one rule.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveHeldProfileBlockSize(servedBlockSize: number, heldBlockSize: unknown): number;
|
|
62
|
+
export declare function resolveHeldProfileBlockSize(servedBlockSize: number | undefined, heldBlockSize: unknown): number | undefined;
|
|
47
63
|
/**
|
|
48
64
|
* The effective row size the "Ticks per bar" multiplier produces
|
|
49
65
|
* (minimumBarHeight x multiplier), formatted at the base block's precision so
|
|
@@ -106,6 +106,13 @@ export function resolveAdoptedProfileBlockSize(servedBlockSize, persistedMinimum
|
|
|
106
106
|
const scale = Math.max(servedBlockSize, persistedMinimumBarHeight);
|
|
107
107
|
return Math.abs(servedBlockSize - persistedMinimumBarHeight) > scale * 1e-9 ? servedBlockSize : null;
|
|
108
108
|
}
|
|
109
|
+
export function resolveHeldProfileBlockSize(servedBlockSize, heldBlockSize) {
|
|
110
|
+
if (!isPositiveFinite(servedBlockSize) || !isPositiveFinite(heldBlockSize))
|
|
111
|
+
return servedBlockSize;
|
|
112
|
+
const ratio = heldBlockSize / servedBlockSize;
|
|
113
|
+
const whole = Math.round(ratio);
|
|
114
|
+
return whole >= 2 && Math.abs(ratio - whole) <= whole * 1e-9 ? heldBlockSize : servedBlockSize;
|
|
115
|
+
}
|
|
109
116
|
/**
|
|
110
117
|
* The effective row size the "Ticks per bar" multiplier produces
|
|
111
118
|
* (minimumBarHeight x multiplier), formatted at the base block's precision so
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perpetual venues that publish quotes and never trades: Variational Omni, an RFQ venue (VARIATIONAL carries its
|
|
3
|
+
* perpetuals, crypto and RWA alike; VARIATIONAL_SWAP its swaps). The backend prints each market as raw TICKER points
|
|
4
|
+
* and serves its candles as TICKER_AGG on tsdb-gateway v2 (open/high/low/close, no volume), plus FUNDING_RATE_AGG and
|
|
5
|
+
* OPEN_INTEREST_AGG; no trade type lists them (the gateway's `tickerPricedExchanges`, open_interest_agg.go). See
|
|
6
|
+
* docs/features/data/quote-perp-venues.md.
|
|
7
|
+
*
|
|
8
|
+
* A leaf on purpose, with no imports, like crypto-index.leaf: the market-kind table (`marketKind.util`) and the ticker
|
|
9
|
+
* hub (`index-mode.util`) both read it, and web code asks `checkIsQuotePerp` here, never through those two modules,
|
|
10
|
+
* which over a hundred specs mock with partial factories.
|
|
11
|
+
*/
|
|
12
|
+
export declare const QUOTE_PERP_EXCHANGES: readonly ["VARIATIONAL", "VARIATIONAL_SWAP"];
|
|
13
|
+
/**
|
|
14
|
+
* A quote-priced perpetual venue (`QUOTE_PERP_EXCHANGES`), the `'quotePerp'` market kind. Case-insensitive like the
|
|
15
|
+
* kind table, and a foreign shape (a persisted object, a number) is no venue, never a throw.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkIsQuotePerp(exchange: string | undefined | null): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perpetual venues that publish quotes and never trades: Variational Omni, an RFQ venue (VARIATIONAL carries its
|
|
3
|
+
* perpetuals, crypto and RWA alike; VARIATIONAL_SWAP its swaps). The backend prints each market as raw TICKER points
|
|
4
|
+
* and serves its candles as TICKER_AGG on tsdb-gateway v2 (open/high/low/close, no volume), plus FUNDING_RATE_AGG and
|
|
5
|
+
* OPEN_INTEREST_AGG; no trade type lists them (the gateway's `tickerPricedExchanges`, open_interest_agg.go). See
|
|
6
|
+
* docs/features/data/quote-perp-venues.md.
|
|
7
|
+
*
|
|
8
|
+
* A leaf on purpose, with no imports, like crypto-index.leaf: the market-kind table (`marketKind.util`) and the ticker
|
|
9
|
+
* hub (`index-mode.util`) both read it, and web code asks `checkIsQuotePerp` here, never through those two modules,
|
|
10
|
+
* which over a hundred specs mock with partial factories.
|
|
11
|
+
*/
|
|
12
|
+
export const QUOTE_PERP_EXCHANGES = ['VARIATIONAL', 'VARIATIONAL_SWAP'];
|
|
13
|
+
const QUOTE_PERP_EXCHANGES_SET = new Set(QUOTE_PERP_EXCHANGES);
|
|
14
|
+
/**
|
|
15
|
+
* A quote-priced perpetual venue (`QUOTE_PERP_EXCHANGES`), the `'quotePerp'` market kind. Case-insensitive like the
|
|
16
|
+
* kind table, and a foreign shape (a persisted object, a number) is no venue, never a throw.
|
|
17
|
+
*/
|
|
18
|
+
export function checkIsQuotePerp(exchange) {
|
|
19
|
+
return typeof exchange === 'string' && QUOTE_PERP_EXCHANGES_SET.has(exchange.toUpperCase());
|
|
20
|
+
}
|
|
@@ -648,6 +648,11 @@ export interface WrunRunResultOptions {
|
|
|
648
648
|
* at or after it and is merged row by row (wrun-batched-marks.util `tailFromTs`). Full runs,
|
|
649
649
|
* reseeds and pans leave it absent: every child builds its whole window under the cell budget. */
|
|
650
650
|
batchedTailFromTs?: number;
|
|
651
|
+
/** The chart market's dollar unit (wrunMarketDollarUnit when proven), handed to the batched children: a marks
|
|
652
|
+
* child carries it on its settings and readout, where the `units` caption and hover divide a record's dollar value
|
|
653
|
+
* by it (wrun-batched-marks.util `valuePerUnit`). Every build passes the one its market proves, a live tick's
|
|
654
|
+
* tail the same as its full run; absent where none is proven. */
|
|
655
|
+
valuePerUnit?: number;
|
|
651
656
|
/** WRUN-STYLE: the mounted overlay's id, handed to the levels child
|
|
652
657
|
* builders (absent = the sheet id stands in). */
|
|
653
658
|
overlayId?: string;
|
|
@@ -3590,7 +3590,10 @@ function buildWrunRunResultWithSelection(options, memo) {
|
|
|
3590
3590
|
// The batched marks (WRUN-BATCHED-MARKS): one row-backed child per marks, spans and rays section,
|
|
3591
3591
|
// its rows read off the run's own rows by output index; a full build charges the cell budget
|
|
3592
3592
|
// before any row is copied, a live tick builds its changed tail only.
|
|
3593
|
-
childOverlays.push(...wrunBatchedMarksChildren(metadata, rows,
|
|
3593
|
+
childOverlays.push(...wrunBatchedMarksChildren(metadata, rows, {
|
|
3594
|
+
...(options.batchedTailFromTs !== undefined ? { tailFromTs: options.batchedTailFromTs } : {}),
|
|
3595
|
+
...(options.valuePerUnit !== undefined ? { valuePerUnit: options.valuePerUnit } : {}),
|
|
3596
|
+
}));
|
|
3594
3597
|
childOverlays.push(...wrunProfileChildren(metadata, options.cellRows, {
|
|
3595
3598
|
intervalMs: rowIntervalMs,
|
|
3596
3599
|
outputRows: rows,
|
|
@@ -40,6 +40,13 @@ export declare function extractTokensFromTransformations(transformations: string
|
|
|
40
40
|
symbol?: string;
|
|
41
41
|
token: string;
|
|
42
42
|
}[];
|
|
43
|
+
/**
|
|
44
|
+
* Whether any `EX|SYM` leg of a series formula sits on a venue `isVenue` accepts. The legs are walked the way the
|
|
45
|
+
* fetch path reads them (extractTokensFromTransformations), so a leg the chart loads is a leg this sees. It is the one
|
|
46
|
+
* leg walk the licence doors share: the chart-read and export policy, and the OPRA display boundary, for a main
|
|
47
|
+
* series formula and an overlay's alike. False for a missing or blank formula.
|
|
48
|
+
*/
|
|
49
|
+
export declare function transformationsTouchVenue(transformations: unknown, isVenue: (exchange: string) => boolean): boolean;
|
|
43
50
|
export declare function subscribeOverlayToLiveFeed(subscribeToEachLiveFeed: Function, params: {
|
|
44
51
|
exchange: string;
|
|
45
52
|
symbol: string;
|
|
@@ -299,6 +299,17 @@ export function extractTokensFromTransformations(transformations, allowDuplicate
|
|
|
299
299
|
});
|
|
300
300
|
return tokens;
|
|
301
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Whether any `EX|SYM` leg of a series formula sits on a venue `isVenue` accepts. The legs are walked the way the
|
|
304
|
+
* fetch path reads them (extractTokensFromTransformations), so a leg the chart loads is a leg this sees. It is the one
|
|
305
|
+
* leg walk the licence doors share: the chart-read and export policy, and the OPRA display boundary, for a main
|
|
306
|
+
* series formula and an overlay's alike. False for a missing or blank formula.
|
|
307
|
+
*/
|
|
308
|
+
export function transformationsTouchVenue(transformations, isVenue) {
|
|
309
|
+
if (typeof transformations !== 'string' || !transformations.trim())
|
|
310
|
+
return false;
|
|
311
|
+
return extractTokensFromTransformations(transformations, true).some(({ exchange }) => typeof exchange === 'string' && isVenue(exchange));
|
|
312
|
+
}
|
|
302
313
|
export function subscribeOverlayToLiveFeed(subscribeToEachLiveFeed, params, overlayId) {
|
|
303
314
|
const multiSymbolExchanges = params?.multiSymbolExchanges;
|
|
304
315
|
const tokens = isNil(multiSymbolExchanges) || multiSymbolExchanges.length === 0
|
|
@@ -2,9 +2,9 @@ import { Category, Exchange } from '@orangecharts/orange-v2-pb-common';
|
|
|
2
2
|
import { type OptionVenue } from '../../constants/option-venues.constants.js';
|
|
3
3
|
import type { GateProvider } from '../../workers/constants/socket-slots.js';
|
|
4
4
|
/**
|
|
5
|
-
* Whether a gate plane's chain stamps true expiry instants (OptionVenue.expiryInstants: OPRA
|
|
6
|
-
*
|
|
7
|
-
* needs before it is offered on that plane.
|
|
5
|
+
* Whether a gate plane's chain stamps true expiry instants (OptionVenue.expiryInstants: OPRA and CME both,
|
|
6
|
+
* their registries stamp each expiry's instant, never a bare UTC-midnight date): what an option metric that
|
|
7
|
+
* reads time to expiry needs before it is offered on that plane.
|
|
8
8
|
*/
|
|
9
9
|
export declare function planeServesExpiryInstants(plane: GateProvider): boolean;
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Category, Exchange } from '@orangecharts/orange-v2-pb-common';
|
|
2
2
|
import { OPTION_VENUES } from '../../constants/option-venues.constants.js';
|
|
3
3
|
/**
|
|
4
|
-
* Whether a gate plane's chain stamps true expiry instants (OptionVenue.expiryInstants: OPRA
|
|
5
|
-
*
|
|
6
|
-
* needs before it is offered on that plane.
|
|
4
|
+
* Whether a gate plane's chain stamps true expiry instants (OptionVenue.expiryInstants: OPRA and CME both,
|
|
5
|
+
* their registries stamp each expiry's instant, never a bare UTC-midnight date): what an option metric that
|
|
6
|
+
* reads time to expiry needs before it is offered on that plane.
|
|
7
7
|
*/
|
|
8
8
|
export function planeServesExpiryInstants(plane) {
|
|
9
9
|
return OPTION_VENUES.some((venue) => venue.plane === plane && venue.expiryInstants === true);
|
|
@@ -71,7 +71,7 @@ export declare function forgetWrunLateReads(indicatorId: string): void;
|
|
|
71
71
|
* A run's lane thunks with every lane joining or adopting its late read first (`take`, the run's own lookup by its
|
|
72
72
|
* ask identity): a lane with one never runs its thunk, so no second ask leaves. The run's shape: the builtin lanes by
|
|
73
73
|
* name (a function or undefined) and the lists of `[lane id, thunk]` pairs (trades legs, poll lanes, row lanes);
|
|
74
|
-
* everything else is returned as it is.
|
|
74
|
+
* everything else is returned as it is. A thunk that runs gets every argument the lane runner hands it.
|
|
75
75
|
*/
|
|
76
76
|
export declare function wrunJoinLateReads<T extends object>(thunks: T, take: (lane: string) => Promise<WrunLateReadRows> | undefined): T;
|
|
77
77
|
export declare function __resetWrunLateReadsForTests(): void;
|
|
@@ -171,10 +171,10 @@ export function forgetWrunLateReads(indicatorId) {
|
|
|
171
171
|
* A run's lane thunks with every lane joining or adopting its late read first (`take`, the run's own lookup by its
|
|
172
172
|
* ask identity): a lane with one never runs its thunk, so no second ask leaves. The run's shape: the builtin lanes by
|
|
173
173
|
* name (a function or undefined) and the lists of `[lane id, thunk]` pairs (trades legs, poll lanes, row lanes);
|
|
174
|
-
* everything else is returned as it is.
|
|
174
|
+
* everything else is returned as it is. A thunk that runs gets every argument the lane runner hands it.
|
|
175
175
|
*/
|
|
176
176
|
export function wrunJoinLateReads(thunks, take) {
|
|
177
|
-
const joined = (lane, run) => (abandoned) => take(lane) ?? run(abandoned);
|
|
177
|
+
const joined = (lane, run) => (abandoned, ...rest) => take(lane) ?? run(abandoned, ...rest);
|
|
178
178
|
const out = { ...thunks };
|
|
179
179
|
for (const [key, value] of Object.entries(out)) {
|
|
180
180
|
if (typeof value === 'function') {
|
|
@@ -3,8 +3,8 @@ import type { WrunChartSourceRows } from '../wrun-source-rows.util.js';
|
|
|
3
3
|
import type { WrunPollLaneInstance } from '../sources/wrun-poll-lane.types.js';
|
|
4
4
|
import type { WrunRowLaneInstance } from '../sources/wrun-row-lane.types.js';
|
|
5
5
|
import { type WrunPrefixLaneClause, type WrunPrefixLaneEvidence, type WrunPrefixLanePages, type WrunPrefixLanePlan, type WrunPrefixLaneSplice } from '../wrun-prefix-lanes.util.js';
|
|
6
|
-
/** The clause that refuses a session (`lanes:<clause>`): the base rule's,
|
|
7
|
-
export type WrunPrefixFeedClause = WrunPrefixLaneClause | 'row-budget';
|
|
6
|
+
/** The clause that refuses a session (`lanes:<clause>`): the base rule's, `row-budget` or `filling` (the module note). */
|
|
7
|
+
export type WrunPrefixFeedClause = WrunPrefixLaneClause | 'row-budget' | 'filling';
|
|
8
8
|
/** What a page asks again: the base rule's lanes, the daily poll lanes, the row lanes asked by host bar, and the row
|
|
9
9
|
* lanes read empty on the page (a `latest` landing). */
|
|
10
10
|
export interface WrunPrefixFeedPlan extends WrunPrefixLanePlan {
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* refused (`live-row`), as the options chain's is.
|
|
23
23
|
*
|
|
24
24
|
* Still refused, each by a named clause (`lanes:<clause>`): a row lane under a row budget (`row-budget`: a whole run
|
|
25
|
-
* keeps the NEWEST bars of its whole window that fit, a page would keep the page's own), a row lane
|
|
25
|
+
* keeps the NEWEST bars of its whole window that fit, a page would keep the page's own), a row lane whose rows hold its
|
|
26
|
+
* first-paint slice alone (`filling`: its older bars read partial until the source ladder adopts the whole answer, and
|
|
27
|
+
* a page spliced before them would keep them partial), a row lane this build does
|
|
26
28
|
* not know or holds no buffer of (`input-source`), a daily lane under a host-grid landing, or with no recorded ask or
|
|
27
29
|
* no buffer to stand on (`daily`), a primary under carry reading a daily lane (`primary-carry`), and any of these
|
|
28
30
|
* lanes on an index-mode chart unless it
|
|
@@ -118,6 +120,8 @@ export function planWrunPrefixFeeds(context) {
|
|
|
118
120
|
}
|
|
119
121
|
if (lane.rowBudget !== undefined)
|
|
120
122
|
return refused('row-budget');
|
|
123
|
+
if (context.rowLaneFilling?.[instance.key] !== undefined)
|
|
124
|
+
return refused('filling');
|
|
121
125
|
if (context.acquisition[instance.key] === undefined)
|
|
122
126
|
return refused('input-source');
|
|
123
127
|
if (indexMode && lane.fetch === undefined && wrunRowLaneFetchOptions(lane)?.nativeRows !== true) {
|
|
@@ -33,8 +33,9 @@ import { WRUN_LANE_CHAIN_PLANES } from './wrun-row-lane.types.js';
|
|
|
33
33
|
import { assertWrunHostGridLanding } from './host-grid-landing.js';
|
|
34
34
|
import { WRUN_BROWSER_BUILTIN_SOURCE_CLASSES, wrunPollLaneClassOfFile } from '../wrun-browser-sources.leaf.js';
|
|
35
35
|
import { registerWrunRefusalFeedKeys } from '../wrun-refusal.util.js';
|
|
36
|
-
// The widths leaf, never the packer: this registry rides the boot path (the
|
|
37
|
-
// packer does not (tests/utility/wrun/wrun-door.closure.spec.ts); the packer reads the table this
|
|
36
|
+
// The widths leaf, never the packer: this registry rides the boot path (the requirement leaf reads row lanes for the
|
|
37
|
+
// chart store) and the packer does not (tests/utility/wrun/wrun-door.closure.spec.ts); the packer reads the table this
|
|
38
|
+
// registers.
|
|
38
39
|
import { registerWrunRowLaneTupleWidths } from '../wrun-pack-widths.leaf.js';
|
|
39
40
|
const WRUN_ROW_LANE_KEY_RE = /^[a-z][a-z0-9_]*$/;
|
|
40
41
|
let pollPeers = () => ({ classes: [], keys: [] });
|
|
@@ -28,9 +28,15 @@
|
|
|
28
28
|
* the one venue decision names for the word, in `options_chain`'s words; absent reads `auto`, the chain
|
|
29
29
|
* `options_chain`'s `auto` reads on the same chart); `max_cells` is required (the static plan) and a block over it
|
|
30
30
|
* refuses the run, never truncated. A market pin and the knobs of the other options classes are refused by name.
|
|
31
|
-
* - Views (OPTLOAD G5, wrun-option-views.util): `page_view` or `page_views` reads a
|
|
32
|
-
*
|
|
33
|
-
* the
|
|
31
|
+
* - Views (OPTLOAD G5, wrun-option-views.util): `page_view` or `page_views` reads a view of the class's block B in
|
|
32
|
+
* place of B whole (`stateViews`; a view's own params, `min_volume` included, ride as flat knobs): a projection as
|
|
33
|
+
* the class's own block, and with a fold (Top Contracts' totals) the view block of 16-value rows
|
|
34
|
+
* (`wrunOptionInputTupleWidth`). The worker asks the gateway for them in ONE chain summary read, and projects them
|
|
35
|
+
* itself on a crypto chain, whose plain reader serves none; a governed gateway without the views refuses them by
|
|
36
|
+
* name. An input that declares no view reads B whole through the implicit view (OPTLOAD W3 FE-STATE,
|
|
37
|
+
* `stateViews: "whole"`, `wrunOptionStateImplicitViewFields`): the gateway's WHOLE view of B, ONE chain summary
|
|
38
|
+
* read with no expiry directory and no registry read, B's 13-value tuples in B's order; a crypto chain keeps its
|
|
39
|
+
* plain reader, and an answer that is not B's rows is read by today's path (the worker twin).
|
|
34
40
|
* - On the OPRA plane the chain is the plane's own by coin (section 8, O1: `wrunHeldOpraPlaneChain`): no chain
|
|
35
41
|
* directory is read before the lane's first ask.
|
|
36
42
|
*
|
|
@@ -28,9 +28,15 @@
|
|
|
28
28
|
* the one venue decision names for the word, in `options_chain`'s words; absent reads `auto`, the chain
|
|
29
29
|
* `options_chain`'s `auto` reads on the same chart); `max_cells` is required (the static plan) and a block over it
|
|
30
30
|
* refuses the run, never truncated. A market pin and the knobs of the other options classes are refused by name.
|
|
31
|
-
* - Views (OPTLOAD G5, wrun-option-views.util): `page_view` or `page_views` reads a
|
|
32
|
-
*
|
|
33
|
-
* the
|
|
31
|
+
* - Views (OPTLOAD G5, wrun-option-views.util): `page_view` or `page_views` reads a view of the class's block B in
|
|
32
|
+
* place of B whole (`stateViews`; a view's own params, `min_volume` included, ride as flat knobs): a projection as
|
|
33
|
+
* the class's own block, and with a fold (Top Contracts' totals) the view block of 16-value rows
|
|
34
|
+
* (`wrunOptionInputTupleWidth`). The worker asks the gateway for them in ONE chain summary read, and projects them
|
|
35
|
+
* itself on a crypto chain, whose plain reader serves none; a governed gateway without the views refuses them by
|
|
36
|
+
* name. An input that declares no view reads B whole through the implicit view (OPTLOAD W3 FE-STATE,
|
|
37
|
+
* `stateViews: "whole"`, `wrunOptionStateImplicitViewFields`): the gateway's WHOLE view of B, ONE chain summary
|
|
38
|
+
* read with no expiry directory and no registry read, B's 13-value tuples in B's order; a crypto chain keeps its
|
|
39
|
+
* plain reader, and an answer that is not B's rows is read by today's path (the worker twin).
|
|
34
40
|
* - On the OPRA plane the chain is the plane's own by coin (section 8, O1: `wrunHeldOpraPlaneChain`): no chain
|
|
35
41
|
* directory is read before the lane's first ask.
|
|
36
42
|
*
|
|
@@ -40,7 +46,7 @@ import { decideWrunLaneChain, refuseWrunLaneStrayKnob, resolveWrunLaneChainChart
|
|
|
40
46
|
import { refuseWrunPollInput } from '../wrun-poll-lane.types.js';
|
|
41
47
|
import { wrunOptionExpiriesKnob, wrunOptionExpiriesText, wrunOptionStrikeWindowKnob, } from '../../wrun-option-knobs.util.js';
|
|
42
48
|
import { wrunAuthorRuleSeed } from '../../wrun-refusal.util.js';
|
|
43
|
-
import { wrunHeldOpraPlaneChain, wrunOptionViewLaneFields, wrunOptionViewParamKnobs, wrunOptionViewsOfSource, } from '../../wrun-option-views.util.js';
|
|
49
|
+
import { wrunHeldOpraPlaneChain, wrunOptionStateImplicitViewFields, wrunOptionViewLaneFields, wrunOptionViewParamKnobs, wrunOptionViewsOfSource, } from '../../wrun-option-views.util.js';
|
|
44
50
|
/** f64s per tuple (the source contract's width, the `present` mask included). */
|
|
45
51
|
export const WRUN_OPTION_CONTRACT_STATE_WIDTH = 13;
|
|
46
52
|
/** om's code for a market pin on the OPRA classes. */
|
|
@@ -131,7 +137,9 @@ export const rowLane = {
|
|
|
131
137
|
...wrunOptionContractStateExtras(chain),
|
|
132
138
|
stateExpiries: wrunOptionExpiriesText(expiries),
|
|
133
139
|
...(strikeWindowPct !== undefined ? { stateStrikeWindowPct: strikeWindowPct } : {}),
|
|
134
|
-
...(views !== undefined
|
|
140
|
+
...(views !== undefined
|
|
141
|
+
? wrunOptionViewLaneFields('option_contract_state', views)
|
|
142
|
+
: wrunOptionStateImplicitViewFields()),
|
|
135
143
|
};
|
|
136
144
|
},
|
|
137
145
|
};
|
|
@@ -37,6 +37,15 @@
|
|
|
37
37
|
* offset on its host bar.
|
|
38
38
|
* - Projection, per input: `expiries: "nearest:N"` keeps the bar's N nearest expiries; `overflow: "largest"` cuts a
|
|
39
39
|
* bar over the input's own `max_cells` to its largest premiums (om's packer rule, bit 14 on the first kept print).
|
|
40
|
+
* Beside `newest` N the cut is the union (the SDK's frozen contract): a window-level pass (`cellsWindow`) finds the
|
|
41
|
+
* window's N newest over every bar the instance holds, by time then print key, and each bar keeps its `max_cells`
|
|
42
|
+
* largest and its prints among them (`wrunLargestOrNewestOptionPrints`), at most `max_cells` + N, the packer's
|
|
43
|
+
* capacity for the input. The union answer, today's whole download and either one with live prints folded in project
|
|
44
|
+
* the same cells, bit 14 included, and every run projects again, so a live print moves the cut. `newest_tail_ms`
|
|
45
|
+
* beside "largest" is refused by name (`wrun_option_prints_tail_largest`): the capacity must stay bounded. The union
|
|
46
|
+
* needs a module whose buffer holds it (the input's `capacity`, the sheet's own: a build at kit scaffold 97 writes
|
|
47
|
+
* `max_cells + newest` there, wrun-cell-capacity.leaf `wrunSheetCellBlockTuples`); a sheet naming no capacity (any
|
|
48
|
+
* module built before) reads `max_cells`, so its bars keep their largest alone, as before the union.
|
|
40
49
|
* - Live by coin, on the planes whose OPTION_PRINT producer streams (`chainPlanes`: OPRA and CME): the coin channel of
|
|
41
50
|
* the instance's chain (`K_OPTION_PRINT` subscribes the chain's exchange and underlying, on a governed exchange at a
|
|
42
51
|
* real-time routed tier only: wrun-coin-lane-live.util) feeds every print of the underlying; the fold keeps the
|
|
@@ -56,6 +65,8 @@ import { type WrunLaneChain } from '../opra-option-lanes.util.js';
|
|
|
56
65
|
import type { WrunRowLaneDescriptor } from '../wrun-row-lane.types.js';
|
|
57
66
|
/** om's refusal name of a missing floor. */
|
|
58
67
|
export declare const WRUN_OPTION_PRINTS_MIN_PREMIUM_REQUIRED_CODE = "wrun_option_prints_min_premium_required";
|
|
68
|
+
/** om's refusal name of a tail beside `overflow: "largest"` (the union's capacity is `max_cells` + `newest`). */
|
|
69
|
+
export declare const WRUN_OPTION_PRINTS_TAIL_LARGEST_CODE = "wrun_option_prints_tail_largest";
|
|
59
70
|
/** Test seam: forget every resolved chart. */
|
|
60
71
|
export declare function __resetWrunPrintsChartsForTests(): void;
|
|
61
72
|
/**
|