import type { LighterAccountIndex } from '@funkit/api-base';
import type { Address } from 'viem';
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;
};
export type LighterAccountsByL1AddressResponse = {
    code: number;
    l1_address: Address;
    sub_accounts: LighterSubAccount[];
};
export declare function getLighterAccountsByL1Address(address: Address): Promise<LighterAccountsByL1AddressResponse>;
export type LighterAsset = {
    symbol: string;
    asset_id: number;
    balance: string;
    locked_balance: string;
};
export type LighterAccount = {
    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;
    account_index: number;
    name: string;
    description: string;
    can_invite: boolean;
    referral_points_percentage: string;
    can_rfq: boolean;
    created_at: number;
    positions: unknown[];
    assets: LighterAsset[];
    total_asset_value: string;
    cross_asset_value: string;
    shares: unknown[];
    pending_unlocks: unknown[];
};
export type LighterAccountResponse = {
    code: number;
    total: number;
    accounts: LighterAccount[];
};
export type LighterAccountLookup = {
    by: 'index';
    value: LighterAccountIndex;
} | {
    by: 'l1_address';
    value: Address;
};
export declare function getLighterAccount(lookup: LighterAccountLookup, activeOnly?: boolean): Promise<LighterAccountResponse>;
export declare function useLighterAccount(lookup: LighterAccountLookup | null, options?: {
    activeOnly?: boolean;
}): {
    account: LighterAccount | undefined;
    data: LighterAccountResponse;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
} | {
    account: LighterAccount | undefined;
    data: LighterAccountResponse;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
} | {
    account: LighterAccount | 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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
} | {
    account: LighterAccount | 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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
} | {
    account: LighterAccount | 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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
} | {
    account: LighterAccount | undefined;
    data: LighterAccountResponse;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountResponse>;
};
export declare function useLighterAccounts({ address, }: {
    address: Address | '' | undefined;
}): {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
} | {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
} | {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
} | {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
} | {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
} | {
    mainAccountIndex: string | undefined;
    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<import("@tanstack/react-query").QueryObserverResult<LighterAccountsByL1AddressResponse, Error>>;
    fetchStatus: import("@tanstack/react-query").FetchStatus;
    promise: Promise<LighterAccountsByL1AddressResponse>;
};
