Stream a torrent into a hyperdrive
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
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
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.
The hyperdrive
instance created by hypertorrent
The webtorrent
instance created by hypertorrent