This backend service handles the revocation status of W3C Verifiable Credentials according to the CRSet mechanism proposed in CRSet: Non-Interactive Verifiable Credential Revocation with Metadata Privacy for Issuers and Everyone Else. It handles creating new credential status entries, revoking them, building the status info as a Bloom filter cascade, and publishing it via blob-carrying Ethereum transaction. Thus, it covers all functionality an issuer needs to adopt CRSet.
Note that this server enforces no access control. It is meant to be used in a protected network environment.
The project is organized into the following (main) directories and files:
crset-issuer-backend
├── src # Source code
│ ├── controllers/ # Request handlers
│ ├── db/ # Database related files
│ ├── models/ # Data models and schemas
│ ├── routes/ # API route definitions
│ ├── services/ # Business logic
│ ├── utils/ # Helper functions
│ ├── index.ts # Application entry point
├── Dockerfile # Container configuration
├── compose.yaml # Docker Compose configuration
├── package.json # Project dependencies
├── package-lock.json # Dependency lock fileEnsure you have the following installed on your local machine:
Create a .env file in the root directory and copy the contents of the .env.example file into it. You can find the .env.example file here.
Build and start the project using the following command:
docker-compose up --buildAlternatively, you can run the server locally without Docker using the following commands:
npm install
npm run db:init
npm run build
npm run startThe server should now be running on http://localhost:5050.
The server uses an EventEmitter to send live progress updates to clients when publishing. The client can subscribe to these events by connecting to the WebSocket server running on ws://localhost:8091.
Interactive API documentation is available via Swagger UI at http://localhost:5050/api-docs when running the service.
We thank the Ethereum Foundation for funding this work with an Ethereum Academic Grant under reference number FY24-1545.