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