PresentmentModel
A model used for credential presentment.
This model implements the entire UX/UI flow related to presentment, including
Allowing the user to cancel at any time, including when the connection is being established.
Querying the user for which document to present, if multiple credentials can satisfy the request.
Showing a consent dialog.
Generating the response and sending it to the verifier, via the selected mechanism.
Support for multiple requests if both sides keep the connection open
Types
Properties
The list of available documents to pick from.
The data to show in the consent dialog.
Returns whether the presentment can be dismissed/canceled.
The mechanism being used to communicate with the credential reader.
Number of requests served.
A CoroutineScope for the presentment process.
The source which provides data to present.
The current state.
Functions
The UI layer should call this when a user has reviewed the consent data.
Should be called by the UI layer if the user hits the dismiss button.
The UI layer should call this when a user has selected a document.
Resets the model to State.IDLE.
Sets the model to State.COMPLETED
Sets the model to State.CONNECTING.
Sets the PresentmentMechanism to use.
Provides PromptModel, required if presentment involves popping up any prompts, such as biometrics or passphrase.
Sets the PresentmentSource to use as the source of truth for presentment.