/**
 * Facade for audit chain verification and trust evaluation.
 *
 * Composes AuditChainVerifier (chain walking) and TrustEvaluationService
 * (signed evidence evaluation) into a single service interface consumed
 * by WarpRuntime.
 *
 * @module domain/services/audit/AuditVerifierService
 */
import type CodecPort from '../../../ports/CodecPort.ts';
import type CommitPort from '../../../ports/CommitPort.ts';
import type RefPort from '../../../ports/RefPort.ts';
import type BlobPort from '../../../ports/BlobPort.ts';
import type TreePort from '../../../ports/TreePort.ts';
import type LoggerPort from '../../../ports/LoggerPort.ts';
import type TrustChainPort from '../../../ports/TrustChainPort.ts';
import { type ChainResult } from './AuditChainVerifier.ts';
import { type TrustEvaluationOptions } from './TrustEvaluationService.ts';
import type { TrustAssessment } from '../../trust/TrustAssessment.ts';
type TrustWarning = {
    code: string;
    message: string;
    sources: string[];
};
type VerifyResult = {
    graph: string;
    verifiedAt: string;
    summary: {
        total: number;
        valid: number;
        partial: number;
        invalid: number;
    };
    chains: ChainResult[];
    trustWarning: TrustWarning | null;
};
type Persistence = CommitPort & RefPort & BlobPort & TreePort;
type TrustCrypto = {
    verifySignature: (params: {
        algorithm: string;
        publicKeyBase64: string;
        signatureBase64: string;
        payload: Uint8Array;
    }) => boolean;
    computeKeyFingerprint: (publicKeyBase64: string) => string;
};
export default class AuditVerifierService {
    private readonly _chainVerifier;
    private readonly _trustService;
    private readonly _persistence;
    readonly logger: LoggerPort | null;
    constructor(opts: {
        persistence: Persistence;
        codec: CodecPort;
        logger?: LoggerPort;
        trustCrypto?: TrustCrypto;
        trustChain?: TrustChainPort;
    });
    /** Verifies all audit chains for a graph. */
    verifyAll(graphName: string, options?: {
        since?: string;
        trustWarning?: TrustWarning | null;
        verifiedAt?: string;
    }): Promise<VerifyResult>;
    private _verifyAllChains;
    private _buildVerifyResult;
    /** Verifies a single writer's audit chain. */
    verifyChain(graphName: string, writerId: string, options?: {
        since?: string;
    }): Promise<ChainResult>;
    /** Evaluates trust for all writers of a graph using signed evidence. */
    evaluateTrust(graphName: string, options?: TrustEvaluationOptions): Promise<TrustAssessment>;
    private _listWriterIds;
}
export type { ChainResult, TrustWarning, VerifyResult };
