# @digitalbazaar/vc-revocation-list

> Verifiable Credentials Revocation List 2020

Latest version **7.0.0** (published 2024-08-03) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install @digitalbazaar/vc-revocation-list
pnpm add @digitalbazaar/vc-revocation-list
yarn add @digitalbazaar/vc-revocation-list
bun add @digitalbazaar/vc-revocation-list
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2024-08-03 |
| First published | 2022-06-16 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Digital Bazaar, Inc. |
| Maintainers | dlongley, msporny, davidlehn, mattcollier, gannan |
| Keywords | vc, verifiable credential, revocation list, bitstring, RevocationList2020, VerifiableCredential |

## Links

- npm: https://www.npmjs.com/package/@digitalbazaar/vc-revocation-list
- Repository: https://github.com/digitalbazaar/vc-revocation-list
- Issues: https://github.com/digitalbazaar/vc-revocation-list/issues
- npm.io page: https://npm.io/package/@digitalbazaar/vc-revocation-list

## Dependencies (2)

- [@digitalbazaar/vc](https://npm.io/package/@digitalbazaar/vc.md) ^7.0.0
- [@digitalbazaar/bitstring](https://npm.io/package/@digitalbazaar/bitstring.md) ^3.1.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 7.0.0 (latest) — 2024-08-03
- 6.0.0 — 2023-01-08
- 5.0.1 — 2023-01-04
- 5.0.0 — 2022-10-25
- 4.0.0 — 2022-06-16

## README

# @digitalbazaar/vc-revocation-list

[Verifiable Credential Revocation List 2020](https://github.com/w3c-ccg/vc-status-rl-2020)

### Creating a RevocationList2020Credential

```js
import rl from '@digitalbazaar/vc-revocation-list';
import jsigs from 'jsonld-signatures';
import {Ed25519KeyPair} from 'crypto-ld';
import * as vc from '@digitalbazaar/vc';
const documentLoader = require('./path-to/document-loader.js');

const key = new Ed25519KeyPair({
  id: 'did:key:z6MknUVLM84Eo5mQswCqP7f6oNER84rmVKkCvypob8UtBC8K#z6MknUVLM84Eo5mQswCqP7f6oNER84rmVKkCvypob8UtBC8K',
  controller: 'did:key:z6MknUVLM84Eo5mQswCqP7f6oNER84rmVKkCvypob8UtBC8K',
  type: 'Ed25519VerificationKey2018',
  privateKeyBase58: 'CoZphRAfAVPqx9f54MRUBtmjD4uY6KPxQQKsE3frUbZ269tBD4AdTQAVbXHHgpewh4BunoXK8dotcUJ6JXhZPsh',
  publicKeyBase58: '92EHksooTYGwmSN8hYhFxGgRJVav5SVrExuskrWsFyLw'
});
const suite = new Ed25519Signature2018({
  key,
  date: '2019-12-11T03:50:55Z',
});
const id = 'https://example.com/credentials/status/3';
const list = await rl.createList({ length: 100000 });
const encodedList = await list.encode();
const rlCredential = {
  '@context': [
    'https://www.w3.org/2018/credentials/v1',
    'https://w3id.org/vc-revocation-list-2020/v1'
  ],
  id,
  issuer: 'did:key:z6MknUVLM84Eo5mQswCqP7f6oNER84rmVKkCvypob8UtBC8K',
  issuanceDate: '2020-03-10T04:24:12.164Z',
  type: ['VerifiableCredential', 'RevocationList2020Credential'],
  credentialSubject: {
    id: `${id}#list`,
    type: 'RevocationList2020',
    encodedList,
  },
};
let verifiableCredential = await vc.issue({
  credential: { ...rlCredential },
  suite,
  documentLoader,
});
```

### Created a Credential which uses a RevocationList2020

```js
// see imports above
const credential = {
  '@context': [
    'https://www.w3.org/2018/credentials/v1',
    'https://www.w3.org/2018/credentials/examples/v1',
    'https://w3id.org/vc-revocation-list-2020/v1',
  ],
  id: 'https://example.com/credentials/3732',
  type: ['VerifiableCredential', 'UniversityDegreeCredential'],
  issuer: 'did:web:did.actor:alice',
  issuanceDate: '2020-03-10T04:24:12.164Z',
  credentialStatus: {
    id: 'https://example.com/credentials/status/3#94567',
    type: 'RevocationList2020Status',
    revocationListIndex: '94567',
    revocationListCredential:
      'https://did.actor/alice/credentials/status/3',
  },
  credentialSubject: {
    id: 'did:web:did.actor:bob',
    degree: {
      type: 'BachelorDegree',
      name: 'Bachelor of Science and Arts',
    },
  },
};
let verifiableCredential = await vc.issue({
  credential: { ...credential },
  suite,
  documentLoader,
});
```

---
_Source: https://npm.io/package/@digitalbazaar/vc-revocation-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
