Skip to content

vasco-santos/gossipsub-js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gossipsub-js

Travis CI

Lead Maintainer

Vasco Santos

Table of Contents

Specs

Gossipsub is an implementation of pubsub based on meshsub and floodsub. You can read the specification here.

Install

npm install libp2p-gossipsub

Usage

const Gossipsub = require('libp2p-gossipsub')

const gsub = new Gossipsub(node)

gsub.start((err) => {
  if (err) {
    console.log('Upsy', err)
  }
  gsub.on('fruit', (data) => {
    console.log(data)
  })
  gsub.subscribe('fruit')

  gsub.publish('fruit', new Buffer('banana'))
})

API

Contribute

This module is actively under development. Please check out the issues and submit PRs!

License

MIT © Protocol Labs

About

JavaScript implementation of Gossipsub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%