addDocumentRequest

suspend fun addDocumentRequest(docType: String, itemsToRequest: Map<String, Map<String, Boolean>>, requestInfo: Map<String, ByteArray>?, readerKeySecureArea: SecureArea, readerKeyAlias: String, readerKeyCertificateChain: X509CertChain, keyUnlockData: KeyUnlockData?): DeviceRequestGenerator

Adds a request for a document and which data elements to request.

This variant signs with a key in a SecureArea.

Return

the DeviceRequestGenerator.

Parameters

docType

the document type.

itemsToRequest

the items to request as a map of namespaces into data element names into the intent-to-retain for each data element.

requestInfo

null or additional information provided. This is a map from keys and the values must be valid CBOR

readerKeySecureArea

the SecureArea that holds the key to sign with.

readerKeyAlias

the alias for the key to sign with

readerKeyCertificateChain

the certification for the reader key.

keyUnlockData

a KeyUnlockData for unlocking the key in the SecureArea.


fun addDocumentRequest(docType: String, itemsToRequest: Map<String, Map<String, Boolean>>, requestInfo: Map<String, ByteArray>?, readerKey: EcPrivateKey?, signatureAlgorithm: Algorithm, readerKeyCertificateChain: X509CertChain?, zkSystemSpecs: List<ZkSystemSpec> = emptyList()): DeviceRequestGenerator

Adds a request for a document and which data elements to request.

Return

the DeviceRequestGenerator.

Parameters

docType

the document type.

itemsToRequest

the items to request as a map of namespaces into data element names into the intent-to-retain for each data element.

requestInfo

null or additional information provided. This is a map from keys and the values must be valid CBOR

readerKey

null if not signing the request, otherwise a EcPrivateKey.

signatureAlgorithm

Algorithm.UNSET if readerKey is null, otherwise algorithm to use.

readerKeyCertificateChain

null if readerKey is null, otherwise the certificate chain for readerKey.