flash-sdk 2.52.2 → 2.53.0
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/dist/MarketAccount.d.ts +1 -1
- package/dist/PerpetualsClient.d.ts +287 -280
- package/dist/PerpetualsClient.js +2633 -2977
- package/dist/PoolAccount.d.ts +3 -0
- package/dist/PositionAccount.d.ts +3 -2
- package/dist/PositionAccount.js +4 -0
- package/dist/ViewHelper.js +3 -3
- package/dist/backupOracle.js +3 -3
- package/dist/idl/perpetuals.d.ts +72 -536
- package/dist/idl/perpetuals.js +72 -536
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +2 -2
- package/dist/utils/alt.d.ts +1 -0
- package/dist/utils/rpc.js +50 -50
- package/package.json +1 -1
- package/dist/TokenStakeAccount.d.ts +0 -40
- package/dist/TokenStakeAccount.js +0 -47
package/dist/PoolAccount.d.ts
CHANGED
@@ -30,6 +30,9 @@ export declare class PoolAccount implements Pool {
|
|
30
30
|
compoundingStats: CompoundingStats;
|
31
31
|
compoundingMintBump: number;
|
32
32
|
compoundingLpVaultBump: number;
|
33
|
+
minLpPriceUsd: BN;
|
34
|
+
maxLpPriceUsd: BN;
|
35
|
+
padding2: BN[];
|
33
36
|
constructor(publicKey: PublicKey, parseData: Pool);
|
34
37
|
static from(publicKey: PublicKey, parseData: Pool): PoolAccount;
|
35
38
|
updatePoolData(parseData: Pool): void;
|
@@ -19,8 +19,8 @@ export declare class PositionAccount implements Position {
|
|
19
19
|
unsettledAmount: BN;
|
20
20
|
unsettledFeesUsd: BN;
|
21
21
|
cumulativeLockFeeSnapshot: BN;
|
22
|
-
|
23
|
-
|
22
|
+
degenSizeUsd: BN;
|
23
|
+
buffer: BN;
|
24
24
|
sizeDecimals: number;
|
25
25
|
lockedDecimals: number;
|
26
26
|
collateralDecimals: number;
|
@@ -29,4 +29,5 @@ export declare class PositionAccount implements Position {
|
|
29
29
|
static from(publicKey: PublicKey, parseData: Position): PositionAccount;
|
30
30
|
clone(): PositionAccount;
|
31
31
|
updatePositionData(position: Position): void;
|
32
|
+
isDegenMode(): boolean;
|
32
33
|
}
|
package/dist/PositionAccount.js
CHANGED
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
12
12
|
};
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14
14
|
exports.PositionAccount = void 0;
|
15
|
+
var anchor_1 = require("@coral-xyz/anchor");
|
15
16
|
var PositionAccount = (function () {
|
16
17
|
function PositionAccount(publicKey, parseData) {
|
17
18
|
this.publicKey = publicKey;
|
@@ -26,6 +27,9 @@ var PositionAccount = (function () {
|
|
26
27
|
PositionAccount.prototype.updatePositionData = function (position) {
|
27
28
|
Object.assign(this, __assign({}, position));
|
28
29
|
};
|
30
|
+
PositionAccount.prototype.isDegenMode = function () {
|
31
|
+
return this.degenSizeUsd.gt(new anchor_1.BN(0));
|
32
|
+
};
|
29
33
|
return PositionAccount;
|
30
34
|
}());
|
31
35
|
exports.PositionAccount = PositionAccount;
|
package/dist/ViewHelper.js
CHANGED
@@ -82,10 +82,10 @@ var ViewHelper = (function () {
|
|
82
82
|
console.log("decode error::", error);
|
83
83
|
}
|
84
84
|
};
|
85
|
-
ViewHelper.prototype.simulateTransaction = function (
|
86
|
-
|
85
|
+
ViewHelper.prototype.simulateTransaction = function (transaction, userPublicKey) {
|
86
|
+
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
87
88
|
var latestBlockhash, messageV0, transaction2;
|
88
|
-
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
89
89
|
return __generator(this, function (_a) {
|
90
90
|
switch (_a.label) {
|
91
91
|
case 0:
|
package/dist/backupOracle.js
CHANGED
@@ -129,10 +129,10 @@ var getBackupOracleInstruction = function (program, poolConfig, backupOracleSecr
|
|
129
129
|
}
|
130
130
|
};
|
131
131
|
exports.getBackupOracleInstruction = getBackupOracleInstruction;
|
132
|
-
function createBackupOracleInstruction(
|
133
|
-
|
132
|
+
function createBackupOracleInstruction(poolAddress, overrideCheck) {
|
133
|
+
if (overrideCheck === void 0) { overrideCheck = false; }
|
134
|
+
return __awaiter(this, void 0, void 0, function () {
|
134
135
|
var backupOracleData, backUpOracleInstruction, error_1;
|
135
|
-
if (overrideCheck === void 0) { overrideCheck = false; }
|
136
136
|
return __generator(this, function (_a) {
|
137
137
|
switch (_a.label) {
|
138
138
|
case 0:
|