@drift-labs/sdk 2.105.0-beta.4 → 2.106.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 CHANGED
@@ -1 +1 @@
1
- 2.105.0-beta.4
1
+ 2.106.0-beta.0
@@ -834,6 +834,8 @@ export declare class DriftClient {
834
834
  fetchHighLeverageModeConfig(): Promise<HighLeverageModeConfig>;
835
835
  updateUserProtectedMakerOrders(subAccountId: number, protectedOrders: boolean, txParams?: TxParams): Promise<TransactionSignature>;
836
836
  getUpdateUserProtectedMakerOrdersIx(subAccountId: number, protectedOrders: boolean): Promise<TransactionInstruction>;
837
+ getPauseSpotMarketDepositWithdrawIx(spotMarketIndex: number): Promise<TransactionInstruction>;
838
+ pauseSpotMarketDepositWithdraw(spotMarketIndex: number, txParams?: TxParams): Promise<TransactionSignature>;
837
839
  private handleSignedTransaction;
838
840
  private handlePreSignedTransaction;
839
841
  private isVersionedTransaction;
@@ -4692,6 +4692,21 @@ class DriftClient {
4692
4692
  });
4693
4693
  return ix;
4694
4694
  }
4695
+ async getPauseSpotMarketDepositWithdrawIx(spotMarketIndex) {
4696
+ const spotMarket = await this.getSpotMarketAccount(spotMarketIndex);
4697
+ return this.program.instruction.pauseSpotMarketDepositWithdraw({
4698
+ accounts: {
4699
+ state: await this.getStatePublicKey(),
4700
+ keeper: this.wallet.publicKey,
4701
+ spotMarket: spotMarket.pubkey,
4702
+ spotMarketVault: spotMarket.vault,
4703
+ },
4704
+ });
4705
+ }
4706
+ async pauseSpotMarketDepositWithdraw(spotMarketIndex, txParams) {
4707
+ const { txSig } = await this.sendTransaction(await this.buildTransaction(await this.getPauseSpotMarketDepositWithdrawIx(spotMarketIndex), txParams), [], this.opts);
4708
+ return txSig;
4709
+ }
4695
4710
  handleSignedTransaction(signedTxs) {
4696
4711
  if (this.enableMetricsEvents && this.metricsEventEmitter) {
4697
4712
  this.metricsEventEmitter.emit('txSigned', signedTxs);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.104.0",
2
+ "version": "2.105.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -3280,6 +3280,32 @@
3280
3280
  }
3281
3281
  ]
3282
3282
  },
3283
+ {
3284
+ "name": "pauseSpotMarketDepositWithdraw",
3285
+ "accounts": [
3286
+ {
3287
+ "name": "state",
3288
+ "isMut": false,
3289
+ "isSigner": false
3290
+ },
3291
+ {
3292
+ "name": "keeper",
3293
+ "isMut": false,
3294
+ "isSigner": true
3295
+ },
3296
+ {
3297
+ "name": "spotMarket",
3298
+ "isMut": true,
3299
+ "isSigner": false
3300
+ },
3301
+ {
3302
+ "name": "spotMarketVault",
3303
+ "isMut": false,
3304
+ "isSigner": false
3305
+ }
3306
+ ],
3307
+ "args": []
3308
+ },
3283
3309
  {
3284
3310
  "name": "initialize",
3285
3311
  "accounts": [
@@ -834,6 +834,8 @@ export declare class DriftClient {
834
834
  fetchHighLeverageModeConfig(): Promise<HighLeverageModeConfig>;
835
835
  updateUserProtectedMakerOrders(subAccountId: number, protectedOrders: boolean, txParams?: TxParams): Promise<TransactionSignature>;
836
836
  getUpdateUserProtectedMakerOrdersIx(subAccountId: number, protectedOrders: boolean): Promise<TransactionInstruction>;
837
+ getPauseSpotMarketDepositWithdrawIx(spotMarketIndex: number): Promise<TransactionInstruction>;
838
+ pauseSpotMarketDepositWithdraw(spotMarketIndex: number, txParams?: TxParams): Promise<TransactionSignature>;
837
839
  private handleSignedTransaction;
838
840
  private handlePreSignedTransaction;
839
841
  private isVersionedTransaction;
@@ -4692,6 +4692,21 @@ class DriftClient {
4692
4692
  });
4693
4693
  return ix;
4694
4694
  }
4695
+ async getPauseSpotMarketDepositWithdrawIx(spotMarketIndex) {
4696
+ const spotMarket = await this.getSpotMarketAccount(spotMarketIndex);
4697
+ return this.program.instruction.pauseSpotMarketDepositWithdraw({
4698
+ accounts: {
4699
+ state: await this.getStatePublicKey(),
4700
+ keeper: this.wallet.publicKey,
4701
+ spotMarket: spotMarket.pubkey,
4702
+ spotMarketVault: spotMarket.vault,
4703
+ },
4704
+ });
4705
+ }
4706
+ async pauseSpotMarketDepositWithdraw(spotMarketIndex, txParams) {
4707
+ const { txSig } = await this.sendTransaction(await this.buildTransaction(await this.getPauseSpotMarketDepositWithdrawIx(spotMarketIndex), txParams), [], this.opts);
4708
+ return txSig;
4709
+ }
4695
4710
  handleSignedTransaction(signedTxs) {
4696
4711
  if (this.enableMetricsEvents && this.metricsEventEmitter) {
4697
4712
  this.metricsEventEmitter.emit('txSigned', signedTxs);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.104.0",
2
+ "version": "2.105.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -3280,6 +3280,32 @@
3280
3280
  }
3281
3281
  ]
3282
3282
  },
