aries_cloudagent.protocols.present_proof.v2_0.models package

Package-wide data and code.

Submodules

aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange module

Presentation exchange record.

class aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord(*, pres_ex_id: Optional[str] = None, connection_id: Optional[str] = None, thread_id: Optional[str] = None, initiator: Optional[str] = None, role: Optional[str] = None, state: Optional[str] = None, pres_proposal: Optional[Union[V20PresProposal, Mapping]] = None, pres_request: Optional[Union[V20PresRequest, Mapping]] = None, pres: Optional[Union[V20Pres, Mapping]] = None, verified: Optional[str] = None, verified_msgs: Optional[list] = None, auto_present: bool = False, auto_verify: bool = False, error_msg: Optional[str] = None, trace: bool = False, by_format: Optional[Mapping] = None, auto_remove: bool = False, **kwargs)[source]

Bases: BaseExchangeRecord

Represents a v2.0 presentation exchange.

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

Bases: object

V20PresExRecord metadata.

schema_class = 'V20PresExRecordSchema'
RECORD_ID_NAME = 'pres_ex_id'
RECORD_TOPIC: Optional[str] = 'present_proof_v2_0'
RECORD_TYPE = 'pres_ex_v20'
ROLE_PROVER = 'prover'
ROLE_VERIFIER = 'verifier'
STATE_ABANDONED = 'abandoned'
STATE_DONE = 'done'
STATE_PRESENTATION_RECEIVED = 'presentation-received'
STATE_PRESENTATION_SENT = 'presentation-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, request, and presentation attachments by format.

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 pres: V20Pres

Accessor; get deserialized view.

property pres_ex_id: str

Accessor for the ID associated with this exchange record.

property pres_proposal: V20PresProposal

Accessor; get deserialized view.

property pres_request: V20PresRequest

Accessor; get deserialized view.

property record_value: Mapping

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

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.present_proof.v2_0.models.pres_exchange.V20PresExRecordSchema(*args: Any, **kwargs: Any)[source]

Bases: BaseExchangeSchema

Schema for de/serialization of v2.0 presentation exchange records.

class Meta[source]

Bases: object

V20PresExRecordSchema metadata.

model_class

alias of V20PresExRecord