Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.23 KB

README.md

File metadata and controls

42 lines (31 loc) · 1.23 KB

Swarm Comment System web component

This is an embeddable widget that can be added to any HTML page. It renders a decentralised discussion system where everybody can comment in tree structure.

Swarm network

Swarm is a peer-to-peer network of Bee nodes that collectively provide censorship resistant decentralised storage and communication services.

Example Usage

<div id="comments"></div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script>
    window.SwarmCommentSystem.renderSwarmComments('comments')
</script>

Integrating it into a react application

return (
  <React.StrictMode>
    <App
      beeApiUrl="<your-node-address>"
      stamp={"<your-stamp>"}
      privatekey={"<your-author-privetakey>"}
      approvedFeedAddress={"<your-approved-address>"}
      identifier={"<your-deisred-topic>"}
    />
  </React.StrictMode>,
);

Recommended Usage

Upload the js file to the Swarm network, and refer that instead of the CDN.

Etherjot

This web component is also available as an extension in Etherjot.