@vckit/revocationlist
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.7 • Public • Published

Revocation list 2020

The revocation list 2020 plugin is used to revoke and verify the verify credential based on the revocation list 2020 https://w3c-ccg.github.io/vc-status-rl-2020/

Usage

Configuration

To use the plugin you need to add the following configuration to the agent.yml

  • First, define the revocation list plugin:
dbConnectionRevocationList:
  $require: typeorm#DataSource
  $args:
    - type: sqlite
      database:
        $ref: /constants/databaseFile
      synchronize: true
      migrationsRun: true
      migrations:
        $require: '@vckit/revocationlist?t=object#migrations'
      logging: false
      entities:
        $require: '@vckit/revocationlist?t=object#Entities'

revocationList:
  $require: '@vckit/revocationlist#RevocationStatus2020'
  $args:
    - dbConnection:
        $ref: /dbConnectionRevocationList
      revocationListPath: http://localhost:3332
      bitStringLength: 8
  • Second, add the plugin and credential status plugin to the agent plugins list:
agent:
  $require: '@vckit/core#Agent'
  $args:
    - schemaValidation: false
      plugins:
        # Plugins
        - $ref: /revocationList
        - $require: '@veramo/credential-status#CredentialStatusPlugin'
          $args:
            - RevocationList2020Status:
                $require: '@vckit/revocationlist?t=object#checkStatus'
  • Then, set the revocation list middleware to inject the credential status to the credential when it is issued:
- $require: '@vckit/revocationlist?t=function#revocationList2020'
  $args:
    - apiRoutes:
        - /routeCreationVerifiableCredential
      supportedProofFormats:
        - jwt
        - lds
  • After that, you need to expose the plugin functions:
- revokeCredential
- activateCredential
- checkStatus

Every time the credential is issued by API /routeCreationVerifiableCredential, the middleware will inject the credential status to the credential.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-beta.71latest
1.0.0-next.990next

Version History

VersionDownloads (Last 7 Days)Published
1.0.0-next.990
1.0.0-next.1640
1.0.0-next.980
1.0.0-beta.71
1.0.0-next.960
1.0.0-beta.60

Package Sidebar

Install

npm i @vckit/revocationlist

Weekly Downloads

1

Version

1.0.0-beta.7

License

Apache-2.0

Unpacked Size

148 kB

Total Files

69

Last publish

Collaborators

  • nam_hoang
  • nam_hoang_gs
  • arpentnoir