diff --git a/Sources/ElixxirDAppsSDK/E2E.swift b/Sources/ElixxirDAppsSDK/E2E.swift index b11f08e2cd28af177ff5eb990bf29e09af6184cd..e24d04ce4002eece00573cc32b9372408ba68d0c 100644 --- a/Sources/ElixxirDAppsSDK/E2E.swift +++ b/Sources/ElixxirDAppsSDK/E2E.swift @@ -14,6 +14,7 @@ public struct E2E { public var removeService: E2ERemoveService public var hasAuthenticatedChannel: E2EHasAuthenticatedChannel public var requestAuthenticatedChannel: E2ERequestAuthenticatedChannel + public var resetAuthenticatedChannel: E2EResetAuthenticatedChannel public var callAllReceivedRequests: E2ECallAllReceivedRequests public var send: E2ESend @@ -36,6 +37,7 @@ extension E2E { removeService: .live(bindingsE2E), hasAuthenticatedChannel: .live(bindingsE2E), requestAuthenticatedChannel: .live(bindingsE2E), + resetAuthenticatedChannel: .live(bindingsE2E), callAllReceivedRequests: .live(bindingsE2E), send: .live(bindingsE2E) ) @@ -57,6 +59,7 @@ extension E2E { removeService: .unimplemented, hasAuthenticatedChannel: .unimplemented, requestAuthenticatedChannel: .unimplemented, + resetAuthenticatedChannel: .unimplemented, callAllReceivedRequests: .unimplemented, send: .unimplemented ) diff --git a/Sources/ElixxirDAppsSDK/E2EResetAuthenticatedChannel.swift b/Sources/ElixxirDAppsSDK/E2EResetAuthenticatedChannel.swift new file mode 100644 index 0000000000000000000000000000000000000000..7b987fc900c486341378cea735dbd2f81e6faf2d --- /dev/null +++ b/Sources/ElixxirDAppsSDK/E2EResetAuthenticatedChannel.swift @@ -0,0 +1,26 @@ +import Bindings +import XCTestDynamicOverlay + +public struct E2EResetAuthenticatedChannel { + public var run: (Data) throws -> Int64 + + public func callAsFunction(partnerContact: Data) throws -> Int64 { + try run(partnerContact) + } +} + +extension E2EResetAuthenticatedChannel { + public static func live(_ bindingsE2E: BindingsE2e) -> E2EResetAuthenticatedChannel { + E2EResetAuthenticatedChannel { partnerContact in + var roundId: Int64 = 0 + try bindingsE2E.reset(partnerContact, ret0_: &roundId) + return roundId + } + } +} + +extension E2EResetAuthenticatedChannel { + public static let unimplemented = E2EResetAuthenticatedChannel( + run: XCTUnimplemented("\(Self.self)") + ) +}