flash-sdk 5.0.3 → 6.0.1

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.
@@ -19,14 +19,16 @@ 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;
27
27
  bump: number;
28
+ padding: number[];
28
29
  constructor(publicKey: PublicKey, parseData: Position);
29
30
  static from(publicKey: PublicKey, parseData: Position): PositionAccount;
30
31
  clone(): PositionAccount;
31
32
  updatePositionData(position: Position): void;
33
+ isDegenMode(): boolean;
32
34
  }
@@ -26,6 +26,9 @@ var PositionAccount = (function () {
26
26
  PositionAccount.prototype.updatePositionData = function (position) {
27
27
  Object.assign(this, __assign({}, position));
28
28
  };
29
+ PositionAccount.prototype.isDegenMode = function () {
30
+ return this.degenSizeUsd.gte(this.sizeUsd);
31
+ };
29
32
  return PositionAccount;
30
33
  }());
31
34
  exports.PositionAccount = PositionAccount;