aries_cloudagent.protocols.issue_credential.v1_0.models package

Package-wide code and data.


aries_cloudagent.protocols.issue_credential.v1_0.models.credential_exchange module

Aries#0036 v1.0 credential exchange information with non-secrets storage.

class aries_cloudagent.protocols.issue_credential.v1_0.models.credential_exchange.V10CredentialExchange(*, credential_exchange_id: Optional[str] = None, connection_id: 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, credential_definition_id: Optional[str] = None, schema_id: Optional[str] = None, credential_proposal_dict: Optional[Union[Mapping, CredentialProposal]] = None, credential_offer_dict: Optional[Union[Mapping, CredentialOffer]] = None, credential_offer: Optional[Union[Mapping, IndyCredAbstract]] = None, credential_request: Optional[Union[Mapping, IndyCredRequest]] = None, credential_request_metadata: Optional[Mapping] = None, credential_id: Optional[str] = None, raw_credential: Optional[Union[Mapping, IndyCredential]] = None, credential: Optional[Union[Mapping, IndyCredInfo]] = None, revoc_reg_id: Optional[str] = None, revocation_id: Optional[str] = None, auto_offer: bool = False, auto_issue: bool = False, auto_remove: bool = True, error_msg: Optional[str] = None, trace: bool = False, **kwargs)[source]

Bases: BaseExchangeRecord

Represents an Aries#0036 credential exchange.

class Meta[source]

Bases: object

CredentialExchange metadata.

schema_class = 'V10CredentialExchangeSchema'
RECORD_ID_NAME = 'credential_exchange_id'
RECORD_TOPIC: Optional[str] = 'issue_credential'
RECORD_TYPE = 'credential_exchange_v10'
ROLE_HOLDER = 'holder'
ROLE_ISSUER = 'issuer'
STATE_ABANDONED = 'abandoned'
STATE_ACKED = 'credential_acked'
STATE_CREDENTIAL_RECEIVED = 'credential_received'
STATE_CREDENTIAL_REVOKED = 'credential_revoked'
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 credential: IndyCredInfo

Accessor; get deserialized view.

property credential_exchange_id: str

Accessor for the ID associated with this exchange.

property credential_offer: IndyCredAbstract

Accessor; get deserialized view.

property credential_offer_dict: CredentialOffer

Accessor; get deserialized view.

property credential_proposal_dict: CredentialProposal

Accessor; get deserialized view.

property credential_request: IndyCredRequest

Accessor; get deserialized view.

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

Emit an event.

  • session – The profile session to use

  • payload – The event payload

property raw_credential: IndyCredential

Accessor; get deserialized view.

property record_value: dict

Accessor for the JSON record value generated for this invitation.

async classmethod retrieve_by_connection_and_thread(session: ProfileSession, connection_id: Optional[str], thread_id: str, role: Optional[str] = None, *, for_update=False) V10CredentialExchange[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.

  • 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.v1_0.models.credential_exchange.V10CredentialExchangeSchema(*args: Any, **kwargs: Any)[source]

Bases: BaseExchangeSchema

Schema to allow serialization/deserialization of credential exchange records.

class Meta[source]

Bases: object

V10CredentialExchangeSchema metadata.


alias of V10CredentialExchange