dexbot 1.6.5 → 1.6.6

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +36 -4
  2. package/README.md +104 -35
  3. package/analysis/README.md +11 -16
  4. package/analysis/account_resolver.ts +1 -11
  5. package/analysis/bot_usage/kibana_bot_queries.ts +1 -1
  6. package/analysis/chain_pool.ts +1 -1
  7. package/analysis/fills_source.ts +0 -6
  8. package/analysis/grid_correction_check.ts +20 -26
  9. package/analysis/resolve_source.ts +1 -1
  10. package/analysis/trade_profitability.ts +2 -5
  11. package/analysis/trend_detection/README.md +1 -3
  12. package/analysis/trend_detection/package.json +1 -1
  13. package/claw/package.json +1 -1
  14. package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
  15. package/claw/runtimes/openclaw-plugin/package.json +1 -1
  16. package/claw/tests/test_claw_mcp_transport.ts +2 -2
  17. package/dist/analysis/account_resolver.d.ts +1 -4
  18. package/dist/analysis/account_resolver.d.ts.map +1 -1
  19. package/dist/analysis/account_resolver.js +1 -1
  20. package/dist/analysis/account_resolver.js.map +1 -1
  21. package/dist/analysis/bot_usage/kibana_bot_queries.d.ts +1 -2
  22. package/dist/analysis/bot_usage/kibana_bot_queries.d.ts.map +1 -1
  23. package/dist/analysis/bot_usage/kibana_bot_queries.js +1 -1
  24. package/dist/analysis/bot_usage/kibana_bot_queries.js.map +1 -1
  25. package/dist/analysis/chain_pool.d.ts +1 -3
  26. package/dist/analysis/chain_pool.d.ts.map +1 -1
  27. package/dist/analysis/chain_pool.js +1 -1
  28. package/dist/analysis/chain_pool.js.map +1 -1
  29. package/dist/analysis/fills_source.d.ts +1 -51
  30. package/dist/analysis/fills_source.d.ts.map +1 -1
  31. package/dist/analysis/fills_source.js +1 -1
  32. package/dist/analysis/fills_source.js.map +1 -1
  33. package/dist/analysis/grid_correction_check.d.ts +2 -3
  34. package/dist/analysis/grid_correction_check.d.ts.map +1 -1
  35. package/dist/analysis/grid_correction_check.js +18 -26
  36. package/dist/analysis/grid_correction_check.js.map +1 -1
  37. package/dist/analysis/resolve_source.d.ts +1 -1
  38. package/dist/analysis/resolve_source.d.ts.map +1 -1
  39. package/dist/analysis/trade_profitability.d.ts.map +1 -1
  40. package/dist/analysis/trade_profitability.js +2 -7
  41. package/dist/analysis/trade_profitability.js.map +1 -1
  42. package/dist/dexbot.d.ts.map +1 -1
  43. package/dist/dexbot.js +60 -74
  44. package/dist/dexbot.js.map +1 -1
  45. package/dist/market_adapter/core/kibana_candles.d.ts +1 -15
  46. package/dist/market_adapter/core/kibana_candles.d.ts.map +1 -1
  47. package/dist/market_adapter/core/kibana_candles.js +1 -1
  48. package/dist/market_adapter/core/kibana_candles.js.map +1 -1
  49. package/dist/market_adapter/inputs/fetch_lp_data.d.ts +1 -35
  50. package/dist/market_adapter/inputs/fetch_lp_data.d.ts.map +1 -1
  51. package/dist/market_adapter/inputs/fetch_lp_data.js +10 -54
  52. package/dist/market_adapter/inputs/fetch_lp_data.js.map +1 -1
  53. package/dist/market_adapter/inputs/kibana_feed_source.d.ts +1 -8
  54. package/dist/market_adapter/inputs/kibana_feed_source.d.ts.map +1 -1
  55. package/dist/market_adapter/inputs/kibana_feed_source.js +1 -1
  56. package/dist/market_adapter/inputs/kibana_feed_source.js.map +1 -1
  57. package/dist/market_adapter/inputs/window_cache.d.ts +2 -63
  58. package/dist/market_adapter/inputs/window_cache.d.ts.map +1 -1
  59. package/dist/market_adapter/inputs/window_cache.js +22 -102
  60. package/dist/market_adapter/inputs/window_cache.js.map +1 -1
  61. package/dist/modules/account_bots.d.ts +16 -2
  62. package/dist/modules/account_bots.d.ts.map +1 -1
  63. package/dist/modules/account_bots.js +107 -44
  64. package/dist/modules/account_bots.js.map +1 -1
  65. package/dist/modules/bitshares-native/crypto/ecc.browser.d.ts.map +1 -1
  66. package/dist/modules/bitshares-native/crypto/ecc.browser.js +0 -31
  67. package/dist/modules/bitshares-native/crypto/ecc.browser.js.map +1 -1
  68. package/dist/modules/credit_runtime.d.ts +0 -2
  69. package/dist/modules/credit_runtime.d.ts.map +1 -1
  70. package/dist/modules/credit_runtime.js +1 -10
  71. package/dist/modules/credit_runtime.js.map +1 -1
  72. package/dist/modules/dexbot_class.d.ts +13 -10
  73. package/dist/modules/dexbot_class.d.ts.map +1 -1
  74. package/dist/modules/dexbot_class.js +0 -9
  75. package/dist/modules/dexbot_class.js.map +1 -1
  76. package/dist/modules/dexbot_cow_runtime.d.ts +13 -0
  77. package/dist/modules/dexbot_cow_runtime.d.ts.map +1 -1
  78. package/dist/modules/dexbot_cow_runtime.js +13 -1
  79. package/dist/modules/dexbot_cow_runtime.js.map +1 -1
  80. package/dist/modules/order/accounting.d.ts +4 -18
  81. package/dist/modules/order/accounting.d.ts.map +1 -1
  82. package/dist/modules/order/accounting.js +4 -34
  83. package/dist/modules/order/accounting.js.map +1 -1
  84. package/dist/modules/order/export.d.ts +9 -12
  85. package/dist/modules/order/export.d.ts.map +1 -1
  86. package/dist/modules/order/export.js +9 -12
  87. package/dist/modules/order/export.js.map +1 -1
  88. package/dist/modules/order/grid.d.ts +35 -40
  89. package/dist/modules/order/grid.d.ts.map +1 -1
  90. package/dist/modules/order/grid.js +43 -43
  91. package/dist/modules/order/grid.js.map +1 -1
  92. package/dist/modules/order/grid_reconcile.d.ts.map +1 -1
  93. package/dist/modules/order/grid_reconcile.js +111 -20
  94. package/dist/modules/order/grid_reconcile.js.map +1 -1
  95. package/dist/modules/order/grid_reconcile_internal.d.ts +5 -3
  96. package/dist/modules/order/grid_reconcile_internal.d.ts.map +1 -1
  97. package/dist/modules/order/grid_reconcile_internal.js +18 -3
  98. package/dist/modules/order/grid_reconcile_internal.js.map +1 -1
  99. package/dist/modules/order/manager.d.ts +0 -8
  100. package/dist/modules/order/manager.d.ts.map +1 -1
  101. package/dist/modules/order/manager.js +0 -10
  102. package/dist/modules/order/manager.js.map +1 -1
  103. package/dist/modules/order/utils/order.d.ts +22 -7
  104. package/dist/modules/order/utils/order.d.ts.map +1 -1
  105. package/dist/modules/order/utils/order.js +103 -21
  106. package/dist/modules/order/utils/order.js.map +1 -1
  107. package/dist/modules/order/utils/withPoolRef.d.ts +12 -0
  108. package/dist/modules/order/utils/withPoolRef.d.ts.map +1 -1
  109. package/dist/modules/order/utils/withPoolRef.js +17 -0
  110. package/dist/modules/order/utils/withPoolRef.js.map +1 -1
  111. package/dist/modules/order/working_grid.d.ts +8 -13
  112. package/dist/modules/order/working_grid.d.ts.map +1 -1
  113. package/dist/modules/order/working_grid.js +8 -29
  114. package/dist/modules/order/working_grid.js.map +1 -1
  115. package/dist/scripts/sync-version.js +0 -22
  116. package/dist/scripts/sync-version.js.map +1 -1
  117. package/dist/scripts/update_dist_freshness.d.ts +12 -0
  118. package/dist/scripts/update_dist_freshness.d.ts.map +1 -1
  119. package/dist/scripts/update_dist_freshness.js +30 -1
  120. package/dist/scripts/update_dist_freshness.js.map +1 -1
  121. package/docs/BITSHARES_ONBOARDING.md +9 -6
  122. package/docs/COW_INVARIANTS.md +1 -0
  123. package/docs/DEXBOT_COMPARISON.md +11 -11
  124. package/docs/EVOLUTION.md +8 -7
  125. package/docs/FUND_MOVEMENT_AND_ACCOUNTING.md +1 -1
  126. package/docs/GRID_PRICE_INVARIANT.md +518 -0
  127. package/docs/GRID_RECALCULATION.md +1 -1
  128. package/docs/GRID_RECONCILE.md +60 -39
  129. package/docs/ORDER_ENGINE_POST_1.0_RETROSPECTIVE.md +556 -0
  130. package/docs/README.md +3 -3
  131. package/docs/WORKFLOW.md +12 -6
  132. package/docs/architecture.md +40 -38
  133. package/docs/developer_guide.md +4 -8
  134. package/market_adapter/README.md +16 -12
  135. package/modules/README.md +1 -1
  136. package/package.json +7 -3
  137. package/scripts/README.md +0 -9
  138. package/scripts/reset-settings.sh +1 -1
  139. package/analysis/ama_fitting/package.json +0 -12
  140. package/analysis/analyze_derivatives.ts +0 -320
  141. package/analysis/derivative_chart_generator.ts +0 -874
  142. package/analysis/trend_detection/SIGNAL_DOCUMENTATION.md +0 -403
  143. package/analysis/trend_detection/derivative_analyzer.ts +0 -1059
  144. package/dist/analysis/analyze_derivatives.d.ts +0 -68
  145. package/dist/analysis/analyze_derivatives.d.ts.map +0 -1
  146. package/dist/analysis/analyze_derivatives.js +0 -287
  147. package/dist/analysis/analyze_derivatives.js.map +0 -1
  148. package/dist/analysis/derivative_chart_generator.d.ts +0 -12
  149. package/dist/analysis/derivative_chart_generator.d.ts.map +0 -1
  150. package/dist/analysis/derivative_chart_generator.js +0 -891
  151. package/dist/analysis/derivative_chart_generator.js.map +0 -1
  152. package/dist/analysis/trend_detection/derivative_analyzer.d.ts +0 -248
  153. package/dist/analysis/trend_detection/derivative_analyzer.d.ts.map +0 -1
  154. package/dist/analysis/trend_detection/derivative_analyzer.js +0 -910
  155. package/dist/analysis/trend_detection/derivative_analyzer.js.map +0 -1
