import type { IComponent, IError } from "@twin.org/core"; import type { ITrustVerificationInfo } from "./ITrustVerificationInfo.js"; /** * Interface describing a trust verifier component. */ export interface ITrustVerifier extends IComponent { /** * Verify a payload by checking the validity of its structure and content. * @param payload The payload to verify. * @param info Information extracted from previous verifiers and to be added by this verifier. * @param info.identity The identity associated with the payload. * @param errors Array to collect verification errors. * @returns Whether the payload is verified, returns undefined if payload was not processed. */ verify(payload: unknown, info: ITrustVerificationInfo, errors: IError[]): Promise; }