generateRequestedClaims

fun generateRequestedClaims(docType: String, requestedData: Map<String, List<Pair<String, Boolean>>>, documentTypeRepository: DocumentTypeRepository, mdocCredential: MdocCredential?): List<MdocRequestedClaim>

Helper function to generate a list of claims for an mdoc.

Parameters

docType

the mdoc document type.

requestedData

a map from namespace into a list of data elements where each pair is the data element name and whether the data element will be retained.

documentTypeRepository

a DocumentTypeRepository used to determine the display name for claims.

mdocCredential

if set, the returned list is filtered so it only references data elements available in the credential.