mirror of
https://github.com/logos-messaging/docs.waku.org.git
synced 2026-01-03 13:23:06 +00:00
1 line
6.6 KiB
JavaScript
1 line
6.6 KiB
JavaScript
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[7042],{35149:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>u});const i=JSON.parse('{"id":"guides/js-waku/faq","title":"JavaScript SDK FAQ","description":"You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the installation guide to get started.","source":"@site/docs/guides/js-waku/faq.md","sourceDirName":"guides/js-waku","slug":"/guides/js-waku/faq","permalink":"/guides/js-waku/faq","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/guides/js-waku/faq.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"JavaScript SDK FAQ","hide_table_of_contents":true,"sidebar_label":"Frequently Asked Questions"},"sidebar":"guides","previous":{"title":"Manage Your Filter Subscriptions","permalink":"/guides/js-waku/manage-filter"}}');var n=s(74848),o=s(28453),r=s(39018);const a={title:"JavaScript SDK FAQ",hide_table_of_contents:!0,sidebar_label:"Frequently Asked Questions"},c=void 0,d={},u=[];function l(e){const t={p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.AccordionItem,{title:"How do I install the @waku/sdk package in my project?",children:(0,n.jsxs)(t.p,{children:["You can add the JavaScript SDK to your project using NPM, Yarn, or a CDN. Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/#installation",children:"installation guide"})," to get started."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"Why should I use Protocol Buffers for my application's message structure when using Waku?",children:(0,n.jsxs)(t.p,{children:["Protocol Buffers ensure consistent formatting, interoperability, and backward compatibility for your application's messages, with a smaller payload size than JSON. Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/#message-structure",children:"installation guide"})," and ",(0,n.jsx)("a",{href:"https://protobuf.dev/overview/",children:"Protobuf documentation"})," to learn more."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"What are the steps to retrieve historical messages on Waku?",children:(0,n.jsxs)(t.p,{children:["Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/store-retrieve-messages",children:"Retrieve Messages Using Store Protocol"})," guide to learn how to retrieve and filter historical messages using the ",(0,n.jsx)("a",{href:"/learn/concepts/protocols#store",children:"Store protocol"}),"."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I prevent Store peers from storing my messages?",children:(0,n.jsxs)(t.p,{children:["When ",(0,n.jsx)("a",{href:"/guides/js-waku/light-send-receive#choose-a-content-topic",children:"creating your message encoder"}),", you can configure the ",(0,n.jsx)("strong",{children:"ephemeral"})," option to prevent Store peers from keeping your messages on the Waku Network."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I encrypt, decrypt, and sign messages in my Waku application?",children:(0,n.jsxs)(t.p,{children:["You can encrypt and decrypt your messages using symmetric, ECIES, and noise encryption methods. Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/message-encryption",children:"Encrypt, Decrypt, and Sign Your Messages"})," guide to get started."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How do I integrate Waku into a React application?",children:(0,n.jsxs)(t.p,{children:["Waku has a specialized SDK designed for building React applications. Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/use-waku-react",children:"Build React DApps Using @waku/react"})," guide for instructions on installation and usage."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I bootstrap and discover peers in the Waku Network for browser nodes?",children:(0,n.jsxs)(t.p,{children:["The JavaScript SDK has a ",(0,n.jsx)("a",{href:"/guides/js-waku/configure-discovery#default-bootstrap-method",children:"default bootstrap method"})," that can be configured with ",(0,n.jsx)("a",{href:"/learn/concepts/static-peers",children:"Static Peers"})," and ",(0,n.jsx)("a",{href:"/learn/concepts/dns-discovery",children:"DNS Discovery"}),". Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/configure-discovery",children:"Bootstrap Nodes and Discover Peers"})," guide for setting up peer discovery for your node."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I integrate Waku into a NodeJS application?",children:(0,n.jsxs)(t.p,{children:["Though the JavaScript SDK isn't directly usable in NodeJS due to ",(0,n.jsx)("a",{href:"/guides/js-waku/run-waku-nodejs",children:"certain limitations"}),", we recommend running ",(0,n.jsx)("a",{href:"/guides/nwaku/run-docker-compose",children:"nwaku in a Docker container"})," and consuming its ",(0,n.jsx)("a",{href:"https://waku-org.github.io/waku-rest-api/",children:"REST API"})," in a NodeJS application."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I debug my Waku DApp and check WebSocket connections?",children:(0,n.jsxs)(t.p,{children:["Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/debug-waku-dapp",children:"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."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I manage unexpected disconnections of my Filter subscription from Waku?",children:(0,n.jsxs)(t.p,{children:["We recommend regularly pinging peers to check for an active connection and reinitiating the subscription when it disconnects. Check out the ",(0,n.jsx)("a",{href:"/guides/js-waku/manage-filter",children:"Manage Your Filter Subscriptions"})," guide for a detailed explanation and step-by-step instructions."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I send images and videos on the Waku Network?",children:(0,n.jsxs)(t.p,{children:["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 ",(0,n.jsx)("a",{href:"https://ipfs.tech/",children:"IPFS"})," and then sharing the corresponding URL via Waku."]})}),"\n",(0,n.jsx)(r.AccordionItem,{title:"How can I connect to my own node?",children:(0,n.jsxs)(t.p,{children:["To manually set your own node as a starting point use ",(0,n.jsx)("a",{href:"/guides/js-waku/configure-discovery#configure-static-peers",children:"Configure static peers"}),"."]})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},39018:(e,t,s)=>{var i=s(98941);s.o(i,"AccordionItem")&&s.d(t,{AccordionItem:function(){return i.AccordionItem}})}}]); |