-
Notifications
You must be signed in to change notification settings - Fork 135
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
Error: Unsupported message type when handling Verifiable Presentation #516
Comments
Hi, Thanks for reporting!. We will look into this. |
@strumswell can you try to post one of these presentation JWTs that you are generating? |
JWT of presentation of did:key with error:
JWT of did:ion without error:
Not sure what you mean with the
Let me know if that helps or if you need more info. EDIT: How I generate the VC click and VP click const issuer = "did:key:z6MksN5FKf7n19f4yyRp9LpzYGn8x7j3n5Xgpo8bAk2KC3BJ"
const credential = {
credential: {
"@context": ["https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1"],
type: ["VerifiableCredential", "UniversityDegreeCredential"],
issuer: issuer,
issuanceDate: new Date().toISOString(),
credentialSubject: {
id: issuer,
degree: {
type: "BachelorDegree",
name: "Bachelor of Science and Arts",
},
},
},
}; Info for used did:key via
|
@strumswell the first example you provided uses did:ion and not did:key. Could you pls provide the JWT-VP that uses did:key? |
Oh, that's weird. I was pretty sure the first example uses did:key and even did a re-check via jwt.io debugger. Maybe I'm misunderstanding you? But here you go, another example: JWT of VP using did:key DID.
Output with full VC, VP and verification result: https://ghostbin.co/paste/892am32 |
@strumswell Thanks for re-sharing the example (I guess I did a copy&paste error). The issue is that the VC contains the right alg=EdDSA but the VP doesn't. The VP is a JWT with alg=ES256K which should be EdDSA. @mirceanis imo, this is a bug. |
Oh, I see. Let me know if you need more. I'll keep an eye on the issue. 🙂 |
Should now be fixed. |
Bug severity
2
Describe the bug
Trying to verify a Verifiable Presentation with did:key as holder/ verifier via MessageHandler throws an "Unsupported message type" error.
To Reproduce
Steps to reproduce the behaviour:
agent.handleMessage({ raw: presentation.proof.jwt })
-> ErrorObserved behaviour
Step 3 throws an
Unsupported message type
error.Expected behaviour
A resolved Message from input jwt.
Details
Additional context
This bug seems to be related to the did:key method. If you redo those 3 steps with did:ion or did:ethr, all steps work perfectly. Maybe it's due to the key types? (Ed25519 of did:key vs Secp256k1 of did:ion/ethr) You can find my Veramo setup here, in case I missed something.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: