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

consent-swarm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

consent-swarm

discovery-swarm with consent to upgrade to data transfer

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

discovery-swarm with two-way replication consent

npm install consent-swarm

build status

Usage

var swarm = require('consent-swarm')

var sw = swarm()

sw.listen(1000)
sw.join('ubuntu-14.04') // can be any id/name/hash

sw.on('connection', function (connection) {
  connection.on('request', function (data) {
    // here the client can send some data that might help the user
    // make a decision if they want to continue the connection
    // or only replicate parts of the data
    if (data === 'my-secret-decision-process') {
      connection.accept({message: 'ok sure'})
    } else {
      connection.reject({message: 'nope'})
    }
  })

  connection.on('reject', function (data) {
    console.log('rejected! reason:', data.message)
  })

  connection.on('accept', function (data) {
    connection.write('some more stuff now, thanks for the consent buddy\n')
  })

  console.log('found + connected to peer')
})

sw.on('error', function (err) {
  console.error(err)
})

Keywords

authentication

FAQs

Package last updated on 09 Nov 2018

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