@drift-labs/sdk 2.41.0-beta.2 → 2.41.0-beta.3

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.41.0-beta.2
1
+ 2.41.0-beta.3
@@ -67,6 +67,7 @@ export declare class AdminClient extends DriftClient {
67
67
  updatePerpMarketUnrealizedAssetWeight(perpMarketIndex: number, unrealizedInitialAssetWeight: number, unrealizedMaintenanceAssetWeight: number): Promise<TransactionSignature>;
68
68
  updatePerpMarketMaxImbalances(perpMarketIndex: number, unrealizedMaxImbalance: BN, maxRevenueWithdrawPerPeriod: BN, quoteMaxInsurance: BN): Promise<TransactionSignature>;
69
69
  updatePerpMarketMaxOpenInterest(perpMarketIndex: number, maxOpenInterest: BN): Promise<TransactionSignature>;
70
+ updatePerpMarketFeeAdjustment(perpMarketIndex: number, feeAdjustment: number): Promise<TransactionSignature>;
70
71
  updateSerumVault(srmVault: PublicKey): Promise<TransactionSignature>;
71
72
  updatePerpMarketLiquidationFee(perpMarketIndex: number, liquidatorFee: number, ifLiquidationFee: number): Promise<TransactionSignature>;
72
73
  updateSpotMarketLiquidationFee(spotMarketIndex: number, liquidatorFee: number, ifLiquidationFee: number): Promise<TransactionSignature>;
@@ -764,6 +764,15 @@ class AdminClient extends driftClient_1.DriftClient {
764
764
  },
765
765
  });
766
766
  }
767
+ async updatePerpMarketFeeAdjustment(perpMarketIndex, feeAdjustment) {
768
+ return await this.program.rpc.updatePerpMarketFeeAdjustment(feeAdjustment, {
769
+ accounts: {
770
+ admin: this.wallet.publicKey,
771
+ state: await this.getStatePublicKey(),
772
+ perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
773
+ },
774
+ });
775
+ }
767
776
  async updateSerumVault(srmVault) {
768
777
  return await this.program.rpc.updateSerumVault({
769
778
  accounts: {
package/lib/types.d.ts CHANGED
@@ -664,6 +664,7 @@ export type PerpMarketAccount = {
664
664
  quoteMaxInsurance: BN;
665
665
  };
666
666
  quoteSpotMarketIndex: number;
667
+ feeAdjustment: number;
667
668
  };
668
669
  export type HistoricalOracleData = {
669
670
  lastOraclePrice: BN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.41.0-beta.2",
3
+ "version": "2.41.0-beta.3",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -1464,6 +1464,22 @@ export class AdminClient extends DriftClient {
1464
1464
  );
1465
1465
  }
1466
1466
 
1467
+ public async updatePerpMarketFeeAdjustment(
1468
+ perpMarketIndex: number,
1469
+ feeAdjustment: number
1470
+ ): Promise<TransactionSignature> {
1471
+ return await this.program.rpc.updatePerpMarketFeeAdjustment(feeAdjustment, {
1472
+ accounts: {
1473
+ admin: this.wallet.publicKey,
1474
+ state: await this.getStatePublicKey(),
1475
+ perpMarket: await getPerpMarketPublicKey(
1476
+ this.program.programId,
1477
+ perpMarketIndex
1478
+ ),
1479
+ },
1480
+ });
1481
+ }
1482
+
1467
1483
  public async updateSerumVault(
1468
1484
  srmVault: PublicKey
1469
1485
  ): Promise<TransactionSignature> {
package/src/types.ts CHANGED
@@ -585,6 +585,7 @@ export type PerpMarketAccount = {
585
585
  quoteMaxInsurance: BN;
586
586
  };
587
587
  quoteSpotMarketIndex: number;
588
+ feeAdjustment: number;
588
589
  };
589
590
 
590
591
  export type HistoricalOracleData = {
@@ -178,6 +178,7 @@ export const mockPerpMarkets: Array<PerpMarketAccount> = [
178
178
  quoteMaxInsurance: new BN(0),
179
179
  },
180
180
  quoteSpotMarketIndex: 0,
181
+ feeAdjustment: 0,
181
182
  },
182
183
  {
183
184
  status: MarketStatus.INITIALIZED,
@@ -215,6 +216,7 @@ export const mockPerpMarkets: Array<PerpMarketAccount> = [
215
216
  quoteMaxInsurance: new BN(0),
216
217
  },
217
218
  quoteSpotMarketIndex: 0,
219
+ feeAdjustment: 0,
218
220
  },
219
221
  {
220
222
  status: MarketStatus.INITIALIZED,
@@ -252,6 +254,7 @@ export const mockPerpMarkets: Array<PerpMarketAccount> = [
252
254
  quoteMaxInsurance: new BN(0),
253
255
  },
254
256
  quoteSpotMarketIndex: 0,
257
+ feeAdjustment: 0,
255
258
  },
256
259
  ];
257
260