import { AppClient } from '@farcaster/auth-client'; import { AuthClientError } from '@farcaster/auth-client'; import { JSX as JSX_2 } from 'react/jsx-runtime'; import { Provider } from '@farcaster/auth-client'; import QRCodeUtil from 'qrcode'; import { ReactNode } from 'react'; import { StatusAPIResponse } from '@farcaster/auth-client'; declare interface AuthKitConfig { relay?: string; domain?: string; siweUri?: string; rpcUrl?: string; redirectUrl?: string; version?: string; provider?: Provider; } export declare function AuthKitProvider({ config, children, }: { config: AuthKitConfig; children: ReactNode; }): JSX_2.Element; export declare function Demo(): JSX_2.Element; declare interface Profile { fid?: number; pfpUrl?: string; username?: string; displayName?: string; bio?: string; custody?: `0x${string}`; verifications?: string[]; } declare type Props = { ecl?: QRCodeUtil.QRCodeErrorCorrectionLevel; logoUrl?: string; logoMargin?: number; logoSize?: number; size?: number; uri: string; }; export declare function QRCode({ ecl, size: sizeProp, uri }: Props): JSX_2.Element; export declare function SignInButton({ debug, hideSignOut, onSignOut, ...signInArgs }: SignInButtonProps): JSX_2.Element; declare type SignInButtonProps = UseSignInArgs & { onSignOut?: () => void; debug?: boolean; hideSignOut?: boolean; }; declare interface SignInMessage { message?: string; signature?: string; } export declare function useAppClient(): AppClient | undefined; export declare function useCreateChannel({ nonce: customNonce, notBefore, expirationTime, requestId, onSuccess, onError, redirectUrl, }: UseCreateChannelArgs): { connect: () => Promise; reconnect: () => void; reset: () => void; isSuccess: boolean; isError: boolean; error: AuthClientError | undefined; data: { channelToken: string | undefined; url: string | undefined; nonce: string | undefined; }; }; export declare interface UseCreateChannelArgs { nonce?: string | (() => Promise); notBefore?: string; expirationTime?: string; requestId?: string; redirectUrl?: string; onSuccess?: (createChannelData: UseCreateChannelData) => void; onError?: (error?: AuthClientError) => void; } export declare interface UseCreateChannelData { channelToken?: string; url?: string; nonce?: string; } export declare function useProfile(): { isAuthenticated: boolean; profile: Profile; }; export declare function useSignIn(args: UseSignInArgs): { signIn: () => void; signOut: () => void; connect: () => Promise; reconnect: () => void; isConnected: boolean; isSuccess: boolean; isPolling: boolean; isError: boolean; error: AuthClientError | undefined; channelToken: string | undefined; url: string | undefined; appClient: AppClient | undefined; data: StatusAPIResponse | undefined; validSignature: boolean; }; export declare type UseSignInArgs = Omit & { timeout?: number; interval?: number; onSuccess?: (res: UseSignInData) => void; onStatusResponse?: (statusData: UseWatchStatusData) => void; onError?: (error?: AuthClientError) => void; }; export declare type UseSignInData = StatusAPIResponse; export declare function useSignInMessage(): SignInMessage; export declare function useVerifySignInMessage({ nonce, domain, message, signature, onSuccess, onError, }: UseVerifySignInMessageArgs): { isSuccess: boolean; isError: boolean; error: AuthClientError | undefined; data: { message: string | undefined; signature: `0x${string}` | undefined; validSignature: boolean; }; }; export declare interface UseVerifySignInMessageArgs { nonce?: string; domain?: string; message?: string; signature?: `0x${string}`; onSuccess?: (statusData: UseVerifySignInMessageData) => void; onError?: (error?: AuthClientError) => void; } export declare interface UseVerifySignInMessageData { message?: string; signature?: `0x${string}`; validSignature: boolean; } export declare function useWatchStatus(args: UseWatchStatusArgs): { watch: () => void; isSuccess: boolean; isPolling: boolean; isError: boolean; error: AuthClientError | undefined; data: StatusAPIResponse | undefined; }; export declare interface UseWatchStatusArgs { channelToken?: string; timeout?: number; interval?: number; onSuccess?: (statusData: UseWatchStatusData) => void; onError?: (error?: AuthClientError) => void; onResponse?: (statusData: UseWatchStatusData) => void; } export declare type UseWatchStatusData = StatusAPIResponse; export * from "@farcaster/auth-client"; export { }