Error when creating a custom verifiable credential (Context parameter) #34
-
Hi all, The error states:
I find this very weird because the context variable in the data class of the custom verifiable credential I implemented is of type |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @soufianeAmaador Having said that, I wonder if you're using the vclib directly in your project, or whether you use the ssikit. Hope I could help, best regards |
Beta Was this translation helpful? Give feedback.
Hi @soufianeAmaador
As it seems the parser tries to deserialize a VerifiableAttestation, not your custom credential. Make sure the credential contains the correct type property, such that the parser can find the correct class for deserialization.
Having said that, I wonder if you're using the vclib directly in your project, or whether you use the ssikit.
Because, the ssikit has recently been refactored with regards the credential serialization, deserialization and template management. It no longer depends on vclib at all and allows you to import any credential as template dynamically from a JSON sample of that credential.
You may want to look into this instead.
Hope I could help, best reg…