Open icc-romeu opened 4 months ago
Hey @icc-romeu,
Sorry for the late reply, i missed your issue.
What you can do is get the credential, extract the revocationRegistryId and fetch the status list (using anoncreds api), then look up the index of the credential (revocationIndex i think) in the status list.
We could also add a convenience method for this
Thx for the reply @TimoGlastra. Because if you miss the revocation notification, credential seems to be ok, but it's not.
I think it would be awesome to create a convenience method for it. In the meantime, I will do as suggested.
For the sake of completion, just in case someone wants to do the same, this is what I am doing. Not 100% sure it is ok but it works on my side for Anoncreds:
const credential = await agent.credentials.getById(id);
const meta: Metadata<AnonCredsCredentialMetadata> = credential.metadata;
const rev = meta.data['_anoncreds/credential'];
const revocationRegistryId = rev.revocationRegistryId;
const credentialRevocationId = rev.credentialRevocationId;
const revocationStatus = await fetchRevocationStatusList(
agent.context,
revocationRegistryId,
dayjs().unix(),
);
Thanks for the example, I've reopened the issue as a feature request so we can add a method to the AnonCredsApi
Hi,
I was wondering whether there is some way of getting the revocation status of an Indy credential. I saw there is a
revocationNotification
in theCredentialExchangeRecord
attributes but, is there an option to actively check whether a credential has been revoked?