import type { Gateway } from '@achingbrain/nat-port-mapper'; import type { ComponentLogger } from '@libp2p/interface'; import type { AddressManager } from '@libp2p/interface-internal'; export interface UPnPPortMapperInit { gateway: Gateway; externalAddress?: string; externalAddressCheckInterval?: number; externalAddressCheckTimeout?: number; } export interface UPnPPortMapperComponents { logger: ComponentLogger; addressManager: AddressManager; } export interface MapPortsOptions { autoConfirmAddress?: boolean; } export declare class UPnPPortMapper { private readonly gateway; private readonly externalAddress; private readonly addressManager; private readonly log; private readonly mappedPorts; private started; constructor(components: UPnPPortMapperComponents, init: UPnPPortMapperInit); start(): Promise; stop(): Promise; /** * Update the local address mappings when the gateway's external interface * address changes */ private remapPorts; /** * Return any eligible multiaddrs that are not mapped on the detected gateway */ private getUnmappedAddresses; mapIpAddresses(options?: MapPortsOptions): Promise; /** * Some ISPs have double-NATs, there's not much we can do with them */ private assertNotBehindDoubleNAT; private isIPAddress; } //# sourceMappingURL=upnp-port-mapper.d.ts.map