MdocPresentation

An org-iso-mdoc request (ISO/IEC TS 18013-7 Annex C): show request for the holder's consent, then respond once; to decline, cancel the platform's request — nothing is sent to the reader.

Types

Link copied to clipboard
object Companion

Origins, as the platform reports them.

Link copied to clipboard
@Serializable
data class Document(val doctype: String, val elements: List<MdocPresentation.Element>, val credentials: List<CredentialSummary> = emptyList())

One requested document.

Link copied to clipboard
@Serializable
data class Element(val namespace: String, val identifier: String, val retain: Boolean = false)

One requested element.

Link copied to clipboard
@Serializable
data class Request(val origin: String, val reader: String = "", val documents: List<MdocPresentation.Document>)

What the page asks for.

Link copied to clipboard
@Serializable
data class Response(val response: ByteArray, val linkable: Boolean = false)

The answer to hand back to the platform.

Properties

Link copied to clipboard

What's asked: show it for the holder's consent.

Functions

Link copied to clipboard
suspend fun respond(document: Int, credentialID: String, elements: List<MdocPresentation.Element>): MdocPresentation.Response

Presents the held mdoc credentialID for document number document, disclosing exactly elements, each one it requested. The holder key signs now, so a key store requiring the holder prompts.