Configuration for cobox
Kieran Gibb e343296396
allow seed data
2 years ago
lib handle map correctly 3 years ago
test Merge branch 'get-set-additional-options' of ssh:// into get-set-additional-options 3 years ago
.gitignore update with rad gitignore and nyc not istanbul 3 years ago
LICENSE add LICENSE 3 years ago CRUD API works! 3 years ago
example.yaml update example 3 years ago
index.js allow seed data 2 years ago
logger.js fix bug with logging to stdout 3 years ago
package.json ensure crypto is a dependency 2 years ago
util.js make isPubKey function more resilent 3 years ago
yarn.lock correct merge issue 3 years ago


Stores and retrieves a YAML configuration file for use with the cobox stack.


const Config = require('cobox-config')
const crypto = require('cobox-crypto') // or some other crypto scheme

var storage = './storage' 
var config = Config(storage)


Write to YAML storage, path set using the storage path when initialising. Make sure you call this otherwise the config will not write to disk.


Load from YAML, path set using the storage path when initialising. This is called automatically when initialising a Config.


Append an identity to the config

var key = || identity.publicKey || identity.publicKey.toString('hex')

Remove an identity from the config

var key = || group.publicKey || group.publicKey.toString('hex')

Remove a group from the config


List saved identities


List saved groups


  • encode public keys as base64 urlsafe in YAML
  • store the path to secret key file (base64 urlsafe binary encoding) instead of raw secret key in the config file