aries_cloudagent.revocation.models package


aries_cloudagent.revocation.models.indy module

Indy utilities for revocation.

class aries_cloudagent.revocation.models.indy.NonRevocationInterval(fro: Optional[int] = None, to: Optional[int] = None, **kwargs)[source]

Bases: BaseModel

Indy non-revocation interval.

class Meta[source]

Bases: object

NonRevocationInterval metadata.

schema_class = 'NonRevocationIntervalSchema'
covers(timestamp: Optional[int] = None) bool[source]

Whether input timestamp (default now) lies within non-revocation interval.


timestamp – time of interest


whether input time satisfies non-revocation interval

timestamp() bool[source]

Return a timestamp that the non-revocation interval covers.

class aries_cloudagent.revocation.models.indy.NonRevocationIntervalSchema(*args: Any, **kwargs: Any)[source]

Bases: BaseModelSchema

Schema to allow serialization/deserialization of non-revocation intervals.

class Meta[source]

Bases: object

NonRevocationIntervalSchema metadata.


alias of NonRevocationInterval

aries_cloudagent.revocation.models.issuer_cred_rev_record module

Issuer credential revocation information.

class aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecord(*, record_id: Optional[str] = None, state: Optional[str] = None, cred_ex_id: Optional[str] = None, rev_reg_id: Optional[str] = None, cred_rev_id: Optional[str] = None, cred_def_id: Optional[str] = None, cred_ex_version: Optional[str] = None, **kwargs)[source]

Bases: BaseRecord

Represents credential revocation information to retain post-issue.

class Meta[source]

Bases: object

IssuerCredRevRecord metadata.

schema_class = 'IssuerCredRevRecordSchema'
RECORD_ID_NAME = 'record_id'
RECORD_TOPIC: Optional[str] = 'issuer_cred_rev'
RECORD_TYPE = 'issuer_cred_rev'
STATE_ISSUED = 'issued'
STATE_REVOKED = 'revoked'
TAG_NAMES = {'cred_def_id', 'cred_ex_id', 'cred_ex_version', 'cred_rev_id', 'rev_reg_id', 'state'}
VERSION_1 = '1'
VERSION_2 = '2'
async classmethod query_by_ids(session: ProfileSession, *, cred_def_id: Optional[str] = None, rev_reg_id: Optional[str] = None, state: Optional[str] = None) Sequence[IssuerCredRevRecord][source]

Retrieve issuer cred rev records by cred def id and/or rev reg id.

  • session – the profile session to use

  • cred_def_id – the cred def id by which to filter

  • rev_reg_id – the rev reg id by which to filter

  • state – a state value by which to filter

property record_id: str

Accessor for the ID associated with this exchange.

async classmethod retrieve_by_cred_ex_id(session: ProfileSession, cred_ex_id: str) IssuerCredRevRecord[source]

Retrieve an issuer cred rev record by rev reg id and cred rev id.

async classmethod retrieve_by_ids(session: ProfileSession, rev_reg_id: str, cred_rev_id: str, *, for_update: bool = False) IssuerCredRevRecord[source]

Retrieve an issuer cred rev record by rev reg id and cred rev id.

async set_state(session: ProfileSession, state: Optional[str] = None)[source]

Change the issuer cred rev record state (default issued).

class aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecordSchema(*args: Any, **kwargs: Any)[source]

Bases: BaseRecordSchema

Schema to allow de/serialization of credential revocation records.

class Meta[source]

Bases: object

IssuerCredRevRecordSchema metadata.


alias of IssuerCredRevRecord

aries_cloudagent.revocation.models.issuer_rev_reg_record module

aries_cloudagent.revocation.models.revocation_registry module

Classes for managing a revocation registry.

class aries_cloudagent.revocation.models.revocation_registry.RevocationRegistry(registry_id: Optional[str] = None, *, cred_def_id: Optional[str] = None, issuer_did: Optional[str] = None, max_creds: Optional[int] = None, reg_def_type: Optional[str] = None, tag: Optional[str] = None, tails_local_path: Optional[str] = None, tails_public_uri: Optional[str] = None, tails_hash: Optional[str] = None, reg_def: Optional[dict] = None)[source]

Bases: object

Manage a revocation registry and tails file.

MAX_SIZE = 32768
property cred_def_id: str

Accessor for the credential definition ID.

classmethod from_definition(revoc_reg_def: dict, public_def: bool) RevocationRegistry[source]

Initialize a revocation registry instance from a definition.

async get_or_fetch_local_tails_path()[source]

Get the local tails path, retrieving from the remote if necessary.


Make the local path to the tails file we download from remote URI.

has_local_tails_file() bool[source]

Test if the tails file exists locally.

property issuer_did: str

Accessor for the issuer DID.

property max_creds: int

Accessor for the maximum number of issued credentials.

property reg_def: dict

Accessor for the revocation registry definition.

property reg_def_type: str

Accessor for the revocation registry type.

property registry_id: str

Accessor for the revocation registry ID.

async retrieve_tails()[source]

Fetch the tails file from the public URI.

property tag: str

Accessor for the tag part of the revoc. reg. ID.

property tails_hash: str

Accessor for the tails file hash.

property tails_local_path: str

Accessor for the tails file local path.

property tails_public_uri: str

Accessor for the tails file public URI.