The following common data models are exposed so that independent plugins can exchange meaningful data.
Self Sovereign Identity
The ULA is primarily meant for managing Self Sovereign Identity data. A data model is provided for this purpose. All plugins must be able to translate their own data structures back to this data model.
In an existing project (with
npm install universal-ledger-agent --save
Full implementation guide (recommended)
In order to implement all available ULA plugins for the Holder in your Typescript application, please consult the full implementation guide.
Initializing ULA with one plugin (example)
To illustrate the usage of the ULA we will install one Holder plugin:
npm install ula-process-barcode --save
The process-barcode plugin accepts messages of which the type matches the type
ethereum-qr. The ULA and plugin can then be used as follows:
// The process-barcode plugin will need a http-service to send outgoing// messages via http. This http-service is provided by the ULA// Create an array of plugins// Initialize the ULA with the plugins// A QR-Code contains e.g. the following message// the QR-code is captured by a camera device and then offered to// the ULA. The 'callback' mechanism is used to retrieve information// back from the plugin (or plugins) that handled the messageeventHandler.processMsgmessage, callback// The callback function is called with an UlaResponse parameter, but// this callback is only used when the ula-vp-controller plugin is installed!
Besides unit testing with Mocha, the effectivity of all tests are also measured with the Stryker mutation testing framework.
npm run testnpm run stryker
We aim to achieve a coverage of 100%. Stryker and/or mocha test scores below 80% will fail the build.
The ULA architecture has been designed in collaboration with Workday, Inc.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License and disclaimer
We discourage the use of this work in production environments as it is in active development and not mature enough.