create secure peer to peer networks using secret-handshakes.
var SecretStack =var databasePlugin =var bluetoothPlugin =var config =var App =vap app =
For documentation on plugins, see PLUGINS.md
SecretStack(opts) => App
Initialize a new app factory.
opts is an Object with properties:
appKey- String, 32 bytes a high entropy (i.e. random) key which is fixed for your app. Actors who do not know this value will not be able to connect to instances of your app.
permissions- Object (optional), you can set default permissions which will be the foundation for all permissions subsequently added
NOTE - you can also add other properties to opts. These will be merged with
config later to form the final config passed to each plugin. (i.e.
App.use(plugin) => App
Add a plugin to the factory. See PLUGINS.md for more details.
Returns the App (with plugin now installed)
App(config) => app
Start the app and returns an EventEmitter with methods (core and plugin) attached.
config is an (optional) Object with any properties:
keys- String a sodium ed25519 key pair
- ... - (optional)
config will be passed to each plugin as they're initialised (as
merge(opts, config) which opts were those options
SecretStack factory was initialised with).
get a string representing the address of this node.
it will be
create a rpc connection to another instance.
Address should be the form returned by
Query what permissions a given public key is assigned. it's not intended for this to be exposed over the network, but rather to extend this method to create plugable permissions systems.
close the app!
mix: I think some of these are exposed over muxrpc (as they're in the manifest) and some can only be run locally if you have access to the instance of
appyou got returned after initialising it.
app.id => String (alias
app.getManifest() => Object (alias:
config => Object'