@drift-labs/common 1.0.36 → 1.0.38

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.
@@ -4,3 +4,9 @@ export declare const WBTC_SPOT_MARKET_INDEX = 3;
4
4
  export declare const WETH_SPOT_MARKET_INDEX = 4;
5
5
  export declare const CBBTC_SPOT_MARKET_INDEX = 27;
6
6
  export declare const DEFAULT_MAX_MARKET_LEVERAGE = 10;
7
+ /**
8
+ * Low-activity perp markets to hide from the UI.
9
+ * Users with active positions/orders/unsettled PnL in these markets should still see them.
10
+ * Direct URL navigation (e.g. /TIA-PERP) is unaffected.
11
+ */
12
+ export declare const HIDDEN_PERP_MARKET_INDEXES: ReadonlySet<number>;
@@ -1,10 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_MAX_MARKET_LEVERAGE = exports.CBBTC_SPOT_MARKET_INDEX = exports.WETH_SPOT_MARKET_INDEX = exports.WBTC_SPOT_MARKET_INDEX = exports.SOL_SPOT_MARKET_INDEX = exports.USDC_SPOT_MARKET_INDEX = void 0;
3
+ exports.HIDDEN_PERP_MARKET_INDEXES = exports.DEFAULT_MAX_MARKET_LEVERAGE = exports.CBBTC_SPOT_MARKET_INDEX = exports.WETH_SPOT_MARKET_INDEX = exports.WBTC_SPOT_MARKET_INDEX = exports.SOL_SPOT_MARKET_INDEX = exports.USDC_SPOT_MARKET_INDEX = void 0;
4
4
  exports.USDC_SPOT_MARKET_INDEX = 0;
5
5
  exports.SOL_SPOT_MARKET_INDEX = 1;
6
6
  exports.WBTC_SPOT_MARKET_INDEX = 3;
7
7
  exports.WETH_SPOT_MARKET_INDEX = 4;
8
8
  exports.CBBTC_SPOT_MARKET_INDEX = 27;
9
9
  exports.DEFAULT_MAX_MARKET_LEVERAGE = 10;
10
+ /**
11
+ * Low-activity perp markets to hide from the UI.
12
+ * Users with active positions/orders/unsettled PnL in these markets should still see them.
13
+ * Direct URL navigation (e.g. /TIA-PERP) is unaffected.
14
+ */
15
+ exports.HIDDEN_PERP_MARKET_INDEXES = new Set([
16
+ 3, // APT
17
+ 5, // POL
18
+ 6, // ARB
19
+ 10, // 1MPEPE
20
+ 11, // OP
21
+ 14, // HNT
22
+ 19, // TIA
23
+ 21, // SEI
24
+ 27, // W
25
+ 31, // CLOUD
26
+ 34, // POPCAT
27
+ 42, // TON
28
+ 61, // ME
29
+ 62, // PENGU
30
+ 64, // TRUMP
31
+ 66, // BERA
32
+ 69, // KAITO
33
+ 70, // IP
34
+ 72, // ADA
35
+ 77, // XPL
36
+ 78, // 2Z
37
+ 80, // MNT
38
+ 82, // MET
39
+ ]);
10
40
  //# sourceMappingURL=markets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markets.js","sourceRoot":"","sources":["../../src/constants/markets.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAE7B,QAAA,2BAA2B,GAAG,EAAE,CAAC","sourcesContent":["export const USDC_SPOT_MARKET_INDEX = 0;\nexport const SOL_SPOT_MARKET_INDEX = 1;\nexport const WBTC_SPOT_MARKET_INDEX = 3;\nexport const WETH_SPOT_MARKET_INDEX = 4;\nexport const CBBTC_SPOT_MARKET_INDEX = 27;\n\nexport const DEFAULT_MAX_MARKET_LEVERAGE = 10;\n"]}
1
+ {"version":3,"file":"markets.js","sourceRoot":"","sources":["../../src/constants/markets.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAC1B,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,sBAAsB,GAAG,CAAC,CAAC;AAC3B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAE7B,QAAA,2BAA2B,GAAG,EAAE,CAAC;AAE9C;;;;GAIG;AACU,QAAA,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IACtE,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACV,CAAC,CAAC","sourcesContent":["export const USDC_SPOT_MARKET_INDEX = 0;\nexport const SOL_SPOT_MARKET_INDEX = 1;\nexport const WBTC_SPOT_MARKET_INDEX = 3;\nexport const WETH_SPOT_MARKET_INDEX = 4;\nexport const CBBTC_SPOT_MARKET_INDEX = 27;\n\nexport const DEFAULT_MAX_MARKET_LEVERAGE = 10;\n\n/**\n * Low-activity perp markets to hide from the UI.\n * Users with active positions/orders/unsettled PnL in these markets should still see them.\n * Direct URL navigation (e.g. /TIA-PERP) is unaffected.\n */\nexport const HIDDEN_PERP_MARKET_INDEXES: ReadonlySet<number> = new Set([\n\t3, // APT\n\t5, // POL\n\t6, // ARB\n\t10, // 1MPEPE\n\t11, // OP\n\t14, // HNT\n\t19, // TIA\n\t21, // SEI\n\t27, // W\n\t31, // CLOUD\n\t34, // POPCAT\n\t42, // TON\n\t61, // ME\n\t62, // PENGU\n\t64, // TRUMP\n\t66, // BERA\n\t69, // KAITO\n\t70, // IP\n\t72, // ADA\n\t77, // XPL\n\t78, // 2Z\n\t80, // MNT\n\t82, // MET\n]);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/common",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Common functions for Drift",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -83,7 +83,7 @@
83
83
  "chai": "4.3.10",
84
84
  "crypto-browserify": "^3.12.1",
85
85
  "encoding": "0.1.13",
86
- "esbuild": "0.27.3",
86
+ "esbuild": "0.27.2",
87
87
  "jest": "29.7.0",
88
88
  "madge": "^8.0.0",
89
89
  "mocha": "10.2.0",