@drift-labs/sdk 2.37.1-beta.1 → 2.37.1-beta.11

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/src/types.ts CHANGED
@@ -31,6 +31,7 @@ export class UserStatus {
31
31
  static readonly ACTIVE = { active: {} };
32
32
  static readonly BEING_LIQUIDATED = { beingLiquidated: {} };
33
33
  static readonly BANKRUPT = { bankrupt: {} };
34
+ static readonly REDUCE_ONLY = { reduceOnly: {} };
34
35
  }
35
36
 
36
37
  export class ContractType {
@@ -766,6 +767,8 @@ export type AMM = {
766
767
  bidQuoteAssetReserve: BN;
767
768
  askBaseAssetReserve: BN;
768
769
  askQuoteAssetReserve: BN;
770
+
771
+ perLpBase: number; // i8
769
772
  };
770
773
 
771
774
  // # User Account Types
@@ -784,6 +787,7 @@ export type PerpPosition = {
784
787
  remainderBaseAssetAmount: number;
785
788
  lastBaseAssetAmountPerLp: BN;
786
789
  lastQuoteAssetAmountPerLp: BN;
790
+ perLpBase: number;
787
791
  };
788
792
 
789
793
  export type UserStatsAccount = {
@@ -1099,3 +1103,18 @@ export type PerpMarketExtendedInfo = {
1099
1103
  pnlPoolValue: BN;
1100
1104
  contractTier: ContractTier;
1101
1105
  };
1106
+
1107
+ export type HealthComponents = {
1108
+ deposits: HealthComponent[];
1109
+ borrows: HealthComponent[];
1110
+ perpPositions: HealthComponent[];
1111
+ perpPnl: HealthComponent[];
1112
+ };
1113
+
1114
+ export type HealthComponent = {
1115
+ marketIndex: number;
1116
+ size: BN;
1117
+ value: BN;
1118
+ weight: BN;
1119
+ weightedValue: BN;
1120
+ };