The browser-side crypto lib for holo light clients
In addition to the salt service , The client-side crypto will need to do a SENSITIVE mem and op pwhash with the salt and user's password. This would give the root seed, from which we can do the same seed generation scheme. As far as client side libsodium crypto libs, this is the one I've had my eye on, since it has all the apis: https://www.npmjs.com/package/libsodium-wrappers. We don't need to do all the SecBuf stuff for this version, since we cannot memprotect memory in the browser anyway.
Who would be calling this lib?
The holo.js code would be doing this. it'll sort of be up to the UI designer for the particular app, but at some point if the user undertakes an action, and does not yet have a source chain, the app dev will trigger a holo.js api that will set up session hosts through the tranche service, and the user will need to generate private keys to set up core apps, etc, on that session host.
Download this js file to start using it. https://github.com/Holo-Host/dpki-lite.lib/blob/develop/packages/dpki-lite/js/dpki-lite.js
First go to the lib folder
cd package/dpki-liteNext install the dependencies
npm installNow, Build the lib by running
npm run build-webpackNow look into the js folder you would see the dpki-lite.js
This js file can be used in your browser
First, make sure our own dependencies are installed:
npm installNext, install all project dependencies (through lerna monorepo manager):
npm run bootstrapNow, test all projects:
npm testcd into dpki-lite folder
Run
npm run testTo create a new project, execute the following and fill out the prompts:
npm run newThis top-level is just tools for helping manage the monorepo. Monorepo managed by Lerna
See the API Documentation!