git ssb

9+

mixmix / ssb-handbook



Tree: 124c98736ae59de178ad1f5b8343d766fdfbb84b

Files: 124c98736ae59de178ad1f5b8343d766fdfbb84b / concepts / link.md

1389 bytesRaw

Link

Messages can reference three types of Secure Scuttlebutt entities: messages, feeds, and blobs (i.e. files). Messages and blobs are referred to by their hashes, but a feed is referred to by its signing public key.

To indicate the type of ID, a "sigil" is prepended to the string. They are:

Additionally, each ID has a "tag" appended to indicate the hash or key algorithm. Some example IDs:

When IDs are found in the messages, they may be treated as links, with the keyname acting as a "relation" type. An example of this:

sbot publish --type post \
  --root "%MPB9vxHO0pvi2ve2wh6Do05ZrV7P6ZjUQ+IEYnzLfTs=.sha256" \
  --branch "%kRi8MzGDWw2iKNmZak5STshtzJ1D8G/sAj8pa4bVXLI=.sha256" \
  --text "this is a reply!"
sbot.publish({
  type: "post",
  root: "%MPB9vxHO0pvi2ve2wh6Do05ZrV7P6ZjUQ+IEYnzLfTs=.sha256",
  branch: "%kRi8MzGDWw2iKNmZak5STshtzJ1D8G/sAj8pa4bVXLI=.sha256",
  text: "this is a reply!"
})

In this example, the root and branch keys are the relations. SSB automatically builds an index based on these links, to allow queries such as "all messages with a root link to this message."

Built with git-ssb-web