</div></section></div></details></section></section><sectionclass="tsd-panel-group tsd-member-group"><h2>Constructors</h2><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="constructor"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>constructor</span><ahref="#constructor"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-private"><liclass="tsd-signature tsd-anchor-link"><aid="constructor.new_ConnectionManager"class="tsd-anchor"></a><spanclass="tsd-kind-constructor-signature">new <wbr/>Connection<wbr/>Manager</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><ahref="../modules/_waku_sdk.waku.html"class="tsd-signature-type tsd-kind-namespace">waku</a><spanclass="tsd-signature-symbol">.</span><ahref="_waku_sdk.waku.ConnectionManager.html"class="tsd-signature-type tsd-kind-class">ConnectionManager</a><ahref="#constructor.new_ConnectionManager"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><h4class="tsd-returns-title">Returns <ahref="../modules/_waku_sdk.waku.html"class="tsd-signature-type tsd-kind-namespace">waku</a><spanclass="tsd-signature-symbol">.</span><ahref="_waku_sdk.waku.ConnectionManager.html"class="tsd-signature-type tsd-kind-class">ConnectionManager</a></h4><asideclass="tsd-sources"><p>Overrides TypedEventEmitter<IPeersByDiscoveryEvents & IConnectionStateEvents>.constructor</p><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:24</li></ul></aside></li></ul></section></section><sectionclass="tsd-panel-group tsd-member-group"><h2>Properties</h2><sectionclass="tsd-panel tsd-member tsd-is-private tsd-is-inherited tsd-is-external"><aid="_private"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>#private</span><ahref="#_private"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">#private</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IConnectionManager.html">IConnectionManager</a>.<ahref="../interfaces/_waku_sdk.IConnectionManager.html#_private">#private</a></p><p>Inherited from TypedEventEmitter.#private</p><ul><li>Defined in node_modules/@libp2p/interface/dist/src/event-target.d.ts:28</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="attemptDnsDiscovery"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>attempt<wbr/>Dns<wbr/>Discovery</span><ahref="#attemptDnsDiscovery"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">attempt<wbr/>Dns<wbr/>Discovery</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:81</li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="configuredPubsubTopics"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagReadonly">Readonly</code><span>configured<wbr/>Pubsub<wbr/>Topics</span><ahref="#configuredPubsubTopics"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">configured<wbr/>Pubsub<wbr/>Topics</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd
This is used internally by the connection manager to handle different peer input formats.</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:80</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="getPeerShardInfo"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>get<wbr/>Peer<wbr/>Shard<wbr/>Info</span><ahref="#getPeerShardInfo"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">get<wbr/>Peer<wbr/>Shard<wbr/>Info</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:109</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="getTagNamesForPeer"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>get<wbr/>Tag<wbr/>Names<wbr/>For<wbr/>Peer</span><ahref="#getTagNamesForPeer"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">get<wbr/>Tag<wbr/>Names<wbr/>For<wbr/>Peer</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><divclass="tsd-comment tsd-typography"><p>Fetches the tag names for a given peer</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:107</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="isP2PNetworkConnected"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>is<wbr/>P2PNetwork<wbr/>Connected</span><ahref="#isP2PNetworkConnected"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">is<wbr/>P2PNetwork<wbr/>Connected</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:18</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="isPeerDialableBasedOnBootstrapStatus"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>is<wbr/>Peer<wbr/>Dialable<wbr/>Based<wbr/>On<wbr/>Bootstrap<wbr/>Status</span><ahref="#isPeerDialableBasedOnBootstrapStatus"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">is<wbr/>Peer<wbr/>Dialable<wbr/>Based<wbr/>On<wbr/>Bootstrap<wbr/>Status</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><divclass="tsd-comment tsd-typography"><p>Checks if the peer is dialable based on the following conditions:</p>
</div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:96</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="startEventListeners"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>start<wbr/>Event<wbr/>Listeners</span><ahref="#startEventListeners"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">start<wbr/>Event<wbr/>Listeners</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:26</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="startNetworkStatusListener"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>start<wbr/>Network<wbr/>Status<wbr/>Listener</span><ahref="#startNetworkStatusListener"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">start<wbr/>Network<wbr/>Status<wbr/>Listener</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:110</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="startPeerConnectionListener"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>start<wbr/>Peer<wbr/>Connection<wbr/>Listener</span><ahref="#startPeerConnectionListener"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">start<wbr/>Peer<wbr/>Connection<wbr/>Listener</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:84</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="startPeerDisconnectionListener"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>start<wbr/>Peer<wbr/>Disconnection<wbr/>Listener</span><ahref="#startPeerDisconnectionListener"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">start<wbr/>Peer<wbr/>Disconnection<wbr/>Listener</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:85</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="startPeerDiscoveryListener"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>start<wbr/>Peer<wbr/>Discovery<wbr/>Listener</span><ahref="#startPeerDiscoveryListener"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">start<wbr/>Peer<wbr/>Discovery<wbr/>Listener</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">any</span></div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:83</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-private"><aid="stopNetworkStatusListener"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagPrivate">Private</code><span>stop<wbr/>Network<wbr/>Status<wbr/>Listener<
The method handles both PeerId and Multiaddr inputs, manages connection attempts,
and maintains the connection state.</p>
<p>The dialing process includes:</p>
<ol>
<li>Converting input to dialable peer info</li>
<li>Managing parallel dial attempts</li>
<li>Attempting to establish protocol-specific connections</li>
<li>Handling connection failures and retries</li>
<li>Updating the peer store and connection state</li>
</ol>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">peer</span>: <spanclass="tsd-signature-type">PeerId</span><spanclass="tsd-signature-symbol"> | </span><spanclass="tsd-signature-type">MultiaddrInput</span></span><divclass="tsd-comment tsd-typography"><p>The peer to connect to, either as a PeerId or multiaddr</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">Connection</span><spanclass="tsd-signature-symbol">></span></h4><divclass="tsd-comment tsd-typography"><h4>Throws</h4><p>If the multiaddr is missing a peer ID</p>
<h4>Throws</h4><p>If the maximum dial attempts are reached and the peer cannot be dialed</p>
<h4>Throws</h4><p>If there's an error deleting an undialable peer from the peer store</p>
<h4>Example</h4><pre><codeclass="language-typescript"><spanclass="hl-4">// Dial using PeerId</span><br/><spanclass="hl-5">await</span><spanclass="hl-1"></span><spanclass="hl-3">connectionManager</span><spanclass="hl-1">.</span><spanclass="hl-0">dialPeer</span><spanclass="hl-1">(</span><spanclass="hl-3">peerId</span><spanclass="hl-1">);</span><br/><br/><spanclass="hl-4">// Dial using multiaddr with specific protocols</span><br/><spanclass="hl-5">await</span><spanclass="hl-1"></span><spanclass="hl-3">connectionManager</span><spanclass="hl-1">.</span><spanclass="hl-0">dialPeer</span><spanclass="hl-1">(</span><spanclass="hl-3">multiaddr</span><spanclass="hl-1">, [</span><br/><spanclass="hl-1"></span><spanclass="hl-2">"/vac/waku/relay/2.0.0"</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-2">"/vac/waku/lightpush/2.0.0-beta1"</span><br/><spanclass="hl-1">]);</span>
</code><button>Copy</button></pre>
<h4>Remarks</h4><ul>
<li>The method implements exponential backoff through multiple dial attempts</li>
<li>Maintains a queue for parallel dial attempts (limited by maxParallelDials)</li>
<li>Integrates with the KeepAliveManager for connection maintenance</li>
<li>Updates the peer store and connection state after successful/failed attempts</li>
<li>If all dial attempts fail, triggers DNS discovery as a fallback</li>
</ul>
</div><asideclass="tsd-sources"><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:66</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><aid="dispatchEvent"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>dispatch<wbr/>Event</span><ahref="#dispatchEvent"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-inherited tsd-is-external"><liclass="tsd-signature tsd-anchor-link"><aid="dispatchEvent.dispatchEvent-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">dispatch<wbr/>Event</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">event</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#dispatchEvent.dispatchEvent-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">event</span>: <spanclass="tsd-signature-type">Event</span></span></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IConnectionManager.html">IConnectionManager</a>.<ahref="../interfaces/_waku_sdk.IConnectionManager.html#dispatchEvent">dispatchEvent</a></p><p>Inherited from TypedEventEmitter.dispatchEvent</p><ul><li>Defined in node_modules/@libp2p/interface/dist/src/event-target.d.ts:33</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="dropConnection"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>drop<wbr/>Connection</span><ahref="#dropConnection"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature tsd-anchor-link"><aid="dropConnection.dropConnection-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">drop<wbr/>Connection</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">peerId</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span><ahref="#dropConnection.dropConnection-1"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></li><liclass="tsd-description"><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">peerId</span>: <spanclass="tsd-signature-type">PeerId</span></span></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">void</span><spanclass="tsd-signature-symbol">></span></h4><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IConnectionManager.html">IConnectionManager</a>.<ahref="../interfaces/_waku_sdk.IConnectionManager.html#dropConnection">dropConnection</a></p><ul><li>Defined in packages/core/dist/lib/connection_manager.d.ts:22</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="getPeersByDiscovery"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Peers<wbr/>By<wbr/>Discovery</span><ahref="#getPeersByDiscovery"aria-label="Permalink"class="tsd-anchor-icon"><svgviewBox="0 0 24 24"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures"><liclass="tsd-signature
This method is a raw proxy to the libp2p dialProtocol method.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">peer</span>: <spanclass="tsd-signature-type">PeerId</span><spanclass="tsd-signature-symbol"> | </span><spanclass="tsd-signature-type">MultiaddrInput</span></span><divclass="tsd-comment tsd-typography"><p>The peer to connect to, either as a PeerId or multiaddr</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><spanclass="tsd-kind-parameter">protocolCodecs</span>: <spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>Optional array of protocol-specific codec strings to establish</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">Stream</span><spanclass="tsd-signature-symbol">></span></h4><p>A stream to the peer</p>