Tip
Check out the demo at https://openid4vc.animo.id
Welcome to the repository of Animo's OpenID4VC Playground. This interactive playground demonstrates the use of OpenID4VC with different credential formats (such as SD-JWT VCs). This demo is built using Aries Framework Javascript (AFJ). AFJ is a framework written in TypeScript for building decentralized identity services.
Copy the .env.example
file to a .env.local
file and set the environment variables. This is not needed for development.
cd app
cp .env.example .env
Variable | Description |
---|---|
NEXT_PUBLIC_API_URL |
Used in the frontend application to connect with the backend. Default to http://localhost:3001 for development. |
Copy the .env.example
file to a .env.local
file and set the environment variables. This is not needed for development.
cd agent
cp .env.example .env
Variable | Description |
---|---|
AGENT_HOST |
Used in the backend application for the agent. The url at which the server will be available. |
AGENT_WALLET_KEY |
Used in the backend application for the agent. Should be secure and kept private. |
Important
The issuer will use did:web
for issuing credentials, but this requires https
to be used. When developing locally it is recommend
to use ngrok
(npx ngrok http 3001
) and use that url as the AGENT_HOST
variable. Make sure to also set the NEXT_PUBLIC_API_URL
variable in the app to the ngrok.
We may add issuance using did:key in development if the host url does not start with https
.
pnpm install
Open three terminal windows, and then run the following:
npx ngrok http 3001
Copy the https url from the ngrok command and set that as the AGENT_HOST
cd agent
AGENT_HOST=https://30f9-58-136-114-148.ngrok-free.app pnpm dev
cd app
pnpm dev
You're welcome to contribute to this playground. Please make sure to open an issue first!
This playground is open source and you're more than welcome to customize and use it to create your own OpenID4VC Playground. If you do, an attribution to Animo would be very much appreciated!