import { type LightconeHttp } from "../http"; import type { AuthCredentials, LinkedIdentityType, RegisterPrivyRequest, SessionResponse } from "./index"; /** Bounded ownership conflicts safe for client recovery guidance. */ export type RegisterPrivyConflict = { code: "IDENTITY_OWNED_BY_ANOTHER_ACCOUNT"; existingMethod?: LinkedIdentityType; } | { code: "IDENTITIES_OWNED_BY_MULTIPLE_ACCOUNTS"; } | { code: "WALLET_OWNED_BY_ANOTHER_ACCOUNT"; existingMethod?: LinkedIdentityType; }; /** Classify only stable register-or-sync ownership rejection codes. */ export declare function classifyRegisterPrivyConflict(error: unknown): RegisterPrivyConflict | undefined; interface AuthState { getCredentials(): AuthCredentials | undefined; setCredentials(credentials: AuthCredentials | undefined): void; clearCaches(): Promise; } interface ClientContext { http: LightconeHttp; authState: AuthState; } export declare class Auth { private readonly client; constructor(client: ClientContext); getNonce(): Promise; loginWithMessage(message: string, signatureBs58: string, pubkeyBytes: Uint8Array, useEmbeddedWallet?: boolean): Promise; checkSession(): Promise; /** * Logout — clears the server-side cookie, internal token, and credentials. * * Local state is cleared even when the server call fails — the caller asked * to be signed out locally regardless — but the failure is then rethrown: * callers gating security decisions on teardown (e.g. whether an app may * restart an authenticated transport) must be able to see that the * server-side cookie may still be valid. A 401 counts as success: it means * "already logged out". */ logout(): Promise; disconnectX(): Promise; /** Create or synchronize a Privy Account and install the resulting session. */ registerPrivy(request: RegisterPrivyRequest): Promise; /** Persist an account-wide max-slippage preference strictly below 10%. */ updateMaxSlippagePreference(maxSlippagePreference: string): Promise; connectXUrl(): string; credentials(): AuthCredentials | undefined; isAuthenticated(): boolean; } export {}; //# sourceMappingURL=client.d.ts.map