@drift-labs/sdk 2.85.0-beta.2 → 2.85.0-beta.4
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/constants/perpMarkets.js +10 -0
- package/lib/constants/spotMarkets.js +10 -0
- package/lib/driftClient.js +3 -0
- package/package.json +1 -1
- package/src/constants/perpMarkets.ts +10 -0
- package/src/constants/spotMarkets.ts +10 -0
- package/src/driftClient.ts +4 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.85.0-beta.
|
|
1
|
+
2.85.0-beta.4
|
|
@@ -586,6 +586,16 @@ exports.MainnetPerpMarkets = [
|
|
|
586
586
|
launchTs: 1718021389000,
|
|
587
587
|
oracleSource: __1.OracleSource.SWITCHBOARD,
|
|
588
588
|
},
|
|
589
|
+
{
|
|
590
|
+
fullName: 'ZEX',
|
|
591
|
+
category: ['DEX', 'Solana'],
|
|
592
|
+
symbol: 'ZEX-PERP',
|
|
593
|
+
baseAssetSymbol: 'ZEX',
|
|
594
|
+
marketIndex: 33,
|
|
595
|
+
oracle: new web3_js_1.PublicKey('5P3hx3t85eZucSqzXF4KfqbeENx1hNGPbAbGDYxTTvqs'),
|
|
596
|
+
launchTs: 1719415157000,
|
|
597
|
+
oracleSource: __1.OracleSource.Prelaunch,
|
|
598
|
+
},
|
|
589
599
|
];
|
|
590
600
|
exports.PerpMarkets = {
|
|
591
601
|
devnet: exports.DevnetPerpMarkets,
|
|
@@ -238,6 +238,16 @@ exports.MainnetSpotMarkets = [
|
|
|
238
238
|
precisionExp: numericConstants_1.SIX,
|
|
239
239
|
launchTs: 1718811089000,
|
|
240
240
|
},
|
|
241
|
+
{
|
|
242
|
+
symbol: 'JLP',
|
|
243
|
+
marketIndex: 19,
|
|
244
|
+
oracle: new web3_js_1.PublicKey('HR1mmjm2GeTRvdaN9VCy3wyx35h8Pimjv5wyzZ5NJmxE'),
|
|
245
|
+
oracleSource: __1.OracleSource.SWITCHBOARD,
|
|
246
|
+
mint: new web3_js_1.PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4'),
|
|
247
|
+
precision: new __1.BN(10).pow(numericConstants_1.SIX),
|
|
248
|
+
precisionExp: numericConstants_1.SIX,
|
|
249
|
+
launchTs: 1719415157000,
|
|
250
|
+
},
|
|
241
251
|
];
|
|
242
252
|
exports.SpotMarkets = {
|
|
243
253
|
devnet: exports.DevnetSpotMarkets,
|
package/lib/driftClient.js
CHANGED
|
@@ -2586,6 +2586,9 @@ class DriftClient {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
async placeAndTakePerpWithAdditionalOrders(orderParams, makerInfo, referrerInfo, bracketOrdersParams = new Array(), txParams, subAccountId, cancelExistingOrders, settlePnl, exitEarlyIfSimFails) {
|
|
2588
2588
|
const txsToSign = await this.preparePlaceAndTakePerpOrderWithAdditionalOrders(orderParams, makerInfo, referrerInfo, bracketOrdersParams, txParams, subAccountId, cancelExistingOrders, settlePnl, exitEarlyIfSimFails);
|
|
2589
|
+
if (!txsToSign) {
|
|
2590
|
+
return null;
|
|
2591
|
+
}
|
|
2589
2592
|
const signedTxs = (await this.txHandler.getSignedTransactionMap(txsToSign, this.provider.wallet)).signedTxMap;
|
|
2590
2593
|
const { txSig, slot } = await this.sendTransaction(signedTxs.placeAndTakeTx, [], this.opts, true);
|
|
2591
2594
|
this.perpMarketLastSlotCache.set(orderParams.marketIndex, slot);
|
package/package.json
CHANGED
|
@@ -597,6 +597,16 @@ export const MainnetPerpMarkets: PerpMarketConfig[] = [
|
|
|
597
597
|
launchTs: 1718021389000,
|
|
598
598
|
oracleSource: OracleSource.SWITCHBOARD,
|
|
599
599
|
},
|
|
600
|
+
{
|
|
601
|
+
fullName: 'ZEX',
|
|
602
|
+
category: ['DEX', 'Solana'],
|
|
603
|
+
symbol: 'ZEX-PERP',
|
|
604
|
+
baseAssetSymbol: 'ZEX',
|
|
605
|
+
marketIndex: 33,
|
|
606
|
+
oracle: new PublicKey('5P3hx3t85eZucSqzXF4KfqbeENx1hNGPbAbGDYxTTvqs'),
|
|
607
|
+
launchTs: 1719415157000,
|
|
608
|
+
oracleSource: OracleSource.Prelaunch,
|
|
609
|
+
},
|
|
600
610
|
];
|
|
601
611
|
|
|
602
612
|
export const PerpMarkets: { [key in DriftEnv]: PerpMarketConfig[] } = {
|
|
@@ -283,6 +283,16 @@ export const MainnetSpotMarkets: SpotMarketConfig[] = [
|
|
|
283
283
|
precisionExp: SIX,
|
|
284
284
|
launchTs: 1718811089000,
|
|
285
285
|
},
|
|
286
|
+
{
|
|
287
|
+
symbol: 'JLP',
|
|
288
|
+
marketIndex: 19,
|
|
289
|
+
oracle: new PublicKey('HR1mmjm2GeTRvdaN9VCy3wyx35h8Pimjv5wyzZ5NJmxE'),
|
|
290
|
+
oracleSource: OracleSource.SWITCHBOARD,
|
|
291
|
+
mint: new PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4'),
|
|
292
|
+
precision: new BN(10).pow(SIX),
|
|
293
|
+
precisionExp: SIX,
|
|
294
|
+
launchTs: 1719415157000,
|
|
295
|
+
},
|
|
286
296
|
];
|
|
287
297
|
|
|
288
298
|
export const SpotMarkets: { [key in DriftEnv]: SpotMarketConfig[] } = {
|
package/src/driftClient.ts
CHANGED