git ssb

0+

Matt McKegg / ssb-same-as



Tree: d5b1e6e6827f845ce25a452fba8210b7f6052c3b

Files: d5b1e6e6827f845ce25a452fba8210b7f6052c3b / README.md

2020 bytesRaw

ssb-same-as

A scuttlebot plugin that provides a stream of which feeds are (and are not) the same as other feeds.

The basis for creating the illusion of multi-feed identities in SSB!

Based on ssb-friends and graphreduce)

TODO

Spec

Assert that you are the same as another feed

{
  type: 'contact',
  contact: TARGET_FEED_ID,
  following: true, // for backwards compat reasons
  sameAs: true
}

Block a sameAs

{
  type: 'contact',
  contact: TARGET_FEED_ID,
  following: true, // for backwards compat reasons
  sameAs: false
}

Agree with another feed's assertion

{
  type: 'contact',
  contact: TARGET_FEED_ID,
  following: true, // for backwards compat reasons
  sameAs: {
    SOURCE_FEED_ID: true // or `false` to remove an agreement
  }
}

Logic behind sameAs resolution

This module uses graphreduce to walk the sameAs links, so this means that any topology of links will be resolved.

Exposed API (as sbot plugin)

sbot.sameAs.stream({live: false}) source

Gets a list of all of the resolved and verified sameAs links between feeds.

{from: 'a', to: 'b', value: true}
{from: 'a', to: 'c', value: true}
{from: 'a', to: 'd', value: true}
{from: 'b', to: 'a', value: true}
{from: 'b', to: 'c', value: true}
{from: 'b', to: 'd', value: true}
...

sbot.sameAs.get({id}, cb) async

Gets a list of all of the verified sameAs links for a given feed.

{
  'b': true,
  'c': true,
  'd': true
}

License

MIT

Built with git-ssb-web