aries_cloudagent.storage.vc_holder package¶
Submodules¶
aries_cloudagent.storage.vc_holder.askar module¶
aries_cloudagent.storage.vc_holder.base module¶
Abstract interfaces for VC holder implementations.
-
class
aries_cloudagent.storage.vc_holder.base.IterVCRecordSearch(search: aries_cloudagent.storage.vc_holder.base.VCRecordSearch, page_size: int = None)[source]¶ Bases:
objectA generic record search async iterator.
-
class
aries_cloudagent.storage.vc_holder.base.VCHolder[source]¶ Bases:
abc.ABCAbstract base class for a verifiable credential holder.
-
build_type_or_schema_query(uri_list: Sequence[str]) → dict[source]¶ Build and return backend-specific type_or_schema_query.
Parameters: uri_list – List of schema uri from input_descriptor
-
delete_credential(cred: aries_cloudagent.storage.vc_holder.vc_record.VCRecord)[source]¶ Remove a previously-stored VC record.
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_given_id(given_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its given ID (‘id’ property).
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_id(record_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its record ID.
Raises: StorageNotFoundError– If the record is not found
-
search_credentials(contexts: Sequence[str] = None, types: Sequence[str] = None, schema_ids: Sequence[str] = None, issuer_id: str = None, subject_ids: Sequence[str] = None, proof_types: Sequence[str] = None, given_id: str = None, tag_query: Mapping = None) → aries_cloudagent.storage.vc_holder.base.VCRecordSearch[source]¶ Start a new VC record search.
Parameters: - contexts – An inclusive list of JSON-LD contexts to match
- types – An inclusive list of JSON-LD types to match
- schema_ids – An inclusive list of credential schema identifiers
- issuer_id – The ID of the credential issuer
- subject_ids – The IDs of any credential subjects all of which to match
- proof_types – The signature suite types used for the proof objects.
- given_id – The given id of the credential
- tag_query – A tag filter clause
-
-
class
aries_cloudagent.storage.vc_holder.base.VCRecordSearch[source]¶ Bases:
abc.ABCA VC record search in progress.
-
fetch(max_count: int = None) → Sequence[aries_cloudagent.storage.vc_holder.vc_record.VCRecord][source]¶ Fetch the next list of VC records from the store.
Parameters: max_count – Max number of records to return. If not provided, defaults to the backend’s preferred page size Returns: A list of VCRecord instances
-
aries_cloudagent.storage.vc_holder.in_memory module¶
Basic in-memory storage implementation of VC holder interface.
-
class
aries_cloudagent.storage.vc_holder.in_memory.InMemoryVCHolder(profile: aries_cloudagent.core.in_memory.profile.InMemoryProfile)[source]¶ Bases:
aries_cloudagent.storage.vc_holder.base.VCHolderBasic in-memory storage class.
-
build_type_or_schema_query(uri_list: Sequence[str]) → dict[source]¶ Build and return in-memory backend specific type_or_schema_query.
-
delete_credential(cred: aries_cloudagent.storage.vc_holder.vc_record.VCRecord)[source]¶ Remove a previously-stored VC record.
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_given_id(given_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its given ID (‘id’ property).
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_id(record_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its record ID.
Raises: StorageNotFoundError– If the record is not found
-
search_credentials(contexts: Sequence[str] = None, types: Sequence[str] = None, schema_ids: str = None, issuer_id: str = None, subject_ids: str = None, proof_types: Sequence[str] = None, given_id: str = None, tag_query: Mapping = None, pd_uri_list: Sequence[str] = None) → aries_cloudagent.storage.vc_holder.base.VCRecordSearch[source]¶ Start a new VC record search.
Parameters: - contexts – An inclusive list of JSON-LD contexts to match
- types – An inclusive list of JSON-LD types to match
- schema_ids – An inclusive list of credential schema identifiers
- issuer_id – The ID of the credential issuer
- subject_ids – The IDs of credential subjects all of which to match
- proof_types – The signature suite types used for the proof objects.
- given_id – The given id of the credential
- tag_query – A tag filter clause
-
-
class
aries_cloudagent.storage.vc_holder.in_memory.InMemoryVCRecordSearch(search: aries_cloudagent.storage.in_memory.InMemoryStorageSearch)[source]¶ Bases:
aries_cloudagent.storage.vc_holder.base.VCRecordSearchIn-memory search for VC records.
-
fetch(max_count: int = None) → Sequence[aries_cloudagent.storage.vc_holder.vc_record.VCRecord][source]¶ Fetch the next list of VC records from the store.
Parameters: max_count – Max number of records to return. If not provided, defaults to the backend’s preferred page size Returns: A list of VCRecord instances
-
aries_cloudagent.storage.vc_holder.indy module¶
Indy-SDK storage implementation of VC holder interface.
-
class
aries_cloudagent.storage.vc_holder.indy.IndySdkVCHolder(wallet: aries_cloudagent.indy.sdk.wallet_setup.IndyOpenWallet)[source]¶ Bases:
aries_cloudagent.storage.vc_holder.base.VCHolderIndy-SDK storage class.
-
build_type_or_schema_query(uri_list: Sequence[str]) → dict[source]¶ Build and return indy-specific type_or_schema_query.
-
delete_credential(cred: aries_cloudagent.storage.vc_holder.vc_record.VCRecord)[source]¶ Remove a previously-stored VC record.
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_given_id(given_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its given ID (‘id’ property).
Raises: StorageNotFoundError– If the record is not found
-
retrieve_credential_by_id(record_id: str) → aries_cloudagent.storage.vc_holder.vc_record.VCRecord[source]¶ Fetch a VC record by its record ID.
Raises: StorageNotFoundError– If the record is not found
-
search_credentials(contexts: Sequence[str] = None, types: Sequence[str] = None, schema_ids: Sequence[str] = None, issuer_id: str = None, subject_ids: str = None, proof_types: Sequence[str] = None, given_id: str = None, tag_query: Mapping = None, pd_uri_list: Sequence[str] = None) → aries_cloudagent.storage.vc_holder.base.VCRecordSearch[source]¶ Start a new VC record search.
Parameters: - contexts – An inclusive list of JSON-LD contexts to match
- types – An inclusive list of JSON-LD types to match
- schema_ids – An inclusive list of credential schema identifiers
- issuer_id – The ID of the credential issuer
- subject_ids – The IDs of credential subjects all of which to match
- proof_types – The signature suite types used for the proof objects.
- given_id – The given id of the credential
- tag_query – A tag filter clause
-
-
class
aries_cloudagent.storage.vc_holder.indy.IndySdkVCRecordSearch(search: aries_cloudagent.storage.indy.IndySdkStorageSearch)[source]¶ Bases:
aries_cloudagent.storage.vc_holder.base.VCRecordSearchIndy-SDK storage search for VC records.
-
fetch(max_count: int = None) → Sequence[aries_cloudagent.storage.vc_holder.vc_record.VCRecord][source]¶ Fetch the next list of VC records from the store.
Parameters: max_count – Max number of records to return. If not provided, defaults to the backend’s preferred page size Returns: A list of VCRecord instances
-
aries_cloudagent.storage.vc_holder.vc_record module¶
Model for representing a stored verifiable credential.
-
class
aries_cloudagent.storage.vc_holder.vc_record.VCRecord(*, contexts: Sequence[str], expanded_types: Sequence[str], issuer_id: str, subject_ids: Sequence[str], schema_ids: Sequence[str], proof_types: Sequence[str], cred_value: Mapping, given_id: str = None, cred_tags: Mapping = None, record_id: str = None)[source]¶ Bases:
aries_cloudagent.messaging.models.base.BaseModelVerifiable credential storage record class.
-
class
aries_cloudagent.storage.vc_holder.vc_record.VCRecordSchema(*args, **kwargs)[source]¶ Bases:
aries_cloudagent.messaging.models.base.BaseModelSchemaVerifiable credential storage record schema class.
-
class
Meta[source]¶ Bases:
objectVerifiable credential storage record schema metadata.
-
unknown¶ Used by autodoc_mock_imports.
-
-
contexts¶ Used by autodoc_mock_imports.
Used by autodoc_mock_imports.
-
cred_value¶ Used by autodoc_mock_imports.
-
expanded_types¶ Used by autodoc_mock_imports.
-
given_id¶ Used by autodoc_mock_imports.
-
issuer_id¶ Used by autodoc_mock_imports.
-
proof_types¶ Used by autodoc_mock_imports.
-
record_id¶ Used by autodoc_mock_imports.
-
schema_ids¶ Used by autodoc_mock_imports.
-
subject_ids¶ Used by autodoc_mock_imports.
-
class
aries_cloudagent.storage.vc_holder.xform module¶
Transformation between StorageRecord and VCRecord.