CreateTorrent

constructor(storage: FileStorage, v1Only: Boolean = false, v2Only: Boolean = false)

Parameters

storage

the files and piece geometry to encode. Must contain at least one file and a non-zero total size.

v1Only

force a v1-only torrent (reject v2 hashes). Mutually exclusive with v2Only.

v2Only

force a v2-only torrent (reject v1 hashes). Mutually exclusive with v1Only.