MdocProximityReaderQrPresentment

actual fun MdocProximityReaderQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (scanQrCode: (settings: MdocProximityReaderQrSettings) -> Unit) -> Unit, scanQrCode: (onQrCodeScanned: (uri: String) -> Boolean, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, supportedCurves: List<EcCurve>, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
expect fun MdocProximityReaderQrPresentment(modifier: Modifier = Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: @Composable (scanQrCode: (settings: MdocProximityReaderQrSettings) -> Unit) -> Unit, scanQrCode: @Composable (onQrCodeScanned: (uri: String) -> Boolean, reset: () -> Unit) -> Unit, showTransacting: @Composable (reset: () -> Unit) -> Unit, showCompleted: @Composable (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document> = emptyList(), capabilities: Map<Capability, DataItem> = mapOf( Capability.READER_AUTH_ALL_SUPPORT to true.toDataItem(), Capability.EXTENDED_REQUEST_SUPPORT to true.toDataItem(), ), supportedCurves: List<EcCurve> = Crypto.supportedCurves.filter { it.supportsKeyAgreement }, transportFactory: MdocTransportFactory = MdocTransportFactory.Default, disablePlatformSpecificImplementation: Boolean = false)

A composable for holder-side presentment using ISO/IEC 18013-5 Second Edition Reader QR engagement (section 9.7).

Some platforms might implement this using platform-specific mechanisms, for example on Android it will use org.multipaz.compose.prompt.PresentmentActivity. This can be inhibited by passing true to disablePlatformSpecificImplementation.

Parameters

modifier
source

the source of truth for what is being presented.

promptModel
prepareSettings

a composable to show UI to start scanning a Reader QR code, calling scanQrCode with MdocProximityReaderQrSettings when initiated.

scanQrCode

a composable which scans a Reader QR code and passes candidate URIs to onQrCodeScanned, which returns true if the URI is an mdoc: Reader QR URI and presentment has begun, or false to continue scanning.

showTransacting

a composable which will be shown while connecting and transacting with the reader.

showCompleted

a composable which will be shown when the transaction is complete.

preselectedDocuments

a list of documents the user may have preselected or the empty list.

capabilities

the capabilities to convey to the mdoc reader in DeviceEngagement.

supportedCurves

the ECDH curves supported for session encryption.

transportFactory

the MdocTransportFactory to use for creating transports.

disablePlatformSpecificImplementation

set to true to not use platform-specific implementations.

actual fun MdocProximityReaderQrPresentment(modifier: ERROR CLASS: Symbol not found for Modifier, source: ERROR CLASS: Symbol not found for PresentmentSource, promptModel: ERROR CLASS: Symbol not found for PromptModel, prepareSettings: (scanQrCode: (settings: MdocProximityReaderQrSettings) -> Unit) -> Unit, scanQrCode: (onQrCodeScanned: (uri: String) -> Boolean, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<ERROR CLASS: Symbol not found for Document>, capabilities: Map<ERROR CLASS: Symbol not found for Capability, ERROR CLASS: Symbol not found for DataItem>, supportedCurves: List<ERROR CLASS: Symbol not found for EcCurve>, transportFactory: ERROR CLASS: Symbol not found for MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
actual fun MdocProximityReaderQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (scanQrCode: (settings: MdocProximityReaderQrSettings) -> Unit) -> Unit, scanQrCode: (onQrCodeScanned: (uri: String) -> Boolean, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, supportedCurves: List<EcCurve>, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
actual fun MdocProximityReaderQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (scanQrCode: (settings: MdocProximityReaderQrSettings) -> Unit) -> Unit, scanQrCode: (onQrCodeScanned: (uri: String) -> Boolean, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, supportedCurves: List<EcCurve>, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)