mdocPresentment

suspend fun mdocPresentment(deviceRequest: DeviceRequest, eReaderKey: EcPublicKey?, sessionTranscript: DataItem, source: PresentmentSource, keyAgreementPossible: List<EcCurve>, onWaitingForUserInput: () -> Unit = {}, onDocumentsInFocus: (documents: List<Document>) -> Unit): DeviceResponse

Present ISO mdoc credentials according to ISO/IEC 18013-5:2021.

Return

a DeviceResponse.

Parameters

deviceRequest

The device request.

eReaderKey

The ephemeral reader key, if available.

sessionTranscript

the session transcript.

source

the source of truth used for presentment.

keyAgreementPossible

the list of curves for which key agreement is possible.

onWaitingForUserInput

called when waiting for input from the user (consent or authentication)

onDocumentsInFocus

called with the documents currently selected for the user, including when first shown. If the user selects a different set of documents in the prompt, this will be called again.

Throws

if the user canceled in a consent prompt.