import type { User } from '@openfort/openfort-js'; import { type OpenfortError } from '../../../errors/base.js'; import type { OpenfortHookOptions } from '../../../types.js'; import type { EthereumUserWallet, SolanaUserWallet } from '../walletTypes.js'; import { type CreateWalletPostAuthOptions } from './useConnectToWalletPostAuth.js'; type GuestHookResult = { error?: OpenfortError; user?: User; wallet?: EthereumUserWallet | SolanaUserWallet; }; type GuestHookOptions = OpenfortHookOptions & CreateWalletPostAuthOptions; /** * Hook for guest authentication operations * * This hook manages guest user authentication, allowing users to create temporary * accounts without providing email or other credentials. Guest authentication provides * a quick way for users to get started with the application before committing to * full registration. After authentication, it automatically handles wallet connection. * * @param hookOptions - Optional configuration with callback functions and authentication options * @returns Current guest authentication state and actions * * @example * ```tsx * import { useGuestAuth } from '@openfort/react' * * function GuestSignIn() { * const { signUpGuest, isLoading, error } = useGuestAuth() * const signIn = async () => { * const result = await signUpGuest() * if (result.error) return * console.log(result.user?.id) * } * return * } * ``` */ export declare const useGuestAuth: (hookOptions?: GuestHookOptions) => { isLoading: boolean; isError: boolean; isSuccess: boolean; error: OpenfortError | null | undefined; signUpGuest: (options?: GuestHookOptions) => Promise; }; export {};