@@ -11,7 +11,7 @@ Let's go through the type definitions of some of the most used types when workin
1111
1212## Post
1313Here's `sur/post.hoon`
14−```
14+```hoon
1515+$ index (list atom)
1616+$ uid [=resource =index]
1717::
@@ -55,7 +55,7 @@ Here's `sur/post.hoon`
5555
5656
5757### Index
58−```
58+```hoon
5959+$ index (list atom)
6060+$ uid [=resource =index]
6161```
@@ -67,7 +67,7 @@ Here's `sur/post.hoon`
6767An index fragment is not an explicitly defined type, but since an index is `(list atom)`, it follows that the type of an index fragment is `atom`. This is what gives the developer the flexibility to use more than just numbers in an index: any type that is representable as an atom can be used in the index.
6868
6969### Hashing (Part 1)
70−```
70+```hoon
7171:: +sham (half sha-256) hash of +validated-portion
7272+$ hash @ux
7373::
@@ -78,7 +78,7 @@ An index fragment is not an explicitly defined type, but since an index is `(lis
7878These types are used to cryptographically sign a given post, so that the host of some content cannot act as an imposter, and post content impersonating as someone else. `signature` represents a triple of signed message of hash, author, and author's life at time of posting. These can be used to cryptographically attest to a message. The implementation is a form of asymmetric/public-key encryption, where `q` and `r` are data necessary to look up a ship's public key on azimuth, which can be used to verify the validity of the message.
7979
8080### Content Types
81−```
81+```hoon
8282+$ reference
8383 $% [%graph group=resource =uid]
8484 [%group group=resource]
@@ -107,7 +107,7 @@ These types are used to cryptographically sign a given post, so that the host of
107107Currently, these are the only content types supported by Graph Store.
108108
109109### Post
110−```
110+```hoon
111111+$ post
112112 $: author=ship
113113 =index
@@ -125,7 +125,7 @@ Post is a fundamental type that represents what we normally think of as a post o
125125An `indexed-post` is a post with an associated index fragment that can be used to validate a post's index with an index fragment that is expected at the end of the index list.
126126
127127### Hashing (Part 2)
128−```
128+```hoon
129129+$ validated-portion
130130 $: parent-hash=(unit hash)
131131 author=ship
@@ -142,7 +142,7 @@ The parts of a `post` that are actually hashed to obtain a value of type the ear
142142
143143Here's `sur/graph-store.hoon`
144144
145−```
145+```hoon
146146+$ graph ((mop atom node) gth)
147147+$ marked-graph [p=graph q=(unit mark)]
148148::
@@ -215,7 +215,7 @@ Here's `sur/graph-store.hoon`
215215```
216216
217217### Graph, Node, and Related Objects
218−```
218+```hoon
219219+$ graph ((mop atom node) gth)
220220+$ marked-graph [p=graph q=(unit mark)]
221221::
@@ -261,14 +261,14 @@ Here are some helpful Wikipedia pages for more info on what this data type repre
261261
262262### Tag Queries
263263
264−```
264+```hoon
265265+$ tag-queries (jug term resource)
266266```
267267
268268`tag-queries` is a mapping where the keys are `term`s and the values are a `set` of `resource`s (this pattern is called a `jug`). It is a simple tagging system that allows for various ad-hoc collections, similar to filesystem tags being used to sort different files/folders. While the type's name is `tag-queries`, there is no complex querying system as of now. Currently, you can add term/resources pairs into the tag queries, get a list of all terms in tag-queries, and get the whole `jug` out of Graph Store.
269269
270270### Update (Part 1)
271−```
271+```hoon
272272+$ update [p=time q=action]
273273::
274274+$ logged-action
@@ -304,7 +304,7 @@ The `update` type is what is used to interact with Graph Store. It is used both
304304If you want to check out a relevant code listing to see how graph store handles these pokes, check out the `graph-update` arm in the poke handler at [`app/graph-store.hoon`](https://github.com/urbit/urbit/blob/e2ad6e3e9219c8bfad62f27f05c7cac94c9effa8/pkg/arvo/app/graph-store.hoon#L221-L227)
305305
306306### Update (Part 2)
307−```
307+```hoon
308308+$ update-log ((mop time logged-update) gth)
309309+$ update-logs (map resource update-log)
310310::
@@ -320,7 +320,7 @@ It is important to note that the source of truth is actually the `update-logs`,
320320The reason for having the main CRUD actions being `logged-update`s is so that Graph Store knows which order to process the log entries in when it is rebuilding its current state. The time associated with the `logged-update` is a way of specifying the canonical order to process operations. All other actions that aren't part of logged-update stand on their own and don't need a timestamp in order to properly apply them.
321321
322322### Permissions
323−```
323+```hoon
324324+$ permissions
325325 [admin=permission-level writer=permission-level reader=permission-level]
326326::