@liberfi.io/ui-perpetuals 1.0.1 → 1.1.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 CHANGED
@@ -1892,16 +1892,21 @@ declare class LiberFiPerpetualsClient implements IPerpetualsClient {
1892
1892
  }
1893
1893
 
1894
1894
  /**
1895
- * Wire / domain types for the Solana → Hyperliquid USDC deposit flow.
1895
+ * Wire / domain types for the multi-chain → Hyperliquid USDC deposit flow.
1896
1896
  *
1897
1897
  * These deliberately mirror the perpetuals-server DTOs (see
1898
1898
  * `internal/handler/deposit_handler.go`) so the SDK <-> backend contract
1899
1899
  * stays in sync. When the backend adds a new field, add it here too —
1900
1900
  * the compiler will then point at every place that needs to handle it.
1901
1901
  *
1902
- * All amounts denominated in *smallest unit* (lamports for SOL, USDC's
1903
- * 6-decimal microUSDC for the destination side) are typed as `string` so
1904
- * we never accidentally lose precision on large values.
1902
+ * Origin chains:
1903
+ * - Solana mainnet (SOL) chainId 792703809, namespace "solana"
1904
+ * - Ethereum mainnet (ETH) — chainId 1, namespace "evm"
1905
+ * - BNB Smart Chain (BNB) — chainId 56, namespace "evm"
1906
+ *
1907
+ * All amounts are denominated in the *smallest unit* of the origin
1908
+ * currency (lamports for SOL, wei for ETH / BNB, microUSDC for the
1909
+ * destination side) and typed as `string` so we never lose precision.
1905
1910
  */
1906
1911
  /** Where the deposit was initiated from. Drives fee attribution server-side. */
1907
1912
  type DepositSource = "dex" | "prediction" | "launchpad" | "channel";
@@ -1923,60 +1928,95 @@ interface DepositErrorInfo {
1923
1928
  message: string;
1924
1929
  recoverable: boolean;
1925
1930
  }
1931
+ /** On-chain runtime family of an origin route. */
1932
+ type ChainNamespace = "solana" | "evm";
1926
1933
  /** Exact-decimal breakdown returned by the quote endpoint. */
1927
1934
  interface DepositBreakdown {
1928
- /** Total lamports the user is paying in (gross). */
1935
+ /** Origin family ("solana" | "evm"). */
1936
+ originNamespace: ChainNamespace;
1937
+ /** Smallest-unit gross input. */
1938
+ grossAmount: string;
1939
+ /** Platform fee transferred to the LiberFi treasury (Solana only). */
1940
+ platformFeeAmount: string;
1941
+ /** Net amount Relay bridges (= grossAmount − platformFeeAmount). */
1942
+ relayDepositAmount: string;
1943
+ /** @deprecated Use {@link grossAmount}. Same value, kept for backward compat. */
1929
1944
  grossLamports: string;
1930
- /** Platform fee transferred to the LiberFi treasury (lamports). */
1945
+ /** @deprecated Use {@link platformFeeAmount}. Same value, kept for backward compat. */
1931
1946
  platformFeeLamports: string;
1932
- /** Net amount Relay bridges (= gross platformFee), in lamports. */
1947
+ /** @deprecated Use {@link relayDepositAmount}. Same value, kept for backward compat. */
1933
1948
  relayDepositLamports: string;
1934
- /** SOL pubkey the platform fee is sent to. May be empty when fee = 0. */
1949
+ /** Address the platform fee is sent to. Empty when fee = 0 or for EVM. */
1935
1950
  treasuryAddress: string;
1936
1951
  /** Expected destination output, in microUSDC (6-decimal). May be empty. */
1937
1952
  expectedOutputUSDC?: string;
1938
- /** Origin chain id (Solana mainnet on Relay = 792703809). */
1953
+ /** Origin chain id (Solana = 792703809, ETH = 1, BSC = 56). */
1939
1954
  originChainId: number;
1940
1955
  /** Destination chain id (Hyperliquid). */
1941
1956
  destinationChainId: number;
1942
- /** Origin currency. SOL is encoded as the SystemProgram pseudo-pubkey. */
1957
+ /** Origin currency. Native SOL = SystemProgram pubkey; native EVM = 0x0...0. */
1943
1958
  originCurrency: string;
1944
1959
  /** Destination currency contract. */
1945
1960
  destinationCurrency: string;
1946
- /** Relay-issued depository address — the program/wallet receiving SOL. */
1961
+ /** Relay-issued depository — the program/contract receiving funds. */
1947
1962
  depository?: string;
1948
1963
  /** Relay request id; populated once Relay returns a quote. */
1949
1964
  relayRequestId?: string;
1950
1965
  }
