import type { OutOfBandDidCommService } from './domain'; import type { AgentContext } from '../../agent'; import type { InboundMessageContext } from '../../agent/models/InboundMessageContext'; import type { Key } from '../../crypto'; import type { Query } from '../../storage/StorageService'; import type { ConnectionRecord } from '../connections'; import type { HandshakeProtocol } from '../connections/models'; import { EventEmitter } from '../../agent/EventEmitter'; import { DidCommDocumentService } from '../didcomm/services/DidCommDocumentService'; import { OutOfBandState } from './domain/OutOfBandState'; import { HandshakeReuseMessage } from './messages'; import { HandshakeReuseAcceptedMessage } from './messages/HandshakeReuseAcceptedMessage'; import { OutOfBandRecord, OutOfBandRepository } from './repository'; export interface CreateFromImplicitInvitationConfig { did: string; threadId: string; handshakeProtocols: HandshakeProtocol[]; autoAcceptConnection?: boolean; recipientKey: Key; } export declare class OutOfBandService { private outOfBandRepository; private eventEmitter; private didCommDocumentService; constructor(outOfBandRepository: OutOfBandRepository, eventEmitter: EventEmitter, didCommDocumentService: DidCommDocumentService); /** * Creates an Out of Band record from a Connection/DIDExchange request started by using * a publicly resolvable DID this agent can control */ createFromImplicitInvitation(agentContext: AgentContext, config: CreateFromImplicitInvitationConfig): Promise; processHandshakeReuse(messageContext: InboundMessageContext): Promise; processHandshakeReuseAccepted(messageContext: InboundMessageContext): Promise; createHandShakeReuse(agentContext: AgentContext, outOfBandRecord: OutOfBandRecord, connectionRecord: ConnectionRecord): Promise; save(agentContext: AgentContext, outOfBandRecord: OutOfBandRecord): Promise; updateState(agentContext: AgentContext, outOfBandRecord: OutOfBandRecord, newState: OutOfBandState): Promise; emitStateChangedEvent(agentContext: AgentContext, outOfBandRecord: OutOfBandRecord, previousState: OutOfBandState | null): void; findById(agentContext: AgentContext, outOfBandRecordId: string): Promise; getById(agentContext: AgentContext, outOfBandRecordId: string): Promise; findByReceivedInvitationId(agentContext: AgentContext, receivedInvitationId: string): Promise; findByCreatedInvitationId(agentContext: AgentContext, createdInvitationId: string, threadId?: string): Promise; findCreatedByRecipientKey(agentContext: AgentContext, recipientKey: Key): Promise; getAll(agentContext: AgentContext): Promise; findAllByQuery(agentContext: AgentContext, query: Query): Promise; deleteById(agentContext: AgentContext, outOfBandId: string): Promise; /** * Extract a resolved didcomm service from an out of band invitation. * * Currently the first service that can be resolved is returned. */ getResolvedServiceForOutOfBandServices(agentContext: AgentContext, services: Array): Promise; }