@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/VERSION +1 -1
- package/lib/browser/adminClient.d.ts +4 -0
- package/lib/browser/adminClient.js +36 -0
- package/lib/browser/constants/txConstants.d.ts +0 -1
- package/lib/browser/constants/txConstants.js +1 -2
- package/lib/browser/driftClient.d.ts +6 -6
- package/lib/browser/driftClient.js +36 -184
- package/lib/browser/idl/drift.json +46 -2
- package/lib/node/adminClient.d.ts +4 -0
- package/lib/node/adminClient.d.ts.map +1 -1
- package/lib/node/adminClient.js +36 -0
- package/lib/node/constants/txConstants.d.ts +0 -1
- package/lib/node/constants/txConstants.d.ts.map +1 -1
- package/lib/node/constants/txConstants.js +1 -2
- package/lib/node/driftClient.d.ts +6 -6
- package/lib/node/driftClient.d.ts.map +1 -1
- package/lib/node/driftClient.js +36 -184
- package/lib/node/idl/drift.json +46 -2
- package/package.json +1 -1
- package/src/adminClient.ts +56 -0
- package/src/constants/txConstants.ts +0 -2
- package/src/driftClient.ts +52 -264
- package/src/idl/drift.json +46 -2
- package/lib/browser/markets.d.ts +0 -5
- package/lib/browser/markets.js +0 -16
- package/lib/node/markets.d.ts +0 -6
- package/lib/node/markets.d.ts.map +0 -1
- package/lib/node/markets.js +0 -16
- package/src/markets.ts +0 -24
package/package.json
CHANGED
package/src/adminClient.ts
CHANGED
|
@@ -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,
|