Socket
Book a DemoInstallSign in
Socket

hypertorrent

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypertorrent

Stream a torrent into a hyperdrive

latest
Source
npmnpm
Version
3.0.1
Version published
Maintainers
2
Created
Source

hypertorrent stability

npm version build status downloads js-standard-style

Stream a torrent into a hyperdrive

Usage

  Usage:
    $ hypertorrent <magnet link or .torrent file> [output location]

  Commands:
    <default>  Convert a torrent link or file to a hyperdrive, returns a key

  Options:
    -d, --daemon          Keep all open after torrent is done downloading
    -h, --help            Print usage
    -k, --keep-uploading  Keep hyperdrive open after torrent is done downloading
    -v, --version         Print version

  Examples:
    $ hypertorrent ./my-science-data.torrent /tmp/foobar

JS API

var hyperdiscovery = require('hyperdiscovery')
var hypertorrent = require('hypertorrent')
var memdb = require('memdb')

var db = memdb()
var ht = hypertorrent('<magnet-link>', db, function (err) {
  if (err) throw err
})

var archive = ht.archive // hyperdrive instance
var torrent = ht.torrent // webtorrent instance

hyperdiscovery(archive)   // expose it to the network

API

Create a new hypertorrent instace from a Buffer containing the contents of a .torrent file or a magnet link. Takes a level database to store the files. opts is passed directly to hyperdrive; it takes an extra property of .key to create the public key if already exists.

archive = ht.archive

The hyperdrive instance created by hypertorrent

torrent = ht.torrent

The webtorrent instance created by hypertorrent

See Also

License

MIT

Keywords

hyperdrive

FAQs

Package last updated on 01 Feb 2017

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