@basedone/core 0.1.0 → 0.1.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.
@@ -109,6 +109,8 @@ interface MetadataClientConfig {
109
109
  onlyUseStaticFallback?: boolean;
110
110
  /** Whether to use static fallback data if API fetch fails (default: true) */
111
111
  useStaticFallback?: boolean;
112
+ /** Whether to enable debug logs (default: false) */
113
+ debug?: boolean;
112
114
  }
113
115
 
114
116
  /**
@@ -306,12 +308,14 @@ export class MetadataClient {
306
308
  this.dexNameToIndex.clear();
307
309
  this.quoteAssets = [];
308
310
 
309
- console.info(
310
- "[MetadataClient] Building lookup maps",
311
- this.perpDexs,
312
- this.perpsMeta,
313
- this.spotMeta,
314
- );
311
+ if (this.config.debug) {
312
+ console.info(
313
+ "[MetadataClient] Building lookup maps",
314
+ this.perpDexs,
315
+ this.perpsMeta,
316
+ this.spotMeta,
317
+ );
318
+ }
315
319
 
316
320
  // Build dex name to index map
317
321
  if (this.perpDexs) {
@@ -521,7 +525,9 @@ export class MetadataClient {
521
525
  }
522
526
  }
523
527
 
524
- console.info("[MetadataClient] caching market", symbol, marketInfo);
528
+ if (this.config.debug) {
529
+ console.info("[MetadataClient] caching market", symbol, marketInfo);
530
+ }
525
531
 
526
532
  this.coinToMarket.set(symbol, marketInfo);
527
533
  this.hip3SymbolToMarket.set(symbol, marketInfo);
package/package.json CHANGED
@@ -1,18 +1,10 @@
1
1
  {
2
2
  "name": "@basedone/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Core utilities for Based One",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
- "react-native": "./dist/index.mjs",
8
7
  "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "react-native": "./dist/index.mjs",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
14
- }
15
- },
16
8
  "source": "./index.ts",
17
9
  "files": [
18
10
  "dist",
@@ -36,7 +28,9 @@
36
28
  "vitest": "^3.2.4"
37
29
  },
38
30
  "dependencies": {
39
- "@nktkas/hyperliquid": "^0.24.3",
40
31
  "decimal.js": "^10.6.0"
32
+ },
33
+ "peerDependencies": {
34
+ "@nktkas/hyperliquid": "^0.24.3"
41
35
  }
42
36
  }