diff --git a/Sources/ElixxirDAppsSDK/E2E/E2E.swift b/Sources/ElixxirDAppsSDK/E2E/E2E.swift index 72b6f991ce48fb2795607878e0037c201f889e2d..21fe40c17c2639ee595a806ba232c5f7197a9134 100644 --- a/Sources/ElixxirDAppsSDK/E2E/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E/E2E.swift @@ -8,6 +8,7 @@ public struct E2E { public var getContact: E2EGetContact public var getAllPartnerIds: E2EGetAllPartnerIds public var getUdAddressFromNdf: E2EGetUdAddressFromNdf + public var getUdCertFromNdf: E2EGetUdCertFromNdf public var payloadSize: E2EPayloadSize public var partitionSize: E2EPartitionSize public var addPartnerCallback: E2EAddPartnerCallback @@ -36,6 +37,7 @@ extension E2E { getContact: .live(bindingsE2E), getAllPartnerIds: .live(bindingsE2E), getUdAddressFromNdf: .live(bindingsE2E), + getUdCertFromNdf: .live(bindingsE2E), payloadSize: .live(bindingsE2E), partitionSize: .live(bindingsE2E), addPartnerCallback: .live(bindingsE2E), @@ -65,6 +67,7 @@ extension E2E { getContact: .unimplemented, getAllPartnerIds: .unimplemented, getUdAddressFromNdf: .unimplemented, + getUdCertFromNdf: .unimplemented, payloadSize: .unimplemented, partitionSize: .unimplemented, addPartnerCallback: .unimplemented, diff --git a/Sources/ElixxirDAppsSDK/E2E/Functors/E2EGetUdCertFromNdf.swift b/Sources/ElixxirDAppsSDK/E2E/Functors/E2EGetUdCertFromNdf.swift new file mode 100644 index 0000000000000000000000000000000000000000..ce322dab4c26428482ca7a838e99c0d0e94e3883 --- /dev/null +++ b/Sources/ElixxirDAppsSDK/E2E/Functors/E2EGetUdCertFromNdf.swift @@ -0,0 +1,27 @@ +import Bindings +import XCTestDynamicOverlay + +public struct E2EGetUdCertFromNdf { + public var run: () -> Data + + public func callAsFunction() -> Data { + run() + } +} + +extension E2EGetUdCertFromNdf { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EGetUdCertFromNdf { + E2EGetUdCertFromNdf { + guard let data = bindingsE2E.getUdCertFromNdf() else { + fatalError("BindingsE2e.getUdCertFromNdf returned `nil`") + } + return data + } + } +} + +extension E2EGetUdCertFromNdf { + public static let unimplemented = E2EGetUdCertFromNdf( + run: XCTUnimplemented("\(Self.self)") + ) +}