diff --git a/README.md b/README.md index 01006c19..508e8d90 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,50 @@ # Identity and Access Management (IAM) Client Library + TypeScript library to be used within decentralized applications for authentication and authorization using DIDs (Decentralized Identifiers) and VCs (Verifiable Credentials) ## + ![IAM-client-lib demos](screenshots/react-angular-vue_demos.png) ## Live Demos + [![react logo](examples/react-dapp/src/assets/react-icon.png) React Demo](https://did-auth-demo.energyweb.org/react-example/) / [![angular logo](examples/angular-dapp/src/assets/angular-icon.png) Angular Demo](https://did-auth-demo.energyweb.org/angular-example/) / [![vue logo](examples/vue-dapp/src/assets/vue-icon.png) Vue Demo](https://did-auth-demo.energyweb.org/vue-example/) ## Documentation + [Read the Docs](https://energy-web-foundation-iam-client-lib.readthedocs-hosted.com/_/sharing/ojw5kxd0al7k1llbcp78i6oiv) ## Getting Started + For development purposes, please follow below steps to integrate the library with your dApps. ### Prerequisites + `iam-client-lib` is written in TypeScript. Make sure to have Node.js (>= v10) installed. Create a folder named ***iam-client-lib*** and clone this GIT project. -### Installing Dependencies -Using `npm` to install dependencies: -```sh -$ npm install -``` - -### Compile & Build -To generate bundled JS files and types, use the following command. Generated files are located in the ***dist*** folder. -```sh -$ npm run build -``` - -### Link as node_module -If your dApp is using ***node_modules*** for dependencies, call the following command from your dApp's main folder. +### Install -Make sure that your dApp preserves *symbolic links* (symlink) as below command creates one inside your *node_modules* folder. +Latest stable version -```sh -$ npm link ../path/to/iam-client-lib/ +``` sh +$ npm i iam-client-lib ``` -The `iam-client-lib` folder must now exist in your *node_modules* folder. -### Add library as a dependency +Prerelease version -You can add this library as a dependency - -```sh -$ npm i https://github.com/energywebfoundation/iam-client-lib.git#branch_name +``` sh +$ npm i iam-client-lib@canary ``` - ### Sample Import (TypeScript) -```sh + +``` sh import { IAM, CacheServerClient } from 'iam-client-lib'; export class Sample { private _iam: IAM; - constructor() { // create default cache server client (optional) const cacheClient = new CacheServerClient({ url: 'http://cache-server.com'}) @@ -78,7 +67,26 @@ export class Sample { ``` +## Development + +### Installing Dependencies + +Using `npm` to install dependencies: + +``` sh +$ npm install +``` + +### Compile & Build + +To generate bundled JS files and types, use the following command. Generated files are located in the ***dist*** folder. + +``` sh +$ npm run build +``` + ## Active Maintainers + - [Kim Honoridez](https://github.com/kim-energyweb) - [Daniel Wojno](https://github.com/dwojno) - [Dmitry Fesenko](https://github.com/JGiter) @@ -93,4 +101,4 @@ This project is licensed under the GNU General Public License v3.0 or later - se ## FAQ -Frequently asked questions and their answers will be collected here. \ No newline at end of file +Frequently asked questions and their answers will be collected here.