aries_cloudagent.protocols.present_proof.v2_0.formats.indy package

Submodules

aries_cloudagent.protocols.present_proof.v2_0.formats.indy.handler module

V2.0 present-proof indy presentation-exchange format handler.

class aries_cloudagent.protocols.present_proof.v2_0.formats.indy.handler.IndyPresExchangeHandler(profile: aries_cloudagent.core.profile.Profile)[source]

Bases: aries_cloudagent.protocols.present_proof.v2_0.formats.handler.V20PresFormatHandler

Indy presentation format handler.

create_bound_request(pres_ex_record: aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord, request_data: dict = None) → Tuple[aries_cloudagent.protocols.present_proof.v2_0.messages.pres_format.V20PresFormat, aries_cloudagent.messaging.decorators.attach_decorator.AttachDecorator][source]

Create a presentation request bound to a proposal.

Parameters:
  • pres_ex_record – Presentation exchange record for which to create presentation request
  • request_data – Dict
Returns:

A tuple (updated presentation exchange record, presentation request message)

create_pres(pres_ex_record: aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord, request_data: dict = None) → Tuple[aries_cloudagent.protocols.present_proof.v2_0.messages.pres_format.V20PresFormat, aries_cloudagent.messaging.decorators.attach_decorator.AttachDecorator][source]

Create a presentation.

format = FormatSpec(aries='hlindy/', handler=<aries_cloudagent.utils.classloader.DeferLoad object>)
get_format_data(message_type: str, data: dict) → Tuple[aries_cloudagent.protocols.present_proof.v2_0.messages.pres_format.V20PresFormat, aries_cloudagent.messaging.decorators.attach_decorator.AttachDecorator][source]

Get presentation format and attach objects for use in pres_ex messages.

get_format_identifier(message_type: str) → str[source]

Get attachment format identifier for format and message combination.

Parameters:message_type (str) – Message type for which to return the format identifier
Returns:Issue credential attachment format identifier
Return type:str
receive_pres(message: aries_cloudagent.protocols.present_proof.v2_0.messages.pres.V20Pres, pres_ex_record: aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord)[source]

Receive a presentation and check for presented values vs. proposal request.

classmethod validate_fields(message_type: str, attachment_data: Mapping)[source]

Validate attachment data for a specific message type.

Uses marshmallow schemas to validate if format specific attachment data is valid for the specified message type. Only does structural and type checks, does not validate if .e.g. the issuer value is valid.

Parameters:
  • message_type (str) – The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py
  • attachment_data (Mapping) – [description] The attachment data to valide
Raises:

Exception – When the data is not valid.

verify_pres(pres_ex_record: aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord) → aries_cloudagent.protocols.present_proof.v2_0.models.pres_exchange.V20PresExRecord[source]

Verify a presentation.

Parameters:pres_ex_record – presentation exchange record with presentation request and presentation to verify
Returns:presentation exchange record, updated