import type { W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation } from '@credo-ts/core'; import { Resolver } from 'did-resolver'; import { IVerreLogger, FailedCredential } from '../types.js'; /** * Recursively verifies the digital proof of a W3C Verifiable Presentation (VP) or Verifiable Credential (VC). * * This function checks that the input document is a valid VP or VC, verifies its proof using * the appropriate Linked Data signature suite and proof purpose, and—if it's a presentation— * recursively verifies the embedded credentials. * * @param document - A W3C Verifiable Presentation or Verifiable Credential in JSON-LD format. * @returns A promise resolving to `{ result: true }` if the proof is valid (including all nested VCs). * On failure, `result` is `false` and — when specific embedded credentials were at fault — * `failedCredentials` identifies which ones and why. */ export declare function verifySignature(document: W3cJsonLdVerifiablePresentation | W3cJsonLdVerifiableCredential, didResolver: Resolver, logger: IVerreLogger): Promise<{ result: boolean; error?: string; failedCredentials?: FailedCredential[]; }>; /** * Verifies the integrity of a given raw content string using a Subresource Integrity (SRI) digest. * * The digest is computed over the raw bytes of the content as provided, without any * transformation or canonicalization. This aligns with the SRI specification, which * requires byte-level integrity verification. * * @param {string} rawContent - The raw content string to be verified (e.g. as fetched from a URL). * @param {string} expectedDigestSRI - The expected SRI digest in the format `{algorithm}-{hash}`. * @throws {TrustError} Throws an error if the computed hash does not match the expected hash. */ export declare function verifyDigestSRI(rawContent: string, expectedDigestSRI: string, logger: IVerreLogger): void;