import { UseAuthReturn } from './useAuth'; import { UseCantonReturn } from './useCanton'; import { UseAPIReturn } from './useAPI'; /** * Return type for useSupa hook */ export interface UseSupaReturn { /** Authentication methods and user state */ auth: UseAuthReturn; /** Canton Network operations and wallet management */ canton: UseCantonReturn; /** Backend API methods for data access */ api: UseAPIReturn; /** Automated onboarding flow (login → create wallet → register Canton) */ onboard: () => Promise; /** Complete logout (Privy + clear all SDK state) */ logout: () => Promise; } /** * Main hook for accessing all Supa SDK features * Combines authentication, Canton Network, and API functionality * * Note: Canton state (isRegistered, cantonUser, etc.) is shared across * all components via CantonProvider. No duplicate registration will occur. * * @returns Combined SDK functionality with convenience methods * * @example * Basic usage * ```tsx * function Dashboard() { * const { auth, canton, api, logout } = useSupa(); * * if (!auth.authenticated) { * return ; * } * * return ( *
*

User: {auth.user?.email?.address}

* * *
* ); * } * ``` * * @example * Using automated onboarding * ```tsx * function OnboardButton() { * const { onboard, canton } = useSupa(); * * return ( * * ); * } * ``` */ export declare const useSupa: () => UseSupaReturn;