@0dotxyz/p0-ts-sdk 2.2.4 → 2.2.5-alpha.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.
@@ -1,7 +1,7 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
2
  import { PublicKey, AccountMeta } from '@solana/web3.js';
3
3
  import BN from 'bn.js';
4
- import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-CsLjciLo.cjs';
4
+ import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-Dw9hSftB.cjs';
5
5
  import '@coral-xyz/anchor';
6
6
  import 'bignumber.js';
7
7
  import './dto-rate-model.types-DveIB9Ll.cjs';
@@ -1,7 +1,7 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
2
  import { PublicKey, AccountMeta } from '@solana/web3.js';
3
3
  import BN from 'bn.js';
4
- import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-DuCxJVOn.js';
4
+ import { M as MarginfiProgram, B as BankConfigCompactRaw, a as BankConfigOptRaw } from './types-CZtn4lP8.js';
5
5
  import '@coral-xyz/anchor';
6
6
  import 'bignumber.js';
7
7
  import './dto-rate-model.types-DveIB9Ll.js';
@@ -14844,13 +14844,13 @@ declare enum MarginRequirementType {
14844
14844
  * ==================================================
14845
14845
  */
14846
14846
  /**
14847
- * Determines if a margin requirement type uses weighted prices.
14847
+ * Determines if a margin requirement type uses the time-weighted (TWAP/EMA) price.
14848
14848
  *
14849
- * Initial margin uses weighted prices (EMA-based), while Maintenance and Equity
14850
- * use spot prices for more accurate liquidation decisions.
14849
+ * Mirrors the program's `RequirementType::get_oracle_price_type`: Initial and Equity use the
14850
+ * time-weighted price, while Maintenance uses the real-time price (more accurate for liquidations).
14851
14851
  *
14852
14852
  * @param marginRequirement - The margin requirement type to check
14853
- * @returns True if Initial margin (uses weighted prices), false otherwise
14853
+ * @returns True for Initial and Equity (time-weighted), false for Maintenance (real-time)
14854
14854
  */
14855
14855
  declare function isWeightedPrice(marginRequirement: MarginRequirementType): boolean;
14856
14856
  /**
@@ -14844,13 +14844,13 @@ declare enum MarginRequirementType {
14844
14844
  * ==================================================
14845
14845
  */
14846
14846
  /**
14847
- * Determines if a margin requirement type uses weighted prices.
14847
+ * Determines if a margin requirement type uses the time-weighted (TWAP/EMA) price.
14848
14848
  *
14849
- * Initial margin uses weighted prices (EMA-based), while Maintenance and Equity
14850
- * use spot prices for more accurate liquidation decisions.
14849
+ * Mirrors the program's `RequirementType::get_oracle_price_type`: Initial and Equity use the
14850
+ * time-weighted price, while Maintenance uses the real-time price (more accurate for liquidations).
14851
14851
  *
14852
14852
  * @param marginRequirement - The margin requirement type to check
14853
- * @returns True if Initial margin (uses weighted prices), false otherwise
14853
+ * @returns True for Initial and Equity (time-weighted), false for Maintenance (real-time)
14854
14854
  */
14855
14855
  declare function isWeightedPrice(marginRequirement: MarginRequirementType): boolean;
14856
14856
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0dotxyz/p0-ts-sdk",
3
- "version": "2.2.4",
3
+ "version": "2.2.5-alpha.0",
4
4
  "packageManager": "pnpm@10.32.1",
5
5
  "description": "TypeScript SDK for P0 Protocol - A Solana DeFi lending protocol",
6
6
  "type": "module",