@drift-labs/sdk 2.86.0-beta.32 → 2.86.0-beta.33

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.86.0-beta.32
1
+ 2.86.0-beta.33
@@ -91,8 +91,8 @@ export declare class AdminClient extends DriftClient {
91
91
  getUpdateSpotMarketRevenueSettlePeriodIx(spotMarketIndex: number, revenueSettlePeriod: BN): Promise<TransactionInstruction>;
92
92
  updateSpotMarketMaxTokenDeposits(spotMarketIndex: number, maxTokenDeposits: BN): Promise<TransactionSignature>;
93
93
  getUpdateSpotMarketMaxTokenDepositsIx(spotMarketIndex: number, maxTokenDeposits: BN): Promise<TransactionInstruction>;
94
- updateSpotMarketMaxTokenBorrows(spotMarketIndex: number, maxTokenBorrows: BN): Promise<TransactionSignature>;
95
- getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex: number, maxTokenBorrows: BN): Promise<TransactionInstruction>;
94
+ updateSpotMarketMaxTokenBorrows(spotMarketIndex: number, maxTokenBorrowsFraction: number): Promise<TransactionSignature>;
95
+ getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex: number, maxTokenBorrowsFraction: number): Promise<TransactionInstruction>;
96
96
  updateSpotMarketScaleInitialAssetWeightStart(spotMarketIndex: number, scaleInitialAssetWeightStart: BN): Promise<TransactionSignature>;
97
97
  getUpdateSpotMarketScaleInitialAssetWeightStartIx(spotMarketIndex: number, scaleInitialAssetWeightStart: BN): Promise<TransactionInstruction>;
98
98
  updateInsuranceFundUnstakingPeriod(spotMarketIndex: number, insuranceWithdrawEscrowPeriod: BN): Promise<TransactionSignature>;
@@ -857,14 +857,14 @@ class AdminClient extends driftClient_1.DriftClient {
857
857
  },
858
858
  });
859
859
  }
860
- async updateSpotMarketMaxTokenBorrows(spotMarketIndex, maxTokenBorrows) {
861
- const updateSpotMarketMaxTokenBorrowsIx = await this.getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex, maxTokenBorrows);
860
+ async updateSpotMarketMaxTokenBorrows(spotMarketIndex, maxTokenBorrowsFraction) {
861
+ const updateSpotMarketMaxTokenBorrowsIx = await this.getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex, maxTokenBorrowsFraction);
862
862
  const tx = await this.buildTransaction(updateSpotMarketMaxTokenBorrowsIx);
863
863
  const { txSig } = await this.sendTransaction(tx, [], this.opts);
864
864
  return txSig;
865
865
  }
866
- async getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex, maxTokenBorrows) {
867
- return this.program.instruction.updateSpotMarketMaxTokenBorrows(maxTokenBorrows, {
866
+ async getUpdateSpotMarketMaxTokenBorrowsIx(spotMarketIndex, maxTokenBorrowsFraction) {
867
+ return this.program.instruction.updateSpotMarketMaxTokenBorrows(maxTokenBorrowsFraction, {
868
868
  accounts: {
869
869
  admin: this.isSubscribed
870
870
  ? this.getStateAccount().admin
@@ -4200,6 +4200,32 @@
4200
4200
  }
4201
4201
  ]
4202
4202
  },
4203
+ {
4204
+ "name": "updateSpotMarketMaxTokenBorrows",
4205
+ "accounts": [
4206
+ {
4207
+ "name": "admin",
4208
+ "isMut": false,
4209
+ "isSigner": true
4210
+ },
4211
+ {
4212
+ "name": "state",
4213
+ "isMut": false,
4214
+ "isSigner": false
4215
+ },
4216
+ {
4217
+ "name": "spotMarket",
4218
+ "isMut": true,
4219
+ "isSigner": false
4220
+ }
4221
+ ],
4222
+ "args": [
4223
+ {
4224
+ "name": "maxTokenBorrowsFraction",
4225
+ "type": "u16"
4226
+ }
4227
+ ]
4228
+ },
4203
4229
  {
4204
4230
  "name": "updateSpotMarketScaleInitialAssetWeightStart",
4205
4231
  "accounts": [
@@ -9994,6 +10020,9 @@
9994
10020
  {
9995
10021
  "name": "Fill"
9996
10022
  },
10023
+ {
10024
+ "name": "Deposit"
10025
+ },
9997
10026
  {
9998
10027
  "name": "Withdraw"
9999
10028
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.86.0-beta.32",
3
+ "version": "2.86.0-beta.33",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -1870,12 +1870,12 @@ export class AdminClient extends DriftClient {
1870
1870
 
1871
1871
  public async updateSpotMarketMaxTokenBorrows(
1872
1872
  spotMarketIndex: number,
1873
- maxTokenBorrows: BN
1873
+ maxTokenBorrowsFraction: number
1874
1874
  ): Promise<TransactionSignature> {
1875
1875
  const updateSpotMarketMaxTokenBorrowsIx =
1876
1876
  await this.getUpdateSpotMarketMaxTokenBorrowsIx(
1877
1877
  spotMarketIndex,
1878
- maxTokenBorrows
1878
+ maxTokenBorrowsFraction
1879
1879
  );
1880
1880
 
1881
1881
  const tx = await this.buildTransaction(updateSpotMarketMaxTokenBorrowsIx);
@@ -1887,10 +1887,10 @@ export class AdminClient extends DriftClient {
1887
1887
 
1888
1888
  public async getUpdateSpotMarketMaxTokenBorrowsIx(
1889
1889
  spotMarketIndex: number,
1890
- maxTokenBorrows: BN
1890
+ maxTokenBorrowsFraction: number
1891
1891
  ): Promise<TransactionInstruction> {
1892
1892
  return this.program.instruction.updateSpotMarketMaxTokenBorrows(
1893
- maxTokenBorrows,
1893
+ maxTokenBorrowsFraction,
1894
1894
  {
1895
1895
  accounts: {
1896
1896
  admin: this.isSubscribed
@@ -4200,6 +4200,32 @@
4200
4200
  }
4201
4201
  ]
4202
4202
  },
4203
+ {
4204
+ "name": "updateSpotMarketMaxTokenBorrows",
4205
+ "accounts": [
4206
+ {
4207
+ "name": "admin",
4208
+ "isMut": false,
4209
+ "isSigner": true
4210
+ },
4211
+ {
4212
+ "name": "state",
4213
+ "isMut": false,
4214
+ "isSigner": false
4215
+ },
4216
+ {
4217
+ "name": "spotMarket",
4218
+ "isMut": true,
4219
+ "isSigner": false
4220
+ }
4221
+ ],
4222
+ "args": [
4223
+ {
4224
+ "name": "maxTokenBorrowsFraction",
4225
+ "type": "u16"
4226
+ }
4227
+ ]
4228
+ },
4203
4229
  {
4204
4230
  "name": "updateSpotMarketScaleInitialAssetWeightStart",
4205
4231
  "accounts": [
@@ -9994,6 +10020,9 @@
9994
10020
  {
9995
10021
  "name": "Fill"
9996
10022
  },
10023
+ {
10024
+ "name": "Deposit"
10025
+ },
9997
10026
  {
9998
10027
  "name": "Withdraw"
9999
10028
  },