This repo provides a simple JavaScript example that sets up a did:web DID via Github Pages, and demonstrates verifying a Verifiable Credential with the public key in the DID document.
init-key.js
creates an ed25519 key pair and DID documentissue.js
issues a Verifiable Credential using a key generated from the previous stepverify.js
verifies the Verifiable Credential against the DID document found online using a did:web URIverify-mock.js
verifies the Verifiable Credential against the local DID document
These artifacts in the docs/
directory are published to Github Pages:
did.json
is a DID document. It follows the naming convention for did:web and can be referenced asdid:web:wesbiggs.github.io:did-web-vc-demo
email.json
is a signed Verifiable Credential generated fromissue.js
verified-email-address-credential.json
is a JSON schema for the credential (here for demonstration purposes only)
Feedback gratefully welcomed via Github Issues.
Thank you to Digital Bazaar for the core open source libraries this demo relies on.