docs update (#143)

This commit is contained in:
LordGhostX 2023-11-30 18:42:27 +01:00 committed by fryorcraken.eth
parent cb0b87a18a
commit f355e66e55
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
6 changed files with 32 additions and 6 deletions

View File

@ -43,7 +43,7 @@ Waku provides integrations tailored for mobile applications, enabling Waku to ru
| | 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 Spec](https://waku-org.github.io/waku-rest-api/) |
| [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/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) |
| [@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) |
| [nwaku-compose](https://github.com/waku-org/nwaku-compose) | Pre-configured Docker Compose setup for running and monitoring a `nwaku` node using Prometheus and Grafana | [Run Nwaku with Docker Compose](/guides/nwaku/run-docker-compose) |

View File

@ -5,6 +5,10 @@ hide_table_of_contents: true
This guide provides detailed steps to bootstrap your your node using [Static Peers](/learn/concepts/static-peers) and discover peers in the Waku Network using [DNS Discovery](/learn/concepts/dns-discovery).
:::info
If you do not set up a bootstrap node or discovery mechanism, your node will not connect to any remote peer.
:::
:::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.
:::
@ -189,6 +193,16 @@ const node = await createLightNode({
});
```
:::info
If you do not set up a bootstrap node or discovery mechanism, your node will not connect to any remote peer.
:::
## Retrieving connected peers
You can retrieve the array of peers connected to a node using the `libp2p.getPeers()` function within the `@waku/sdk` package:
```js
import { createLightNode, waitForRemotePeer } from "@waku/sdk";
const node = await createLightNode({ defaultBootstrap: true });
await waitForRemotePeer(node);
// Retrieve array of peers connected to the node
console.log(node.libp2p.getPeers());
```

View File

@ -34,6 +34,10 @@ Browser nodes can only connect to nodes with a domain name and secure WebSocket
This example describes configuring a domain name that resolves to your node's IP address and is unrelated to [DNS Discovery](/learn/concepts/dns-discovery).
:::
:::tip
You can use the domain name provided by your cloud provider to configure the domain name for your node.
:::
## Configure store protocol and message store
To enable message caching and serve them to network peers, enable the [Store protocol](/learn/concepts/protocols#store) using the following configuration options:

View File

@ -50,7 +50,7 @@ Once you have gotten the `nwaku` binary, run it using the [default configuration
```
:::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 Options](/guides/nwaku/config-options) guides.
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
@ -104,6 +104,10 @@ curl --location 'http://127.0.0.1:8645/debug/v1/info' \
The `listenAddresses` field stores the node's listening addresses, while the `enrUri` field stores the discoverable `ENR` URI for peer discovery.
:::
:::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/).
:::
## Find the node addresses
You can find the addresses of a running node through its logs or by calling the [Get node info](https://waku-org.github.io/waku-rest-api/#get-/debug/v1/info) endpoint of the [REST API](https://waku-org.github.io/waku-rest-api/).

View File

@ -4,7 +4,7 @@ hide_table_of_contents: true
---
:::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, better scalability, etc.
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, with built-in DoS protection, scalability and reasonable bandwidth usage.
:::
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:

View File

@ -19,6 +19,10 @@ const sidebars = {
"guides/nwaku/configure-nwaku",
"guides/nwaku/config-methods",
"guides/nwaku/config-options",
{
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>',
},
]
},
{