decodeDeviceRetrievalMethods
fun decodeDeviceRetrievalMethods(items: List<DataItem>, senderRole: MdocRole = MdocRole.MDOC): List<MdocConnectionMethod>
Decodes a list of DeviceRetrievalMethod CBOR DataItem elements into single-mode MdocConnectionMethod instances.
Any multi-mode BleOptions item is expanded in preference order: Ble.DirectL2capCentral, Ble.DirectL2capPeripheral, Ble.GattCentral, Ble.GattPeripheral, with PeripheralAddress (20) and DirectL2capPSM (21) attached only to senderRole's BLE Peripheral modes.
Return
the decoded single-mode MdocConnectionMethod instances.
Parameters
items
the DeviceRetrievalMethod CBOR array items.
senderRole
the MdocRole of the peer that authored the engagement structure (MdocRole.MDOC for DeviceEngagement, MdocRole.MDOC_READER for ReaderEngagement).
Throws
if any item's CBOR structure is malformed.