Skip to content

JWS / Proof in createVerifiableCredential #571

Answered by mirceanis
RobertoSnap asked this question in Q&A
Discussion options

You must be logged in to vote

createVerifiableCredential returns a Verifiable Credential object with a structure mimicking the ones described in the W3C VC data model for convenience.

When using proofFormat: 'jwt', veramo creates a synthetic JwtProof2020 proof property on the returned credential.
This proof type has a jwt field that contains the actual credential in JWT encoding.

You can try something like this:

const issuerX = await agent.didManagerGet({ did: 'did:example:issuerX' })

const credential = {
  issuer: { id: issuerX.did }, // issuer DID MUST be an identifier managed by this agent ()
  credentialSubject: { 
    id: 'did:example:subjectY', 
    name: 'Old Nordmann' 
  },
}
const vc = await agent.createVeri…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobertoSnap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants