MpzPass

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

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, userAuthenticationRequired: Boolean = false, readerIdentifiers: List<ByteString> = emptyList(), shareable: Boolean = false, name: String? = null, typeName: String? = null, cardArt: ByteString? = null, isoMdoc: List<MpzPassIsoMdoc> = emptyList(), sdJwtVc: List<MpzPassSdJwtVc> = emptyList(), issuerCertificateChain: X509CertChain? = null)

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

Whether this pass is signed with an issuer certificate chain.

Link copied to clipboard

The X.509 certificate chain of the pass issuer, if the pass is signed.

Link copied to clipboard
val name: String?

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

Link copied to clipboard
val readerIdentifiers: List<ByteString>

A list of reader identifiers for reader authentication.

Link copied to clipboard

The SD-JWT VC credentials in the payload.

Link copied to clipboard

whether the pass can be shared/forwarded to others.

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

whether platform user authentication is required to present the pass.

Link copied to clipboard

the version of the pass.

Functions

Link copied to clipboard
suspend fun toDataItem(signingKey: AsymmetricKey? = null, issuerCertificateChain: X509CertChain? = null, compressionLevel: Int = 5): DataItem

Serializes and compresses this MpzPass into a DataItem.