@drift-labs/vaults-sdk 0.1.299 → 0.1.301

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.
@@ -21,7 +21,7 @@ export const applyProfitShare = async (program: Command, cmdOpts: OptionValues)
21
21
  const {
22
22
  driftVault,
23
23
  driftClient,
24
- } = await getCommandContext(program, true, true);
24
+ } = await getCommandContext(program, true);
25
25
 
26
26
  const vault = await driftVault.getVault(vaultAddress);
27
27
  const vdWithNoWithdrawRequests = await driftVault.getAllVaultDepositorsWithNoWithdrawRequest(vaultAddress);
@@ -731,10 +731,15 @@ class VaultClient {
731
731
  }),
732
732
  ...vaultIxs,
733
733
  ];
734
- const tx = await this.driftClient.txSender.getVersionedTransaction(ixs, (_c = txParams === null || txParams === void 0 ? void 0 : txParams.lookupTables) !== null && _c !== void 0 ? _c : [], undefined, {
735
- preflightCommitment: 'confirmed',
736
- ...this.driftClient.opts,
737
- });
734
+ const tx = (await this.driftClient.txHandler.buildTransaction({
735
+ connection: this.driftClient.connection,
736
+ instructions: ixs,
737
+ lookupTables: (_c = txParams === null || txParams === void 0 ? void 0 : txParams.lookupTables) !== null && _c !== void 0 ? _c : [],
738
+ preFlightCommitment: 'confirmed',
739
+ forceVersionedTransaction: true,
740
+ txVersion: 0,
741
+ fetchMarketLookupTableAccount: this.driftClient.fetchMarketLookupTableAccount,
742
+ }));
738
743
  let txSig = bytes_1.bs58.encode(tx.signatures[0]);
739
744
  if (txParams === null || txParams === void 0 ? void 0 : txParams.simulateTransaction) {
740
745
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/vaults-sdk",
3
- "version": "0.1.299",
3
+ "version": "0.1.301",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "directories": {
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@coral-xyz/anchor": "^0.26.0",
11
11
  "@drift-labs/competitions-sdk": "0.2.303",
12
- "@drift-labs/sdk": "2.82.0-beta.19",
12
+ "@drift-labs/sdk": "2.83.0-beta.1",
13
13
  "@solana/web3.js": "1.73.2",
14
14
  "commander": "^11.0.0",
15
15
  "dotenv": "^16.3.1",
@@ -29,6 +29,7 @@ import {
29
29
  SYSVAR_RENT_PUBKEY,
30
30
  TransactionInstruction,
31
31
  TransactionSignature,
32
+ VersionedTransaction,
32
33
  } from '@solana/web3.js';
33
34
  import {
34
35
  createAssociatedTokenAccountInstruction,
@@ -1124,16 +1125,16 @@ export class VaultClient {
1124
1125
  ...vaultIxs,
1125
1126
  ];
1126
1127
 
1127
- const tx = await this.driftClient.txSender.getVersionedTransaction(
1128
- ixs,
1129
- txParams?.lookupTables ?? [],
1130
- undefined,
1131
- {
1132
- preflightCommitment: 'confirmed',
1133
- ...this.driftClient.opts,
1134
- }
1135
- );
1136
-
1128
+ const tx = (await this.driftClient.txHandler.buildTransaction({
1129
+ connection: this.driftClient.connection,
1130
+ instructions: ixs,
1131
+ lookupTables: txParams?.lookupTables ?? [],
1132
+ preFlightCommitment: 'confirmed',
1133
+ forceVersionedTransaction: true,
1134
+ txVersion: 0,
1135
+ fetchMarketLookupTableAccount:
1136
+ this.driftClient.fetchMarketLookupTableAccount,
1137
+ })) as VersionedTransaction;
1137
1138
  let txSig = bs58.encode(tx.signatures[0]);
1138
1139
  if (txParams?.simulateTransaction) {
1139
1140
  try {