flash-sdk 1.0.4 → 1.0.6
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/lib/CustodyAccount.js +9 -19
- package/lib/OraclePrice.d.ts +2 -0
- package/lib/OraclePrice.js +4 -0
- package/lib/PerpetualsClient.d.ts +24 -5
- package/lib/PerpetualsClient.js +604 -24
- package/lib/PoolAccount.d.ts +2 -1
- package/lib/PoolAccount.js +16 -29
- package/lib/PoolConfig.d.ts +7 -2
- package/lib/PoolConfig.js +15 -7
- package/lib/PoolConfig.json +4 -0
- package/lib/{PoolDisplayData.d.ts → PoolDataClient.d.ts} +3 -2
- package/lib/{PoolDisplayData.js → PoolDataClient.js} +13 -13
- package/lib/PositionAccount.d.ts +1 -0
- package/lib/Token.js +1 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/idl/perpetuals.d.ts +3675 -0
- package/{src/target/types → lib/idl}/perpetuals.js +140 -3
- package/lib/index.d.ts +3 -0
- package/lib/index.js +5 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +5 -3
- package/lib/types/index.js +21 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +57 -1
- package/lib/utils/rpc.d.ts +13 -0
- package/lib/utils/rpc.js +217 -0
- package/package.json +1 -1
- package/src/CustodyAccount.ts +24 -23
- package/src/OraclePrice.ts +4 -4
- package/src/PerpetualsClient.ts +763 -96
- package/src/PoolAccount.ts +34 -32
- package/src/PoolConfig.json +4 -0
- package/src/PoolConfig.ts +21 -6
- package/src/{PoolDisplayData.ts → PoolDataClient.ts} +2 -2
- package/src/Token.ts +1 -0
- package/src/{target/types → idl}/perpetuals.ts +280 -6
- package/src/index.ts +3 -0
- package/src/types/index.ts +26 -3
- package/src/utils/index.ts +14 -0
- package/src/utils/rpc.ts +162 -0
- package/lib/CustodyAccount.d.ts.map +0 -1
- package/lib/CustodyAccount.js.map +0 -1
- package/lib/OraclePrice.d.ts.map +0 -1
- package/lib/OraclePrice.js.map +0 -1
- package/lib/PerpetualsClient.d.ts.map +0 -1
- package/lib/PerpetualsClient.js.map +0 -1
- package/lib/PoolAccount.d.ts.map +0 -1
- package/lib/PoolAccount.js.map +0 -1
- package/lib/PositionAccount.d.ts.map +0 -1
- package/lib/PositionAccount.js.map +0 -1
- package/lib/client/src/CustodyAccount.d.ts +0 -30
- package/lib/client/src/CustodyAccount.d.ts.map +0 -1
- package/lib/client/src/CustodyAccount.js +0 -64
- package/lib/client/src/CustodyAccount.js.map +0 -1
- package/lib/client/src/OraclePrice.d.ts +0 -19
- package/lib/client/src/OraclePrice.d.ts.map +0 -1
- package/lib/client/src/OraclePrice.js +0 -84
- package/lib/client/src/OraclePrice.js.map +0 -1
- package/lib/client/src/PerpetualsClient.d.ts +0 -1938
- package/lib/client/src/PerpetualsClient.d.ts.map +0 -1
- package/lib/client/src/PerpetualsClient.js +0 -1043
- package/lib/client/src/PerpetualsClient.js.map +0 -1
- package/lib/client/src/PoolAccount.d.ts +0 -35
- package/lib/client/src/PoolAccount.d.ts.map +0 -1
- package/lib/client/src/PoolAccount.js +0 -307
- package/lib/client/src/PoolAccount.js.map +0 -1
- package/lib/client/src/PositionAccount.d.ts +0 -27
- package/lib/client/src/PositionAccount.d.ts.map +0 -1
- package/lib/client/src/PositionAccount.js +0 -91
- package/lib/client/src/PositionAccount.js.map +0 -1
- package/lib/client/src/constants/index.d.ts +0 -12
- package/lib/client/src/constants/index.d.ts.map +0 -1
- package/lib/client/src/constants/index.js +0 -15
- package/lib/client/src/constants/index.js.map +0 -1
- package/lib/client/src/index.d.ts +0 -9
- package/lib/client/src/index.d.ts.map +0 -1
- package/lib/client/src/index.js +0 -26
- package/lib/client/src/index.js.map +0 -1
- package/lib/client/src/types/index.d.ts +0 -188
- package/lib/client/src/types/index.d.ts.map +0 -1
- package/lib/client/src/types/index.js +0 -57
- package/lib/client/src/types/index.js.map +0 -1
- package/lib/client/src/utils/helpers.d.ts +0 -8
- package/lib/client/src/utils/helpers.d.ts.map +0 -1
- package/lib/client/src/utils/helpers.js +0 -152
- package/lib/client/src/utils/helpers.js.map +0 -1
- package/lib/constants/index.d.ts.map +0 -1
- package/lib/constants/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/utils/helpers.d.ts +0 -7
- package/lib/utils/helpers.d.ts.map +0 -1
- package/lib/utils/helpers.js +0 -151
- package/lib/utils/helpers.js.map +0 -1
- package/src/target/types/limit_order_cpi.js +0 -132
- package/src/target/types/limit_order_cpi.ts +0 -259
- /package/{src/target/idl/perpetuals.json → lib/Token.d.ts} +0 -0
- /package/src/{readme.md → type-rules.md} +0 -0
package/lib/PoolAccount.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="bn.js" />
|
1
2
|
import { BN } from "@coral-xyz/anchor";
|
2
3
|
import { AumCalcMode, Pool, Side, TokenRatios } from "./types";
|
3
4
|
import { PublicKey } from "@solana/web3.js";
|
@@ -30,5 +31,5 @@ export declare class PoolAccount implements Pool {
|
|
30
31
|
loss: BN;
|
31
32
|
exitFee: BN;
|
32
33
|
};
|
33
|
-
getAssetsUnderManagementUsd(token_prices: OraclePrice[], token_ema_prices: OraclePrice[],
|
34
|
+
getAssetsUnderManagementUsd(token_prices: OraclePrice[], token_ema_prices: OraclePrice[], custodyAccounts: CustodyAccount[], aum_calc_mode: AumCalcMode, currentTime: BN): BN;
|
34
35
|
}
|
package/lib/PoolAccount.js
CHANGED
@@ -240,10 +240,10 @@ var PoolAccount = /** @class */ (function () {
|
|
240
240
|
}
|
241
241
|
}
|
242
242
|
}; //getPnlUsd
|
243
|
-
PoolAccount.prototype.getAssetsUnderManagementUsd = function (token_prices, token_ema_prices,
|
243
|
+
PoolAccount.prototype.getAssetsUnderManagementUsd = function (token_prices, token_ema_prices, custodyAccounts, aum_calc_mode, currentTime) {
|
244
244
|
var pool_amount_usd = constants_1.BN_ZERO;
|
245
|
-
for (var index = 0; index <
|
246
|
-
if (token_prices.length !=
|
245
|
+
for (var index = 0; index < custodyAccounts.length; index++) {
|
246
|
+
if (token_prices.length != custodyAccounts.length || token_prices.length != token_ema_prices.length) {
|
247
247
|
throw Error("token prices length incorrect");
|
248
248
|
}
|
249
249
|
var aum_token_price = void 0;
|
@@ -270,33 +270,20 @@ var PoolAccount = /** @class */ (function () {
|
|
270
270
|
aum_token_price = token_ema_prices[index];
|
271
271
|
}
|
272
272
|
}
|
273
|
-
var token_amount_usd = aum_token_price.getAssetAmountUsd(
|
273
|
+
var token_amount_usd = aum_token_price.getAssetAmountUsd(custodyAccounts[index].assets.owned, custodyAccounts[index].decimals);
|
274
274
|
pool_amount_usd = pool_amount_usd.add(token_amount_usd);
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
// &token_price,
|
288
|
-
// &token_ema_price,
|
289
|
-
// &custodies[index],
|
290
|
-
// curtime,
|
291
|
-
// false,
|
292
|
-
// )?;
|
293
|
-
// // adjust pool amount by collective profit/loss
|
294
|
-
// pool_amount_usd = math::checked_add(pool_amount_usd, long_profit as u128)?;
|
295
|
-
// pool_amount_usd = math::checked_add(pool_amount_usd, short_profit as u128)?;
|
296
|
-
// pool_amount_usd = pool_amount_usd.saturating_sub(long_loss as u128);
|
297
|
-
// pool_amount_usd = pool_amount_usd.saturating_sub(short_loss as u128);
|
298
|
-
// }
|
299
|
-
throw Error("Incomplete");
|
275
|
+
if (custodyAccounts[index].pricing.useUnrealizedPnlInAum) {
|
276
|
+
// compute aggregate unrealized pnl
|
277
|
+
// console.log("long_pos:",custodyAccounts[index].longPositions)
|
278
|
+
var _a = this.getPnlUsd(custodyAccounts[index].getCollectivePosition(types_1.Side.Long), token_prices[index], token_ema_prices[index], custodyAccounts[index], currentTime, false), long_profit = _a.profit, long_loss = _a.loss;
|
279
|
+
// console.log("long_pos:",custodyAccounts[index].shortPositions)
|
280
|
+
var _b = this.getPnlUsd(custodyAccounts[index].getCollectivePosition(types_1.Side.Short), token_prices[index], token_ema_prices[index], custodyAccounts[index], currentTime, false), short_profit = _b.profit, short_loss = _b.loss;
|
281
|
+
// adjust pool amount by collective profit/loss
|
282
|
+
pool_amount_usd = pool_amount_usd.add(long_profit);
|
283
|
+
pool_amount_usd = pool_amount_usd.add(short_profit);
|
284
|
+
pool_amount_usd = pool_amount_usd.sub(long_loss); // check overflow - saturating_sub
|
285
|
+
pool_amount_usd = pool_amount_usd.sub(short_loss);
|
286
|
+
}
|
300
287
|
}
|
301
288
|
return pool_amount_usd;
|
302
289
|
};
|
package/lib/PoolConfig.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Address } from '@
|
1
|
+
import { Address } from '@coral-xyz/anchor';
|
2
2
|
import { Cluster, PublicKey } from '@solana/web3.js';
|
3
3
|
export interface CustodyConfig {
|
4
4
|
custodyAccount: PublicKey;
|
@@ -24,13 +24,18 @@ export declare class PoolConfig {
|
|
24
24
|
lpTokenMint: PublicKey;
|
25
25
|
lpDecimals: number;
|
26
26
|
perpetuals: PublicKey;
|
27
|
+
transferAuthority: PublicKey;
|
28
|
+
multisig: PublicKey;
|
27
29
|
tokens: Token[];
|
28
30
|
custodies: CustodyConfig[];
|
29
|
-
constructor(programId: PublicKey, cluster: Cluster, poolName: string, poolAddress: PublicKey, lpTokenMint: PublicKey, lpDecimals: number, perpetuals: PublicKey, tokens: Token[], custodies: CustodyConfig[]);
|
31
|
+
constructor(programId: PublicKey, cluster: Cluster, poolName: string, poolAddress: PublicKey, lpTokenMint: PublicKey, lpDecimals: number, perpetuals: PublicKey, transferAuthority: PublicKey, multisig: PublicKey, tokens: Token[], custodies: CustodyConfig[]);
|
30
32
|
getAllTokenMints(): PublicKey[];
|
31
33
|
getNonStableTokens(): PublicKey[];
|
32
34
|
getAllCustodies(): PublicKey[];
|
33
35
|
getNonStableCustodies(): PublicKey[];
|
36
|
+
getTokenFromSymbol: (symbol: string) => Token;
|
37
|
+
getTokenFromMintString: (mint: string) => Token;
|
38
|
+
getTokenFromMintPk: (mint: PublicKey) => Token;
|
34
39
|
static getCustodyConfig(custodyAccountPk: Address, poolName: string, cluster: Cluster): CustodyConfig;
|
35
40
|
static getTokensInPool(name: string, cluster: Cluster): Token[];
|
36
41
|
static fromIdsByName(name: string, cluster: Cluster): PoolConfig;
|
package/lib/PoolConfig.js
CHANGED
@@ -18,11 +18,8 @@ exports.PoolConfig = void 0;
|
|
18
18
|
var web3_js_1 = require("@solana/web3.js");
|
19
19
|
var PoolConfig_json_1 = __importDefault(require("./PoolConfig.json"));
|
20
20
|
var PoolConfig = /** @class */ (function () {
|
21
|
-
function PoolConfig(programId, cluster, poolName, poolAddress, lpTokenMint, lpDecimals, perpetuals,
|
22
|
-
|
23
|
-
// public multisigAccountKey: string,
|
24
|
-
// public transferAuthorityAccountKey: string,
|
25
|
-
tokens, custodies) {
|
21
|
+
function PoolConfig(programId, cluster, poolName, poolAddress, lpTokenMint, lpDecimals, perpetuals, transferAuthority, multisig, tokens, custodies) {
|
22
|
+
var _this = this;
|
26
23
|
this.programId = programId;
|
27
24
|
this.cluster = cluster;
|
28
25
|
this.poolName = poolName;
|
@@ -30,8 +27,19 @@ var PoolConfig = /** @class */ (function () {
|
|
30
27
|
this.lpTokenMint = lpTokenMint;
|
31
28
|
this.lpDecimals = lpDecimals;
|
32
29
|
this.perpetuals = perpetuals;
|
30
|
+
this.transferAuthority = transferAuthority;
|
31
|
+
this.multisig = multisig;
|
33
32
|
this.tokens = tokens;
|
34
33
|
this.custodies = custodies;
|
34
|
+
this.getTokenFromSymbol = function (symbol) {
|
35
|
+
return _this.tokens.find(function (f) { return f.symbol.toUpperCase() === symbol.toUpperCase(); });
|
36
|
+
};
|
37
|
+
this.getTokenFromMintString = function (mint) {
|
38
|
+
return _this.tokens.find(function (f) { return f.mintKey.toBase58() === mint; });
|
39
|
+
};
|
40
|
+
this.getTokenFromMintPk = function (mint) {
|
41
|
+
return _this.tokens.find(function (f) { return f.mintKey.equals(mint); });
|
42
|
+
};
|
35
43
|
}
|
36
44
|
PoolConfig.prototype.getAllTokenMints = function () {
|
37
45
|
return Array.from(this.tokens.map(function (token) { return new web3_js_1.PublicKey(token.mintKey); }));
|
@@ -74,7 +82,7 @@ var PoolConfig = /** @class */ (function () {
|
|
74
82
|
var custodies = poolConfig['custodies'].map(function (i) {
|
75
83
|
return __assign(__assign({}, i), { custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
|
76
84
|
});
|
77
|
-
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), tokens, custodies);
|
85
|
+
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.multisig), tokens, custodies);
|
78
86
|
};
|
79
87
|
PoolConfig.fromIdsByPk = function (poolPk, cluster) {
|
80
88
|
var poolConfig = PoolConfig_json_1.default.pools.find(function (pool) { return pool['poolAddress'] === poolPk.toString() && cluster === pool['cluster']; });
|
@@ -86,7 +94,7 @@ var PoolConfig = /** @class */ (function () {
|
|
86
94
|
var custodies = poolConfig['custodies'].map(function (i) {
|
87
95
|
return __assign(__assign({}, i), { custodyAccount: new web3_js_1.PublicKey(i.custodyAccount), tokenAccount: new web3_js_1.PublicKey(i.tokenAccount), mintKey: new web3_js_1.PublicKey(i.mintKey), oracleAddress: new web3_js_1.PublicKey(i.oracleAddress) });
|
88
96
|
});
|
89
|
-
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), tokens, custodies);
|
97
|
+
return new PoolConfig(new web3_js_1.PublicKey(poolConfig.programId), poolConfig.cluster, poolConfig.poolName, new web3_js_1.PublicKey(poolConfig.poolAddress), new web3_js_1.PublicKey(poolConfig.lpTokenMint), poolConfig.lpDecimals, new web3_js_1.PublicKey(poolConfig.perpetuals), new web3_js_1.PublicKey(poolConfig.transferAuthority), new web3_js_1.PublicKey(poolConfig.multisig), tokens, custodies);
|
90
98
|
};
|
91
99
|
return PoolConfig;
|
92
100
|
}());
|
package/lib/PoolConfig.json
CHANGED
@@ -219,6 +219,8 @@
|
|
219
219
|
"lpTokenMint": "Han23mxQeHeoBbj4vYtYZNaB5bhwV3n4nxKezM6H6nbr",
|
220
220
|
"lpDecimals": 6,
|
221
221
|
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
222
|
+
"transferAuthority": "",
|
223
|
+
"multisig": "",
|
222
224
|
"tokens": [
|
223
225
|
{
|
224
226
|
"symbol": "USDC",
|
@@ -264,6 +266,8 @@
|
|
264
266
|
"lpTokenMint": "J1887XKSeZFRzD6ACyiWMurXZd8xtNyb1Edj2oAxKT9E",
|
265
267
|
"lpDecimals": 6,
|
266
268
|
"perpetuals": "5CpxhcrfvH8s9QDT2nMaPWqPoMwpuiPuP8e8x4YN61A2",
|
269
|
+
"transferAuthority": "",
|
270
|
+
"multisig": "",
|
267
271
|
"tokens": [
|
268
272
|
{
|
269
273
|
"symbol": "Test",
|
@@ -1,9 +1,10 @@
|
|
1
|
+
/// <reference types="bn.js" />
|
1
2
|
import { BN } from "@coral-xyz/anchor";
|
2
3
|
import { Mint } from "@solana/spl-token";
|
3
4
|
import { CustodyAccount } from "./CustodyAccount";
|
4
5
|
import { PoolConfig } from "./PoolConfig";
|
5
6
|
import { PoolAccount } from "./PoolAccount";
|
6
|
-
export declare class
|
7
|
+
export declare class PoolDataClient {
|
7
8
|
poolConfig: PoolConfig;
|
8
9
|
pool: PoolAccount;
|
9
10
|
lpTokenInfo: Mint;
|
@@ -12,7 +13,7 @@ export declare class PoolDisplayData {
|
|
12
13
|
constructor(poolConfig: PoolConfig, pool: PoolAccount, lpTokenInfo: Mint, custodies: CustodyAccount[]);
|
13
14
|
loadCustodies(custodies: CustodyAccount[]): void;
|
14
15
|
loadPoolData(pool: PoolAccount): void;
|
15
|
-
|
16
|
+
loadLpData(lpTokenInfo: Mint): void;
|
16
17
|
getLpStats(prices: any): {
|
17
18
|
lpTokenSupply: BN;
|
18
19
|
decimals: number;
|
@@ -1,29 +1,29 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.PoolDataClient = void 0;
|
4
4
|
var constants_1 = require("./constants");
|
5
5
|
var anchor_1 = require("@coral-xyz/anchor");
|
6
6
|
var utils_1 = require("./utils");
|
7
|
-
var
|
8
|
-
function
|
7
|
+
var PoolDataClient = /** @class */ (function () {
|
8
|
+
function PoolDataClient(poolConfig, pool, lpTokenInfo, custodies) {
|
9
9
|
this.poolConfig = poolConfig;
|
10
10
|
this.pool = pool;
|
11
11
|
this.lpTokenInfo = lpTokenInfo;
|
12
12
|
this.custodies = custodies;
|
13
13
|
this.totalPoolValueUsd = new anchor_1.BN(-1); // -1 meaning unset
|
14
14
|
}
|
15
|
-
|
15
|
+
PoolDataClient.prototype.loadCustodies = function (custodies) {
|
16
16
|
this.custodies = custodies;
|
17
17
|
};
|
18
|
-
|
18
|
+
PoolDataClient.prototype.loadPoolData = function (pool) {
|
19
19
|
this.pool = pool;
|
20
20
|
};
|
21
|
-
|
21
|
+
PoolDataClient.prototype.loadLpData = function (lpTokenInfo) {
|
22
22
|
this.lpTokenInfo = lpTokenInfo;
|
23
23
|
};
|
24
24
|
// TODO :: replace this with PoolAccount.getAssetsUnderManagementUsd()
|
25
25
|
// should take pnl's into account
|
26
|
-
|
26
|
+
PoolDataClient.prototype.getLpStats = function (prices) {
|
27
27
|
var stableCoinAmount = new anchor_1.BN(0);
|
28
28
|
var totalPoolValueUsd = new anchor_1.BN(0);
|
29
29
|
var _loop_1 = function (custody) {
|
@@ -60,14 +60,14 @@ var PoolDisplayData = /** @class */ (function () {
|
|
60
60
|
// totalStaked : BN,
|
61
61
|
};
|
62
62
|
};
|
63
|
-
|
63
|
+
PoolDataClient.prototype.getOiLongUI = function () {
|
64
64
|
var totalAmount = new anchor_1.BN('0');
|
65
65
|
this.custodies.forEach(function (i) {
|
66
66
|
totalAmount = totalAmount.add(i.tradeStats.oiLongUsd);
|
67
67
|
});
|
68
68
|
return totalAmount;
|
69
69
|
};
|
70
|
-
|
70
|
+
PoolDataClient.prototype.getOiShortUI = function () {
|
71
71
|
var totalAmount = new anchor_1.BN('0');
|
72
72
|
this.custodies.forEach(function (i) {
|
73
73
|
totalAmount = totalAmount.add(i.tradeStats.oiShortUsd);
|
@@ -75,7 +75,7 @@ var PoolDisplayData = /** @class */ (function () {
|
|
75
75
|
return totalAmount;
|
76
76
|
};
|
77
77
|
// handle decimal and this should accept a list of prices probs map or object
|
78
|
-
|
78
|
+
PoolDataClient.prototype.getCustodyDetails = function (prices) {
|
79
79
|
var custodyDetails = [];
|
80
80
|
var _loop_2 = function (i) {
|
81
81
|
var custody = this_2.poolConfig.custodies[i];
|
@@ -119,7 +119,7 @@ var PoolDisplayData = /** @class */ (function () {
|
|
119
119
|
}
|
120
120
|
return custodyDetails;
|
121
121
|
};
|
122
|
-
|
122
|
+
PoolDataClient.prototype.getPoolStats = function () {
|
123
123
|
var totalFees = new anchor_1.BN(0);
|
124
124
|
var totalVolume = new anchor_1.BN(0);
|
125
125
|
var currentLongPositionsUsd = new anchor_1.BN(0);
|
@@ -147,6 +147,6 @@ var PoolDisplayData = /** @class */ (function () {
|
|
147
147
|
currentShortPositionsUsd: currentShortPositionsUsd
|
148
148
|
};
|
149
149
|
};
|
150
|
-
return
|
150
|
+
return PoolDataClient;
|
151
151
|
}()); // PoolDisplayData
|
152
|
-
exports.
|
152
|
+
exports.PoolDataClient = PoolDataClient;
|
package/lib/PositionAccount.d.ts
CHANGED
package/lib/Token.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
// later inport from UI
|
package/lib/constants/index.d.ts
CHANGED