mirror of
https://github.com/acid-info/docs.wakuconnect.dev.git
synced 2025-02-22 22:58:04 +00:00
762 lines
16 KiB
HTML
762 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="Nwaku Service Node # JS-Waku nodes join the Waku network by connecting to service nodes using secure websocket.
|
|
Nwaku (prev. nim-waku) is the reference implementation of the Waku v2 protocol and can be used as a service node.
|
|
When using { bootstrap: { default: true } }, the js-waku node connects to a fleet of nwaku nodes operated by Status.
|
|
It is also possible to deploy your own nwaku node by following these instructions.">
|
|
<meta name="theme-color" content="#FFFFFF">
|
|
<meta name="color-scheme" content="light dark"><meta property="og:title" content="Nwaku Service Node" />
|
|
<meta property="og:description" content="Nwaku Service Node # JS-Waku nodes join the Waku network by connecting to service nodes using secure websocket.
|
|
Nwaku (prev. nim-waku) is the reference implementation of the Waku v2 protocol and can be used as a service node.
|
|
When using { bootstrap: { default: true } }, the js-waku node connects to a fleet of nwaku nodes operated by Status.
|
|
It is also possible to deploy your own nwaku node by following these instructions." />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://docs.wakuconnect.dev/docs/guides/11_nwaku/" /><meta property="article:section" content="docs" />
|
|
<meta property="article:published_time" content="2022-02-17T00:00:00+01:00" />
|
|
<meta property="article:modified_time" content="2022-02-21T11:24:40+11:00" />
|
|
|
|
<title>Nwaku Service Node | Waku Connect Docs</title>
|
|
<link rel="manifest" href="/manifest.json">
|
|
<link rel="icon" href="/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/book.min.89a77f7e702a8626749b948bbfb01109823daf6c1246ca407d1378833494c402.css" integrity="sha256-iad/fnAqhiZ0m5SLv7ARCYI9r2wSRspAfRN4gzSUxAI=" crossorigin="anonymous">
|
|
<script defer src="/flexsearch.min.js"></script>
|
|
<script defer src="/en.search.min.0d177fc31f8c8c2725b8432ee3b9a0c2b844f8660d18295053409cfed9db3843.js" integrity="sha256-DRd/wx+MjCcluEMu47mgwrhE+GYNGClQU0Cc/tnbOEM=" crossorigin="anonymous"></script>
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
|
|
</head>
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a class="flex align-center" href="/"><span>Waku Connect Docs</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="book-languages">
|
|
<li>
|
|
<input type="checkbox" id="languages" class="toggle" />
|
|
<label for="languages" class="flex justify-between">
|
|
<a role="button" class="flex align-center">
|
|
<img src="/svg/translate.svg" class="book-icon" alt="Languages" />
|
|
English
|
|
</a>
|
|
</label>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://docs.wakuconnect.dev/es/">
|
|
Español
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://docs.wakuconnect.dev/pt/">
|
|
Português
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/introduction/" class="">Introduction</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/quick_start/" class="">Quick Start</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/use_cases/" class="">Use Cases</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/presentations/" class="">Presentations & Videos</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/" class="">Guides</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/01_choose_content_topic/" class="">How to Choose a Content Topic</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/02_relay_receive_send_messages/" class="">Receive and Send Messages Using Waku Relay</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/03_store_retrieve_messages/" class="">Retrieve Messages Using Waku Store</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/04_encrypt_messages_version_1/" class="">Encrypt Messages Using Waku Message Version 1</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/05_sign_messages_version_1/" class="">Sign Messages Using Waku Message Version 1</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/06_light_push_send_messages/" class="">Send Messages Using Waku Light Push</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/10_angular_relay/" class="">Send and Receive Messages Using Waku Relay With Angular v13</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/07_reactjs_relay/" class="">Receive and Send Messages Using Waku Relay With ReactJS</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/08_reactjs_store/" class="">Retrieve Messages Using Waku Store With ReactJS</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/09_debug/" class="">How to Debug your Waku dApp</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/11_nwaku/" class=" active">Nwaku Service Node</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/" class="">Vote Poll Sdk</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/dapp_creation/" class="">Create a DApp</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/dapp_creation/01_create_dapp/" class="">Create the DApp and Install Dependencies</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/dapp_creation/02_connect_wallet/" class="">Connect to the Ethereum Wallet</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/dapp_creation/03_connect_walle_usedapp/" class="">Connect to the Ethereum Wallet useDapp</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/poll_sdk/" class="">Poll SDK</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/poll_sdk/01_create-a-poll_button/" class="">Create-A-Poll Button</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/poll_sdk/02_poll_creation/" class="">Poll Creation Component</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/poll_sdk/03_poll_list/" class="">Poll List Component</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/vote_sdk/" class="">Vote SDK</a>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/vote_sdk/01_deploying_smart_contract/" class="">Deploy smart contract</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/vote_sdk/02_voting_creation/" class="">Creating Voting component</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/guides/vote_poll_sdk/vote_sdk/03_using_voting/" class="">Use Voting Component</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/examples/" class="">Examples</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/crypto_libraries/" class="">Cryptographic Libraries</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
|
|
|
|
<a href="https://docs.wakuconnect.dev/docs/waku_protocols/" class="">Implemented Waku Protocols</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://js-waku.wakuconnect.dev/" target="_blank" rel="noopener">
|
|
JS-Waku API Doc
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://vac.dev/" target="_blank" rel="noopener">
|
|
Vac Team
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://rfc.vac.dev/" target="_blank" rel="noopener">
|
|
Vac RFCs
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://status.im/" target="_blank" rel="noopener">
|
|
Status.im
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var a=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(b){localStorage.setItem("menu.scrollTop",a.scrollTop)}),a.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<strong>Nwaku Service Node</strong>
|
|
|
|
<label for="toc-control">
|
|
|
|
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
|
|
|
|
</label>
|
|
</div>
|
|
|
|
|
|
|
|
<aside class="hidden clearfix">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#nwaku-service-node">Nwaku Service Node</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<article class="markdown"><h1 id="nwaku-service-node">
|
|
Nwaku Service Node
|
|
<a class="anchor" href="#nwaku-service-node">#</a>
|
|
</h1>
|
|
<p>JS-Waku nodes join the Waku network by connecting to service nodes using secure websocket.</p>
|
|
<p><a href="https://github.com/status-im/nim-waku/tree/master/waku/v2">Nwaku (prev. nim-waku)</a>
|
|
is the reference implementation of the Waku v2 protocol and can be used as a service node.</p>
|
|
<p>When using <a href="https://js-waku.wakuconnect.dev/interfaces/discovery.BootstrapOptions.html#default"><code>{ bootstrap: { default: true } }</code></a>,
|
|
the js-waku node connects to a fleet of nwaku nodes operated by Status.</p>
|
|
<p>It is also possible to deploy your own nwaku node by following <a href="https://github.com/status-im/nim-waku/tree/master/waku/v2#enabling-websocket">these instructions</a>.
|
|
Be sure to setup your nwaku node with a valid SSL certificate or js-waku nodes may fail silently to connect to it.</p>
|
|
<blockquote class="book-hint info">
|
|
We are making it easier for operators to run their own nodes,
|
|
this is effort is tracked with <a href="https://github.com/status-im/nim-waku/issues/828">status-im/nim-waku#828</a>.
|
|
</blockquote>
|
|
|
|
<p>You may wish to connect your nwaku node to the rest of the fleet.
|
|
This can be done with the <code>--staticnode</code> or <code>--dns-discovery-url</code>.
|
|
For example:</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh"><span style="color:#e6db74">`</span>wakunode2 <span style="color:#ae81ff">\
|
|
</span><span style="color:#ae81ff"></span> --dns-discovery<span style="color:#f92672">=</span>true <span style="color:#ae81ff">\
|
|
</span><span style="color:#ae81ff"></span> --dns-discovery-url<span style="color:#f92672">=</span>enrtree://ANTL4SLG2COUILKAPE7EF2BYNL2SHSHVCHLRD5J7ZJLN5R3PRJD2Y@prod.waku.nodes.status.im
|
|
</code></pre></div><p>You can then use <a href="https://js-waku.wakuconnect.dev/interfaces/discovery.BootstrapOptions.html#peers"><code>bootstrap.peers</code></a>
|
|
to pass the multiaddr of your node.</p>
|
|
<p>For example (replace the multiaddr with your node’s).</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-js" data-lang="js"><span style="color:#66d9ef">import</span> { <span style="color:#a6e22e">Waku</span> } <span style="color:#a6e22e">from</span> <span style="color:#e6db74">"js-waku"</span>;
|
|
|
|
<span style="color:#66d9ef">const</span> <span style="color:#a6e22e">waku</span> <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> <span style="color:#a6e22e">Waku</span>.<span style="color:#a6e22e">create</span>({
|
|
<span style="color:#a6e22e">bootstrap</span><span style="color:#f92672">:</span> {
|
|
<span style="color:#a6e22e">peers</span><span style="color:#f92672">:</span> [
|
|
<span style="color:#e6db74">"/dns4/node-01.ac-cn-hongkong-c.wakuv2.test.statusim.net/tcp/443/wss/p2p/16Uiu2HAkvWiyFsgRhuJEb9JfjYxEkoHLgnUQmr1N5mKWnYjxYRVm"</span>,
|
|
],
|
|
},
|
|
});
|
|
</code></pre></div></article>
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
<div><a class="flex align-center" href="https://github.com/vacp2p/docs.wakuconnect.dev/commit/915426b852c6d831f6d86c1c81dcbfab86705d07" title='Last modified by Franck R | Feb 21, 2022' target="_blank" rel="noopener">
|
|
<img src="/svg/calendar.svg" class="book-icon" alt="Calendar" />
|
|
<span>Feb 21, 2022</span>
|
|
</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<a class="flex align-center" href="https://github.com/vacp2p/docs.wakuconnect.dev/edit/develop/content/docs/guides/11_nwaku.md" target="_blank" rel="noopener">
|
|
<img src="/svg/edit.svg" class="book-icon" alt="Edit" />
|
|
<span>Edit this page</span>
|
|
</a>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>(function(){function a(c){const a=window.getSelection(),b=document.createRange();b.selectNodeContents(c),a.removeAllRanges(),a.addRange(b)}document.querySelectorAll("pre code").forEach(b=>{b.addEventListener("click",function(c){a(b.parentElement),navigator.clipboard&&navigator.clipboard.writeText(b.parentElement.textContent)})})})()</script>
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<div class="book-comments">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
<aside class="book-toc">
|
|
<div class="book-toc-content">
|
|
|
|
|
|
<nav id="TableOfContents">
|
|
<ul>
|
|
<li><a href="#nwaku-service-node">Nwaku Service Node</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|