1.0.0 • Published 8 years ago
ssb-contact v1.0.0
ssb-contact
Stuff having to do with "contact" messages in Secure Scuttlebutt.
API
var Contacts = require('ssb-contact')
var contacts = new Contacts(sbot)
contacts.createFollowsStream(id): source
Get a stream of ids of feeds that the given id follows
contacts.createFollowersStream(id): source
Get a stream of ids of feeds that follow the given id
contacts.createFriendsStream(id, endCb): source
Get a stream of ids of feeds that have a bidirectional follow with the given id. Optionally, get the remaining relevant ids in a callback.
- endCb:
function (err, extra)
called when the stream is ended - extra.followers: array of follower ids that are not friends
- extra.follows: array of followed ids that are not friends
contacts.createContactStreams(id): object
Get streams of ids that follow the given id, or are followed by it, or both
{
friends: source,
follows: source,
followers: source,
}
- friends: stream of ids of feeds that the given id follows and they follow back
- follows: stream of ids of feeds that the given id follows but who do not follow it back
- followers: stream of ids of feeds that follow the given id while it does not follow them back
Further resources
License
Copyright (c) 2017 Secure Scuttlebutt Consortium
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
1.0.0
8 years ago