@@ -231,9 +231,27 @@ function _stampCorrectionProvenance(entry, source) {
231
231
  return entry;
232
232
  }
233
233
  /**
234
- * Drain-time staleness validation for a price-update correction entry
235
- * (Fix 1): verify the queued intent still matches the LIVE grid geometry
236
- * before broadcasting.
234
+ * Find the live grid slot that currently owns a chain order.
235
+ * When slotId is supplied, only that exact slot is considered; otherwise all
236
+ * live slots are searched. This keeps stale-decision guards consistent without
237
+ * changing which owner is considered valid.
238
+ */
239
+ function findLiveOrderOwnerByChainId(manager, chainOrderId, slotId) {
240
+ if (!(manager?.orders instanceof Map) || !chainOrderId)
241
+ return null;
242
+ if (slotId) {
243
+ const slot = manager.orders.get(slotId);
244
+ return slot?.orderId === chainOrderId && isOrderPlaced(slot) ? slot : null;
245
+ }
246
+ for (const order of manager.orders.values()) {
247
+ if (order?.orderId === chainOrderId && isOrderPlaced(order))
248
+ return order;
249
+ }
250
+ return null;
251
+ }
252
+ /**
253
+ * Drain-time staleness validation for a correction entry: verify the queued
254
+ * intent still matches the LIVE grid geometry before broadcasting.
237
255
  *
238
256
  * A correction entry snapshots {slot id, chainOrderId, expectedPrice} at
239
257
  * queue time. Any geometry-changing resync (trigger-file resync,
@@ -251,18 +269,62 @@ function _stampCorrectionProvenance(entry, source) {
251
269
  * uses) or calculatePriceTolerance on legacy grids (same predicate
252
270
  * the detector uses there).
253
271
  *
254
- * Cancel-type entries (cancelOnly / isSurplus) are exempt — a cancel is
255
- * idempotent (gone orders resolve via the orderGone path) and never
256
- * re-prices onto a stale level.
272
+ * Cancel-only duplicate-orphan decisions need an ownership check. They are
273
+ * queued when a chain order has no matching grid slot, but startup reconcile
274
+ * can subsequently relocate that same chain id into an empty valid slot. A
275
+ * replayed cancel would then destroy the freshly updated in-place order.
276
+ *
277
+ * Type-mismatch and gap-evacuation surplus decisions have their own source-
278
+ * specific checks. A type mismatch is actionable only while the same live
279
+ * slot still owns the id and still has the mismatched type. A gap evacuation
280
+ * is actionable only while the same live slot remains in the current gap
281
+ * band. Both otherwise use the old cancellation branch, so allowing either
282
+ * decision to replay would recreate the same stale-replay regression.
257
283
  *
258
284
  * @param {Object} manager - OrderManager instance (live grid + assets)
259
285
  * @param {Object} entry - Queued correction entry
260
286
  * @returns {{valid: boolean, reason: string}} valid=false drops the entry
261
287
  */
