From 8132d5d0d11cac6be08afb008cd1b045f210eac9 Mon Sep 17 00:00:00 2001 From: LordGhostX Date: Wed, 6 Mar 2024 00:09:04 +0100 Subject: [PATCH] update DNS discovery + static peers config --- docs/guides/js-waku/configure-discovery.md | 8 +++----- docs/guides/js-waku/light-send-receive.md | 6 +++--- docs/guides/js-waku/message-encryption.md | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/guides/js-waku/configure-discovery.md b/docs/guides/js-waku/configure-discovery.md index bfb83f7..bc060c6 100644 --- a/docs/guides/js-waku/configure-discovery.md +++ b/docs/guides/js-waku/configure-discovery.md @@ -26,9 +26,7 @@ const node = await createLightNode({ defaultBootstrap: true }); ## Configure static peers -To set [static peers](/learn/concepts/static-peers) `bootstrapPeers` parameter should be passed to `createLightNode`. - -`bootstrapPeers` accepts a list of `multiaddr` to bootstrap the node: +To set [static peers](/learn/concepts/static-peers), a list of `multiaddr` to bootstrap the node should be passed to the `bootstrapPeers` parameter of the `createLightNode()` function: ```js import { createLightNode } from "@waku/sdk"; @@ -148,11 +146,11 @@ const NODE_REQUIREMENTS = { filter: 3, }; -// Bootstrap node using DNS Discovery +// Bootstrap node using DNS Discovery and static peers const node = await createLightNode({ libp2p: { + bootstrapPeers: peers, peerDiscovery: [ - bootstrap({ list: peers }), wakuDnsDiscovery( [enrTree["PROD"]], NODE_REQUIREMENTS, diff --git a/docs/guides/js-waku/light-send-receive.md b/docs/guides/js-waku/light-send-receive.md index 02bfa67..ae1ce5e 100644 --- a/docs/guides/js-waku/light-send-receive.md +++ b/docs/guides/js-waku/light-send-receive.md @@ -21,7 +21,7 @@ await node.start(); ``` :::info -When the `defaultBootstrap` option is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes. +When the `defaultBootstrap` parameter is set to `true`, your node will be bootstrapped using the [default bootstrap method](/guides/js-waku/configure-discovery#default-bootstrap-method). Have a look at the [Bootstrap Nodes and Discover Peers](/guides/js-waku/configure-discovery) guide to learn more methods to bootstrap nodes. ::: ## Connect to remote peers @@ -35,7 +35,7 @@ import { waitForRemotePeer } from "@waku/sdk"; await waitForRemotePeer(node); ``` -The `protocols` option allows you to specify the [protocols](/learn/concepts/protocols) that the remote peers should have enabled: +The `protocols` parameter allows you to specify the [protocols](/learn/concepts/protocols) that the remote peers should have enabled: ```js import { waitForRemotePeer, Protocols } from "@waku/sdk"; @@ -62,7 +62,7 @@ const encoder = createEncoder({ contentTopic }); const decoder = createDecoder(contentTopic); ``` -The `ephemeral` option allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages): +The `ephemeral` parameter allows you to specify whether messages should **NOT** be stored by [Store peers](/guides/js-waku/store-retrieve-messages): ```js const encoder = createEncoder({ diff --git a/docs/guides/js-waku/message-encryption.md b/docs/guides/js-waku/message-encryption.md index 0a1706a..d6a45a2 100644 --- a/docs/guides/js-waku/message-encryption.md +++ b/docs/guides/js-waku/message-encryption.md @@ -136,7 +136,7 @@ Message signing helps in proving the authenticity of received messages. By attac Signing messages is only possible when encrypted, but if your application does not require encryption, you can generate a symmetric key through hardcoded or deterministic methods using information available to all users. ::: -The `sigPrivKey` option allows the `Symmetric` and `ECIES` message `encoders` to sign the message before encryption using an `ECDSA` private key: +The `sigPrivKey` parameter allows the `Symmetric` and `ECIES` message `encoders` to sign the message before encryption using an `ECDSA` private key: ```js title="Alice (sender) client" import { generatePrivateKey, getPublicKey } from "@waku/message-encryption";