UNPKG

@enclavemoney/enclave-wallet-sdk

Version:

A simple enclave wallet SDK for React applications

24 lines (23 loc) 705 B
import { User } from "firebase/auth"; import { SocialLoginResponse } from "./services"; export interface GoogleAuthResult { success: boolean; user?: SocialLoginResponse; error?: string; } /** * Sign in with Google using Firebase Auth */ export declare const signInWithGoogle: (apiKey: string) => Promise<GoogleAuthResult>; /** * Sign out the current user */ export declare const signOutUser: () => Promise<boolean>; /** * Get the current authenticated user */ export declare const getCurrentUser: () => User | null; /** * Listen to authentication state changes */ export declare const onAuthStateChange: (callback: (user: User | null) => void) => import("@firebase/util").Unsubscribe;