@drift-labs/vaults-sdk 0.1.467 → 0.1.469
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/cli/cli.ts +2 -1
- package/cli/utils.ts +3 -2
- package/package.json +2 -2
package/cli/cli.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require('dotenv').config();
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
initVault,
|
|
3
5
|
viewVault,
|
|
@@ -22,7 +24,6 @@ import {
|
|
|
22
24
|
|
|
23
25
|
import { Command, Option } from 'commander';
|
|
24
26
|
import { viewVaultDepositor } from "./commands/viewVaultDepositor";
|
|
25
|
-
require('dotenv').config();
|
|
26
27
|
|
|
27
28
|
const program = new Command();
|
|
28
29
|
program
|
package/cli/utils.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BASE_PRECISION, BN, DriftClient, OraclePriceData, PRICE_PRECISION, QUOTE_PRECISION, SpotMarketAccount, TEN, User, Wallet, WhileValidTxSender, convertToNumber, getSignedTokenAmount, getTokenAmount, loadKeypair } from "@drift-labs/sdk";
|
|
1
|
+
import { BASE_PRECISION, BN, DriftClient, DriftEnv, OraclePriceData, PRICE_PRECISION, QUOTE_PRECISION, SpotMarketAccount, TEN, User, Wallet, WhileValidTxSender, convertToNumber, getSignedTokenAmount, getTokenAmount, loadKeypair } from "@drift-labs/sdk";
|
|
2
2
|
import { VAULT_PROGRAM_ID, Vault, VaultClient, VaultDepositor, decodeName } from "../src";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { Connection, Keypair } from "@solana/web3.js";
|
|
@@ -139,10 +139,11 @@ export async function getCommandContext(program: Command, needToSign: boolean):
|
|
|
139
139
|
commitment: opts.commitment,
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
+
const driftEnv = process.env.DRIFT_ENV ?? "mainnet-beta";
|
|
142
143
|
const driftClient = new DriftClient({
|
|
143
144
|
connection,
|
|
144
145
|
wallet,
|
|
145
|
-
env:
|
|
146
|
+
env: driftEnv as DriftEnv,
|
|
146
147
|
opts: {
|
|
147
148
|
commitment: opts.commitment,
|
|
148
149
|
skipPreflight: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drift-labs/vaults-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.469",
|
|
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.28.0",
|
|
11
11
|
"@drift-labs/competitions-sdk": "0.2.386",
|
|
12
|
-
"@drift-labs/sdk": "2.96.0-beta.
|
|
12
|
+
"@drift-labs/sdk": "2.96.0-beta.14",
|
|
13
13
|
"@solana/web3.js": "1.92.3",
|
|
14
14
|
"commander": "^11.0.0",
|
|
15
15
|
"dotenv": "^16.3.1",
|