/** * Detached JWS signatures over an evidence package root and anchor (ES256 or * RS256). The signed payload is the RFC 8785 form of * `{"anchor": , "root": }`. */ import { type KeyObject } from 'node:crypto'; export declare const SIGNATURE_TYPE = "grantex-evidence-package+jws"; export interface EvidenceSignature { alg: 'ES256' | 'RS256'; jws: string; kid: string; } /** The bytes a package signature covers. */ export declare function signedPayload(root: string, anchorHash: string | null): Buffer; /** The JWS signing input for a protected header. */ export declare function signingInput(headerB64: string, root: string, anchorHash: string | null): Buffer; /** The protected header, base64url-encoded, that every package signature uses. */ export declare function protectedHeader(alg: 'ES256' | 'RS256', kid: string): string; /** A `signature` member: a detached JWS over the root and anchor hash (ES256 for P-256, RS256 for RSA of 2048 bits or more). */ export declare function signRoot(root: string, privateKey: KeyObject, kid: string, anchorHash?: string | null): EvidenceSignature; /** Verify a `signature` member against the root and anchor hash with keys from a JWKS. */ export declare function verifySignature(signature: Record, root: string, anchorHash: string | null, jwks: unknown): void; //# sourceMappingURL=signature.d.ts.map