Socket
Socket
Sign inDemoInstall

@privacybydesign/irmajs

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@privacybydesign/irmajs

`irmajs` is a Javascript client of the RESTful JSON API offered by the [`irma server`](https://github.com/privacybydesign/irmago/tree/master/irma). It allows you to use the `irma server` to:


Version published
Weekly downloads
7
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

irmajs

irmajs is a Javascript client of the RESTful JSON API offered by the irma server. It allows you to use the irma server to:

  • Verify IRMA attributes. You specify which attributes, the library handles the user interaction and the communication with the irma server and the IRMA app).
  • Issue IRMA attributes.
  • Create IMRA attribute-based signatures: signature on a string to which IRMA attributes are verifiably attached.

irmajs supports all major browsers (Firefox, Chrome, Safari, Edge, Internet Explorer 11).

Documentation

Technical documentation of irmajs can be found at irma.app/docs.

Building

Compile the library:

npm run build

This writes irma.js to the dist folder, which you can include in your website in a <script> tag

Browser example

If you have included irma.js (e.g. <script src="irma.js" defer></script>) you can start an IRMA disclosure session as follows:

const request = {
  '@context': 'https://irma.app/ld/request/disclosure/v2',
  'disclose': [
    [
      [ 'irma-demo.MijnOverheid.ageLower.over18' ]
    ]
  ]
};

irma.startSession(server, request)
    .then(({ sessionPtr, token }) => irma.handleSession(sessionPtr, {server, token}))
    .then(result => console.log('Done', result));

The example assumes you have an irma server that is configured to accept unauthenticated session requests listening at the URL indicated by server. More information about the format of session requests can be found in the documentation.

For complete examples, see the examples folder.

FAQs

Package last updated on 25 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc