@cheqd/credential-service v2.20.1
Credential Service
âšī¸ Overview
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
đ Endpoints
Issue a credential
- 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
Verify a Credential
- 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
Health Check
- Endpoint:
/api/credentials
(This endpoint only returns a "PONG" as response with status code 200)
đ§âđģđ Developer Guide
Setup
Dependencies can be installed using NPM or any other node package manager.
npm install
npm run build
Configuration
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
Run
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 .
đ Bug reports & đ¤ feature requests
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.
đŦ Community
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.
đ Find us elsewhere
11 days ago
16 days ago
16 days ago
22 days ago
22 days ago
22 days ago
23 days ago
25 days ago
29 days ago
1 month ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
6 months ago
10 months ago
11 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
9 months ago
9 months ago
9 months ago
7 months ago
6 months ago
9 months ago
6 months ago
6 months ago
9 months ago
7 months ago
7 months ago
8 months ago
6 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
9 months ago
10 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
11 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
11 months ago
12 months ago
11 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago