@drift-labs/sdk 2.153.0-beta.0 → 2.153.0-beta.1
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/VERSION +1 -1
- package/lib/browser/constants/txConstants.d.ts +0 -1
- package/lib/browser/constants/txConstants.js +1 -2
- package/lib/browser/driftClient.d.ts +6 -6
- package/lib/browser/driftClient.js +36 -184
- package/lib/node/constants/txConstants.d.ts +0 -1
- package/lib/node/constants/txConstants.d.ts.map +1 -1
- package/lib/node/constants/txConstants.js +1 -2
- package/lib/node/driftClient.d.ts +6 -6
- package/lib/node/driftClient.d.ts.map +1 -1
- package/lib/node/driftClient.js +36 -184
- package/package.json +1 -1
- package/src/constants/txConstants.ts +0 -2
- package/src/driftClient.ts +52 -264
- package/lib/browser/markets.d.ts +0 -5
- package/lib/browser/markets.js +0 -16
- package/lib/node/markets.d.ts +0 -6
- package/lib/node/markets.d.ts.map +0 -1
- package/lib/node/markets.js +0 -16
- package/src/markets.ts +0 -24
package/lib/browser/markets.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DriftEnv } from './config';
|
|
2
|
-
import { SpotMarketConfig } from './constants';
|
|
3
|
-
import { PerpMarketConfig } from './constants/perpMarkets';
|
|
4
|
-
export declare const getActivePerpMarkets: (driftEnv: DriftEnv) => PerpMarketConfig[];
|
|
5
|
-
export declare const getActiveSpotMarkets: (driftEnv: DriftEnv) => SpotMarketConfig[];
|
package/lib/browser/markets.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getActiveSpotMarkets = exports.getActivePerpMarkets = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
const perpMarkets_1 = require("./constants/perpMarkets");
|
|
6
|
-
const types_1 = require("./types");
|
|
7
|
-
const getActivePerpMarkets = (driftEnv) => {
|
|
8
|
-
return perpMarkets_1.PerpMarkets[driftEnv !== null && driftEnv !== void 0 ? driftEnv : 'mainnet-beta'].filter((market) => !market.marketStatus ||
|
|
9
|
-
!(0, types_1.isOneOfVariant)(market.marketStatus, ['delisted', 'settlement']));
|
|
10
|
-
};
|
|
11
|
-
exports.getActivePerpMarkets = getActivePerpMarkets;
|
|
12
|
-
const getActiveSpotMarkets = (driftEnv) => {
|
|
13
|
-
return constants_1.SpotMarkets[driftEnv !== null && driftEnv !== void 0 ? driftEnv : 'mainnet-beta'].filter((market) => !market.marketStatus ||
|
|
14
|
-
!(0, types_1.isOneOfVariant)(market.marketStatus, ['delisted', 'settlement']));
|
|
15
|
-
};
|
|
16
|
-
exports.getActiveSpotMarkets = getActiveSpotMarkets;
|
package/lib/node/markets.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DriftEnv } from './config';
|
|
2
|
-
import { SpotMarketConfig } from './constants';
|
|
3
|
-
import { PerpMarketConfig } from './constants/perpMarkets';
|
|
4
|
-
export declare const getActivePerpMarkets: (driftEnv: DriftEnv) => PerpMarketConfig[];
|
|
5
|
-
export declare const getActiveSpotMarkets: (driftEnv: DriftEnv) => SpotMarketConfig[];
|
|
6
|
-
//# sourceMappingURL=markets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markets.d.ts","sourceRoot":"","sources":["../../src/markets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AAGxE,eAAO,MAAM,oBAAoB,aACtB,QAAQ,KAChB,gBAAgB,EAMlB,CAAC;AAEF,eAAO,MAAM,oBAAoB,aACtB,QAAQ,KAChB,gBAAgB,EAMlB,CAAC"}
|
package/lib/node/markets.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getActiveSpotMarkets = exports.getActivePerpMarkets = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
const perpMarkets_1 = require("./constants/perpMarkets");
|
|
6
|
-
const types_1 = require("./types");
|
|
7
|
-
const getActivePerpMarkets = (driftEnv) => {
|
|
8
|
-
return perpMarkets_1.PerpMarkets[driftEnv !== null && driftEnv !== void 0 ? driftEnv : 'mainnet-beta'].filter((market) => !market.marketStatus ||
|
|
9
|
-
!(0, types_1.isOneOfVariant)(market.marketStatus, ['delisted', 'settlement']));
|
|
10
|
-
};
|
|
11
|
-
exports.getActivePerpMarkets = getActivePerpMarkets;
|
|
12
|
-
const getActiveSpotMarkets = (driftEnv) => {
|
|
13
|
-
return constants_1.SpotMarkets[driftEnv !== null && driftEnv !== void 0 ? driftEnv : 'mainnet-beta'].filter((market) => !market.marketStatus ||
|
|
14
|
-
!(0, types_1.isOneOfVariant)(market.marketStatus, ['delisted', 'settlement']));
|
|
15
|
-
};
|
|
16
|
-
exports.getActiveSpotMarkets = getActiveSpotMarkets;
|
package/src/markets.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DriftEnv } from './config';
|
|
2
|
-
import { SpotMarketConfig, SpotMarkets } from './constants';
|
|
3
|
-
import { PerpMarketConfig, PerpMarkets } from './constants/perpMarkets';
|
|
4
|
-
import { isOneOfVariant } from './types';
|
|
5
|
-
|
|
6
|
-
export const getActivePerpMarkets = (
|
|
7
|
-
driftEnv: DriftEnv
|
|
8
|
-
): PerpMarketConfig[] => {
|
|
9
|
-
return PerpMarkets[driftEnv ?? 'mainnet-beta'].filter(
|
|
10
|
-
(market) =>
|
|
11
|
-
!market.marketStatus ||
|
|
12
|
-
!isOneOfVariant(market.marketStatus, ['delisted', 'settlement'])
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const getActiveSpotMarkets = (
|
|
17
|
-
driftEnv: DriftEnv
|
|
18
|
-
): SpotMarketConfig[] => {
|
|
19
|
-
return SpotMarkets[driftEnv ?? 'mainnet-beta'].filter(
|
|
20
|
-
(market) =>
|
|
21
|
-
!market.marketStatus ||
|
|
22
|
-
!isOneOfVariant(market.marketStatus, ['delisted', 'settlement'])
|
|
23
|
-
);
|
|
24
|
-
};
|