UNPKG

@enclavemoney/enclave-wallet-playground

Version:

A simple playground for enclave wallet SDK

33 lines (32 loc) 958 B
import { User } from "firebase/auth"; import { SocialLoginResponse } from "./services"; export interface GoogleAuthResult { success: boolean; user?: SocialLoginResponse; error?: string; } export interface TwitterAuthResult { success: boolean; user?: SocialLoginResponse; error?: string; } /** * Sign in with Google using Firebase Auth */ export declare const signInWithGoogle: (apiKey: string) => Promise<GoogleAuthResult>; /** * Sign in with Twitter using Firebase Auth */ export declare const signInWithTwitter: (apiKey: string) => Promise<TwitterAuthResult>; /** * 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;