<!DOCTYPE html><htmlclass="default"lang="en"><head><metacharSet="utf-8"/><metahttp-equiv="x-ua-compatible"content="IE=edge"/><title>IRelayAPI | Documentation</title><metaname="description"content="Documentation for Documentation"/><metaname="viewport"content="width=device-width, initial-scale=1"/><linkrel="stylesheet"href="../assets/style.css"/><linkrel="stylesheet"href="../assets/highlight.css"/><scriptdefersrc="../assets/main.js"></script><scriptasyncsrc="../assets/icons.js"id="tsd-icons-script"></script><scriptasyncsrc="../assets/search.js"id="tsd-search-script"></script><scriptasyncsrc="../assets/navigation.js"id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme=localStorage.getItem("tsd-theme")||"os";document.body.style.display="none";setTimeout(()=>app?app.showPage():document.body.style.removeProperty("display"),500)</script><headerclass="tsd-page-toolbar"><divclass="tsd-toolbar-contents container"><divclass="table-cell"id="tsd-search"data-base=".."><divclass="field"><labelfor="tsd-search-field"class="tsd-widget tsd-toolbar-icon search no-caption"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-search"></use></svg></label><inputtype="text"id="tsd-search-field"aria-label="Search"/></div><divclass="field"><divid="tsd-toolbar-links"></div></div><ulclass="results"><liclass="state loading">Preparing search index...</li><liclass="state failure">The search index is not available</li></ul><ahref="../index.html"class="title">Documentation</a></div><divclass="table-cell"id="tsd-widgets"><ahref="#"class="tsd-widget tsd-toolbar-icon menu no-caption"data-toggle="menu"aria-label="Menu"><svgwidth="16"height="16"viewBox="0 0 16 16"fill="none"><usehref="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><divclass="container container-main"><divclass="col-content"><divclass="tsd-page-title"><ulclass="tsd-breadcrumb"><li><ahref="../index.html">Documentation</a></li><li><ahref="../modules/_waku_sdk.html">@waku/sdk</a></li><li><ahref="_waku_sdk.IRelayAPI.html">IRelayAPI</a></li></ul><h1>Interface IRelayAPI</h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>Interface representing the Relay API, providing control and information about the GossipSub protocol.</p>
</div></section></div></details></section></section><sectionclass="tsd-panel-group tsd-member-group"><h2>Properties</h2><sectionclass="tsd-panel tsd-member"><aid="getMeshPeers"class="tsd-anchor"></a><h3class="tsd-anchor-link"><span>get<wbr/>Mesh<wbr/>Peers</span><ahref="#getMeshPeers"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/>Mesh<wbr/>Peers</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">topic</span><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><spanclass="tsd-signature-symbol">)</span></div><divclass="tsd-comment tsd-typography"><p>Function to retrieve the mesh peers for a given topic or all topics if none is specified. Returns an array of peer IDs as strings.</p>
</div><divclass="tsd-type-declaration"><h4>Type declaration</h4><ulclass="tsd-parameters"><liclass="tsd-parameter-signature"><ulclass="tsd-signatures"><liclass="tsd-signature"id="getMeshPeers.__type.__type-1"><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">topic</span><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-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><codeclass="tsd-tag ts-flagOptional">Optional</code><spanclass="tsd-kind-parameter">topic</span>: <spanclass="tsd-signature-type">string</span></span></li></ul></div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">[]</span></h4></li></ul></li></ul></div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in packages/interfaces/dist/relay.d.ts:17</li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="gossipSub"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagReadonly">Readonly</code><span>gossip<wbr/>Sub</span><ahref="#gossipSub"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">gossip<wbr/>Sub</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">GossipSub</span></div><divclass="tsd-comment tsd-typography"><p>The GossipSub instance used for managing pub/sub behavior.</p>
</div><divclass="tsd-comment tsd-typography"></div><asideclass="tsd-sources"><ul><li>Defined in packages/interfaces/dist/relay.d.ts:15</li></ul></aside></section><sectionclass="tsd-panel tsd-member"><aid="pubsubTopics"class="tsd-anchor"></a><h3class="tsd-anchor-link"><codeclass="tsd-tag ts-flagReadonly">Readonly</code><span>pubsub<wbr/>Topics</span><ahref="#pubsubTopics"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">pubsub<wbr/>Topics</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">Set</span><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">string</span><spanclass="tsd-signature-symbol">></span></div><asideclass="tsd-sources"><ul><li>Defined in packages/interfaces/dist/relay.d.ts:14</li></ul></aside></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><divclass="tsd-signature"><spanclass="tsd-kind-property">start</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-symbol">(</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><spanclass="tsd-signature-symbol">)</span></div><divclass="tsd-comment tsd-typography"><p>Function to start the relay, returning a Promise that resolves when initialization is complete.</p>