/** * Shared crypto-service dispatch. * * Presentation proofs, credential proofs, and status-list-credential proofs * all resolve through this helper against the same `CryptoService[]`. * Callers own their problem types: the helper reports a neutral outcome so * a bad signature on a credential and a bad signature on its status list * credential stay distinct diagnostics. * * This is orchestration over injected adapters, not an adapter itself -- * it lives at the `src/` root alongside `run-suites.ts` and * `fold-results.ts`, not under `src/services/`. */ import type { CryptoService, CryptoVerifyOptions } from './types/crypto-service.js'; import type { ProblemDetail } from './types/problem-detail.js'; import type { VerificationSubject } from './types/subject.js'; /** * Outcome of dispatching a proof to the registered {@link CryptoService}s. * * Deliberately *not* a `ProblemDetail`-bearing type: the two callers * (`signature-check` and `bitstring-status-check`) describe the same * underlying failures with different problem types, because a bad signature * on the credential and a bad signature on its status list credential are * different things to the consumer reading the result. Sharing the dispatch * must not homogenize the diagnostics. * * `threw` carries the thrown value plus a ready-to-display `message` so * callers do not each re-derive it. */ export type CryptoDispatchResult = { kind: 'verified'; message?: string; } | { kind: 'rejected'; problems: ProblemDetail[]; } | { kind: 'no-service'; } | { kind: 'threw'; error: unknown; message: string; }; /** * Select the first {@link CryptoService} that can verify `subject` and invoke * it. Presentations route to `verifyPresentation`, credentials to * `verifyCredential`; a subject carrying both prefers the presentation, which * matches the pre-extraction behavior of `signature-check`. */ export declare function dispatchProofVerification({ services, subject, options }: { services: CryptoService[]; subject: VerificationSubject; options: CryptoVerifyOptions; }): Promise; //# sourceMappingURL=crypto-dispatch.d.ts.map