import { GenericResponse } from '../core/resreq'; import { KwilSigner } from '../core/kwilSigner'; import { AuthSuccess, AuthenticatedBody, KGWAuthInfo, LogoutResponse } from '../core/auth'; import { BytesEncodingStatus, EnvironmentType } from '../core/enums'; import { AuthBody } from '../core/signature'; import { CallBody } from '../core/action'; interface AuthClient { getAuthenticateClient(): Promise>; postAuthenticateClient(body: AuthenticatedBody): Promise>>; logoutClient(identifier?: Uint8Array): Promise>>; challengeClient(): Promise>; } export declare class Auth { private authClient; private kwilProvider; private chainId; constructor(authClient: AuthClient, kwilProvider: string, chainId: string); /** * Authenticates a user with the Kwil Gateway (KGW). This is required to execute view actions with the `@kgw(authn='true')` annotation. * * This method should only be used if your Kwil Network is using the Kwil Gateway. * * @param {KwilSigner} signer - The signer for the authentication. * @returns A promise that resolves to the authentication success or failure. */ authenticateKGW(signer: KwilSigner): Promise>>; /** * Authenticates a user in private mode. * * This method should only be used if your Kwil Network is in private mode. * * @param {KwilSigner} signer - The signer for the authentication. * @param {CallBody} callBody - The body of the action to send. This should use the `ActionBody` interface. * @returns A promise that resolves a privateSignature => privateSignature = {sig: string (Base64), type: AnySignatureType} */ authenticatePrivateMode(callBody: CallBody, signer: KwilSigner): Promise; logoutKGW(signer?: KwilSigner): Promise>>; } export {};