@drift-labs/sdk 2.153.0-beta.0 → 2.153.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.153.0-beta.0",
3
+ "version": "2.153.0-beta.2",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "module": "./lib/browser/index.js",
@@ -384,6 +384,33 @@ export class AdminClient extends DriftClient {
384
384
  );
385
385
  }
386
386
 
387
+ public async deleteSerumFulfillmentConfig(
388
+ serumMarket: PublicKey
389
+ ): Promise<TransactionSignature> {
390
+ const deleteIx = await this.getDeleteSerumFulfillmentConfigIx(serumMarket);
391
+ const tx = await this.buildTransaction(deleteIx);
392
+ const { txSig } = await this.sendTransaction(tx, [], this.opts);
393
+ return txSig;
394
+ }
395
+
396
+ public async getDeleteSerumFulfillmentConfigIx(
397
+ serumMarket: PublicKey
398
+ ): Promise<TransactionInstruction> {
399
+ const serumFulfillmentConfig = getSerumFulfillmentConfigPublicKey(
400
+ this.program.programId,
401
+ serumMarket
402
+ );
403
+ return await this.program.instruction.deleteSerumFulfillmentConfig({
404
+ accounts: {
405
+ admin: this.isSubscribed
406
+ ? this.getStateAccount().admin
407
+ : this.wallet.publicKey,
408
+ state: await this.getStatePublicKey(),
409
+ serumFulfillmentConfig,
410
+ },
411
+ });
412
+ }
413
+
387
414
  public async initializePhoenixFulfillmentConfig(
388
415
  marketIndex: number,
389
416
  phoenixMarket: PublicKey
@@ -476,6 +503,35 @@ export class AdminClient extends DriftClient {
476
503
  );
477
504
  }
478
505
 
506
+ public async deleteOpenbookV2FulfillmentConfig(
507
+ openbookMarket: PublicKey
508
+ ): Promise<TransactionSignature> {
509
+ const deleteIx = await this.getDeleteOpenbookV2FulfillmentConfigIx(
510
+ openbookMarket
511
+ );
512
+ const tx = await this.buildTransaction(deleteIx);
513
+ const { txSig } = await this.sendTransaction(tx, [], this.opts);
514
+ return txSig;
515
+ }
516
+
517
+ public async getDeleteOpenbookV2FulfillmentConfigIx(
518
+ openbookMarket: PublicKey
519
+ ): Promise<TransactionInstruction> {
520
+ const openbookV2FulfillmentConfig = getOpenbookV2FulfillmentConfigPublicKey(
521
+ this.program.programId,
522
+ openbookMarket
523
+ );
524
+ return await this.program.instruction.deleteOpenbookV2FulfillmentConfig({
525
+ accounts: {
526
+ admin: this.isSubscribed
527
+ ? this.getStateAccount().admin
528
+ : this.wallet.publicKey,
529
+ state: await this.getStatePublicKey(),
530
+ openbookV2FulfillmentConfig,
531
+ },
532
+ });
533
+ }
534
+
479
535
  public async initializePerpMarket(
480
536
  marketIndex: number,
481
537
  priceOracle: PublicKey,
@@ -4,5 +4,3 @@ export const NOT_CONFIRMED_ERROR_CODE = -1001;
4
4
  export const FUEL_RESET_LOG_ACCOUNT = new PublicKey(
5
5
  'FuE1gqp2fzw2sDNLrbZqKsqpphJcoSW6HPaSJjGd4RZ4'
6
6
  );
7
-
8
- export const DEFAULT_COMMITMENT_LEVEL = 'confirmed';