Skip to content

ASCS-eV/crset-issuer-backend

 
 

Repository files navigation

CRSet Issuer Backend

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.

Project Structure

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 file

Prerequisites

Ensure you have the following installed on your local machine:

Installation

Set up the environment variables

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.

Running the server

Build and start the project using the following command:

docker-compose up --build

Alternatively, you can run the server locally without Docker using the following commands:

npm install
npm run db:init
npm run build
npm run start

The server should now be running on http://localhost:5050.

EventEmitter

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.

API Documentation

Interactive API documentation is available via Swagger UI at http://localhost:5050/api-docs when running the service.

Acknowledgments

We thank the Ethereum Foundation for funding this work with an Ethereum Academic Grant under reference number FY24-1545.

Links and References

About

A backend service for CRSet that handles VC ids and their revocation status for issuers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 91.3%
  • Dockerfile 7.4%
  • JavaScript 1.3%