Re-organise the docs to have clear CTAs (#251)

* Split website in 4:

- build
- run node
- learn
- research

* only show pages of section in sidebar

* home button on each sidebar

* index.md for homepages

* Add video tutorials

* delete old getting-started

* rename to "Waku node"

* fix nwaku compose

* add to dict

* script revert research changes

* fix broken links

* move research index content

* move research folder under learn

* move research folder under learn: side bar and buttons

* remove pointless links
This commit is contained in:
fryorcraken 2025-10-03 15:54:25 +10:00 committed by GitHub
parent 1da7137dfc
commit 0cb2be1c35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
91 changed files with 569 additions and 813 deletions

View File

@ -83,7 +83,20 @@
"IPFS",
"cheatsheet",
"hacken",
"statusteam"
"statusteam",
"pubkey",
"multiaddresses",
"peerstore",
"addrs",
"cred",
"Kadmelia",
"storev",
"unsubs",
"Linea",
"upnp",
"dnsaddr",
"multiaddress",
"Kademlia's"
],
"flagWords": [],
"ignorePaths": [

View File

@ -13,7 +13,7 @@ If you do not set up a bootstrap node or discovery mechanism, your node will not
:::
:::tip
Until [node incentivisation](/learn/research#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/#run-a-waku-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
Until [node incentivisation](/learn/research#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/run-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
:::
## Default bootstrap method
@ -81,7 +81,7 @@ await Promise.all(promises);
```
:::tip
For local development using a `nwaku` node, use a `ws` address instead of `wss`. Remember that this setup is functional only when your web server is running locally. You can check how to get multi address of your locally run node in [Find node address](/guides/nwaku/find-node-address).
For local development using a `nwaku` node, use a `ws` address instead of `wss`. Remember that this setup is functional only when your web server is running locally. You can check how to get multi address of your locally run node in [Find node address](/run-node/find-node-address).
:::
## Configure DNS discovery

View File

@ -1,9 +1,10 @@
---
title: Debug Your Waku DApp and WebSocket
hide_table_of_contents: true
displayed_sidebar: build
---
This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in [nwaku](/guides/nwaku/run-node).
This guide provides detailed steps to enable and use debug logs to troubleshoot your Waku DApp, whether in a NodeJS or browser environment and check your WebSocket connections in [nwaku](/run-node/).
## Enabling debug logs
@ -45,7 +46,7 @@ To view debug logs in your browser's console, modify the local storage and add t
## Checking WebSocket setup
[Nwaku](/guides/nwaku/run-node) provides native support for WebSocket (`ws`) and WebSocket Secure (`wss`) protocols. These are the only [transports](/learn/concepts/transports) supported for connecting to the Waku Network via browsers.
[Nwaku](/run-node/) provides native support for WebSocket (`ws`) and WebSocket Secure (`wss`) protocols. These are the only [transports](/learn/concepts/transports) supported for connecting to the Waku Network via browsers.
It's important to note that browsers impose certain limitations on WebSocket usage:

56
docs/build/javascript/faq.md vendored Normal file
View File

@ -0,0 +1,56 @@
---
title: JavaScript SDK FAQ
hide_table_of_contents: true
sidebar_label: Frequently Asked Questions
displayed_sidebar: build
---
import { AccordionItem } from '@site/src/components/mdx'
<AccordionItem title="How do I install the @waku/sdk package in my project?">
You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the <a href="/build/javascript/#installation">installation guide</a> to get started.
</AccordionItem>
<AccordionItem title="Why should I use Protocol Buffers for my application's message structure when using Waku?">
Protocol Buffers ensure consistent formatting, interoperability, and backward compatibility for your application's messages, with a smaller payload size than JSON. Check out the <a href="/build/javascript/#message-structure">installation guide</a> and <a href="https://protobuf.dev/overview/">Protobuf documentation</a> to learn more.
</AccordionItem>
<AccordionItem title="What are the steps to retrieve historical messages on Waku?">
Check out the <a href="/build/javascript/store-retrieve-messages">Retrieve Messages Using Store Protocol</a> guide to learn how to retrieve and filter historical messages using the <a href="/learn/concepts/protocols#store">Store protocol</a>.
</AccordionItem>
<AccordionItem title="How can I prevent Store peers from storing my messages?">
When <a href="/build/javascript/light-send-receive#choose-a-content-topic">creating your message encoder</a>, you can configure the <strong>ephemeral</strong> option to prevent Store peers from keeping your messages on the Waku Network.
</AccordionItem>
<AccordionItem title="How can I encrypt, decrypt, and sign messages in my Waku application?">
You can encrypt and decrypt your messages using symmetric, ECIES, and noise encryption methods. Check out the <a href="/build/javascript/message-encryption">Encrypt, Decrypt, and Sign Your Messages</a> guide to get started.
</AccordionItem>
<AccordionItem title="How do I integrate Waku into a React application?">
Waku has a specialized SDK designed for building React applications. Check out the <a href="/build/javascript/use-waku-react">Build React DApps Using @waku/react</a> guide for instructions on installation and usage.
</AccordionItem>
<AccordionItem title="How can I bootstrap and discover peers in the Waku Network for browser nodes?">
The JavaScript SDK has a <a href="/build/javascript/configure-discovery#default-bootstrap-method">default bootstrap method</a> that can be configured with <a href="/learn/concepts/static-peers">Static Peers</a> and <a href="/learn/concepts/dns-discovery">DNS Discovery</a>. Check out the <a href="/build/javascript/configure-discovery">Bootstrap Nodes and Discover Peers</a> guide for setting up peer discovery for your node.
</AccordionItem>
<AccordionItem title="How can I integrate Waku into a NodeJS application?">
Though the JavaScript SDK isn't directly usable in NodeJS due to <a href="/build/javascript/run-waku-nodejs">certain limitations</a>, we recommend running <a href="/run-node/run-docker-compose">nwaku in a Docker container</a> and consuming its <a href="https://waku-org.github.io/waku-rest-api/">REST API</a> in a NodeJS application.
</AccordionItem>
<AccordionItem title="How can I debug my Waku DApp and check WebSocket connections?">
Check out the <a href="/build/javascript/debug-waku-dapp">Debug Your Waku DApp and WebSocket</a> guide to discover how to use debug logs to troubleshoot your Waku DApp and resolve connection issues with nwaku WebSockets.
</AccordionItem>
<AccordionItem title="How can I manage unexpected disconnections of my Filter subscription from Waku?">
We recommend regularly pinging peers to check for an active connection and reinitiating the subscription when it disconnects. Check out the <a href="/build/javascript/manage-filter">Manage Your Filter Subscriptions</a> guide for a detailed explanation and step-by-step instructions.
</AccordionItem>
<AccordionItem title="How can I send images and videos on the Waku Network?">
While it's possible to transmit media such as images as bytes on Waku, we recommend uploading your media to a CDN or a file system like <a href="https://ipfs.tech/">IPFS</a> and then sharing the corresponding URL via Waku.
</AccordionItem>
<AccordionItem title="How can I connect to my own node?">
To manually set your own node as a starting point use <a href="/build/javascript/configure-discovery#configure-static-peers">Configure static peers</a>.
</AccordionItem>

118
docs/build/javascript/index.md vendored Normal file
View File

@ -0,0 +1,118 @@
---
title: JavaScript Waku SDK
hide_table_of_contents: true
displayed_sidebar: build
---
:::caution
Currently, the JavaScript Waku SDK (`@waku/sdk`) is **NOT compatible** with React Native. We plan to add support for React Native in the future.
:::
The [JavaScript Waku SDK](https://github.com/waku-org/js-waku) (`@waku/sdk`) provides a TypeScript implementation of the [Waku protocol](/) designed for web browser environments. Developers can seamlessly integrate Waku functionalities into web applications, enabling efficient communication and collaboration among users using the `@waku/sdk` package.
## Video Tutorials
<div class="video-container">
<iframe class="yt-video two-items" src="https://www.youtube.com/embed/PYQaXCxUCwA" title="Waku Tutorial 001: Introduction to Waku" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe class="yt-video two-items" src="https://www.youtube.com/embed/sfmMcrbiX0c" title="Build a game using Waku Protocol" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
## Installation
Install the `@waku/sdk` package using your preferred package manager:
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
<Tabs groupId="package-manager">
<TabItem value="npm" label="NPM">
```shell
npm install @waku/sdk
```
</TabItem>
<TabItem value="yarn" label="Yarn">
```shell
yarn add @waku/sdk
```
</TabItem>
</Tabs>
You can also use the `@waku/sdk` package via a CDN without installing it on your system:
```js
import * as waku from "https://unpkg.com/@waku/sdk@latest/bundle/index.js";
```
## Message structure
We recommend creating a message structure for your application using [Protocol Buffers](https://protobuf.dev/) for the following reasons:
1. **Consistency:** Ensures uniform message format for easy parsing and processing.
2. **Interoperability:** Facilitates effective communication between different parts of your application.
3. **Compatibility:** Allows smooth communication between older and newer app versions.
4. **Payload Size:** Minimizes payload overhead, especially for byte arrays, unlike JSON which adds significant overhead.
To get started, install the `protobufjs` package using your preferred package manager:
<Tabs groupId="package-manager">
<TabItem value="npm" label="NPM">
```shell
npm install protobufjs
```
</TabItem>
<TabItem value="yarn" label="Yarn">
```shell
yarn add protobufjs
```
</TabItem>
</Tabs>
You can also use the `protobufjs` package via a CDN without installing it on your system:
```js
// Import the CDN
import "https://cdn.jsdelivr.net/npm/protobufjs@latest/dist/protobuf.min.js";
```
```html
<!-- Or include the protobufjs script -->
<script src="https://cdn.jsdelivr.net/npm/protobufjs@latest/dist/protobuf.min.js"></script>
```
## Getting started
Have a look at the quick start guide and comprehensive tutorials to learn how to build applications using `@waku/sdk`:
| Guide | Description |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Send and Receive Messages in a Reliable Channel](/build/javascript/reliable-channels) | Learn how to send and receive messages with a convenient SDK that provide various reliable functionalities out-of-the-box. |
| [Send and Receive Messages Using Light Push and Filter](/build/javascript/light-send-receive) | Learn how to send and receive messages on light nodes using the [Light Push](/learn/concepts/protocols#light-push) and [Filter](/learn/concepts/protocols#filter) protocols |
| [Retrieve Messages Using Store Protocol](/build/javascript/store-retrieve-messages) | Learn how to retrieve and filter historical messages on light nodes using the [Store protocol](/learn/concepts/protocols#store) |
| [Encrypt, Decrypt, and Sign Your Messages](/build/javascript/message-encryption) | Learn how to use the [@waku/message-encryption](https://www.npmjs.com/package/@waku/message-encryption) package to encrypt, decrypt, and sign your messages |
| [Build React DApps Using @waku/react](/build/javascript/use-waku-react) | Learn how to use the [@waku/react](https://www.npmjs.com/package/@waku/react) package seamlessly integrate `@waku/sdk` into a React application |
| [Scaffold DApps Using @waku/create-app](/build/javascript/use-waku-create-app) | Learn how to use the [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) package to bootstrap your next `@waku/sdk` project from various example templates |
| [Bootstrap Nodes and Discover Peers](/build/javascript/configure-discovery) | Learn how to bootstrap your node using [Static Peers](/learn/concepts/static-peers) and discover peers using [DNS Discovery](/learn/concepts/dns-discovery) |
| [Run @waku/sdk in a NodeJS Application](/build/javascript/run-waku-nodejs) | Learn our suggested approach for using the `@waku/sdk` package within a NodeJS application |
| [Debug Your Waku DApp and WebSocket](/build/javascript/debug-waku-dapp) | Learn how to troubleshoot your Waku DApp using debug logs and check [WebSocket](/learn/concepts/transports) connections in [nwaku](/run-node/) |
| [Manage Your Filter Subscriptions](/build/javascript/manage-filter) | Learn how to manage [filter subscriptions](/learn/concepts/protocols#filter) and handle node disconnections in your application |
:::tip
Until [node incentivisation](/learn/research#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/run-node/) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](/build/javascript/configure-discovery#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
:::
## Get help and report issues
To engage in general discussions, seek assistance, or stay updated with the latest news, visit the `#support` and `#js-waku-contribute` channels on the [Waku Discord](https://discord.waku.org).
If you discover bugs or want to suggest new features, do not hesitate to [open an issue](https://github.com/waku-org/js-waku/issues/new/) in the [js-waku repository](https://github.com/waku-org/js-waku). Your feedback and contributions are highly valued and will help improve the `@waku/sdk` package.

View File

@ -1,9 +1,10 @@
---
title: Send and Receive Messages Using Light Push and Filter
hide_table_of_contents: true
displayed_sidebar: build
---
This guide provides detailed steps to start using the `@waku/sdk` package by setting up a [Light Node](/learn/glossary#light-node) to send messages using the [Light Push protocol](/learn/concepts/protocols#light-push), and receive messages using the [Filter protocol](/learn/concepts/protocols#filter). Have a look at the [installation guide](/guides/js-waku/#installation) for steps on adding `@waku/sdk` to your project.
This guide provides detailed steps to start using the `@waku/sdk` package by setting up a [Light Node](/learn/glossary#light-node) to send messages using the [Light Push protocol](/learn/concepts/protocols#light-push), and receive messages using the [Filter protocol](/learn/concepts/protocols#filter). Have a look at the [installation guide](/build/javascript/#installation) for steps on adding `@waku/sdk` to your project.
## Create a light node
@ -21,7 +22,7 @@ await node.start();
```
:::info
When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes.
When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/build/javascript/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/build/javascript/configure-discovery) guide to learn more methods to bootstrap nodes.
:::
A node needs to know how to route messages. By default, it will use The Waku Network configuration (`{ clusterId: 1, shards: [0,1,2,3,4,5,6,7] }`). For most applications, it's recommended to use autosharding:
@ -85,7 +86,7 @@ const encoder = createEncoder({ contentTopic });
const decoder = createDecoder(contentTopic);
```
The `ephemeral` parameter allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages):
The `ephemeral` parameter allows you to specify whether messages should **NOT** be stored by [Store peers](/build/javascript/store-retrieve-messages):
```js
const encoder = createEncoder({
@ -127,7 +128,7 @@ const DataPacket = new protobuf.Type("DataPacket")
```
:::info
Have a look at the [Protobuf installation](/guides/js-waku/#message-structure) guide for adding the `protobufjs` package to your project.
Have a look at the [Protobuf installation](/build/javascript/#message-structure) guide for adding the `protobufjs` package to your project.
:::
## Send messages using light push

View File

@ -1,9 +1,10 @@
---
title: Manage Your Filter Subscriptions
hide_table_of_contents: true
displayed_sidebar: build
---
This guide provides detailed steps to manage [Filter](/learn/concepts/protocols#filter) subscriptions and handle node disconnections in your application. Have a look at the [Send and Receive Messages Using Light Push and Filter](/guides/js-waku/light-send-receive) guide for using the `Light Push` and `Filter` protocols.
This guide provides detailed steps to manage [Filter](/learn/concepts/protocols#filter) subscriptions and handle node disconnections in your application. Have a look at the [Send and Receive Messages Using Light Push and Filter](/build/javascript/light-send-receive) guide for using the `Light Push` and `Filter` protocols.
## Overview

View File

@ -1,6 +1,7 @@
---
title: Send and Receive Messages in a Reliable Channel
hide_table_of_contents: true
displayed_sidebar: build
---
Learn how to send and receive messages with a convenient SDK that provide various reliable functionalities out-of-the-box.
@ -41,7 +42,7 @@ const node = await createLightNode({ defaultBootstrap: true });
```
:::info
When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes.
When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/build/javascript/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/build/javascript/configure-discovery) guide to learn more methods to bootstrap nodes.
:::
## Create encoders and decoders
@ -59,7 +60,7 @@ const encoder = node.createEncoder({ contentTopic: ct });
const decoder = node.createDecoder({ contentTopic: ct });
```
You can also use [`@waku/message-encryption`](/guides/js-waku/message-encryption) to encrypt and decrypt messages using Waku libraries.
You can also use [`@waku/message-encryption`](/build/javascript/message-encryption) to encrypt and decrypt messages using Waku libraries.
:::info
In this example, users send and receive messages on a shared content topic. However, real applications may have users broadcasting messages while others listen or only have 1:1 exchanges. Waku supports all these use cases.
@ -129,7 +130,7 @@ const DataPacket = new protobuf.Type("DataPacket")
```
:::info
Have a look at the [Protobuf installation](/guides/js-waku/#message-structure) guide for adding the `protobufjs` package to your project.
Have a look at the [Protobuf installation](/build/javascript/#message-structure) guide for adding the `protobufjs` package to your project.
:::
## Listen to incoming messages

View File

@ -1,6 +1,7 @@
---
title: "Run @waku/sdk in a NodeJS Application"
hide_table_of_contents: true
displayed_sidebar: build
---
While the `@waku/sdk` package is primarily designed for browser environments, you can use it in a NodeJS application. However, there are certain limitations and considerations to keep in mind. This guide provides a comprehensive overview of using `@waku/sdk` in NodeJS.
@ -13,7 +14,7 @@ While the `@waku/sdk` package is primarily designed for browser environments, yo
### Protocol implementation
`@waku/sdk` focuses on the client side of the [Request/Response protocol](/learn/concepts/network-domains#requestresponse-domain). We'll have to replicate all the functionalities added to [nwaku](/guides/nwaku/run-node) to implement extra features.
`@waku/sdk` focuses on the client side of the [Request/Response protocol](/learn/concepts/network-domains#requestresponse-domain). We'll have to replicate all the functionalities added to [nwaku](/run-node/) to implement extra features.
### Codebase complexity
@ -27,8 +28,8 @@ Certain features in `@waku/sdk` are tailored for browsers and might not translat
## Recommendations
Before using `@waku/sdk` in a NodeJS environment, take into account these limitations. For a more optimised solution, we recommend [running nwaku in a Docker container](/guides/nwaku/run-docker-compose) and consuming its [REST API](https://waku-org.github.io/waku-rest-api/).
Before using `@waku/sdk` in a NodeJS environment, take into account these limitations. For a more optimised solution, we recommend [running nwaku in a Docker container](/run-node/run-docker-compose) and consuming its [REST API](https://waku-org.github.io/waku-rest-api/).
## Future developments
There are plans to release a NodeJS package based on [nwaku](/guides/nwaku/run-node) to streamline the process of using Waku Network features in NodeJS applications. You can track the progress and updates here: [https://github.com/waku-org/nwaku/issues/1332](https://github.com/waku-org/nwaku/issues/1332).
There are plans to release a NodeJS package based on [nwaku](/run-node/) to streamline the process of using Waku Network features in NodeJS applications. You can track the progress and updates here: [https://github.com/waku-org/nwaku/issues/1332](https://github.com/waku-org/nwaku/issues/1332).

View File

@ -1,6 +1,7 @@
---
title: Retrieve Messages Using Store Protocol
hide_table_of_contents: true
displayed_sidebar: build
---
This guide provides detailed steps to create a Light Node for retrieving and filtering historical messages using the [Store protocol](/learn/concepts/protocols#store).
@ -65,7 +66,7 @@ The `store.queryWithOrderedCallback()` function provides a straightforward metho
- `decoders`: List of `decoders` that specify the `content topic` to query for and their [message decryption](https://rfc.vac.dev/waku/standards/application/26/payload) methods.
- `callback`: The callback function for processing the retrieved messages.
- `options` (optional): [Query options](/guides/js-waku/store-retrieve-messages#store-query-options) to filter the retrieved messages.
- `options` (optional): [Query options](/build/javascript/store-retrieve-messages#store-query-options) to filter the retrieved messages.
```js
// Create the callback function
@ -87,7 +88,7 @@ The `queryWithOrderedCallback()` function always returns the most recent message
The `store.queryGenerator()` function provides more control and flexibility over processing messages retrieved from `Store` nodes through [Async Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncGenerator). It accepts these parameters:
- `decoders`: List of `decoders` that specify the `content topic` to query for and their [message decryption](https://rfc.vac.dev/waku/standards/application/26/payload) methods.
- `options` (optional): [Query options](/guides/js-waku/store-retrieve-messages#store-query-options) to filter the retrieved messages.
- `options` (optional): [Query options](/build/javascript/store-retrieve-messages#store-query-options) to filter the retrieved messages.
```js
// Create the store query

View File

@ -1,6 +1,7 @@
---
title: "Scaffold DApps Using @waku/create-app"
hide_table_of_contents: true
displayed_sidebar: build
---
This guide provides detailed steps to bootstrap your next `@waku/sdk` project from [various example templates](https://github.com/waku-org/js-waku-examples/tree/master/examples) using the [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) package.

View File

@ -1,6 +1,7 @@
---
title: "Build React DApps Using @waku/react"
hide_table_of_contents: true
displayed_sidebar: build
---
:::caution
@ -156,7 +157,7 @@ export default App
```
:::info
In the code above, we also created a message `encoder` and `decoder` using the `createEncoder()` and `createDecoder()` functions, along with the application [message structure](/guides/js-waku/#message-structure) with Protobuf.
In the code above, we also created a message `encoder` and `decoder` using the `createEncoder()` and `createDecoder()` functions, along with the application [message structure](/build/javascript/#message-structure) with Protobuf.
:::
Next, modify the `App.css` file with the following code block:
@ -208,7 +209,7 @@ Next, modify the `App.css` file with the following code block:
## Send messages using light push
To send messages in our application, we need to modify the `sendMessage()` function to serialize user input into our Protobuf structure and [push it to the network](/guides/js-waku/light-send-receive#send-messages-using-light-push) using the `useLightPush()` function:
To send messages in our application, we need to modify the `sendMessage()` function to serialize user input into our Protobuf structure and [push it to the network](/build/javascript/light-send-receive#send-messages-using-light-push) using the `useLightPush()` function:
```js title="src/App.jsx"
import { useLightPush } from "@waku/react";
@ -245,7 +246,7 @@ function App() {
## Receive messages using filter
To display messages in our application, we need to use the `useFilterMessages()` function to create a [Filter subscription](/guides/js-waku/light-send-receive/#receive-messages-using-filter), receive incoming messages, and render them in our interface:
To display messages in our application, we need to use the `useFilterMessages()` function to create a [Filter subscription](/build/javascript/light-send-receive/#receive-messages-using-filter), receive incoming messages, and render them in our interface:
```js title="src/App.jsx"
import { useFilterMessages } from "@waku/react";
@ -266,7 +267,7 @@ function App() {
## Retrieve messages using store
To display messages from the past, we need to retrieve them from the [Store protocol](/guides/js-waku/store-retrieve-messages) using the `useStoreMessages()` function when our application initialises and then render them alongside newly received messages:
To display messages from the past, we need to retrieve them from the [Store protocol](/build/javascript/store-retrieve-messages) using the `useStoreMessages()` function when our application initialises and then render them alongside newly received messages:
```js title="src/App.jsx"
import { useFilterMessages, useStoreMessages } from "@waku/react";
@ -303,7 +304,7 @@ const node = await createLightNode({
If the specified Store peer is not available, the node will fall back to using random Store peers in the network.
:::info
To explore the available Store query options, have a look at the [Retrieve Messages Using Store Protocol](/guides/js-waku/store-retrieve-messages#store-query-options) guide.
To explore the available Store query options, have a look at the [Retrieve Messages Using Store Protocol](/build/javascript/store-retrieve-messages#store-query-options) guide.
:::
:::tip

View File

@ -1,93 +0,0 @@
---
title: Introduction to Waku
hide_table_of_contents: true
slug: /
---
Waku is a family of robust, censorship-resistant, peer-to-peer communication protocols that enable privacy-focused messaging for Web3 applications, allowing you to integrate decentralised communication features into your dApp without compromising security or privacy.
```mermaid
graph LR
S1(Message Sender 1) -->|Message 1| W(The Waku Network)
S2(Message Sender 2) -->|Message 2| W
S3(Message Sender 3) -->|Message 3| W
W -->|Message 1| R1(Message Receiver 1)
W -->|Message 2| R1
W -->|Message 3| R2(Message Receiver 2)
```
<div class="video-container">
<iframe class="yt-video" src="https://www.youtube.com/embed/nIWx5Vp_Qxk" title="Waku Tutorial 001: Introduction to Waku" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
:::tip
Check out our [Learn section](/learn/waku-network), [YouTube channel](https://www.youtube.com/@wakuorg), and [Blog](https://blog.waku.org/) to dive into how Waku works behind the scenes!
:::
## What isnt Waku?
- Waku is not a blockchain but a network composed of protocols designed for Web3 communication, operating without the need for gas fees.
- Waku is not just for messaging applications; it supports the development of complex applications that require secure and private data transmission.
- Waku is not a long-term data storage network; it focuses on short, ephemeral, real-time messaging.
## What can Waku be used for?
1. **Chat Messengers**: Waku can be used to build private, decentralised chat apps resistant to censorship.
2. **Voting and Proposals**: Exchange votes on proposals off-chain via Waku to save gas fees, then submit aggregated results to the blockchain.
3. **NFT Marketplaces**: Use Waku to handle off-chain NFT bids and offers for gas savings, and to integrate social interactions like likes and comments.
4. **State Channels**: Establish and maintain state channels with Waku, facilitating seamless message exchanges and updates without blockchain interaction.
5. **Signature Exchange for Multi-Signature Wallets**: Allow multi-signature wallet owners to exchange signatures privately and securely through Waku.
6. **Game Mechanics Communication**: Implement Waku as a communication layer for decentralised, peer-to-peer gaming, avoiding centralised infrastructure.
7. **Layer 2 Coordination (Open Market, Spam Protected Mempool)**: Broadcast and aggregate Layer 2 transactions via Waku to enhance privacy and scalability, reducing network load.
8. **Social Media Platforms**: Beyond chat messengers, use Waku for decentralised, censorship-resistant social media platforms like news feeds and multimedia sharing.
:::tip
Looking for what to build with Waku? Discover a collection of sample ideas and use cases for inspiration, curated by our community at: [https://ideas.waku.org/](https://ideas.waku.org/) and [Awesome Waku](https://github.com/waku-org/awesome-waku/).
:::
## Case studies
<div class="case-study-container">
<a href="https://blog.waku.org/2024-05-13-the-graph-case-study/" target="_blank" rel="noopener noreferrer"><img src="/img/graph-use-case.jpeg" /></a>
<a href="https://blog.waku.org/2024-04-26-railgun-case-study/" target="_blank" rel="noopener noreferrer"><img src="/img/railgun-use-case.jpeg" /></a>
</div>
## Getting started
<div class="video-container">
<iframe class="yt-video two-items" src="https://www.youtube.com/embed/PYQaXCxUCwA" title="Waku Tutorial 001: Introduction to Waku" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
<iframe class="yt-video two-items" src="https://www.youtube.com/embed/sfmMcrbiX0c" title="Build a game using Waku Protocol" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
### Run a Waku node
Waku is a decentralised, permissionless system where anyone can run a node, use the network, and contribute to its support. We recommend following the [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) guide and [Waku Node Operator Cheatsheet](/Waku-NodeOperator.pdf) to easily run a node.
<div class="video-container">
<iframe class="yt-video" src="https://www.youtube.com/embed/fs0ynLk4z0I" title="How to run a Waku node using Nwaku Compose" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
:::tip
If you encounter issues running your node or require assistance with anything, please visit the [#node-help channel](https://discord.com/channels/1110799176264056863/1216748184592711691) on our Discord.
:::
### Integrate using SDKs
Waku is implemented in multiple SDKs, allowing it to integrate with different languages and address various use cases efficiently.
| | Description | Documentation |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [@waku/sdk](https://github.com/waku-org/js-waku) | JavaScript/TypeScript SDK designed for browser environments | [JavaScript Waku SDK](/guides/js-waku/) |
| [@waku/react](https://www.npmjs.com/package/@waku/react) | React components and UI adapters designed for seamless integration with `@waku/sdk` | [Build React DApps Using @waku/react](/guides/js-waku/use-waku-react) |
### Other integrations
| | Description | Documentation |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [REST API](https://waku-org.github.io/waku-rest-api/) | REST API interface provided by `nwaku` and `go-waku` to interact with the Waku Network | [Waku Node REST API Reference](https://waku-org.github.io/waku-rest-api/) |
| [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) | Starter kit to bootstrap your next `@waku/sdk` project from various example templates | [Scaffold DApps Using @waku/create-app](/guides/js-waku/use-waku-create-app) |
:::tip
Explore some example apps built using Waku at [https://examples.waku.org/](https://examples.waku.org/) and view a list of projects and workshops from previous hackathons at [Awesome Waku](https://github.com/waku-org/awesome-waku/).
:::

View File

@ -1,55 +0,0 @@
---
title: JavaScript SDK FAQ
hide_table_of_contents: true
sidebar_label: Frequently Asked Questions
---
import { AccordionItem } from '@site/src/components/mdx'
<AccordionItem title="How do I install the @waku/sdk package in my project?">
You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the <a href="/guides/js-waku/#installation">installation guide</a> to get started.
</AccordionItem>
<AccordionItem title="Why should I use Protocol Buffers for my application's message structure when using Waku?">
Protocol Buffers ensure consistent formatting, interoperability, and backward compatibility for your application's messages, with a smaller payload size than JSON. Check out the <a href="/guides/js-waku/#message-structure">installation guide</a> and <a href="https://protobuf.dev/overview/">Protobuf documentation</a> to learn more.
</AccordionItem>
<AccordionItem title="What are the steps to retrieve historical messages on Waku?">
Check out the <a href="/guides/js-waku/store-retrieve-messages">Retrieve Messages Using Store Protocol</a> guide to learn how to retrieve and filter historical messages using the <a href="/learn/concepts/protocols#store">Store protocol</a>.
</AccordionItem>
<AccordionItem title="How can I prevent Store peers from storing my messages?">
When <a href="/guides/js-waku/light-send-receive#choose-a-content-topic">creating your message encoder</a>, you can configure the <strong>ephemeral</strong> option to prevent Store peers from keeping your messages on the Waku Network.
</AccordionItem>
<AccordionItem title="How can I encrypt, decrypt, and sign messages in my Waku application?">
You can encrypt and decrypt your messages using symmetric, ECIES, and noise encryption methods. Check out the <a href="/guides/js-waku/message-encryption">Encrypt, Decrypt, and Sign Your Messages</a> guide to get started.
</AccordionItem>
<AccordionItem title="How do I integrate Waku into a React application?">
Waku has a specialized SDK designed for building React applications. Check out the <a href="/guides/js-waku/use-waku-react">Build React DApps Using @waku/react</a> guide for instructions on installation and usage.
</AccordionItem>
<AccordionItem title="How can I bootstrap and discover peers in the Waku Network for browser nodes?">
The JavaScript SDK has a <a href="/guides/js-waku/configure-discovery#default-bootstrap-method">default bootstrap method</a> that can be configured with <a href="/learn/concepts/static-peers">Static Peers</a> and <a href="/learn/concepts/dns-discovery">DNS Discovery</a>. Check out the <a href="/guides/js-waku/configure-discovery">Bootstrap Nodes and Discover Peers</a> guide for setting up peer discovery for your node.
</AccordionItem>
<AccordionItem title="How can I integrate Waku into a NodeJS application?">
Though the JavaScript SDK isn't directly usable in NodeJS due to <a href="/guides/js-waku/run-waku-nodejs">certain limitations</a>, we recommend running <a href="/guides/nwaku/run-docker-compose">nwaku in a Docker container</a> and consuming its <a href="https://waku-org.github.io/waku-rest-api/">REST API</a> in a NodeJS application.
</AccordionItem>
<AccordionItem title="How can I debug my Waku DApp and check WebSocket connections?">
Check out the <a href="/guides/js-waku/debug-waku-dapp">Debug Your Waku DApp and WebSocket</a> guide to discover how to use debug logs to troubleshoot your Waku DApp and resolve connection issues with nwaku WebSockets.
</AccordionItem>
<AccordionItem title="How can I manage unexpected disconnections of my Filter subscription from Waku?">
We recommend regularly pinging peers to check for an active connection and reinitiating the subscription when it disconnects. Check out the <a href="/guides/js-waku/manage-filter">Manage Your Filter Subscriptions</a> guide for a detailed explanation and step-by-step instructions.
</AccordionItem>
<AccordionItem title="How can I send images and videos on the Waku Network?">
While it's possible to transmit media such as images as bytes on Waku, we recommend uploading your media to a CDN or a file system like <a href="https://ipfs.tech/">IPFS</a> and then sharing the corresponding URL via Waku.
</AccordionItem>
<AccordionItem title="How can I connect to my own node?">
To manually set your own node as a starting point use <a href="/guides/js-waku/configure-discovery#configure-static-peers">Configure static peers</a>.
</AccordionItem>

View File

@ -1,109 +0,0 @@
---
title: JavaScript Waku SDK
hide_table_of_contents: true
---
:::caution
Currently, the JavaScript Waku SDK (`@waku/sdk`) is **NOT compatible** with React Native. We plan to add support for React Native in the future.
:::
The [JavaScript Waku SDK](https://github.com/waku-org/js-waku) (`@waku/sdk`) provides a TypeScript implementation of the [Waku protocol](/) designed for web browser environments. Developers can seamlessly integrate Waku functionalities into web applications, enabling efficient communication and collaboration among users using the `@waku/sdk` package.
## Installation
Install the `@waku/sdk` package using your preferred package manager:
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
<Tabs groupId="package-manager">
<TabItem value="npm" label="NPM">
```shell
npm install @waku/sdk
```
</TabItem>
<TabItem value="yarn" label="Yarn">
```shell
yarn add @waku/sdk
```
</TabItem>
</Tabs>
You can also use the `@waku/sdk` package via a CDN without installing it on your system:
```js
import * as waku from "https://unpkg.com/@waku/sdk@latest/bundle/index.js";
```
## Message structure
We recommend creating a message structure for your application using [Protocol Buffers](https://protobuf.dev/) for the following reasons:
1. **Consistency:** Ensures uniform message format for easy parsing and processing.
2. **Interoperability:** Facilitates effective communication between different parts of your application.
3. **Compatibility:** Allows smooth communication between older and newer app versions.
4. **Payload Size:** Minimizes payload overhead, especially for byte arrays, unlike JSON which adds significant overhead.
To get started, install the `protobufjs` package using your preferred package manager:
<Tabs groupId="package-manager">
<TabItem value="npm" label="NPM">
```shell
npm install protobufjs
```
</TabItem>
<TabItem value="yarn" label="Yarn">
```shell
yarn add protobufjs
```
</TabItem>
</Tabs>
You can also use the `protobufjs` package via a CDN without installing it on your system:
```js
// Import the CDN
import "https://cdn.jsdelivr.net/npm/protobufjs@latest/dist/protobuf.min.js";
```
```html
<!-- Or include the protobufjs script -->
<script src="https://cdn.jsdelivr.net/npm/protobufjs@latest/dist/protobuf.min.js"></script>
```
## Getting started
Have a look at the quick start guide and comprehensive tutorials to learn how to build applications using `@waku/sdk`:
| Guide | Description |
|---------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Send and Receive Messages in a Reliable Channel](/guides/js-waku/reliable-channels) | Learn how to send and receive messages with a convenient SDK that provide various reliable functionalities out-of-the-box. |
| [Send and Receive Messages Using Light Push and Filter](/guides/js-waku/light-send-receive) | Learn how to send and receive messages on light nodes using the [Light Push](/learn/concepts/protocols#light-push) and [Filter](/learn/concepts/protocols#filter) protocols |
| [Retrieve Messages Using Store Protocol](/guides/js-waku/store-retrieve-messages) | Learn how to retrieve and filter historical messages on light nodes using the [Store protocol](/learn/concepts/protocols#store) |
| [Encrypt, Decrypt, and Sign Your Messages](/guides/js-waku/message-encryption) | Learn how to use the [@waku/message-encryption](https://www.npmjs.com/package/@waku/message-encryption) package to encrypt, decrypt, and sign your messages |
| [Build React DApps Using @waku/react](/guides/js-waku/use-waku-react) | Learn how to use the [@waku/react](https://www.npmjs.com/package/@waku/react) package seamlessly integrate `@waku/sdk` into a React application |
| [Scaffold DApps Using @waku/create-app](/guides/js-waku/use-waku-create-app) | Learn how to use the [@waku/create-app](https://www.npmjs.com/package/@waku/create-app) package to bootstrap your next `@waku/sdk` project from various example templates |
| [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) | Learn how to bootstrap your node using [Static Peers](/learn/concepts/static-peers) and discover peers using [DNS Discovery](/learn/concepts/dns-discovery) |
| [Run @waku/sdk in a NodeJS Application](/guides/js-waku/run-waku-nodejs) | Learn our suggested approach for using the `@waku/sdk` package within a NodeJS application |
| [Debug Your Waku DApp and WebSocket](/guides/js-waku/debug-waku-dapp) | Learn how to troubleshoot your Waku DApp using debug logs and check [WebSocket](/learn/concepts/transports) connections in [nwaku](/guides/nwaku/run-node) |
| [Manage Your Filter Subscriptions](/guides/js-waku/manage-filter) | Learn how to manage [filter subscriptions](/learn/concepts/protocols#filter) and handle node disconnections in your application |
:::tip
Until [node incentivisation](/learn/research#prevention-of-denial-of-service-dos-and-node-incentivisation) is in place, you should [operate extra nodes](/#run-a-waku-node) alongside the ones provided by the Waku Network. When running a node, we recommend using the [DNS Discovery and Static Peers](/guides/js-waku/configure-discovery#configure-dns-discovery-and-static-peers) configuration to connect to both the Waku Network and your node.
:::
## Get help and report issues
To engage in general discussions, seek assistance, or stay updated with the latest news, visit the `#support` and `#js-waku-contribute` channels on the [Waku Discord](https://discord.waku.org).
If you discover bugs or want to suggest new features, do not hesitate to [open an issue](https://github.com/waku-org/js-waku/issues/new/) in the [js-waku repository](https://github.com/waku-org/js-waku). Your feedback and contributions are highly valued and will help improve the `@waku/sdk` package.

View File

@ -1,141 +0,0 @@
---
title: Run a Nwaku Node
hide_table_of_contents: true
---
Nwaku is a lightweight and robust Nim client for running a Waku node, equipped with tools to monitor and maintain a running node. Nwaku is highly configurable, enabling operators to select the [protocols](/learn/concepts/protocols) they want to support based on their needs, motivations, and available resources.
![waku architecture](/img/architecture.png)
This guide provides detailed steps to download, build, configure, and connect a `nwaku` node to the Waku Network. It also includes interacting with the node and finding its addresses.
:::info
We recommend running a `nwaku` node with at least 2GB of RAM, especially if `WSS` is enabled. If running just a `Relay` node, 0.5GB of RAM is sufficient.
:::
## Get the node binary
To run a node, you must have the `nwaku` binary. Nwaku provides multiple options for running a node:
#### Run nwaku in Docker (recommended)
We recommend [using Docker Compose](/guides/nwaku/run-docker-compose) to run a node because it's the simplest and fastest way to configure and run one:
| | Description | Documentation |
| ---------------- | ---------------------------------------- | ----------------------------------------------------------------- |
| Docker Compose | Run a `nwaku` node with Docker Compose | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) |
| Docker Container | Run a `nwaku` node in a Docker Container | [Run Nwaku in a Docker Container](/guides/nwaku/run-docker) |
#### Download the binary
| | Description | Documentation |
| ------------------ | ------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Precompiled Binary | Download a precompiled binary of the `nwaku` node | [Download Nwaku Binary](https://github.com/waku-org/nwaku/tags) |
| Nightly Release | Try the latest `nwaku` updates without compiling the binaries | [Download Nightly Release](https://github.com/waku-org/nwaku/releases/tag/nightly) |
#### Build the binary
| | Description | Documentation |
| ----------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------- |
| Build from Source | Build the node from the [nwaku source code](https://github.com/waku-org/nwaku) | [Build Nwaku from Source](/guides/nwaku/build-source) |
:::tip
You can run the `nwaku` binaries and Docker images on cloud service providers like [Google Cloud](https://cloud.google.com/), [Microsoft Azure](https://azure.microsoft.com/), [Amazon Web Services](https://aws.amazon.com/), and [DigitalOcean](https://www.digitalocean.com/).
:::
## Run the node
Once you have gotten the `nwaku` binary, run it using the [default configuration](/guides/nwaku/config-methods#default-configuration-values):
```shell
# Run the Docker Compose
docker-compose up -d
# Run the standalone binary
./build/wakunode2
```
:::tip
To learn how to customise the configuration of a `nwaku` node, have a look at the [Node Configuration Methods](/guides/nwaku/config-methods) and [Node Configuration Examples](/guides/nwaku/configure-nwaku) guides.
:::
## Bootstrap the node
To join the Waku Network, nodes must [bootstrap](/learn/glossary#bootstrapping) for an entry point before discovering more peers. Nwaku provides multiple [peer discovery](/learn/concepts/peer-discovery) mechanisms:
| | Description | Documentation |
| ------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| Static Peers | Configure the bootstrap nodes that `nwaku` should establish connections upon startup | [Configure Static Peers](/guides/nwaku/configure-discovery#configure-static-peers) |
| DNS Discovery | Enable `nwaku` to bootstrap nodes using the [DNS Discovery](/learn/concepts/dns-discovery) mechanism | [Configure DNS Discovery](/guides/nwaku/configure-discovery#configure-dns-discovery) |
| Discv5 | Enable `nwaku` to discover peers using the [Discv5](/learn/concepts/discv5) mechanism | [Configure Discv5](/guides/nwaku/configure-discovery#configure-discv5) |
| Peer Exchange | Enable [Peer Exchange](/learn/concepts/peer-exchange) protocol for light nodes to request peers from your `nwaku` node | [Configure Peer Exchange](/guides/nwaku/configure-discovery#configure-peer-exchange) |
:::tip
We suggest [configuring WebSocket transport](/guides/nwaku/configure-nwaku#configure-websocket-transport) for your node to enable support and serving of browser peers using [@waku/sdk](/guides/js-waku/).
:::
## Interact with the node
You can interact with a running `nwaku` node through the [REST API](https://waku-org.github.io/waku-rest-api/), such as querying the node information using the [Get node info](https://waku-org.github.io/waku-rest-api/#get-/debug/v1/info) endpoint:
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
<Tabs>
<TabItem value="request" label="Request">
```shell
curl --location 'http://127.0.0.1:8645/debug/v1/info' \
--header 'Accept: application/json'
```
</TabItem>
<TabItem value="response" label="Response">
```json
{
"listenAddresses": [
"/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmUbPquFQqje3jiqoB5YoiUbBya59NB4qqEzeiTNGHeA6w"
],
"enrUri": "enr:-Iu4QCQZXZDb_JsYmLoYor0F5E_95HbIywgO_wgx2rIdDbmCJZkTzmlCr0wmMzV47lgik_tVwww5mIng90Ris83TisMBgmlkgnY0gmlwhAAAAACJc2VjcDI1NmsxoQPszztG-Ev52ZB7tk0jF8s6Md4KvyY_rhzNZokaaB_ABIN0Y3CC6mCFd2FrdTIB"
}
```
</TabItem>
</Tabs>
:::info
The `listenAddresses` field stores the node's listening addresses, while the `enrUri` field stores the discoverable `ENR` URI for peer discovery.
:::
## Check the node health status
You can check the health status of the node by calling the [Get node health status](https://waku-org.github.io/waku-rest-api/#get-/health) endpoint of the [REST API](https://waku-org.github.io/waku-rest-api/):
<Tabs>
<TabItem value="request" label="Request">
```shell
curl --location 'http://127.0.0.1:8645/health' \
--header 'Accept: text/plain'
```
</TabItem>
<TabItem value="response" label="Response">
```txt
Node is healthy
```
</TabItem>
</Tabs>
:::tip
If you encounter issues running your node or require assistance with anything, please visit the [#node-help channel](https://discord.com/channels/1110799176264056863/1216748184592711691) on our Discord.
:::
:::tip Congratulations!
You have successfully started, configured, and connected a `nwaku` node to the Waku Network. Have a look at the [Node Configuration Examples](/guides/nwaku/configure-nwaku) guide to learn how to configure `nwaku` for different use cases.
:::

52
docs/landing.md Normal file
View File

@ -0,0 +1,52 @@
---
title: Introduction to Waku
hide_table_of_contents: true
slug: /
displayed_sidebar: null
---
Waku is a family of robust, censorship-resistant, peer-to-peer communication protocols that enable privacy-focused messaging for Web3 applications, allowing you to integrate decentralised communication features into your dApp without compromising security or privacy.
<div class="cta-buttons">
<a href="/build/javascript/" class="button button--primary">Start Building</a>
<a href="/run-node/" class="button button--primary">Run a Node</a>
<a href="/learn/" class="button button--primary">Learn More</a>
</div>
<div class="video-container">
<iframe class="yt-video" src="https://www.youtube.com/embed/nIWx5Vp_Qxk" title="Waku Tutorial 001: Introduction to Waku" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
:::tip
Check out our [Learn section](/learn/), [YouTube channel](https://www.youtube.com/@wakuorg), and [Blog](https://blog.waku.org/) to dive into how Waku works behind the scenes!
:::
## What isnt Waku?
- Waku is not a blockchain but a network composed of protocols designed for Web3 communication, operating without the need for gas fees.
- Waku is not just for messaging applications; it supports the development of complex applications that require secure and private data transmission.
- Waku is not a long-term data storage network; it focuses on short, ephemeral, real-time messaging.
## What can Waku be used for?
1. **Chat Messengers**: Waku can be used to build private, decentralised chat apps resistant to censorship.
2. **Voting and Proposals**: Exchange votes on proposals off-chain via Waku to save gas fees, then submit aggregated results to the blockchain.
3. **NFT Marketplaces**: Use Waku to handle off-chain NFT bids and offers for gas savings, and to integrate social interactions like likes and comments.
4. **State Channels**: Establish and maintain state channels with Waku, facilitating seamless message exchanges and updates without blockchain interaction.
5. **Signature Exchange for Multi-Signature Wallets**: Allow multi-signature wallet owners to exchange signatures privately and securely through Waku.
6. **Game Mechanics Communication**: Implement Waku as a communication layer for decentralised, peer-to-peer gaming, avoiding centralised infrastructure.
7. **Layer 2 Coordination (Open Market, Spam Protected Mempool)**: Broadcast and aggregate Layer 2 transactions via Waku to enhance privacy and scalability, reducing network load.
8. **Social Media Platforms**: Beyond chat messengers, use Waku for decentralised, censorship-resistant social media platforms like news feeds and multimedia sharing.
:::tip
Looking for what to build with Waku? Discover a collection of sample ideas and use cases for inspiration, curated by our community at: [https://ideas.waku.org/](https://ideas.waku.org/) and [Awesome Waku](https://github.com/waku-org/awesome-waku/).
:::
## Case studies
<div class="case-study-container">
<a href="https://blog.waku.org/2024-05-13-the-graph-case-study/" target="_blank" rel="noopener noreferrer"><img src="/img/graph-use-case.jpeg" /></a>
<a href="https://blog.waku.org/2024-04-26-railgun-case-study/" target="_blank" rel="noopener noreferrer"><img src="/img/railgun-use-case.jpeg" /></a>
</div>

View File

@ -1,6 +1,7 @@
---
title: Content Topics
hide_table_of_contents: true
displayed_sidebar: learn
---
`Content Topics` are metadata strings set by developers on outgoing messages to facilitate protocol-level features like selectively processing incoming messages ([Relay](/learn/concepts/protocols#relay) or [Filter](/learn/concepts/protocols#filter)) and retrieving historical messages ([Store](/learn/concepts/protocols#store)) that meet specific filtering criteria. Have a look at the [WAKU2-TOPICS](https://rfc.vac.dev/waku/informational/23/topics#content-topics) specification to learn more.

View File

@ -1,6 +1,7 @@
---
title: Discv5
hide_table_of_contents: true
displayed_sidebar: learn
---
`Discv5` is a decentralised and efficient peer discovery mechanism for the Waku Network. It uses a [Distributed Hash Table (DHT)](https://en.wikipedia.org/wiki/Distributed_hash_table) for storing `ENR` records, providing resistance to censorship. `Discv5` offers a global view of participating nodes, enabling random sampling for load distribution. It uses bootstrap nodes as an entry point to the network, providing randomised sets of nodes for mesh expansion. Have a look at the [Discv5](https://rfc.vac.dev/waku/standards/core/33/discv5) specification to learn more.

View File

@ -1,6 +1,7 @@
---
title: DNS Discovery
hide_table_of_contents: true
displayed_sidebar: learn
---
Built upon the foundation of [EIP-1459: Node Discovery via DNS](https://eips.ethereum.org/EIPS/eip-1459), DNS Discovery allows the retrieval of an `ENR` tree from the `TXT` field of a domain name. This innovative approach enables the storage of essential node connection details, including IP, port, and multiaddr.

View File

@ -1,6 +1,7 @@
---
title: Network Domains
hide_table_of_contents: true
displayed_sidebar: learn
---
Waku is a unified and cohesive entity that offers a rich ecosystem with three distinct network interaction domains. These domains serve specialised purposes and contribute to the robust functionality of Waku, forming its foundation.

View File

@ -1,6 +1,7 @@
---
title: Peer Discovery
hide_table_of_contents: true
displayed_sidebar: learn
---
When initialising a Waku node, it must connect with other peers to enable message sending, receiving, and retrieval. To achieve this, a discovery mechanism is employed to locate other peers in the network. This process is known as bootstrapping.

View File

@ -1,6 +1,7 @@
---
title: Peer Exchange
hide_table_of_contents: true
displayed_sidebar: learn
---
The primary objective of this protocol is to facilitate peer connectivity for resource-limited devices without relying on `Discv5`. The peer exchange protocol enables light nodes to request peers from other nodes within the network.

View File

@ -1,6 +1,7 @@
---
title: Protocols
hide_table_of_contents: true
displayed_sidebar: learn
---
Waku takes a modular approach, providing a range of protocols that enable applications to control the trade-offs involved in the [Anonymity Trilemma](https://eprint.iacr.org/2017/954.pdf). This flexibility empowers applications to make informed choices regarding the desired balance between anonymity, scalability, and latency. Here are the main protocols provided by Waku:

View File

@ -1,9 +1,10 @@
---
title: Static Peers
hide_table_of_contents: true
displayed_sidebar: learn
---
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can either use static peers operated by Status or [run a node](/#run-a-waku-node).
Waku applications have the flexibility to embed bootstrap node addresses directly into their codebase. Developers can either use static peers operated by Status or [run a node](/run-node).
#### Pros

View File

@ -1,6 +1,7 @@
---
title: Transports
hide_table_of_contents: true
displayed_sidebar: learn
---
Transports help move data packets across a network by establishing connections between peers. They define the rules and protocols to ensure efficient network transmission, routing, and data delivery.

View File

@ -2,6 +2,7 @@
title: Waku FAQ
hide_table_of_contents: true
sidebar_label: Frequently Asked Questions
displayed_sidebar: learn
---
import { AccordionItem } from '@site/src/components/mdx'

View File

@ -1,6 +1,7 @@
---
title: Glossary
hide_table_of_contents: true
displayed_sidebar: learn
---
# Waku Docs Glossary
@ -139,7 +140,7 @@ Waku Message defines the structure of messages in the [Waku Network](#waku-netwo
Waku Message Payload Encryption provides guidelines for implementing secure and private communication in the [Waku Network](#waku-network). It covers encryption, decryption, and signing methods for message [payloads](#payload), focusing on confidentiality, authenticity, integrity, and unlinkability.
### [Waku network](/learn/waku-network)
### [Waku network](/learn/)
The Waku Network is an open-access, scalable peer-to-peer messaging network emphasizing privacy protection and accessibility to [resource limited](#resource-limited) devices.

View File

@ -1,6 +1,7 @@
---
title: The Waku Network
hide_table_of_contents: true
displayed_sidebar: learn
---
The Waku Network is a shared p2p messaging network that is open-access, useful for generalized messaging, privacy-preserving, scalable and accessible even to resource-restricted devices. Some of the most prominent features include:
@ -27,7 +28,7 @@ If you want to learn more about the Waku Network, [The Waku Network: Technical O
## Running a Waku network node
Have a look at the [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) guide for instructions on running a [nwaku](https://github.com/waku-org/nwaku) node in the Waku Network. Use the Sepolia node and wallet you obtained above.
Have a look at the [Run Nwaku with Docker Compose](/run-node/run-docker-compose) guide for instructions on running a [nwaku](https://github.com/waku-org/nwaku) node in the Waku Network. Use the Sepolia node and wallet you obtained above.
:::info
The public Waku Network replaces the previous experimental shared routing layer based on a default pubsub topic (`/waku/2/default-waku/proto`). If your project currently uses this or any other shared pubsub topics, we encourage you to migrate to the public Waku Network with built-in DoS protection, scalability, and reasonable bandwidth usage.

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -1,17 +1,20 @@
---
title: Research
hide_table_of_contents: true
sidebar_position: 0
displayed_sidebar: learn
---
## Experimental features
The following features are currently experimental and under research and initial implementation:
## Economic spam resistance
### Economic spam resistance
We aim to enable an incentivised spam protection technique to enhance `Relay` by using [Rate Limit Nullifiers (RLN)](https://rfc.vac.dev/vac/32/rln-v1/). In this advanced method, peers are limited to a certain messaging rate per epoch, and an immediate financial penalty is enforced for spammers who break this rate. You can find more details in the [RLN Relay blog post](https://vac.dev/rln-relay).
We aim to enable an incentivised spam protection technique to enhance `Relay` by using [Rate Limit Nullifiers (RLN)](https://rfc.vac.dev/vac/32/rln-v1/).
In this advanced method, peers are limited to a certain messaging rate per epoch, and an immediate financial penalty is enforced for spammers who break this rate. You can find more details in the [RLN Relay blog post](https://vac.dev/rln-relay).
We have prepared a PoC implementation of this method in JS: [https://examples.waku.org/rln-js/](https://examples.waku.org/rln-js/)
## Prevention of denial of service (DoS) and node incentivisation
### Prevention of denial of service (DoS) and node incentivisation
Denial of service signifies the case where an adversarial peer exhausts another node's service capacity (e.g., by making a large number of requests) and makes it unavailable to the rest of the system. RnD on DoS attack mitigation can be tracked from here: [https://github.com/vacp2p/research/issues/148](https://github.com/vacp2p/research/issues/148).
@ -20,3 +23,18 @@ In a nutshell, peers have to pay for the service they obtain from each other. In
Additionally, along with RLN, this gives node operators who provide a useful service to the network an incentive to perform that service. Read more here: [https://vac.dev/building-privacy-protecting-infrastructure](https://vac.dev/building-privacy-protecting-infrastructure)
You can also read more about the ongoing challenges the Waku team is working on here: [https://github.com/waku-org/research](https://github.com/waku-org/research)
## Research resources
**Research and Studies**: Protocol simulations and theoretical analysis to support the design of Waku protocols. The protocol definitions are on the [Waku RFCs](https://rfc.vac.dev/waku) website.
**Benchmarks**: Results of implementations and engineering-related benchmarks for Waku clients.
## Research papers
Waku also has the following published research papers:
- [**WAKU-RLN-RELAY: Privacy-Preserving Peer-to-Peer Economic Spam Protection**](https://arxiv.org/abs/2207.00117)
- [**Message Latency in Waku Relay with Rate Limiting Nullifiers**](https://eprint.iacr.org/2024/1073)
- [**Waku: A Family of Modular P2P Protocols For Secure & Censorship-Resistant Communication**](https://arxiv.org/abs/2207.00038)
- [**The Waku Network as Infrastructure for dApps**](https://ieeexplore.ieee.org/document/10646404)

View File

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 314 KiB

View File

Before

Width:  |  Height:  |  Size: 515 KiB

After

Width:  |  Height:  |  Size: 515 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -5,14 +5,12 @@ title: RLN Key Benchmarks
## Introduction
Since RLN has been chosen as the spamming protection mechanism for waku, we must understand the practical implications of using it. This issue explains the main differences between `relay` and `rln-relay` and gives some benchmarks after running simulations using `waku-simulator`, in a network with the following characteristics:
- 100 nwaku nodes, each one with a valid rln membership and publishing a message every 10 seconds to a common topic.
- rln contract deployed in Ethereum Sepolia
- 10.000 memberships registered in the contract
- pure relay (store and light protocols disabled)
The main deltas `rln` vs `rln-relay` are:
- New `proof ` field in `WakuMessage` containing 384 extra bytes. This field must be generated and attached to each message.
- New validator, that uses `proof` to `Accept` or `Reject` the message. The proof has to be verified.
- New dependency on a blockchain, Ethereum, or any EVM chain, to keep track of the members allowed to publish.
@ -20,7 +18,6 @@ The main deltas `rln` vs `rln-relay` are:
But what are the practical implications of these?
## TLDR:
- Proof generation is constant-ish. 0.15 second for each proof
- Proof verification is constant-ish, 0.012 seconds. In a network with 10k nodes and D=6 this would add an overhead delay of 0.06 seconds.
- Gossipsub scoring drops connections from spammer peers, which acts as the punishment (instead of slashing). Validated in the simulation.
@ -36,7 +33,7 @@ Seems that proof generation times stay constant no matter the size of the messag
On the other hand, rln also adds an overhead in the gossipsub validation process. On average it takes `0.012 seconds` to verify the proof. It seems that when we increase the message size, validation time seems to increase a bit, which can be for any other reason besides rln itself (eg deserializing the message might take longer).
This number seems reasonable and shouldn't affect that much the average delay of a message. Assuming a d-regular graph, with `10k` nodes and `D=6`, we can have up to `log(total_nodes)/log(D)=5` hops. So in the worst case, rln will add a network latency of `0.012*5 = 0.06 seconds`
This number seems reasonable and shouldn't affect that much the average delay of a message. Assuming a d-regular graph, with `10k` nodes and `D=6`, we can have up to `log(total_nodes)/log(D)=5` hops. So in the worst case, rln will add a network latency of `0.012*5 = 0.06 seconds`
![proof-verification-times](imgs/proof-verification-times.png)
@ -51,7 +48,6 @@ In the following simulation, we can see `100` nwaku interconnected nodes, where
## RLN tree sync
Using RLN implies that waku should now piggyback on a blockchain (the case study uses Ethereum Sepolia) and has to stay up to date with the latest events emitted by the rln smart contract. These events are used to locally construct a tree that contains all members allowed to create valid proofs to send messages. Some numbers:
- A tree with 10k members takes `2Mbytes` of space. Negligible.
- A tree with 10k members takes `<4` minutes to synchronize. Assumable since it's done just once.
- With a block range of 5000 blocks for each request, we would need `520 requests` to synchronize 1 year of historical data from the tree. Assumable since most of the free endpoints out there allow 100k/day.
@ -59,7 +55,6 @@ Using RLN implies that waku should now piggyback on a blockchain (the case study
## Performance relay vs. rln-relay
Same simulation with 100 nodes was executed `with rln` and `without rln`:
- Memory consumption is almost identical
**with rln**

View File

@ -1,6 +1,7 @@
---
title: Security Features
hide_table_of_contents: true
displayed_sidebar: learn
---
Waku's protocol layers offer different services and security considerations, shaping the overall security of Waku. We document the security models in the [RFCs of the protocols](https://rfc.vac.dev/), aiming to provide transparent and open-source references. This empowers Waku users to understand each protocol's security guarantees and limitations.

View File

@ -1,13 +1,14 @@
---
title: Comparing Waku and libp2p
hide_table_of_contents: true
displayed_sidebar: learn
---
Since Waku is built on top of libp2p, they share a lot of concepts and terminologies between them. However, there are key differences between them that are worth noting.
## Waku as a service network
Waku intends to incentivise mechanisms to run nodes, but it is not part of libp2p's scope. Additionally, users or developers do not have to deploy their infrastructure as a prerequisite to use Waku. It is a service network. However, you are encouraged to [run a node](/#run-a-waku-node) to support and decentralise the network.
Waku intends to incentivise mechanisms to run nodes, but it is not part of libp2p's scope. Additionally, users or developers do not have to deploy their infrastructure as a prerequisite to use Waku. It is a service network. However, you are encouraged to [run a node](/run-node) to support and decentralise the network.
## Waku as a turnkey solution

View File

@ -1,201 +0,0 @@
# Migrating to Waku v0.027
A migration guide for refactoring your application code from Waku v0.026 to v0.027.
## Table of Contents
- [Migrating to Waku v0.027](#migrating-to-waku-v0027)
- [Table of Contents](#table-of-contents)
- [Network Configuration](#network-configuration)
- [Default Network Configuration](#default-network-configuration)
- [Static Sharding](#static-sharding)
- [Auto Sharding](#auto-sharding)
- [Pubsub Topic Configuration](#pubsub-topic-configuration)
- [Removed APIs](#removed-apis)
- [Type Changes](#type-changes)
- [Internal/Private Utility Function Changes](#internalprivate-utility-function-changes)
## Network Configuration
The way to configure network settings for a Waku node has been simplified. The new NetworkConfig type only allows for Static Sharding or Auto Sharding.
### Default Network Configuration
If no network configuration is provided when creating a Light Node, The Waku Network configuration will be used by default.
**Before**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode();
// This would use the default pubsub topic, that was, `/waku/2/default-waku/proto`
```
**After**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode();
// This will now use The Waku Network configuration by default:
// { clusterId: 1, shards: [0,1,2,3,4,5,6,7] }
```
### Static Sharding
**Before**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
shardInfo: {
clusterId: 1,
shards: [0, 1, 2, 3]
}
});
```
**After**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
networkConfig: {
clusterId: 1,
shards: [0, 1, 2, 3]
}
});
```
### Auto Sharding
**Before**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
shardInfo: {
clusterId: 1,
contentTopics: ["/my-app/1/notifications/proto"]
}
});
```
**After**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
networkConfig: {
clusterId: 1,
contentTopics: ["/my-app/1/notifications/proto"]
}
});
```
## Pubsub Topic Configuration
Named pubsub topics are no longer supported. You must use either Static Sharding or Auto Sharding to configure pubsub topics.
**Before**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
pubsubTopics: ["/waku/2/default-waku/proto"]
});
```
**After**
Use Static Sharding:
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
networkConfig: {
clusterId: 1,
shards: [0, 1, 2, 3, 4, 5, 6, 7]
}
});
```
Or use Auto Sharding:
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
networkConfig: {
clusterId: 1,
contentTopics: ["/your-app/1/default/proto"]
}
});
```
## Removed APIs
The following APIs have been removed:
- ApplicationInfo type: Use `string` for application and version in `NetworkConfig` instead.
- `shardInfo` option in `createLightNode`: Use `networkConfig` instead.
- `pubsubTopics` option in `createLightNode`: Use `networkConfig` with Static Sharding or Auto Sharding instead.
If you were using `ApplicationInfo` before, you should now use `ContentTopicInfo` (Auto Sharding) and specify your application and version in the content topic `string`.
**Before**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
shardInfo: {
clusterId: 1,
application: "my-app",
version: "1"
}
});
```
**After**
```typescript
import { createLightNode } from "@waku/sdk";
const waku = await createLightNode({
networkConfig: {
clusterId: 1,
contentTopics: ["/my-app/1/default/proto"]
}
});
```
## Type Changes
- `ShardingParams` has been removed. Use `NetworkConfig` instead.
- `NetworkConfig` is now defined as `StaticSharding` | `AutoSharding`.
- `StaticSharding` is equivalent to the previous `ShardInfo`.
- `AutoSharding` is equivalent to the previous `ContentTopicInfo`.
## Internal/Private Utility Function Changes
Several utility functions have been updated or added:
- `ensureShardingConfigured` has been removed. Use `derivePubsubTopicsFromNetworkConfig` instead.
- New function `derivePubsubTopicsFromNetworkConfig` has been added to derive pubsub topics from the network configuration.
- `shardInfoToPubsubTopics` now accepts `Partial<NetworkConfig>` instead of `Partial<ShardingParams>`.
- New function `pubsubTopicsToShardInfo` has been added to convert pubsub topics to a ShardInfo object.
If you were using any of these utility functions directly, you'll need to update your code accordingly.
**Before**
```typescript
import { ensureShardingConfigured } from "@waku/utils";
const result = ensureShardingConfigured(shardInfo);
```
**After**
```typescript
import { derivePubsubTopicsFromNetworkConfig } from "@waku/utils";
const pubsubTopics = derivePubsubTopicsFromNetworkConfig(networkConfig);
```
Note: The default `NetworkConfig` for The Waku Network is now `{ clusterId: 1, shards: [0,1,2,3,4,5,6,7] }.`

View File

@ -1,15 +0,0 @@
---
title: Research
hide_table_of_contents: true
sidebar_position: 1
---
**Research and Studies**: Protocol simulations and theoretical analysis to support the design of Waku protocols. The protocol definitions are on the [Waku RFCs](https://rfc.vac.dev/waku) website.
**Benchmarks**: Results of implementations and engineering-related benchmarks for Waku clients.
Waku also has the following published research papers:
- [**WAKU-RLN-RELAY: Privacy-Preserving Peer-to-Peer Economic Spam Protection**](https://arxiv.org/abs/2207.00117)
- [**Message Latency in Waku Relay with Rate Limiting Nullifiers**](https://eprint.iacr.org/2024/1073)
- [**Waku: A Family of Modular P2P Protocols For Secure & Censorship-Resistant Communication**](https://arxiv.org/abs/2207.00038)
- [**The Waku Network as Infrastructure for dApps**](https://ieeexplore.ieee.org/document/10646404)

View File

@ -1,6 +1,7 @@
---
title: Build Nwaku from Source
hide_table_of_contents: true
displayed_sidebar: runNode
---
This guide provides detailed steps to build a `nwaku` node from the source code to access the latest development version or a specific commit or release of `nwaku`. For your convenience, you may want to [download a pre-compiled binary](https://github.com/waku-org/nwaku/tags) instead.
@ -99,10 +100,10 @@ Nwaku will create the `wakunode2` binary in the `./build/` directory.
To learn more about running nwaku, have a look at these guides:
- [Run a Nwaku Node](/guides/nwaku/run-node#run-the-node)
- [Run Nwaku in a Docker Container](/guides/nwaku/run-docker)
- [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose)
- [Node Configuration Methods](/guides/nwaku/config-methods)
- [Run a Nwaku Node](/run-node/)
- [Run Nwaku in a Docker Container](/run-node/run-docker)
- [Run Nwaku with Docker Compose](/run-node/run-docker-compose)
- [Node Configuration Methods](/run-node/config-methods)
## Run test suite
@ -113,5 +114,5 @@ make test
```
:::tip Congratulations!
You have successfully built the `nwaku` binary from the source code. Have a look at the [Node Configuration Examples](/guides/nwaku/configure-nwaku) guide to learn how to configure `nwaku` for different use cases.
You have successfully built the `nwaku` binary from the source code. Have a look at the [Node Configuration Examples](/run-node/configure-nwaku) guide to learn how to configure `nwaku` for different use cases.
:::

View File

@ -1,6 +1,7 @@
---
title: Node Configuration Methods
hide_table_of_contents: true
displayed_sidebar: runNode
---
Waku nodes can be configured using a combination of the following methods:
@ -16,7 +17,7 @@ Take note of the precedence order: Each configuration method overrides the one b
## Command line options
Node configuration is primarily done using command line options, which override other methods. Specify [configuration options](/guides/nwaku/config-options) by providing them in this format after the binary name:
Node configuration is primarily done using command line options, which override other methods. Specify [configuration options](/run-node/config-options) by providing them in this format after the binary name:
```shell
./build/wakunode2 --tcp-port=65000
@ -59,7 +60,7 @@ topic = ["/waku/2/default-waku/proto"]
metrics-logging = false
```
The `config-file` [configuration option](/guides/nwaku/config-options) lets you specify the configuration file path:
The `config-file` [configuration option](/run-node/config-options) lets you specify the configuration file path:
```shell
./build/wakunode2 --config-file=[TOML CONFIGURATION FILE]
@ -89,12 +90,12 @@ The default configuration is used when no other options are specified. By defaul
- Enable the `Relay` protocol for relaying messages.
- Enable the `Store` protocol as a client, allowing it to query peers for historical messages but not store any message itself.
To see the default values of all [configuration options](/guides/nwaku/config-options), run `wakunode2 --help`:
To see the default values of all [configuration options](/run-node/config-options), run `wakunode2 --help`:
```shell
./build/wakunode2 --help
```
:::tip
To explore the available node configuration options, have a look at the [Node Configuration Options](/guides/nwaku/config-options) guide.
To explore the available node configuration options, have a look at the [Node Configuration Options](/run-node/config-options) guide.
:::

View File

@ -1,6 +1,7 @@
---
title: Node Configuration Options
hide_table_of_contents: true
displayed_sidebar: runNode
---
Here are the available node configuration options, along with their default values and descriptions:
@ -173,5 +174,5 @@ Here are the available node configuration options, along with their default valu
| `rate-limit` | | This is a repeatable option. Each can describe a specific rate limit configuration for a particular protocol.<br />Formatted as:`<protocol>:volume/period<time-unit>`<br />- if protocol is not given, settings will be taken as default for un-set protocols. Ex: `80/2s`<br />-Supported protocols are: `lightpush`\|`filter`\|`px`\|`store`\|`storev2`\|`storev3`<br />-volume must be an integer value, representing number of requests over the period of time allowed.<br />-period\<time-unit\> must be an integer with defined unit as one of `h`\|`m`\|`s`\|`ms`<br />- `storev2` and `storev3` takes precedence over `store` which can easy set both store protocols at once.<br />- In case of multiple set of the same protocol limit, last one will take place.<br />- if config is not set, - which is the default - means unlimited requests are allowed.<br />-filter has a bit different approach. It has a default setting applied if not overridden. Rate limit setting for filter will be applied per subscriber-peers, not globally - it must be considered when changing the setting.<br /><br />Examples:<br />`--rate-limit="100/1s"` - default for all protocols if not set otherwise.<br />`--rate-limit="lightpush:0/0s"` - lightpush protocol will not be rate-limited.<br />`--rate-limit="store:130/1500ms"` - both store-v3 and store-v2 will apply 130 request per each 1500ms separately.<br />`--rate-limit="px:10/1h"` PeerExchange will serve only 10 requests every hour.<br />`--rate-limit="filter:8/5m"` - will allow 8 subs/unsubs/ping requests for each subscriber within every 5 min. |
:::tip
To configure your node using the provided configuration options, have a look at the [Node Configuration Methods](/guides/nwaku/config-methods) guide.
To configure your node using the provided configuration options, have a look at the [Node Configuration Methods](/run-node/config-methods) guide.
:::

View File

@ -1,6 +1,7 @@
---
title: Configure Peer Discovery
hide_table_of_contents: true
displayed_sidebar: runNode
---
This guide provides detailed steps to configure a `nwaku` node to discover and connect with peers in the Waku Network.
@ -109,5 +110,5 @@ For example, consider two `nwaku` nodes configured as a `server` (peer exchange
```
:::info
`nwaku` provides a [`relay-peer-exchange`](/guides/nwaku/config-options#relay-config) option via `libp2p` for peer exchange, allowing network growth through neighbouring nodes. However, this feature can compromise security and network robustness, so we recommend only using it in high-trust environments.
`nwaku` provides a [`relay-peer-exchange`](/run-node/config-options#relay-config) option via `libp2p` for peer exchange, allowing network growth through neighbouring nodes. However, this feature can compromise security and network robustness, so we recommend only using it in high-trust environments.
:::

View File

@ -1,6 +1,7 @@
---
title: Node Configuration Examples
hide_table_of_contents: true
displayed_sidebar: runNode
---
This guide provides detailed steps to configure a `nwaku` node for different use cases.
@ -9,10 +10,10 @@ This guide provides detailed steps to configure a `nwaku` node for different use
To join the Waku Network, nodes must [bootstrap](/learn/glossary#bootstrapping) for an entry point before discovering more peers. Nwaku provides multiple [peer discovery](/learn/concepts/peer-discovery) mechanisms:
- [Configure Static Peers](/guides/nwaku/configure-discovery#configure-static-peers)
- [Configure DNS Discovery](/guides/nwaku/configure-discovery#configure-dns-discovery)
- [Configure Discv5](/guides/nwaku/configure-discovery#configure-discv5)
- [Configure Peer Exchange](/guides/nwaku/configure-discovery#configure-peer-exchange)
- [Configure Static Peers](/run-node/configure-discovery#configure-static-peers)
- [Configure DNS Discovery](/run-node/configure-discovery#configure-dns-discovery)
- [Configure Discv5](/run-node/configure-discovery#configure-discv5)
- [Configure Peer Exchange](/run-node/configure-discovery#configure-peer-exchange)
## Configure a domain name
@ -134,7 +135,7 @@ You can use the output `286cae9f2990bfc49dafdd3a9e737f56ddba3656e5e427108cef456f
## Configure WebSocket transport
WebSocket is the only [transport method](/learn/concepts/transports) browser nodes support using [@waku/sdk](/guides/js-waku/). To enable WebSocket in `nwaku` to serve browser peers, use the following configuration options:
WebSocket is the only [transport method](/learn/concepts/transports) browser nodes support using [@waku/sdk](/build/javascript/). To enable WebSocket in `nwaku` to serve browser peers, use the following configuration options:
- `websocket-support`: Enables WebSocket (`ws`) on the node (disabled by default).
- `websocket-port` (optional): WebSocket listening port. If you omit this option, it will default to `8000`.

View File

@ -2,12 +2,13 @@
title: Nwaku FAQ
hide_table_of_contents: true
sidebar_label: Frequently Asked Questions
displayed_sidebar: runNode
---
import { AccordionItem } from '@site/src/components/mdx'
<AccordionItem title="How can I run a Waku node?">
Check out the <a href="/guides/nwaku/run-docker-compose">Run Nwaku with Docker Compose</a> guide to learn the simplest and fastest way to run a node. You can also check the comprehensive <a href="/guides/nwaku/run-node">Run a Nwaku Node</a> guide to explore other options like <a href="/guides/nwaku/run-node#download-the-binary">downloading binaries</a> and <a href="/guides/nwaku/build-source">building from source</a>.
Check out the <a href="/run-node/run-docker-compose">Run Nwaku with Docker Compose</a> guide to learn the simplest and fastest way to run a node. You can also check the comprehensive <a href="/run-node/">Run a Nwaku Node</a> guide to explore other options like <a href="/run-node/run-node#download-the-binary">downloading binaries</a> and <a href="/run-node/build-source">building from source</a>.
</AccordionItem>
<AccordionItem title="What are the system requirements for running a node?">
@ -15,7 +16,7 @@ import { AccordionItem } from '@site/src/components/mdx'
</AccordionItem>
<AccordionItem title="How can I interact with my running nwaku node?">
You can interact with a running nwaku node using the <a href="https://waku-org.github.io/waku-rest-api/">REST API interface</a> or the <a href="/guides/js-waku/">JavaScript Waku SDK</a>.
You can interact with a running nwaku node using the <a href="https://waku-org.github.io/waku-rest-api/">REST API interface</a> or the <a href="/build/javascript/">JavaScript Waku SDK</a>.
</AccordionItem>
<AccordionItem title="How can I view the logs of a nwaku node running in Docker?">
@ -23,17 +24,17 @@ import { AccordionItem } from '@site/src/components/mdx'
</AccordionItem>
<AccordionItem title="What configuration methods are available for nwaku nodes?">
You can configure Nwaku nodes using command line options and flags, environment variables, and TOML configuration files. Check out the <a href="/guides/nwaku/config-methods">Node Configuration Methods</a> guide to understand their usage and priority.
You can configure Nwaku nodes using command line options and flags, environment variables, and TOML configuration files. Check out the <a href="/run-node/config-methods">Node Configuration Methods</a> guide to understand their usage and priority.
</AccordionItem>
<AccordionItem title="How can I configure my nwaku node before running?">
Check out the <a href="/guides/nwaku/config-options">Node Configuration Options</a> guide for available node configuration options, their default values and descriptions. For examples of common configuration use cases, visit the <a href="/guides/nwaku/configure-nwaku">Node Configuration Examples</a> guide.
Check out the <a href="/run-node/config-options">Node Configuration Options</a> guide for available node configuration options, their default values and descriptions. For examples of common configuration use cases, visit the <a href="/run-node/configure-nwaku">Node Configuration Examples</a> guide.
</AccordionItem>
<AccordionItem title="What peer discovery mechanisms are available for nwaku nodes, and how can I configure them?">
You can configure peer discovery for nwaku nodes through options like <a href="/learn/concepts/static-peers">Static Peers</a>, <a href="/learn/concepts/dns-discovery">DNS Discovery</a>, <a href="/learn/concepts/discv5">DiscV5</a>, and <a href="/learn/concepts/peer-exchange">Peer Exchange</a>. Check out the <a href="/guides/nwaku/configure-discovery">Configure Peer Discovery</a> guide for setting up your node.
You can configure peer discovery for nwaku nodes through options like <a href="/learn/concepts/static-peers">Static Peers</a>, <a href="/learn/concepts/dns-discovery">DNS Discovery</a>, <a href="/learn/concepts/discv5">DiscV5</a>, and <a href="/learn/concepts/peer-exchange">Peer Exchange</a>. Check out the <a href="/run-node/configure-discovery">Configure Peer Discovery</a> guide for setting up your node.
</AccordionItem>
<AccordionItem title="How do I find my nwaku node's addresses for peer discovery?">
The node listening and ENR addresses can be found through the node's logs and <a href="https://waku-org.github.io/waku-rest-api/#get-/debug/v1/info">REST API</a>. Check out the <a href="/guides/nwaku/run-node#find-the-node-addresses">Find the node addresses</a> section to understand how to locate your node addresses.
The node listening and ENR addresses can be found through the node's logs and <a href="https://waku-org.github.io/waku-rest-api/#get-/debug/v1/info">REST API</a>. Check out the <a href="/run-node/run-node/find-node-address">Find the node addresses</a> section to understand how to locate your node addresses.
</AccordionItem>

View File

@ -1,6 +1,7 @@
---
title: Find Your Node Address
hide_table_of_contents: true
displayed_sidebar: runNode
---
:::info
@ -56,5 +57,5 @@ enr:-IO4QDxToTg86pPCK2KvMeVCXC2ADVZWrxXSvNZeaoa0JhShbM5qed69RQz1s1mWEEqJ3aoklo_7
```
:::tip Congratulations!
You have successfully found the listening and discoverable addresses for your `nwaku` node. Have a look at the [Configure Peer Discovery](/guides/nwaku/configure-discovery) guide to learn how to discover and connect with peers in the network.
You have successfully found the listening and discoverable addresses for your `nwaku` node. Have a look at the [Configure Peer Discovery](/run-node/configure-discovery) guide to learn how to discover and connect with peers in the network.
:::

82
docs/run-node/index.md Normal file
View File

@ -0,0 +1,82 @@
---
title: Run a Waku Node
hide_table_of_contents: true
displayed_sidebar: runNode
---
Nwaku is a lightweight and robust Nim client for running a Waku node, equipped with tools to monitor and maintain a running node. Nwaku is highly configurable, enabling operators to select the [protocols](/learn/concepts/protocols) they want to support based on their needs, motivations, and available resources.
## Video Tutorial
<div class="video-container">
<iframe class="yt-video" src="https://www.youtube.com/embed/fs0ynLk4z0I" title="How to run a Waku node using Nwaku Compose" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
## Quick Start with Docker Compose (Recommended)
The easiest way to run a Waku node is using [Docker Compose](/run-node/run-docker-compose). This setup automatically configures:
- A `nwaku` node with [Relay](/learn/concepts/protocols#relay), [Store](/learn/concepts/protocols#store), and [RLN](/learn/concepts/protocols#rln-relay) protocols
- A simple web interface to send and receive messages
- Grafana dashboard for monitoring your node
### Prerequisites
- **Git**
- [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)
- **Linea Sepolia RPC endpoint**: You can get a free endpoint from [Infura](https://www.infura.io/) or any other Linea Sepolia RPC provider.
:::info System Requirements
We recommend at least 2GB of RAM, especially if WSS is enabled. For a Relay-only node, 0.5GB of RAM is sufficient.
:::
### Get Started
```shell
# Clone the repository
git clone https://github.com/waku-org/nwaku-compose
cd nwaku-compose
# Configure your node
cp .env.example .env
# Edit .env with your settings
# Start your node
docker-compose up -d
```
For detailed setup instructions, see [Run Nwaku with Docker Compose](/run-node/run-docker-compose).
## Alternative Installation Methods
While Docker Compose is recommended, you can also:
- **[Run in Docker Container](/run-node/run-docker)** - For custom Docker deployments
- **[Build from Source](/run-node/build-source)** - Compile the latest nwaku code
- **[Download Binary](https://github.com/waku-org/nwaku/tags)** - Use precompiled releases
## Node Configuration
Once your node is running, you can:
- **[Configure Discovery](/run-node/configure-discovery)** - Set up peer discovery mechanisms
- **[Configure Your Node](/run-node/configure-nwaku)** - Customize protocols and settings
- **[Find Node Addresses](/run-node/find-node-address)** - Locate your node's network addresses
## Monitoring and Maintenance
- Access the Grafana dashboard at `http://localhost:3000` (if using Docker Compose)
- Use the [REST API](https://waku-org.github.io/waku-rest-api/) to interact with your node
- Check node health at `http://localhost:8645/health`
:::tip
Download the [Waku Node Operator Cheatsheet](/Waku-NodeOperator.pdf) for quick reference on operating your node.
:::
## Get Help
If you encounter issues or need assistance:
- Visit the #help-desk channel on [Discord](https://discord.waku.org/)
- Check the [FAQ](/run-node/faq) for common questions
- Review the [upgrade instructions](/run-node/upgrade-instructions) when updating your node

View File

@ -1,6 +1,7 @@
---
title: Run Nwaku with Docker Compose
hide_table_of_contents: true
displayed_sidebar: runNode
---
[nwaku-compose](https://github.com/waku-org/nwaku-compose) is a ready-to-use Docker Compose setup that configures the following automatically:
@ -23,9 +24,7 @@ Check out the [Waku Node Operator Cheatsheet](/Waku-NodeOperator.pdf) to learn h
- [Git](https://git-scm.com/) or [GitHub Desktop](https://desktop.github.com/)
- [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)
- [Ethereum Sepolia HTTPS Endpoint](https://github.com/waku-org/nwaku/blob/master/docs/tutorial/pre-requisites-of-running-on-chain-spam-protected-chat2.md#3-access-a-node-on-the-sepolia-testnet-using-infura)
- [Wallet with Sepolia Ethereum](https://github.com/waku-org/nwaku/blob/master/docs/tutorial/pre-requisites-of-running-on-chain-spam-protected-chat2.md#2-obtain-sepolia-eth-from-faucet) (~0.6 Sepolia ETH)
- A password to protect your RLN membership
- **Linea Sepolia RPC endpoint**: You can get a free endpoint from [Infura](https://www.infura.io/) or any other Linea Sepolia RPC provider.
:::info
We recommend running a `nwaku` node with at least 2GB of RAM, especially if `WSS` is enabled. If running just a `Relay` node, 0.5GB of RAM is sufficient.
@ -51,20 +50,6 @@ ${EDITOR} .env
Ensure that you do **NOT** include any secrets in the `.env.example` file, as it could accidentally be shared in your Git repository.
:::
## Register for RLN membership
The RLN membership is your access key to The Waku Network. Its registration is done on-chain, allowing your `nwaku` node to send messages decentralised and privately, respecting some rate limits. Other peers won't relay messages that exceed the rate limit.
This command registers your membership and saves it in the `keystore/keystore.json` file. You should have Docker running at this step:
```shell
./register_rln.sh
```
:::tip
If you only want to relay traffic without sending messages to the network, you don't need to register for RLN membership.
:::
## Run the node
Launch all the processes: `nwaku` node, database for storing messages, and Grafana for metrics with the following command. Your RLN membership is loaded into `nwaku` under the hood:
@ -101,17 +86,6 @@ curl --location 'http://127.0.0.1:8645/debug/v1/version'
curl --location 'http://127.0.0.1:8645/debug/v1/info'
```
Send a message to a `contentTopic`, which all subscribers will receive. Please note that the `payload` is encoded in `base64`.
```shell
curl --location 'http://127.0.0.1:8645/relay/v1/auto/messages' \
--header 'Content-Type: application/json' \
--data '{
"payload": "'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'",
"contentTopic": "/my-app/2/chatroom-1/proto"
}'
```
Retrieve messages sent to a `contentTopic`. Please note that this query can be made to any `Store` node within the network:
```shell
@ -120,9 +94,9 @@ curl --location 'http://127.0.0.1:8645/store/v1/messages?contentTopics=%2Fmy-app
```
:::tip
If you encounter issues running your node or require assistance with anything, please visit the [#node-help channel](https://discord.com/channels/1110799176264056863/1216748184592711691) on our Discord.
If you encounter issues running your node or require assistance with anything, please visit the - Visit the #help-desk channel on [Discord](https://discord.waku.org/).
:::
:::tip Congratulations!
You have successfully started a `nwaku` node with `RLN` enabled using Docker Compose. Have a look at the [Node Configuration Examples](/guides/nwaku/configure-nwaku) and [Advanced Configuration](https://github.com/waku-org/nwaku-compose/blob/master/ADVANCED.md) guides to learn how to configure `nwaku` for different use cases.
You have successfully started a `nwaku` node with `RLN` enabled using Docker Compose. Have a look at the [Node Configuration Examples](/run-node/configure-nwaku) and [Advanced Configuration](https://github.com/waku-org/nwaku-compose/blob/master/ADVANCED.md) guides to learn how to configure `nwaku` for different use cases.
:::

View File

@ -1,9 +1,10 @@
---
title: Run Nwaku in a Docker Container
hide_table_of_contents: true
displayed_sidebar: runNode
---
This guide provides detailed steps to build and run a `nwaku` node in a Docker container. If you prefer a pre-configured setup with a monitoring dashboard, see the [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) guide.
This guide provides detailed steps to build and run a `nwaku` node in a Docker container. If you prefer a pre-configured setup with a monitoring dashboard, see the [Run Nwaku with Docker Compose](/run-node/run-docker-compose) guide.
## Prerequisites
@ -40,7 +41,7 @@ docker run [OPTIONS] [IMAGE] [ARG...]
- `OPTIONS` are your selected [Docker options](https://docs.docker.com/engine/reference/commandline/run/#options)
- `IMAGE` is the image and tag you pulled from the registry or built locally
- `ARG...` is the list of arguments for your [node configuration options](/guides/nwaku/config-options)
- `ARG...` is the list of arguments for your [node configuration options](/run-node/config-options)
Run `nwaku` using the most typical configuration:
@ -73,9 +74,9 @@ We recommend using explicit port mappings (`-p`) when exposing ports accessible
:::
:::tip
If you encounter issues running your node or require assistance with anything, please visit the [#node-help channel](https://discord.com/channels/1110799176264056863/1216748184592711691) on our Discord.
If you encounter issues running your node or require assistance with anything, please visit the - Visit the #help-desk channel on [Discord](https://discord.waku.org/).
:::
:::tip Congratulations!
You have successfully built and started a `nwaku` node in a Docker container. Have a look at the [Node Configuration Examples](/guides/nwaku/configure-nwaku) guide to learn how to configure `nwaku` for different use cases.
You have successfully built and started a `nwaku` node in a Docker container. Have a look at the [Node Configuration Examples](/run-node/configure-nwaku) guide to learn how to configure `nwaku` for different use cases.
:::

View File

@ -2,6 +2,7 @@
title: Upgrade Instructions
hide_table_of_contents: true
sidebar_label: Upgrade Instructions
displayed_sidebar: runNode
---
import { AccordionItem } from '@site/src/components/mdx'

View File

@ -69,22 +69,22 @@ const config = {
},
{
position: "left",
label: "Guides",
to: "/",
activeBaseRegex: "^/$|^/guides/",
label: "Build",
to: "/build/javascript/",
activeBaseRegex: "^/build/",
},
{
position: "left",
label: "Run Node",
to: "/run-node/",
activeBaseRegex: "^/run-node/",
},
{
position: "left",
label: "Learn",
to: "/learn/waku-network",
to: "/learn/",
activeBaseRegex: "^/learn/",
},
{
position: "left",
label: "Research",
to: "/research",
activeBaseRegex: "^/research/",
},
{
href: "https://discord.waku.org",
position: "left",
@ -101,19 +101,6 @@ const config = {
footer: {
copyright: "Waku",
links: [
{
title: "Guides",
items: [
{
to: "/guides/nwaku/run-docker-compose",
label: "Run a Nwaku Node",
},
{
to: "/guides/js-waku/",
label: "JavaScript Waku SDK",
},
],
},
{
title: "Community",
items: [
@ -158,10 +145,6 @@ const config = {
href: "https://rfc.vac.dev/waku",
label: "Waku RFCs",
},
{
href: "https://github.com/waku-org/bounties/",
label: "Bounties",
},
{
href: "https://github.com/waku-org/awesome-waku/",
label: "Awesome Waku",

View File

@ -62,13 +62,13 @@ async function downloadAndSaveFile(url, filePath) {
const repositories = [
{
baseUrl: 'https://api.github.com/repos/waku-org/nwaku/contents/docs/benchmarks',
baseSavePath: '/docs/research/benchmarks/',
baseSavePath: '/docs/learn/research/benchmarks/',
prefixToRemove: "docs/benchmarks/",
categoryFileContent: "{ \"label\": \"Benchmarks\", \"collapsed\": false }"
},
{
baseUrl: 'https://api.github.com/repos/waku-org/research/contents/docs',
baseSavePath: '/docs/research/research-and-studies/',
baseSavePath: '/docs/learn/research/research-and-studies/',
prefixToRemove: "docs/",
categoryFileContent: "{ \"label\": \"Research and Studies\", \"collapsed\": false }"
}

View File

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"start": "docusaurus start --port 3001",
"build": "node fetch-content.js && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",

View File

@ -2,54 +2,32 @@
/** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */
const sidebars = {
guides: [
"guides/getting-started",
build: [
{
type: "category",
label: "Run a Nwaku Node",
collapsed: true,
link: {
type: "doc",
id: "guides/nwaku/run-node",
},
items: [
"guides/nwaku/run-docker-compose",
"guides/nwaku/run-docker",
"guides/nwaku/build-source",
"guides/nwaku/configure-discovery",
"guides/nwaku/find-node-address",
"guides/nwaku/config-methods",
"guides/nwaku/config-options",
"guides/nwaku/configure-nwaku",
"guides/nwaku/faq",
"guides/nwaku/upgrade-instructions",
{
type: "html",
value:
'<a href="https://waku-org.github.io/waku-rest-api/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">REST API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
type: "link",
label: "Home",
href: "/",
},
{
type: "category",
label: "JavaScript Waku SDK",
collapsed: true,
label: "JavaScript SDK",
collapsed: false,
link: {
type: "doc",
id: "guides/js-waku/index",
id: "build/javascript/index",
},
items: [
"guides/js-waku/reliable-channels",
"guides/js-waku/light-send-receive",
"guides/js-waku/store-retrieve-messages",
"guides/js-waku/message-encryption",
"guides/js-waku/use-waku-react",
"guides/js-waku/use-waku-create-app",
"guides/js-waku/configure-discovery",
"guides/js-waku/run-waku-nodejs",
"guides/js-waku/debug-waku-dapp",
"guides/js-waku/manage-filter",
"guides/js-waku/faq",
"build/javascript/reliable-channels",
"build/javascript/light-send-receive",
"build/javascript/store-retrieve-messages",
"build/javascript/message-encryption",
"build/javascript/use-waku-react",
"build/javascript/use-waku-create-app",
"build/javascript/configure-discovery",
"build/javascript/run-waku-nodejs",
"build/javascript/debug-waku-dapp",
"build/javascript/manage-filter",
"build/javascript/faq",
{
type: "html",
value:
@ -62,39 +40,47 @@ const sidebars = {
},
],
},
],
runNode: [
{
type: "link",
label: "Learn About Waku",
href: "/learn/waku-network",
label: "Home",
href: "/",
},
{
type: "link",
label: "Waku Research",
href: "/research",
},
{
type: "html",
value:
'<a href="https://discord.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Discord<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
{
type: "html",
value:
'<a href="https://github.com/waku-org/awesome-waku/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Awesome Waku<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
{
type: "html",
value:
'<a href="https://ideas.waku.org" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Waku Idea Board<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
{
type: "html",
value:
'<a href="https://github.com/waku-org/bounties/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">Post-Hackathon Bounties<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
type: "category",
label: "Run a Waku Node",
collapsed: false,
link: {
type: "doc",
id: "run-node/index",
},
items: [
"run-node/run-docker-compose",
"run-node/run-docker",
"run-node/build-source",
"run-node/configure-discovery",
"run-node/find-node-address",
"run-node/config-methods",
"run-node/config-options",
"run-node/configure-nwaku",
"run-node/faq",
"run-node/upgrade-instructions",
{
type: "html",
value:
'<a href="https://waku-org.github.io/waku-rest-api/" target="_blank" rel="noopener noreferrer" class="menu__link external-link">REST API Reference<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.1918 4H3.42848V2.85715H13.1428V12.5714H11.9999V4.80813L3.83254 12.9755L3.02441 12.1674L11.1918 4Z" fill="white"/></svg>',
},
],
},
],
learn: [
"learn/waku-network",
{
type: "link",
label: "Home",
href: "/",
},
"learn/index",
{
type: "category",
label: "Concepts",
@ -121,17 +107,42 @@ const sidebars = {
],
},
"learn/security-features",
"learn/research",
{
type: "category",
label: "Research",
link: {
type: "doc",
id: "learn/research/index",
},
items: [
{
type: "category",
label: "Benchmarks",
collapsed: false,
items: [
{
type: "autogenerated",
dirName: "learn/research/benchmarks",
},
],
},
{
type: "category",
label: "Research and Studies",
collapsed: false,
items: [
{
type: "autogenerated",
dirName: "learn/research/research-and-studies",
},
],
},
],
},
"learn/waku-vs-libp2p",
"learn/glossary",
"learn/faq",
],
research: [
{
type: "autogenerated",
dirName: "research", // '.' means the current docs folder
},
],
};
module.exports = sidebars;
module.exports = sidebars;

View File

@ -78,3 +78,40 @@ html[data-theme="dark"] .header-github-link:before {
.theme-doc-toc-desktop {
display: none;
}
.cta-buttons {
display: flex;
gap: 0.75rem;
margin: 1.5rem 0;
flex-wrap: wrap;
justify-content: flex-start;
.button {
background-color: rgb(var(--lsd-text-primary));
color: rgb(var(--lsd-surface-primary));
border: 1px solid rgb(var(--lsd-text-primary));
padding: 0.5rem 1.25rem;
text-decoration: none;
border-radius: 4px;
font-weight: 500;
transition: all 0.2s ease;
display: inline-block;
&:hover {
background-color: rgb(var(--lsd-surface-primary));
color: rgb(var(--lsd-text-primary));
text-decoration: none;
}
}
}
html[data-theme="dark"] .cta-buttons .button {
background-color: rgb(var(--lsd-text-primary));
color: rgb(var(--lsd-surface-primary));
border-color: rgb(var(--lsd-text-primary));
&:hover {
background-color: rgb(var(--lsd-surface-primary));
color: rgb(var(--lsd-text-primary));
}
}