encodeDeviceRetrievalMethods
fun encodeDeviceRetrievalMethods(methods: List<MdocConnectionMethod>, engagementType: MdocEngagementType = MdocEngagementType.DEVICE_QR): List<DataItem>
Encodes a list of single-mode MdocConnectionMethod entries into DeviceRetrievalMethods CBOR items, coalescing all Ble entries into a single [2, 1, BleOptions] item at the position of the first Ble entry (satisfying ISO/IEC 18013-5 clause 9.2's uniqueness rule for (type, version) tuples).
Return
the encoded DeviceRetrievalMethod CBOR DataItem elements.
Parameters
methods
the single-mode connection methods to encode.
engagementType
the engagement context controlling context-specific field rules and validation.
Throws
if methods violates engagementType rules or contains conflicting parameters or duplicate non-BLE retrieval method types.