aries_cloudagent.revocation.models package¶
Submodules¶
aries_cloudagent.revocation.models.indy module¶
Indy utilities for revocation.
-
class
aries_cloudagent.revocation.models.indy.NonRevocationInterval(fro: int = None, to: int = None, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base.BaseModelIndy non-revocation interval.
-
class
Meta[source]¶ Bases:
objectNonRevocationInterval metadata.
-
schema_class= 'NonRevocationIntervalSchema'¶
-
-
class
-
class
aries_cloudagent.revocation.models.indy.NonRevocationIntervalSchema(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base.BaseModelSchemaSchema to allow serialization/deserialization of non-revocation intervals.
-
class
Meta[source]¶ Bases:
objectNonRevocationIntervalSchema metadata.
-
model_class¶ alias of
NonRevocationInterval
-
-
fro¶ Used by autodoc_mock_imports.
-
to¶ Used by autodoc_mock_imports.
-
class
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: str = None, state: str = None, cred_ex_id: str = None, rev_reg_id: str = None, cred_rev_id: str = None, cred_def_id: str = None, cred_ex_version: str = None, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base_record.BaseRecordRepresents credential revocation information to retain post-issue.
-
class
Meta[source]¶ Bases:
objectIssuerCredRevRecord metadata.
-
schema_class= 'IssuerCredRevRecordSchema'¶
-
-
RECORD_ID_NAME= 'record_id'¶
-
RECORD_TOPIC= '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'¶
-
classmethod
query_by_ids(session: aries_cloudagent.core.profile.ProfileSession, *, cred_def_id: str = None, rev_reg_id: str = None, state: str = None) → Sequence[aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecord][source]¶ Retrieve issuer cred rev records by cred def id and/or rev reg id.
Parameters: - 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
-
record_id¶ Accessor for the ID associated with this exchange.
-
classmethod
retrieve_by_cred_ex_id(session: aries_cloudagent.core.profile.ProfileSession, cred_ex_id: str) → aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecord[source]¶ Retrieve an issuer cred rev record by rev reg id and cred rev id.
-
classmethod
retrieve_by_ids(session: aries_cloudagent.core.profile.ProfileSession, rev_reg_id: str, cred_rev_id: str, *, for_update: bool = False) → aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecord[source]¶ Retrieve an issuer cred rev record by rev reg id and cred rev id.
-
class
-
class
aries_cloudagent.revocation.models.issuer_cred_rev_record.IssuerCredRevRecordSchema(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base_record.BaseRecordSchemaSchema to allow de/serialization of credential revocation records.
-
class
Meta[source]¶ Bases:
objectIssuerCredRevRecordSchema metadata.
-
model_class¶ alias of
IssuerCredRevRecord
-
-
cred_def_id¶ Used by autodoc_mock_imports.
-
cred_ex_id¶ Used by autodoc_mock_imports.
-
cred_ex_version¶ Used by autodoc_mock_imports.
-
cred_rev_id¶ Used by autodoc_mock_imports.
-
record_id¶ Used by autodoc_mock_imports.
-
rev_reg_id¶ Used by autodoc_mock_imports.
-
state¶ Used by autodoc_mock_imports.
-
class
aries_cloudagent.revocation.models.issuer_rev_reg_record module¶
Issuer revocation registry storage handling.
-
class
aries_cloudagent.revocation.models.issuer_rev_reg_record.IssuerRevRegRecord(*, record_id: str = None, state: str = None, cred_def_id: str = None, error_msg: str = None, issuer_did: str = None, max_cred_num: int = None, revoc_def_type: str = None, revoc_reg_id: str = None, revoc_reg_def: Union[aries_cloudagent.indy.models.revocation.IndyRevRegDef, Mapping] = None, revoc_reg_entry: Union[aries_cloudagent.indy.models.revocation.IndyRevRegEntry, Mapping] = None, tag: str = None, tails_hash: str = None, tails_local_path: str = None, tails_public_uri: str = None, pending_pub: Sequence[str] = None, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base_record.BaseRecordClass for managing local issuing revocation registries.
-
LOG_STATE_FLAG= 'debug.revocation'¶
-
class
Meta[source]¶ Bases:
objectIssuerRevRegRecord metadata.
-
schema_class= 'IssuerRevRegRecordSchema'¶
-
-
RECORD_ID_NAME= 'record_id'¶
-
RECORD_TOPIC= 'revocation_registry'¶
-
RECORD_TYPE= 'issuer_rev_reg'¶
-
REVOC_DEF_TYPE_CL= 'CL_ACCUM'¶
-
STATE_ACTIVE= 'active'¶
-
STATE_FULL= 'full'¶
-
STATE_GENERATED= 'generated'¶
-
STATE_INIT= 'init'¶
-
STATE_POSTED= 'posted'¶
-
TAG_NAMES= {'cred_def_id', 'issuer_did', 'revoc_def_type', 'revoc_reg_id', 'state'}¶
-
clear_pending(session: aries_cloudagent.core.profile.ProfileSession, cred_rev_ids: Sequence[str] = None) → None[source]¶ Clear pending revocations and save any resulting record change.
Parameters: - session – The profile session to use
- cred_rev_ids – Credential revocation identifiers to clear; default all
-
fix_ledger_entry(profile: aries_cloudagent.core.profile.Profile, apply_ledger_update: bool, genesis_transactions: str) → Tuple[dict, dict, dict][source]¶ Fix the ledger entry to match wallet-recorded credentials.
-
generate_registry(profile: aries_cloudagent.core.profile.Profile)[source]¶ Create the revocation registry definition and tails file.
-
get_registry() → aries_cloudagent.revocation.models.revocation_registry.RevocationRegistry[source]¶ Create a RevocationRegistry instance from this record.
-
has_local_tails_file¶ Check if a local copy of the tails file is available.
-
mark_pending(session: aries_cloudagent.core.profile.ProfileSession, cred_rev_id: str) → None[source]¶ Mark a credential revocation id as revoked pending publication to ledger.
Parameters: - session – The profile session to use
- cred_rev_id – The credential revocation identifier for credential to revoke
-
classmethod
query_by_cred_def_id(session: aries_cloudagent.core.profile.ProfileSession, cred_def_id: str, state: str = None) → Sequence[aries_cloudagent.revocation.models.issuer_rev_reg_record.IssuerRevRegRecord][source]¶ Retrieve issuer revocation registry records by credential definition ID.
Parameters: - session – The profile session to use
- cred_def_id – The credential definition ID to filter by
- state – A state value to filter by
-
classmethod
query_by_pending(session: aries_cloudagent.core.profile.ProfileSession) → Sequence[aries_cloudagent.revocation.models.issuer_rev_reg_record.IssuerRevRegRecord][source]¶ Retrieve issuer revocation records with revocations pending.
Parameters: session – The profile session to use
-
record_id¶ Accessor for the record ID.
-
record_value¶ Accessor for JSON value properties of this revocation registry record.
-
classmethod
retrieve_by_revoc_reg_id(session: aries_cloudagent.core.profile.ProfileSession, revoc_reg_id: str, for_update: bool = False) → aries_cloudagent.revocation.models.issuer_rev_reg_record.IssuerRevRegRecord[source]¶ Retrieve a revocation registry record by revocation registry ID.
Parameters: - session – The profile session to use
- revoc_reg_id – The revocation registry ID
- for_update – Retrieve for update
-
revoc_reg_def¶ Accessor; get deserialized.
-
revoc_reg_entry¶ Accessor; get deserialized.
-
send_def(profile: aries_cloudagent.core.profile.Profile, write_ledger: bool = True, endorser_did: str = None) → dict[source]¶ Send the revocation registry definition to the ledger.
-
send_entry(profile: aries_cloudagent.core.profile.Profile, write_ledger: bool = True, endorser_did: str = None) → dict[source]¶ Send a registry entry to the ledger.
-
set_state(session: aries_cloudagent.core.profile.ProfileSession, state: str = None)[source]¶ Change the registry state (default full).
-
-
class
aries_cloudagent.revocation.models.issuer_rev_reg_record.IssuerRevRegRecordSchema(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base_record.BaseRecordSchemaSchema to allow serialization/deserialization of issuer rev reg records.
-
class
Meta[source]¶ Bases:
objectIssuerRevRegRecordSchema metadata.
-
model_class¶ alias of
IssuerRevRegRecord
-
-
cred_def_id¶ Used by autodoc_mock_imports.
-
error_msg¶ Used by autodoc_mock_imports.
-
issuer_did¶ Used by autodoc_mock_imports.
-
max_cred_num¶ Used by autodoc_mock_imports.
-
pending_pub¶ Used by autodoc_mock_imports.
-
record_id¶ Used by autodoc_mock_imports.
-
revoc_def_type¶ Used by autodoc_mock_imports.
-
revoc_reg_def¶ Used by autodoc_mock_imports.
-
revoc_reg_entry¶ Used by autodoc_mock_imports.
-
revoc_reg_id¶ Used by autodoc_mock_imports.
-
state¶ Used by autodoc_mock_imports.
-
tag¶ Used by autodoc_mock_imports.
-
tails_hash¶ Used by autodoc_mock_imports.
-
tails_local_path¶ Used by autodoc_mock_imports.
-
tails_public_uri¶ Used by autodoc_mock_imports.
-
class
aries_cloudagent.revocation.models.revocation_registry module¶
Classes for managing a revocation registry.
-
class
aries_cloudagent.revocation.models.revocation_registry.RevocationRegistry(registry_id: str = None, *, cred_def_id: str = None, issuer_did: str = None, max_creds: int = None, reg_def_type: str = None, tag: str = None, tails_local_path: str = None, tails_public_uri: str = None, tails_hash: str = None, reg_def: dict = None)[source]¶ Bases:
objectManage a revocation registry and tails file.
-
MAX_SIZE= 32768¶
-
MIN_SIZE= 4¶
-
cred_def_id¶ Accessor for the credential definition ID.
-
classmethod
from_definition(revoc_reg_def: dict, public_def: bool) → aries_cloudagent.revocation.models.revocation_registry.RevocationRegistry[source]¶ Initialize a revocation registry instance from a definition.
-
get_or_fetch_local_tails_path()[source]¶ Get the local tails path, retrieving from the remote if necessary.
-
get_receiving_tails_local_path()[source]¶ Make the local path to the tails file we download from remote URI.
-
issuer_did¶ Accessor for the issuer DID.
-
max_creds¶ Accessor for the maximum number of issued credentials.
-
reg_def¶ Accessor for the revocation registry definition.
-
reg_def_type¶ Accessor for the revocation registry type.
-
registry_id¶ Accessor for the revocation registry ID.
-
tag¶ Accessor for the tag part of the revoc. reg. ID.
-
tails_hash¶ Accessor for the tails file hash.
-
tails_local_path¶ Accessor for the tails file local path.
-
tails_public_uri¶ Accessor for the tails file public URI.
-