</div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#filter">filter</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L55">packages/sdk/src/waku/waku.ts:55</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="health"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>health</span><ahref="#health"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">health</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">HealthIndicator</span></div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#health">health</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L59">packages/sdk/src/waku/waku.ts:59</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="libp2p"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>libp2p</span><ahref="#libp2p"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">libp2p</span><spanclass="tsd-signature-symbol">:</span><ahref="../types/_waku_sdk.Libp2p.html"class="tsd-signature-type tsd-kind-type-alias">Libp2p</a></div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#libp2p">libp2p</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L52">packages/sdk/src/waku/waku.ts:52</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="lightPush"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagOptional">Optional</code><span>light<wbr/>Push</span><ahref="#lightPush"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">light<wbr/>Push</span><spanclass="tsd-signature-symbol">?:</span><ahref="../types/_waku_sdk.ILightPush.html"class="tsd-signature-type tsd-kind-type-alias">ILightPush</a></div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#lightPush">lightPush</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L57">packages/sdk/src/waku/waku.ts:57</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="networkConfig"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagReadonly">Readonly</code><span>network<wbr/>Config</span><ahref="#networkConfig"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">network<wbr/>Config</span><spanclass="tsd-signature-symbol">:</span><ahref="../types/_waku_sdk.NetworkConfig.html"class="tsd-signature-type tsd-kind-type-alias">NetworkConfig</a></div><asideclass="tsd-sources"><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L61">packages/sdk/src/waku/waku.ts:61</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="nextFilter"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagOptional">Optional</code><span>next<wbr/>Filter</span>
</div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#peerId">peerId</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L158">packages/sdk/src/waku/waku.ts:158</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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><ulclass="tsd-signatures"><liclass="tsd-signature"id="protocols.protocols-1"><spanclass="tsd-signature-keyword">get</span> protocols<spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">[]</span></li><liclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Returns a list of supported protocols.</p>
</div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#protocols">protocols</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L162">packages/sdk/src/waku/waku.ts:162</a></li></ul></aside></li></ul></section></section><sectionclass="tsd-panel-group tsd-member-group"><h2>Methods</h2><sectionclass="tsd-panel tsd-member"><aid="createDecoder"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>create<wbr/>Decoder</span><ahref="#createDecoder"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="createDecoder.createDecoder-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">create<wbr/>Decoder</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">params</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><ahref="../interfaces/_waku_sdk.IDecoder.html"class="tsd-signature-type tsd-kind-interface">IDecoder</a><spanclass="tsd-signature-symbol"><</span><ahref="../interfaces/_waku_sdk.IDecodedMessage.html"class="tsd-signature-type tsd-kind-interface">IDecodedMessage</a><spanclass="tsd-signature-symbol">></span><ahref="#createDecoder.createDecoder-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>Creates a decoder for Waku messages on a specific content topic.</p>
<p>A decoder is used to decode messages from the Waku network format.
The decoder automatically handles shard configuration based on the Waku node's network settings.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">params</span>: <ahref="../types/_waku_sdk.CreateDecoderParams.html"class="tsd-signature-type tsd-kind-type-alias">CreateDecoderParams</a></span><divclass="tsd-comment tsd-typography"><p>Configuration for the decoder</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <ahref="../interfaces/_waku_sdk.IDecoder.html"class="tsd-signature-type tsd-kind-interface">IDecoder</a><spanclass="tsd-signature-symbol"><</span><ahref="../interfaces/_waku_sdk.IDecodedMessage.html"class="tsd-signature-type tsd-kind-interface">IDecodedMessage</a><spanclass="tsd-signature-symbol">></span></h4><p>A decoder instance configured for the specified content topic</p>
<divclass="tsd-comment tsd-typography"><h4>Throws</h4><p>If the shard configuration is incompatible with the node's network settings</p>
<h4>Example</h4><pre><codeclass="language-typescript"><spanclass="hl-4">// Create a decoder with default network shard settings</span><br/><spanclass="hl-5">const</span><spanclass="hl-1"></span><spanclass="hl-6">decoder</span><spanclass="hl-1"> = </span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">createDecoder</span><spanclass="hl-1">({</span><br/><spanclass="hl-1"></span><spanclass="hl-3">contentTopic:</span><spanclass="hl-1"></span><spanclass="hl-2">"/my-app/1/chat/proto"</span><br/><spanclass="hl-1">});</span><br/><br/><spanclass="hl-4">// Create a decoder with custom shard settings</span><br/><spanclass="hl-5">const</span><spanclass="hl-1"></span><spanclass="hl-6">customDecoder</span><spanclass="hl-1"> = </span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">createDecoder</span><spanclass="hl-1">({</span><br/><spanclass="hl-1"></span><spanclass="hl-3">contentTopic:</span><spanclass="hl-1"></span><spanclass="hl-2">"/my-app/1/chat/proto"</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-3">shardInfo:</span><spanclass="hl-1"> {</span><br/><spanclass="hl-1"></span><spanclass="hl-3">clusterId:</span><spanclass="hl-1"></span><spanclass="hl-7">1</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-3">shard:</span><spanclass="hl-1"></span><spanclass="hl-7">5</span><br/><spanclass="hl-1"> }</span><br/><spanclass="hl-1">});</span>
</div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#createDecoder">createDecoder</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L272">packages/sdk/src/waku/waku.ts:272</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="createEncoder"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>create<wbr/>Encoder</span><ahref="#createEncoder"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="createEncoder.createEncoder-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">create<wbr/>Encoder</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">params</span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">: </span><ahref="../interfaces/_waku_sdk.IEncoder.html"class="tsd-signature-type tsd-kind-interface">IEncoder</a><ahref="#createEncoder.createEncoder-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>Creates an encoder for Waku messages on a specific content topic.</p>
<p>An encoder is used to encode messages into the Waku network format.
The encoder automatically handles shard configuration based on the Waku node's network settings.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">params</span>: <ahref="../types/_waku_sdk.CreateEncoderParams.html"class="tsd-signature-type tsd-kind-type-alias">CreateEncoderParams</a></span><divclass="tsd-comment tsd-typography"><p>Configuration for the encoder including content topic and optionally shard information and ephemeral flag</p>
</div><divclass="tsd-comment tsd-typography"></div></li></ul></div><h4class="tsd-returns-title">Returns <ahref="../interfaces/_waku_sdk.IEncoder.html"class="tsd-signature-type tsd-kind-interface">IEncoder</a></h4><p>An encoder instance configured for the specified content topic</p>
<divclass="tsd-comment tsd-typography"><h4>Throws</h4><p>If the shard configuration is incompatible with the node's network settings</p>
<h4>Example</h4><pre><codeclass="language-typescript"><spanclass="hl-4">// Create a basic encoder with default network shard settings</span><br/><spanclass="hl-5">const</span><spanclass="hl-1"></span><spanclass="hl-6">encoder</span><spanclass="hl-1"> = </span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">createEncoder</span><spanclass="hl-1">({</span><br/><spanclass="hl-1"></span><spanclass="hl-3">contentTopic:</span><spanclass="hl-1"></span><spanclass="hl-2">"/my-app/1/chat/proto"</span><br/><spanclass="hl-1">});</span><br/><br/><spanclass="hl-4">// Create an ephemeral encoder (messages won't be stored by store nodes)</span><br/><spanclass="hl-5">const</span><spanclass="hl-1"></span><spanclass="hl-6">ephemeralEncoder</span><spanclass="hl-1"> = </span><spanclass="hl-3">waku</span><spanclass="hl-1">.</span><spanclass="hl-0">createEncoder</span><spanclass="hl-1">({</span><br/><spanclass="hl-1"></span><spanclass="hl-3">contentTopic:</span><spanclass="hl-1"></span><spanclass="hl-2">"/my-app/1/notifications/proto"</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-3">ephemeral:</span><spanclass="hl-1"></span><spanclass="hl-5">true</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-3">shardInfo:</span><spanclass="hl-1"> {</span><br/><spanclass="hl-1"></span><spanclass="hl-3">clusterId:</span><spanclass="hl-1"></span><spanclass="hl-7">2</span><spanclass="hl-1">,</span><br/><spanclass="hl-1"></span><spanclass="hl-3">shardsUnderCluster:</span><spanclass="hl-1"></span><spanclass="hl-7">16</span><br/><spanclass="hl-1"> }</span><br/><spanclass="hl-1">});</span>
</div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#createEncoder">createEncoder</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L289">packages/sdk/src/waku/waku.ts:289</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#dial">dial</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L166">packages/sdk/src/waku/waku.ts:166</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><aid="getConnectedPeers"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Connected<wbr/>Peers</span><ahref="#getConnectedPeers"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="getConnectedPeers.getConnectedPeers-1"class="tsd-anchor"></a><spanclass="tsd-kind-call-signature">get<wbr/>Connected<wbr/>Peers</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">Peer</span><spanclass="tsd-signature-symbol">[]</span><spanclass="tsd-signature-symbol">></span><ahref="#getConnectedPeers.getConnectedPeers-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">Promise</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">Peer</span><spanclass="tsd-signature-symbol">[]</span><spanclass="tsd-signature-symbol">></span></h4><p>an array of all connected peers</p>
<divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><p>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#getConnectedPeers">getConnectedPeers</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L253">packages/sdk/src/waku/waku.ts:253</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#isConnected">isConnected</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L268">packages/sdk/src/waku/waku.ts:268</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#isStarted">isStarted</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L264">packages/sdk/src/waku/waku.ts:264</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#start">start</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L224">packages/sdk/src/waku/waku.ts:224</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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>Implementation of <ahref="../interfaces/_waku_sdk.IWaku.html">IWaku</a>.<ahref="../interfaces/_waku_sdk.IWaku.html#stop">stop</a></p><ul><li>Defined in <ahref="https://github.com/waku-org/js-waku/blob/fecc026dd71121f78d23aabb98657ea49baf25f5/packages/sdk/src/waku/waku.ts#L238">packages/sdk/src/waku/waku.ts:238</a></li></ul></aside></li></ul></section><sectionclass="tsd-panel tsd-member"><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"><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="../interfaces/_waku_sdk.IWaku.html#dial"class="tsd-kind-method">IWaku.dial</a> or
if was bootstrapped by using <ahref="../interfaces/_waku_sdk.IPeerExchange.html"class="tsd-kind-interface">IPeerExchange</a> or <ahref="../interfaces/_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-8">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-8">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-8">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-5">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-5">true</span><spanclass="hl-1">;</span>