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.
@@ -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
- takeProfitPrice: ContractOraclePrice;
23
- stopLossPrice: ContractOraclePrice;
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
  }
@@ -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;
@@ -82,10 +82,10 @@ var ViewHelper = (function () {
82
82
  console.log("decode error::", error);
83
83
  }
84
84
  };
85
- ViewHelper.prototype.simulateTransaction = function (transaction_1) {
86
- return __awaiter(this, arguments, void 0, function (transaction, userPublicKey) {
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:
@@ -129,10 +129,10 @@ var getBackupOracleInstruction = function (program, poolConfig, backupOracleSecr
129
129
  }
130
130
  };
131
131
  exports.getBackupOracleInstruction = getBackupOracleInstruction;
132
- function createBackupOracleInstruction(poolAddress_1) {
133
- return __awaiter(this, arguments, void 0, function (poolAddress, overrideCheck) {
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: