Package-level declarations
Types
Link copied to clipboard
Thrown if timed out waiting for a message from the remote reader.
Link copied to clipboard
Thrown when presentment was cancelled.
Link copied to clipboard
class PresentmentModel
A model which can be used to drive UI for presentment.
Link copied to clipboard
abstract class PresentmentSource(val documentStore: DocumentStore, val documentTypeRepository: DocumentTypeRepository, val zkSystemRepository: ZkSystemRepository? = null)
The source of truth used for credential presentment.
Link copied to clipboard
Thrown when timing out waiting for the reader to connect.
Link copied to clipboard
class SimplePresentmentSource(val documentStore: DocumentStore, val documentTypeRepository: DocumentTypeRepository, val zkSystemRepository: ZkSystemRepository? = null, resolveTrustFn: suspend (requester: Requester) -> TrustMetadata? = { requester -> null }, showConsentPromptFn: ShowConsentPromptFn = ::promptModelRequestConsent, val preferSignatureToKeyAgreement: Boolean = true, val domainMdocSignature: String? = null, val domainMdocKeyAgreement: String? = null, val domainKeylessSdJwt: String? = null, val domainKeyBoundSdJwt: String? = null) : PresentmentSource
An implementation of PresentmentSource for when using ISO mdoc and IETF SD-JWT VC credentials.
Functions
Link copied to clipboard
suspend fun digitalCredentialsPresentment(protocol: String, data: String, appId: String?, origin: String, preselectedDocuments: List<Document>, source: PresentmentSource): String
suspend fun digitalCredentialsPresentment(protocol: String, data: JsonObject, appId: String?, origin: String, preselectedDocuments: List<Document>, source: PresentmentSource): JsonObject
Present credentials according to the W3C Digital Credentials API.
Link copied to clipboard
suspend fun DeviceRequestParser.DocRequest.getPresentmentData(documentTypeRepository: DocumentTypeRepository, source: PresentmentSource, keyAgreementPossible: List<EcCurve>): CredentialPresentmentData?
Generates a CredentialPresentmentData with matches for each MdocCredential satisfying the doc request.
suspend fun DocRequest.getPresentmentData(documentTypeRepository: DocumentTypeRepository, source: PresentmentSource, keyAgreementPossible: List<EcCurve>): CredentialPresentmentData?
Link copied to clipboard
suspend fun Iso18013Presentment(transport: MdocTransport, eDeviceKey: EcPrivateKey, deviceEngagement: DataItem, handover: DataItem, source: PresentmentSource, keyAgreementPossible: List<EcCurve>, timeout: Duration? = 10.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.
Link copied to clipboard
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.
Link copied to clipboard
suspend fun uriSchemePresentment(source: PresentmentSource, uri: String, origin: String?, httpClientEngineFactory: HttpClientEngineFactory<*>): String
Present credentials according to OpenID4VP 1.0 w/ URI schemes.