Skip to content

Commit 8fdd04c

Browse files
committed
update link
1 parent 328a3f8 commit 8fdd04c

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

docs/develop/manifests.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,23 @@ sidebar_label: Manifests ("Virtual Filesystem")
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
99

10-
Bee nodes — along with tools used for working with them like `bee-js` and `swarm-cli` — let you upload whole folders of files to Swarm.
10+
Bee nodes — and tools like `bee-js` and `swarm-cli` — let you upload entire folders of files to Swarm.
1111

12-
Swarm doesn’t technically have a filesystem, but can *act like one* using **manifests**, which map readable paths (like `/images/cat.jpg`) to immutable Swarm references.
12+
Swarm doesn’t have a traditional file system like your computer does. Instead, when uploading a collection of files, it uses something called a **manifest**, which acts like a map between relative file paths (like `/images/cat.jpg`) and the actual content stored on Swarm.
1313

14-
:::info
15-
The `bee-js` [`MantarayNode` class](https://github.com/ethersphere/bee-js?tab=readme-ov-file#swarm-primitives) is the main way to work with manifests in NodeJS.
14+
A manifest is stored in a compact binary [encoded **prefix trie**](https://en.wikipedia.org/wiki/Trie).
1615

17-
The name comes from an older (now deprecated) library, so you may still see manifests referred to as **“Mantaray manifests.”**
18-
:::
16+
A prefix trie is like a tree that stores file paths by breaking them into shared chunks. For example, `images/cat.jpg` and `images/dog.jpg` both start with `images/`, so they share a common branch.
1917

20-
A manifest is stored as a compact, binary-encoded **prefix trie**. Each node in the trie represents part of a file path and may contain:
18+
This *saves space* and *makes lookups fast*.
2119

22-
- a path segment
23-
- a trie fork
24-
- a reference to the root chunk of the file’s Swarm hash
25-
- file metadata (content type, filename, etc.)
20+
Each entry in the manifest includes:
2621

27-
:::info
28-
A **trie** is a special type of tree that stores data based on **shared prefixes**.
29-
This makes lookups fast and avoids repeating long path segments.
30-
:::
22+
* a part of the file path (like `images/`)
23+
* a reference to the file's data (its Swarm hash)
24+
* optional metadata (such as file name or content type)
25+
26+
With manifests, Swarm can serve your content at readable URLs while still storing it securely and immutably.
3127

3228
Manifests give Swarm two powerful features:
3329

@@ -36,11 +32,11 @@ Manifests give Swarm two powerful features:
3632

3733
:::info
3834
Manifests are stored on Swarm as raw binary data.
39-
To work with them, these bytes must be **unmarshalled** (decoded) into a structured form.
35+
To work with them, these bytes must be [**unmarshalled** (decoded)](https://en.wikipedia.org/wiki/Marshalling_(computer_science)) into a structured form.
4036

41-
Although `bee-js` provides this functionality through the `MantarayNode` class, although in theory could be done with any language as long as it preserves the trie data.
37+
`bee-js` provides this functionality through the `MantarayNode.umarshal` method.
4238

43-
After unmarshalling, the data is still quite low-level (for example, many fields are `Uint8Array` values) and usually needs additional processing to make it human-readable. You can find a [script for this in the `ethersphere/examples` repo](https://github.com/ethersphere/examples/blob/main/manifests/printManifestJson.js).
39+
After unmarshalling, the data is still quite low-level (for example, many fields are `Uint8Array` values) and usually needs additional processing to make it human-readable. You can find a [script for this in the `ethersphere/examples` repo](https://github.com/ethersphere/examples/blob/main/manifests/manifestToJson.js).
4440
:::
4541

4642
## Introduction to Manifests

0 commit comments

Comments
 (0)