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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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.
MIT