export type BundleFindingCode = "BUNDLE_MANIFEST_INVALID" | "BUNDLE_VERSION_UNKNOWN" | "BUNDLE_FILE_MISSING" | "BUNDLE_FILE_DIGEST_MISMATCH" | "BUNDLE_FILE_SIZE_MISMATCH" | "BUNDLE_CHAIN_BROKEN" | "BUNDLE_CHAIN_HEAD_MISMATCH" | "BUNDLE_SIGNATURE_INVALID"; export interface BundleFinding { readonly code: BundleFindingCode; /** The file or stream the finding is about, when it is about one. */ readonly subject: string | null; readonly expected?: string | number; readonly found?: string | number; } /** * What a verified bundle establishes. `origin` is the distinction that * matters: a bundle with no signature is internally consistent and says * nothing about who made it, and a reader who conflates the two has a * stronger belief than the evidence supports. */ export interface BundleVerification { readonly ok: boolean; readonly establishes: "INTERNAL_CONSISTENCY" | "ORIGIN_AND_CONSISTENCY"; readonly exportedAt: string | null; readonly exportedBy: string | null; readonly files: number; /** Lines the process no longer held, summed across the streams that report it. */ readonly dropped: number; readonly chains: Readonly>; readonly findings: readonly BundleFinding[]; } export interface BundleSource { /** The bundle's files by name; absent returns null rather than throwing. */ read(name: string): string | null; /** * Verifies the detached JWS over the manifest bytes. Absent means no * verifier was supplied, which is not the same as a bundle without a * signature and is reported as such. */ verifySignature?(signature: string, manifest: string): Promise; } /** * Verifies an evidence bundle offline: it recomputes every file's digest * against the manifest, walks both chained streams, checks that each stream's * last line is the head the manifest claims, and verifies the signature when * a bundle carries one and a verifier was supplied. * * It needs no key, no service and no network to do the first three. That is * the point of a bundle: an auditor holding the files can establish what the * files say without asking the party that produced them. */ export declare function verifyEvidenceBundle(source: BundleSource): Promise; //# sourceMappingURL=VerifyEvidenceBundle.d.ts.map