@drift-labs/sdk 0.2.0-master.24 → 0.2.0-master.25

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
@@ -148,6 +148,23 @@ export type CurveRecord = {
148
148
  tradeId: BN;
149
149
  };
150
150
 
151
+ export type LPRecord = {
152
+ ts: BN;
153
+ user: PublicKey;
154
+ action: LPAction;
155
+ nShares: BN;
156
+ marketIndex: BN;
157
+ deltaBaseAssetAmount: BN;
158
+ deltaQuoteAssetAmount: BN;
159
+ pnl: BN;
160
+ };
161
+
162
+ export class LPAction {
163
+ static readonly ADD_LIQUIDITY = { addLiquidity: {} };
164
+ static readonly REMOVE_LIQUIDITY = { removeLiquidity: {} };
165
+ static readonly SETTLE_LIQUIDITY = { settleLiquidity: {} };
166
+ }
167
+
151
168
  export type FundingRateRecord = {
152
169
  ts: BN;
153
170
  recordId: BN;
@@ -216,6 +233,7 @@ export type LiquidatePerpRecord = {
216
233
  oraclePrice: BN;
217
234
  baseAssetAmount: BN;
218
235
  quoteAssetAmount: BN;
236
+ lpShares: BN;
219
237
  userPnl: BN;
220
238
  liquidatorPnl: BN;
221
239
  canceledOrdersFee: BN;
@@ -319,8 +337,6 @@ export type StateAccount = {
319
337
  exchangePaused: boolean;
320
338
  adminControlsPrices: boolean;
321
339
  insuranceVault: PublicKey;
322
- insuranceVaultAuthority: PublicKey;
323
- insuranceVaultNonce: number;
324
340
  marginRatioInitial: BN;
325
341
  marginRatioMaintenance: BN;
326
342
  marginRatioPartial: BN;
@@ -342,6 +358,8 @@ export type StateAccount = {
342
358
  numberOfMarkets: BN;
343
359
  numberOfBanks: BN;
344
360
  minOrderQuoteAssetAmount: BN;
361
+ signer: PublicKey;
362
+ signerNonce: number;
345
363
  maxAuctionDuration: number;
346
364
  minAuctionDuration: number;
347
365
  };
@@ -371,12 +389,8 @@ export type BankAccount = {
371
389
  pubkey: PublicKey;
372
390
  mint: PublicKey;
373
391
  vault: PublicKey;
374
- vaultAuthority: PublicKey;
375
- vaultAuthorityNonce: number;
376
392
 
377
393
  insuranceFundVault: PublicKey;
378
- insuranceFundVaultAuthority: PublicKey;
379
- insuranceFundVaultAuthorityNonce: number;
380
394
  insuranceWithdrawEscrowPeriod: BN;
381
395
  revenuePool: PoolBalance;
382
396
 
@@ -446,6 +460,7 @@ export type AMM = {
446
460
  cumulativeFeePerLp: BN;
447
461
  cumulativeNetBaseAssetAmountPerLp: BN;
448
462
  userLpShares: BN;
463
+ netUnsettledLpBaseAssetAmount: BN;
449
464
  minimumQuoteAssetTradeSize: BN;
450
465
  baseAssetAmountStepSize: BN;
451
466
  maxBaseAssetAmountRatio: number;