-
Notifications
You must be signed in to change notification settings - Fork 0
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
Verifying revocation status #9
Comments
You previously issued a credential with a status which was stored in the file with id You can retrieve the encoded status list from that file, either using hedera's file system directly, or using the API server:
Which returns: (this credential was signed by my DID, yours would be different)
|
Thank you. I understand the process to obtain the encoded list. Where I am struggling is to get the code snippet working to test the revocation status manually (outside of the verify functionality). To me the code snippet does not look to be complete. Can we provide a complete working code snippet: `import * as sl from "@digitalbazaar/vc-status-list"; const decoded = await sl.decodeList({ // return true, which means revoked |
Sorry, I fail to see what's missing? What would you expect to see? The current snippet just checks the index of a status in the list which is all that's needed to verify if a snippet has been revoked |
I cannot get the code to work. Here is the code I am using from the examples (with a few tweaks). const client = Client.forTestnet(); async function main() { const statusLists = JSON.parse(String(contents)); // in the credentialStatus, the status list index is 2 const decoded = await sl.decodeList({ // return true if revoked or false if not } When I run this I am hitting an error ERR_REQUIRE_ESM from "const sl = require ("@digitalbazaar/vc-status-list");". |
When a credential is revoked one can lookup the status of the revocation list. From the response you can confirm the if that status is a 1 or 0 from the position in the bitlist. From my understanding the process to determine this is the pass the encoded list into the vc-status-list library.
From the example 02-VC-status.md there is a code snippet at the bottom for this process:
I am not sure from the examples or the vc-status-list repo how to get this check to pass. Can we provide more detail on this process?
The text was updated successfully, but these errors were encountered: