New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@us3r-network/thread

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@us3r-network/thread

The @us3r-network/thread package provides some easy ways to create thread, and some options with thread, like comment,vote,favor,score.

latest
npmnpm
Version
0.3.0
Version published
Maintainers
5
Created
Source

@us3r-network/thread

The @us3r-network/thread package provides some easy ways to create thread, and some options with thread, like comment,vote,favor,score.

Install

npm i @us3r-network/thread

Usage

Wrapper app with Us3rThreadProvider, Us3rThreadProvider provides threadComposeClient relationsComposeClient witch communication with Ceramic. The methods like getThreadInfo createNewComment createNewFavor createNewVote createNewScore can create the comment vote in ceramic.


...
import { Us3rProfileProvider } from "@us3r-network/profile";
import { Us3rThreadProvider } from "@us3r-network/thread";

...

const ceramicHost =
  process.env.REACT_APP_CERAMIC_HOST || "http://13.215.254.225:7007";
...
    <Us3rProfileProvider ceramicHost={ceramicHost}>
      <Us3rThreadProvider ceramicHost={ceramicHost}>
        <App>
      </Us3rThreadProvider>
    </Us3rProfileProvider>
...
...
  const { sessId, profile, connectUs3r, us3rAuth, us3rAuthValid } =
    useUs3rProfileContext()!;
  const { threadComposeClient, relationsComposeClient } =
    useUs3rThreadContext()!;

  const authComposeClients = useCallback(() => {
    if (us3rAuthValid && us3rAuth.valid) {
      us3rAuth.authComposeClients([
        threadComposeClient,
        relationsComposeClient,
      ]);
    }
  }, [relationsComposeClient, threadComposeClient, us3rAuth, us3rAuthValid]);
...
...
  const {
    getThreadInfo,
    createNewComment,
    createNewFavor,
    createNewVote,
    createNewScore,
  } = useUs3rThreadContext()!;
...

In order to express how to use it more clearly, we have prepared a demo

FAQs

Package last updated on 29 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts