@liberfi.io/ui-perpetuals 0.2.17 → 0.2.18

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/dist/index.d.mts CHANGED
@@ -12,7 +12,7 @@ declare global {
12
12
  };
13
13
  }
14
14
  }
15
- declare const _default: "0.2.17";
15
+ declare const _default: "0.2.18";
16
16
 
17
17
  /**
18
18
  * Trading pair symbol format
@@ -2259,6 +2259,12 @@ type UsePlaceOrderFormScriptResult = {
2259
2259
  accountValue: number;
2260
2260
  currentPosition?: number;
2261
2261
  maxLeverage: number;
2262
+ /**
2263
+ * Leverage currently configured on Hyperliquid for the active symbol's
2264
+ * position. `undefined` when the user has no open position for the
2265
+ * symbol (and therefore no per-asset leverage to read).
2266
+ */
2267
+ currentLeverage?: number;
2262
2268
  };
2263
2269
  declare function usePlaceOrderFormScript({ symbol, userAddress, maxLeverage: maxLeverageProp, onSuccess, onError, }: UsePlaceOrderFormScriptParams): UsePlaceOrderFormScriptResult;
2264
2270
 
@@ -2287,7 +2293,7 @@ type PlaceOrderFormUIProps = {
2287
2293
  */
2288
2294
  onAddFunds?: () => void;
2289
2295
  };
2290
- declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2296
+ declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage: _maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2291
2297
 
2292
2298
  type PositionsWidgetProps = {
2293
2299
  userAddress?: string;
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare global {
12
12
  };
13
13
  }
14
14
  }
15
- declare const _default: "0.2.17";
15
+ declare const _default: "0.2.18";
16
16
 
17
17
  /**
18
18
  * Trading pair symbol format
@@ -2259,6 +2259,12 @@ type UsePlaceOrderFormScriptResult = {
2259
2259
  accountValue: number;
2260
2260
  currentPosition?: number;
2261
2261
  maxLeverage: number;
2262
+ /**
2263
+ * Leverage currently configured on Hyperliquid for the active symbol's
2264
+ * position. `undefined` when the user has no open position for the
2265
+ * symbol (and therefore no per-asset leverage to read).
2266
+ */
2267
+ currentLeverage?: number;
2262
2268
  };
2263
2269
  declare function usePlaceOrderFormScript({ symbol, userAddress, maxLeverage: maxLeverageProp, onSuccess, onError, }: UsePlaceOrderFormScriptParams): UsePlaceOrderFormScriptResult;
2264
2270
 
@@ -2287,7 +2293,7 @@ type PlaceOrderFormUIProps = {
2287
2293
  */
2288
2294
  onAddFunds?: () => void;
2289
2295
  };
2290
- declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2296
+ declare function PlaceOrderFormUI({ methods, side, orderType, onSideChange, onOrderTypeChange, onSubmit, isSubmitting, symbol, currentPrice, estimatedFee, liquidationPrice, availableMargin, accountValue, currentPosition, maxLeverage: _maxLeverage, onAddFunds, }: PlaceOrderFormUIProps): react_jsx_runtime.JSX.Element;
2291
2297
 
2292
2298
  type PositionsWidgetProps = {
2293
2299
  userAddress?: string;