MdocClaim

data class MdocClaim(val nameSpace: String, val identifier: String, val value: String?, val imageBytes: ByteArray?, val children: List<MdocClaim> = emptyList(), val displayName: String? = null)

A decoded claim of an mso_mdoc credential, mapped into an SDK-native type so apps never touch EUDI's MsoMdocClaim. Claims form a tree: a CBOR map/array (e.g. driving_privileges) becomes a group whose nested entries are exposed as children, so the UI can render true indented sub-rows.

Exactly one shape applies per node:

  • leaf textvalue non-null, imageBytes null, children empty.

  • leaf imageimageBytes non-null (e.g. the portrait), value null.

  • groupchildren non-empty (object entries or array items), value and imageBytes null.

Constructors

Link copied to clipboard
constructor(nameSpace: String, identifier: String, value: String?, imageBytes: ByteArray?, children: List<MdocClaim> = emptyList(), displayName: String? = null)

Properties

Link copied to clipboard

Nested entries for a group node, else empty.

Link copied to clipboard

Issuer-provided localized label for this element (from the credential metadata claims[*].display), resolved for the current locale, or null when the issuer supplied none. Prefer this over formatting identifier. Only set on top-level claims.

Link copied to clipboard

The element identifier or, for nested entries, the map key / array index. Raw (not prettified) — the UI formats it.

Link copied to clipboard

Raw image bytes for an image leaf (decode with BitmapFactory.decodeByteArray), else null.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The mdoc namespace (e.g. org.iso.18013.5.1).

Link copied to clipboard

Human-readable value for a text leaf, else null.