aries_cloudagent.protocols.issue_credential.v2_0.formats package

Subpackages

Submodules

aries_cloudagent.protocols.issue_credential.v2_0.formats.handler module

V2.0 issue-credential base credential format handler.

exception aries_cloudagent.protocols.issue_credential.v2_0.formats.handler.V20CredFormatError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: BaseError

Credential format error under issue-credential protocol v2.0.

class aries_cloudagent.protocols.issue_credential.v2_0.formats.handler.V20CredFormatHandler(profile: Profile)[source]

Bases: ABC

Base credential format handler.

can_receive_request_without_offer() bool[source]

Can this handler receive credential request without an offer?

abstract async create_offer(cred_proposal_message: V20CredProposal) Tuple[V20CredFormat, AttachDecorator][source]

Create format specific credential offer attachment data.

abstract async create_proposal(cred_ex_record: V20CredExRecord, proposal_data: Mapping) Tuple[V20CredFormat, AttachDecorator][source]

Create format specific credential proposal attachment data.

abstract async create_request(cred_ex_record: V20CredExRecord, request_data: Optional[Mapping] = None) Tuple[V20CredFormat, AttachDecorator][source]

Create format specific credential request attachment data.

format: Format = None
abstract get_format_data(message_type: str, data: dict) Tuple[V20CredFormat, AttachDecorator][source]

Get credential format and attachment objects for use in cred ex messages.

abstract 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

abstract async issue_credential(cred_ex_record: V20CredExRecord, retries: int = 5) Tuple[V20CredFormat, AttachDecorator][source]

Create format specific issue credential attachment data.

property profile: Profile

Accessor for the current profile instance.

Returns

The profile instance for this credential format

abstract async receive_credential(cred_ex_record: V20CredExRecord, cred_issue_message: V20CredIssue) None[source]

Create format specific issue credential message.

abstract async receive_offer(cred_ex_record: V20CredExRecord, cred_offer_message: V20CredOffer) None[source]

Receive foramt specific credential offer message.

abstract async receive_proposal(cred_ex_record: V20CredExRecord, cred_proposal_message: V20CredProposal) None[source]

Receive format specific credential proposal message.

abstract async receive_request(cred_ex_record: V20CredExRecord, cred_request_message: V20CredRequest) None[source]

Receive format specific credential request message.

abstract async store_credential(cred_ex_record: V20CredExRecord, cred_id: Optional[str] = None) None[source]

Store format specific credential from issue credential message.

abstract classmethod validate_fields(message_type: str, attachment_data: dict) None[source]

Validate attachment data for specific message type and format.