@drift-labs/sdk 2.80.0-beta.1 → 2.81.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.80.0-beta.1
1
+ 2.81.0-beta.0
@@ -111,6 +111,8 @@ export declare class AdminClient extends DriftClient {
111
111
  getUpdateSpotMarketOracleIx(spotMarketIndex: number, oracle: PublicKey, oracleSource: OracleSource): Promise<TransactionInstruction>;
112
112
  updateSpotMarketOrdersEnabled(spotMarketIndex: number, ordersEnabled: boolean): Promise<TransactionSignature>;
113
113
  getUpdateSpotMarketOrdersEnabledIx(spotMarketIndex: number, ordersEnabled: boolean): Promise<TransactionInstruction>;
114
+ updateSpotMarketIfPausedOperations(spotMarketIndex: number, pausedOperations: number): Promise<TransactionSignature>;
115
+ getUpdateSpotMarketIfPausedOperationsIx(spotMarketIndex: number, pausedOperations: number): Promise<TransactionInstruction>;
114
116
  updateSerumFulfillmentConfigStatus(serumFulfillmentConfig: PublicKey, status: SpotFulfillmentConfigStatus): Promise<TransactionSignature>;
115
117
  getUpdateSerumFulfillmentConfigStatusIx(serumFulfillmentConfig: PublicKey, status: SpotFulfillmentConfigStatus): Promise<TransactionInstruction>;
116
118
  updatePhoenixFulfillmentConfigStatus(phoenixFulfillmentConfig: PublicKey, status: SpotFulfillmentConfigStatus): Promise<TransactionSignature>;
@@ -1027,6 +1027,23 @@ class AdminClient extends driftClient_1.DriftClient {
1027
1027
  },
1028
1028
  });
1029
1029
  }
1030
+ async updateSpotMarketIfPausedOperations(spotMarketIndex, pausedOperations) {
1031
+ const updateSpotMarketIfStakingDisabledIx = await this.getUpdateSpotMarketIfPausedOperationsIx(spotMarketIndex, pausedOperations);
1032
+ const tx = await this.buildTransaction(updateSpotMarketIfStakingDisabledIx);
1033
+ const { txSig } = await this.sendTransaction(tx, [], this.opts);
1034
+ return txSig;
1035
+ }
1036
+ async getUpdateSpotMarketIfPausedOperationsIx(spotMarketIndex, pausedOperations) {
1037
+ return await this.program.instruction.updateSpotMarketIfPausedOperations(pausedOperations, {
1038
+ accounts: {
1039
+ admin: this.isSubscribed
1040
+ ? this.getStateAccount().admin
1041
+ : this.wallet.publicKey,
1042
+ state: await this.getStatePublicKey(),
1043
+ spotMarket: await (0, pda_1.getSpotMarketPublicKey)(this.program.programId, spotMarketIndex),
1044
+ },
1045
+ });
1046
+ }
1030
1047
  async updateSerumFulfillmentConfigStatus(serumFulfillmentConfig, status) {
1031
1048
  const updateSerumFulfillmentConfigStatusIx = await this.getUpdateSerumFulfillmentConfigStatusIx(serumFulfillmentConfig, status);
1032
1049
  const tx = await this.buildTransaction(updateSerumFulfillmentConfigStatusIx);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.79.0",
2
+ "version": "2.80.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -4069,6 +4069,32 @@
4069
4069
  }
4070
4070
  ]
4071
4071
  },
4072
+ {
4073
+ "name": "updateSpotMarketIfPausedOperations",
4074
+ "accounts": [
4075
+ {
4076
+ "name": "admin",
4077
+ "isMut": false,
4078
+ "isSigner": true
4079
+ },
4080
+ {
4081
+ "name": "state",
4082
+ "isMut": false,
4083
+ "isSigner": false
4084
+ },
4085
+ {
4086
+ "name": "spotMarket",
4087
+ "isMut": true,
4088
+ "isSigner": false
4089
+ }
4090
+ ],
4091
+ "args": [
4092
+ {
4093
+ "name": "pausedOperations",
4094
+ "type": "u8"
4095
+ }
4096
+ ]
4097
+ },
4072
4098
  {
4073
4099
  "name": "updateSpotMarketName",
4074
4100
  "accounts": [
@@ -6125,7 +6151,7 @@
6125
6151
  "type": "u8"
6126
6152
  },
6127
6153
  {
6128
- "name": "padding2",
6154
+ "name": "ifPausedOperations",
6129
6155
  "type": "u8"
6130
6156
  },
6131
6157
  {
@@ -9273,6 +9299,26 @@
9273
9299
  ]
9274
9300
  }
9275
9301
  },
