Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

walt-id/waltid-digital-credentials-button

Repository files navigation

Digital Credentials Button

by walt.id

A web component that fetches a digital credentials request, calls the Digital Credentials API, and posts the response to your backend.

Join community! Follow walt_id

Status

Status: Actively Maintained
This project is actively maintained by the development team at walt.id.

Digital Credentials Button Monorepo

Reusable Digital Credentials API web component plus a minimal demo backend. Includes vanilla, React, and Vue demos, plus a dedicated dc-api-test app for direct verifier testing.

Use our deployed demo here: https://digital-credentials.walt.id

Learn more about the Digital Credentials API:

Tested wallets:

Packages

  • @waltid/digital-credentials — web component (<digital-credentials-button>).
  • @waltid/dc-client — core flow logic (request/load DC API/post verification).
  • @waltid/dc-backend-demo — Vite middleware exposing /api/dc/* demo endpoints backed by verifier sessions.

Apps

  • apps/web-demo — full vanilla demo (request selector, protocol selector, toggles, logs, credential modal).
  • apps/dc-api-test — direct verifier test app using Swagger examples from /verification-session/create.
  • apps/react-demo — minimal React integration example.
  • apps/vue-demo — minimal Vue integration example.

Quick Start

npm install
npm run build

npm run dev:web
npm run dev:dc-api-test
npm run dev:react
npm run dev:vue

Common Endpoints (demo backend)

  • GET /api/dc/requests
  • GET /api/dc/request-config/:requestId
  • GET /api/dc/request/:requestId
  • POST /api/dc/request/:requestId
  • POST /api/dc/response
  • GET /api/dc/annex-c/request/:requestId
  • POST /api/dc/annex-c/request/:requestId
  • POST /api/dc/annex-c/response

Default verifier base is https://verifier2.portal.test.waltid.cloud (override via VERIFIER_BASE or plugin options).

Using the Web Component

<script type="module">
  import '@waltid/digital-credentials';
</script>

<digital-credentials-button
  request-id="unsigned-mdl"
  request-endpoint="/api/dc/request"
  response-endpoint="/api/dc/response"
  label="Request credentials"
></digital-credentials-button>

request-payload can be supplied for custom request setup. In this implementation it is posted to request-endpoint (as custom config), not sent directly to navigator.credentials.get without backend interaction.

Scripts

  • npm run build
  • npm run build:backend
  • npm run build:client
  • npm run build:wc
  • npm run dev:web
  • npm run dev:dc-api-test
  • npm run dev:react
  • npm run dev:vue

Join the Community

License

Licensed under the Apache License, Version 2.0

walt.id banner

About

A Web Component and demos for accessing the Digital Credentials API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors