UNPKG

ssb-helpers

Version:

Some helper functions for common Secure Scuttlebot actions.

22 lines (18 loc) 456 B
const unbox = ({ ciphertext }, sbot) => { return unbox(ciphertext, (err, msg) => { if (err) console.log('ERR on ssb-helpers', err) console.log('MSG', msg) return msg }) } const publishPrivate = ({ content, recps }, sbot) => { return sbot.private.publish(content, recps, (err, msg) => { if (err) console.log('ERR on ssb-helpers', err) console.log('MSG', msg) return msg }) } module.exports = { unbox, publishPrivate }