ssbc/ssb-about

Name: ssb-about

Owner: Secure Scuttlebutt Consortium

Description: scuttlebot plugin for getting reduced 'about' state

Created: 2017-06-12 11:56:29.0

Updated: 2018-05-07 11:44:28.0

Pushed: 2018-04-25 19:03:54.0

Homepage: null

Size: 6

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ssb-about

scuttlebot plugin for indexing reduced “about” state.

Usage

For a detailed example, see example.js in this repo.

t Server = require('scuttlebot')
t config = { ... } // needs options

nstall the plugin
er
se(require('scuttlebot/plugins/master')) // required
se(require('ssb-about'))
se(require('ssb-backlinks')) // not required, just an example

tart the server
t server = Server(config)
API
sbot.about.get(cb)

Get the current state of the about view. This will wait until the view is up to date, if necessary.

cb(err, data) is a standard callback function where data is of the form:


arget]: {          // target we're saying things about
[trait]: {         // trait we're asserting about that target
  [user]: [        // a user with an opinion about target's trait
    value,         // value of that opinion
    timestamp      // when that opinion was stated
  ]
}


e.g. Here, concerning @3r4+IyB5NV... (a user) there are two opinions about the user's name (by the user themself, and by another user), and one opinion about their image:


3r4+IyB5NVl2in6QOZHIu9oSrZud+NuVgl2GX3x2WG8=.ed25519": {
"name": {
  "@3r4+IyB5NVl2in6QOZHIu9oSrZud+NuVgl2GX3x2WG8=.ed25519": [
    "Richard D. Bartlett",
    1502124087565
  ],
  "@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519": [
    "rich",
    1513603872659
  ],
},
"image": {
  "@3r4+IyB5NVl2in6QOZHIu9oSrZud+NuVgl2GX3x2WG8=.ed25519": [
    "&asrg0Mb/w3lLC+yZIJr/4aY0nkWT9Wn+32zrqhaIvy4=.sha256",
    1516829827534
  ],
}


sbot.about.stream => pull-stream source

Be careful, this is a stream which provides:

For details see : https://github.com/flumedb/flumeview-reduce

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.