Iso18013Presentment

suspend fun Iso18013Presentment(transport: MdocTransport, engagementParams: StateFlow<EngagementParams>, source: PresentmentSource, keyAgreementPossible: List<EcCurve>, preselectedDocuments: List<Document> = emptyList(), insertSequenceNumbers: Boolean = false, timeout: Duration? = 15.seconds, timeoutSubsequentRequests: Duration? = 30.seconds, onWaitingForRequest: () -> Unit = {}, onWaitingForUserInput: () -> Unit = {}, onDocumentsInFocus: (documents: List<Document>) -> Unit = {}, onSendingResponse: () -> Unit = {}, onDeviceRequest: (deviceRequest: DeviceRequest) -> Unit = {})

Performs proximity presentment according to ISO/IEC 18013-5:2021.

Parameters

transport

the transport to use for communicating with the reader.

engagementParams

a StateFlow providing the current engagement parameters.

source

the source of truth for documents to present.

keyAgreementPossible

curves available for key agreement.

preselectedDocuments

the list of documents the user may have preselected earlier or the empty list if the user didn't preselect.

insertSequenceNumbers

whether sequence numbers should be inserted in session messages.

timeout

timeout for initial message.

timeoutSubsequentRequests

timeout for subsequent messages.

onWaitingForRequest

callback when waiting for request.

onWaitingForUserInput

callback when waiting for user input.

onDocumentsInFocus

callback with selected documents.

onSendingResponse

callback when sending response.


suspend fun Iso18013Presentment(transport: MdocTransport, eDeviceKey: EcPrivateKey, deviceEngagement: DataItem, handover: DataItem, source: PresentmentSource, keyAgreementPossible: List<EcCurve>, preselectedDocuments: List<Document> = emptyList(), insertSequenceNumbers: Boolean = false, timeout: Duration? = 15.seconds, timeoutSubsequentRequests: Duration? = 30.seconds, onWaitingForRequest: () -> Unit = {}, onWaitingForUserInput: () -> Unit = {}, onDocumentsInFocus: (documents: List<Document>) -> Unit = {}, onSendingResponse: () -> Unit = {})

Performs proximity presentment according to ISO/IEC 18013-5:2021 using individual engagement parameters.

Parameters

transport

the transport to use for communicating with the reader.

eDeviceKey

the ephemeral device key generated for engagement.

deviceEngagement

the encoded DeviceEngagement structure.

handover

the handover structure.

source

the source of truth for documents to present.

keyAgreementPossible

curves available for key agreement.

preselectedDocuments

the list of documents the user may have preselected earlier or the empty list if the user didn't preselect.

insertSequenceNumbers

whether sequence numbers should be inserted in session messages.

timeout

timeout for initial message.

timeoutSubsequentRequests

timeout for subsequent messages.

onWaitingForRequest

callback when waiting for request.

onWaitingForUserInput

callback when waiting for user input.

onDocumentsInFocus

callback with selected documents.

onSendingResponse

callback when sending response.