JSPM

iam-client-lib

2.0.0-alpha.12
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1926
  • Score
    100M100P100Q99739F
  • License GPL-3.0-or-later

Library for Decentralized Identity and Access Management

Package Exports

  • iam-client-lib

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (iam-client-lib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

Live Demos

react logo React Demo / angular logo Angular Demo / vue logo Vue Demo

Demo source code: iam-client-examples

Documentation

Read the Docs

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.

Install

Latest stable version

$ npm i iam-client-lib 

Prerelease version

$ npm i iam-client-lib@canary

Sample Import (TypeScript)

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'})

      // create IAM instance with provided rpc URL
        this._iam = new IAM({
          rpcUrl: 'https://volta-rpc.energyweb.org/',
          chainId: 73799,
          cacheClient // optional
        });
    }

    async initializeIAM() {
      // this will show connection modal and authenticate
      const { did, connected } = await this._iam.initializeConnection();

      // after successfully authentication you can retrieve the signer
      const signer = this._iam.getSigner();
    }

Development

For testing use npm run test:watch

Installing Dependencies

Using npm to install dependencies:

$ npm install

Compile & Build

To generate bundled JS files and types, use the following command. Generated files are located in the dist folder.

$ npm run build

Active Maintainers

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details

FAQ

Frequently asked questions and their answers will be collected here.