Skip to main content

JavaScript SDK FAQ

You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the installation guide to get started.
Protocol Buffers ensure consistent formatting, interoperability, and backward compatibility for your application's messages, with a smaller payload size than JSON. Check out the installation guide and Protobuf documentation to learn more.
Check out the Retrieve Messages Using Store Protocol guide to learn how to retrieve and filter historical messages using the Store protocol.
When creating your message encoder, you can configure the ephemeral option to prevent Store peers from keeping your messages on the Waku Network.
You can encrypt and decrypt your messages using symmetric, ECIES, and noise encryption methods. Check out the Encrypt, Decrypt, and Sign Your Messages guide to get started.
Waku has a specialized SDK designed for building React applications. Check out the Build React DApps Using @waku/react guide for instructions on installation and usage.
The JavaScript SDK has a default bootstrap method that can be configured with Static Peers and DNS Discovery. Check out the Bootstrap Nodes and Discover Peers guide for setting up peer discovery for your node.
Though the JavaScript SDK isn't directly usable in NodeJS due to certain limitations, we recommend running nwaku in a Docker container and consuming its REST API in a NodeJS application.
Check out the Debug Your Waku DApp and WebSocket guide to discover how to use debug logs to troubleshoot your Waku DApp and resolve connection issues with nwaku WebSockets.
We recommend regularly pinging peers to check for an active connection and reinitiating the subscription when it disconnects. Check out the Manage Your Filter Subscriptions guide for a detailed explanation and step-by-step instructions.
While it's possible to transmit media such as images as bytes on Waku, we recommend uploading your media to a CDN or a file system like IPFS and then sharing the corresponding URL via Waku.