3283
+ {
3284
+ "name": "pauseSpotMarketDepositWithdraw",
3285
+ "accounts": [
3286
+ {
3287
+ "name": "state",
3288
+ "isMut": false,
3289
+ "isSigner": false
3290
+ },
3291
+ {
3292
+ "name": "keeper",
3293
+ "isMut": false,
3294
+ "isSigner": true
3295
+ },
3296
+ {
3297
+ "name": "spotMarket",
3298
+ "isMut": true,
3299
+ "isSigner": false
3300
+ },
3301
+ {
3302
+ "name": "spotMarketVault",
3303
+ "isMut": false,
3304
+ "isSigner": false
3305
+ }
3306
+ ],
3307
+ "args": []
3308
+ },
3283
3309
  {
3284
3310
  "name": "initialize",
3285
3311
  "accounts": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.105.0-beta.4",
3
+ "version": "2.106.0-beta.0",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
@@ -8937,6 +8937,35 @@ export class DriftClient {
8937
8937
  return ix;
8938
8938
  }
8939
8939
 
8940
+ public async getPauseSpotMarketDepositWithdrawIx(
8941
+ spotMarketIndex: number
8942
+ ): Promise<TransactionInstruction> {
8943
+ const spotMarket = await this.getSpotMarketAccount(spotMarketIndex);
8944
+ return this.program.instruction.pauseSpotMarketDepositWithdraw({
8945
+ accounts: {
8946
+ state: await this.getStatePublicKey(),
8947
+ keeper: this.wallet.publicKey,
8948
+ spotMarket: spotMarket.pubkey,
8949
+ spotMarketVault: spotMarket.vault,
8950
+ },
8951
+ });
8952
+ }
8953
+
8954
+ public async pauseSpotMarketDepositWithdraw(
8955
+ spotMarketIndex: number,
8956
+ txParams?: TxParams
8957
+ ): Promise<TransactionSignature> {
8958
+ const { txSig } = await this.sendTransaction(
8959
+ await this.buildTransaction(
8960
+ await this.getPauseSpotMarketDepositWithdrawIx(spotMarketIndex),
8961
+ txParams
8962
+ ),
8963
+ [],
8964
+ this.opts
8965
+ );
8966
+ return txSig;
8967
+ }
8968
+
8940
8969
  private handleSignedTransaction(signedTxs: SignedTxData[]) {
8941
8970
  if (this.enableMetricsEvents && this.metricsEventEmitter) {
8942
8971
  this.metricsEventEmitter.emit('txSigned', signedTxs);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.104.0",
2
+ "version": "2.105.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -3280,6 +3280,32 @@
3280
3280
  }
3281
3281
  ]
3282
3282
  },
3283
+ {
3284
+ "name": "pauseSpotMarketDepositWithdraw",
3285
+ "accounts": [
3286
+ {
3287
+ "name": "state",
3288
+ "isMut": false,
3289
+ "isSigner": false
3290
+ },
3291
+ {
3292
+ "name": "keeper",
3293
+ "isMut": false,
3294
+ "isSigner": true
3295
+ },
3296
+ {
3297
+ "name": "spotMarket",
3298
+ "isMut": true,
3299
+ "isSigner": false
3300
+ },
3301
+ {
3302
+ "name": "spotMarketVault",
3303
+ "isMut": false,
3304
+ "isSigner": false
3305
+ }
3306
+ ],
3307
+ "args": []
3308
+ },
3283
3309
  {
3284
3310
  "name": "initialize",
3285
3311
  "accounts": [