import { JSONWebKeySet, JWSHeaderParameters, FlattenedJWSInput, CryptoKey } from '../types.d.cjs';

declare const customFetch: unique symbol;
type FetchImplementation = (url: string, options: {
    headers: Headers;
    method: 'GET';
    redirect: 'manual';
    signal: AbortSignal;
}) => Promise<Response>;
declare const jwksCache: unique symbol;
interface RemoteJWKSetOptions {
    timeoutDuration?: number;
    cooldownDuration?: number;
    cacheMaxAge?: number | typeof Infinity;
    headers?: Record<string, string>;
    [jwksCache]?: JWKSCacheInput;
    [customFetch]?: FetchImplementation;
}
interface ExportedJWKSCache {
    jwks: JSONWebKeySet;
    uat: number;
}
type JWKSCacheInput = ExportedJWKSCache | Record<string, never>;
declare function createRemoteJWKSet(url: URL, options?: RemoteJWKSetOptions): {
    (protectedHeader?: JWSHeaderParameters, token?: FlattenedJWSInput): Promise<CryptoKey>;
    coolingDown: boolean;
    fresh: boolean;
    reloading: boolean;
    reload: () => Promise<void>;
    jwks: () => JSONWebKeySet | undefined;
};

export { type ExportedJWKSCache, type FetchImplementation, type JWKSCacheInput, type RemoteJWKSetOptions, createRemoteJWKSet, customFetch, jwksCache };
