import type { ProofProtocol } from './ProofProtocol'; import type { CreateProofProposalOptions, CreateProofRequestOptions, DeleteProofOptions, GetProofFormatDataReturn, CreateProofProblemReportOptions, ProofProtocolMsgReturnType, AcceptPresentationOptions, AcceptProofProposalOptions, AcceptProofRequestOptions, GetCredentialsForRequestOptions, GetCredentialsForRequestReturn, NegotiateProofProposalOptions, NegotiateProofRequestOptions, SelectCredentialsForRequestOptions, SelectCredentialsForRequestReturn } from './ProofProtocolOptions'; import type { AgentMessage } from '../../../agent/AgentMessage'; import type { FeatureRegistry } from '../../../agent/FeatureRegistry'; import type { AgentContext } from '../../../agent/context/AgentContext'; import type { InboundMessageContext } from '../../../agent/models/InboundMessageContext'; import type { DependencyManager } from '../../../plugins'; import type { Query } from '../../../storage/StorageService'; import type { ProblemReportMessage } from '../../problem-reports'; import type { ExtractProofFormats, ProofFormatService } from '../formats'; import type { ProofExchangeRecord } from '../repository'; import { ProofState } from '../models/ProofState'; export declare abstract class BaseProofProtocol implements ProofProtocol { abstract readonly version: string; abstract register(dependencyManager: DependencyManager, featureRegistry: FeatureRegistry): void; abstract createProposal(agentContext: AgentContext, options: CreateProofProposalOptions): Promise>; abstract processProposal(messageContext: InboundMessageContext): Promise; abstract acceptProposal(agentContext: AgentContext, options: AcceptProofProposalOptions): Promise>; abstract negotiateProposal(agentContext: AgentContext, options: NegotiateProofProposalOptions): Promise>; abstract createRequest(agentContext: AgentContext, options: CreateProofRequestOptions): Promise>; abstract processRequest(messageContext: InboundMessageContext): Promise; abstract acceptRequest(agentContext: AgentContext, options: AcceptProofRequestOptions): Promise>; abstract negotiateRequest(agentContext: AgentContext, options: NegotiateProofRequestOptions): Promise>; abstract getCredentialsForRequest(agentContext: AgentContext, options: GetCredentialsForRequestOptions): Promise>; abstract selectCredentialsForRequest(agentContext: AgentContext, options: SelectCredentialsForRequestOptions): Promise>; abstract processPresentation(messageContext: InboundMessageContext): Promise; abstract acceptPresentation(agentContext: AgentContext, options: AcceptPresentationOptions): Promise>; abstract processAck(messageContext: InboundMessageContext): Promise; abstract createProblemReport(agentContext: AgentContext, options: CreateProofProblemReportOptions): Promise>; abstract findProposalMessage(agentContext: AgentContext, proofExchangeId: string): Promise; abstract findRequestMessage(agentContext: AgentContext, proofExchangeId: string): Promise; abstract findPresentationMessage(agentContext: AgentContext, proofExchangeId: string): Promise; abstract getFormatData(agentContext: AgentContext, proofExchangeId: string): Promise>>; processProblemReport(messageContext: InboundMessageContext): Promise; /** * Update the record to a new state and emit an state changed event. Also updates the record * in storage. * * @param proofRecord The proof record to update the state for * @param newState The state to update to * */ updateState(agentContext: AgentContext, proofRecord: ProofExchangeRecord, newState: ProofState): Promise; protected emitStateChangedEvent(agentContext: AgentContext, proofRecord: ProofExchangeRecord, previousState: ProofState | null): void; /** * Retrieve a proof record by id * * @param proofRecordId The proof record id * @throws {RecordNotFoundError} If no record is found * @return The proof record * */ getById(agentContext: AgentContext, proofRecordId: string): Promise; /** * Retrieve all proof records * * @returns List containing all proof records */ getAll(agentContext: AgentContext): Promise; findAllByQuery(agentContext: AgentContext, query: Query): Promise; /** * Find a proof record by id * * @param proofRecordId the proof record id * @returns The proof record or null if not found */ findById(agentContext: AgentContext, proofRecordId: string): Promise; delete(agentContext: AgentContext, proofRecord: ProofExchangeRecord, options?: DeleteProofOptions): Promise; /** * Retrieve a proof record by connection id and thread id * * @param connectionId The connection id * @param threadId The thread id * @throws {RecordNotFoundError} If no record is found * @throws {RecordDuplicateError} If multiple records are found * @returns The proof record */ getByThreadAndConnectionId(agentContext: AgentContext, threadId: string, connectionId?: string): Promise; /** * Find a proof record by connection id and thread id, returns null if not found * * @param connectionId The connection id * @param threadId The thread id * @returns The proof record */ findByThreadAndConnectionId(agentContext: AgentContext, threadId: string, connectionId?: string): Promise; update(agentContext: AgentContext, proofRecord: ProofExchangeRecord): Promise; }