Skip to content

Verifiable Credential/Presentation REST Service written in Go

License

Notifications You must be signed in to change notification settings

medibloc/vc-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VerifiableCredential Service

A HTTP service that wraps vc-sdk

Features

  • Sign credentials

TODO

  • Verify credentials
  • Sign presentations
  • Verify presentations

Building and Running

Without Docker

go build ./...

PORT=8888 \
go run cmd/main.go

With Docker

docker build -t vc-service .
docker run -e PORT=8888 -p 8888:8888 vc-service

Environment Variables

Env Var Desc Default
DEBUG Turn on debug logs false
PORT HTTP port
READ_TIMEOUT HTTP read timeout 10s
WRITE_TIMEOUT HTTP write timeout 10s
IDLE_TIMEOUT HTTP idle timeout 60s

REST API

Sign credential

curl -X POST localhost:8888/credentials/issue -d @samples/issue-credential.json

The sample JSON file is in the samples/ directory.

Responses

Status Code Description
201 Credential successfully issued
400 Invalid input
500 Internal error