import type { DependencyManager } from '../../plugins'; import type { Key } from '../dids'; import type { OutOfBandRecord } from '../oob/repository'; import type { ConnectionRecord } from './repository/ConnectionRecord'; import type { Routing } from './services'; import { AgentConfig } from '../../agent/AgentConfig'; import { Dispatcher } from '../../agent/Dispatcher'; import { MessageSender } from '../../agent/MessageSender'; import { DidResolverService } from '../dids'; import { DidRepository } from '../dids/repository'; import { OutOfBandService } from '../oob/OutOfBandService'; import { RoutingService } from '../routing/services/RoutingService'; import { DidExchangeProtocol } from './DidExchangeProtocol'; import { HandshakeProtocol } from './models'; import { ConnectionService } from './services/ConnectionService'; import { TrustPingService } from './services/TrustPingService'; export declare class ConnectionsModule { private agentConfig; private didExchangeProtocol; private connectionService; private outOfBandService; private messageSender; private trustPingService; private routingService; private didRepository; private didResolverService; constructor(dispatcher: Dispatcher, agentConfig: AgentConfig, didExchangeProtocol: DidExchangeProtocol, connectionService: ConnectionService, outOfBandService: OutOfBandService, trustPingService: TrustPingService, routingService: RoutingService, didRepository: DidRepository, didResolverService: DidResolverService, messageSender: MessageSender); acceptOutOfBandInvitation(outOfBandRecord: OutOfBandRecord, config: { autoAcceptConnection?: boolean; label?: string; alias?: string; imageUrl?: string; protocol: HandshakeProtocol; routing?: Routing; }): Promise; /** * Accept a connection request as inviter (by sending a connection response message) for the connection with the specified connection id. * This is not needed when auto accepting of connection is enabled. * * @param connectionId the id of the connection for which to accept the request * @returns connection record */ acceptRequest(connectionId: string): Promise; /** * Accept a connection response as invitee (by sending a trust ping message) for the connection with the specified connection id. * This is not needed when auto accepting of connection is enabled. * * @param connectionId the id of the connection for which to accept the response * @returns connection record */ acceptResponse(connectionId: string): Promise; returnWhenIsConnected(connectionId: string, options?: { timeoutMs: number; }): Promise; /** * Retrieve all connections records * * @returns List containing all connection records */ getAll(): Promise; /** * Retrieve a connection record by id * * @param connectionId The connection record id * @throws {RecordNotFoundError} If no record is found * @return The connection record * */ getById(connectionId: string): Promise; /** * Find a connection record by id * * @param connectionId the connection record id * @returns The connection record or null if not found */ findById(connectionId: string): Promise; /** * Delete a connection record by id * * @param connectionId the connection record id */ deleteById(connectionId: string): Promise; findByKeys({ senderKey, recipientKey }: { senderKey: Key; recipientKey: Key; }): Promise; findAllByOutOfBandId(outOfBandId: string): Promise; /** * Retrieve a connection record by thread id * * @param threadId The thread id * @throws {RecordNotFoundError} If no record is found * @throws {RecordDuplicateError} If multiple records are found * @returns The connection record */ getByThreadId(threadId: string): Promise; findByDid(did: string): Promise; findByInvitationDid(invitationDid: string): Promise; private registerHandlers; /** * Registers the dependencies of the connections module on the dependency manager. */ static register(dependencyManager: DependencyManager): void; }