mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-02 21:03:13 +00:00
Merge branch 'develop' into fixes
This commit is contained in:
commit
b1737f7693
@ -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) |
|
||||
@ -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());
|
||||
```
|
||||
@ -3,6 +3,10 @@ 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
|
||||
|
||||
@ -3,6 +3,10 @@ title: "Build React DApps Using @waku/react"
|
||||
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 [@waku/react](https://www.npmjs.com/package/@waku/react) package provides components and UI adapters to integrate `@waku/sdk` into React applications effortlessly. This guide provides detailed steps for using `@waku/react` in your project.
|
||||
|
||||
## Install the dependencies
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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/).
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -51,6 +51,10 @@ const config = {
|
||||
],
|
||||
],
|
||||
themeConfig: {
|
||||
colorMode: {
|
||||
disableSwitch: false,
|
||||
respectPrefersColorScheme: true,
|
||||
},
|
||||
docs: {
|
||||
sidebar: {
|
||||
hideable: false,
|
||||
@ -159,11 +163,6 @@ const config = {
|
||||
},
|
||||
],
|
||||
},
|
||||
colorMode: {
|
||||
defaultMode: "dark",
|
||||
disableSwitch: false,
|
||||
respectPrefersColorScheme: false,
|
||||
},
|
||||
},
|
||||
markdown: {
|
||||
mermaid: true,
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@acid-info/docusaurus-fathom": "^1.0.0-alpha.111",
|
||||
"@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.119",
|
||||
"@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.122",
|
||||
"@docusaurus/core": "^2.4.1",
|
||||
"@docusaurus/preset-classic": "^2.4.1",
|
||||
"@docusaurus/theme-mermaid": "^2.4.1",
|
||||
|
||||
@ -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>',
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
18
yarn.lock
18
yarn.lock
@ -36,14 +36,14 @@
|
||||
satori "^0.10.1"
|
||||
sharp "^0.32.1"
|
||||
|
||||
"@acid-info/logos-docusaurus-preset@^1.0.0-alpha.119":
|
||||
version "1.0.0-alpha.119"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.119.tgz#877fffb3d662a082a412836c2e99b90b68b07626"
|
||||
integrity sha512-rN7OlyYGCGVphm7+ivtaQdDQVw9CppPnAzLUfJLSub878gbD2N1rSzbhwLXCQKc7yP7gsmyuMbq4nEFgTOQihA==
|
||||
"@acid-info/logos-docusaurus-preset@^1.0.0-alpha.122":
|
||||
version "1.0.0-alpha.122"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-preset/-/logos-docusaurus-preset-1.0.0-alpha.122.tgz#17413393d9c7a77db5faf4b9333a8760446feebc"
|
||||
integrity sha512-evBg2XFiU8/F8B78mIA/Ii1oP0zSKZ2qn1eMgx+4t8fyDr0w8VyqCBSInWmWjYkkzOrAEQWDrL0ZxNp/Ct47KA==
|
||||
dependencies:
|
||||
"@acid-info/docusaurus-og" "^1.0.0-alpha.111"
|
||||
"@acid-info/logos-docusaurus-search-local" "^1.0.0-alpha.111"
|
||||
"@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.119"
|
||||
"@acid-info/logos-docusaurus-theme" "^1.0.0-alpha.122"
|
||||
"@docusaurus/core" "^2.4.1"
|
||||
"@docusaurus/module-type-aliases" "^2.4.1"
|
||||
"@docusaurus/preset-classic" "^2.4.1"
|
||||
@ -71,10 +71,10 @@
|
||||
"@easyops-cn/docusaurus-search-local" "^0.33.6"
|
||||
lodash "^4.17.21"
|
||||
|
||||
"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.119":
|
||||
version "1.0.0-alpha.119"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.119.tgz#6c911305979eae077ef29747a0542a8f63df663d"
|
||||
integrity sha512-hlQwQWtPvJOnauhhOgdMT75oR0ZjftEU36LTnz15bg23ciINflEHaMSUrOzWEYjTMydPlg0rD4bQZ4Ifimk+IQ==
|
||||
"@acid-info/logos-docusaurus-theme@^1.0.0-alpha.122":
|
||||
version "1.0.0-alpha.122"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/logos-docusaurus-theme/-/logos-docusaurus-theme-1.0.0-alpha.122.tgz#4da98bf673acb11ebcaad685d8b1cab5f634b26f"
|
||||
integrity sha512-0GKEb94cObPzgfuH21X7MNro7j/zSisI+/7710VMOyidoI9W2OSfe7KwCuIQbW7Y9N+oyw+2YLYKu69RfiLbZg==
|
||||
dependencies:
|
||||
"@acid-info/docusaurus-og" "^1.0.0-alpha.111"
|
||||
"@acid-info/lsd-react" "^0.1.0-alpha.21"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user