9302
+ {
9303
+ "name": "InsuranceFundOperation",
9304
+ "type": {
9305
+ "kind": "enum",
9306
+ "variants": [
9307
+ {
9308
+ "name": "Init"
9309
+ },
9310
+ {
9311
+ "name": "Add"
9312
+ },
9313
+ {
9314
+ "name": "RequestRemove"
9315
+ },
9316
+ {
9317
+ "name": "Remove"
9318
+ }
9319
+ ]
9320
+ }
9321
+ },
9276
9322
  {
9277
9323
  "name": "MarketStatus",
9278
9324
  "type": {
@@ -11848,6 +11894,11 @@
11848
11894
  "code": 6257,
11849
11895
  "name": "CantReclaimRent",
11850
11896
  "msg": "CantReclaimRent"
11897
+ },
11898
+ {
11899
+ "code": 6258,
11900
+ "name": "InsuranceFundOperationPaused",
11901
+ "msg": "InsuranceFundOperationPaused"
11851
11902
  }
11852
11903
  ]
11853
11904
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.80.0-beta.1",
3
+ "version": "2.81.0-beta.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -2241,6 +2241,44 @@ export class AdminClient extends DriftClient {
2241
2241
  );
2242
2242
  }
2243
2243
 
2244
+ public async updateSpotMarketIfPausedOperations(
2245
+ spotMarketIndex: number,
2246
+ pausedOperations: number
2247
+ ): Promise<TransactionSignature> {
2248
+ const updateSpotMarketIfStakingDisabledIx =
2249
+ await this.getUpdateSpotMarketIfPausedOperationsIx(
2250
+ spotMarketIndex,
2251
+ pausedOperations
2252
+ );
2253
+
2254
+ const tx = await this.buildTransaction(updateSpotMarketIfStakingDisabledIx);
2255
+
2256
+ const { txSig } = await this.sendTransaction(tx, [], this.opts);
2257
+
2258
+ return txSig;
2259
+ }
2260
+
2261
+ public async getUpdateSpotMarketIfPausedOperationsIx(
2262
+ spotMarketIndex: number,
2263
+ pausedOperations: number
2264
+ ): Promise<TransactionInstruction> {
2265
+ return await this.program.instruction.updateSpotMarketIfPausedOperations(
2266
+ pausedOperations,
2267
+ {
2268
+ accounts: {
2269
+ admin: this.isSubscribed
2270
+ ? this.getStateAccount().admin
2271
+ : this.wallet.publicKey,
2272
+ state: await this.getStatePublicKey(),
2273
+ spotMarket: await getSpotMarketPublicKey(
2274
+ this.program.programId,
2275
+ spotMarketIndex
2276
+ ),
2277
+ },
2278
+ }
2279
+ );
2280
+ }
2281
+
2244
2282
  public async updateSerumFulfillmentConfigStatus(
2245
2283
  serumFulfillmentConfig: PublicKey,
2246
2284
  status: SpotFulfillmentConfigStatus
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.79.0",
2
+ "version": "2.80.0",
3
3
  "name": "drift",
4
4
  "instructions": [
5
5
  {
@@ -4069,6 +4069,32 @@
4069
4069
  }
4070
4070
  ]
4071
4071
  },
4072
+ {
4073
+ "name": "updateSpotMarketIfPausedOperations",
4074
+ "accounts": [
4075
+ {
4076
+ "name": "admin",
4077
+ "isMut": false,
4078
+ "isSigner": true
4079
+ },
4080
+ {
4081
+ "name": "state",
4082
+ "isMut": false,
4083
+ "isSigner": false
4084
+ },
4085
+ {
4086
+ "name": "spotMarket",
4087
+ "isMut": true,
4088
+ "isSigner": false
4089
+ }
4090
+ ],
4091
+ "args": [
4092
+ {
4093
+ "name": "pausedOperations",
4094
+ "type": "u8"
4095
+ }
4096
+ ]
4097
+ },
4072
4098
  {
4073
4099
  "name": "updateSpotMarketName",
4074
4100
  "accounts": [
@@ -6125,7 +6151,7 @@
6125
6151
  "type": "u8"
6126
6152
  },
6127
6153
  {
6128
- "name": "padding2",
6154
+ "name": "ifPausedOperations",
6129
6155
  "type": "u8"
6130
6156
  },
6131
6157
  {
@@ -9273,6 +9299,26 @@
9273
9299
  ]
9274
9300
  }
9275
9301
  },
9302
+ {
9303
+ "name": "InsuranceFundOperation",
9304
+ "type": {
9305
+ "kind": "enum",
9306
+ "variants": [
9307
+ {
9308
+ "name": "Init"
9309
+ },
9310
+ {
9311
+ "name": "Add"
9312
+ },
9313
+ {
9314
+ "name": "RequestRemove"
9315
+ },
9316
+ {
9317
+ "name": "Remove"
9318
+ }
9319
+ ]
9320
+ }
9321
+ },
9276
9322
  {
9277
9323
  "name": "MarketStatus",
9278
9324
  "type": {
@@ -11848,6 +11894,11 @@
11848
11894
  "code": 6257,
11849
11895
  "name": "CantReclaimRent",
11850
11896
  "msg": "CantReclaimRent"
11897
+ },
11898
+ {
11899
+ "code": 6258,
11900
+ "name": "InsuranceFundOperationPaused",
11901
+ "msg": "InsuranceFundOperationPaused"
11851
11902
  }
11852
11903
  ]
11853
11904
  }