UNPKG

@nomyx/gun-sync

Version:

A lightweight, powerful library for synchronizing application state in real-time using Gun.js.

18 lines (17 loc) 496 B
import { IGunInstance } from 'gun'; interface UserState { isLoggedIn: boolean; isLoading: boolean; user: any; error?: string; } interface UserActions { signUp: (alias: string, pass: string) => Promise<void>; signIn: (alias: string, pass: string) => Promise<void>; signOut: () => void; } /** * A hook to manage the full user authentication lifecycle with Gun.js. */ export declare function useGunUser(gunInstance?: IGunInstance): [UserState, UserActions]; export {};