UNPKG

@reservoir0x/relay-kit-ui

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

175 lines 5.93 kB
import type { AdaptedWallet, RelayChain } from '@reservoir0x/relay-sdk'; import type { Address } from 'viem'; type UseAdaptedWalletBalanceProps = { wallet?: AdaptedWallet; chain?: RelayChain; address?: Address | string; currency?: Address | string; enabled?: boolean; refreshInterval?: number; }; declare const useAdaptedWalletBalance: ({ wallet, chain, address, currency, enabled, refreshInterval }: UseAdaptedWalletBalanceProps) => { queryKey: (string | number | undefined)[]; data: bigint | undefined; 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; } | { queryKey: (string | number | undefined)[]; data: bigint | undefined; 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; } | { queryKey: (string | number | 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; } | { queryKey: (string | number | 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; } | { queryKey: (string | number | 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; } | { queryKey: (string | number | undefined)[]; data: bigint | undefined; 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 | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<bigint | undefined, Error>>; fetchStatus: import("@tanstack/react-query").FetchStatus; promise: Promise<bigint | undefined>; }; export default useAdaptedWalletBalance; //# sourceMappingURL=useAdaptedWalletBalance.d.ts.map