# @privacybydesign/irma-frontend

> A simplified package of irma-frontend modules to get started easily

Latest version **0.4.3** (published 2021-10-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @privacybydesign/irma-frontend
pnpm add @privacybydesign/irma-frontend
yarn add @privacybydesign/irma-frontend
bun add @privacybydesign/irma-frontend
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.3 |
| Published | 2021-10-01 |
| First published | 2020-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 358.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Maintainers | sringers, confiks, timendus, ivard |

## Links

- npm: https://www.npmjs.com/package/@privacybydesign/irma-frontend
- Repository: https://github.com/privacybydesign/irma-frontend-packages
- Homepage: https://github.com/privacybydesign/irma-frontend-packages#readme
- Issues: https://github.com/privacybydesign/irma-frontend-packages/issues
- npm.io page: https://npm.io/package/@privacybydesign/irma-frontend

## Recent versions

- 0.4.3 (latest) — 2021-10-01
- 0.4.2 — 2021-08-25
- 0.4.1 — 2021-07-28
- 0.3.3 — 2021-03-25
- 0.3.2 — 2021-01-15
- 0.1.5 — 2020-11-06
- 0.1.4 — 2020-11-03
- 0.1.3 — 2020-10-30
- 0.1.2 — 2020-10-19
- 0.1.1 — 2020-10-12
- 0.1.1-rc.16 — 2020-10-05
- 0.1.1-rc.15 — 2020-10-01
- 0.1.1-rc.14 — 2020-09-18
- 0.1.1-rc.13 — 2020-09-10
- 0.1.1-rc.12 — 2020-07-27
- … 12 more at https://npm.io/package/@privacybydesign/irma-frontend/versions

## README

# IRMA frontend

This is a thin wrapper around `irma-core`, `irma-web`, `irma-popup`,
`irma-client` and `irma-css`. The intended use of this package is to provide
an all-in-one Javascript file that developers can include to get started:

```html
<script src="assets/irma.js" type="text/javascript"></script>
```

or as JavaScript import:
```javascript
const irma = require('@privacybydesign/irma-frontend');
```

## Documentation
More documentation on how to use this module can be found in the
[IRMA documentation](https://irma.app/docs/irma-frontend/#irma-frontend).

## Usage
When you want to use an embedded web element,
then you can instantiate `irma-frontend` like so:

```javascript
const example = irma.newWeb({
  debugging: false,            // Enable to get helpful output in the browser console
  element:   '#irma-web-form', // Which DOM element to render to

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});
```

When you want to use a popup overlay that renders on top of the content of
your website, then you can instantiate `irma-frontend` like so:

```javascript
const example = irma.newPopup({
  debugging: false, // Enable to get helpful output in the browser console

  // Back-end options
  session: {
    // Configure your flow here, see code examples in root README file
  },

  ...
});
```

Finally, you can start your IRMA flow:

```javascript
example.start()
.then(result => console.log("Successful disclosure! 🎉", result))
.catch(error => console.error("Couldn't do what you asked 😢", error));
```

Be aware that you can start an instance of `irma-core` only once.
When you want to call `start()` again, you have to create a new instance.

## Download
A bundled JavaScript file can be found [here](https://gitlab.science.ru.nl/irma/github-mirrors/irma-frontend-packages/-/jobs/artifacts/master/browse/irma-frontend/dist?job=irma-frontend).
Please download this file and host it yourself. Versions can change and we do not want to break your website.

## Development
You can link local versions of modules easily using `npm link`. There is
an explanation about how to use `npm link` in the README of the
[`irma-frontend-packages` root directory](https://github.com/privacybydesign/irma-frontend-packages).

---
_Source: https://npm.io/package/@privacybydesign/irma-frontend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
