Verfi JWT from ETHR fails #579
-
Creating a VC with createVerifiableCredential() Then checking the JWT inside VC with try {
await this.agent.handleMessage({
raw: jwt,
});
return true;
} catch (error) {
console.log('JWT not valid => ', error);
return false;
} Getting error: JWT not valid => Error: Unsupported message type
at Object.<anonymous> (/Users/robin/code/brok-auth-bot/node_modules/@veramo/message-handler/src/abstract-message-handler.ts:4:44)
at Runtime._execModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:1299:24)
at Runtime._loadModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:898:12)
at Runtime.requireModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:746:10)
at Runtime.requireModuleOrMock (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:919:21)
at Object.<anonymous> (/Users/robin/code/brok-auth-bot/node_modules/@veramo/message-handler/src/index.ts:8:1)
at Runtime._execModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:1299:24)
at Runtime._loadModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:898:12)
at Runtime.requireModule (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:746:10)
at Runtime.requireModuleOrMock (/Users/robin/code/brok-auth-bot/node_modules/jest-runtime/build/index.js:919:21) Here is the test that fails: https://github.com/BROKLab/auth-bot/blob/veramo/src/network/veramo.service.spec.ts#L33 Same thing worked when doing it with a KEY identifier. Does this handle otherwise with ETHR? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
After some digging it seems there is an issue with the JsonRPC provider. It's not able to confirm the network ID. Using your code with a known JsonRPC (like one from infura) seems to work ok. Update:
|
Beta Was this translation helpful? Give feedback.
After some digging it seems there is an issue with the JsonRPC provider. It's not able to confirm the network ID.
I will dig a little deeper, since this might be an issue with
ethr-did-resolver
.Using your code with a known JsonRPC (like one from infura) seems to work ok.
Update: