diff --git a/Sources/ElixxirDAppsSDK/E2E.swift b/Sources/ElixxirDAppsSDK/E2E.swift index bd0aa849b3c4403bad086205507fd2df3ce0be82..da868b33cb3229bf6966c7611aa045045e9818e6 100644 --- a/Sources/ElixxirDAppsSDK/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E.swift @@ -2,6 +2,7 @@ import Bindings public struct E2E { public var getId: E2EGetId + public var getReceptionId: E2EGetReceptionId // TODO: } @@ -9,13 +10,15 @@ public struct E2E { extension E2E { public static func live(_ bindingsE2E: BindingsE2e) -> E2E { E2E( - getId: .live(bindingsE2E: bindingsE2E) + getId: .live(bindingsE2E: bindingsE2E), + getReceptionId: .live(bindingsE2E: bindingsE2E) ) } } extension E2E { public static let unimplemented = E2E( - getId: .unimplemented + getId: .unimplemented, + getReceptionId: .unimplemented ) } diff --git a/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift b/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift new file mode 100644 index 0000000000000000000000000000000000000000..7bbbcc40cdf90a209ed902797d3430cd5971633e --- /dev/null +++ b/Sources/ElixxirDAppsSDK/E2EGetReceptionId.swift @@ -0,0 +1,27 @@ +import Bindings +import XCTestDynamicOverlay + +public struct E2EGetReceptionId { + public var run: () -> Data + + public func callAsFunction() -> Data { + run() + } +} + +extension E2EGetReceptionId { + public static func live(bindingsE2E: BindingsE2e) -> E2EGetReceptionId { + E2EGetReceptionId { + guard let data = bindingsE2E.getReceptionID() else { + fatalError("BindingsE2e.getReceptionID returned `nil`") + } + return data + } + } +} + +extension E2EGetReceptionId { + public static let unimplemented = E2EGetReceptionId( + run: XCTUnimplemented("\(Self.self)") + ) +}