@drift-labs/vaults-sdk 0.6.27 → 0.6.28

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.
@@ -144,7 +144,11 @@ export const initVault = async (program: Command, cmdOpts: OptionValues) => {
144
144
  console.log(`Base 58 encoded transaction:`);
145
145
  console.log(dumpTransactionMessage(cmdOpts.manager ? new PublicKey(cmdOpts.manager) : driftClient.wallet.publicKey, [initIx, updateDelegateIx]));
146
146
  } else {
147
- const initTx = await driftVault.initializeVault({
147
+ const initSignedOrdersAccIx = await driftClient.getInitializeSignedMsgUserOrdersAccountIx(
148
+ vaultAddress,
149
+ 8
150
+ );
151
+ const initIx = await driftVault.getInitializeVaultIx({
148
152
  name: vaultNameBytes,
149
153
  spotMarketIndex,
150
154
  redeemPeriod: new BN(redeemPeriodSec),
@@ -156,6 +160,10 @@ export const initVault = async (program: Command, cmdOpts: OptionValues) => {
156
160
  minDepositAmount: minDepositAmountBN,
157
161
  manager: cmdOpts.manager,
158
162
  });
163
+ const initTx = await driftVault.createAndSendTxn([
164
+ initSignedOrdersAccIx[1],
165
+ initIx,
166
+ ]);
159
167
  console.log(`Initialized vault, tx: https://solscan.io/tx/${initTx}${driftClient.env === "devnet" ? "?cluster=devnet" : ""}`);
160
168
 
161
169
  console.log(`\nNew vault address: ${vaultAddress}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/vaults-sdk",
3
- "version": "0.6.27",
3
+ "version": "0.6.28",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "directories": {