You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
manage multiple ssb identities, as an sbot plugin.
Usage
varcreateSbot=require('scuttlebot').use(require('scuttlebot/plugins/master')).use(require('scuttlebot/plugins/gossip')).use(require('scuttlebot/plugins/replicate')).use(require('ssb-identities'))varsbot=createSbot(config)// locally or via an remote ssb-client connectionsbot.identities.list(function(err,data){// do things})
This module uses the addUnboxer
method of ssb db so that encrypted messages will be decrypted before being passed
to database views.
API
identities.main (cb)
returns the main identity (sbot.id)
identities.list (cb)
returns the list of identities, with the main
identity first.
identities.create (cb)
create a new identity, stored in ~/.ssb/identities/secret_[N].butt
where N is the left-padded number of this identity.
returns the id of the newly created identity.
publish a message as a specific identity.
id must be provided and must be already in
the identities list. If private is true,
content.recps must be set. recps must contain
the id.