IssueCredentialProtocol

constructor(stage: IssueCredentialProtocol.Stage, proposeMessage: Message? = null, offerMessage: Message? = null, requestMessage: Message? = null, connector: DIDCommConnection)(source)

The IssueCredentialProtocol class represents a protocol for issuing credentials in the Atala PRISM architecture. It handles different stages of the protocol and communicates with a DIDComm connection to exchange messages.

Parameters

stage

The current stage of the protocol.

proposeMessage

The propose message received in the protocol.

offerMessage

The offer message received in the protocol.

requestMessage

The request message received in the protocol.

connector

The DIDComm connection to communicate with.


constructor(message: Message, connector: DIDCommConnection)(source)

Constructs an instance of IssueCredentialProtocol class. This constructor initializes the object with the provided message and connector. It determines the stage of the credential issuance process based on the message type in message, and assigns the corresponding values to the stage and relevant property (propose, offer, or request).

Parameters

message

The message object representing the received message.

connector

The DIDCommConnection instance used for message exchange.

Throws

if the message does not match any known message type.