@taphubhq/sdk-core 0.23.3 → 0.23.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/dist/index.cjs CHANGED
@@ -1402,6 +1402,9 @@ function mapWireConfig(raw) {
1402
1402
  function mapWireIdealConfig(raw) {
1403
1403
  const p = raw;
1404
1404
  return {
1405
+ // bid-260612 guard ①: carry the producer's pairId so consumers can reject cross-pair
1406
+ // suggestions. Undefined when talking to a producer that predates the field.
1407
+ pairId: p.pairId,
1405
1408
  cellSizeValue: p.cellSizeValue,
1406
1409
  currentPrice: p.currentPrice,
1407
1410
  reason: p.reason ?? "volatility_shift"
package/dist/index.d.mts CHANGED
@@ -838,6 +838,12 @@ interface MqttConfigEvent {
838
838
  acceptableBids: number[];
839
839
  }
840
840
  interface MqttIdealConfigEvent {
841
+ /**
842
+ * game_pairs.id (e.g. "grid-ETH-USD") the suggestion was computed for. Optional for
843
+ * backward compat with producers predating bid-260612; when present, a consumer drops
844
+ * suggestions whose pairId does not match the pair it is currently viewing (guard ①).
845
+ */
846
+ pairId?: string;
841
847
  cellSizeValue: number;
842
848
  currentPrice: number;
843
849
  reason: string;
package/dist/index.d.ts CHANGED
@@ -838,6 +838,12 @@ interface MqttConfigEvent {
838
838
  acceptableBids: number[];
839
839
  }
840
840
  interface MqttIdealConfigEvent {
841
+ /**
842
+ * game_pairs.id (e.g. "grid-ETH-USD") the suggestion was computed for. Optional for
843
+ * backward compat with producers predating bid-260612; when present, a consumer drops
844
+ * suggestions whose pairId does not match the pair it is currently viewing (guard ①).
845
+ */
846
+ pairId?: string;
841
847
  cellSizeValue: number;
842
848
  currentPrice: number;
843
849
  reason: string;
package/dist/index.js CHANGED
@@ -1337,6 +1337,9 @@ function mapWireConfig(raw) {
1337
1337
  function mapWireIdealConfig(raw) {
1338
1338
  const p = raw;
1339
1339
  return {
1340
+ // bid-260612 guard ①: carry the producer's pairId so consumers can reject cross-pair
1341
+ // suggestions. Undefined when talking to a producer that predates the field.
1342
+ pairId: p.pairId,
1340
1343
  cellSizeValue: p.cellSizeValue,
1341
1344
  currentPrice: p.currentPrice,
1342
1345
  reason: p.reason ?? "volatility_shift"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taphubhq/sdk-core",
3
- "version": "0.23.3",
3
+ "version": "0.23.4",
4
4
  "description": "Core SDK for building on the TabHub platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",