diff --git a/Sources/ElixxirDAppsSDK/E2E.swift b/Sources/ElixxirDAppsSDK/E2E.swift index d98b72c0162b8f5b67de5f8ca96e2d0ccfb04442..a3ee341400daded594b13f6fdbef0c0d5acd7f60 100644 --- a/Sources/ElixxirDAppsSDK/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E.swift @@ -3,6 +3,7 @@ import Bindings public struct E2E { public var getId: E2EGetId public var getReceptionId: E2EGetReceptionId + public var getContact: E2EGetContact public var payloadSize: E2EPayloadSize public var partitionSize: E2EPartitionSize @@ -14,6 +15,7 @@ extension E2E { E2E( getId: .live(bindingsE2E: bindingsE2E), getReceptionId: .live(bindingsE2E: bindingsE2E), + getContact: .live(bindingsE2E: bindingsE2E), payloadSize: .live(bindingsE2E: bindingsE2E), partitionSize: .live(bindingsE2E: bindingsE2E) ) @@ -24,6 +26,7 @@ extension E2E { public static let unimplemented = E2E( getId: .unimplemented, getReceptionId: .unimplemented, + getContact: .unimplemented, payloadSize: .unimplemented, partitionSize: .unimplemented ) diff --git a/Sources/ElixxirDAppsSDK/E2EGetContact.swift b/Sources/ElixxirDAppsSDK/E2EGetContact.swift new file mode 100644 index 0000000000000000000000000000000000000000..fc9053bcdd40c3a4aaacbd79aef6847f12c82689 --- /dev/null +++ b/Sources/ElixxirDAppsSDK/E2EGetContact.swift @@ -0,0 +1,27 @@ +import Bindings +import XCTestDynamicOverlay + +public struct E2EGetContact { + public var run: () -> Data + + public func callAsFunction() -> Data { + run() + } +} + +extension E2EGetContact { + public static func live(bindingsE2E: BindingsE2e) -> E2EGetContact { + E2EGetContact { + guard let data = bindingsE2E.getContact() else { + fatalError("BindingsE2e.getContact returned `nil`") + } + return data + } + } +} + +extension E2EGetContact { + public static let unimplemented = E2EGetContact( + run: XCTUnimplemented("\(Self.self)") + ) +}