MpzPass

data class MpzPass(val uniqueId: String = UUID.randomUUID().toString(), val version: Long = 0, val updateUrl: String? = null, val name: String? = null, val typeName: String? = null, val cardArt: ByteString? = null, val isoMdoc: List<MpzPassIsoMdoc> = emptyList(), val sdJwtVc: List<MpzPassSdJwtVc> = emptyList())

Represents a Multipaz .mpzpass credential container.

This format provides a highly portable, lightweight mechanism to exchange low-assurance verifiable credentials (such as transit passes or movie tickets) where strict hardware device-binding is unnecessary.

See this page for the definition of the Multipaz Pass file format.

Throws

Constructors

Link copied to clipboard
constructor(uniqueId: String = UUID.randomUUID().toString(), version: Long = 0, updateUrl: String? = null, name: String? = null, typeName: String? = null, cardArt: ByteString? = null, isoMdoc: List<MpzPassIsoMdoc> = emptyList(), sdJwtVc: List<MpzPassSdJwtVc> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val cardArt: ByteString?

The card art for the pass as a PNG ByteString.

Link copied to clipboard

The ISO mDoc credentials in the payload.

Link copied to clipboard
val name: String?

The display name of the credential (e.g., "Erika's Driving License").

Link copied to clipboard

The SD-JWT VC credentials in the payload.

Link copied to clipboard

The display type of the credential (e.g., "Utopia Driving License").

Link copied to clipboard

A unique identifier for this pass, as assigned by the issuer. This should contain at least 128 bits of entropy and should only contain alphanumeric characters, hyphens, and underscores.

Link copied to clipboard

Optional URL which can be used to check for an update.

Link copied to clipboard

the version of the pass.

Functions

Link copied to clipboard
suspend fun toDataItem(compressionLevel: Int = 5): DataItem

Serializes and compresses this MpzPass into a DataItem.