/ 10 Notes / BitTorrent Manifest.md
BitTorrent Manifest.md
 1  BitTorrent Manifest is a structure describing BitTorrent content and connecting it to the corresponding Codex content.
 2  
 3  It is defined as follows:
 4  
 5  ```nim
 6  type
 7    BitTorrentPiece* = MultiHash
 8    BitTorrentInfo* = ref object
 9      length* {.serialize.}: uint64
10      pieceLength* {.serialize.}: uint32
11      pieces* {.serialize.}: seq[BitTorrentPiece]
12      name* {.serialize.}: ?string
13  
14    BitTorrentManifest* = ref object
15      info* {.serialize.}: BitTorrentInfo
16      codexManifestCid* {.serialize.}: Cid
17  ```
18  
19  It contains the BitTorrent `info` dictionary (here only version 1 of the protocol and no support for multiple files and dictionaries).