mirror of
https://github.com/logos-storage/bittorrent-codex-docs.git
synced 2026-01-06 23:13:07 +00:00
20 lines
632 B
Markdown
20 lines
632 B
Markdown
|
|
BitTorrent Manifest is a structure describing BitTorrent content and connecting it to the corresponding Codex content.
|
||
|
|
|
||
|
|
It is defined as follows:
|
||
|
|
|
||
|
|
```nim
|
||
|
|
type
|
||
|
|
BitTorrentPiece* = MultiHash
|
||
|
|
BitTorrentInfo* = ref object
|
||
|
|
length* {.serialize.}: uint64
|
||
|
|
pieceLength* {.serialize.}: uint32
|
||
|
|
pieces* {.serialize.}: seq[BitTorrentPiece]
|
||
|
|
name* {.serialize.}: ?string
|
||
|
|
|
||
|
|
BitTorrentManifest* = ref object
|
||
|
|
info* {.serialize.}: BitTorrentInfo
|
||
|
|
codexManifestCid* {.serialize.}: Cid
|
||
|
|
```
|
||
|
|
|
||
|
|
It contains the BitTorrent `info` dictionary (here only version 1 of the protocol and no support for multiple files and dictionaries).
|