Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperswarm

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperswarm - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

7

index.js

@@ -34,8 +34,7 @@ const { EventEmitter } = require('events')

if (opts.bootstrap) networkOpts.bootstrap = opts.bootstrap
this.dht = new DHT(networkOpts)
this.dht = opts.dht || new DHT(networkOpts)
this.server = this.dht.createServer({
firewall: this._handleFirewall.bind(this),
onconnection: this._handleServerConnection.bind(this)
})
firewall: this._handleFirewall.bind(this)
}, this._handleServerConnection.bind(this))

@@ -42,0 +41,0 @@ this.destroyed = false

{
"name": "hyperswarm",
"version": "3.0.0",
"version": "3.0.1",
"description": "A distributed networking stack for connecting peers",
"dependencies": {
"@hyperswarm/dht": "next",
"events": "^3.3.0",
"shuffled-priority-queue": "^2.1.0"

@@ -8,0 +9,0 @@ },

@@ -7,3 +7,3 @@ # hyperswarm

Note that this is the README for v3 which is tagged under next. To see the v2 documentation/code go to https://github.com/hyperswarm/dht/tree/v2
Note that this is the README for v3 which is tagged under next. To see the v2 documentation/code go to https://github.com/hyperswarm/hyperswarm/tree/v2

@@ -50,4 +50,5 @@ As v3 fully matures over the next month it will be shifted to npm latest.

* `seed`: A unique, 32-byte, random seed that can be used to deterministically generate the key pair.
* `maxPeers`: The maximum number of peer connections to allow
* `maxPeers`: The maximum number of peer connections to allow.
* `firewall`: A sync function of the form `remotePublicKey => (true|false)`. If true, the connection will be rejected. Defaults to allowing all connections.
* `dht`: A DHT instance. Defaults to a new instance.

@@ -54,0 +55,0 @@ #### `swarm.connections`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc