Skip to content

Issue credential #569

Answered by mirceanis
RobertoSnap asked this question in Q&A
Jun 15, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I suspect that the error is coming from the createVerifiableCredential() call
It is expecting that credentialSubject should have some claims (other properties beside id)

Using your example, perhaps the data parameter is intended to contain the claims, in which case it would look something like this:

credentialSubject: {
  id: subjectDidId,
  ...data
},

Take a look at the example in this other discussion: #571 (comment) too.

Please note that createVerifiableCredential() internally calls keyManagerSign. You don't have to call it on your own unless you need a JWS signature for other purposes.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RobertoSnap
Comment options

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