Package-level declarations

Types

Link copied to clipboard
data class MdocProximityQrSettings(val availableConnectionMethods: List<MdocConnectionMethod>, val createTransportOptions: MdocTransportOptions)

Settings to use when doing presentment with QR engagement according to ISO/IEC 18013-5:2021.

Link copied to clipboard
data class MdocProximityReaderQrSettings(val preferredConnectionMethodOrder: List<String> = emptyList(), val bleDirectL2capEnabled: Boolean = true, val createTransportOptions: MdocTransportOptions = MdocTransportOptions())

Settings to use when doing presentment with Reader QR engagement according to ISO/IEC 18013-5 Second Edition section 9.7.

Link copied to clipboard
data class SimpleConsentPromptData(val simpleConsent: SimpleConsent, val cardArt: ImageBitmap, val requesterIcon: ImageBitmap?, val requesterIconUrl: String?, val text: String, val isWebOrigin: Boolean = false)

Resolved UI display data for a simple consent prompt that can be combined with biometric authentication.

Link copied to clipboard
open class TransactionDataRendererCompose(val summary: @Composable (context: TransactionDataContext) -> Unit, val details: @Composable (context: TransactionDataContext) -> Unit? = null) : TransactionDataRenderer

A TransactionDataRenderer drawn with Compose.

Link copied to clipboard

Base class for activity used for credential presentments using URI schemes.

Functions

Link copied to clipboard
fun Consent(modifier: Modifier = Modifier, requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, preselectedDocuments: List<Document>, imageLoader: ImageLoader?, transactionDataRendererRepository: TransactionDataRendererRepository? = null, requesterHistory: RequesterHistory? = null, classifyPurposesFn: ClassifyPurposesFn = ::defaultClassifyPurposes, classifyRiskFn: ClassifyRiskFn = ::defaultClassifyRisk, onDocumentsInFocus: (documents: List<Document>) -> Unit, onConfirm: (selection: PresentmentSelection) -> Unit, onCancel: () -> Unit = {})

A composable used for obtaining consent when presenting one or more credentials.

Link copied to clipboard
fun ConsentModalBottomSheet(sheetState: SheetState, requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, preselectedDocuments: List<Document>, imageLoader: ImageLoader?, maxHeight: Dp? = null, transactionDataRendererRepository: TransactionDataRendererRepository? = null, requesterHistory: RequesterHistory? = null, classifyPurposesFn: ClassifyPurposesFn = ::defaultClassifyPurposes, classifyRiskFn: ClassifyRiskFn = ::defaultClassifyRisk, classifySimpleConsentFn: ClassifySimpleConsentFn = ::defaultClassifySimpleConsent, platformConsentOptions: PlatformConsentOptions? = null, onDocumentsInFocus: (documents: List<Document>) -> Unit, onConfirm: (selection: PresentmentSelection) -> Unit, onCancel: () -> Unit = {})

Bottom sheet used for obtaining consent when presenting one or more credentials.

Link copied to clipboard
actual fun MdocProximityQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, eDeviceKeyCurve: EcCurve, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
expect fun MdocProximityQrPresentment(modifier: Modifier = Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: @Composable (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: @Composable (uri: String, 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() ), eDeviceKeyCurve: EcCurve = EcCurve.P256, transportFactory: MdocTransportFactory = MdocTransportFactory.Default, disablePlatformSpecificImplementation: Boolean = false)

A composable for presentment with QR engagement according to ISO/IEC 18013-5:2021.

actual fun MdocProximityQrPresentment(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: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, 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>, eDeviceKeyCurve: ERROR CLASS: Symbol not found for EcCurve, transportFactory: ERROR CLASS: Symbol not found for MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
actual fun MdocProximityQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, eDeviceKeyCurve: EcCurve, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
actual fun MdocProximityQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, capabilities: Map<Capability, DataItem>, eDeviceKeyCurve: EcCurve, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
Link copied to clipboard
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).

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)
Link copied to clipboard
suspend fun resolveSimpleConsentPromptData(requester: Requester, trustedRequesterIdentity: TrustedRequesterIdentity?, presentmentData: PresentmentData, preselectedDocuments: List<Document> = emptyList(), selections: List<List<Int>> = presentmentData.defaultSelections(preselectedDocuments), classifySimpleConsentFn: ClassifySimpleConsentFn = ::defaultClassifySimpleConsent): SimpleConsentPromptData?

Evaluates whether a credential presentment request qualifies as a simple, well-defined non-PII request and, if so, resolves the SimpleConsentPromptData to display on top of the biometric prompt.