# uport-credentials

> Library for interacting with uport profiles and attestations

Latest version **1.3.5** (published 2020-09-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install uport-credentials
pnpm add uport-credentials
yarn add uport-credentials
bun add uport-credentials
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.5 |
| Published | 2020-09-25 |
| First published | 2018-07-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 991 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 134 |
| Author | Pelle Braendgaard |
| Maintainers | uport-automation-bot, jasonphealy, mirceanis, aldigjo, simonas-notcat, localredhead, zachferland, pelleb, rmw2, mike.xu |

## Links

- npm: https://www.npmjs.com/package/uport-credentials
- Repository: https://github.com/uport-project/uport-credentials
- Homepage: https://github.com/uport-project/uport-credentials#readme
- Issues: https://github.com/uport-project/uport-credentials/issues
- npm.io page: https://npm.io/package/uport-credentials

## Dependencies (7)

- [mnid](https://npm.io/package/mnid.md) ^0.1.1
- [did-jwt](https://npm.io/package/did-jwt.md) ^4.0.0
- [elliptic](https://npm.io/package/elliptic.md) ^6.4.1
- [did-jwt-vc](https://npm.io/package/did-jwt-vc.md) ^1.0.0
- [did-resolver](https://npm.io/package/did-resolver.md) ^2.0.0
- [web-did-resolver](https://npm.io/package/web-did-resolver.md) ^1.2.0
- [ethr-did-resolver](https://npm.io/package/ethr-did-resolver.md) ^3.0.0

## Recent versions

- 1.3.5 (latest) — 2020-09-25
- 1.2.3-dev.0 (dev) — 2019-07-01
- 1.2.2-alpha.1 (alpha) — 2019-06-14
- 1.1.0-rc.2 (next) — 2018-12-12
- 1.0.3-rc.0 (test) — 2018-12-03
- 1.3.4 — 2020-08-07
- 1.3.3 — 2020-06-11
- 1.3.2 — 2020-06-11
- 1.3.1 — 2020-06-09
- 1.3.0 — 2020-02-07
- 1.2.3 — 2019-10-08
- 1.2.2 — 2019-06-19
- 1.2.2-alpha.0 — 2019-06-05
- 1.2.1 — 2019-04-26
- 1.1.8-dev.2 — 2019-04-26
- … 34 more at https://npm.io/package/uport-credentials/versions

## README

[![npm](https://img.shields.io/npm/v/uport-credentials.svg)](https://www.npmjs.com/package/uport-credentials)
[![Twitter Follow](https://img.shields.io/twitter/follow/uport_me.svg?style=social&label=Follow)](https://twitter.com/uport_me)

[DID Specification](https://w3c-ccg.github.io/did-spec/) | [Getting Started](/docs/guides/index.md)

[FAQ and helpdesk support](http://bit.ly/uPort_helpdesk)

# uPort Credentials Library

**Required Upgrade to uport-credentials@1.3.0**

Starting with version 1.3.0 you are required to specify either a `Resolver` instance, or a valid configuration
object for `ethr-did-resolver`.
Previous versions of this library were relying on the automatic configuration of some default
[DID resolvers](https://github.com/decentralized-identity/did-resolver) but this pattern was both limiting and prone
to errors of misconfiguration or interference.
This has caused an outage in credential verification on 2020-01-20 and continued use of previous versions are highly
likely to no longer function properly because of this.

An example configuration with a resolver:

```javascript
import { Credentials, SimpleSigner } from 'uport-credentials'
import { Resolver } from 'did-resolver'
import { getResolver } from 'ethr-did-resolver'

const providerConfig = { rpcUrl: 'https://mainnet.infura.io/<YOUR INFURA PROJECT ID>' }
const resolver = new Resolver(getResolver(providerConfig))

const credentials = new Credentials({
    did: process.env.APPLICATION_DID,
    signer: SimpleSigner(process.env.PRIVATE_KEY),
    resolver
})

```

See [ethr-did-resolver#43](https://github.com/decentralized-identity/ethr-did-resolver/issues/43) for more info.

## Integrate uPort Into Your Application 

uPort provides a set of tools for creating and managing identities that conform to the decentralized identifier (DID)
specification, and for requesting and exchanging verified data between identities. 

uPort Credentials simplifies the process of identity creation within JavaScript applications; additionally, it allows
applications to easily sign and verify data — signed by other identities to facilitate secure communication between
parties. These pieces of data take the form of signed JSON Web Tokens (JWTs), they have specific fields designed for
use with uPort clients, described in the uPort specifications, collectively referred to as verifications.
 
To allow for maximum flexibility, uPort Credential’s only deals with creation and validation of verifications. To pass
verifications between a JavaScript application and a user via the uPort mobile app, we have developed the
[uPort Transports library](https://github.com/uport-project/uport-transports), use it in conjunction with uPort
Credentials when necessary.

To hit the ground running with uPort Credentials, visit the [Getting Started guide](/docs/guides/index.md). 

For details on uPort's underlying architecture, read our [spec repo](https://github.com/uport-project/specs)

This library is part of a suite of tools maintained by the uPort Project, a ConsenSys formation. For more information
on the project, visit [uport.me](https://uport.me)

[FAQ and helpdesk support](http://bit.ly/uPort_helpdesk)

## Contributing

Please see our [contribution guidelines](/Contributing.md) if you wish to contribute to this project.

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