import { DIDDocument } from 'did-resolver'; import { TrustResolutionMetadata, TrustErrorCode, TrustResolutionOutcome, FailedCredential } from '../types.js'; /** * Custom error class for handling trust-related errors. * Extends the standard `Error` class and includes metadata for detailed resolution information. */ export declare class TrustError extends Error { metadata: TrustResolutionMetadata; failedCredentials?: FailedCredential[]; constructor(code: TrustErrorCode, message: string, failedCredentials?: FailedCredential[]); } /** * Handles trust errors and ensures metadata is properly included in the response. * * @param {unknown} error - The error to be processed. * @param {DIDDocument} [didDocument] - An optional DID Document associated with the error. * @returns {object} An object containing the `didDocument` (if provided) and the error metadata. */ export declare function handleTrustError(error: unknown, didDocument?: DIDDocument): { failedCredentials?: FailedCredential[] | undefined; didDocument: DIDDocument | undefined; outcome: TrustResolutionOutcome; verified: boolean; metadata: TrustResolutionMetadata; };