1951
1966
  /** Body of POST /v1/deposits/quote. */
1952
1967
  interface DepositQuoteRequest {
1953
- userSolanaAddress: string;
1968
+ /** Origin chain id the user is paying from (792703809 / 1 / 56). */
1969
+ originChainId: number;
1970
+ /** Chain-agnostic payer address (base58 for solana, 0x-hex for evm). */
1971
+ userAddress: string;
1972
+ /** Hyperliquid recipient — always an EVM address. */
1954
1973
  hyperliquidRecipient: string;
1955
1974
  /** Smallest-unit amount the user is paying in. */
1956
- grossLamports: string;
1975
+ grossAmount: string;
1957
1976
  /** Fee attribution source. Defaults to `dex` server-side when empty. */
1958
1977
  source: DepositSource;
1959
1978
  }
1960
- /** Response of POST /v1/deposits/quote. */
1961
- interface DepositQuoteResponse {
1962
- /** Base64 SOL transaction the user signs in their wallet. */
1979
+ /** Solana-flavoured quote payload. */
1980
+ interface DepositSolanaQuotePayload {
1981
+ kind: "solana";
1982
+ /** Base64-encoded Solana transaction the user signs. */
1963
1983
  serializedTxBase64: string;
1964
1984
  /** Transaction size on the wire (used by client-side guards). */
1965
1985
  sizeBytes: number;
1966
1986
  /** True for v0 transactions (legacy = false). */
1967
1987
  isVersioned: boolean;
1988
+ }
1989
+ /** EVM-flavoured quote payload — wallet signs and broadcasts verbatim. */
1990
+ interface DepositEvmQuotePayload {
1991
+ kind: "evm";
1992
+ evmTx: {
1993
+ chainId: number;
1994
+ to: `0x${string}` | string;
1995
+ data: `0x${string}` | string;
1996
+ value: `0x${string}` | string;
1997
+ };
1998
+ }
1999
+ /**
2000
+ * Response of POST /v1/deposits/quote.
2001
+ *
2002
+ * Discriminated by `kind`:
2003
+ * - `kind === "solana"` → consume `serializedTxBase64`/`sizeBytes`/`isVersioned`.
2004
+ * - `kind === "evm"` → consume `evmTx`.
2005
+ */
2006
+ type DepositQuoteResponse = (DepositSolanaQuotePayload | DepositEvmQuotePayload) & {
1968
2007
  breakdown: DepositBreakdown;
1969
2008
  /** ISO 8601 timestamp the quote was issued at. */
1970
2009
  issuedAt: string;
1971
2010
  /** ISO 8601 timestamp the quote expires at. */
1972
2011
  expiresAt: string;
1973
- }
2012
+ };
1974
2013
  /** Body of POST /v1/deposits/submit. */
