dhiway / cord.js

Cord JS API
Apache License 2.0
36 stars 48 forks source link

add 'vc-export' module to export Verifiable Credentials #82

Closed amarts closed 1 year ago

amarts commented 1 year ago

vc-export module provides methods to convert IDocument (the verifiable documents created from '@cord.network/sdk') type of json to VerifiableCredential type of document (ie, the w3c VC standard compliant json). This method also provides methods to prepare VP (Verifiable Presentation) from the IDocument, and all methods to verify the proofs attached.

amarts commented 1 year ago

Output at the end of demo-vc now.

✅ Stream-Signature-Proof true ✧ Stream-Proof true ✧ Digest-Proof true ✧ Self-Signature-Proof true

✅ Credential revoked! ❌ Stream-Signature-Proof true ✧ Stream-Proof {verified: false, status: 'revoked'} ✧ Digest-Proof true ✧ Self-Signature-Proof true