import { type Address } from 'viem'; /** Whether Lighter can be asked to resolve this address to a user account. */ export declare function isResolvableLighterL1Address(address: Address | '' | undefined): address is Address; /** Lighter `account_trading_mode`: 0 = simple (separate spot/perps balances), 1 = Unified Trading (one USDC balance). */ export declare const LIGHTER_TRADING_MODE: { readonly SIMPLE: 0; readonly UNIFIED: 1; }; export type LighterSubAccount = { code: number; account_type: number; index: number; l1_address: Address; cancel_all_time: number; total_order_count: number; total_isolated_order_count: number; pending_order_count: number; available_balance: string; status: number; collateral: string; transaction_time: number; account_trading_mode: number; }; export type LighterAccountsByL1AddressResponse = { code: number; l1_address: Address; sub_accounts: LighterSubAccount[]; }; export declare function getLighterAccountsByL1Address(address: Address): Promise; /** * Resolves an L1 wallet address to its Lighter L2 main-account index (Lighter * EOA generation targets the L2 account, not the L1 address) and trading * mode. Params-shaped and provider-free — shared by web and React Native. */ export declare function useLighterAccountsQuery({ address, }: { address: Address | '' | undefined; }): { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: LighterAccountsByL1AddressResponse; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: LighterAccountsByL1AddressResponse; error: null; isError: false; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: false; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: undefined; error: Error; isError: true; isPending: false; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: undefined; error: null; isError: false; isPending: true; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: undefined; error: null; isError: false; isPending: true; isLoadingError: false; isRefetchError: false; isSuccess: false; isPlaceholderData: false; status: "pending"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isLoading: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; } | { mainAccountIndex: string | undefined; isUnifiedTradingMode: boolean; subAccounts: LighterSubAccount[] | undefined; data: LighterAccountsByL1AddressResponse; isError: false; error: null; isPending: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; isPlaceholderData: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; failureReason: Error | null; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isInitialLoading: boolean; isPaused: boolean; isRefetching: boolean; isStale: boolean; refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise; }; //# sourceMappingURL=useLighterAccountsQuery.d.ts.map