@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 CHANGED
@@ -1 +1 @@
1
- 2.85.0-beta.2
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,
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.85.0-beta.2",
3
+ "version": "2.85.0-beta.4",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -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[] } = {
@@ -4785,6 +4785,10 @@ export class DriftClient {
4785
4785
  exitEarlyIfSimFails
4786
4786
  );
4787
4787
 
4788
+ if (!txsToSign) {
4789
+ return null;
4790
+ }
4791
+
4788
4792
  const signedTxs = (
4789
4793
  await this.txHandler.getSignedTransactionMap(
4790
4794
  txsToSign,