DocumentTypeRepository

A class that contains the metadata of Document and transaction types.

The repository is initially empty, but in the org.multipaz.documenttype.knowntypes package there are well known document types which can be added using the addDocumentType method.

Applications also may add their own document and transaction types.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Get all the Document Types that are in the repository.

Link copied to clipboard

Additional sample requests, not necessarily associated with a particular document type.

Link copied to clipboard

All the transaction types in the repository.

Functions

Link copied to clipboard

Add a Document Type to the repository.

Link copied to clipboard
fun addTransactionType(transactionType: TransactionType<*>)

Add a TransactionType to the registry.

Link copied to clipboard

Gets the first DocumentType in documentTypes with a given VCT.

Link copied to clipboard

Gets the first DocumentType in documentTypes with a given ISO mdoc doc type.

Link copied to clipboard

Gets the first DocumentType in documentTypes with a given mdoc namespace.

Link copied to clipboard

Find a transaction type by identifier

Link copied to clipboard
fun parseJsonTransactions(base64UrlEncodedJson: List<String>): Map<String, List<TransactionData<*>>>

Parses OpenID4VP JSON-encoded transaction data.

Link copied to clipboard
fun vctMatches(presentedVct: String, requestedVct: String): Boolean

Checks whether presentedVct satisfies requestedVct, either by exact string equality or via a verifier-configured JsonDocumentType.otherVcts relationship in this repository.