262
288
  function _validatePriceCorrectionEntry(manager, entry) {
263
- if (!entry || entry.cancelOnly === true || entry.isSurplus === true) {
264
- return { valid: true, reason: 'cancel-type' };
289
+ if (!entry)
290
+ return { valid: false, reason: 'missing correction entry' };
291
+ if (entry.cancelOnly === true) {
292
+ const owningSlot = findLiveOrderOwnerByChainId(manager, entry.chainOrderId);
293
+ if (owningSlot) {
294
+ return {
295
+ valid: false,
296
+ reason: `chain order is now owned by ${owningSlot.id || 'a live grid slot'}; queued duplicate-orphan cancel is stale`,
297
+ };
298
+ }
299
+ return { valid: true, reason: 'cancel-only-untracked' };
300
+ }
301
+ if (entry.typeMismatch === true) {
302
+ const targetType = entry.sideUpdated || entry.type;
303
+ const slotId = entry?.gridOrder?.id;
304
+ const slot = findLiveOrderOwnerByChainId(manager, entry.chainOrderId, slotId);
305
+ if (!slot) {
306
+ return { valid: false, reason: `type-mismatch target ${slotId || '?'} no longer owns ${entry.chainOrderId}` };
307
+ }
308
+ if (!targetType || slot.type === targetType) {
309
+ return { valid: false, reason: `type-mismatch for ${entry.chainOrderId} was repaired (${slot.type} now matches ${targetType || 'chain type'})` };
310
+ }
311
+ return { valid: true, reason: 'type-mismatch-still-live' };
312
+ }
313
+ if (entry.gapEvacuation === true) {
314
+ const slotId = entry?.gridOrder?.id;
315
+ const slot = findLiveOrderOwnerByChainId(manager, entry.chainOrderId, slotId);
316
+ if (!slot) {
317
+ return { valid: false, reason: `gap-evacuation target ${slotId || '?'} no longer owns ${entry.chainOrderId}` };
318
+ }
319
+ const idx = parseSlotIndex(slot.id);
320
+ const geometry = geometryTypeForSlotIndex(idx, manager?.boundaryIdx, manager?._gapSlots);
321
+ if (geometry !== ORDER_TYPES.SPREAD) {
322
+ return { valid: false, reason: `gap-evacuation target ${slotId} is no longer in the current gap band` };
323
+ }
324
+ return { valid: true, reason: 'gap-evacuation-still-live' };
265
325
  }
326
+ if (entry.isSurplus === true)
327
+ return { valid: true, reason: 'surplus-cancel' };
266
328
  const slotId = entry?.gridOrder?.id;
267
329
  const slot = (slotId && manager?.orders instanceof Map) ? manager.orders.get(slotId) : null;
268
330
  if (!slot) {
@@ -486,11 +548,19 @@ function buildFillKey(fillOrParts) {
486
548
  return null;
487
549
  return `${orderId}:${blockNum}:${historyId}`;
488
550
  }
551
+ function _currentCorrectionGridOrder(manager, correctionInfo) {
552
+ const slotId = correctionInfo?.gridOrder?.id;
553
+ if (!slotId || !(manager?.orders instanceof Map))
554
+ return null;
555
+ const liveSlot = manager.orders.get(slotId);
556
+ return liveSlot?.orderId === correctionInfo?.chainOrderId ? liveSlot : null;
557
+ }
489
558
  /**
490
559
  * Correct a single order's price on blockchain.
491
560
  * Cancels surplus orders; updates price for others.
492
561
  * Removes from correction queue after processing.
493
562
  *
563
+ * Surplus settlement is skipped when the live slot no longer owns the chain order; the next sync's pass-1 phantom cleanup virtualizes that slot.
494
564
  * @param {Object} manager - OrderManager instance
495
565
  * @param {Object} correctionInfo - Correction details {gridOrder, chainOrderId, expectedPrice, size, type, isSurplus}
496
566
  * @param {string} accountName - Account name for blockchain transaction
@@ -538,8 +608,9 @@ async function correctOrderPriceOnChain(manager, correctionInfo, accountName, pr
538
608
  const sideLabel = type === ORDER_TYPES.SELL ? 'SELL' : 'BUY';
539
609
  manager.logger?.log?.(`[CORRECTION] Cancelling surplus/mismatched ${sideLabel} order ${chainOrderId} for slot ${gridOrder?.id || 'unknown'}`, 'info');
540
610
  await accountOrders.cancelOrder(accountName, privateKey, chainOrderId);
541
- if (gridOrder && manager._applyOrderUpdate) {
542
- const spreadOrder = convertToSpreadPlaceholder(gridOrder);
611
+ const settlementGridOrder = _currentCorrectionGridOrder(manager, correctionInfo);
612
+ if (settlementGridOrder && manager._applyOrderUpdate) {
613
+ const spreadOrder = convertToSpreadPlaceholder(settlementGridOrder);
543
614
  await manager._applyOrderUpdate(spreadOrder, 'surplus-type-mismatch-cancel', {
544
615
  skipAccounting: false,
545
616
  fee: 0
@@ -642,8 +713,11 @@ async function _resolveCancelledCorrection(manager, entry) {
642
713
  if (entry.cancelOnly) {
643
714
  clearDuplicateOrphanDetection(chainOrderId);
644
715
  }
645
- if (!entry.cancelOnly && entry.isSurplus && entry.gridOrder && manager._applyOrderUpdate) {
646
- const spreadOrder = convertToSpreadPlaceholder(entry.gridOrder);
716
+ const settlementGridOrder = !entry.cancelOnly && entry.isSurplus
717
+ ? _currentCorrectionGridOrder(manager, entry)
718
+ : null;
719
+ if (settlementGridOrder && manager._applyOrderUpdate) {
720
+ const spreadOrder = convertToSpreadPlaceholder(settlementGridOrder);
647
721
  await manager._applyOrderUpdate(spreadOrder, 'surplus-type-mismatch-cancel', {
648
722
  skipAccounting: false,
649
723
  fee: 0
@@ -802,13 +876,12 @@ async function correctAllPriceMismatches(manager, accountName, privateKey, accou
802
876
  seen.add(key);
803
877
  return true;
804
878
  });
805
- // Fix 1 — drain-time staleness validation for price-update entries:
806
- // a geometry-changing resync between queue and drain leaves entries
807
- // whose slot was re-slotted or re-priced. Broadcasting them would
808
- // revert the resync's placement (duplicate-price-level incident).
809
- // Validate against the LIVE slot; drop stale entries (the next sync
810
- // re-queues if the order is genuinely still off-target). Cancel-type
811
- // entries are exempt (idempotent, never re-price).
879
+ // Drain-time staleness validation: a geometry-changing resync between
880
+ // queue and drain can re-slot/re-price UPDATEs or adopt a previously
881
+ // untracked chain order. Drop stale price updates before they revert
882
+ // the resync, and stale cancel-only decisions before they cancel a
883
+ // freshly relocated in-place order. The next sync re-queues if the
884
+ // order is genuinely still off-target.
812
885
  const liveEntries = [];
813
886
  for (const entry of ordersToCorrect) {
814
887
  const check = _validatePriceCorrectionEntry(manager, entry);
@@ -817,9 +890,18 @@ async function correctAllPriceMismatches(manager, accountName, privateKey, accou
817
890
  continue;
818
891
  }
819
892
  _removeCorrectionEntry(manager, entry.chainOrderId, entry?.isSurplus);
893
+ if (entry?.cancelOnly === true)
894
+ clearDuplicateOrphanDetection(entry.chainOrderId);
895
+ if (entry?.cancelOnly === true || entry?.isSurplus === true) {
896
+ _filterUnmatchedChainOrders(manager, entry.chainOrderId);
897
+ }
898
+ if (entry?.gapEvacuation === true && manager?._gapEvacCancelQueued instanceof Set && entry?.gridOrder?.id) {
899
+ manager._gapEvacCancelQueued.delete(entry.gridOrder.id);
900
+ }
820
901
  staleDropped++;
821
902
  results.push({ ...entry, result: { success: true, skipped: true, staleDropped: true, staleReason: check.reason } });
822
- manager?.logger?.log?.(`[CORRECTION] Dropping stale price correction for ${entry.chainOrderId} ` +
903
+ const correctionKind = (entry?.cancelOnly === true || entry?.isSurplus === true) ? 'cancel' : 'price';
904
+ manager?.logger?.log?.(`[CORRECTION] Dropping stale ${correctionKind} correction for ${entry.chainOrderId} ` +
823
905
  `(queued ${entry.queuedBy || 'unknown-source'}@${entry.queuedAt ? new Date(entry.queuedAt).toISOString() : 'unknown-time'}): ` +
824
906
  `${check.reason}; re-queued by next sync if still off-target`, 'info');
825
907
  }
@@ -2973,6 +3055,6 @@ function collectKnownOnChainOrderIds(mgr, placedResults, placedContexts, extraCr
2973
3055
  const all = new Set([...masterIds, ...createIds]);
2974
3056
  return { masterIds: [...masterIds], createIds: [...createIds], all: [...all] };
2975
3057
  }
2976
- export { parseChainOrder, findMatchingGridOrderByOpenOrder, applyChainSizeToGridOrder, buildFillKey, correctOrderPriceOnChain, correctAllPriceMismatches, _validatePriceCorrectionEntry, _stampCorrectionProvenance, buildCreateOrderArgs, getOrderTypeFromUpdatedFlags, resolveConfiguredPriceBound, virtualizeOrder, convertToSpreadPlaceholder, toRailHolePlaceholder, geometryTypeForSlotIndex, detectGapEvacuationCandidates, updateGapEvacuationStreaks, resolveSpreadOrderSide, chainOrderMatchesSlot, chainOrderMatchesSlotWithTolerance, crossingCandidateChainId, isCrossingCheckCandidate, buildCrossingCheckCandidates, parseSlotIndex, filterOrdersByType, buildOutsideInPairGroups, extractBatchOperationResults, formatUnmatchedChainOrder, isNonBlockingUnmatchedOrder, isStrandedHoldOrder, isOrderOnChain, isOrderVirtual, hasOnChainId, isOrderPlaced, isPhantomOrder, isSlotAvailable, isEmptyGridSlot, isOrderHealthy, checkSizeThreshold, checkSizesBeforeMinimum, calculateIdealBoundary, assignGridRoles, resolveOnChainRetypeType, shouldFlagOutOfSpread, buildIndexes, validateIndexes, ordersEqual, buildDelta, deriveTargetBoundary, isShiftEligibleFill, resolveReserveCount, resolveReserveOrders, selectReserveEdgeSlots, getActiveOrdersTotal, getSideBudget, calculateBudgetedSizes, buildCreateOpFingerprint, isOrderGoneErrorMessage, recordDuplicateOrphanDetection, clearDuplicateOrphanDetection, duplicateOrphanLogInfo, chainOrderUnchangedFromCache, detectCrossedBookPlan, collectKnownOnChainOrderIds, reserveEdgeIdSet, liveWindowIdSet, checkGridPriceInvariant, reportGridPriceInvariant };
3058
+ export { parseChainOrder, findMatchingGridOrderByOpenOrder, applyChainSizeToGridOrder, buildFillKey, correctOrderPriceOnChain, correctAllPriceMismatches, _validatePriceCorrectionEntry, _stampCorrectionProvenance, findLiveOrderOwnerByChainId, buildCreateOrderArgs, getOrderTypeFromUpdatedFlags, resolveConfiguredPriceBound, virtualizeOrder, convertToSpreadPlaceholder, toRailHolePlaceholder, geometryTypeForSlotIndex, detectGapEvacuationCandidates, updateGapEvacuationStreaks, resolveSpreadOrderSide, chainOrderMatchesSlot, chainOrderMatchesSlotWithTolerance, crossingCandidateChainId, isCrossingCheckCandidate, buildCrossingCheckCandidates, parseSlotIndex, filterOrdersByType, buildOutsideInPairGroups, extractBatchOperationResults, formatUnmatchedChainOrder, isNonBlockingUnmatchedOrder, isStrandedHoldOrder, isOrderOnChain, isOrderVirtual, hasOnChainId, isOrderPlaced, isPhantomOrder, isSlotAvailable, isEmptyGridSlot, isOrderHealthy, checkSizeThreshold, checkSizesBeforeMinimum, calculateIdealBoundary, assignGridRoles, resolveOnChainRetypeType, shouldFlagOutOfSpread, buildIndexes, validateIndexes, ordersEqual, buildDelta, deriveTargetBoundary, isShiftEligibleFill, resolveReserveCount, resolveReserveOrders, selectReserveEdgeSlots, getActiveOrdersTotal, getSideBudget, calculateBudgetedSizes, buildCreateOpFingerprint, isOrderGoneErrorMessage, recordDuplicateOrphanDetection, clearDuplicateOrphanDetection, duplicateOrphanLogInfo, chainOrderUnchangedFromCache, detectCrossedBookPlan, collectKnownOnChainOrderIds, reserveEdgeIdSet, liveWindowIdSet, checkGridPriceInvariant, reportGridPriceInvariant };
2977
3059
  export { resolveReserveEdgeAnchorPrice, resolveLiveReserveEdgeAnchorPrice, compareReserveEdge, collectRefillSlotIds };
2978
3060
  //# sourceMappingURL=order.js.map