cobox-admin-group

1.0.0-alpha1 • Public • Published

cobox-admin-group

This package is not yet stable!

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.

Install

npm install cobox-admin-group

Usage

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

Package Sidebar

Install

npm i cobox-admin-group

Weekly Downloads

0

Version

1.0.0-alpha1

License

AGPL-3.0-only

Unpacked Size

46.1 kB

Total Files

8

Last publish

Collaborators

  • kyphae