1975
2014
  interface DepositSubmitRequest {
1976
- userSolanaAddress: string;
2015
+ /** Chain-agnostic payer address (base58 / 0x-hex). */
2016
+ userAddress: string;
1977
2017
  hyperliquidRecipient: string;
1978
- /** The signed transaction's hash, returned by the wallet on broadcast. */
1979
- solanaTxHash: string;
2018
+ /** Origin-tx hash returned by the wallet on broadcast (sig / 0x-hex). */
2019
+ originTxHash: string;
1980
2020
  breakdown: DepositBreakdown;
1981
2021
  /** Stable user identifier (LiberFi user id, NOT the wallet address). */
1982
2022
  userId: string;
@@ -1989,15 +2029,20 @@ interface DepositSubmitRequest {
1989
2029
  /** Response of POST /v1/deposits/submit. */
1990
2030
  interface DepositSubmitResponse {
1991
2031
  intentId: string;
1992
- /** True the first time a unique solanaTxHash is seen; idempotent retries return false. */
2032
+ /** True the first time a unique (chain, tx) pair is seen; idempotent retries return false. */
1993
2033
  created: boolean;
1994
2034
  }
1995
2035
  /** Response of GET /v1/deposits/{id}. */
1996
2036
  interface DepositStatusResponse {
1997
2037
  intentId: string;
1998
2038
  status: DepositStatus;
1999
- userSolanaAddress: string;
2039
+ originNamespace: ChainNamespace;
2040
+ userAddress: string;
2000
2041
  hyperliquidRecipient: string;
2042
+ originTxHash: string;
2043
+ /** @deprecated Use {@link userAddress}. */
2044
+ userSolanaAddress: string;
2045
+ /** @deprecated Use {@link originTxHash}. */
2001
2046
  solanaTxHash: string;
2002
2047
  relayRequestId?: string;
2003
2048
  hyperliquidTxHash?: string;
@@ -2012,7 +2057,7 @@ interface DepositStatusResponse {
2012
2057
  }
2013
2058
 
2014
2059
  /**
2015
- * REST client for the Solana → Hyperliquid deposit endpoints exposed by
2060
+ * REST client for the multi-chain → Hyperliquid deposit endpoints exposed by
2016
2061
  * the perpetuals-server (`/v1/deposits/*`).
2017
2062
  *
2018
2063
  * Engineering principles:
@@ -2060,6 +2105,71 @@ declare class LiberFiPerpDepositClient implements IPerpDepositClient {
2060
2105
  refresh(intentId: string): Promise<DepositStatusResponse>;
2061
2106
  }
2062
2107
 
2108
+ /**
2109
+ * Adapter the host app must provide for EVM-origin deposits.
2110
+ *
2111
+ * Engineering principles:
2112
+ * - First principles: the SDK only needs three operations to drive an
2113
+ * EVM deposit — read the wallet's current chain, switch to the
2114
+ * origin chain for the duration of signing, and send the transaction
2115
+ * payload Relay produced. Everything else (gas estimation, nonce,
2116
+ * RPC endpoint, retries) is an implementation detail the host
2117
+ * wallet already owns.
2118
+ * - Single responsibility: this file knows nothing about Solana
2119
+ * deposits, HTTP, or React. It is unit-testable in isolation.
2120
+ * - Inversion of control: by keeping the adapter as a tiny structural
2121
+ * interface, the SDK does not depend on any specific wallet
2122
+ * implementation (Privy, RainbowKit, ConnectKit, viem WalletClient,
2123
+ * …). The host app is free to wire any of them.
2124
+ *
2125
+ * The hook (`usePerpDepositExecute`) is responsible for the chain
2126
+ * switch / restore lifecycle (try / finally). Adapters MUST NOT
2127
+ * switch chains inside `sendTransaction` themselves; the contract is
2128
+ * pure send.
2129
+ */
2130
+ /** Minimal description of an EVM transaction the user must sign. */
2131
+ interface EvmTxRequest {
2132
+ /** Chain id the tx targets (e.g. 1 for Ethereum mainnet, 56 for BSC). */
2133
+ chainId: number;
2134
+ /** Destination (Relay bridge contract). 0x-hex. */
2135
+ to: string;
2136
+ /** Calldata. 0x-hex. */
2137
+ data: string;
2138
+ /** Native-token value (wei). 0x-hex. */
2139
+ value: string;
2140
+ }
2141
+ /**
2142
+ * Host-provided EVM signer for the deposit flow. See file-level docs.
2143
+ */
2144
+ interface EvmDepositAdapter {
2145
+ /**
2146
+ * Returns the wallet's currently active chain id, or `undefined` when
2147
+ * the wallet has not connected to any chain yet. The hook reads this
2148
+ * before / after sending so it can restore the chain on exit.
2149
+ */
2150
+ getChainId(): number | undefined;
2151
+ /**
2152
+ * Switches the wallet's active chain. Should resolve only when the
2153
+ * wallet has acknowledged the switch (so subsequent
2154
+ * `sendTransaction` calls run on the requested chain).
2155
+ *
2156
+ * Implementations typically forward to the wallet's
2157
+ * `wallet_switchEthereumChain` RPC method (Privy:
2158
+ * `wallet.switchChain(chainId)`).
2159
+ */
2160
+ switchChain(chainId: number): Promise<void>;
2161
+ /**
2162
+ * Sends the EVM transaction. Resolves with the broadcast tx hash.
2163
+ *
2164
+ * Contract:
2165
+ * - Adapter MUST NOT switch chains inside this call. The hook has
2166
+ * already done so via `switchChain` if needed.
2167
+ * - Throws on user rejection, RPC failure, or chain mismatch.
2168
+ * - The returned hash is the origin-tx hash sent to /submit.
2169
+ */
2170
+ sendTransaction(tx: EvmTxRequest): Promise<string>;
2171
+ }
2172
+
2063
2173
  /**
2064
2174
  * Pure state machine for the deposit UI.
2065
2175
  *
@@ -2101,7 +2211,8 @@ type DepositState = {
2101
2211
  phase: "submitted";
2102
2212
  quote: DepositQuoteResponse;
2103
2213
  intentId: string;
2104
- solanaTxHash: string;
2214
+ /** Origin-chain tx hash (Solana signature or EVM 0x-hash). */
2215
+ originTxHash: string;
2105
2216
  } | {
2106
2217
  phase: "tracking";
2107
2218
  intentId: string;
@@ -2150,7 +2261,8 @@ type DepositEvent = {
2150
2261
  } | {
2151
2262
  type: "SUBMIT_OK";
2152
2263
  intentId: string;
2153
- solanaTxHash: string;
2264
+ /** Origin-chain tx hash (Solana signature or EVM 0x-hash). */
2265
+ originTxHash: string;
2154
2266
  } | {
2155
2267
  type: "SUBMIT_FAILED";
2156
2268
  error: DepositErrorInfo;
@@ -2717,9 +2829,7 @@ interface UsePerpDepositQuoteOptions extends Omit<UseQueryOptions<DepositQuoteRe
2717
2829
  declare function usePerpDepositQuote(req: DepositQuoteRequest | null | undefined, options?: UsePerpDepositQuoteOptions): _tanstack_react_query.UseQueryResult<DepositQuoteResponse, Error>;
2718
2830
 
2719
2831
  /**
2720
- * Adapter the host app must provide. Lives on the consumer side so the
2721
- * SDK never has to know how a particular wallet (Phantom / Backpack /
2722
- * Privy / Solflare / …) signs and broadcasts a Solana transaction.
2832
+ * Adapter the host app must provide for Solana-origin deposits.
2723
2833
  *
2724
2834
  * Contract:
2725
2835
  * - Decode the `serializedTxBase64` produced by /quote.
@@ -2740,8 +2850,8 @@ type SignAndBroadcastSolanaTx = (serializedTxBase64: string, ctx: {
2740
2850
  interface ExecuteDepositInput {
2741
2851
  /** The quote previously returned by `/v1/deposits/quote`. */
2742
2852
  quote: DepositQuoteResponse;
2743
- /** User-facing identifiers; must match what was sent to /quote. */
2744
- userSolanaAddress: string;
2853
+ /** Chain-agnostic payer address; must match what was sent to /quote. */
2854
+ userAddress: string;
2745
2855
  hyperliquidRecipient: string;
2746
2856
  /** LiberFi user id (NOT the wallet). Stable for fee attribution. */
2747
2857
  userId: string;
@@ -2763,19 +2873,34 @@ interface UsePerpDepositExecuteResult {
2763
2873
  /** Manually push an event into the FSM (advanced). */
2764
2874
  dispatch: (event: DepositEvent) => void;
2765
2875
  }
2876
+ /** Signers the host wires for each supported origin family. */
2877
+ interface DepositSigners {
2878
+ /** Solana signer; required if any of the routes is Solana. */
2879
+ solana?: SignAndBroadcastSolanaTx;
2880
+ /** EVM signer; required if any of the routes is EVM. */
2881
+ evm?: EvmDepositAdapter;
2882
+ }
2766
2883
  /**
2767
- * Orchestrates the full deposit flow:
2884
+ * Orchestrates the full multi-chain deposit flow:
2768
2885
  *
2769
- * 1. SIGN_START → wallet signs (host adapter)
2770
- * 2. BROADCAST_START → wallet broadcasts (host adapter)
2886
+ * 1. SIGN_START → wallet signs (host adapter — Solana sign+broadcast or EVM send)
2887
+ * 2. BROADCAST_START → wallet broadcasts
2771
2888
  * 3. SUBMIT_OK → POST /v1/deposits/submit (this hook)
2772
2889
  * 4. STATUS_UPDATE ← `usePerpDepositStatus` polls and forwards
2773
2890
  *
2774
- * Each stage emits a typed event into the same reducer used by the
2775
- * presentational components. The hook itself never renders anything
2776
- * components consume `state.phase` and react accordingly.
2891
+ * For EVM origins the hook owns the chain-switch lifecycle: it switches
2892
+ * the wallet to `quote.evmTx.chainId` before sending and restores the
2893
+ * previous chain in a `finally` block so even if the user rejects or
2894
+ * the RPC fails, the host wallet is never left on the origin chain.
2895
+ *
2896
+ * The hook itself never renders anything — components consume
2897
+ * `state.phase` and react accordingly.
2898
+ *
2899
+ * Backwards-compatible usage: passing a bare Solana signer
2900
+ * (`usePerpDepositExecute(fn)`) keeps the legacy single-chain entry
2901
+ * point working; pass `{ solana, evm }` to enable multi-chain.
2777
2902
  */
2778
- declare function usePerpDepositExecute(signAndBroadcast: SignAndBroadcastSolanaTx): UsePerpDepositExecuteResult;
2903
+ declare function usePerpDepositExecute(signers: SignAndBroadcastSolanaTx | DepositSigners): UsePerpDepositExecuteResult;
2779
2904
 
2780
2905
  declare function perpDepositStatusQueryKey(intentId?: string): readonly unknown[];
2781
2906
  declare function fetchPerpDepositStatus(client: IPerpDepositClient, intentId: string): Promise<DepositStatusResponse>;
@@ -4114,4 +4239,4 @@ interface HyperliquidInitWidgetProps extends Pick<UseHyperliquidSetupOptions, "a
4114
4239
  }
4115
4240
  declare function HyperliquidInitWidget({ adapter, userAddress, steps, autoLoad, onComplete, onError, onDismiss, className, }: HyperliquidInitWidgetProps): react_jsx_runtime.JSX.Element;
4116
4241
 
4117
- export { type Account, type AccountState, type ActiveAssetLeverage, type ApproveBuilderFeeParams, type AssetMeta, type CancelOrderImpl, type CancelOrderParams, type CancelOrderResult, type CancelOrdersImpl, ClosePositionModal, type ClosePositionModalProps, type CloseType, type Coin, CoinInfoNotFoundUI, CoinInfoSkeletonsUI, CoinInfoUI, type CoinInfoUIProps, CoinInfoWidget, type CoinInfoWidgetProps, DEFAULT_ORDER_BOOK_PRECISION_OPTIONS, type DepositBreakdown, DepositConfirmUI, type DepositConfirmUIProps, type DepositErrorInfo, type DepositEvent, DepositFlowWidget, type DepositFlowWidgetProps, DepositFormUI, type DepositFormUIProps, type DepositPhase, type DepositQuoteRequest, type DepositQuoteResponse, type DepositSource, type DepositState, type DepositStatus, type DepositStatusResponse, type DepositStatusTransition, DepositStatusUI, type DepositStatusUIProps, type DepositSubmitRequest, type DepositSubmitResponse, type ExecuteDepositInput, type GetActiveAssetLeverageParams, type GetAssetMetaParams, type GetOpenOrdersParams, type GetOpenOrdersResult, type GetPositionsParams, type GetPositionsResult, type GetTradesParams, type GetTradesResult, HL_USDC_DECIMALS, type HyperliquidAccountState, HyperliquidApiError, type HyperliquidClientConfig, type HyperliquidEnvironment, HyperliquidInitUI, type HyperliquidInitUIProps, HyperliquidInitWidget, type HyperliquidInitWidgetProps, HyperliquidPerpetualsClient, type HyperliquidSetupActionResult, type IHyperliquidSetupAdapter, type IPerpDepositClient, type IPerpetualsClient, type Kline, type KlineInterval, type KlineQueryOptions, LiberFiApiError, type LiberFiHttpMethod, type RequestOptions as LiberFiHttpRequestOptions, LiberFiHttpTransport, type LiberFiHttpTransportConfig, LiberFiPerpDepositClient, type LiberFiPerpDepositClientConfig, LiberFiPerpetualsClient, type LiberFiPerpetualsClientConfig, type MarketData, type MarketDataType, type OpenOrderSortKey, OpenOrdersEmpty, OpenOrdersSkeleton, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBook, type OrderBookAggregationOptions, type OrderBookLevel, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, type OrderSide, type OrderStatus, type OrderType, PerpetualsContext, type PerpetualsContextValue, PerpetualsProvider, type PerpetualsProviderProps, type PlaceOrderFormData, PlaceOrderFormUI, type PlaceOrderFormUIProps, PlaceOrderFormWidget, type PlaceOrderFormWidgetProps, type PlaceOrderParams, type PlaceOrderRequest, type PlaceOrderResult, type Position, type PositionSortKey, PositionsEmpty, PositionsSkeleton, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, type PriceLevel, SearchCoinsUI, type SearchCoinsUIProps, SearchCoinsWidget, type SearchCoinsWidgetProps, type SetReferrerParams, type SetupAction, type SetupPhase, type SetupState, type SetupStep, type SetupStepId, type SignAndBroadcastSolanaTx, type SignTypedDataFn, type SortDirection, type SpotBalance, type StepRecord, type StepStatus, type Symbol, TERMINAL_DEPOSIT_STATUSES, type Trade, type TradeHistory, TradeHistoryEmpty, TradeHistorySkeleton, type TradeHistorySortKey, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeSide, TradesUI, type TradesUIProps, TradesWidget, type TradesWidgetProps, type TradingProvider, type UniverseAssetEntry, type UniverseSnapshot, type UpdateLeverageParams, type UseAccountStateQueryParams, type UseAccountStateSubscriptionParams, type UseAccountStateSubscriptionResult, type UseActiveAssetLeverageQueryParams, type UseAssetMetaQueryParams, type UseCancelOrderMutationParams, type UseCandlesSubscriptionParams, type UseCandlesSubscriptionResult, type UseClosePositionParams, type UseClosePositionResult, type UseCoinInfoReturnType, type UseCreateOrderMutationParams, type UseHyperliquidSetupOptions, type UseHyperliquidSetupResult, type UseHyperliquidUserBootstrapParams, type UseKlinesQueryParams, type UseMarketDataSubscriptionParams, type UseMarketDataSubscriptionResult, type UseMarketQueryParams, type UseMarketsQueryParams, type UseOpenOrdersScriptParams, type UseOpenOrdersScriptResult, type UseOrderBookQueryParams, type UseOrderBookScriptParams, type UseOrderBookScriptResult, type UseOrdersQueryParams, type UsePerpDepositExecuteResult, type UsePerpDepositQuoteOptions, type UsePerpDepositStatusOptions, type UsePlaceOrderFormScriptParams, type UsePlaceOrderFormScriptResult, type UsePositionsQueryParams, type UsePositionsScriptParams, type UsePositionsScriptResult, type UseRecentTradesQueryParams, type UseSearchCoinsScriptParams, type UseSearchCoinsScriptResult, type UseTradeHistoryScriptParams, type UseTradeHistoryScriptResult, type UseTradesQueryParams, type UseTradesScriptParams, type UseTradesScriptResult, type UseUserDataSubscriptionParams, type UseUserDataSubscriptionResult, type UserDataType, accountStateQueryKey, activeAssetLeverageQueryKey, aggregationFromStep, assetMetaQueryKey, cancelOrder, classifyStep, coinsQueryKey, createOrder, currentBreakdown as currentDepositBreakdown, currentStatus as currentDepositStatus, fetchActiveAssetLeverage, fetchAssetMeta, fetchCoins, fetchKlines, fetchMarket, fetchMarkets, fetchOrderBook, fetchOrders, fetchPerpDepositQuote, fetchPerpDepositStatus, fetchPositions, fetchRecentTrades, fetchTrades, fetchUniverse, hlUsdcRawToUsdc, initialDepositState, initialSetupState, isPolling as isDepositPolling, isTerminal as isDepositTerminal, isTerminalLifecycle as isTerminalDepositLifecycle, klinesQueryKey, lamportsToSol, marketQueryKey, marketsQueryKey, microUsdcToUsdc, nextRunnableStep, orderBookQueryKey, ordersQueryKey, perpDepositQuoteQueryKey, perpDepositStatusQueryKey, positionsQueryKey, recentTradesQueryKey, reduceDepositState, reduceSetupState, secondsUntil, shortAddress, solToLamports, supportsUniverseSnapshot, tradesQueryKey, universeQueryKey, useAccountStateQuery, useAccountStateSubscription, useActiveAssetLeverageQuery, useAssetMetaQuery, useCancelOrderMutation, useCandlesSubscription, useClosePosition, useCoinInfo, useCoinsQuery, useCreateOrderMutation, useHyperliquidSetup, useHyperliquidUserBootstrap, useKlinesQuery, useMarketDataSubscription, useMarketQuery, useMarketsQuery, useOpenOrdersScript, useOrderBookQuery, useOrderBookScript, useOrdersQuery, usePerpDepositClient, usePerpDepositClientMaybe, usePerpDepositExecute, usePerpDepositQuote, usePerpDepositStatus, usePerpetualsClient, usePlaceOrderFormScript, usePositionsQuery, usePositionsScript, useRecentTradesQuery, useSearchCoinsScript, useTradeHistoryScript, useTradesQuery, useTradesScript, useUniverseQuery, useUserDataSubscription };
4242
+ export { type Account, type AccountState, type ActiveAssetLeverage, type ApproveBuilderFeeParams, type AssetMeta, type CancelOrderImpl, type CancelOrderParams, type CancelOrderResult, type CancelOrdersImpl, ClosePositionModal, type ClosePositionModalProps, type CloseType, type Coin, CoinInfoNotFoundUI, CoinInfoSkeletonsUI, CoinInfoUI, type CoinInfoUIProps, CoinInfoWidget, type CoinInfoWidgetProps, DEFAULT_ORDER_BOOK_PRECISION_OPTIONS, type DepositBreakdown, type ChainNamespace as DepositChainNamespace, DepositConfirmUI, type DepositConfirmUIProps, type DepositErrorInfo, type DepositEvent, type DepositEvmQuotePayload, DepositFlowWidget, type DepositFlowWidgetProps, DepositFormUI, type DepositFormUIProps, type DepositPhase, type DepositQuoteRequest, type DepositQuoteResponse, type DepositSigners, type DepositSolanaQuotePayload, type DepositSource, type DepositState, type DepositStatus, type DepositStatusResponse, type DepositStatusTransition, DepositStatusUI, type DepositStatusUIProps, type DepositSubmitRequest, type DepositSubmitResponse, type EvmDepositAdapter, type EvmTxRequest, type ExecuteDepositInput, type GetActiveAssetLeverageParams, type GetAssetMetaParams, type GetOpenOrdersParams, type GetOpenOrdersResult, type GetPositionsParams, type GetPositionsResult, type GetTradesParams, type GetTradesResult, HL_USDC_DECIMALS, type HyperliquidAccountState, HyperliquidApiError, type HyperliquidClientConfig, type HyperliquidEnvironment, HyperliquidInitUI, type HyperliquidInitUIProps, HyperliquidInitWidget, type HyperliquidInitWidgetProps, HyperliquidPerpetualsClient, type HyperliquidSetupActionResult, type IHyperliquidSetupAdapter, type IPerpDepositClient, type IPerpetualsClient, type Kline, type KlineInterval, type KlineQueryOptions, LiberFiApiError, type LiberFiHttpMethod, type RequestOptions as LiberFiHttpRequestOptions, LiberFiHttpTransport, type LiberFiHttpTransportConfig, LiberFiPerpDepositClient, type LiberFiPerpDepositClientConfig, LiberFiPerpetualsClient, type LiberFiPerpetualsClientConfig, type MarketData, type MarketDataType, type OpenOrderSortKey, OpenOrdersEmpty, OpenOrdersSkeleton, OpenOrdersUI, type OpenOrdersUIProps, OpenOrdersWidget, type OpenOrdersWidgetProps, type Order, type OrderBook, type OrderBookAggregationOptions, type OrderBookLevel, OrderBookUI, type OrderBookUIProps, OrderBookWidget, type OrderBookWidgetProps, type OrderSide, type OrderStatus, type OrderType, PerpetualsContext, type PerpetualsContextValue, PerpetualsProvider, type PerpetualsProviderProps, type PlaceOrderFormData, PlaceOrderFormUI, type PlaceOrderFormUIProps, PlaceOrderFormWidget, type PlaceOrderFormWidgetProps, type PlaceOrderParams, type PlaceOrderRequest, type PlaceOrderResult, type Position, type PositionSortKey, PositionsEmpty, PositionsSkeleton, PositionsUI, type PositionsUIProps, PositionsWidget, type PositionsWidgetProps, type PriceLevel, SearchCoinsUI, type SearchCoinsUIProps, SearchCoinsWidget, type SearchCoinsWidgetProps, type SetReferrerParams, type SetupAction, type SetupPhase, type SetupState, type SetupStep, type SetupStepId, type SignAndBroadcastSolanaTx, type SignTypedDataFn, type SortDirection, type SpotBalance, type StepRecord, type StepStatus, type Symbol, TERMINAL_DEPOSIT_STATUSES, type Trade, type TradeHistory, TradeHistoryEmpty, TradeHistorySkeleton, type TradeHistorySortKey, TradeHistoryUI, type TradeHistoryUIProps, TradeHistoryWidget, type TradeHistoryWidgetProps, type TradeSide, TradesUI, type TradesUIProps, TradesWidget, type TradesWidgetProps, type TradingProvider, type UniverseAssetEntry, type UniverseSnapshot, type UpdateLeverageParams, type UseAccountStateQueryParams, type UseAccountStateSubscriptionParams, type UseAccountStateSubscriptionResult, type UseActiveAssetLeverageQueryParams, type UseAssetMetaQueryParams, type UseCancelOrderMutationParams, type UseCandlesSubscriptionParams, type UseCandlesSubscriptionResult, type UseClosePositionParams, type UseClosePositionResult, type UseCoinInfoReturnType, type UseCreateOrderMutationParams, type UseHyperliquidSetupOptions, type UseHyperliquidSetupResult, type UseHyperliquidUserBootstrapParams, type UseKlinesQueryParams, type UseMarketDataSubscriptionParams, type UseMarketDataSubscriptionResult, type UseMarketQueryParams, type UseMarketsQueryParams, type UseOpenOrdersScriptParams, type UseOpenOrdersScriptResult, type UseOrderBookQueryParams, type UseOrderBookScriptParams, type UseOrderBookScriptResult, type UseOrdersQueryParams, type UsePerpDepositExecuteResult, type UsePerpDepositQuoteOptions, type UsePerpDepositStatusOptions, type UsePlaceOrderFormScriptParams, type UsePlaceOrderFormScriptResult, type UsePositionsQueryParams, type UsePositionsScriptParams, type UsePositionsScriptResult, type UseRecentTradesQueryParams, type UseSearchCoinsScriptParams, type UseSearchCoinsScriptResult, type UseTradeHistoryScriptParams, type UseTradeHistoryScriptResult, type UseTradesQueryParams, type UseTradesScriptParams, type UseTradesScriptResult, type UseUserDataSubscriptionParams, type UseUserDataSubscriptionResult, type UserDataType, accountStateQueryKey, activeAssetLeverageQueryKey, aggregationFromStep, assetMetaQueryKey, cancelOrder, classifyStep, coinsQueryKey, createOrder, currentBreakdown as currentDepositBreakdown, currentStatus as currentDepositStatus, fetchActiveAssetLeverage, fetchAssetMeta, fetchCoins, fetchKlines, fetchMarket, fetchMarkets, fetchOrderBook, fetchOrders, fetchPerpDepositQuote, fetchPerpDepositStatus, fetchPositions, fetchRecentTrades, fetchTrades, fetchUniverse, hlUsdcRawToUsdc, initialDepositState, initialSetupState, isPolling as isDepositPolling, isTerminal as isDepositTerminal, isTerminalLifecycle as isTerminalDepositLifecycle, klinesQueryKey, lamportsToSol, marketQueryKey, marketsQueryKey, microUsdcToUsdc, nextRunnableStep, orderBookQueryKey, ordersQueryKey, perpDepositQuoteQueryKey, perpDepositStatusQueryKey, positionsQueryKey, recentTradesQueryKey, reduceDepositState, reduceSetupState, secondsUntil, shortAddress, solToLamports, supportsUniverseSnapshot, tradesQueryKey, universeQueryKey, useAccountStateQuery, useAccountStateSubscription, useActiveAssetLeverageQuery, useAssetMetaQuery, useCancelOrderMutation, useCandlesSubscription, useClosePosition, useCoinInfo, useCoinsQuery, useCreateOrderMutation, useHyperliquidSetup, useHyperliquidUserBootstrap, useKlinesQuery, useMarketDataSubscription, useMarketQuery, useMarketsQuery, useOpenOrdersScript, useOrderBookQuery, useOrderBookScript, useOrdersQuery, usePerpDepositClient, usePerpDepositClientMaybe, usePerpDepositExecute, usePerpDepositQuote, usePerpDepositStatus, usePerpetualsClient, usePlaceOrderFormScript, usePositionsQuery, usePositionsScript, useRecentTradesQuery, useSearchCoinsScript, useTradeHistoryScript, useTradesQuery, useTradesScript, useUniverseQuery, useUserDataSubscription };