import type { Aioha } from '@aioha/aioha';
import type { HiveAuthResult, LoggedInUser } from '../types/auth';
/**
* Hook for programmatic authentication
* Provides easy-to-use methods for programmatic login without UI components
*
* @param aioha - The Aioha instance
* @returns Object with programmatic auth methods
*
* @example
* ```typescript
* import { useProgrammaticAuth } from 'hive-authentication';
*
* function MyComponent() {
* const { loginWithPrivateKey, logout, logoutAll, getCurrentUser } = useProgrammaticAuth(aioha);
*
* const handleLogin = async () => {
* try {
* const user = await loginWithPrivateKey('username', '5J...');
* console.log('Logged in:', user.username);
* } catch (error) {
* console.error('Login failed:', error.message);
* }
* };
*
* const handleLogout = async () => {
* try {
* await logout();
* console.log('Logged out');
* } catch (error) {
* console.error('Logout failed:', error.message);
* }
* };
*
* const handleLogoutAll = async () => {
* try {
* await logoutAll();
* console.log('All users logged out');
* } catch (error) {
* console.error('Logout all failed:', error.message);
* }
* };
*
* return (
* <>
*
*
*
* >
* );
* }
* ```
*/
export declare function useProgrammaticAuth(aioha: Aioha): {
loginWithPrivateKey: (username: string, privatePostingKey: string, serverCallback?: (hiveResult: HiveAuthResult) => Promise) => Promise;
logout: () => Promise;
logoutAll: () => Promise;
};