acapy_agent.storage.vc_holder package
Submodules
acapy_agent.storage.vc_holder.askar module
acapy_agent.storage.vc_holder.base module
Abstract interfaces for VC holder implementations.
- class acapy_agent.storage.vc_holder.base.IterVCRecordSearch(search: VCRecordSearch, page_size: int | None = None)[source]
Bases:
objectA generic record search async iterator.
- class acapy_agent.storage.vc_holder.base.VCHolder[source]
Bases:
ABCAbstract base class for a verifiable credential holder.
- abstractmethod 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
- abstractmethod async delete_credential(cred: VCRecord)[source]
Remove a previously-stored VC record.
- Raises:
StorageNotFoundError – If the record is not found
- abstractmethod async retrieve_credential_by_given_id(given_id: str) VCRecord[source]
Fetch a VC record by its given ID (‘id’ property).
- Raises:
StorageNotFoundError – If the record is not found
- abstractmethod async retrieve_credential_by_id(record_id: str) VCRecord[source]
Fetch a VC record by its record ID.
- Raises:
StorageNotFoundError – If the record is not found
- abstractmethod search_credentials(contexts: Sequence[str] = None, types: Sequence[str] = None, schema_ids: Sequence[str] = None, issuer_id: str | None = None, subject_ids: Sequence[str] = None, proof_types: Sequence[str] = None, given_id: str | None = None, tag_query: Mapping | None = None) 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
acapy_agent.storage.vc_holder.kanon module
Kanon storage implementation of VC holder interface.
- class acapy_agent.storage.vc_holder.kanon.KanonVCHolder(profile: Profile)[source]
Bases:
VCHolderKanon VC record storage class.
- build_type_or_schema_query(uri_list: Sequence[str]) dict[source]
Build and return indy-specific type_or_schema_query.
- async delete_credential(cred: VCRecord)[source]
Remove a previously-stored VC record.
- Raises:
StorageNotFoundError – If the record is not found
- async retrieve_credential_by_given_id(given_id: str) VCRecord[source]
Fetch a VC record by its given ID (‘id’ property).
- Raises:
StorageNotFoundError – If the record is not found
- async retrieve_credential_by_id(record_id: str) 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 = None, subject_ids: str | None = None, proof_types: Sequence[str] = None, given_id: str | None = None, tag_query: Mapping | None = None, pd_uri_list: Sequence[str] = None) 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
pd_uri_list – A list of presentation definition URIs to match
- class acapy_agent.storage.vc_holder.kanon.KanonVCRecordSearch(search: KanonStorageSearchSession)[source]
Bases:
VCRecordSearchKanon storage search for VC records.
- acapy_agent.storage.vc_holder.kanon.storage_to_vc_record(record: StorageRecord) VCRecord[source]
Convert an Kanon stored record into a VC record.
- acapy_agent.storage.vc_holder.kanon.vc_to_storage_record(cred: VCRecord) StorageRecord[source]
Convert a VC record into an Kanon stored record.
acapy_agent.storage.vc_holder.vc_record module
Model for representing a stored verifiable credential.
- class acapy_agent.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 = None, cred_tags: Mapping | None = None, record_id: str | None = None)[source]
Bases:
BaseModelVerifiable credential storage record class.
acapy_agent.storage.vc_holder.xform module
Transformation between StorageRecord and VCRecord.
- acapy_agent.storage.vc_holder.xform.storage_to_vc_record(record: StorageRecord) VCRecord[source]
Convert an Indy-SDK stored record into a VC record.
- acapy_agent.storage.vc_holder.xform.vc_to_storage_record(cred: VCRecord) StorageRecord[source]
Convert a VC record into an in-memory stored record.