kernl API
    Preparing search index...

    Function createWebTorrentBackend

    • Creates a torrent backend that downloads inside the page through a WebTorrent client, which reaches peers over WebRTC only. It announces to the link's wss:// trackers plus the defaults and drops the rest, since a page cannot open the sockets they need (D-017). The backend carries no handoff trait, so describeBridge reports the transfer as kernl's own; peers still see the user's address and what they fetch.

      Parameters

      Returns WebTorrentBackend

      A backend with the job list and controls the Downloads panel uses.

      From add: invalid:info-hash for a hash that is not 40 hex characters, unavailable:<why> when the client cannot load or add.

      const downloads = createWebTorrentBackend({ client: async () => new (await import('webtorrent')).default() });
      const bridge = createTorrentBridge(downloads);
      await bridge.resolve(parseLocator(magnetLink), { requester: 'shell' });
      downloads.subscribe((jobs) => render(jobs));