import type { AuthUrlParams, CallbackServer, ExchangeParams, TokenSet, OAuthDiscoveredEndpoints, ClientRegistrationResponse } from "./types.js"; export declare function generateCodeVerifier(): string; export declare function generateCodeChallenge(verifier: string): Promise; /** * Discover OAuth endpoints from the MCP server using well-known metadata. * * Flow: * 1. GET /.well-known/oauth-protected-resource → learn authorization server URL * 2. GET /.well-known/oauth-authorization-server → get authorize, token, registration endpoints */ export declare function discoverOAuthEndpoints(serverUrl: string): Promise; /** * Register the OpenClaw plugin as an OAuth client with the Adspirer server. * Returns the server-assigned client_id. */ export declare function registerOAuthClient(registrationEndpoint: string, redirectUri: string): Promise; export declare function buildAuthUrl(params: AuthUrlParams): string; export declare function exchangeCode(params: ExchangeParams): Promise; export declare function refreshAccessToken(tokenEndpoint: string, refreshToken: string, clientId: string): Promise; export declare function startLocalCallbackServer(port?: number): Promise; //# sourceMappingURL=auth.d.ts.map