@drift-labs/vaults-sdk 0.6.27 → 0.6.29
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
|
|
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.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"directories": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@coral-xyz/anchor": "0.29.0",
|
|
11
|
-
"@drift-labs/sdk": "2.118.0-beta.
|
|
11
|
+
"@drift-labs/sdk": "2.118.0-beta.7",
|
|
12
12
|
"@metaplex-foundation/js": "0.20.1",
|
|
13
13
|
"@solana/web3.js": "1.92.3",
|
|
14
14
|
"commander": "11.1.0",
|