import type { ConnectionRecord } from '../modules/connections'; import type { Key } from '../modules/dids'; import type { OutboundTransport } from '../transport/OutboundTransport'; import type { OutboundMessage, OutboundPackage, EncryptedMessage } from '../types'; import type { AgentMessage } from './AgentMessage'; import type { EnvelopeKeys } from './EnvelopeService'; import { DID_COMM_TRANSPORT_QUEUE } from '../constants'; import { Logger } from '../logger'; import { DidResolverService } from '../modules/dids/services/DidResolverService'; import { MessageRepository } from '../storage/MessageRepository'; import { EnvelopeService } from './EnvelopeService'; import { TransportService } from './TransportService'; export interface ResolvedDidCommService { id: string; serviceEndpoint: string; recipientKeys: Key[]; routingKeys: Key[]; } export interface TransportPriorityOptions { schemes: string[]; restrictive?: boolean; } export declare class MessageSender { private envelopeService; private transportService; private messageRepository; private logger; private didResolverService; readonly outboundTransports: OutboundTransport[]; constructor(envelopeService: EnvelopeService, transportService: TransportService, messageRepository: MessageRepository, logger: Logger, didResolverService: DidResolverService); registerOutboundTransport(outboundTransport: OutboundTransport): void; packMessage({ keys, message, endpoint, }: { keys: EnvelopeKeys; message: AgentMessage; endpoint: string; }): Promise; private sendMessageToSession; sendPackage({ connection, encryptedMessage, options, }: { connection: ConnectionRecord; encryptedMessage: EncryptedMessage; options?: { transportPriority?: TransportPriorityOptions; }; }): Promise; sendMessage(outboundMessage: OutboundMessage, options?: { transportPriority?: TransportPriorityOptions; }): Promise; sendMessageToService({ message, service, senderKey, returnRoute, connectionId, }: { message: AgentMessage; service: ResolvedDidCommService; senderKey: Key; returnRoute?: boolean; connectionId?: string; }): Promise; private retrieveServicesFromDid; private retrieveServicesByConnection; } export declare function isDidCommTransportQueue(serviceEndpoint: string): serviceEndpoint is typeof DID_COMM_TRANSPORT_QUEUE;