mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-02 12:53:12 +00:00
fix broken links
This commit is contained in:
parent
b6c61733ea
commit
8007311a07
@ -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
|
||||
|
||||
4
docs/build/javascript/debug-waku-dapp.md
vendored
4
docs/build/javascript/debug-waku-dapp.md
vendored
@ -4,7 +4,7 @@ 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
|
||||
|
||||
@ -46,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:
|
||||
|
||||
|
||||
22
docs/build/javascript/faq.md
vendored
22
docs/build/javascript/faq.md
vendored
@ -8,43 +8,43 @@ 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="/guides/js-waku/#installation">installation guide</a> to get started.
|
||||
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="/guides/js-waku/#message-structure">installation guide</a> and <a href="https://protobuf.dev/overview/">Protobuf documentation</a> to learn more.
|
||||
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="/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>.
|
||||
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="/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.
|
||||
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="/guides/js-waku/message-encryption">Encrypt, Decrypt, and Sign Your Messages</a> guide to get started.
|
||||
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="/guides/js-waku/use-waku-react">Build React DApps Using @waku/react</a> guide for instructions on installation and usage.
|
||||
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="/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.
|
||||
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="/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.
|
||||
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="/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.
|
||||
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="/guides/js-waku/manage-filter">Manage Your Filter Subscriptions</a> guide for a detailed explanation and step-by-step instructions.
|
||||
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?">
|
||||
@ -52,5 +52,5 @@ import { AccordionItem } from '@site/src/components/mdx'
|
||||
</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>.
|
||||
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>
|
||||
|
||||
26
docs/build/javascript/index.md
vendored
26
docs/build/javascript/index.md
vendored
@ -94,21 +94,21 @@ import "https://cdn.jsdelivr.net/npm/protobufjs@latest/dist/protobuf.min.js";
|
||||
|
||||
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 |
|
||||
| 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-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.
|
||||
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](/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
|
||||
|
||||
8
docs/build/javascript/light-send-receive.md
vendored
8
docs/build/javascript/light-send-receive.md
vendored
@ -4,7 +4,7 @@ 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
|
||||
|
||||
@ -22,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:
|
||||
@ -86,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({
|
||||
@ -128,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
|
||||
|
||||
2
docs/build/javascript/manage-filter.md
vendored
2
docs/build/javascript/manage-filter.md
vendored
@ -4,7 +4,7 @@ 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
|
||||
|
||||
|
||||
6
docs/build/javascript/reliable-channels.md
vendored
6
docs/build/javascript/reliable-channels.md
vendored
@ -42,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
|
||||
@ -60,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.
|
||||
@ -130,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
|
||||
|
||||
6
docs/build/javascript/run-waku-nodejs.md
vendored
6
docs/build/javascript/run-waku-nodejs.md
vendored
@ -14,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
|
||||
|
||||
@ -28,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).
|
||||
|
||||
@ -66,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
|
||||
@ -88,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
|
||||
|
||||
10
docs/build/javascript/use-waku-react.md
vendored
10
docs/build/javascript/use-waku-react.md
vendored
@ -157,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:
|
||||
@ -209,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";
|
||||
@ -246,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";
|
||||
@ -267,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";
|
||||
@ -304,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
|
||||
|
||||
@ -21,7 +21,7 @@ Waku is a family of robust, censorship-resistant, peer-to-peer communication pro
|
||||
</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!
|
||||
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 isn’t Waku?
|
||||
|
||||
@ -140,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.
|
||||
|
||||
|
||||
@ -28,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.
|
||||
|
||||
@ -100,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
|
||||
|
||||
@ -114,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.
|
||||
:::
|
||||
|
||||
@ -17,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
|
||||
@ -60,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]
|
||||
@ -90,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.
|
||||
:::
|
||||
|
||||
@ -174,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.
|
||||
:::
|
||||
|
||||
@ -110,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.
|
||||
:::
|
||||
|
||||
@ -10,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
|
||||
|
||||
@ -135,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`.
|
||||
|
||||
@ -8,7 +8,7 @@ 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?">
|
||||
@ -16,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?">
|
||||
@ -24,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>
|
||||
@ -57,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.
|
||||
:::
|
||||
|
||||
@ -98,5 +98,5 @@ If you encounter issues running your node or require assistance with anything, p
|
||||
:::
|
||||
|
||||
:::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.
|
||||
:::
|
||||
|
||||
@ -4,7 +4,7 @@ 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
|
||||
|
||||
@ -41,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:
|
||||
|
||||
@ -78,5 +78,5 @@ If you encounter issues running your node or require assistance with anything, p
|
||||
:::
|
||||
|
||||
:::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.
|
||||
:::
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user