</div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#peerId">peerId</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:27</li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="protocols"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>protocols</span><ahref="#protocols"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">protocols</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">[]</span></div><divclass="tsd-comment tsd-typography"><p>Returns a list of supported protocols.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#protocols">protocols</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:36</li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="relay"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>relay</span><ahref="#relay"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">relay</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">undefined</span></div><asideclass="tsd-sources"><p>Overrides <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#relay">relay</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:115</li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="store"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>store</span><ahref="#store"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">store</span><spanclass="tsd-signature-symbol">:</span><ahref="../types/_waku_sdk.IStore.html"class="tsd-signature-type tsd-kind-type-alias">IStore</a></div><asideclass="tsd-sources"><p>Overrides <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#store">store</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:116</li></ul></aside></section></section><sectionclass="tsd-panel-group tsd-member-group"><h2>Methods</h2><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="dial"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>dial</span><ahref="#dial"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"><liclass="tsd-signature tsd-anchor-link"><aid="dial.dial-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">dial</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">peer</span>, <spanclass="tsd-kind-parameter">protocols</span><spanclass="tsd-signature-symbol">?</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">Stream</span><spanclass="tsd-signature-symbol">></span><ahref="#dial.dial-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-comment tsd-typography"><p>Dials to the provided peer</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>information to use for dialing</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><codeclass="tsd-tag ts-flagOptional">Optional</code><spanclass="tsd-kind-parameter">protocols</span>: <ahref="../enums/_waku_sdk.Protocols.html"class="tsd-signature-type tsd-kind-enum">Protocols</a><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>array of Waku protocols to be used for dialing. If no provided - will be derived from mounted protocols.</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><code>Promise</code> that will resolve to a <code>Stream</code> to a dialed peer</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#dial">dial</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:52</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="isConnected"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>is<wbr/>Connected</span><ahref="#isConnected"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"><liclass="tsd-signature tsd-anchor-link"><aid="isConnected.isConnected-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">is<wbr/>Connected</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#isConnected.isConnected-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"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the node has working connection and <code>false</code> otherwise</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#isConnected">isConnected</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:112</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="isStarted"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>is<wbr/>Started</span><ahref="#isStarted"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"><liclass="tsd-signature tsd-anchor-link"><aid="isStarted.isStarted-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">is<wbr/>Started</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">boolean</span><ahref="#isStarted.isStarted-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"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the node was started and <code>false</code> otherwise</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#isStarted">isStarted</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:108</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="start"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>start</span><ahref="#start"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"><liclass="tsd-signature tsd-anchor-link"><aid="start.start-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">start</span><spanclass="tsd-signature-symbol">(</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="#start.start-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-comment tsd-typography"><p>Starts all services and components related to functionality of Waku node.</p>
</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><p><code>Promise</code> that will resolve when started.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#start">start</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:65</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="stop"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>stop</span><ahref="#stop"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"><liclass="tsd-signature tsd-anchor-link"><aid="stop.stop-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">stop</span><spanclass="tsd-signature-symbol">(</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="#stop.stop-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-comment tsd-typography"><p>Stops all recurring processes and services that are needed for functionality of Waku node.</p>
</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><p><code>Promise</code> that resolves when stopped.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="_waku_sdk.IWaku.html">IWaku</a>.<ahref="_waku_sdk.IWaku.html#stop">stop</a></p><ul><li>Defined in packages/interfaces/dist/waku.d.ts:78</li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><aid="waitForPeers"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>wait<wbr/>For<wbr/>Peers</span><ahref="#waitForPeers"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"><liclass="tsd-signature tsd-anchor-link"><aid="waitForPeers.waitForPeers-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">wait<wbr/>For<wbr/>Peers</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">protocols</span><spanclass="tsd-signature-symbol">?</span>, <spanclass="tsd-kind-parameter">timeoutMs</span><spanclass="tsd-signature-symbol">?</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="#waitForPeers.waitForPeers-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-comment tsd-typography"><p>Resolves when Waku successfully gains connection to a remote peers that fits provided requirements.
Must be used after attempting to connect to nodes, using <ahref="_waku_sdk.IWaku.html#dial"class="tsd-kind-method">IWaku.dial</a> or
if was bootstrapped by using <ahref="_waku_sdk.IPeerExchange.html"class="tsd-kind-interface">IPeerExchange</a> or <ahref="_waku_sdk.DnsDiscoveryComponents.html"class="tsd-kind-interface">DnsDiscoveryComponents</a>.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><codeclass="tsd-tag ts-flagOptional">Optional</code><spanclass="tsd-kind-parameter">protocols</span>: <ahref="../enums/_waku_sdk.Protocols.html"class="tsd-signature-type tsd-kind-enum">Protocols</a><spanclass="tsd-signature-symbol">[]</span></span><divclass="tsd-comment tsd-typography"><p>Protocols that need to be enabled by remote peers</p>
</div><divclass="tsd-comment tsd-typography"></div></li><li><span><codeclass="tsd-tag ts-flagOptional">Optional</code><spanclass="tsd-kind-parameter">timeoutMs</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>Timeout value in milliseconds after which promise rejects</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">void</span><spanclass="tsd-signature-symbol">></span></h4><p><code>Promise</code> that <strong>resolves</strong> if all desired protocols are fulfilled by
at least one remote peer, <strong>rejects</strong> if the timeoutMs is reached</p>
<divclass="tsd-comment tsd-typography"><h4>Throws</h4><p>If passing a protocol that is not mounted or Waku node is not started</p>
<h4>Example</h4><pre><codeclass="language-typescript"><spanclass="hl-5">try</span><spanclass="hl-1"> {</span><br/><spanclass="hl-1"></span><spanclass="hl-4">// let's wait for at least one LightPush node and timeout in 1 second</span><br/><spanclass="hl-1"></span><spanclass="hl-5">await</span><spanclass="hl-1"></span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">waitForPeers</span><spanclass="hl-1">([</span><spanclass="hl-3">Protocols</span><spanclass="hl-1">.</span><spanclass="hl-3">LightPush</span><spanclass="hl-1">], </span><spanclass="hl-7">1000</span><spanclass="hl-1">);</span><br/><spanclass="hl-1">} </span><spanclass="hl-5">catch</span><spanclass="hl-1">(</span><spanclass="hl-3">e</span><spanclass="hl-1">) {</span><br/><spanclass="hl-1"></span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">isConnected</span><spanclass="hl-1">() === </span><spanclass="hl-6">false</span><spanclass="hl-1">;</span><br/><spanclass="hl-1"></span><spanclass="hl-3">console</span><spanclass="hl-1">.</span><spanclass="hl-0">error</span><spanclass="hl-1">(</span><spanclass="hl-2">"Failed to connect due to"</span><spanclass="hl-1">, </span><spanclass="hl-3">e</span><spanclass="hl-1">);</span><br/><spanclass="hl-1">}</span><br/><br/><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">isConnected</span><spanclass="hl-1">() === </span><spanclass="hl-6">true</span><spanclass="hl-1">;</span>