js-waku/classes/_waku_enr.ENR.html

75 lines
95 KiB
HTML
Raw Normal View History

2024-07-23 15:26:52 +00:00
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ENR | Documentation</title><meta name="description" content="Documentation for Documentation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../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><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Documentation</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">Documentation</a></li><li><a href="../modules/_waku_enr.html">@waku/enr</a></li><li><a href="_waku_enr.ENR.html">ENR</a></li></ul><h1>Class ENR</h1></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">RawEnr</span><ul class="tsd-hierarchy"><li><span class="target">ENR</span></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/_waku_interfaces.IEnr.html" class="tsd-signature-type tsd-kind-interface">IEnr</a></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L33">packages/enr/src/enr.ts:33</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="_waku_enr.ENR.html#constructor" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
2024-04-07 07:56:46 +00:00
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_waku_enr.ENR.html#_toStringTag_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[to<wbr/>String<wbr/>Tag]</span></a>
<a href="_waku_enr.ENR.html#getLocationMultiaddr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>get<wbr/>Location<wbr/>Multiaddr</span></a>
<a href="_waku_enr.ENR.html#peerId" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>peer<wbr/>Id?</span></a>
<a href="_waku_enr.ENR.html#seq" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>seq</span></a>
<a href="_waku_enr.ENR.html#signature" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>signature?</span></a>
<a href="_waku_enr.ENR.html#size" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>size</span></a>
<a href="_waku_enr.ENR.html#RECORD_PREFIX" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>RECORD_<wbr/>PREFIX</span></a>
<a href="_waku_enr.ENR.html#_species_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>[species]</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="_waku_enr.ENR.html#id" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>id</span></a>
<a href="_waku_enr.ENR.html#ip" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>ip</span></a>
<a href="_waku_enr.ENR.html#ip6" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>ip6</span></a>
<a href="_waku_enr.ENR.html#multiaddrs" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>multiaddrs</span></a>
<a href="_waku_enr.ENR.html#nodeId" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>node<wbr/>Id</span></a>
<a href="_waku_enr.ENR.html#peerInfo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>peer<wbr/>Info</span></a>
<a href="_waku_enr.ENR.html#publicKey" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>public<wbr/>Key</span></a>
<a href="_waku_enr.ENR.html#rs" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>rs</span></a>
<a href="_waku_enr.ENR.html#rsv" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>rsv</span></a>
<a href="_waku_enr.ENR.html#shardInfo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>shard<wbr/>Info</span></a>
<a href="_waku_enr.ENR.html#tcp" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>tcp</span></a>
<a href="_waku_enr.ENR.html#tcp6" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>tcp6</span></a>
<a href="_waku_enr.ENR.html#udp" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>udp</span></a>
<a href="_waku_enr.ENR.html#udp6" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>udp6</span></a>
<a href="_waku_enr.ENR.html#waku2" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>waku2</span></a>
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_waku_enr.ENR.html#_iterator_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[iterator]</span></a>
<a href="_waku_enr.ENR.html#clear" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>clear</span></a>
<a href="_waku_enr.ENR.html#delete" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete</span></a>
<a href="_waku_enr.ENR.html#entries" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>entries</span></a>
<a href="_waku_enr.ENR.html#forEach" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
<a href="_waku_enr.ENR.html#get" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get</span></a>
<a href="_waku_enr.ENR.html#getAllLocationMultiaddrs" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>All<wbr/>Location<wbr/>Multiaddrs</span></a>
<a href="_waku_enr.ENR.html#getFullMultiaddr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Full<wbr/>Multiaddr</span></a>
<a href="_waku_enr.ENR.html#getFullMultiaddrs" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Full<wbr/>Multiaddrs</span></a>
<a href="_waku_enr.ENR.html#has" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>has</span></a>
<a href="_waku_enr.ENR.html#keys" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>keys</span></a>
<a href="_waku_enr.ENR.html#set" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set</span></a>
<a href="_waku_enr.ENR.html#setLocationMultiaddr" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Location<wbr/>Multiaddr</span></a>
<a href="_waku_enr.ENR.html#sign" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>sign</span></a>
<a href="_waku_enr.ENR.html#values" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>values</span></a>
<a href="_waku_enr.ENR.html#verify" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>verify</span></a>
<a href="_waku_enr.ENR.html#create" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create</span></a>
2024-07-23 15:26:52 +00:00
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-protected tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_ENR" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new ENR</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">kvs</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">seq</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">signature</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_waku_enr.ENR.html" class="tsd-signature-type tsd-kind-class">ENR</a><a href="#constructor.new_ENR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">kvs</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = {}</span></span></li><li><span><span class="tsd-kind-parameter">seq</span>: <span class="tsd-signature-type">bigint</span><span class="tsd-signature-symbol"> = ...</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">signature</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_waku_enr.ENR.html" class="tsd-signature-type tsd-kind-class">ENR</a></h4><aside class="tsd-sources"><p>Inherited from RawEnr.constructor</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L24">packages/enr/src/raw_enr.ts:24</a></li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_toStringTag_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>[to<wbr/>String<wbr/>Tag]</span><a href="#_toStringTag_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">[to<wbr/>String<wbr/>Tag]</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#_toStringTag_">[toStringTag]</a></p><p>Inherited from RawEnr.[toStringTag]</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="getLocationMultiaddr" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Location<wbr/>Multiaddr</span><a href="#getLocationMultiaddr" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">get<wbr/>Location<wbr/>Multiaddr</span><span class="tsd-signature-symbol">:</span>
</div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#size">size</a></p><p>Inherited from RawEnr.size</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:45</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="RECORD_PREFIX" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>RECORD_<wbr/>PREFIX</span><a href="#RECORD_PREFIX" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">RECORD_<wbr/>PREFIX</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;enr:&quot;</span><span class="tsd-signature-symbol"> = &quot;enr:&quot;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L34">packages/enr/src/enr.ts:34</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_species_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>[species]</span><a href="#_species_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">[species]</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MapConstructor</span></div><aside class="tsd-sources"><p>Inherited from RawEnr.[species]</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-is-inherited"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature" id="id.id-1"><span class="tsd-signature-keyword">get</span> id<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#id">id</a></p><p>Inherited from RawEnr.id</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L40">packages/enr/src/raw_enr.ts:40</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="ip" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ip</span><a href="#ip" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature" id="ip.ip-1"><span class="tsd-signature-keyword">get</span> ip<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../inte
2022-09-09 16:11:18 +00:00
<p>This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys.
These can be a multiaddresses that include encapsulation (e.g. wss) or do not use <code>ip4</code> nor <code>ip6</code> for the host
address (e.g. <code>dns4</code>, <code>dnsaddr</code>, etc)..</p>
<p>If the peer information only contains information that can be represented with the ENR pre-defined keys
2023-09-21 08:59:21 +00:00
(ip, tcp, etc) then the usage of <a href="_waku_enr.ENR.html#getLocationMultiaddr" class="tsd-kind-property">ENR.getLocationMultiaddr</a> should be preferred.</p>
2022-09-09 16:11:18 +00:00
<p>The multiaddresses stored in this field are expected to be location multiaddresses, ie, peer id less.</p>
2024-07-23 15:26:52 +00:00
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#multiaddrs">multiaddrs</a></p><p>Inherited from RawEnr.multiaddrs</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L127">packages/enr/src/raw_enr.ts:127</a></li></ul></aside></li><li class="tsd-signature" id="multiaddrs.multiaddrs-2"><span class="tsd-signature-keyword">set</span> multiaddrs<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">multiaddrs</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Set the <code>multiaddrs</code> field on the ENR.</p>
2022-09-09 16:11:18 +00:00
<p>This field is used to store multiaddresses that cannot be stored with the current ENR pre-defined keys.
These can be a multiaddresses that include encapsulation (e.g. wss) or do not use <code>ip4</code> nor <code>ip6</code> for the host
address (e.g. <code>dns4</code>, <code>dnsaddr</code>, etc)..</p>
<p>If the peer information only contains information that can be represented with the ENR pre-defined keys
2023-09-21 08:59:21 +00:00
(ip, tcp, etc) then the usage of <a href="_waku_enr.ENR.html#setLocationMultiaddr" class="tsd-kind-method">ENR.setLocationMultiaddr</a> should be preferred.
2022-09-09 16:11:18 +00:00
The multiaddresses stored in this field must be location multiaddresses,
ie, without a peer id.</p>
2024-07-23 15:26:52 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">multiaddrs</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#multiaddrs">multiaddrs</a></p><p>Inherited from RawEnr.multiaddrs</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L147">packages/enr/src/raw_enr.ts:147</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="nodeId" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>node<wbr/>Id</span><a href="#nodeId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature" id="nodeId.nodeId-1"><span class="tsd-signature-keyword">get</span> nodeId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#nodeId">nodeId</a></p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L55">packages/enr/src/enr.ts:55</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="peerInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>peer<wbr/>Info</span><a href="#peerInfo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature" id="peerInfo.peerInfo-1"><span class="tsd-signature-keyword">get</span> peerInfo<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">PeerInfo</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">PeerInfo</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#peerInfo">peerInfo</a></p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L118">packages/enr/src/enr.ts:118</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="publicKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>public<wbr/>Key</span><a href="#publicKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature" id="publicKey.publicKey-1"><span class="tsd-signature-keyword">get</span> publicKey<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined<
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_waku_interfaces.Waku2.html" class="tsd-signature-type tsd-kind-interface">Waku2</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#waku2">waku2</a></p><p>Inherited from RawEnr.waku2</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L154">packages/enr/src/raw_enr.ts:154</a></li></ul></aside></li><li class="tsd-signature" id="waku2.waku2-2"><span class="tsd-signature-keyword">set</span> waku2<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">waku2</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Set the <code>waku2</code> field on the ENR.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">waku2</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_waku_interfaces.Waku2.html" class="tsd-signature-type tsd-kind-interface">Waku2</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#waku2">waku2</a></p><p>Inherited from RawEnr.waku2</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L164">packages/enr/src/raw_enr.ts:164</a></li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_iterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[iterator]</span><a href="#_iterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_iterator_._iterator_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[iterator]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><a href="#_iterator_._iterator_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an iterable of entries in the map.</p>
2024-04-07 07:56:46 +00:00
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#_iterator_">[iterator]</a></p><p>Inherited from RawEnr.[iterator]</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:119</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="clear" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="clear.clear-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">clear</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#clear">clear</a></p><p>Inherited from RawEnr.clear</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:20</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="delete" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="delete.delete-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true if an element in the Map existed and has been removed, or false if the element does not exist.</p>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#delete">delete</a></p><p>Inherited from RawEnr.delete</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:24</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="entries" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>entries</span><a href="#entries" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="entries.entries-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">entries</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span><a href="#entries.entries-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an iterable of key, value pairs for every entry in the map.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#entries">entries</a></p><p>Inherited from RawEnr.entries</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:124</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="forEach.forEach-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackfn</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Executes a provided function once per each key/value pair in the Map, in insertion order.</p>
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callbackfn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">key</span>, <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span>, <span class="tsd-kind-parameter">key</span>, <span class="tsd-kind-parameter">map</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">map</span>: <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#forEach">forEach</a></p><p>Inherited from RawEnr.forEach</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:28</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="get" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="get.get-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.</p>
2024-02-26 21:11:31 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></h4><p>Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.</p>
2024-07-23 15:26:52 +00:00
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#get">get</a></p><p>Inherited from RawEnr.get</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:33</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getAllLocationMultiaddrs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>All<wbr/>Location<wbr/>Multiaddrs</span><a href="#getAllLocationMultiaddrs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getAllLocationMultiaddrs.getAllLocationMultiaddrs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>All<wbr/>Location<wbr/>Multiaddrs</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span><a href="#getAllLocationMultiaddrs.getAllLocationMultiaddrs-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L98">packages/enr/src/enr.ts:98</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getFullMultiaddr" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Full<wbr/>Multiaddr</span><a href="#getFullMultiaddr" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getFullMultiaddr.getFullMultiaddr-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Full<wbr/>Multiaddr</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">protocol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Multiaddr</span><a href="#getFullMultiaddr.getFullMultiaddr-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the full multiaddr from the ENR fields matching the provided
2022-09-09 16:11:18 +00:00
<code>protocol</code> parameter.
To return full multiaddrs from the <code>multiaddrs</code> ENR field,
2023-09-21 08:59:21 +00:00
use <a href="_waku_enr.ENR.html#getFullMultiaddrs" class="tsd-kind-method">ENR.getFullMultiaddrs</a>.</p>
2024-07-23 15:26:52 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">protocol</span>: <a href="../enums/_waku_enr.TransportProtocol.html" class="tsd-signature-type tsd-kind-enum">TransportProtocol</a><span class="tsd-signature-symbol"> | </span><a href="../enums/_waku_enr.TransportProtocolPerIpVersion.html" class="tsd-signature-type tsd-kind-enum">TransportProtocolPerIpVersion</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Multiaddr</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L135">packages/enr/src/enr.ts:135</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="getFullMultiaddrs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Full<wbr/>Multiaddrs</span><a href="#getFullMultiaddrs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="getFullMultiaddrs.getFullMultiaddrs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Full<wbr/>Multiaddrs</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span><a href="#getFullMultiaddrs.getFullMultiaddrs-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the full multiaddrs from the <code>multiaddrs</code> ENR field.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Multiaddr</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#getFullMultiaddrs">getFullMultiaddrs</a></p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L150">packages/enr/src/enr.ts:150</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="has" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>has</span><a href="#has" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="has.has-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">has</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">key</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#has.has-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>boolean indicating whether an element with the specified key exists or not.</p>
2024-04-07 07:56:46 +00:00
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#has">has</a></p><p>Inherited from RawEnr.has</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:37</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="keys" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>keys</span><a href="#keys" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="keys.keys-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">keys</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#keys.keys-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an iterable of keys in the map</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#keys">keys</a></p><p>Inherited from RawEnr.keys</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:129</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="set" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set</span><a href="#set" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-signature tsd-anchor-link"><a id="set.set-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">k</span>, <span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#set.set-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.</p>
2024-07-23 15:26:52 +00:00
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">k</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#set">set</a></p><p>Inherited from RawEnr.set</p><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/raw_enr.ts#L34">packages/enr/src/raw_enr.ts:34</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="setLocationMultiaddr" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Location<wbr/>Multiaddr</span><a href="#setLocationMultiaddr" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="setLocationMultiaddr.setLocationMultiaddr-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Location<wbr/>Multiaddr</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">multiaddr</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setLocationMultiaddr.setLocationMultiaddr-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">multiaddr</span>: <span class="tsd-signature-type">Multiaddr</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L74">packages/enr/src/enr.ts:74</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="sign" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>sign</span><a href="#sign" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="sign.sign-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">sign</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">privateKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span><a href="#sign.sign-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><span class="tsd-kind-parameter">privateKey</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://githu
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/_waku_interfaces.IEnr.html">IEnr</a>.<a href="../interfaces/_waku_interfaces.IEnr.html#values">values</a></p><p>Inherited from RawEnr.values</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:134</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="verify" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>verify</span><a href="#verify" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="verify.verify-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">verify</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">signature</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#verify.verify-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">Uint8Array</span></span></li><li><span><span class="tsd-kind-parameter">signature</span>: <span class="tsd-signature-type">Uint8Array</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/waku-org/js-waku/blob/04bd51821/packages/enr/src/enr.ts#L160">packages/enr/src/enr.ts:160</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="create" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>create</span><a href="#create" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="create.create-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">kvs</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">seq</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">signature</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_waku_enr.ENR.html" class="tsd-signature-type tsd-kind-class">ENR</a><span class="tsd-signature-symbol">&gt;</span><a href="#create.create-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">kvs</span>: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = {}</span></span></li><li><span><span class="tsd-kind-parameter">seq</span>: <span class="tsd-signature-type">bigint</span><span cla