UNPKG

@towns-protocol/react-sdk

Version:

React Hooks for Towns Protocol SDK

26 lines 1.41 kB
import { AuthStatus } from '@towns-protocol/sdk'; import type { ObservableConfig } from './useObservable'; /** * Hook to get the auth status of the user connection with the Towns network. * @param config - Configuration options for the observable. * @returns An object containing the current AuthStatus status and boolean flags for each possible status. */ export declare const useTownsAuthStatus: (config?: ObservableConfig.FromObservable<AuthStatus>) => { /** The current AuthStatus of the user connection with the Towns network. */ status: AuthStatus; /** Whether the user connection with the Towns network is initializing. */ isInitializing: boolean; /** Whether the user connection with the Towns network is evaluating credentials. */ isEvaluatingCredentials: boolean; /** Whether the user connection with the Towns network is credentialed. */ isCredentialed: boolean; /** Whether the user connection with the Towns network is connecting to Towns. */ isConnectingToTowns: boolean; /** Whether the user connection with the Towns network is connected to Towns. */ isConnectedToTowns: boolean; /** Whether the user connection with the Towns network is disconnected. */ isDisconnected: boolean; /** Whether the user connection with the Towns network is in an error state. */ isError: boolean; }; //# sourceMappingURL=useTownsAuthStatus.d.ts.map