@drift-labs/sdk 2.152.0-beta.2 → 2.153.0-beta.0
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/build-browser.js +58 -0
- package/bun.lock +182 -1
- package/esbuild-shims.js +12 -0
- package/lib/browser/constants/perpMarkets.js +12 -0
- package/lib/browser/constants/txConstants.d.ts +1 -0
- package/lib/browser/constants/txConstants.js +2 -1
- package/lib/browser/driftClient.d.ts +13 -6
- package/lib/browser/driftClient.js +280 -36
- package/lib/browser/idl/drift.json +207 -18
- package/lib/browser/markets.d.ts +5 -0
- package/lib/browser/markets.js +16 -0
- package/lib/browser/swap/UnifiedSwapClient.js +2 -0
- package/lib/browser/titan/titanClient.d.ts +3 -0
- package/lib/browser/titan/titanClient.js +58 -60
- package/lib/browser/user.d.ts +1 -1
- package/lib/node/constants/perpMarkets.d.ts.map +1 -1
- package/lib/node/constants/perpMarkets.js +12 -0
- package/lib/node/constants/txConstants.d.ts +1 -0
- package/lib/node/constants/txConstants.d.ts.map +1 -1
- package/lib/node/constants/txConstants.js +2 -1
- package/lib/node/driftClient.d.ts +13 -6
- package/lib/node/driftClient.d.ts.map +1 -1
- package/lib/node/driftClient.js +280 -36
- package/lib/node/idl/drift.json +207 -18
- package/lib/node/markets.d.ts +6 -0
- package/lib/node/markets.d.ts.map +1 -0
- package/lib/node/markets.js +16 -0
- package/lib/node/swap/UnifiedSwapClient.d.ts.map +1 -1
- package/lib/node/swap/UnifiedSwapClient.js +2 -0
- package/lib/node/titan/titanClient.d.ts +3 -0
- package/lib/node/titan/titanClient.d.ts.map +1 -1
- package/lib/node/titan/titanClient.js +58 -60
- package/lib/node/user.d.ts +1 -1
- package/lib/node/user.d.ts.map +1 -1
- package/package.json +10 -2
- package/src/constants/perpMarkets.ts +13 -0
- package/src/constants/txConstants.ts +2 -0
- package/src/driftClient.ts +477 -52
- package/src/idl/drift.json +207 -18
- package/src/markets.ts +24 -0
- package/src/swap/UnifiedSwapClient.ts +2 -0
- package/src/titan/titanClient.ts +88 -72
- package/src/user.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drift-labs/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.153.0-beta.0",
|
|
4
4
|
"main": "lib/node/index.js",
|
|
5
5
|
"types": "lib/node/index.d.ts",
|
|
6
6
|
"module": "./lib/browser/index.js",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"lint": "eslint './**/*.{ts,tsx}' --quiet --format unix",
|
|
15
15
|
"build": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig.browser.json && node scripts/postbuild.js",
|
|
16
16
|
"build:browser": "yarn clean && tsc -p tsconfig.json && tsc -p tsconfig.browser.json && node scripts/postbuild.js --force-env browser",
|
|
17
|
+
"build:minify": "node build-browser.js",
|
|
17
18
|
"clean": "rm -rf lib",
|
|
18
19
|
"test": "mocha -r ts-node/register tests/**/*.ts --ignore 'tests/dlob/**/*.ts'",
|
|
19
20
|
"test:match": "mocha -r ts-node/register --ignore 'tests/dlob/**/*.ts'",
|
|
@@ -81,7 +82,9 @@
|
|
|
81
82
|
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
82
83
|
"@typescript-eslint/parser": "6.21.0",
|
|
83
84
|
"chai": "4.5.0",
|
|
85
|
+
"crypto-browserify": "^3.12.1",
|
|
84
86
|
"encoding": "0.1.13",
|
|
87
|
+
"esbuild": "^0.27.1",
|
|
85
88
|
"eslint": "8.57.0",
|
|
86
89
|
"eslint-config-prettier": "8.3.0",
|
|
87
90
|
"eslint-plugin-prettier": "3.4.0",
|
|
@@ -89,10 +92,15 @@
|
|
|
89
92
|
"madge": "^8.0.0",
|
|
90
93
|
"mocha": "10.7.3",
|
|
91
94
|
"object-sizeof": "2.6.5",
|
|
95
|
+
"os-browserify": "^0.3.0",
|
|
96
|
+
"path-browserify": "^1.0.1",
|
|
92
97
|
"prettier": "3.0.1",
|
|
98
|
+
"process": "^0.11.10",
|
|
93
99
|
"sinon": "18.0.1",
|
|
100
|
+
"stream-browserify": "^3.0.0",
|
|
94
101
|
"ts-node": "10.9.2",
|
|
95
|
-
"typescript": "5.4.5"
|
|
102
|
+
"typescript": "5.4.5",
|
|
103
|
+
"vm-browserify": "^1.1.2"
|
|
96
104
|
},
|
|
97
105
|
"description": "SDK for Drift Protocol",
|
|
98
106
|
"engines": {
|
|
@@ -1439,6 +1439,19 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
|
|
|
1439
1439
|
oracleSource: OracleSource.PYTH_LAZER_1K,
|
|
1440
1440
|
pythLazerId: 2396,
|
|
1441
1441
|
},
|
|
1442
|
+
{
|
|
1443
|
+
fullName: 'Lighter',
|
|
1444
|
+
category: ['DEX'],
|
|
1445
|
+
symbol: 'LIT-PERP',
|
|
1446
|
+
baseAssetSymbol: 'LIT',
|
|
1447
|
+
marketIndex: 84,
|
|
1448
|
+
oracle: new PublicKey('HsfwxaJdpY5Dvd3ttrrY7YL635T7D9W443XdTwE2Dvbh'),
|
|
1449
|
+
launchTs: 1767621600000,
|
|
1450
|
+
oracleSource: OracleSource.PYTH_LAZER,
|
|
1451
|
+
pythFeedId:
|
|
1452
|
+
'0xc0c83f00c39165892d55dcd17ade2191e289697e2ac132d9ab721e20834e2a9e',
|
|
1453
|
+
pythLazerId: 2921,
|
|
1454
|
+
},
|
|
1442
1455
|
];
|
|
1443
1456
|
|
|
1444
1457
|
export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
|