-
Notifications
You must be signed in to change notification settings - Fork 197
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
feat: AnonCreds revocation registry and statuslist #1954
feat: AnonCreds revocation registry and statuslist #1954
Conversation
Signed-off-by: Tom Lanser <[email protected]>
🦋 Changeset detectedLatest commit: 71a4192 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const response = await cheqdDidResolver.resolveResource( | ||
agentContext, | ||
`${revocationRegistryId}&resourceType=anonCredsStatusList&resourceVersionTime=${timestamp}` | ||
`${parsedDid.did}?resourceType=anonCredsStatusList&resourceVersionTime=${timestamp}&resourceName=${revocationRegistryDefinitionName}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the revocation registry definition name need to be unique? couldn't we use the revocationRegistryId as the name of the status list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the documentation of cheqd about anoncreds revocation. The statuslist and the revocation registry definition name needs to be the same as the credential definition name. Which is currently the case in the implementation.
if (response.resourceState.state !== 'finished') | ||
throw new CredoError(response.resourceState.reason ?? 'Unknown error') | ||
|
||
// It's not possible to get the timestamp from the response, so we set it to the current time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? The timestamp is important for some pieces, so I think we need to get the timestamp is will be used when you resolve the status list (then we can get the timestamp using response.resourceMetadata.created.getTime()?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cheqd sdk currently doesn't return the creation date when you create a new resource, but it's returned when you are querying a resource. So the only way is to query it just after creation? Also when you look at the raw response of the cheqd sdk of the creation it doesn't return a creation.
But for fetching the statuslist it only needs a timestamp which is close to the resource it doesn't really have to be exact.
So what do you think we should do in this case?
…e test Signed-off-by: Tom Lanser <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
The implementation is based on the logic described in the cheqd documentation about the registry and the status list https://docs.cheqd.io/product/advanced/anoncreds/revocation-status-list#tying-creddef-revregdef-and-statuslist-objects-together