CredentialAttribute

data class CredentialAttribute(val id: String, val label: String, val kind: AttributeKind, val description: String = label, val mandatory: Boolean = false, val icon: String? = null, val expiredBadge: String? = null)

A data element of a CredentialType.

Parameters

id

the element identifier, e.g. family_name.

label

human-readable name shown in the wallet, consent and verifier screens.

description

one-line description (consent/details).

mandatory

whether issuers always include it.

icon

optional icon name from the SDK's icon set (e.g. "PERSON", "TODAY", "CALENDAR_CLOCK", "NUMBERS", "ACCOUNT_BOX", "MILITARY_TECH", "EMERGENCY", "STARS", "FACE", "ACCOUNT_BALANCE"); unknown names are ignored.

expiredBadge

for a AttributeKind.Date element: a badge the wallet shows on the card once this date has passed (e.g. "Medical expired"). The ISO expiry_date already gets "Expired".

Constructors

Link copied to clipboard
constructor(id: String, label: String, kind: AttributeKind, description: String = label, mandatory: Boolean = false, icon: String? = null, expiredBadge: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val expiredBadge: String? = null
Link copied to clipboard
val icon: String? = null
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val mandatory: Boolean = false