Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 1.65 KB

BlePresentationService.md

File metadata and controls

80 lines (56 loc) · 1.65 KB

CLASS

BlePresentationService

Contents

  • Properties
    • status
    • flow
  • Methods
    • init(parameters:)
    • startQrEngagement()
    • receiveRequest()
    • sendResponse(userAccepted:itemsToSend:onSuccess:)
public class BlePresentationService : PresentationService

Implements proximity attestation presentation with QR to BLE data transfer Implementation is based on the ISO/IEC 18013-5 specification

Properties

status

public var status: TransferStatus = .initializing

flow

public var flow: FlowType

Methods

init(parameters:)

public init(parameters: [String: Any]) throws

startQrEngagement()

public func startQrEngagement() async throws -> Data?

Generate device engagement QR code The holder app should present the returned code to the verifier

  • Returns: The image data for the QR code

receiveRequest()

public func receiveRequest() async throws -> [String: Any]

Receive request via BLE

  • Returns: The requested items.

sendResponse(userAccepted:itemsToSend:onSuccess:)

public func sendResponse(userAccepted: Bool, itemsToSend: RequestItems, onSuccess: ((URL?) -> Void)? ) async throws

Send response via BLE

  • Parameters:
    • userAccepted: True if user accepted to send the response
    • itemsToSend: The selected items to send organized in document types and namespaces

Parameters

Name Description
userAccepted True if user accepted to send the response
itemsToSend The selected items to send organized in document types and namespaces