import { VorionError } from '../common/errors.js';
import { type PairwiseDIDConfig, type PairwiseDerivation, type DataClassification } from './types.js';
/**
 * Pairwise DID error
 */
export declare class PairwiseDIDError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Pairwise DID Service for privacy-preserving identity management
 *
 * @example
 * ```typescript
 * const pairwise = new PairwiseDIDService({
 *   requiredForDataTypes: ['personal', 'sensitive', 'regulated'],
 *   derivationAlgorithm: 'hkdf',
 *   saltLength: 32,
 * });
 *
 * // Derive a pairwise DID
 * const pairwiseDid = await pairwise.derivePairwiseDID(
 *   'did:car:a3i:vorion:agent-master',
 *   'did:web:api.example.com'
 * );
 *
 * // Validate a pairwise DID
 * const isValid = await pairwise.validatePairwiseDID(
 *   pairwiseDid,
 *   'did:car:a3i:vorion:agent-master',
 *   'did:web:api.example.com',
 *   salt
 * );
 * ```
 */
export declare class PairwiseDIDService {
    private config;
    private registry;
    /**
     * Create a new pairwise DID service
     *
     * @param config - Pairwise DID configuration
     */
    constructor(config: Partial<PairwiseDIDConfig>);
    /**
     * Derive a pairwise DID for a relying party relationship
     *
     * The derivation is deterministic given the same inputs:
     * - Master DID
     * - Relying party DID
     * - Salt (generated per relationship)
     *
     * @param masterDID - Agent's root/master DID
     * @param relyingPartyDID - Service's DID
     * @param salt - Optional salt (generated if not provided)
     * @returns Pairwise DID string
     */
    derivePairwiseDID(masterDID: string, relyingPartyDID: string, salt?: string): Promise<string>;
    /**
     * Check if pairwise DID is required for a data type
     *
     * @param dataType - Data classification
     * @returns Whether pairwise DID is required
     */
    isRequired(dataType: DataClassification): boolean;
    /**
     * Validate a pairwise DID
     *
     * Re-derives the DID using the provided parameters and compares
     * with the given pairwise DID.
     *
     * @param pairwiseDID - Pairwise DID to validate
     * @param masterDID - Agent's root/master DID
     * @param relyingPartyDID - Service's DID
     * @param salt - Salt used in derivation
     * @returns Whether the pairwise DID is valid
     */
    validatePairwiseDID(pairwiseDID: string, masterDID: string, relyingPartyDID: string, salt: string): Promise<boolean>;
    /**
     * Generate a cryptographically secure salt
     *
     * @returns Base64-encoded salt
     */
    generateSalt(): string;
    /**
     * Get a stored derivation for a relationship
     *
     * @param masterDID - Agent's root/master DID
     * @param relyingPartyDID - Service's DID
     * @returns Derivation record if exists
     */
    getDerivation(masterDID: string, relyingPartyDID: string): PairwiseDerivation | undefined;
    /**
     * Store a derivation (e.g., loaded from database)
     *
     * @param derivation - Derivation record to store
     */
    storeDerivation(derivation: PairwiseDerivation): void;
    /**
     * List all derivations for a master DID
     *
     * @param masterDID - Agent's root/master DID
     * @returns List of derivations
     */
    listDerivations(masterDID: string): PairwiseDerivation[];
    /**
     * Revoke a pairwise relationship
     *
     * @param masterDID - Agent's root/master DID
     * @param relyingPartyDID - Service's DID
     * @returns Whether revocation was successful
     */
    revokeRelationship(masterDID: string, relyingPartyDID: string): boolean;
    /**
     * Get current configuration
     */
    getConfig(): Readonly<PairwiseDIDConfig>;
    /**
     * Check if a data type should use pairwise DID based on classification
     *
     * @param dataType - Data classification string
     * @returns Whether pairwise is required and the classification
     */
    getRequirement(dataType: string): {
        required: boolean;
        classification: DataClassification | null;
    };
}
/**
 * Create a pairwise DID service with default configuration for CAR ID
 */
export declare function createPairwiseDIDService(config?: Partial<PairwiseDIDConfig>): PairwiseDIDService;
//# sourceMappingURL=pairwise-did.d.ts.map