aries_cloudagent.protocols.present_proof.v1_0.models package

Package-wide data and code.

Submodules

aries_cloudagent.protocols.present_proof.v1_0.models.presentation_exchange module

Aries#0037 v1.0 presentation exchange information with non-secrets storage.

class aries_cloudagent.protocols.present_proof.v1_0.models.presentation_exchange.V10PresentationExchange(*, presentation_exchange_id: str = None, connection_id: str = None, thread_id: str = None, initiator: str = None, role: str = None, state: str = None, presentation_proposal_dict: Union[aries_cloudagent.protocols.present_proof.v1_0.messages.presentation_proposal.PresentationProposal, Mapping[KT, VT_co]] = None, presentation_request: Union[aries_cloudagent.indy.models.proof_request.IndyProofRequest, Mapping[KT, VT_co]] = None, presentation_request_dict: Union[aries_cloudagent.protocols.present_proof.v1_0.messages.presentation_request.PresentationRequest, Mapping[KT, VT_co]] = None, presentation: Union[aries_cloudagent.indy.models.proof.IndyProof, Mapping[KT, VT_co]] = None, verified: str = None, auto_present: bool = False, error_msg: str = None, trace: bool = False, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.base_record.BaseExchangeRecord

Represents an Aries#0037 v1.0 presentation exchange.

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

Bases: object

V10PresentationExchange metadata.

schema_class = 'V10PresentationExchangeSchema'
RECORD_ID_NAME = 'presentation_exchange_id'
RECORD_TOPIC = 'present_proof'
RECORD_TYPE = 'presentation_exchange_v10'
ROLE_PROVER = 'prover'
ROLE_VERIFIER = 'verifier'
STATE_PRESENTATION_ACKED = 'presentation_acked'
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'
STATE_VERIFIED = 'verified'
TAG_NAMES = {'thread_id'}
presentation

Accessor; get deserialized view.

presentation_exchange_id

Accessor for the ID associated with this exchange.

presentation_proposal_dict

Accessor; get deserialized view.

presentation_request

Accessor; get deserialized view.

presentation_request_dict

Accessor; get deserialized view.

record_value

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

save_error_state(session: aries_cloudagent.core.profile.ProfileSession, *, reason: str = None, log_params: 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.v1_0.models.presentation_exchange.V10PresentationExchangeSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.base_record.BaseExchangeSchema

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

class Meta[source]

Bases: object

V10PresentationExchangeSchema metadata.

model_class

alias of V10PresentationExchange

auto_present = <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>
connection_id = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
error_msg = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
initiator = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<OneOf(choices=['self', 'external'], labels=[], error='Must be one of: {choices}.')>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
presentation = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
presentation_exchange_id = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
presentation_proposal_dict = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
presentation_request = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
presentation_request_dict = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
role = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<OneOf(choices=['prover', 'verifier'], labels=[], error='Must be one of: {choices}.')>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
state = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
thread_id = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
verified = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<OneOf(choices=['true', 'false'], labels=[], error='Must be one of: {choices}.')>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>