30.1.0 • Published 6 months ago

@bedrock/vc-issuer v30.1.0

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

Bedrock Verifiable Credentials Issuer API module (bedrock-vc-issuer)

Build Status NPM Version

A VC Issuer API library for use with Bedrock applications.

Table of Contents

Background

Security

TBD

Install

  • Node.js 18+ is required.

NPM

To install via NPM:

npm install --save @bedrock/vc-issuer

Development

To install locally (for development):

git clone https://github.com/digitalbazaar/bedrock-vc-issuer.git
cd bedrock-vc-issuer
npm install

Usage

In lib/index.js:

import '@bedrock/vc-issuer';

Note: The use of bedrock-web-vc-issuer client is recommended, to create instances.

Issuer HTTP API

This module exposes the following API endpoints.

DID Authentication - POST /vc-issuer/authenticate

Example request:

{
  "presentation": {
    "type": "VerifiablePresentation",
    "holder": "<account controller's DID>",
    "proof": {
      "challenge": "<challenge is required>",
      "type": "...",
      "proofPurpose": "authentication",
      "created": "...",
      "verificationMethod": "<key id>",
      "proofValue": "..."
    }
  }
}

Issue a Credential - POST /vc-issuer/issue

Authorization header is required.

Example request:

{
  "credential": {
  }
}

Example response:

{
  "verifiableCredential": {
  }
}

Instance Issue Credential - POST /credentials/:profileAgentId/issueCredential

Example request:

{
  "credential": {
  },
  "options": {
    "proofPurpose": "assertionMethod",
    "assertionMethod": "<key id>",
    "verificationMethod": "<key id>",
    "credentialStatus": {
      "type": "RevocationList2020Status"
    }
  }
}

Update Credential Status - POST /credentials/:profileAgentId/updateCredentialStatus

Example request:

{
  "credentialId": "...",
  "credentialStatus": {
    "type": "RevocationList2020Status"
  }
}
HTTP 200 OK

Publish RLC - POST /vc-issuer/instances/:instanceId/rlc/:rlcId/publish

Uses either bedrock-passport authentication, or an Authorization header bearer token.

Example request:

{
  "profileAgent": {
  }
}

Example response:

HTTP 204 No Content

Get RLC - GET /vc-issuer/instances/:instanceId/rlc/:rlcId

No authz required.

Contribute

See the contribute file!

PRs accepted.

If editing the Readme, please conform to the standard-readme specification.

Commercial Support

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

License

Bedrock Non-Commercial License v1.0 © Digital Bazaar

28.1.0

1 year ago

28.4.0

11 months ago

28.2.0

11 months ago

28.3.0

11 months ago

30.1.0

6 months ago

30.0.1

6 months ago

30.0.2

6 months ago

30.0.0

8 months ago

29.0.1

9 months ago

29.0.2

9 months ago

29.0.0

9 months ago

28.0.0

1 year ago

27.1.0

1 year ago

27.0.2

1 year ago

27.0.1

1 year ago

27.0.3

1 year ago

26.0.1

1 year ago

26.0.0

1 year ago

27.0.0

1 year ago

25.2.0

2 years ago

23.0.0

2 years ago

23.1.1

2 years ago

25.1.0

2 years ago

25.0.0

2 years ago

24.1.0

2 years ago

24.0.0

2 years ago

22.0.1

3 years ago

22.0.0

3 years ago

21.0.0

3 years ago

20.0.1

3 years ago

20.0.0

3 years ago

19.4.0

3 years ago

19.3.1

3 years ago

19.3.0

3 years ago

19.1.0

3 years ago

19.0.0

3 years ago

19.2.0

3 years ago

18.0.0

3 years ago

14.0.0

4 years ago

16.2.0

4 years ago

14.0.1

4 years ago

16.1.0

4 years ago

16.0.0

4 years ago

15.0.0

4 years ago

17.0.0

3 years ago

13.0.0

4 years ago