buildDeviceRequestFromDcql

inline fun buildDeviceRequestFromDcql(sessionTranscript: DataItem, dcql: JsonObject, otherInfo: Map<String, DataItem> = emptyMap(), docRequestOtherInfo: Map<String, Map<String, DataItem>> = emptyMap(), builderAction: DeviceRequest.Builder.() -> Unit = {}): DeviceRequest

Builds a DeviceRequest from a DcqlQuery.

This performs the inverse transformation of DeviceRequest.toDcql.

Return

the configured DeviceRequest.

Parameters

sessionTranscript

the SessionTranscript CBOR.

dcql

the DCQL query to convert.

otherInfo

other request info to go into DeviceRequestInfo.

docRequestOtherInfo

other request info to go into DocRequestInfo indexed by DCQL credential query id

builderAction

optional builder action to configure the request (e.g. add reader authentication).

Throws

if dcql contains features not supported by DeviceRequest, for example a request for credentials that aren't ISO mdocs.


inline fun buildDeviceRequestFromDcql(sessionTranscript: DataItem, dcqlString: String, otherInfo: Map<String, DataItem> = emptyMap(), docRequestOtherInfo: Map<String, Map<String, DataItem>> = emptyMap(), builderAction: DeviceRequest.Builder.() -> Unit = {}): DeviceRequest

Builds a DeviceRequest from a DcqlQuery.

This performs the inverse transformation of DeviceRequest.toDcql.

Return

the configured DeviceRequest.

Parameters

sessionTranscript

the SessionTranscript CBOR.

dcqlString

a string with the DCQL query to convert.

builderAction

optional builder action to configure the request (e.g. add reader authentication).

Throws

if dcqlString contains features not supported by DeviceRequest, for example a request for credentials that aren't ISO mdocs.