IssuedDocumentHandle

High–level stable representation of a stored credential/document.

Backed by EUDI IssuedDocument, but exposes only stable and safe-to-use properties for apps:

  • document id

  • display name / issuer name

  • SD-JWT VC payload

  • optional VCT type metadata

  • optional rendered SVG card templates with claim placeholders resolved

  • signing using holder key

More structured parsing (e.g. credentialSubject.name) is handled at the app layer or via helpers such as vcValue.

When com.dewa.walletsdk.WalletSdkOptions.trustedTypeMetadataRegistries is configured, the SDK attempts to enrich issued documents with VCT metadata and localized rendering templates. This enrichment is optional and cached by the SDK, so metadata and renderingBundle may be null if no metadata registry is configured, the credential type has no metadata, or remote fetching failed.

Properties

Link copied to clipboard
val credentialSubjectJson: JsonObject?
Link copied to clipboard
val data: SdJwtVcData?

Strongly-typed SD-JWT VC data when applicable.

Link copied to clipboard

Human-readable name resolved from issuer metadata or format.

Link copied to clipboard

The mdoc docType (e.g. org.iso.18013.5.1.mDL), or null for non-mdoc.

Link copied to clipboard

Raw document format name (e.g. "SdJwtVcFormat(ES256, ...)").

Link copied to clipboard
val id: String

Unique document ID inside the wallet database.

Link copied to clipboard

true when this document is an mso_mdoc credential (e.g. an mDL or mdoc PID) rather than an SD-JWT VC. mdoc documents cannot be presented via the SD-JWT QR flow, so callers typically hide the QR/sharing affordance and render mdocClaims instead.

Link copied to clipboard

Issuer display name (falls back to "Unknown issuer").

Link copied to clipboard

Optional VCT metadata fetched from a trusted type metadata registry.

Link copied to clipboard
val recreatedClaims: JsonObject?
Link copied to clipboard

Optional localized SVG templates with placeholders already replaced from the reconstructed SD-JWT VC claims.

Link copied to clipboard

Raw SD-JWT VC string, if available.

Link copied to clipboard
val vcJson: JsonObject?
Link copied to clipboard
val vct: String?

VCT when this document is an SD-JWT VC. Useful for registry lookups or filtering.

Functions

Link copied to clipboard

Checks whether this document belongs to a specific VCT.

Link copied to clipboard

Resolves the issuer's revocation/suspension status for this credential via the W3C Bitstring Status List it references. Requires connectivity.

Link copied to clipboard
suspend fun credSdJwt(): String
Link copied to clipboard
suspend fun getCredentials(): SecureAreaBoundCredential

Retrieves the wallet-bound credential associated with this document.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun getRemainingUses(): Int
Link copied to clipboard
suspend fun isExpired(nowEpochSeconds: Long = System.currentTimeMillis() / 1000): Boolean

Offline check: true when the credential is outside its validity window — past its exp, or before its nbf. Returns false when neither claim is present. Does not consult the status list.

Link copied to clipboard
suspend fun isRevoked(): Boolean

true when the issuer has revoked this credential. Requires connectivity.

Link copied to clipboard
fun issuerDisplayName(languageCode: String): String?

Localized issuer display name (e.g. "e-Boks"), or null when the credential carries no issuer display metadata.

Link copied to clipboard
suspend fun isSuspended(): Boolean

true when the issuer has temporarily suspended this credential. Requires connectivity.

Link copied to clipboard
fun localizedName(languageCode: String): String?

Resolves the friendliest available human-readable name for this credential, preferring localized values for languageCode.

Link copied to clipboard

Returns the friendly display names this credential carries across every locale we know about, keyed by BCP-47 language code.

Link copied to clipboard

Decoded claims of this mso_mdoc document as SDK-native MdocClaims, or an empty list when this is not an mdoc.

Link copied to clipboard

Pins the credential that would be consumed next — valid at the current time, with the lowest usage count — so the same credential can both render and sign a presentation for the lifetime of a session.

Link copied to clipboard

Top-level SD-JWT VC claims whose value is an image (e.g. a portrait), keyed by claim name, with the decoded image bytes. Uses the same content sniffing as mdocClaims (base64 / data:-URL → JPEG/PNG/JPEG2000), so apps don't have to decode images themselves. Empty for mdoc / when none.

Link copied to clipboard
suspend fun sign(dataToSign: ByteArray, unlockReason: Reason = Reason.Unspecified): EcSignature
Link copied to clipboard
suspend fun signConsumingCredential(signingInput: ByteArray): EcSignature

Signs arbitrary input using the consuming credential key.