@drift-labs/sdk 2.146.0-beta.4 → 2.146.0-beta.5

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.146.0-beta.4
1
+ 2.146.0-beta.5
@@ -309,9 +309,9 @@ class AdminClient extends driftClient_1.DriftClient {
309
309
  return await this.program.instruction.updateInitialAmmCacheInfo({
310
310
  accounts: {
311
311
  state: await this.getStatePublicKey(),
312
- admin: this.isSubscribed
313
- ? this.getStateAccount().admin
314
- : this.wallet.publicKey,
312
+ admin: this.useHotWalletAdmin
313
+ ? this.wallet.publicKey
314
+ : this.getStateAccount().admin,
315
315
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
316
316
  },
317
317
  remainingAccounts,
@@ -334,9 +334,9 @@ class AdminClient extends driftClient_1.DriftClient {
334
334
  }, params), {
335
335
  accounts: {
336
336
  state: await this.getStatePublicKey(),
337
- admin: this.isSubscribed
338
- ? this.getStateAccount().admin
339
- : this.wallet.publicKey,
337
+ admin: this.useHotWalletAdmin
338
+ ? this.wallet.publicKey
339
+ : this.getStateAccount().admin,
340
340
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
341
341
  },
342
342
  });
@@ -351,9 +351,9 @@ class AdminClient extends driftClient_1.DriftClient {
351
351
  return this.program.instruction.resetAmmCache({
352
352
  accounts: {
353
353
  state: await this.getStatePublicKey(),
354
- admin: this.isSubscribed
355
- ? this.getStateAccount().admin
356
- : this.wallet.publicKey,
354
+ admin: this.useHotWalletAdmin
355
+ ? this.wallet.publicKey
356
+ : this.getStateAccount().admin,
357
357
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
358
358
  systemProgram: anchor.web3.SystemProgram.programId,
359
359
  },
@@ -2610,9 +2610,9 @@ class AdminClient extends driftClient_1.DriftClient {
2610
2610
  return await this.program.instruction.updateConstituentPausedOperations(pausedOperations, {
2611
2611
  accounts: {
2612
2612
  constituent,
2613
- admin: this.isSubscribed
2614
- ? this.getStateAccount().admin
2615
- : this.wallet.publicKey,
2613
+ admin: this.useHotWalletAdmin
2614
+ ? this.wallet.publicKey
2615
+ : this.getStateAccount().admin,
2616
2616
  state: await this.getStatePublicKey(),
2617
2617
  },
2618
2618
  });
@@ -3005,9 +3005,9 @@ class AdminClient extends driftClient_1.DriftClient {
3005
3005
  async getUpdatePerpMarketLpPoolFeeTransferScalarIx(marketIndex, lpFeeTransferScalar, lpExchangeFeeExcluscionScalar) {
3006
3006
  return this.program.instruction.updatePerpMarketLpPoolFeeTransferScalar(lpFeeTransferScalar !== null && lpFeeTransferScalar !== void 0 ? lpFeeTransferScalar : null, lpExchangeFeeExcluscionScalar !== null && lpExchangeFeeExcluscionScalar !== void 0 ? lpExchangeFeeExcluscionScalar : null, {
3007
3007
  accounts: {
3008
- admin: this.isSubscribed
3009
- ? this.getStateAccount().admin
3010
- : this.wallet.publicKey,
3008
+ admin: this.useHotWalletAdmin
3009
+ ? this.wallet.publicKey
3010
+ : this.getStateAccount().admin,
3011
3011
  state: await this.getStatePublicKey(),
3012
3012
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
3013
3013
  },
@@ -3022,9 +3022,9 @@ class AdminClient extends driftClient_1.DriftClient {
3022
3022
  async getUpdatePerpMarketLpPoolPausedOperationsIx(marketIndex, pausedOperations) {
3023
3023
  return this.program.instruction.updatePerpMarketLpPoolPausedOperations(pausedOperations, {
3024
3024
  accounts: {
3025
- admin: this.isSubscribed
3026
- ? this.getStateAccount().admin
3027
- : this.wallet.publicKey,
3025
+ admin: this.useHotWalletAdmin
3026
+ ? this.wallet.publicKey
3027
+ : this.getStateAccount().admin,
3028
3028
  state: await this.getStatePublicKey(),
3029
3029
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
3030
3030
  },
@@ -4484,27 +4484,6 @@
4484
4484
  ],
4485
4485
  "args": []
4486
4486
  },
4487
- {
4488
- "name": "deleteAmmCache",
4489
- "accounts": [
4490
- {
4491
- "name": "admin",
4492
- "isMut": true,
4493
- "isSigner": true
4494
- },
4495
- {
4496
- "name": "state",
4497
- "isMut": false,
4498
- "isSigner": false
4499
- },
4500
- {
4501
- "name": "ammCache",
4502
- "isMut": true,
4503
- "isSigner": false
4504
- }
4505
- ],
4506
- "args": []
4507
- },
4508
4487
  {
4509
4488
  "name": "updateInitialAmmCacheInfo",
4510
4489
  "accounts": [
@@ -309,9 +309,9 @@ class AdminClient extends driftClient_1.DriftClient {
309
309
  return await this.program.instruction.updateInitialAmmCacheInfo({
310
310
  accounts: {
311
311
  state: await this.getStatePublicKey(),
312
- admin: this.isSubscribed
313
- ? this.getStateAccount().admin
314
- : this.wallet.publicKey,
312
+ admin: this.useHotWalletAdmin
313
+ ? this.wallet.publicKey
314
+ : this.getStateAccount().admin,
315
315
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
316
316
  },
317
317
  remainingAccounts,
@@ -334,9 +334,9 @@ class AdminClient extends driftClient_1.DriftClient {
334
334
  }, params), {
335
335
  accounts: {
336
336
  state: await this.getStatePublicKey(),
337
- admin: this.isSubscribed
338
- ? this.getStateAccount().admin
339
- : this.wallet.publicKey,
337
+ admin: this.useHotWalletAdmin
338
+ ? this.wallet.publicKey
339
+ : this.getStateAccount().admin,
340
340
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
341
341
  },
342
342
  });
@@ -351,9 +351,9 @@ class AdminClient extends driftClient_1.DriftClient {
351
351
  return this.program.instruction.resetAmmCache({
352
352
  accounts: {
353
353
  state: await this.getStatePublicKey(),
354
- admin: this.isSubscribed
355
- ? this.getStateAccount().admin
356
- : this.wallet.publicKey,
354
+ admin: this.useHotWalletAdmin
355
+ ? this.wallet.publicKey
356
+ : this.getStateAccount().admin,
357
357
  ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
358
358
  systemProgram: anchor.web3.SystemProgram.programId,
359
359
  },
@@ -2610,9 +2610,9 @@ class AdminClient extends driftClient_1.DriftClient {
2610
2610
  return await this.program.instruction.updateConstituentPausedOperations(pausedOperations, {
2611
2611
  accounts: {
2612
2612
  constituent,
2613
- admin: this.isSubscribed
2614
- ? this.getStateAccount().admin
2615
- : this.wallet.publicKey,
2613
+ admin: this.useHotWalletAdmin
2614
+ ? this.wallet.publicKey
2615
+ : this.getStateAccount().admin,
2616
2616
  state: await this.getStatePublicKey(),
2617
2617
  },
2618
2618
  });
@@ -3005,9 +3005,9 @@ class AdminClient extends driftClient_1.DriftClient {
3005
3005
  async getUpdatePerpMarketLpPoolFeeTransferScalarIx(marketIndex, lpFeeTransferScalar, lpExchangeFeeExcluscionScalar) {
3006
3006
  return this.program.instruction.updatePerpMarketLpPoolFeeTransferScalar(lpFeeTransferScalar !== null && lpFeeTransferScalar !== void 0 ? lpFeeTransferScalar : null, lpExchangeFeeExcluscionScalar !== null && lpExchangeFeeExcluscionScalar !== void 0 ? lpExchangeFeeExcluscionScalar : null, {
3007
3007
  accounts: {
3008
- admin: this.isSubscribed
3009
- ? this.getStateAccount().admin
3010
- : this.wallet.publicKey,
3008
+ admin: this.useHotWalletAdmin
3009
+ ? this.wallet.publicKey
3010
+ : this.getStateAccount().admin,
3011
3011
  state: await this.getStatePublicKey(),
3012
3012
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
3013
3013
  },
@@ -3022,9 +3022,9 @@ class AdminClient extends driftClient_1.DriftClient {
3022
3022
  async getUpdatePerpMarketLpPoolPausedOperationsIx(marketIndex, pausedOperations) {
3023
3023
  return this.program.instruction.updatePerpMarketLpPoolPausedOperations(pausedOperations, {
3024
3024
  accounts: {
3025
- admin: this.isSubscribed
3026
- ? this.getStateAccount().admin
3027
- : this.wallet.publicKey,
3025
+ admin: this.useHotWalletAdmin
3026
+ ? this.wallet.publicKey
3027
+ : this.getStateAccount().admin,
3028
3028
  state: await this.getStatePublicKey(),
3029
3029
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
3030
3030
  },
@@ -4484,27 +4484,6 @@
4484
4484
  ],
4485
4485
  "args": []
4486
4486
  },
4487
- {
4488
- "name": "deleteAmmCache",
4489
- "accounts": [
4490
- {
4491
- "name": "admin",
4492
- "isMut": true,
4493
- "isSigner": true
4494
- },
4495
- {
4496
- "name": "state",
4497
- "isMut": false,
4498
- "isSigner": false
4499
- },
4500
- {
4501
- "name": "ammCache",
4502
- "isMut": true,
4503
- "isSigner": false
4504
- }
4505
- ],
4506
- "args": []
4507
- },
4508
4487
  {
4509
4488
  "name": "updateInitialAmmCacheInfo",
4510
4489
  "accounts": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.146.0-beta.4",
3
+ "version": "2.146.0-beta.5",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "module": "./lib/browser/index.js",
@@ -736,9 +736,9 @@ export class AdminClient extends DriftClient {
736
736
  return await this.program.instruction.updateInitialAmmCacheInfo({
737
737
  accounts: {
738
738
  state: await this.getStatePublicKey(),
739
- admin: this.isSubscribed
740
- ? this.getStateAccount().admin
741
- : this.wallet.publicKey,
739
+ admin: this.useHotWalletAdmin
740
+ ? this.wallet.publicKey
741
+ : this.getStateAccount().admin,
742
742
  ammCache: getAmmCachePublicKey(this.program.programId),
743
743
  },
744
744
  remainingAccounts,
@@ -796,9 +796,9 @@ export class AdminClient extends DriftClient {
796
796
  {
797
797
  accounts: {
798
798
  state: await this.getStatePublicKey(),
799
- admin: this.isSubscribed
800
- ? this.getStateAccount().admin
801
- : this.wallet.publicKey,
799
+ admin: this.useHotWalletAdmin
800
+ ? this.wallet.publicKey
801
+ : this.getStateAccount().admin,
802
802
  ammCache: getAmmCachePublicKey(this.program.programId),
803
803
  },
804
804
  }
@@ -820,9 +820,9 @@ export class AdminClient extends DriftClient {
820
820
  return this.program.instruction.resetAmmCache({
821
821
  accounts: {
822
822
  state: await this.getStatePublicKey(),
823
- admin: this.isSubscribed
824
- ? this.getStateAccount().admin
825
- : this.wallet.publicKey,
823
+ admin: this.useHotWalletAdmin
824
+ ? this.wallet.publicKey
825
+ : this.getStateAccount().admin,
826
826
  ammCache: getAmmCachePublicKey(this.program.programId),
827
827
  systemProgram: anchor.web3.SystemProgram.programId,
828
828
  },
@@ -5545,9 +5545,9 @@ export class AdminClient extends DriftClient {
5545
5545
  {
5546
5546
  accounts: {
5547
5547
  constituent,
5548
- admin: this.isSubscribed
5549
- ? this.getStateAccount().admin
5550
- : this.wallet.publicKey,
5548
+ admin: this.useHotWalletAdmin
5549
+ ? this.wallet.publicKey
5550
+ : this.getStateAccount().admin,
5551
5551
  state: await this.getStatePublicKey(),
5552
5552
  },
5553
5553
  }
@@ -6435,9 +6435,9 @@ export class AdminClient extends DriftClient {
6435
6435
  lpExchangeFeeExcluscionScalar ?? null,
6436
6436
  {
6437
6437
  accounts: {
6438
- admin: this.isSubscribed
6439
- ? this.getStateAccount().admin
6440
- : this.wallet.publicKey,
6438
+ admin: this.useHotWalletAdmin
6439
+ ? this.wallet.publicKey
6440
+ : this.getStateAccount().admin,
6441
6441
  state: await this.getStatePublicKey(),
6442
6442
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
6443
6443
  },
@@ -6466,9 +6466,9 @@ export class AdminClient extends DriftClient {
6466
6466
  pausedOperations,
6467
6467
  {
6468
6468
  accounts: {
6469
- admin: this.isSubscribed
6470
- ? this.getStateAccount().admin
6471
- : this.wallet.publicKey,
6469
+ admin: this.useHotWalletAdmin
6470
+ ? this.wallet.publicKey
6471
+ : this.getStateAccount().admin,
6472
6472
  state: await this.getStatePublicKey(),
6473
6473
  perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
6474
6474
  },
@@ -4484,27 +4484,6 @@
4484
4484
  ],
4485
4485
  "args": []
4486
4486
  },
4487
- {
4488
- "name": "deleteAmmCache",
4489
- "accounts": [
4490
- {
4491
- "name": "admin",
4492
- "isMut": true,
4493
- "isSigner": true
4494
- },
4495
- {
4496
- "name": "state",
4497
- "isMut": false,
4498
- "isSigner": false
4499
- },
4500
- {
4501
- "name": "ammCache",
4502
- "isMut": true,
4503
- "isSigner": false
4504
- }
4505
- ],
4506
- "args": []
4507
- },
4508
4487
  {
4509
4488
  "name": "updateInitialAmmCacheInfo",
4510
4489
  "accounts": [