admin group class
Kieran Gibb 3359b2537f
remove old code
1 year ago
lib use async level setup 1 year ago
test fix test 1 year ago
.gitignore add useful gitignore 1 year ago
LICENSE add README, LICENSE 1 year ago
README.md write improved README 1 year ago
example.js write improved README 1 year ago
index.js comment out crypto... 1 year ago
package.json pin to gitlab 1 year ago

README.md

cobox-admin-group

An admin group is like a special kind of cobox-group. Rather than managing an archive of files together, it represents the group who manage a cobox hardware device, the admin group, allowing them to control which groups it replicates.

This is done by sending encrypted messages to cobox-hub.

An admin group simply contains a cobox-log which uses a kappa-core and multifeed instance, inherited from cobox-replicator, kappa-view-query for querying the log, and wraps it all with a cryptographic value encoder so the log is fully encrypted.

const crypto = require('cobox-crypto')
const Admin = require('./')

const storage = tmp()
const address = crypto.address()
const encryptionKey = crypto.encryptionKey()
const admin = Admin(storage, address, { encryptionKey })

let query = { $filter: { value: { type: 'peer/about' } } }
let stream = admin.log.read({ query })
stream.on('data', console.log)

admin.log.publish({ type: 'peer/about', content: { name: 'Magpie' } })
admin.swarm()

Contributions