From cd64e332a7c9845c0ab0a2e8498af6ad0aa8a00d Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:30:24 +1000 Subject: [PATCH 01/10] Split website in 4: - build - run node - learn - research --- .../javascript}/configure-discovery.mdx | 0 .../javascript}/debug-waku-dapp.md | 0 .../js-waku => build/javascript}/faq.md | 0 .../js-waku => build/javascript}/index.md | 0 .../javascript}/light-send-receive.md | 0 .../javascript}/manage-filter.md | 0 .../javascript}/message-encryption.mdx | 0 .../javascript}/reliable-channels.md | 0 .../javascript}/run-waku-nodejs.md | 0 .../javascript}/store-retrieve-messages.md | 0 .../javascript}/use-waku-create-app.md | 0 .../javascript}/use-waku-react.md | 0 docs/guides/getting-started.md | 1 - docs/landing.md | 52 +++++ .../nwaku => run-node}/build-source.md | 0 .../nwaku => run-node}/config-methods.md | 0 .../nwaku => run-node}/config-options.md | 0 .../nwaku => run-node}/configure-discovery.md | 0 .../nwaku => run-node}/configure-nwaku.md | 0 docs/{guides/nwaku => run-node}/faq.md | 0 .../nwaku => run-node}/find-node-address.md | 0 .../nwaku/run-node.md => run-node/index.md} | 0 .../nwaku => run-node}/run-docker-compose.md | 0 docs/{guides/nwaku => run-node}/run-docker.md | 0 .../upgrade-instructions.md | 0 docusaurus.config.js | 29 +-- package.json | 2 +- sidebars.js | 198 ++++++++++-------- src/css/custom.scss | 37 ++++ 29 files changed, 204 insertions(+), 115 deletions(-) rename docs/{guides/js-waku => build/javascript}/configure-discovery.mdx (100%) rename docs/{guides/js-waku => build/javascript}/debug-waku-dapp.md (100%) rename docs/{guides/js-waku => build/javascript}/faq.md (100%) rename docs/{guides/js-waku => build/javascript}/index.md (100%) rename docs/{guides/js-waku => build/javascript}/light-send-receive.md (100%) rename docs/{guides/js-waku => build/javascript}/manage-filter.md (100%) rename docs/{guides/js-waku => build/javascript}/message-encryption.mdx (100%) rename docs/{guides/js-waku => build/javascript}/reliable-channels.md (100%) rename docs/{guides/js-waku => build/javascript}/run-waku-nodejs.md (100%) rename docs/{guides/js-waku => build/javascript}/store-retrieve-messages.md (100%) rename docs/{guides/js-waku => build/javascript}/use-waku-create-app.md (100%) rename docs/{guides/js-waku => build/javascript}/use-waku-react.md (100%) create mode 100644 docs/landing.md rename docs/{guides/nwaku => run-node}/build-source.md (100%) rename docs/{guides/nwaku => run-node}/config-methods.md (100%) rename docs/{guides/nwaku => run-node}/config-options.md (100%) rename docs/{guides/nwaku => run-node}/configure-discovery.md (100%) rename docs/{guides/nwaku => run-node}/configure-nwaku.md (100%) rename docs/{guides/nwaku => run-node}/faq.md (100%) rename docs/{guides/nwaku => run-node}/find-node-address.md (100%) rename docs/{guides/nwaku/run-node.md => run-node/index.md} (100%) rename docs/{guides/nwaku => run-node}/run-docker-compose.md (100%) rename docs/{guides/nwaku => run-node}/run-docker.md (100%) rename docs/{guides/nwaku => run-node}/upgrade-instructions.md (100%) diff --git a/docs/guides/js-waku/configure-discovery.mdx b/docs/build/javascript/configure-discovery.mdx similarity index 100% rename from docs/guides/js-waku/configure-discovery.mdx rename to docs/build/javascript/configure-discovery.mdx diff --git a/docs/guides/js-waku/debug-waku-dapp.md b/docs/build/javascript/debug-waku-dapp.md similarity index 100% rename from docs/guides/js-waku/debug-waku-dapp.md rename to docs/build/javascript/debug-waku-dapp.md diff --git a/docs/guides/js-waku/faq.md b/docs/build/javascript/faq.md similarity index 100% rename from docs/guides/js-waku/faq.md rename to docs/build/javascript/faq.md diff --git a/docs/guides/js-waku/index.md b/docs/build/javascript/index.md similarity index 100% rename from docs/guides/js-waku/index.md rename to docs/build/javascript/index.md diff --git a/docs/guides/js-waku/light-send-receive.md b/docs/build/javascript/light-send-receive.md similarity index 100% rename from docs/guides/js-waku/light-send-receive.md rename to docs/build/javascript/light-send-receive.md diff --git a/docs/guides/js-waku/manage-filter.md b/docs/build/javascript/manage-filter.md similarity index 100% rename from docs/guides/js-waku/manage-filter.md rename to docs/build/javascript/manage-filter.md diff --git a/docs/guides/js-waku/message-encryption.mdx b/docs/build/javascript/message-encryption.mdx similarity index 100% rename from docs/guides/js-waku/message-encryption.mdx rename to docs/build/javascript/message-encryption.mdx diff --git a/docs/guides/js-waku/reliable-channels.md b/docs/build/javascript/reliable-channels.md similarity index 100% rename from docs/guides/js-waku/reliable-channels.md rename to docs/build/javascript/reliable-channels.md diff --git a/docs/guides/js-waku/run-waku-nodejs.md b/docs/build/javascript/run-waku-nodejs.md similarity index 100% rename from docs/guides/js-waku/run-waku-nodejs.md rename to docs/build/javascript/run-waku-nodejs.md diff --git a/docs/guides/js-waku/store-retrieve-messages.md b/docs/build/javascript/store-retrieve-messages.md similarity index 100% rename from docs/guides/js-waku/store-retrieve-messages.md rename to docs/build/javascript/store-retrieve-messages.md diff --git a/docs/guides/js-waku/use-waku-create-app.md b/docs/build/javascript/use-waku-create-app.md similarity index 100% rename from docs/guides/js-waku/use-waku-create-app.md rename to docs/build/javascript/use-waku-create-app.md diff --git a/docs/guides/js-waku/use-waku-react.md b/docs/build/javascript/use-waku-react.md similarity index 100% rename from docs/guides/js-waku/use-waku-react.md rename to docs/build/javascript/use-waku-react.md diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index 637cf2ec..276134d2 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -1,7 +1,6 @@ --- 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. diff --git a/docs/landing.md b/docs/landing.md new file mode 100644 index 00000000..76fe0db9 --- /dev/null +++ b/docs/landing.md @@ -0,0 +1,52 @@ +--- +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. + +
+ Start Building + Run a Node + Learn More + Explore Research +
+ + + +
+ +
+ +:::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 isn’t 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 + +
+ + +
diff --git a/docs/guides/nwaku/build-source.md b/docs/run-node/build-source.md similarity index 100% rename from docs/guides/nwaku/build-source.md rename to docs/run-node/build-source.md diff --git a/docs/guides/nwaku/config-methods.md b/docs/run-node/config-methods.md similarity index 100% rename from docs/guides/nwaku/config-methods.md rename to docs/run-node/config-methods.md diff --git a/docs/guides/nwaku/config-options.md b/docs/run-node/config-options.md similarity index 100% rename from docs/guides/nwaku/config-options.md rename to docs/run-node/config-options.md diff --git a/docs/guides/nwaku/configure-discovery.md b/docs/run-node/configure-discovery.md similarity index 100% rename from docs/guides/nwaku/configure-discovery.md rename to docs/run-node/configure-discovery.md diff --git a/docs/guides/nwaku/configure-nwaku.md b/docs/run-node/configure-nwaku.md similarity index 100% rename from docs/guides/nwaku/configure-nwaku.md rename to docs/run-node/configure-nwaku.md diff --git a/docs/guides/nwaku/faq.md b/docs/run-node/faq.md similarity index 100% rename from docs/guides/nwaku/faq.md rename to docs/run-node/faq.md diff --git a/docs/guides/nwaku/find-node-address.md b/docs/run-node/find-node-address.md similarity index 100% rename from docs/guides/nwaku/find-node-address.md rename to docs/run-node/find-node-address.md diff --git a/docs/guides/nwaku/run-node.md b/docs/run-node/index.md similarity index 100% rename from docs/guides/nwaku/run-node.md rename to docs/run-node/index.md diff --git a/docs/guides/nwaku/run-docker-compose.md b/docs/run-node/run-docker-compose.md similarity index 100% rename from docs/guides/nwaku/run-docker-compose.md rename to docs/run-node/run-docker-compose.md diff --git a/docs/guides/nwaku/run-docker.md b/docs/run-node/run-docker.md similarity index 100% rename from docs/guides/nwaku/run-docker.md rename to docs/run-node/run-docker.md diff --git a/docs/guides/nwaku/upgrade-instructions.md b/docs/run-node/upgrade-instructions.md similarity index 100% rename from docs/guides/nwaku/upgrade-instructions.md rename to docs/run-node/upgrade-instructions.md diff --git a/docusaurus.config.js b/docusaurus.config.js index 9c927fdd..a0faa5d8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -69,9 +69,15 @@ 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", @@ -101,19 +107,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 +151,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", diff --git a/package.json b/package.json index 90becc16..0d0dbb32 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/sidebars.js b/sidebars.js index 2007aa32..0890b177 100644 --- a/sidebars.js +++ b/sidebars.js @@ -2,136 +2,148 @@ /** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ const sidebars = { - guides: [ - "guides/getting-started", + docs: [ + { + type: "link", + label: "Home", + href: "/", + }, { type: "category", - label: "Run a Nwaku Node", - collapsed: true, + label: "Build", + collapsed: false, link: { type: "doc", - id: "guides/nwaku/run-node", + id: "build/javascript/index", }, 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", + "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: - 'REST API Reference', + '@waku/sdk Examples', + }, + { + type: "html", + value: + 'API Reference', }, ], }, { type: "category", - label: "JavaScript Waku SDK", - collapsed: true, + label: "Run a Nwaku Node", + collapsed: false, link: { type: "doc", - id: "guides/js-waku/index", + id: "run-node/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", + "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: - '@waku/sdk Examples', - }, - { - type: "html", - value: - 'API Reference', + 'REST API Reference', }, ], }, - { - type: "link", - label: "Learn About Waku", - href: "/learn/waku-network", - }, - { - type: "link", - label: "Waku Research", - href: "/research", - }, - { - type: "html", - value: - 'Discord', - }, - { - type: "html", - value: - 'Awesome Waku', - }, - { - type: "html", - value: - 'Waku Idea Board', - }, - { - type: "html", - value: - 'Post-Hackathon Bounties', - }, - ], - learn: [ - "learn/waku-network", { type: "category", - label: "Concepts", + label: "Learn", collapsed: false, items: [ - "learn/concepts/protocols", - "learn/concepts/content-topics", - "learn/concepts/network-domains", - "learn/concepts/transports", + "learn/waku-network", { type: "category", - label: "Peer Discovery", - link: { - type: "doc", - id: "learn/concepts/peer-discovery", - }, + label: "Concepts", + collapsed: false, items: [ - "learn/concepts/static-peers", - "learn/concepts/dns-discovery", - "learn/concepts/discv5", - "learn/concepts/peer-exchange", + "learn/concepts/protocols", + "learn/concepts/content-topics", + "learn/concepts/network-domains", + "learn/concepts/transports", + { + type: "category", + label: "Peer Discovery", + link: { + type: "doc", + id: "learn/concepts/peer-discovery", + }, + items: [ + "learn/concepts/static-peers", + "learn/concepts/dns-discovery", + "learn/concepts/discv5", + "learn/concepts/peer-exchange", + ], + }, ], }, + "learn/security-features", + "learn/research", + "learn/waku-vs-libp2p", + "learn/glossary", + "learn/faq", + ], + }, + { + type: "category", + label: "Research", + collapsed: false, + items: [ + { + type: "autogenerated", + dirName: "research", + }, ], }, - "learn/security-features", - "learn/research", - "learn/waku-vs-libp2p", - "learn/glossary", - "learn/faq", - ], - research: [ { - type: "autogenerated", - dirName: "research", // '.' means the current docs folder + type: "category", + label: "Resources", + collapsed: false, + items: [ + "guides/getting-started", + { + type: "html", + value: + 'Discord', + }, + { + type: "html", + value: + 'Awesome Waku', + }, + { + type: "html", + value: + 'Waku Idea Board', + }, + { + type: "html", + value: + 'Post-Hackathon Bounties', + }, + ], }, ], }; -module.exports = sidebars; +module.exports = sidebars; \ No newline at end of file diff --git a/src/css/custom.scss b/src/css/custom.scss index 6a9b44bb..2e88a310 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -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)); + } +} From 3c807e917c04791255363f9134be587bb6fd2a84 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:34:46 +1000 Subject: [PATCH 02/10] only show pages of section in sidebar --- docs/build/javascript/debug-waku-dapp.md | 1 + docs/build/javascript/faq.md | 1 + docs/build/javascript/index.md | 1 + docs/build/javascript/light-send-receive.md | 1 + docs/build/javascript/manage-filter.md | 1 + docs/build/javascript/reliable-channels.md | 1 + docs/build/javascript/run-waku-nodejs.md | 1 + .../javascript/store-retrieve-messages.md | 1 + docs/build/javascript/use-waku-create-app.md | 1 + docs/build/javascript/use-waku-react.md | 1 + docs/landing.md | 1 + docs/learn/concepts/content-topics.md | 1 + docs/learn/concepts/discv5.md | 1 + docs/learn/concepts/dns-discovery.md | 1 + docs/learn/concepts/network-domains.md | 1 + docs/learn/concepts/peer-discovery.md | 1 + docs/learn/concepts/peer-exchange.md | 1 + docs/learn/concepts/protocols.md | 1 + docs/learn/concepts/static-peers.md | 1 + docs/learn/concepts/transports.md | 1 + docs/learn/faq.md | 1 + docs/learn/glossary.md | 1 + docs/learn/research.md | 1 + docs/learn/security-features.md | 1 + docs/learn/waku-network.md | 1 + docs/learn/waku-vs-libp2p.md | 1 + docs/research/benchmarks/postgres-adoption.md | 1 + .../benchmarks/test-results-summary.md | 1 + docs/research/index.md | 1 + .../research-and-studies/capped-bandwidth.md | 1 + .../research-and-studies/incentivisation.md | 1 + .../research-and-studies/maximum-bandwidth.md | 1 + .../message-propagation.md | 1 + .../rln-key-benchmarks.md | 1 + docs/run-node/build-source.md | 1 + docs/run-node/config-methods.md | 1 + docs/run-node/config-options.md | 1 + docs/run-node/configure-discovery.md | 1 + docs/run-node/configure-nwaku.md | 1 + docs/run-node/faq.md | 1 + docs/run-node/find-node-address.md | 1 + docs/run-node/index.md | 1 + docs/run-node/run-docker-compose.md | 1 + docs/run-node/run-docker.md | 1 + docs/run-node/upgrade-instructions.md | 1 + sidebars.js | 104 ++++++------------ 46 files changed, 78 insertions(+), 71 deletions(-) diff --git a/docs/build/javascript/debug-waku-dapp.md b/docs/build/javascript/debug-waku-dapp.md index 149ab096..bd05adb3 100644 --- a/docs/build/javascript/debug-waku-dapp.md +++ b/docs/build/javascript/debug-waku-dapp.md @@ -1,6 +1,7 @@ --- 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). diff --git a/docs/build/javascript/faq.md b/docs/build/javascript/faq.md index 165fc389..5a33466f 100644 --- a/docs/build/javascript/faq.md +++ b/docs/build/javascript/faq.md @@ -2,6 +2,7 @@ title: JavaScript SDK FAQ hide_table_of_contents: true sidebar_label: Frequently Asked Questions +displayed_sidebar: build --- import { AccordionItem } from '@site/src/components/mdx' diff --git a/docs/build/javascript/index.md b/docs/build/javascript/index.md index bb61d839..746b0482 100644 --- a/docs/build/javascript/index.md +++ b/docs/build/javascript/index.md @@ -1,6 +1,7 @@ --- title: JavaScript Waku SDK hide_table_of_contents: true +displayed_sidebar: build --- :::caution diff --git a/docs/build/javascript/light-send-receive.md b/docs/build/javascript/light-send-receive.md index fd626040..b9e18360 100644 --- a/docs/build/javascript/light-send-receive.md +++ b/docs/build/javascript/light-send-receive.md @@ -1,6 +1,7 @@ --- 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. diff --git a/docs/build/javascript/manage-filter.md b/docs/build/javascript/manage-filter.md index 815a2010..2906afe5 100644 --- a/docs/build/javascript/manage-filter.md +++ b/docs/build/javascript/manage-filter.md @@ -1,6 +1,7 @@ --- 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. diff --git a/docs/build/javascript/reliable-channels.md b/docs/build/javascript/reliable-channels.md index ae914b91..0ca9cff3 100644 --- a/docs/build/javascript/reliable-channels.md +++ b/docs/build/javascript/reliable-channels.md @@ -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. diff --git a/docs/build/javascript/run-waku-nodejs.md b/docs/build/javascript/run-waku-nodejs.md index eaabc4c9..b1ebb31f 100644 --- a/docs/build/javascript/run-waku-nodejs.md +++ b/docs/build/javascript/run-waku-nodejs.md @@ -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. diff --git a/docs/build/javascript/store-retrieve-messages.md b/docs/build/javascript/store-retrieve-messages.md index 61d664c2..47fa5b37 100644 --- a/docs/build/javascript/store-retrieve-messages.md +++ b/docs/build/javascript/store-retrieve-messages.md @@ -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). diff --git a/docs/build/javascript/use-waku-create-app.md b/docs/build/javascript/use-waku-create-app.md index 16090809..c1029a95 100644 --- a/docs/build/javascript/use-waku-create-app.md +++ b/docs/build/javascript/use-waku-create-app.md @@ -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. diff --git a/docs/build/javascript/use-waku-react.md b/docs/build/javascript/use-waku-react.md index b612f5a5..aee7a688 100644 --- a/docs/build/javascript/use-waku-react.md +++ b/docs/build/javascript/use-waku-react.md @@ -1,6 +1,7 @@ --- title: "Build React DApps Using @waku/react" hide_table_of_contents: true +displayed_sidebar: build --- :::caution diff --git a/docs/landing.md b/docs/landing.md index 76fe0db9..c2a0f327 100644 --- a/docs/landing.md +++ b/docs/landing.md @@ -2,6 +2,7 @@ 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. diff --git a/docs/learn/concepts/content-topics.md b/docs/learn/concepts/content-topics.md index 82a6cada..1c6b3aca 100644 --- a/docs/learn/concepts/content-topics.md +++ b/docs/learn/concepts/content-topics.md @@ -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. diff --git a/docs/learn/concepts/discv5.md b/docs/learn/concepts/discv5.md index 0fe8424b..9e409492 100644 --- a/docs/learn/concepts/discv5.md +++ b/docs/learn/concepts/discv5.md @@ -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. diff --git a/docs/learn/concepts/dns-discovery.md b/docs/learn/concepts/dns-discovery.md index 6dfd58b5..1b6c554c 100644 --- a/docs/learn/concepts/dns-discovery.md +++ b/docs/learn/concepts/dns-discovery.md @@ -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. diff --git a/docs/learn/concepts/network-domains.md b/docs/learn/concepts/network-domains.md index 130f9c36..3c844237 100644 --- a/docs/learn/concepts/network-domains.md +++ b/docs/learn/concepts/network-domains.md @@ -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. diff --git a/docs/learn/concepts/peer-discovery.md b/docs/learn/concepts/peer-discovery.md index 9bd1d2d4..c05a5c9a 100644 --- a/docs/learn/concepts/peer-discovery.md +++ b/docs/learn/concepts/peer-discovery.md @@ -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. diff --git a/docs/learn/concepts/peer-exchange.md b/docs/learn/concepts/peer-exchange.md index a0109149..b835c250 100644 --- a/docs/learn/concepts/peer-exchange.md +++ b/docs/learn/concepts/peer-exchange.md @@ -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. diff --git a/docs/learn/concepts/protocols.md b/docs/learn/concepts/protocols.md index 25665858..edf6b44f 100644 --- a/docs/learn/concepts/protocols.md +++ b/docs/learn/concepts/protocols.md @@ -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: diff --git a/docs/learn/concepts/static-peers.md b/docs/learn/concepts/static-peers.md index 37eca6c4..94f847ea 100644 --- a/docs/learn/concepts/static-peers.md +++ b/docs/learn/concepts/static-peers.md @@ -1,6 +1,7 @@ --- 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). diff --git a/docs/learn/concepts/transports.md b/docs/learn/concepts/transports.md index f4331508..17007a39 100644 --- a/docs/learn/concepts/transports.md +++ b/docs/learn/concepts/transports.md @@ -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. diff --git a/docs/learn/faq.md b/docs/learn/faq.md index 025ff428..bd66ca7a 100644 --- a/docs/learn/faq.md +++ b/docs/learn/faq.md @@ -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' diff --git a/docs/learn/glossary.md b/docs/learn/glossary.md index 22e8b74a..a14acdaa 100644 --- a/docs/learn/glossary.md +++ b/docs/learn/glossary.md @@ -1,6 +1,7 @@ --- title: Glossary hide_table_of_contents: true +displayed_sidebar: learn --- # Waku Docs Glossary diff --git a/docs/learn/research.md b/docs/learn/research.md index e5f339de..9e8a4df4 100644 --- a/docs/learn/research.md +++ b/docs/learn/research.md @@ -1,6 +1,7 @@ --- title: Research hide_table_of_contents: true +displayed_sidebar: learn --- The following features are currently experimental and under research and initial implementation: diff --git a/docs/learn/security-features.md b/docs/learn/security-features.md index 7870d429..193769a5 100644 --- a/docs/learn/security-features.md +++ b/docs/learn/security-features.md @@ -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. diff --git a/docs/learn/waku-network.md b/docs/learn/waku-network.md index a09d1986..f723fbb1 100644 --- a/docs/learn/waku-network.md +++ b/docs/learn/waku-network.md @@ -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: diff --git a/docs/learn/waku-vs-libp2p.md b/docs/learn/waku-vs-libp2p.md index b5587349..9d8e1688 100644 --- a/docs/learn/waku-vs-libp2p.md +++ b/docs/learn/waku-vs-libp2p.md @@ -1,6 +1,7 @@ --- 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. diff --git a/docs/research/benchmarks/postgres-adoption.md b/docs/research/benchmarks/postgres-adoption.md index 89fba195..b44642f2 100644 --- a/docs/research/benchmarks/postgres-adoption.md +++ b/docs/research/benchmarks/postgres-adoption.md @@ -1,6 +1,7 @@ --- title: PostgreSQL description: Document that describes why Nim-Waku started to use Postgres and shows some benchmark and comparison results. +displayed_sidebar: research --- ## Introduction diff --git a/docs/research/benchmarks/test-results-summary.md b/docs/research/benchmarks/test-results-summary.md index b5786bf4..3f95fcbe 100644 --- a/docs/research/benchmarks/test-results-summary.md +++ b/docs/research/benchmarks/test-results-summary.md @@ -1,5 +1,6 @@ --- title: Performance Benchmarks and Test Reports +displayed_sidebar: research --- diff --git a/docs/research/index.md b/docs/research/index.md index fabbcfb2..b15c46b0 100644 --- a/docs/research/index.md +++ b/docs/research/index.md @@ -2,6 +2,7 @@ title: Research hide_table_of_contents: true sidebar_position: 1 +displayed_sidebar: research --- **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. diff --git a/docs/research/research-and-studies/capped-bandwidth.md b/docs/research/research-and-studies/capped-bandwidth.md index 007099c2..cf6afc3d 100644 --- a/docs/research/research-and-studies/capped-bandwidth.md +++ b/docs/research/research-and-studies/capped-bandwidth.md @@ -1,5 +1,6 @@ --- title: Capped Bandwidth in Waku +displayed_sidebar: research --- This post explains i) why The Waku Network requires a capped bandwidth per shard and ii) how to achieve it by rate limiting with RLN v2. diff --git a/docs/research/research-and-studies/incentivisation.md b/docs/research/research-and-studies/incentivisation.md index 5721e16b..4add9340 100644 --- a/docs/research/research-and-studies/incentivisation.md +++ b/docs/research/research-and-studies/incentivisation.md @@ -1,5 +1,6 @@ --- title: Incentivisation +displayed_sidebar: research --- Waku is a family of decentralised communication protocols. The Waku Network (TWN) consists of independent nodes running Waku protocols. TWN needs incentivisation (shortened to i13n) to ensure proper node behaviour. diff --git a/docs/research/research-and-studies/maximum-bandwidth.md b/docs/research/research-and-studies/maximum-bandwidth.md index 1d7d6007..a2e8466a 100644 --- a/docs/research/research-and-studies/maximum-bandwidth.md +++ b/docs/research/research-and-studies/maximum-bandwidth.md @@ -1,5 +1,6 @@ --- title: Maximum Bandwidth for Global Adoption +displayed_sidebar: research --- **TLDR**: This issue aims to **set the maximum bandwidth** in `x Mbps` that each waku shard should consume so that the **maximum amount of people can run a full waku node**. It is up to https://github.com/waku-org/research/issues/22 to specify how this maximum will be enforced. diff --git a/docs/research/research-and-studies/message-propagation.md b/docs/research/research-and-studies/message-propagation.md index 6fa17334..d20e5800 100644 --- a/docs/research/research-and-studies/message-propagation.md +++ b/docs/research/research-and-studies/message-propagation.md @@ -1,5 +1,6 @@ --- title: Message Propagation Times With Waku-RLN +displayed_sidebar: research --- **TLDR**: We present the results of 1000 `nwaku` nodes running `rln` using different message sizes, in a real network with bandwidth limitations and network delays. The goal is to study the message propagation delay distribution, and how it's affected by i) rln and ii) message size in a real environment. We observe that for messages of `10kB` the average end-to-end propagation delay is `508 ms`. We can also observe that the message propagation delays are severely affected when increasing the message size, which indicates that it is not a good idea to use waku for messages of eg. `500kB`. See simulation parameters. diff --git a/docs/research/research-and-studies/rln-key-benchmarks.md b/docs/research/research-and-studies/rln-key-benchmarks.md index a7554bcf..a5e13eff 100644 --- a/docs/research/research-and-studies/rln-key-benchmarks.md +++ b/docs/research/research-and-studies/rln-key-benchmarks.md @@ -1,5 +1,6 @@ --- title: RLN Key Benchmarks +displayed_sidebar: research --- ## Introduction diff --git a/docs/run-node/build-source.md b/docs/run-node/build-source.md index 282df704..9d510b4b 100644 --- a/docs/run-node/build-source.md +++ b/docs/run-node/build-source.md @@ -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. diff --git a/docs/run-node/config-methods.md b/docs/run-node/config-methods.md index c9969aeb..75a8f067 100644 --- a/docs/run-node/config-methods.md +++ b/docs/run-node/config-methods.md @@ -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: diff --git a/docs/run-node/config-options.md b/docs/run-node/config-options.md index 6041cfec..308c5d82 100644 --- a/docs/run-node/config-options.md +++ b/docs/run-node/config-options.md @@ -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: diff --git a/docs/run-node/configure-discovery.md b/docs/run-node/configure-discovery.md index deabc904..debdf8fe 100644 --- a/docs/run-node/configure-discovery.md +++ b/docs/run-node/configure-discovery.md @@ -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. diff --git a/docs/run-node/configure-nwaku.md b/docs/run-node/configure-nwaku.md index c83c31be..f13c138b 100644 --- a/docs/run-node/configure-nwaku.md +++ b/docs/run-node/configure-nwaku.md @@ -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. diff --git a/docs/run-node/faq.md b/docs/run-node/faq.md index 2544bbec..3c5c8748 100644 --- a/docs/run-node/faq.md +++ b/docs/run-node/faq.md @@ -2,6 +2,7 @@ title: Nwaku FAQ hide_table_of_contents: true sidebar_label: Frequently Asked Questions +displayed_sidebar: runNode --- import { AccordionItem } from '@site/src/components/mdx' diff --git a/docs/run-node/find-node-address.md b/docs/run-node/find-node-address.md index 931fd3ad..e1ac5887 100644 --- a/docs/run-node/find-node-address.md +++ b/docs/run-node/find-node-address.md @@ -1,6 +1,7 @@ --- title: Find Your Node Address hide_table_of_contents: true +displayed_sidebar: runNode --- :::info diff --git a/docs/run-node/index.md b/docs/run-node/index.md index ac44cd45..e69e4eea 100644 --- a/docs/run-node/index.md +++ b/docs/run-node/index.md @@ -1,6 +1,7 @@ --- title: Run a Nwaku 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. diff --git a/docs/run-node/run-docker-compose.md b/docs/run-node/run-docker-compose.md index a8174013..ca6ae36a 100644 --- a/docs/run-node/run-docker-compose.md +++ b/docs/run-node/run-docker-compose.md @@ -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: diff --git a/docs/run-node/run-docker.md b/docs/run-node/run-docker.md index 15a8efaf..ab182c9f 100644 --- a/docs/run-node/run-docker.md +++ b/docs/run-node/run-docker.md @@ -1,6 +1,7 @@ --- 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. diff --git a/docs/run-node/upgrade-instructions.md b/docs/run-node/upgrade-instructions.md index 3a28fda3..1bf60943 100644 --- a/docs/run-node/upgrade-instructions.md +++ b/docs/run-node/upgrade-instructions.md @@ -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' diff --git a/sidebars.js b/sidebars.js index 0890b177..0266fb4e 100644 --- a/sidebars.js +++ b/sidebars.js @@ -2,15 +2,10 @@ /** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ const sidebars = { - docs: [ - { - type: "link", - label: "Home", - href: "/", - }, + build: [ { type: "category", - label: "Build", + label: "JavaScript SDK", collapsed: false, link: { type: "doc", @@ -40,6 +35,8 @@ const sidebars = { }, ], }, + ], + runNode: [ { type: "category", label: "Run a Nwaku Node", @@ -66,84 +63,49 @@ const sidebars = { }, ], }, + ], + learn: [ + "learn/waku-network", { type: "category", - label: "Learn", + label: "Concepts", collapsed: false, items: [ - "learn/waku-network", + "learn/concepts/protocols", + "learn/concepts/content-topics", + "learn/concepts/network-domains", + "learn/concepts/transports", { type: "category", - label: "Concepts", - collapsed: false, + label: "Peer Discovery", + link: { + type: "doc", + id: "learn/concepts/peer-discovery", + }, items: [ - "learn/concepts/protocols", - "learn/concepts/content-topics", - "learn/concepts/network-domains", - "learn/concepts/transports", - { - type: "category", - label: "Peer Discovery", - link: { - type: "doc", - id: "learn/concepts/peer-discovery", - }, - items: [ - "learn/concepts/static-peers", - "learn/concepts/dns-discovery", - "learn/concepts/discv5", - "learn/concepts/peer-exchange", - ], - }, + "learn/concepts/static-peers", + "learn/concepts/dns-discovery", + "learn/concepts/discv5", + "learn/concepts/peer-exchange", ], }, - "learn/security-features", - "learn/research", - "learn/waku-vs-libp2p", - "learn/glossary", - "learn/faq", - ], - }, - { - type: "category", - label: "Research", - collapsed: false, - items: [ - { - type: "autogenerated", - dirName: "research", - }, ], }, + "learn/security-features", + "learn/research", + "learn/waku-vs-libp2p", + "learn/glossary", + "learn/faq", + ], + research: [ { - type: "category", - label: "Resources", - collapsed: false, - items: [ - "guides/getting-started", - { - type: "html", - value: - 'Discord', - }, - { - type: "html", - value: - 'Awesome Waku', - }, - { - type: "html", - value: - 'Waku Idea Board', - }, - { - type: "html", - value: - 'Post-Hackathon Bounties', - }, - ], + type: "autogenerated", + dirName: "research", }, ], + guides: [ + "guides/getting-started", + ], }; module.exports = sidebars; \ No newline at end of file From 299a5c5bd385e299bae69712a88aeebbd9ee92dd Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:36:24 +1000 Subject: [PATCH 03/10] home button on each sidebar --- sidebars.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sidebars.js b/sidebars.js index 0266fb4e..45f47e61 100644 --- a/sidebars.js +++ b/sidebars.js @@ -3,6 +3,11 @@ /** @type {import("@docusaurus/plugin-content-docs").SidebarsConfig} */ const sidebars = { build: [ + { + type: "link", + label: "Home", + href: "/", + }, { type: "category", label: "JavaScript SDK", @@ -37,6 +42,11 @@ const sidebars = { }, ], runNode: [ + { + type: "link", + label: "Home", + href: "/", + }, { type: "category", label: "Run a Nwaku Node", @@ -65,6 +75,11 @@ const sidebars = { }, ], learn: [ + { + type: "link", + label: "Home", + href: "/", + }, "learn/waku-network", { type: "category", @@ -98,12 +113,22 @@ const sidebars = { "learn/faq", ], research: [ + { + type: "link", + label: "Home", + href: "/", + }, { type: "autogenerated", dirName: "research", }, ], guides: [ + { + type: "link", + label: "Home", + href: "/", + }, "guides/getting-started", ], }; From 888915966df11e3c976c32153181c6d10d93c5bb Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:38:47 +1000 Subject: [PATCH 04/10] index.md for homepages --- docs/landing.md | 4 ++-- docs/learn/{waku-network.md => index.md} | 0 docusaurus.config.js | 4 ++-- sidebars.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename docs/learn/{waku-network.md => index.md} (100%) diff --git a/docs/landing.md b/docs/landing.md index c2a0f327..998fa006 100644 --- a/docs/landing.md +++ b/docs/landing.md @@ -10,8 +10,8 @@ Waku is a family of robust, censorship-resistant, peer-to-peer communication pro
Start Building Run a Node - Learn More - Explore Research + Learn More + Explore Research
diff --git a/docs/learn/waku-network.md b/docs/learn/index.md similarity index 100% rename from docs/learn/waku-network.md rename to docs/learn/index.md diff --git a/docusaurus.config.js b/docusaurus.config.js index a0faa5d8..50f0320a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -82,13 +82,13 @@ const config = { { position: "left", label: "Learn", - to: "/learn/waku-network", + to: "/learn/", activeBaseRegex: "^/learn/", }, { position: "left", label: "Research", - to: "/research", + to: "/research/", activeBaseRegex: "^/research/", }, { diff --git a/sidebars.js b/sidebars.js index 45f47e61..6a7ee8cc 100644 --- a/sidebars.js +++ b/sidebars.js @@ -80,7 +80,7 @@ const sidebars = { label: "Home", href: "/", }, - "learn/waku-network", + "learn/index", { type: "category", label: "Concepts", From ee4780f3dd5e4f9488cfcd0cd244409e738954ca Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:40:56 +1000 Subject: [PATCH 05/10] Add video tutorials --- docs/build/javascript/index.md | 8 ++++++++ docs/run-node/index.md | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/build/javascript/index.md b/docs/build/javascript/index.md index 746b0482..26870835 100644 --- a/docs/build/javascript/index.md +++ b/docs/build/javascript/index.md @@ -10,6 +10,14 @@ Currently, the JavaScript Waku SDK (`@waku/sdk`) is **NOT compatible** with Reac 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 + +
+ + + +
+ ## Installation Install the `@waku/sdk` package using your preferred package manager: diff --git a/docs/run-node/index.md b/docs/run-node/index.md index e69e4eea..8c043aed 100644 --- a/docs/run-node/index.md +++ b/docs/run-node/index.md @@ -6,7 +6,11 @@ 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. -![waku architecture](/img/architecture.png) +## Video Tutorials + +
+ +
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. From 951f0e5eeb9e1783f7604d8327d7d6c880dc8751 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:42:26 +1000 Subject: [PATCH 06/10] delete old getting-started --- docs/guides/getting-started.md | 92 ---------------------------------- sidebars.js | 8 --- 2 files changed, 100 deletions(-) delete mode 100644 docs/guides/getting-started.md diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md deleted file mode 100644 index 276134d2..00000000 --- a/docs/guides/getting-started.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Introduction to Waku -hide_table_of_contents: true ---- - -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) -``` - -
- -
- -:::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 isn’t 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 - -
- - -
- -## Getting started - -
- - - -
- -### 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. - -
- -
- -:::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/). -::: diff --git a/sidebars.js b/sidebars.js index 6a7ee8cc..af0a7b54 100644 --- a/sidebars.js +++ b/sidebars.js @@ -123,14 +123,6 @@ const sidebars = { dirName: "research", }, ], - guides: [ - { - type: "link", - label: "Home", - href: "/", - }, - "guides/getting-started", - ], }; module.exports = sidebars; \ No newline at end of file From ffae6e8b68eee1ba183715ad01fcd6d356861e28 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 16:44:24 +1000 Subject: [PATCH 07/10] rename to "Waku node" --- docs/run-node/index.md | 2 +- sidebars.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/run-node/index.md b/docs/run-node/index.md index 8c043aed..51011138 100644 --- a/docs/run-node/index.md +++ b/docs/run-node/index.md @@ -1,5 +1,5 @@ --- -title: Run a Nwaku Node +title: Run a Waku Node hide_table_of_contents: true displayed_sidebar: runNode --- diff --git a/sidebars.js b/sidebars.js index af0a7b54..315be4d4 100644 --- a/sidebars.js +++ b/sidebars.js @@ -49,7 +49,7 @@ const sidebars = { }, { type: "category", - label: "Run a Nwaku Node", + label: "Run a Waku Node", collapsed: false, link: { type: "doc", From 6268010602c4c25d45729e02b8f2a3715e003510 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 18:31:34 +1000 Subject: [PATCH 08/10] fix nwaku compose --- docs/run-node/index.md | 152 ++++++++-------------------- docs/run-node/run-docker-compose.md | 31 +----- docs/run-node/run-docker.md | 2 +- 3 files changed, 47 insertions(+), 138 deletions(-) diff --git a/docs/run-node/index.md b/docs/run-node/index.md index 51011138..b71b6d33 100644 --- a/docs/run-node/index.md +++ b/docs/run-node/index.md @@ -6,141 +6,77 @@ 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 Tutorials +## Video Tutorial
-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. +## Quick Start with Docker Compose (Recommended) -:::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: +The easiest way to run a Waku node is using [Docker Compose](/run-node/run-docker-compose). This setup automatically configures: -| | 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) | +- 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 -#### Download the binary +### Prerequisites -| | 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) | +- **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. -#### 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/). +:::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. ::: -## Run the node - -Once you have gotten the `nwaku` binary, run it using the [default configuration](/guides/nwaku/config-methods#default-configuration-values): +### Get Started ```shell -# Run the Docker Compose -docker-compose up -d +# Clone the repository +git clone https://github.com/waku-org/nwaku-compose +cd nwaku-compose -# 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 +# Configure your node +cp .env.example .env +# Edit .env with your settings -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'; -``` - - - - -```shell -curl --location 'http://127.0.0.1:8645/debug/v1/info' \ ---header 'Accept: application/json' -``` - - - - -```json -{ - "listenAddresses": [ - "/ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmUbPquFQqje3jiqoB5YoiUbBya59NB4qqEzeiTNGHeA6w" - ], - "enrUri": "enr:-Iu4QCQZXZDb_JsYmLoYor0F5E_95HbIywgO_wgx2rIdDbmCJZkTzmlCr0wmMzV47lgik_tVwww5mIng90Ris83TisMBgmlkgnY0gmlwhAAAAACJc2VjcDI1NmsxoQPszztG-Ev52ZB7tk0jF8s6Md4KvyY_rhzNZokaaB_ABIN0Y3CC6mCFd2FrdTIB" -} +# Start your node +docker-compose up -d ``` - - +For detailed setup instructions, see [Run Nwaku with Docker Compose](/run-node/run-docker-compose). -:::info -The `listenAddresses` field stores the node's listening addresses, while the `enrUri` field stores the discoverable `ENR` URI for peer discovery. -::: +## Alternative Installation Methods -## Check the node health status +While Docker Compose is recommended, you can also: -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/): +- **[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 -```shell -curl --location 'http://127.0.0.1:8645/health' \ ---header 'Accept: text/plain' -``` +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 -```txt -Node is healthy -``` +## 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 -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. +Download the [Waku Node Operator Cheatsheet](/Waku-NodeOperator.pdf) for quick reference on operating your node. ::: -:::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. -::: +## 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 \ No newline at end of file diff --git a/docs/run-node/run-docker-compose.md b/docs/run-node/run-docker-compose.md index ca6ae36a..16ec716e 100644 --- a/docs/run-node/run-docker-compose.md +++ b/docs/run-node/run-docker-compose.md @@ -24,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. @@ -52,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: @@ -102,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 @@ -121,7 +94,7 @@ 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! diff --git a/docs/run-node/run-docker.md b/docs/run-node/run-docker.md index ab182c9f..7b674f0d 100644 --- a/docs/run-node/run-docker.md +++ b/docs/run-node/run-docker.md @@ -74,7 +74,7 @@ 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! From dd130a8ac7e08febae8d974d52e4d520cbd2fe46 Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 23:04:33 +1000 Subject: [PATCH 09/10] add to dict --- .cspell.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 51345090..d2368dfa 100644 --- a/.cspell.json +++ b/.cspell.json @@ -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": [ From 0524b3b48c70dd28cf5269626ea0e17bfafd4b9e Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Mon, 29 Sep 2025 22:34:23 +1000 Subject: [PATCH 10/10] Add Nim guide --- docs/build/javascript/index.md | 2 +- docs/build/nim/index.md | 163 +++++++++++++++++++++++++++++++++ sidebars.js | 7 +- 3 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 docs/build/nim/index.md diff --git a/docs/build/javascript/index.md b/docs/build/javascript/index.md index 26870835..1b673bd1 100644 --- a/docs/build/javascript/index.md +++ b/docs/build/javascript/index.md @@ -1,5 +1,5 @@ --- -title: JavaScript Waku SDK +title: JavaScript hide_table_of_contents: true displayed_sidebar: build --- diff --git a/docs/build/nim/index.md b/docs/build/nim/index.md new file mode 100644 index 00000000..356c4f06 --- /dev/null +++ b/docs/build/nim/index.md @@ -0,0 +1,163 @@ +--- +title: Nim +hide_table_of_contents: true +displayed_sidebar: build +--- + +Nwaku provides a native Nim implementation of the Waku protocol, allowing developers to build Waku native applications directly in Nim. +This guide demonstrates how to use the Waku library API to create and configure Waku nodes. + +## Installation + +To use the Waku Nim SDK, you'll need to: + +1. Install [Nim](https://nim-lang.org/install.html) (version 2.2.4 or higher) +2. Add the nwaku library to your project + +:::warning +Waku does not currently work with Nimble package manager. You can track progress on Nimble support in [PR #3564](https://github.com/waku-org/nwaku/pull/3564). +::: + +```bash +# Install nwaku as a dependency +nimble install waku +``` + +## Creating a Waku Node + +Waku uses blockchain smart contract to DoS protect nodes in the network. +The protocol is called [RLN relay](/learn/concepts/protocols#rln-relay). + +To connect to the Waku Network, you'll need a Linea Sepolia RPC endpoint. + +Let's create a simple CLI that takes an RPC URL as argument: + +`your_waku_app.nim` +```nim +import std/options +import chronos, results, confutils, confutils/defs +import waku + +type CliArgs = object + ethRpcEndpoint* {. + defaultValue: "", + desc: "ETH RPC Endpoint for RLN support" + .}: string + +when isMainModule: + let args = CliArgs.load() + + if args.ethRpcEndpoint == "": + echo "Please provide a Linea Sepolia RPC endpoint to connect to the Waku Network" + quit(QuitFailure) + + echo "Starting Waku node with RLN..." + + # Create configuration with RLN enabled + let config = NodeConfig.init( + ethRpcEndpoints = @[args.ethRpcEndpoint] + ) + + # Create the node + let node = (waitFor createNode(config)).valueOr: + echo "Failed to create node: ", error + quit(QuitFailure) + + echo "Waku node created successfully!" + + # Start the node + (waitFor startWaku(addr node)).isOkOr: + echo "Failed to start node: ", error + quit(QuitFailure) + + echo "Node started successfully with RLN enabled!" + runForever() +``` + +### Running the CLI + +To run your CLI: + +```bash +nim c -r your_waku_app.nim --ethRpcEndpoint="https://linea-sepolia.infura.io/v3/some-api-key" +``` + +## Blockchain-less Development Mode + +For development and testing purposes, you can create a Waku node without blockchain integration. +This mode wil not have DoS protection but allows you to experiment with the Waku protocol without needing an RPC endpoint. + +`your_waku_app.nim` +```nim +import std/options +import chronos, results +import waku + +when isMainModule: + echo "Starting Waku node in development mode..." + + # Create a basic configuration without RLN + let config = NodeConfig.init( + wakuConfig = WakuConfig.init( + entryNodes = @[], # Add ENRs of bootstrap nodes if needed + clusterId = 42 # Use a custom cluster ID for your test network + ) + ) + + # Create the node + let node = (waitFor createNode(config)).valueOr: + echo "Failed to create node: ", error + quit(QuitFailure) + + echo "Waku node created successfully!" + + # Start the node + (waitFor startWaku(addr node)).isOkOr: + echo "Failed to start node: ", error + quit(QuitFailure) + + echo "Node started in development mode!" + runForever() +``` + +### Running in Development Mode + +```bash +nim c -r your_waku_app.nimyour_waku_app.nim +``` + +## Configuration Options + +### With Custom Bootstrap Nodes + +You can specify bootstrap nodes to connect to specific networks: + +```nim +let config = NodeConfig.init( + wakuConfig = WakuConfig.init( + entryNodes = @[ + "enr:-P-4QG_d...", # Replace with actual ENR + "/ip5/1.2..." # Replace with actual multiaddr + ], + clusterId = 42 + ) +) +``` + +## API Status + +:::info +The Waku Nim library API is under active development. Currently, node creation and configuration are supported. Additional API verbs for message handling, subscriptions, and protocol interactions are work in progress. +::: + +## Examples and Resources + +- [nwaku examples](https://github.com/waku-org/nwaku/tree/master/examples) - Official examples repository +- [waku_api.nim](https://github.com/waku-org/nwaku/blob/master/examples/waku_api.nim) - Library API example +- [nwaku repo](https://github.com/waku-org/nwaku) - nwaku GitHub Repository + +## Get Help + +- Visit the #help-desk channel on [Discord](https://discord.waku.org/) +- Check the [nwaku GitHub repository](https://github.com/waku-org/nwaku) for issues and updates +- Review the [protocol documentation](/learn/concepts/protocols) to understand Waku's capabilities \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 315be4d4..558c069c 100644 --- a/sidebars.js +++ b/sidebars.js @@ -10,7 +10,7 @@ const sidebars = { }, { type: "category", - label: "JavaScript SDK", + label: "JavaScript", collapsed: false, link: { type: "doc", @@ -40,6 +40,11 @@ const sidebars = { }, ], }, + { + type: "doc", + id: "build/nim/index", + label: "Nim", + }, ], runNode: [ {