You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`ipfs` is a protocol namespace (to allow the computer to discern what to do)
38
39
-`QmUmg7BZC1YP1ca66rRtWKxpXp77WgVHrnv263JtDuvs2k` is a cryptographic hash.
39
40
-`a/b/c/d` is a path _traversal_, as in unix.
40
41
- this link traverses five objects.
41
42
43
+
Suppose also that this path points to the object `{ "hello": "world" }`.
44
+
42
45
Resolving it involves looking up each object and attaining a hash value, then traversing to the next.
43
46
44
47
```
@@ -82,7 +85,7 @@ Some Constraints:
82
85
- Given the wide success of JSON, a huge number of systems present JSON interfaces. IPLD MUST be able to import and export to JSON trivially.
83
86
- The JSON data model is also very simple and easy to use. IPLD MUST be just as easy to use.
84
87
- Definining new datastructures MUST be trivially easy. It should not be cumbersome -- or require much knowledge -- to experiment with new definitions on top of IPLD.
85
-
- IPLD MUST be compatible with RDF and the proper W3C Semantic Web / Linked Data standards. We can achieve this easily through JSON-LD.
88
+
-Since IPLD is based on the JSON data model, it is fully compatible with RDF and Linked Data standards through JSON-LD.
86
89
- IPLD Serialized Formats (on disk and on the wire) MUST be fast and space efficient. (should not use JSON as the storage format, and instead use CBOR or similar formats)
87
90
- IPLD cryptographic hashes MUST be upgradeable (use [multihash](https://github.com/jbenet/multihash))
88
91
@@ -162,17 +165,12 @@ Suppose this hashes to the multihash value `QmBBB...BBB`. This node links the _s
162
165
163
166
> ipld cat --json QmBBB...BBB/author
164
167
{
165
-
"title": "As We May Think",
166
-
"author": {
167
-
"mlink": "QmAAA...AAA" // links to the node above.
168
-
}
168
+
"name": "Vannevar Bush"
169
169
}
170
170
171
171
> ipld cat --yml QmBBB...BBB/author
172
172
---
173
-
title: As We May Think
174
-
author:
175
-
mlink: QmAAA...AAA
173
+
name: "Vannevar Bush"
176
174
177
175
> ipld cat --json QmBBB...BBB/author/name
178
176
"Vannevar Bush"
@@ -302,11 +300,11 @@ On the subject of integers, there exist a variety of formats which represent int
302
300
303
301
## Serialized Data Formats
304
302
305
-
IPLD supports a variety of serialized data formats trough[multicodec](https://github.com/jbenet/multicodec). These can be used however is idiomatic to the format, for example in `CBOR`, we can use `CBOR` type tags to represent the merkle-link, and avoid writing out the full string key `mlink`. Users are encouraged to use the formats to their fullest, and to store and transmit IPLD data in whatever format makes the most sense. The only requirement **is that there MUST be a well-defined one-to-one mapping with the IPLD Canonical format.** This is so that data can be transformed from one format to another, and back, without changing its meaning nor its cryptographic hashes.
303
+
IPLD supports a variety of serialized data formats through[multicodec](https://github.com/jbenet/multicodec). These can be used however is idiomatic to the format, for example in `CBOR`, we can use `CBOR` type tags to represent the merkle-link, and avoid writing out the full string key `mlink`. Users are encouraged to use the formats to their fullest, and to store and transmit IPLD data in whatever format makes the most sense. The only requirement **is that there MUST be a well-defined one-to-one mapping with the IPLD Canonical format.** This is so that data can be transformed from one format to another, and back, without changing its meaning nor its cryptographic hashes.
306
304
307
305
### Canonical Format
308
306
309
-
In order to preserve merkle-linking's power, we muste ensure that there is a single **_canonical_** serialized representation of an IPLD document. This ensures that applications arrive at the same cryptographic hashes. It should be noted --though-- that this is a system-wide parameter. Future systems might change it to evolve representations. However we estimate this would need to be done no more than once per decade.
307
+
In order to preserve merkle-linking's power, we must ensure that there is a single **_canonical_** serialized representation of an IPLD document. This ensures that applications arrive at the same cryptographic hashes. It should be noted --though-- that this is a system-wide parameter. Future systems might change it to evolve representations. However we estimate this would need to be done no more than once per decade.
310
308
311
309
**The IPLD Canonical format is _canonicalized CBOR_.**
0 commit comments