diff --git a/docs/guides/js-waku/configure-discovery.md b/docs/guides/js-waku/configure-discovery.md index 684bf45..bc060c6 100644 --- a/docs/guides/js-waku/configure-discovery.md +++ b/docs/guides/js-waku/configure-discovery.md @@ -26,43 +26,14 @@ const node = await createLightNode({ defaultBootstrap: true }); ## Configure static peers -To bootstrap a node using [static peers](/learn/concepts/static-peers), first install the `@libp2p/bootstrap` package: - -```mdx-code-block -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -``` - - - - -```shell -npm install @libp2p/bootstrap -``` - - - - -```shell -yarn add @libp2p/bootstrap -``` - - - - -Then, use the `bootstrap()` function to provide 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"; -import { bootstrap } from "@libp2p/bootstrap"; // Bootstrap node using static peers const node = await createLightNode({ - libp2p: { - peerDiscovery: [ - bootstrap({ list: ["[PEER MULTIADDR]"] }), - ], - }, + bootstrapPeers: ["[PEER MULTIADDR]"], }); ``` @@ -77,11 +48,7 @@ const peers = [ // Bootstrap node using the static peers const node = await createLightNode({ - libp2p: { - peerDiscovery: [ - bootstrap({ list: peers }), - ], - }, + bootstrapPeers: peers, }); ``` @@ -179,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";