/** * VC-JWT Signature Verifier * * A {@link CapabilityVCSignatureVerifier} (the pluggable signature hook accepted * by {@link verifyCapabilities}) that cryptographically verifies a capability * attestation presented as a compact VC-JWT (JWS). * * Flow: * 1. If no compact JWS was supplied (object-form VC) → reject. There is * nothing to verify cryptographically. * 2. Resolve the credential's `issuer` DID via a combined, pluggable resolver * (did:key built in, plus the did:web resolver). * 3. Select the verification method whose id matches the JWS header `kid`. * 4. Import its `publicKeyJwk` as an EdDSA key and verify the compact JWS. * * The verifier never throws — every failure path returns * `{ valid: false, reason }` so it composes cleanly inside the validator's * per-attestation loop. * * @see ./validate-level2.ts — the validator this plugs into. */ import { type DidWebFetch } from '../delegation/did-web-resolver.js'; import type { DIDResolver } from '../delegation/vc-verifier.js'; import type { CapabilityVCSignatureVerifier } from './validate-level2.js'; /** Options for {@link createVcJwtSignatureVerifier}. */ export interface VcJwtVerifierOptions { /** * DID resolver used to fetch the issuer's verification keys. Defaults to a * combined did:key + did:web resolver (see {@link createCombinedDidResolver}). */ didResolver?: DIDResolver; /** * Pluggable fetch passed to the default did:web resolver. Ignored when a * `didResolver` is supplied. Defaults to the global `fetch`. */ fetch?: DidWebFetch; } /** * Create a DID resolver that dispatches by method: did:key is resolved locally, * did:web is fetched over HTTPS, and every other method resolves to `null`. * * @param options - Optional pluggable fetch for the did:web branch. */ export declare function createCombinedDidResolver(options?: { fetch?: DidWebFetch; }): DIDResolver; /** * Create a VC-JWT signature verifier suitable for * {@link verifyCapabilities}'s `signatureVerifier` option. * * @param options - DID resolver / fetch overrides. * @returns A `(vc, rawJwt) => Promise<{ valid; reason? }>` function. */ export declare function createVcJwtSignatureVerifier(options?: VcJwtVerifierOptions): CapabilityVCSignatureVerifier; //# sourceMappingURL=vc-jwt-verifier.d.ts.map