import { Nil } from "../../utils"; import { Connection } from "./Connection"; import { MediatorConnection } from "../../plugins/internal/didcomm"; /** * ConnectionsManager is responsible for handling Connections and Mediators * * Mediators are a Connection where we periodically fetch messages from * * @class ConnectionsManager * @typedef {ConnectionsManager} */ export declare class ConnectionsManager { private readonly connections; private readonly mediators; get mediator(): MediatorConnection | Nil; /** * close all active connections */ stop(): Promise; /** * add a Connection * * @async * @param {DIDPair} paired * @returns {Promise} */ add(connection: Connection): void; /** * add a Connection and mark it as a Mediator * @param mediator */ addMediator(mediator: Connection): void; /** * Remove a Connection * this but just means the connection will be removed from the current storage * * @async * @param {DIDPair} pair * @returns {Promise} */ remove(connection: Connection | string): Promise; /** * Search for a Connection by it's unique identifier * * @param uri * @returns */ find(uri: string): Connection | undefined; }