@liberfi.io/ui-perpetuals 0.3.0 → 0.3.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.
- package/dist/index.d.mts +8 -15
- package/dist/index.d.ts +8 -15
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
declare const _default: "0.3.
|
|
15
|
+
declare const _default: "0.3.1";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Trading pair symbol format
|
|
@@ -3430,20 +3430,13 @@ type UseClosePositionParams = {
|
|
|
3430
3430
|
onCloseSuccess?: () => void;
|
|
3431
3431
|
onCloseError?: (error: Error) => void;
|
|
3432
3432
|
/**
|
|
3433
|
-
*
|
|
3434
|
-
*
|
|
3435
|
-
*
|
|
3433
|
+
* Callback that signs + relays the close order directly to the venue.
|
|
3434
|
+
* Same contract as the place-order form's `onPlaceOrder` — the host
|
|
3435
|
+
* hook (e.g. `useHyperliquidPlaceOrder`) receives a full
|
|
3436
|
+
* {@link PlaceOrderRequest} with `size`, `refPrice`, `szDecimals`
|
|
3437
|
+
* already computed.
|
|
3436
3438
|
*/
|
|
3437
|
-
onPlaceOrder?: (
|
|
3438
|
-
symbol: string;
|
|
3439
|
-
side: "long" | "short";
|
|
3440
|
-
orderType: OrderType;
|
|
3441
|
-
amount: number;
|
|
3442
|
-
price?: number;
|
|
3443
|
-
leverage: number;
|
|
3444
|
-
reduceOnly: boolean;
|
|
3445
|
-
userAddress: string;
|
|
3446
|
-
}) => Promise<PlaceOrderResult>;
|
|
3439
|
+
onPlaceOrder?: (request: PlaceOrderRequest) => Promise<PlaceOrderResult>;
|
|
3447
3440
|
};
|
|
3448
3441
|
type UseClosePositionResult = {
|
|
3449
3442
|
isModalOpen: boolean;
|
|
@@ -3458,7 +3451,7 @@ type UseClosePositionResult = {
|
|
|
3458
3451
|
/**
|
|
3459
3452
|
* Hook that owns the close-position modal lifecycle:
|
|
3460
3453
|
* - Which position is selected and which close type (market / limit)
|
|
3461
|
-
* - Submitting the close order via `
|
|
3454
|
+
* - Submitting the close order via `onPlaceOrder` (direct venue relay)
|
|
3462
3455
|
*
|
|
3463
3456
|
* The UI layer (modal component) owns the size / percentage / price
|
|
3464
3457
|
* input state — this hook only cares about the final confirmed values.
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
declare const _default: "0.3.
|
|
15
|
+
declare const _default: "0.3.1";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Trading pair symbol format
|
|
@@ -3430,20 +3430,13 @@ type UseClosePositionParams = {
|
|
|
3430
3430
|
onCloseSuccess?: () => void;
|
|
3431
3431
|
onCloseError?: (error: Error) => void;
|
|
3432
3432
|
/**
|
|
3433
|
-
*
|
|
3434
|
-
*
|
|
3435
|
-
*
|
|
3433
|
+
* Callback that signs + relays the close order directly to the venue.
|
|
3434
|
+
* Same contract as the place-order form's `onPlaceOrder` — the host
|
|
3435
|
+
* hook (e.g. `useHyperliquidPlaceOrder`) receives a full
|
|
3436
|
+
* {@link PlaceOrderRequest} with `size`, `refPrice`, `szDecimals`
|
|
3437
|
+
* already computed.
|
|
3436
3438
|
*/
|
|
3437
|
-
onPlaceOrder?: (
|
|
3438
|
-
symbol: string;
|
|
3439
|
-
side: "long" | "short";
|
|
3440
|
-
orderType: OrderType;
|
|
3441
|
-
amount: number;
|
|
3442
|
-
price?: number;
|
|
3443
|
-
leverage: number;
|
|
3444
|
-
reduceOnly: boolean;
|
|
3445
|
-
userAddress: string;
|
|
3446
|
-
}) => Promise<PlaceOrderResult>;
|
|
3439
|
+
onPlaceOrder?: (request: PlaceOrderRequest) => Promise<PlaceOrderResult>;
|
|
3447
3440
|
};
|
|
3448
3441
|
type UseClosePositionResult = {
|
|
3449
3442
|
isModalOpen: boolean;
|
|
@@ -3458,7 +3451,7 @@ type UseClosePositionResult = {
|
|
|
3458
3451
|
/**
|
|
3459
3452
|
* Hook that owns the close-position modal lifecycle:
|
|
3460
3453
|
* - Which position is selected and which close type (market / limit)
|
|
3461
|
-
* - Submitting the close order via `
|
|
3454
|
+
* - Submitting the close order via `onPlaceOrder` (direct venue relay)
|
|
3462
3455
|
*
|
|
3463
3456
|
* The UI layer (modal component) owns the size / percentage / price
|
|
3464
3457
|
* input state — this hook only cares about the final confirmed values.
|