ssbc/ssb-feed

Name: ssb-feed

Owner: Secure Scuttlebutt Consortium

Description: create a secure-scuttlebutt feed

Created: 2015-03-22 02:05:52.0

Updated: 2018-03-12 16:19:38.0

Pushed: 2017-09-12 23:07:10.0

Homepage: null

Size: 39

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ssb-feed

A publishing interface for scuttlebutt feeds.

Track the state necessary to publish ssb feeds. This is built into secure-scuttlebutt, where it validates replicated messages, and it is also used “remotely” in patchbay.

By default, Scuttlebot uses a “master” identity/feed, which sbot.publish() will append new messages to. If you want to manipulate additional feeds, you can load the keypair and then use this library to do so.

Example
ssbFeed = require('ssb-feed')
ssbClient = require('ssb-client')
ssbKeys = require('ssb-keys')

alice = ssbKeys.generate()
lient(function (err, sbot) {
r feed = ssbFeed(sbot, alice)

 Post to alice's feed
ed.publish({
type: 'post',
text: 'hello world, I am alice.'
 function (err) { ... })

 Also available:
nsole.log(feed.id)
nsole.log(feed.keys)

This example uses ssb-client, but, if you're embedding scuttlebot or the secure-scuttlebutt library into your process, you can use them locally.

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.