New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bittorrent-dht

Package Overview
Dependencies
Maintainers
9
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bittorrent-dht - npm Package Compare versions

Comparing version 10.0.7 to 11.0.0

24

client.js

@@ -1,12 +0,14 @@

const bencode = require('bencode')
const debug = require('debug')('bittorrent-dht')
const KBucket = require('k-bucket')
const krpc = require('k-rpc')
const low = require('last-one-wins')
const LRU = require('lru')
const randombytes = require('randombytes')
const records = require('record-cache')
const simpleSha1 = require('simple-sha1')
const { EventEmitter } = require('events')
import { EventEmitter } from 'events'
import bencode from 'bencode'
import Debug from 'debug'
import KBucket from 'k-bucket'
import krpc from 'k-rpc'
import low from 'last-one-wins'
import LRU from 'lru'
import randombytes from 'randombytes'
import records from 'record-cache'
import simpleSha1 from 'simple-sha1'
const debug = Debug('bittorret-dht')
const ROTATE_INTERVAL = 5 * 60 * 1000 // rotate secrets every 5 minutes

@@ -796,2 +798,2 @@ const BUCKET_OUTDATED_TIMESPAN = 15 * 60 * 1000 // check nodes in bucket in 15 minutes old buckets

module.exports = DHT
export default DHT
/*! bittorrent-dht. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
const Client = require('./client')
const Server = require('./server')
module.exports = Client
module.exports.Client = Client
module.exports.Server = Server
export { default as Client, default } from './client.js'
export { default as Server } from './server.js'
{
"name": "bittorrent-dht",
"description": "Simple, robust, BitTorrent DHT implementation",
"version": "10.0.7",
"type": "module",
"version": "11.0.0",
"author": {

@@ -45,6 +46,8 @@ "name": "WebTorrent LLC",

"engines": {
"node": ">=10"
"node": ">=12.20.0"
},
"license": "MIT",
"main": "index.js",
"exports": {
"import": "./index.js"
},
"repository": {

@@ -51,0 +54,0 @@ "type": "git",

@@ -44,4 +44,4 @@ # bittorrent-dht [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

```js
const DHT = require('bittorrent-dht')
const magnet = require('magnet-uri')
import DHT from 'bittorrent-dht'
import magnet from 'magnet-uri'

@@ -97,3 +97,3 @@ const uri = 'magnet:?xt=urn:btih:e3811b9539cacff680e418124272177c47477157'

``` js
const ed = require('ed25519-supercop')
import ed from 'ed25519-supercop'
const dht = new DHT({ verify: ed.verify })

@@ -229,3 +229,3 @@ ```

``` js
const DHT = require('bittorrent-dht')
import DHT from 'bittorrent-dht'
const dht = new DHT()

@@ -261,3 +261,3 @@ const value = Buffer.alloc(200).fill('abc')

``` js
const ed = require('bittorrent-dht-sodium')
import ed from 'bittorrent-dht-sodium'
const keypair = ed.keygen()

@@ -275,4 +275,4 @@

const DHT = require('bittorrent-dht')
const dht = new DHT
import DHT from 'bittorrent-dht'
const dht = new DHT()

@@ -297,3 +297,3 @@ dht.put(opts, function (err, hash) {

``` js
const ed = require('bittorrent-dht-sodium')
import ed from 'bittorrent-dht-sodium'
const dht = new DHT({ verify: ed.verify }) // you MUST specify the "verify" param if you want to get mutable content, otherwise null will be returned

@@ -300,0 +300,0 @@

@@ -7,2 +7,2 @@ /**

*/
module.exports = require('./client')
export { default } from './client.js'
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