buildDeviceRequestFromDcql

inline fun buildDeviceRequestFromDcql(sessionTranscript: DataItem, dcql: JsonObject, otherInfo: Map<String, DataItem> = emptyMap(), transactions: Map<String, TransactionsInfo> = emptyMap(), defaultIntentToRetain: Boolean = false, version: String? = null, 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.

transactions

transaction data to add to DocRequestInfo.

defaultIntentToRetain

the intent to retain to use when requesting transactions in ISO 18013-5 namespace.

version

the version to use or null to automatically determine which version to use.

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(), transactions: Map<String, TransactionsInfo> = emptyMap(), defaultIntentToRetain: Boolean = false, version: String? = null, 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.

otherInfo

other request info to go into DeviceRequestInfo.

transactions

transaction data to add to DocRequestInfo.

defaultIntentToRetain

the intent to retain to use when requesting transactions in ISO 18013-5 namespace.

version

the version to use or null to automatically determine which version to use.

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.