@pear-protocol/market-sdk 0.3.1 → 0.3.2

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.
@@ -37,7 +37,7 @@ class Chart {
37
37
  }
38
38
  return result.bars;
39
39
  }
40
- default:
40
+ case "price":
41
41
  throw new Error(`Unsupported chart type: ${chartType}`);
42
42
  }
43
43
  }
@@ -19,9 +19,9 @@ async function fetchHistoricalCandles(connector, symbol, startTime, endTime, int
19
19
  case "lighter":
20
20
  case "lighter_rhc":
21
21
  return fetchHistoricalCandles$1(connector, symbol, startTime, endTime, interval, authToken);
22
- default:
23
- throw new Error(`Unsupported connector: ${connector}`);
24
22
  }
23
+ const unsupported = connector;
24
+ throw new Error(`Unsupported connector: ${String(unsupported)}`);
25
25
  }
26
26
  __name(fetchHistoricalCandles, "fetchHistoricalCandles");
27
27
 
@@ -20,11 +20,9 @@ function createCandleWs(transport, connector, onCandle) {
20
20
  case "lighter":
21
21
  case "lighter_rhc":
22
22
  return new LighterCandleWs(transport, onCandle);
23
- default: {
24
- const _exhaustive = connector;
25
- throw new Error(`Unsupported exchange: ${String(_exhaustive)}`);
26
- }
27
23
  }
24
+ const unsupported = connector;
25
+ throw new Error(`Unsupported exchange: ${String(unsupported)}`);
28
26
  }
29
27
  __name(createCandleWs, "createCandleWs");
30
28
 
@@ -19,9 +19,9 @@ async function fetchHistoricalFundingRates(connector, symbol, startTime, endTime
19
19
  case "lighter":
20
20
  case "lighter_rhc":
21
21
  return fetchHistoricalFundingRates$1(connector, symbol, startTime, endTime, duration, authToken);
22
- default:
23
- throw new Error(`Unsupported connector: ${connector}`);
24
22
  }
23
+ const unsupported = connector;
24
+ throw new Error(`Unsupported connector: ${String(unsupported)}`);
25
25
  }
26
26
  __name(fetchHistoricalFundingRates, "fetchHistoricalFundingRates");
27
27
 
@@ -20,11 +20,9 @@ function createDepthWs(transport, connector, onUpdate) {
20
20
  case "lighter":
21
21
  case "lighter_rhc":
22
22
  return new LighterDepthWs(transport, onUpdate);
23
- default: {
24
- const _exhaustive = connector;
25
- throw new Error(`Unsupported exchange: ${String(_exhaustive)}`);
26
- }
27
23
  }
24
+ const unsupported = connector;
25
+ throw new Error(`Unsupported exchange: ${String(unsupported)}`);
28
26
  }
29
27
  __name(createDepthWs, "createDepthWs");
30
28
 
@@ -20,11 +20,9 @@ function CreateTransport(connector, options) {
20
20
  case "lighter":
21
21
  case "lighter_rhc":
22
22
  return new LighterTransport(connector, options?.authToken);
23
- default: {
24
- const _exhaustive = connector;
25
- throw new Error(`Unsupported connector: ${String(_exhaustive)}`);
26
- }
27
23
  }
24
+ const unsupported = connector;
25
+ throw new Error(`Unsupported connector: ${String(unsupported)}`);
28
26
  }
29
27
  __name(CreateTransport, "CreateTransport");
30
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/market-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Pear Protocol Market SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "bunx --package bun@1.4.3 bun --check --threads=2"
27
27
  },
28
28
  "dependencies": {
29
- "@pear-protocol/types": "^2.24.0",
29
+ "@pear-protocol/types": "^2.27.0",
30
30
  "bignumber.js": "^9.1.2",
31
31
  "partysocket": "^1.0.3"
32
32
  },