@drift-labs/common 1.0.37 → 1.0.39

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,38 @@
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
+ 5, // POL
17
+ 10, // 1MPEPE
18
+ 11, // OP
19
+ 14, // HNT
20
+ 19, // TIA
21
+ 21, // SEI
22
+ 27, // W
23
+ 31, // CLOUD
24
+ 34, // POPCAT
25
+ 42, // TON
26
+ 61, // ME
27
+ 62, // PENGU
28
+ 64, // TRUMP
29
+ 66, // BERA
30
+ 69, // KAITO
31
+ 70, // IP
32
+ 72, // ADA
33
+ 77, // XPL
34
+ 78, // 2Z
35
+ 80, // MNT
36
+ 82, // MET
37
+ ]);
10
38
  //# 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,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\t5, // POL\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.37",
3
+ "version": "1.0.39",
4
4
  "description": "Common functions for Drift",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",