import type { ProxySigningConfig } from './ProxyConfig';
export type SigningHeaders = Headers | Record<string, string | undefined>;
export type SigningVerificationResult = {
    ok: true;
} | {
    ok: false;
    status: number;
    code: string;
    message: string;
};
export type SigningCredentials = Readonly<{
    keyId: string;
    secret: string;
}>;
type VerifySigningParams = {
    method: string;
    url: string | URL;
    body: string | Uint8Array;
    headers: SigningHeaders;
};
type VerifySigningConfigParams = VerifySigningParams & {
    signing: ProxySigningConfig;
};
type VerifySigningProviderParams = VerifySigningParams & {
    windowMs: number;
    getSecretForKeyId: (keyId: string) => string | undefined | Promise<string | undefined>;
    verifyNonce?: (keyId: string, nonce: string, ttlMs: number) => Promise<boolean>;
};
type SigningServiceApi = Readonly<{
    normalizeConfig: (signing: ProxySigningConfig) => ProxySigningConfig;
    shouldVerify: (signing: ProxySigningConfig, headers: SigningHeaders) => boolean;
    verify: (params: VerifySigningConfigParams) => Promise<SigningVerificationResult>;
    verifyWithKeyProvider: (params: VerifySigningProviderParams) => Promise<SigningVerificationResult>;
}>;
export declare const normalizeSigningConfig: (signing: ProxySigningConfig) => ProxySigningConfig;
export declare const normalizeSigningCredentials: (input: SigningCredentials) => SigningCredentials;
export declare const SigningService: SigningServiceApi;
export {};
//# sourceMappingURL=SigningService.d.ts.map