Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion from W3cVerifiableCredential to the legacy format fails #326

Closed
auer-martin opened this issue Feb 14, 2024 · 2 comments
Closed

Comments

@auer-martin
Copy link

The conversion from a W3cVerifiableCredential to the legacy format fails if it is a "derived" vc from a presentation.
That should still work, right?

    const w3cVerifiablePresentation = W3cPresentation.create({...})
    const w3cVerifiablePresentationJson = w3cVerifiablePresentation.toJson()
    const verifiableCredentialJson = w3cVerifiablePresentationJson.verifiableCredential[0]
    const w3cVerifiableCredential = W3cCredential.fromJson(verifiableCredentialJson)
    const legacyCredential = w3cVerifiableCredential.toLegacy()
    // Error: DataIntegrityProof does not contain credential signature proof
@swcurran
Copy link
Member

I’m not sure, but I’m also not sure why it would be needed. Could you explain? Is it as a part of verifying the VP?

An AnonCreds derived VC in a VP is quite different from an issued VC, so I’m not surprised that the conversion does not work.

@auer-martin
Copy link
Author

Okay. I was running into it when doing some experimentation. If that is the expected behavior, I will close this.
Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants