swarmbot-webtorrent

1.4.0 • Public • Published

swarmbot-webtorrent

webtorrent seeding plugin for swarmbot

example

When you publish documents to a swarmlog mirrored by swarmbot with a link property containing a magnet link:

var swarmlog = require('swarmlog')
var memdb = require('memdb')
 
var log = swarmlog({
  keys: require('./keys.json'),
  sodium: require('chloride/browser'),
  db: memdb(),
  valueEncoding: 'json',
  hubs: [ 'https://signalhub.mafintosh.com' ]
})
log.append({
  link: 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d&dn=sintel.mp4&tr=udp%3A%2F%2Fexodus.desync.com%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.webtorrent.io&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel-1024-surround.mp4'
})

then this plugin will download and seed that torrent over webtorrent.

events

rpc.emitEvent('seed-files', files)

Instruct the swarmbot-webtorrent plugin to seed files outside of the hyperlog.

This is useful if the files are present on the local system and you need to tell swarmbot where the files are located before it can seed them.

rpc.emitEvent('seed-list', function (err, magnets) {})

Request a list of magnet links that swarmbot-webtorrent is currently seeding.

install

Install swarmbot-webtorrent into your swarmbot config directory with npm:

$ swarmbot plugins install swarmbot-webtorrent

license

BSD

Package Sidebar

Install

npm i swarmbot-webtorrent

Weekly Downloads

1

Version

1.4.0

License

BSD

Last publish

Collaborators

  • nopersonsmodules