import type { EventEmitter } from '../../../agent/EventEmitter'; import type { CredentialRepository } from '../repository'; import type { CredentialFormat } from './CredentialFormat'; import type { FormatCreateProposalOptions, FormatCreateProposalReturn, FormatProcessOptions, FormatCreateOfferOptions, FormatCreateOfferReturn, FormatCreateRequestOptions, FormatCreateReturn, FormatAcceptRequestOptions, FormatAcceptOfferOptions, FormatAcceptProposalOptions, FormatAutoRespondCredentialOptions, FormatAutoRespondOfferOptions, FormatAutoRespondProposalOptions, FormatAutoRespondRequestOptions } from './CredentialFormatServiceOptions'; import { Attachment } from '../../../decorators/attachment/Attachment'; export declare abstract class CredentialFormatService { protected credentialRepository: CredentialRepository; protected eventEmitter: EventEmitter; constructor(credentialRepository: CredentialRepository, eventEmitter: EventEmitter); abstract readonly formatKey: CF['formatKey']; abstract readonly credentialRecordType: CF['credentialRecordType']; abstract createProposal(options: FormatCreateProposalOptions): Promise; abstract processProposal(options: FormatProcessOptions): Promise; abstract acceptProposal(options: FormatAcceptProposalOptions): Promise; abstract createOffer(options: FormatCreateOfferOptions): Promise; abstract processOffer(options: FormatProcessOptions): Promise; abstract acceptOffer(options: FormatAcceptOfferOptions): Promise; abstract createRequest(options: FormatCreateRequestOptions): Promise; abstract processRequest(options: FormatProcessOptions): Promise; abstract acceptRequest(options: FormatAcceptRequestOptions): Promise; abstract processCredential(options: FormatProcessOptions): Promise; abstract shouldAutoRespondToProposal(options: FormatAutoRespondProposalOptions): boolean; abstract shouldAutoRespondToOffer(options: FormatAutoRespondOfferOptions): boolean; abstract shouldAutoRespondToRequest(options: FormatAutoRespondRequestOptions): boolean; abstract shouldAutoRespondToCredential(options: FormatAutoRespondCredentialOptions): boolean; abstract deleteCredentialById(credentialId: string): Promise; abstract supportsFormat(format: string): boolean; /** * Returns an object of type {@link Attachment} for use in credential exchange messages. * It looks up the correct format identifier and encodes the data as a base64 attachment. * * @param data The data to include in the attach object * @param id the attach id from the formats component of the message * @returns attachment to the credential proposal */ protected getFormatData(data: unknown, id: string): Attachment; }