diff --git a/Sources/ElixxirDAppsSDK/GetSingleUseParams.swift b/Sources/ElixxirDAppsSDK/GetSingleUseParams.swift new file mode 100644 index 0000000000000000000000000000000000000000..2b296b3113c25fc138043bb20a4b06828bd2b948 --- /dev/null +++ b/Sources/ElixxirDAppsSDK/GetSingleUseParams.swift @@ -0,0 +1,25 @@ +import Bindings +import XCTestDynamicOverlay + +public struct GetSingleUseParams { + public var run: () -> Data + + public func callAsFunction() -> Data { + run() + } +} + +extension GetSingleUseParams { + public static let liveDefault = GetSingleUseParams { + guard let data = BindingsGetDefaultSingleUseParams() else { + fatalError("BindingsGetDefaultSingleUseParams returned `nil`") + } + return data + } +} + +extension GetSingleUseParams { + public static let unimplemented = GetCmixParams( + run: XCTUnimplemented("\(Self.self)") + ) +}