aries_cloudagent.protocols.issue_credential.v2_0.models package

Package-wide code and data.

Subpackages

Submodules

aries_cloudagent.protocols.issue_credential.v2_0.models.cred_ex_record module

Aries#0453 v2.0 credential exchange information with non-secrets storage.

class aries_cloudagent.protocols.issue_credential.v2_0.models.cred_ex_record.V20CredExRecord(*, cred_ex_id: Optional[str] = None, connection_id: Optional[str] = None, verification_method: Optional[str] = None, thread_id: Optional[str] = None, parent_thread_id: Optional[str] = None, initiator: Optional[str] = None, role: Optional[str] = None, state: Optional[str] = None, cred_proposal: Optional[Union[Mapping, V20CredProposal]] = None, cred_offer: Optional[Union[Mapping, V20CredOffer]] = None, cred_request: Optional[Union[Mapping, V20CredRequest]] = None, cred_issue: Optional[Union[Mapping, V20CredIssue]] = None, auto_offer: bool = False, auto_issue: bool = False, auto_remove: bool = True, error_msg: Optional[str] = None, trace: bool = False, cred_id_stored: Optional[str] = None, conn_id: Optional[str] = None, by_format: Optional[Mapping] = None, **kwargs)[source]

Bases: BaseExchangeRecord

Represents an Aries#0036 credential exchange.

INITIATOR_EXTERNAL = 'external'
INITIATOR_SELF = 'self'
class Meta[source]

Bases: object

CredentialExchange metadata.

schema_class = 'V20CredExRecordSchema'
RECORD_ID_NAME = 'cred_ex_id'
RECORD_TOPIC: Optional[str] = 'issue_credential_v2_0'
RECORD_TYPE = 'cred_ex_v20'
ROLE_HOLDER = 'holder'
ROLE_ISSUER = 'issuer'
STATE_ABANDONED = 'abandoned'
STATE_CREDENTIAL_RECEIVED = 'credential-received'
STATE_CREDENTIAL_REVOKED = 'credential-revoked'
STATE_DONE = 'done'
STATE_ISSUED = 'credential-issued'
STATE_OFFER_RECEIVED = 'offer-received'
STATE_OFFER_SENT = 'offer-sent'
STATE_PROPOSAL_RECEIVED = 'proposal-received'
STATE_PROPOSAL_SENT = 'proposal-sent'
STATE_REQUEST_RECEIVED = 'request-received'
STATE_REQUEST_SENT = 'request-sent'
TAG_NAMES = {'thread_id'}
property by_format: Mapping

Record proposal, offer, request, and credential attachments by format.

property cred_ex_id: str

Accessor for the ID associated with this exchange.

property cred_issue: V20CredIssue

Accessor; get deserialized view.

property cred_offer: V20CredOffer

Accessor; get deserialized view.

property cred_preview: Mapping

Credential preview (deserialized view) from credential proposal.

property cred_proposal: V20CredProposal

Accessor; get deserialized view.

property cred_request: V20CredRequest

Accessor; get deserialized view.

async emit_event(session: ProfileSession, payload: Optional[Any] = None)[source]

Emit an event.

Parameters
  • session – The profile session to use

  • payload – The event payload

property record_value: Mapping

Accessor for the JSON record value generated for this credential exchange.

async classmethod retrieve_by_conn_and_thread(session: ProfileSession, connection_id: Optional[str], thread_id: str, role: Optional[str] = None) V20CredExRecord[source]

Retrieve a credential exchange record by connection and thread ID.

async save_error_state(session: ProfileSession, *, state: Optional[str] = None, reason: Optional[str] = None, log_params: Optional[Mapping[str, Any]] = None, log_override: bool = False)[source]

Save record error state if need be; log and swallow any storage error.

Parameters
  • session – The profile session to use

  • reason – A reason to add to the log

  • log_params – Additional parameters to log

  • override – Override configured logging regimen, print to stderr instead

class aries_cloudagent.protocols.issue_credential.v2_0.models.cred_ex_record.V20CredExRecordSchema(*args: Any, **kwargs: Any)[source]

Bases: BaseExchangeSchema

Schema to allow serialization/deserialization of credential exchange records.

class Meta[source]

Bases: object

V20CredExSchema metadata.

model_class

alias of V20CredExRecord