The purpose of this service is to issue and verify credentials. This service by itself does not take care of storing the credentials. If you'd like to store credentials, you would have to pair this service with secret-box-service. This service is also dependent on auth0-service
- Endpoint POST
/api/credentials/issue
- Accepts:
application/json
- Request Body: JSON object with following fields
claim
- Claim received from the Auth0 Serviceprovider
- Auth0 login provider (eg: Twitter, Discord, Github, etc)subjectId
- ID of the holder of the credential
- Success Response Code: 200
- Error Response Code - 400
- Endpoint POST
/api/credentials/verify
- Accepts:
application/json
- Request Body: JSON object with following fields:
credential
- A verifiable credential
- Success Response Code - 200
- Error Response Codes:
- 400: Bad request body
- 405: Wrong content type
- Endpoint:
/api/credentials
(This endpoint only returns a "PONG" as response with status code 200)
Dependencies can be installed using NPM or any other node package manager.
npm install
npm run build
The application expects the following environment variables to be defined for the app to function:
ISSUER_ID_PRIVATE_KEY_HEX
: Hex-encoded private key to be used by the identity credential issuerISSUER_ID_PUBLIC_KEY_HEX
: Hex-encoded public key to be used by the identity credential issuerISSUER_ID_KID
: Key ID to match a specific key inside a JWKISSUER_ID_METHOD
:did:cheqd
method along with network namespace (e.g.,did:cheqd:mainnet:
ordid:cheqd:testnet:
)ISSUER_ID_METHOD_SPECIFIC_ID
: Unique identifier portion of adid:cheqd
DID, e.g.,zAXwwqZzhCZA1L77ZBa8fhVNjL9MQCHX
ISSUER_ID
: Fully-qualified DID for the issuer, e.g.,did:cheqd:mainnet:zAXwwqZzhCZA1L77ZBa8fhVNjL9MQCHX
COSMOS_PAYER_MNEMONIC
: Mnemonic for the issuer's Cosmos account. This currently doesn't require any balances at the moment, but it required for the library to function.NETWORK_RPC_URL
: RPC URL for a node on cheqd network, e.g.,rpc.cheqd.net
AUTH0_SERVICE_ENDPOINT
: Auth0 service endpoint, is an instance of Auth0 Service
Once configured, the app can be run using NPM:
npm start
Or, to build and run in Docker, use the Dockerfile provided.
docker build -t credential-service .
If you notice anything not behaving how you expected, or would like to make a suggestion / request for a new feature, please create a new issue and let us know.
The cheqd Community Slack is our primary chat channel for the open-source community, software developers, and node operators.
Please reach out to us there for discussions, help, and feedback on the project.