diff --git a/nym-vpn-apple/Daemon/Info.plist b/nym-vpn-apple/Daemon/Info.plist index 0fd101d5e0..ef778939a6 100644 --- a/nym-vpn-apple/Daemon/Info.plist +++ b/nym-vpn-apple/Daemon/Info.plist @@ -11,7 +11,7 @@ CFBundleShortVersionString 1.1.1 CFBundleVersion - 31 + 32 SMAuthorizedClients anchor apple generic and identifier "net.nymtech.vpn" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = VW5DZLFHM5) diff --git a/nym-vpn-apple/Daemon/net.nymtech.vpn.helper b/nym-vpn-apple/Daemon/net.nymtech.vpn.helper index d38584a4bf..362becff24 100644 Binary files a/nym-vpn-apple/Daemon/net.nymtech.vpn.helper and b/nym-vpn-apple/Daemon/net.nymtech.vpn.helper differ diff --git a/nym-vpn-apple/Home/Sources/Home/ModeSelectionInfo/ModeSelectionInfoViewModel.swift b/nym-vpn-apple/Home/Sources/Home/ModeSelectionInfo/ModeSelectionInfoViewModel.swift index 1481e82234..ea3846059c 100644 --- a/nym-vpn-apple/Home/Sources/Home/ModeSelectionInfo/ModeSelectionInfoViewModel.swift +++ b/nym-vpn-apple/Home/Sources/Home/ModeSelectionInfo/ModeSelectionInfoViewModel.swift @@ -14,7 +14,7 @@ final class ModeSelectionInfoViewModel { let fastDescriptionLocalizedString = "modeSelectionInfo.fastDescription".localizedString let continueReadingLocalizedString = "modeSelectionInfo.continueReading".localizedString let continueReadingLinkImageName = "export" - let continueReadingURLString = "https://nymvpn.com/en/blog" + let continueReadingURLString = "https://support.nym.com/hc/articles/24326365096721-What-s-the-difference-between-Fast-and-Anonymous-mode" let okLocalizedString = "ok".localizedString @Binding var isDisplayed: Bool diff --git a/nym-vpn-apple/Home/Sources/Hop/LocationInfoViewModel.swift b/nym-vpn-apple/Home/Sources/Hop/LocationInfoViewModel.swift index 45ce72f8e0..141f9845bd 100644 --- a/nym-vpn-apple/Home/Sources/Hop/LocationInfoViewModel.swift +++ b/nym-vpn-apple/Home/Sources/Hop/LocationInfoViewModel.swift @@ -9,7 +9,7 @@ final class LocationInfoViewModel { let messageLocalizedString = "locationModal.message".localizedString let readMoreLocalizedString = "locationModal.readMore".localizedString let readMoreLinkImageName = "export" - let readMoreURLString = "https://support.nymvpn.com/hc/en-us/articles/26448676449297-How-is-server-location-determined-by-NymVPN" + let readMoreURLString = "https://support.nym.com/hc/articles/26448676449297-How-is-server-location-determined-by-NymVPN" let okLocalizedString = "ok".localizedString @Binding var isDisplayed: Bool diff --git a/nym-vpn-apple/Home/Sources/Welcome/WelcomeView.swift b/nym-vpn-apple/Home/Sources/Welcome/WelcomeView.swift index c411756bc3..71f24d320f 100644 --- a/nym-vpn-apple/Home/Sources/Welcome/WelcomeView.swift +++ b/nym-vpn-apple/Home/Sources/Welcome/WelcomeView.swift @@ -14,7 +14,6 @@ public struct WelcomeView: View { public var body: some View { VStack { Spacer() - logoImage() titleView() subtitleView() sentryToggle() @@ -33,14 +32,6 @@ public struct WelcomeView: View { } private extension WelcomeView { - @ViewBuilder - func logoImage() -> some View { - GenericImage(imageName: viewModel.logoImageName) - .frame(width: 80, height: 80) - Spacer() - .frame(height: 16) - } - @ViewBuilder func titleView() -> some View { Text(viewModel.titleText) diff --git a/nym-vpn-apple/Home/Sources/Welcome/WelcomeViewModel.swift b/nym-vpn-apple/Home/Sources/Welcome/WelcomeViewModel.swift index 3e97e2eca0..8cfab6c35d 100644 --- a/nym-vpn-apple/Home/Sources/Welcome/WelcomeViewModel.swift +++ b/nym-vpn-apple/Home/Sources/Welcome/WelcomeViewModel.swift @@ -6,7 +6,6 @@ import Theme public final class WelcomeViewModel: ObservableObject { private var appSettings: AppSettings - let logoImageName = "addCredentialsLogo" let titleText = "welcome.title".localizedString let subtitle1Text = "welcome.subtitle1".localizedString let subtitle2Text = "welcome.subtitle2".localizedString diff --git a/nym-vpn-apple/MixnetLibrary/Package.swift b/nym-vpn-apple/MixnetLibrary/Package.swift index 20d8d9389b..9f45ce9063 100644 --- a/nym-vpn-apple/MixnetLibrary/Package.swift +++ b/nym-vpn-apple/MixnetLibrary/Package.swift @@ -23,8 +23,8 @@ let package = Package( ), .binaryTarget( name: "NymVpnLib", - url: "https://github.com/nymtech/nym-vpn-client/releases/download/nym-vpn-core-v1.1.1/nym-vpn-core-v1.1.1_ios_universal.zip", - checksum: "4a4e8e31ad5427662c6b2e1f6d1ecc31173e17efbcdb880177840adb2c63449b" + url: "https://github.com/nymtech/nym-vpn-client/releases/download/nym-vpn-core-v1.1.1-r1/nym-vpn-core-v1.2.0-dev_ios_universal.zip", + checksum: "eedd4fd3293c1c957f0d3ec8409f73846fcb4cccadb646b44ea8c56585b21acc" ), // .binaryTarget( // name: "NymVpnLib", diff --git a/nym-vpn-apple/MixnetLibrary/Sources/MixnetLibrary/nym_vpn_lib.swift b/nym-vpn-apple/MixnetLibrary/Sources/MixnetLibrary/nym_vpn_lib.swift index 05477f94c9..031452c4e6 100644 --- a/nym-vpn-apple/MixnetLibrary/Sources/MixnetLibrary/nym_vpn_lib.swift +++ b/nym-vpn-apple/MixnetLibrary/Sources/MixnetLibrary/nym_vpn_lib.swift @@ -521,168 +521,6 @@ fileprivate struct FfiConverterString: FfiConverter { -/** - * Types observing network changes. - */ -public protocol OsDefaultPathObserver : AnyObject { - - func onDefaultPathChange(newPath: OsDefaultPath) - -} - -/** - * Types observing network changes. - */ -open class OsDefaultPathObserverImpl: - OsDefaultPathObserver { - fileprivate let pointer: UnsafeMutableRawPointer! - - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. - public struct NoPointer { - public init() {} - } - - // TODO: We'd like this to be `private` but for Swifty reasons, - // we can't implement `FfiConverter` without making this `required` and we can't - // make it `required` without making it `public`. - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer - } - - /// This constructor can be used to instantiate a fake object. - /// - Parameter noPointer: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. - /// - /// - Warning: - /// Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing [Pointer] the FFI lower functions will crash. - public init(noPointer: NoPointer) { - self.pointer = nil - } - - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_nym_vpn_lib_fn_clone_osdefaultpathobserver(self.pointer, $0) } - } - // No primary constructor declared for this class. - - deinit { - guard let pointer = pointer else { - return - } - - try! rustCall { uniffi_nym_vpn_lib_fn_free_osdefaultpathobserver(pointer, $0) } - } - - - - -open func onDefaultPathChange(newPath: OsDefaultPath) {try! rustCall() { - uniffi_nym_vpn_lib_fn_method_osdefaultpathobserver_on_default_path_change(self.uniffiClonePointer(), - FfiConverterTypeOSDefaultPath.lower(newPath),$0 - ) -} -} - - -} -// Magic number for the Rust proxy to call using the same mechanism as every other method, -// to free the callback once it's dropped by Rust. -private let IDX_CALLBACK_FREE: Int32 = 0 -// Callback return codes -private let UNIFFI_CALLBACK_SUCCESS: Int32 = 0 -private let UNIFFI_CALLBACK_ERROR: Int32 = 1 -private let UNIFFI_CALLBACK_UNEXPECTED_ERROR: Int32 = 2 - -// Put the implementation in a struct so we don't pollute the top-level namespace -fileprivate struct UniffiCallbackInterfaceOSDefaultPathObserver { - - // Create the VTable using a series of closures. - // Swift automatically converts these into C callback functions. - static var vtable: UniffiVTableCallbackInterfaceOsDefaultPathObserver = UniffiVTableCallbackInterfaceOsDefaultPathObserver( - onDefaultPathChange: { ( - uniffiHandle: UInt64, - newPath: RustBuffer, - uniffiOutReturn: UnsafeMutableRawPointer, - uniffiCallStatus: UnsafeMutablePointer - ) in - let makeCall = { - () throws -> () in - guard let uniffiObj = try? FfiConverterTypeOSDefaultPathObserver.handleMap.get(handle: uniffiHandle) else { - throw UniffiInternalError.unexpectedStaleHandle - } - return uniffiObj.onDefaultPathChange( - newPath: try FfiConverterTypeOSDefaultPath.lift(newPath) - ) - } - - - let writeReturn = { () } - uniffiTraitInterfaceCall( - callStatus: uniffiCallStatus, - makeCall: makeCall, - writeReturn: writeReturn - ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterTypeOSDefaultPathObserver.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface OSDefaultPathObserver: handle missing in uniffiFree") - } - } - ) -} - -private func uniffiCallbackInitOSDefaultPathObserver() { - uniffi_nym_vpn_lib_fn_init_callback_vtable_osdefaultpathobserver(&UniffiCallbackInterfaceOSDefaultPathObserver.vtable) -} - -public struct FfiConverterTypeOSDefaultPathObserver: FfiConverter { - fileprivate static var handleMap = UniffiHandleMap() - - typealias FfiType = UnsafeMutableRawPointer - typealias SwiftType = OsDefaultPathObserver - - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> OsDefaultPathObserver { - return OsDefaultPathObserverImpl(unsafeFromRawPointer: pointer) - } - - public static func lower(_ value: OsDefaultPathObserver) -> UnsafeMutableRawPointer { - guard let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: handleMap.insert(obj: value))) else { - fatalError("Cast to UnsafeMutableRawPointer failed") - } - return ptr - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OsDefaultPathObserver { - let v: UInt64 = try readInt(&buf) - // The Rust code won't compile if a pointer won't fit in a UInt64. - // We have to go via `UInt` because that's the thing that's the size of a pointer. - let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: v)) - if (ptr == nil) { - throw UniffiInternalError.unexpectedNullPointer - } - return try lift(ptr!) - } - - public static func write(_ value: OsDefaultPathObserver, into buf: inout [UInt8]) { - // This fiddling is because `Int` is the thing that's the same size as a pointer. - // The Rust code won't compile if a pointer won't fit in a `UInt64`. - writeInt(&buf, UInt64(bitPattern: Int64(Int(bitPattern: lower(value))))) - } -} - - - - -public func FfiConverterTypeOSDefaultPathObserver_lift(_ pointer: UnsafeMutableRawPointer) throws -> OsDefaultPathObserver { - return try FfiConverterTypeOSDefaultPathObserver.lift(pointer) -} - -public func FfiConverterTypeOSDefaultPathObserver_lower(_ value: OsDefaultPathObserver) -> UnsafeMutableRawPointer { - return FfiConverterTypeOSDefaultPathObserver.lower(value) -} - - - - public protocol OsTunProvider : AnyObject { /** @@ -690,11 +528,6 @@ public protocol OsTunProvider : AnyObject { */ func setTunnelNetworkSettings(tunnelSettings: TunnelNetworkSettings) async throws - /** - * Set or unset the default path observer. - */ - func setDefaultPathObserver(observer: OsDefaultPathObserver?) async throws - } open class OsTunProviderImpl: @@ -758,29 +591,15 @@ open func setTunnelNetworkSettings(tunnelSettings: TunnelNetworkSettings)async t ) } - /** - * Set or unset the default path observer. - */ -open func setDefaultPathObserver(observer: OsDefaultPathObserver?)async throws { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_nym_vpn_lib_fn_method_ostunprovider_set_default_path_observer( - self.uniffiClonePointer(), - FfiConverterOptionTypeOSDefaultPathObserver.lower(observer) - ) - }, - pollFunc: ffi_nym_vpn_lib_rust_future_poll_void, - completeFunc: ffi_nym_vpn_lib_rust_future_complete_void, - freeFunc: ffi_nym_vpn_lib_rust_future_free_void, - liftFunc: { $0 }, - errorHandler: FfiConverterTypeVpnError.lift - ) -} - } - +// Magic number for the Rust proxy to call using the same mechanism as every other method, +// to free the callback once it's dropped by Rust. +private let IDX_CALLBACK_FREE: Int32 = 0 +// Callback return codes +private let UNIFFI_CALLBACK_SUCCESS: Int32 = 0 +private let UNIFFI_CALLBACK_ERROR: Int32 = 1 +private let UNIFFI_CALLBACK_UNEXPECTED_ERROR: Int32 = 2 // Put the implementation in a struct so we don't pollute the top-level namespace fileprivate struct UniffiCallbackInterfaceOSTunProvider { @@ -829,47 +648,6 @@ fileprivate struct UniffiCallbackInterfaceOSTunProvider { ) uniffiOutReturn.pointee = uniffiForeignFuture }, - setDefaultPathObserver: { ( - uniffiHandle: UInt64, - observer: RustBuffer, - uniffiFutureCallback: @escaping UniffiForeignFutureCompleteVoid, - uniffiCallbackData: UInt64, - uniffiOutReturn: UnsafeMutablePointer - ) in - let makeCall = { - () async throws -> () in - guard let uniffiObj = try? FfiConverterTypeOSTunProvider.handleMap.get(handle: uniffiHandle) else { - throw UniffiInternalError.unexpectedStaleHandle - } - return try await uniffiObj.setDefaultPathObserver( - observer: try FfiConverterOptionTypeOSDefaultPathObserver.lift(observer) - ) - } - - let uniffiHandleSuccess = { (returnValue: ()) in - uniffiFutureCallback( - uniffiCallbackData, - UniffiForeignFutureStructVoid( - callStatus: RustCallStatus() - ) - ) - } - let uniffiHandleError = { (statusCode, errorBuf) in - uniffiFutureCallback( - uniffiCallbackData, - UniffiForeignFutureStructVoid( - callStatus: RustCallStatus(code: statusCode, errorBuf: errorBuf) - ) - ) - } - let uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError( - makeCall: makeCall, - handleSuccess: uniffiHandleSuccess, - handleError: uniffiHandleError, - lowerError: FfiConverterTypeVpnError.lower - ) - uniffiOutReturn.pointee = uniffiForeignFuture - }, uniffiFree: { (uniffiHandle: UInt64) -> () in let result = try? FfiConverterTypeOSTunProvider.handleMap.remove(handle: uniffiHandle) if result == nil { @@ -2619,92 +2397,6 @@ public func FfiConverterTypeNymVpnNetwork_lower(_ value: NymVpnNetwork) -> RustB } -/** - * Represents a default network route used by the system. - */ -public struct OsDefaultPath { - /** - * Indicates whether the process is able to make connection through the given path. - */ - public var status: OsPathStatus - /** - * Set to true for interfaces that are considered expensive, such as when using cellular data plan. - */ - public var isExpensive: Bool - /** - * Set to true when using a constrained interface, such as when using low-data mode. - */ - public var isConstrained: Bool - - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init( - /** - * Indicates whether the process is able to make connection through the given path. - */status: OsPathStatus, - /** - * Set to true for interfaces that are considered expensive, such as when using cellular data plan. - */isExpensive: Bool, - /** - * Set to true when using a constrained interface, such as when using low-data mode. - */isConstrained: Bool) { - self.status = status - self.isExpensive = isExpensive - self.isConstrained = isConstrained - } -} - - - -extension OsDefaultPath: Equatable, Hashable { - public static func ==(lhs: OsDefaultPath, rhs: OsDefaultPath) -> Bool { - if lhs.status != rhs.status { - return false - } - if lhs.isExpensive != rhs.isExpensive { - return false - } - if lhs.isConstrained != rhs.isConstrained { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(status) - hasher.combine(isExpensive) - hasher.combine(isConstrained) - } -} - - -public struct FfiConverterTypeOSDefaultPath: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OsDefaultPath { - return - try OsDefaultPath( - status: FfiConverterTypeOSPathStatus.read(from: &buf), - isExpensive: FfiConverterBool.read(from: &buf), - isConstrained: FfiConverterBool.read(from: &buf) - ) - } - - public static func write(_ value: OsDefaultPath, into buf: inout [UInt8]) { - FfiConverterTypeOSPathStatus.write(value.status, into: &buf) - FfiConverterBool.write(value.isExpensive, into: &buf) - FfiConverterBool.write(value.isConstrained, into: &buf) - } -} - - -public func FfiConverterTypeOSDefaultPath_lift(_ buf: RustBuffer) throws -> OsDefaultPath { - return try FfiConverterTypeOSDefaultPath.lift(buf) -} - -public func FfiConverterTypeOSDefaultPath_lower(_ value: OsDefaultPath) -> RustBuffer { - return FfiConverterTypeOSDefaultPath.lower(value) -} - - public struct RequestZkNymError { public var message: String public var messageId: String? @@ -3264,10 +2956,12 @@ public struct VpnConfig { public var credentialDataPath: PathBuf? public var tunStatusListener: TunnelStatusListener? public var credentialMode: Bool? + public var statisticsRecipient: String? + public var userAgent: UserAgent // Default memberwise initializers are never public by default, so we // declare one manually. - public init(entryGateway: EntryPoint, exitRouter: ExitPoint, enableTwoHop: Bool, tunProvider: OsTunProvider, credentialDataPath: PathBuf?, tunStatusListener: TunnelStatusListener?, credentialMode: Bool?) { + public init(entryGateway: EntryPoint, exitRouter: ExitPoint, enableTwoHop: Bool, tunProvider: OsTunProvider, credentialDataPath: PathBuf?, tunStatusListener: TunnelStatusListener?, credentialMode: Bool?, statisticsRecipient: String?, userAgent: UserAgent) { self.entryGateway = entryGateway self.exitRouter = exitRouter self.enableTwoHop = enableTwoHop @@ -3275,6 +2969,8 @@ public struct VpnConfig { self.credentialDataPath = credentialDataPath self.tunStatusListener = tunStatusListener self.credentialMode = credentialMode + self.statisticsRecipient = statisticsRecipient + self.userAgent = userAgent } } @@ -3290,7 +2986,9 @@ public struct FfiConverterTypeVPNConfig: FfiConverterRustBuffer { tunProvider: FfiConverterTypeOSTunProvider.read(from: &buf), credentialDataPath: FfiConverterOptionTypePathBuf.read(from: &buf), tunStatusListener: FfiConverterOptionTypeTunnelStatusListener.read(from: &buf), - credentialMode: FfiConverterOptionBool.read(from: &buf) + credentialMode: FfiConverterOptionBool.read(from: &buf), + statisticsRecipient: FfiConverterOptionString.read(from: &buf), + userAgent: FfiConverterTypeUserAgent.read(from: &buf) ) } @@ -3302,6 +3000,8 @@ public struct FfiConverterTypeVPNConfig: FfiConverterRustBuffer { FfiConverterOptionTypePathBuf.write(value.credentialDataPath, into: &buf) FfiConverterOptionTypeTunnelStatusListener.write(value.tunStatusListener, into: &buf) FfiConverterOptionBool.write(value.credentialMode, into: &buf) + FfiConverterOptionString.write(value.statisticsRecipient, into: &buf) + FfiConverterTypeUserAgent.write(value.userAgent, into: &buf) } } @@ -4938,103 +4638,6 @@ extension NymVpnStatus: Equatable, Hashable {} -// Note that we don't yet support `indirect` for enums. -// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. - -public enum OsPathStatus { - - /** - * The path cannot be evaluated. - */ - case invalid - /** - * The path is ready to be used for network connections. - */ - case satisfied - /** - * The path for network connections is not available, either due to lack of network - * connectivity or being prohibited by system policy. - */ - case unsatisfied - /** - * The path is not currently satisfied, but may become satisfied upon a connection attempt. - * This can be due to a service, such as a VPN or a cellular data connection not being activated. - */ - case satisfiable - /** - * Unknown path status was received. - * The raw variant code is contained in associated value. - */ - case unknown(Int64 - ) -} - - -public struct FfiConverterTypeOSPathStatus: FfiConverterRustBuffer { - typealias SwiftType = OsPathStatus - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OsPathStatus { - let variant: Int32 = try readInt(&buf) - switch variant { - - case 1: return .invalid - - case 2: return .satisfied - - case 3: return .unsatisfied - - case 4: return .satisfiable - - case 5: return .unknown(try FfiConverterInt64.read(from: &buf) - ) - - default: throw UniffiInternalError.unexpectedEnumCase - } - } - - public static func write(_ value: OsPathStatus, into buf: inout [UInt8]) { - switch value { - - - case .invalid: - writeInt(&buf, Int32(1)) - - - case .satisfied: - writeInt(&buf, Int32(2)) - - - case .unsatisfied: - writeInt(&buf, Int32(3)) - - - case .satisfiable: - writeInt(&buf, Int32(4)) - - - case let .unknown(v1): - writeInt(&buf, Int32(5)) - FfiConverterInt64.write(v1, into: &buf) - - } - } -} - - -public func FfiConverterTypeOSPathStatus_lift(_ buf: RustBuffer) throws -> OsPathStatus { - return try FfiConverterTypeOSPathStatus.lift(buf) -} - -public func FfiConverterTypeOSPathStatus_lower(_ value: OsPathStatus) -> RustBuffer { - return FfiConverterTypeOSPathStatus.lower(value) -} - - - -extension OsPathStatus: Equatable, Hashable {} - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -5619,6 +5222,7 @@ public enum VpnError { ) case InvalidAccountStoragePath(details: String ) + case StatisticsRecipient } @@ -5680,6 +5284,7 @@ public struct FfiConverterTypeVpnError: FfiConverterRustBuffer { case 21: return .InvalidAccountStoragePath( details: try FfiConverterString.read(from: &buf) ) + case 22: return .StatisticsRecipient default: throw UniffiInternalError.unexpectedEnumCase } @@ -5792,6 +5397,10 @@ public struct FfiConverterTypeVpnError: FfiConverterRustBuffer { writeInt(&buf, Int32(21)) FfiConverterString.write(details, into: &buf) + + case .StatisticsRecipient: + writeInt(&buf, Int32(22)) + } } } @@ -5885,27 +5494,6 @@ fileprivate struct FfiConverterOptionString: FfiConverterRustBuffer { } } -fileprivate struct FfiConverterOptionTypeOSDefaultPathObserver: FfiConverterRustBuffer { - typealias SwiftType = OsDefaultPathObserver? - - public static func write(_ value: SwiftType, into buf: inout [UInt8]) { - guard let value = value else { - writeInt(&buf, Int8(0)) - return - } - writeInt(&buf, Int8(1)) - FfiConverterTypeOSDefaultPathObserver.write(value, into: &buf) - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { - switch try readInt(&buf) as Int8 { - case 0: return nil - case 1: return try FfiConverterTypeOSDefaultPathObserver.read(from: &buf) - default: throw UniffiInternalError.unexpectedOptionalTag - } - } -} - fileprivate struct FfiConverterOptionTypeTunnelStatusListener: FfiConverterRustBuffer { typealias SwiftType = TunnelStatusListener? @@ -6074,27 +5662,6 @@ fileprivate struct FfiConverterOptionTypeIpv6Settings: FfiConverterRustBuffer { } } -fileprivate struct FfiConverterOptionTypeUserAgent: FfiConverterRustBuffer { - typealias SwiftType = UserAgent? - - public static func write(_ value: SwiftType, into buf: inout [UInt8]) { - guard let value = value else { - writeInt(&buf, Int8(0)) - return - } - writeInt(&buf, Int8(1)) - FfiConverterTypeUserAgent.write(value, into: &buf) - } - - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { - switch try readInt(&buf) as Int8 { - case 0: return nil - case 1: return try FfiConverterTypeUserAgent.read(from: &buf) - default: throw UniffiInternalError.unexpectedOptionalTag - } - } -} - fileprivate struct FfiConverterOptionTypeAccountRegistered: FfiConverterRustBuffer { typealias SwiftType = AccountRegistered? @@ -7222,6 +6789,9 @@ private func uniffiForeignFutureFree(handle: UInt64) { public func uniffiForeignFutureHandleCountNymVpnLib() -> Int { UNIFFI_FOREIGN_FUTURE_HANDLE_MAP.count } +/** + * Setup the library with the given data directory and optionally enable credential mode. + */ public func configureLib(dataDir: String, credentialMode: Bool?)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_configurelib( FfiConverterString.lower(dataDir), @@ -7239,45 +6809,19 @@ public func currentEnvironment()throws -> NetworkEnvironment { }) } /** - * Fetches the account links for the current network environment - * This makes a network call. In normal operations you almost always want to use initEnvironment - * followed by getAccountLinks instead of this function. + * Remove the account mnemonic and all associated keys and files */ -public func fetchAccountLinks(accountStorePath: String, networkName: String, locale: String)throws -> AccountLinks { - return try FfiConverterTypeAccountLinks.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_fetchaccountlinks( - FfiConverterString.lower(accountStorePath), - FfiConverterString.lower(networkName), - FfiConverterString.lower(locale),$0 +public func forgetAccount()throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { + uniffi_nym_vpn_lib_fn_func_forgetaccount($0 ) -}) } -/** - * Fetch the network environment details from the network name. - * This makes a network call. In normal operations you almost always want to use initEnvironment - * instead of this function. - */ -public func fetchEnvironment(networkName: String)throws -> NetworkEnvironment { - return try FfiConverterTypeNetworkEnvironment.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_fetchenvironment( - FfiConverterString.lower(networkName),$0 - ) -}) } /** - * Feth the account links for the current network environment. - * This makes a network call. In normal operations you almost always want to use initEnvironment - * followed by getSystemMessages instead of this function. + * Remove the account mnemonic and all associated keys and files. + * This is a version that can be called when the account controller is not running. */ -public func fetchSystemMessages(networkName: String)throws -> [SystemMessage] { - return try FfiConverterSequenceTypeSystemMessage.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_fetchsystemmessages( - FfiConverterString.lower(networkName),$0 - ) -}) -} -public func forgetAccount(path: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_forgetaccount( +public func forgetAccountRaw(path: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { + uniffi_nym_vpn_lib_fn_func_forgetaccountraw( FfiConverterString.lower(path),$0 ) } @@ -7285,43 +6829,66 @@ public func forgetAccount(path: String)throws {try rustCallWithError(FfiConvert /** * Returns the account links for the current network environment */ -public func getAccountLinks(accountStorePath: String, locale: String)throws -> AccountLinks { +public func getAccountLinks(locale: String)throws -> AccountLinks { return try FfiConverterTypeAccountLinks.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_getaccountlinks( + FfiConverterString.lower(locale),$0 + ) +}) +} +/** + * Returns the account links for the current network environment. + * This is a version that can be called when the account controller is not running. + */ +public func getAccountLinksRaw(accountStorePath: String, locale: String)throws -> AccountLinks { + return try FfiConverterTypeAccountLinks.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { + uniffi_nym_vpn_lib_fn_func_getaccountlinksraw( FfiConverterString.lower(accountStorePath), FfiConverterString.lower(locale),$0 ) }) } +/** + * Get the account state + */ public func getAccountState()throws -> AccountStateSummary { return try FfiConverterTypeAccountStateSummary.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_getaccountstate($0 ) }) } -public func getDeviceIdentity(path: String)throws -> String { +/** + * Get the device identity + */ +public func getDeviceIdentity()throws -> String { + return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { + uniffi_nym_vpn_lib_fn_func_getdeviceidentity($0 + ) +}) +} +/** + * Get the device identity + * This is a version that can be called when the account controller is not running. + */ +public func getDeviceIdentityRaw(path: String)throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_getdeviceidentity( + uniffi_nym_vpn_lib_fn_func_getdeviceidentityraw( FfiConverterString.lower(path),$0 ) }) } -public func getGatewayCountries(gwType: GatewayType, userAgent: UserAgent?, minGatewayPerformance: GatewayMinPerformance?)throws -> [Location] { +/** + * Get the liset of countries that have gateways available of the given type. + */ +public func getGatewayCountries(gwType: GatewayType, userAgent: UserAgent, minGatewayPerformance: GatewayMinPerformance?)throws -> [Location] { return try FfiConverterSequenceTypeLocation.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_getgatewaycountries( FfiConverterTypeGatewayType.lower(gwType), - FfiConverterOptionTypeUserAgent.lower(userAgent), + FfiConverterTypeUserAgent.lower(userAgent), FfiConverterOptionTypeGatewayMinPerformance.lower(minGatewayPerformance),$0 ) }) } -public func getLowLatencyEntryCountry(userAgent: UserAgent)throws -> Location { - return try FfiConverterTypeLocation.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_getlowlatencyentrycountry( - FfiConverterTypeUserAgent.lower(userAgent),$0 - ) -}) -} /** * Returns the system messages for the current network environment */ @@ -7368,54 +6935,86 @@ public func initFallbackMainnetEnvironment()throws {try rustCallWithError(FfiCo ) } } -public func initLogger() {try! rustCall() { - uniffi_nym_vpn_lib_fn_func_initlogger($0 +/** + * Additional extra function for when only only want to set the logger without initializing the + * library. Thus it's only needed when `configureLib` is not used. + */ +public func initLogger(path: PathBuf?) {try! rustCall() { + uniffi_nym_vpn_lib_fn_func_initlogger( + FfiConverterOptionTypePathBuf.lower(path),$0 ) } } -public func isAccountMnemonicStored(path: String)throws -> Bool { +/** + * Check if the account mnemonic is stored + */ +public func isAccountMnemonicStored()throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_isaccountmnemonicstored( - FfiConverterString.lower(path),$0 + uniffi_nym_vpn_lib_fn_func_isaccountmnemonicstored($0 ) }) } -public func removeAccountMnemonic(path: String)throws -> Bool { +/** + * Check if the account mnemonic is stored + * This is a version that can be called when the account controller is not running. + */ +public func isAccountMnemonicStoredRaw(path: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_removeaccountmnemonic( + uniffi_nym_vpn_lib_fn_func_isaccountmnemonicstoredraw( FfiConverterString.lower(path),$0 ) }) } -public func resetDeviceIdentity(path: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { - uniffi_nym_vpn_lib_fn_func_resetdeviceidentity( - FfiConverterString.lower(path),$0 - ) -} -} +/** + * Shutdown the library by stopping the account controller and cleaning up any resources. + */ public func shutdown()throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_shutdown($0 ) } } +/** + * Start the VPN by first establishing that the account is ready to connect, including requesting + * zknym credentials, and then starting the VPN state machine. + */ public func startVpn(config: VpnConfig)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_startvpn( FfiConverterTypeVPNConfig.lower(config),$0 ) } } +/** + * Stop the VPN by stopping the VPN state machine. + */ public func stopVpn()throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_stopvpn($0 ) } } -public func storeAccountMnemonic(mnemonic: String, path: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { +/** + * Store the account mnemonic + */ +public func storeAccountMnemonic(mnemonic: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_storeaccountmnemonic( + FfiConverterString.lower(mnemonic),$0 + ) +} +} +/** + * Store the account mnemonic + * This is a version that can be called when the account controller is not running. + */ +public func storeAccountMnemonicRaw(mnemonic: String, path: String)throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { + uniffi_nym_vpn_lib_fn_func_storeaccountmnemonicraw( FfiConverterString.lower(mnemonic), FfiConverterString.lower(path),$0 ) } } +/** + * This manually syncs the account state with the server. Normally this is done automatically, but + * this can be used to manually trigger a sync. + */ public func updateAccountState()throws {try rustCallWithError(FfiConverterTypeVpnError.lift) { uniffi_nym_vpn_lib_fn_func_updateaccountstate($0 ) @@ -7619,37 +7218,34 @@ private var initializationResult: InitializationResult { if bindings_contract_version != scaffolding_contract_version { return InitializationResult.contractVersionMismatch } - if (uniffi_nym_vpn_lib_checksum_func_configurelib() != 53065) { + if (uniffi_nym_vpn_lib_checksum_func_configurelib() != 2570) { return InitializationResult.apiChecksumMismatch } if (uniffi_nym_vpn_lib_checksum_func_currentenvironment() != 53371) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_fetchaccountlinks() != 56994) { + if (uniffi_nym_vpn_lib_checksum_func_forgetaccount() != 45453) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_fetchenvironment() != 14368) { + if (uniffi_nym_vpn_lib_checksum_func_forgetaccountraw() != 63705) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_fetchsystemmessages() != 47843) { + if (uniffi_nym_vpn_lib_checksum_func_getaccountlinks() != 37969) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_forgetaccount() != 31212) { + if (uniffi_nym_vpn_lib_checksum_func_getaccountlinksraw() != 55422) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_getaccountlinks() != 5427) { + if (uniffi_nym_vpn_lib_checksum_func_getaccountstate() != 4507) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_getaccountstate() != 12813) { + if (uniffi_nym_vpn_lib_checksum_func_getdeviceidentity() != 52430) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_getdeviceidentity() != 40381) { + if (uniffi_nym_vpn_lib_checksum_func_getdeviceidentityraw() != 1193) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_getgatewaycountries() != 34915) { - return InitializationResult.apiChecksumMismatch - } - if (uniffi_nym_vpn_lib_checksum_func_getlowlatencyentrycountry() != 10827) { + if (uniffi_nym_vpn_lib_checksum_func_getgatewaycountries() != 28627) { return InitializationResult.apiChecksumMismatch } if (uniffi_nym_vpn_lib_checksum_func_getsystemmessages() != 3453) { @@ -7664,31 +7260,31 @@ private var initializationResult: InitializationResult { if (uniffi_nym_vpn_lib_checksum_func_initfallbackmainnetenvironment() != 43903) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_initlogger() != 45606) { + if (uniffi_nym_vpn_lib_checksum_func_initlogger() != 36058) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_isaccountmnemonicstored() != 32917) { + if (uniffi_nym_vpn_lib_checksum_func_isaccountmnemonicstored() != 43744) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_removeaccountmnemonic() != 51019) { + if (uniffi_nym_vpn_lib_checksum_func_isaccountmnemonicstoredraw() != 63584) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_resetdeviceidentity() != 48847) { + if (uniffi_nym_vpn_lib_checksum_func_shutdown() != 33036) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_shutdown() != 58295) { + if (uniffi_nym_vpn_lib_checksum_func_startvpn() != 19253) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_startvpn() != 55890) { + if (uniffi_nym_vpn_lib_checksum_func_stopvpn() != 16058) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_stopvpn() != 59823) { + if (uniffi_nym_vpn_lib_checksum_func_storeaccountmnemonic() != 9242) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_storeaccountmnemonic() != 55674) { + if (uniffi_nym_vpn_lib_checksum_func_storeaccountmnemonicraw() != 51317) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_func_updateaccountstate() != 33999) { + if (uniffi_nym_vpn_lib_checksum_func_updateaccountstate() != 46396) { return InitializationResult.apiChecksumMismatch } if (uniffi_nym_vpn_lib_checksum_func_waitforaccountreadytoconnect() != 23259) { @@ -7721,20 +7317,13 @@ private var initializationResult: InitializationResult { if (uniffi_nym_vpn_lib_checksum_func_waitforupdatedeviceasync() != 62630) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_method_osdefaultpathobserver_on_default_path_change() != 43452) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_nym_vpn_lib_checksum_method_ostunprovider_set_tunnel_network_settings() != 45546) { return InitializationResult.apiChecksumMismatch } - if (uniffi_nym_vpn_lib_checksum_method_ostunprovider_set_default_path_observer() != 6896) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_nym_vpn_lib_checksum_method_tunnelstatuslistener_on_event() != 60728) { return InitializationResult.apiChecksumMismatch } - uniffiCallbackInitOSDefaultPathObserver() uniffiCallbackInitOSTunProvider() uniffiCallbackInitTunnelStatusListener() return InitializationResult.ok diff --git a/nym-vpn-apple/NymVPN.xcodeproj/project.pbxproj b/nym-vpn-apple/NymVPN.xcodeproj/project.pbxproj index 46c77160ba..869a06c80b 100644 --- a/nym-vpn-apple/NymVPN.xcodeproj/project.pbxproj +++ b/nym-vpn-apple/NymVPN.xcodeproj/project.pbxproj @@ -830,6 +830,7 @@ MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = "net.nymtech.vpn.network-extension"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; @@ -865,6 +866,7 @@ MARKETING_VERSION = 1.6.0; PRODUCT_BUNDLE_IDENTIFIER = "net.nymtech.vpn.network-extension"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; diff --git a/nym-vpn-apple/Services/Package.swift b/nym-vpn-apple/Services/Package.swift index d562c543b5..0f6e0a26ee 100644 --- a/nym-vpn-apple/Services/Package.swift +++ b/nym-vpn-apple/Services/Package.swift @@ -202,6 +202,7 @@ let package = Package( .target( name: "TunnelMixnet", dependencies: [ + .product(name: "AppVersionProvider", package: "ServicesMutual"), "ConfigurationManager", "CountriesManager", "CredentialsManager", diff --git a/nym-vpn-apple/Services/Sources/Services/ConfigurationManager/ConfigurationManager.swift b/nym-vpn-apple/Services/Sources/Services/ConfigurationManager/ConfigurationManager.swift index 23998c6abb..f6ae48aa29 100644 --- a/nym-vpn-apple/Services/Sources/Services/ConfigurationManager/ConfigurationManager.swift +++ b/nym-vpn-apple/Services/Sources/Services/ConfigurationManager/ConfigurationManager.swift @@ -112,11 +112,7 @@ public final class ConfigurationManager { Task(priority: .background) { do { #if os(iOS) - let links = try fetchAccountLinks( - accountStorePath: credentialsManager.dataFolderURL().path(), - networkName: currentEnv.rawValue, - locale: Locale.current.region?.identifier.lowercased() ?? "en" - ) + let links = try getAccountLinks(locale: Locale.current.region?.identifier.lowercased() ?? "en") Task { @MainActor in accountLinks = AccountLinks(account: links.account, signIn: links.signIn, signUp: links.signUp) } diff --git a/nym-vpn-apple/Services/Sources/Services/Constants/Constants.swift b/nym-vpn-apple/Services/Sources/Services/Constants/Constants.swift index 5c5bac3518..9b04cfb848 100644 --- a/nym-vpn-apple/Services/Sources/Services/Constants/Constants.swift +++ b/nym-vpn-apple/Services/Sources/Services/Constants/Constants.swift @@ -4,13 +4,13 @@ public enum Constants: String { case groupID = "group.net.nymtech.vpn" case helperName = "net.nymtech.vpn.helper" - case supportURL = "https://support.nymvpn.com/hc/en-us" - case termsOfUseURL = "https://nymvpn.com/en/terms" - case privacyPolicyURL = "https://nymvpn.com/en/privacy?type=apps" - case emailLink = "https://support.nymvpn.com/hc/en-us/requests/new" + case supportURL = "https://support.nym.com/hc" + case termsOfUseURL = "https://nym.com/vpn-terms" + case privacyPolicyURL = "https://nym.com/vpn-privacy-statement" + case emailLink = "https://support.nym.com/hc/requests/new" - case discordLink = "https://nymtech.net/go/discord" - case ghIssuesLink = "https://www.nymtech.net/go/github/nym-vpn-client/issues" + case discordLink = "https://nym.com/go/discord" + case ghIssuesLink = "https://nym.com/go/github/nym-vpn-client/issues" case logFileName = "Logs.log" } diff --git a/nym-vpn-apple/Services/Sources/Services/CredentialsManager/CredentialsManager.swift b/nym-vpn-apple/Services/Sources/Services/CredentialsManager/CredentialsManager.swift index f95d24175a..4d72bd0684 100644 --- a/nym-vpn-apple/Services/Sources/Services/CredentialsManager/CredentialsManager.swift +++ b/nym-vpn-apple/Services/Sources/Services/CredentialsManager/CredentialsManager.swift @@ -42,7 +42,8 @@ public final class CredentialsManager { if !FileManager.default.fileExists(atPath: dataFolderURL.path()) { try FileManager.default.createDirectory(at: dataFolderURL, withIntermediateDirectories: true) } - try storeAccountMnemonic(mnemonic: credential, path: dataFolderURL.path()) + + try storeAccountMnemonicRaw(mnemonic: credential, path: dataFolderURL.path()) #elseif os(macOS) try? await helperInstallManager.installIfNeeded() try await grpcManager.storeAccount(with: credential) @@ -66,7 +67,7 @@ public final class CredentialsManager { do { #if os(iOS) let dataFolderURL = try dataFolderURL() - try forgetAccount(path: dataFolderURL.path()) + try forgetAccountRaw(path: dataFolderURL.path()) #endif #if os(macOS) @@ -129,7 +130,7 @@ private extension CredentialsManager { let isImported: Bool #if os(iOS) let dataFolderURL = try dataFolderURL() - isImported = try isAccountMnemonicStored(path: dataFolderURL.path()) + isImported = try isAccountMnemonicStoredRaw(path: dataFolderURL.path()) #elseif os(macOS) isImported = try await grpcManager.isAccountStored() #endif @@ -154,7 +155,7 @@ private extension CredentialsManager { Task(priority: .background) { #if os(iOS) let dataFolderURL = try dataFolderURL() - deviceIdentifier = try? getDeviceIdentity(path: dataFolderURL.path()) + deviceIdentifier = try? getDeviceIdentityRaw(path: dataFolderURL.path()) #elseif os(macOS) deviceIdentifier = try? await grpcManager.deviceIdentifier() #endif diff --git a/nym-vpn-apple/Services/Sources/Services/TunnelMixnet/Config/MixnetConfig.swift b/nym-vpn-apple/Services/Sources/Services/TunnelMixnet/Config/MixnetConfig.swift index c6b89c28c7..553cb392a4 100644 --- a/nym-vpn-apple/Services/Sources/Services/TunnelMixnet/Config/MixnetConfig.swift +++ b/nym-vpn-apple/Services/Sources/Services/TunnelMixnet/Config/MixnetConfig.swift @@ -5,6 +5,7 @@ import ConnectionTypes import CountriesManager import CredentialsManager #if os(iOS) +import AppVersionProvider import ConfigurationManager import MixnetLibrary #endif @@ -58,7 +59,14 @@ extension MixnetConfig { tunProvider: tunProvider, credentialDataPath: credentialsDataPath, tunStatusListener: tunStatusListener, - credentialMode: nil + credentialMode: nil, + statisticsRecipient: nil, + userAgent: UserAgent( + application: AppVersionProvider.app, + version: "\(AppVersionProvider.appVersion()) (\(AppVersionProvider.libVersion))", + platform: AppVersionProvider.platform, + gitCommit: "" + ) ) } } diff --git a/nym-vpn-apple/ServicesIOS/Sources/ErrorHandler/VPNErrorReason.swift b/nym-vpn-apple/ServicesIOS/Sources/ErrorHandler/VPNErrorReason.swift index ad4e48fccf..dcd2804fbb 100644 --- a/nym-vpn-apple/ServicesIOS/Sources/ErrorHandler/VPNErrorReason.swift +++ b/nym-vpn-apple/ServicesIOS/Sources/ErrorHandler/VPNErrorReason.swift @@ -25,6 +25,7 @@ public enum VPNErrorReason: LocalizedError { case invalidAccountStoragePath(details: String) case requestZkNym(successes: [String], failed: [RequestZkNymFailure]) case unkownTunnelState + case statisticsRecipient public static let domain = "ErrorHandler.VPNErrorReason" @@ -94,6 +95,8 @@ public enum VPNErrorReason: LocalizedError { RequestZkNymFailure(message: $0.message, messageId: $0.messageId, ticketType: $0.ticketType) } self = .requestZkNym(successes: newSuccesses, failed: newFailed) + case .StatisticsRecipient: + self = .statisticsRecipient } } @@ -253,8 +256,10 @@ private extension VPNErrorReason { return 19 case .requestZkNym: return 20 - case .unkownTunnelState: + case .statisticsRecipient: return 21 + case .unkownTunnelState: + return 22 } } @@ -299,6 +304,8 @@ private extension VPNErrorReason { let successText = successes.first ?? "" let failuresText = failures.first ?? "" return "\(successText) \(failuresText)" + case .statisticsRecipient: + return "The VPN statistics recipient is not available." case .unkownTunnelState: return "Unknown tunnel error reason." } diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Connection.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Connection.swift index ee63355415..e0936a0057 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Connection.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Connection.swift @@ -1,4 +1,5 @@ import GRPC +import SwiftProtobuf import Constants import ConnectionTypes @@ -67,9 +68,9 @@ private extension GRPCManager { gateway.id = identifier entryNode.gateway = gateway case .randomLowLatency: - entryNode.randomLowLatency = Nym_Vpn_Empty() + entryNode.randomLowLatency = Google_Protobuf_Empty() case .random: - entryNode.random = Nym_Vpn_Empty() + entryNode.random = Google_Protobuf_Empty() } return entryNode } diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Credentials.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Credentials.swift index 2a5be9119f..d82a0d3cca 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Credentials.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Credentials.swift @@ -1,5 +1,6 @@ import Constants import GRPC +import SwiftProtobuf extension GRPCManager { public func storeAccount(with mnemonic: String) async throws { @@ -23,32 +24,11 @@ extension GRPCManager { } } - public func removeAccount() async throws -> Bool { - logger.log(level: .info, "Removing credentials") - - return try await withCheckedThrowingContinuation { continuation in - let call = client.removeAccount(Nym_Vpn_RemoveAccountRequest()) - - call.response.whenComplete { result in - switch result { - case .success(let response): - if response.hasError { - continuation.resume(throwing: GeneralNymError.library(message: response.error.message)) - } else { - continuation.resume(returning: response.success) - } - case .failure(let error): - continuation.resume(throwing: error) - } - } - } - } - public func forgetAccount() async throws { logger.log(level: .info, "Forgetting credentials") return try await withCheckedThrowingContinuation { continuation in - let call = client.forgetAccount(Nym_Vpn_ForgetAccountRequest()) + let call = client.forgetAccount(Google_Protobuf_Empty()) call.response.whenComplete { result in switch result { @@ -73,7 +53,7 @@ extension GRPCManager { return try await withCheckedThrowingContinuation { continuation in let call = client.isAccountStored( - Nym_Vpn_IsAccountStoredRequest(), + Google_Protobuf_Empty(), callOptions: CallOptions(timeLimit: .timeout(.seconds(5))) ) diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Devices.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Devices.swift index 7eac3f7ac8..c52969473b 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Devices.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+Devices.swift @@ -1,9 +1,10 @@ import GRPC +import SwiftProtobuf extension GRPCManager { public func deviceIdentifier() async throws -> String { try await withCheckedThrowingContinuation { continuation in - let call = client.getDeviceIdentity(Nym_Vpn_GetDeviceIdentityRequest()) + let call = client.getDeviceIdentity(Google_Protobuf_Empty()) call.response.whenComplete { result in switch result { diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+ErrorMapping.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+ErrorMapping.swift index 0beed450fd..29ada30480 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+ErrorMapping.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+ErrorMapping.swift @@ -34,7 +34,7 @@ extension GRPCManager { case .gatewayDirectoryExitLocation: GeneralNymError.library(message: error.message) case .gatewayDirectorySameEntryAndExitGw: - GeneralNymError.library(message: error.message) + GeneralNymError.library(message: "errorReason.sameEntryAndExitGateway".localizedString) case .outOfBandwidth: GeneralNymError.library(message: error.message) case .mixnetStoragePaths: diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+SystemMessages.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+SystemMessages.swift index 6f44287f31..8cd41ce459 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+SystemMessages.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager+SystemMessages.swift @@ -1,4 +1,5 @@ import GRPC +import SwiftProtobuf import SystemMessageModels extension GRPCManager { @@ -6,7 +7,8 @@ extension GRPCManager { logger.log(level: .info, "Checking if stored account") return try await withCheckedThrowingContinuation { continuation in - let call = client.getSystemMessages(Nym_Vpn_GetSystemMessagesRequest()) + + let call = client.getSystemMessages(Google_Protobuf_Empty()) call.response.whenComplete { result in switch result { diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager.swift index 5f1d3049aa..5c51e494d1 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/GRPCManager.swift @@ -70,7 +70,7 @@ public final class GRPCManager: ObservableObject { public func version() async throws { logger.log(level: .info, "Version") return try await withCheckedThrowingContinuation { continuation in - let call = client.info(Nym_Vpn_InfoRequest(), callOptions: CallOptions(timeLimit: .timeout(.seconds(5)))) + let call = client.info(Google_Protobuf_Empty(), callOptions: CallOptions(timeLimit: .timeout(.seconds(5)))) call.response.whenComplete { [weak self] result in switch result { @@ -89,8 +89,7 @@ public final class GRPCManager: ObservableObject { public func status() { logger.log(level: .info, "Status") - let request = Nym_Vpn_StatusRequest() - let call = client.vpnStatus(request) + let call = client.vpnStatus(Google_Protobuf_Empty()) call.response.whenComplete { [weak self] result in switch result { @@ -109,8 +108,7 @@ public final class GRPCManager: ObservableObject { public func isReadyToConnect() { logger.log(level: .info, "isReadyToConnect") - let request = Nym_Vpn_IsReadyToConnectRequest() - let call = client.isReadyToConnect(request) + let call = client.isReadyToConnect(Google_Protobuf_Empty()) call.response.whenComplete { [weak self] result in switch result { case .success(let response): @@ -125,9 +123,8 @@ public final class GRPCManager: ObservableObject { public func disconnect() { logger.log(level: .info, "Disconnecting") - let request = Nym_Vpn_DisconnectRequest() - let call = client.vpnDisconnect(request) + let call = client.vpnDisconnect(Google_Protobuf_Empty()) call.response.whenComplete { result in switch result { @@ -234,7 +231,7 @@ public final class GRPCManager: ObservableObject { // MARK: - Private - private extension GRPCManager { func setupListenToConnectionStateObserver() { - let call = client.listenToConnectionStateChanges(Nym_Vpn_Empty()) { [weak self] connectionStateChange in + let call = client.listenToConnectionStateChanges(Google_Protobuf_Empty()) { [weak self] connectionStateChange in guard let self else { return } updateTunnelStatus(with: connectionStateChange.status) @@ -260,7 +257,7 @@ private extension GRPCManager { } func setupListenToConnectionStatusObserver() { - let call = client.listenToConnectionStatus(Nym_Vpn_Empty()) { connectionStatusUpdate in + let call = client.listenToConnectionStatus(Google_Protobuf_Empty()) { connectionStatusUpdate in // TODO: print("DO ME 2 \(connectionStatusUpdate)") } diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.grpc.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.grpc.swift index 4419995d22..4e0a3a8f0f 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.grpc.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.grpc.swift @@ -17,9 +17,9 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { var interceptors: Nym_Vpn_NymVpndClientInterceptorFactoryProtocol? { get } func info( - _ request: Nym_Vpn_InfoRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func setNetwork( _ request: Nym_Vpn_SetNetworkRequest, @@ -27,14 +27,14 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func getSystemMessages( - _ request: Nym_Vpn_GetSystemMessagesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getFeatureFlags( - _ request: Nym_Vpn_GetFeatureFlagsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func vpnConnect( _ request: Nym_Vpn_ConnectRequest, @@ -42,26 +42,26 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func vpnDisconnect( - _ request: Nym_Vpn_DisconnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func vpnStatus( - _ request: Nym_Vpn_StatusRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func listenToConnectionStateChanges( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions?, handler: @escaping (Nym_Vpn_ConnectionStateChange) -> Void - ) -> ServerStreamingCall + ) -> ServerStreamingCall func listenToConnectionStatus( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions?, handler: @escaping (Nym_Vpn_ConnectionStatusUpdate) -> Void - ) -> ServerStreamingCall + ) -> ServerStreamingCall func listGateways( _ request: Nym_Vpn_ListGatewaysRequest, @@ -79,24 +79,19 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func isAccountStored( - _ request: Nym_Vpn_IsAccountStoredRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall - - func removeAccount( - _ request: Nym_Vpn_RemoveAccountRequest, - callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func forgetAccount( - _ request: Nym_Vpn_ForgetAccountRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getAccountIdentity( - _ request: Nym_Vpn_GetAccountIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getAccountLinks( _ request: Nym_Vpn_GetAccountLinksRequest, @@ -104,24 +99,24 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func getAccountState( - _ request: Nym_Vpn_GetAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func refreshAccountState( - _ request: Nym_Vpn_RefreshAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getAccountUsage( - _ request: Nym_Vpn_GetAccountUsageRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func isReadyToConnect( - _ request: Nym_Vpn_IsReadyToConnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func resetDeviceIdentity( _ request: Nym_Vpn_ResetDeviceIdentityRequest, @@ -129,39 +124,39 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func getDeviceIdentity( - _ request: Nym_Vpn_GetDeviceIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func registerDevice( - _ request: Nym_Vpn_RegisterDeviceRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getDevices( - _ request: Nym_Vpn_GetDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getActiveDevices( - _ request: Nym_Vpn_GetActiveDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func requestZkNym( - _ request: Nym_Vpn_RequestZkNymRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getDeviceZkNyms( - _ request: Nym_Vpn_GetDeviceZkNymsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getZkNymsAvailableForDownload( - _ request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall func getZkNymById( _ request: Nym_Vpn_GetZkNymByIdRequest, @@ -174,19 +169,9 @@ internal protocol Nym_Vpn_NymVpndClientProtocol: GRPCClient { ) -> UnaryCall func getAvailableTickets( - _ request: Nym_Vpn_GetAvailableTicketsRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func fetchRawAccountSummary( - _ request: Nym_Vpn_FetchRawAccountSummaryRequest, - callOptions: CallOptions? - ) -> UnaryCall - - func fetchRawDevices( - _ request: Nym_Vpn_FetchRawDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> UnaryCall + ) -> UnaryCall } extension Nym_Vpn_NymVpndClientProtocol { @@ -201,9 +186,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func info( - _ request: Nym_Vpn_InfoRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.info.path, request: request, @@ -237,9 +222,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getSystemMessages( - _ request: Nym_Vpn_GetSystemMessagesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getSystemMessages.path, request: request, @@ -255,9 +240,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getFeatureFlags( - _ request: Nym_Vpn_GetFeatureFlagsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getFeatureFlags.path, request: request, @@ -291,9 +276,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func vpnDisconnect( - _ request: Nym_Vpn_DisconnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.vpnDisconnect.path, request: request, @@ -309,9 +294,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func vpnStatus( - _ request: Nym_Vpn_StatusRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.vpnStatus.path, request: request, @@ -329,10 +314,10 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - handler: A closure called when each response is received from the server. /// - Returns: A `ServerStreamingCall` with futures for the metadata and status. internal func listenToConnectionStateChanges( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil, handler: @escaping (Nym_Vpn_ConnectionStateChange) -> Void - ) -> ServerStreamingCall { + ) -> ServerStreamingCall { return self.makeServerStreamingCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.listenToConnectionStateChanges.path, request: request, @@ -351,10 +336,10 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - handler: A closure called when each response is received from the server. /// - Returns: A `ServerStreamingCall` with futures for the metadata and status. internal func listenToConnectionStatus( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil, handler: @escaping (Nym_Vpn_ConnectionStatusUpdate) -> Void - ) -> ServerStreamingCall { + ) -> ServerStreamingCall { return self.makeServerStreamingCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.listenToConnectionStatus.path, request: request, @@ -425,9 +410,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func isAccountStored( - _ request: Nym_Vpn_IsAccountStoredRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.isAccountStored.path, request: request, @@ -436,24 +421,6 @@ extension Nym_Vpn_NymVpndClientProtocol { ) } - /// Remove the recovery phrase from local storage - /// - /// - Parameters: - /// - request: Request to send to RemoveAccount. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - internal func removeAccount( - _ request: Nym_Vpn_RemoveAccountRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.removeAccount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeRemoveAccountInterceptors() ?? [] - ) - } - /// Removes everything related to the account, including the device identity, /// credential storage, mixnet keys, gateway registrations. /// @@ -462,9 +429,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func forgetAccount( - _ request: Nym_Vpn_ForgetAccountRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.forgetAccount.path, request: request, @@ -480,9 +447,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getAccountIdentity( - _ request: Nym_Vpn_GetAccountIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountIdentity.path, request: request, @@ -517,9 +484,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getAccountState( - _ request: Nym_Vpn_GetAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountState.path, request: request, @@ -536,9 +503,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func refreshAccountState( - _ request: Nym_Vpn_RefreshAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.refreshAccountState.path, request: request, @@ -554,9 +521,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getAccountUsage( - _ request: Nym_Vpn_GetAccountUsageRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountUsage.path, request: request, @@ -572,9 +539,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func isReadyToConnect( - _ request: Nym_Vpn_IsReadyToConnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.isReadyToConnect.path, request: request, @@ -608,9 +575,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getDeviceIdentity( - _ request: Nym_Vpn_GetDeviceIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDeviceIdentity.path, request: request, @@ -626,9 +593,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func registerDevice( - _ request: Nym_Vpn_RegisterDeviceRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.registerDevice.path, request: request, @@ -644,9 +611,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getDevices( - _ request: Nym_Vpn_GetDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDevices.path, request: request, @@ -662,9 +629,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getActiveDevices( - _ request: Nym_Vpn_GetActiveDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getActiveDevices.path, request: request, @@ -680,9 +647,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func requestZkNym( - _ request: Nym_Vpn_RequestZkNymRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.requestZkNym.path, request: request, @@ -698,9 +665,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getDeviceZkNyms( - _ request: Nym_Vpn_GetDeviceZkNymsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDeviceZkNyms.path, request: request, @@ -716,9 +683,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getZkNymsAvailableForDownload( - _ request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getZkNymsAvailableForDownload.path, request: request, @@ -770,9 +737,9 @@ extension Nym_Vpn_NymVpndClientProtocol { /// - callOptions: Call options. /// - Returns: A `UnaryCall` with futures for the metadata, status and response. internal func getAvailableTickets( - _ request: Nym_Vpn_GetAvailableTicketsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> UnaryCall { + ) -> UnaryCall { return self.makeUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAvailableTickets.path, request: request, @@ -780,42 +747,6 @@ extension Nym_Vpn_NymVpndClientProtocol { interceptors: self.interceptors?.makeGetAvailableTicketsInterceptors() ?? [] ) } - - /// Get the server side account summary directly from the nym-vpn-api - /// - /// - Parameters: - /// - request: Request to send to FetchRawAccountSummary. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - internal func fetchRawAccountSummary( - _ request: Nym_Vpn_FetchRawAccountSummaryRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawAccountSummary.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawAccountSummaryInterceptors() ?? [] - ) - } - - /// Get the list of devices directly from the nym-vpn-api - /// - /// - Parameters: - /// - request: Request to send to FetchRawDevices. - /// - callOptions: Call options. - /// - Returns: A `UnaryCall` with futures for the metadata, status and response. - internal func fetchRawDevices( - _ request: Nym_Vpn_FetchRawDevicesRequest, - callOptions: CallOptions? = nil - ) -> UnaryCall { - return self.makeUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawDevices.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawDevicesInterceptors() ?? [] - ) - } } @available(*, deprecated) @@ -881,9 +812,9 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { var interceptors: Nym_Vpn_NymVpndClientInterceptorFactoryProtocol? { get } func makeInfoCall( - _ request: Nym_Vpn_InfoRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeSetNetworkCall( _ request: Nym_Vpn_SetNetworkRequest, @@ -891,14 +822,14 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeGetSystemMessagesCall( - _ request: Nym_Vpn_GetSystemMessagesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetFeatureFlagsCall( - _ request: Nym_Vpn_GetFeatureFlagsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeVpnConnectCall( _ request: Nym_Vpn_ConnectRequest, @@ -906,24 +837,24 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeVpnDisconnectCall( - _ request: Nym_Vpn_DisconnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeVpnStatusCall( - _ request: Nym_Vpn_StatusRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeListenToConnectionStateChangesCall( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncServerStreamingCall + ) -> GRPCAsyncServerStreamingCall func makeListenToConnectionStatusCall( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncServerStreamingCall + ) -> GRPCAsyncServerStreamingCall func makeListGatewaysCall( _ request: Nym_Vpn_ListGatewaysRequest, @@ -941,24 +872,19 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeIsAccountStoredCall( - _ request: Nym_Vpn_IsAccountStoredRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeRemoveAccountCall( - _ request: Nym_Vpn_RemoveAccountRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeForgetAccountCall( - _ request: Nym_Vpn_ForgetAccountRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetAccountIdentityCall( - _ request: Nym_Vpn_GetAccountIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetAccountLinksCall( _ request: Nym_Vpn_GetAccountLinksRequest, @@ -966,24 +892,24 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeGetAccountStateCall( - _ request: Nym_Vpn_GetAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeRefreshAccountStateCall( - _ request: Nym_Vpn_RefreshAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetAccountUsageCall( - _ request: Nym_Vpn_GetAccountUsageRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeIsReadyToConnectCall( - _ request: Nym_Vpn_IsReadyToConnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeResetDeviceIdentityCall( _ request: Nym_Vpn_ResetDeviceIdentityRequest, @@ -991,39 +917,39 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeGetDeviceIdentityCall( - _ request: Nym_Vpn_GetDeviceIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeRegisterDeviceCall( - _ request: Nym_Vpn_RegisterDeviceRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetDevicesCall( - _ request: Nym_Vpn_GetDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetActiveDevicesCall( - _ request: Nym_Vpn_GetActiveDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeRequestZkNymCall( - _ request: Nym_Vpn_RequestZkNymRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetDeviceZkNymsCall( - _ request: Nym_Vpn_GetDeviceZkNymsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetZkNymsAvailableForDownloadCall( - _ request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall func makeGetZkNymByIDCall( _ request: Nym_Vpn_GetZkNymByIdRequest, @@ -1036,19 +962,9 @@ internal protocol Nym_Vpn_NymVpndAsyncClientProtocol: GRPCClient { ) -> GRPCAsyncUnaryCall func makeGetAvailableTicketsCall( - _ request: Nym_Vpn_GetAvailableTicketsRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeFetchRawAccountSummaryCall( - _ request: Nym_Vpn_FetchRawAccountSummaryRequest, - callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall - - func makeFetchRawDevicesCall( - _ request: Nym_Vpn_FetchRawDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? - ) -> GRPCAsyncUnaryCall + ) -> GRPCAsyncUnaryCall } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @@ -1062,9 +978,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeInfoCall( - _ request: Nym_Vpn_InfoRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.info.path, request: request, @@ -1086,9 +1002,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetSystemMessagesCall( - _ request: Nym_Vpn_GetSystemMessagesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getSystemMessages.path, request: request, @@ -1098,9 +1014,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetFeatureFlagsCall( - _ request: Nym_Vpn_GetFeatureFlagsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getFeatureFlags.path, request: request, @@ -1122,9 +1038,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeVpnDisconnectCall( - _ request: Nym_Vpn_DisconnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.vpnDisconnect.path, request: request, @@ -1134,9 +1050,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeVpnStatusCall( - _ request: Nym_Vpn_StatusRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.vpnStatus.path, request: request, @@ -1146,9 +1062,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeListenToConnectionStateChangesCall( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncServerStreamingCall { + ) -> GRPCAsyncServerStreamingCall { return self.makeAsyncServerStreamingCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.listenToConnectionStateChanges.path, request: request, @@ -1158,9 +1074,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeListenToConnectionStatusCall( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncServerStreamingCall { + ) -> GRPCAsyncServerStreamingCall { return self.makeAsyncServerStreamingCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.listenToConnectionStatus.path, request: request, @@ -1206,9 +1122,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeIsAccountStoredCall( - _ request: Nym_Vpn_IsAccountStoredRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.isAccountStored.path, request: request, @@ -1217,22 +1133,10 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { ) } - internal func makeRemoveAccountCall( - _ request: Nym_Vpn_RemoveAccountRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.removeAccount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeRemoveAccountInterceptors() ?? [] - ) - } - internal func makeForgetAccountCall( - _ request: Nym_Vpn_ForgetAccountRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.forgetAccount.path, request: request, @@ -1242,9 +1146,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetAccountIdentityCall( - _ request: Nym_Vpn_GetAccountIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountIdentity.path, request: request, @@ -1266,9 +1170,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetAccountStateCall( - _ request: Nym_Vpn_GetAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountState.path, request: request, @@ -1278,9 +1182,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeRefreshAccountStateCall( - _ request: Nym_Vpn_RefreshAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.refreshAccountState.path, request: request, @@ -1290,9 +1194,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetAccountUsageCall( - _ request: Nym_Vpn_GetAccountUsageRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAccountUsage.path, request: request, @@ -1302,9 +1206,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeIsReadyToConnectCall( - _ request: Nym_Vpn_IsReadyToConnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.isReadyToConnect.path, request: request, @@ -1326,9 +1230,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetDeviceIdentityCall( - _ request: Nym_Vpn_GetDeviceIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDeviceIdentity.path, request: request, @@ -1338,9 +1242,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeRegisterDeviceCall( - _ request: Nym_Vpn_RegisterDeviceRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.registerDevice.path, request: request, @@ -1350,9 +1254,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetDevicesCall( - _ request: Nym_Vpn_GetDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDevices.path, request: request, @@ -1362,9 +1266,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetActiveDevicesCall( - _ request: Nym_Vpn_GetActiveDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getActiveDevices.path, request: request, @@ -1374,9 +1278,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeRequestZkNymCall( - _ request: Nym_Vpn_RequestZkNymRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.requestZkNym.path, request: request, @@ -1386,9 +1290,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetDeviceZkNymsCall( - _ request: Nym_Vpn_GetDeviceZkNymsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getDeviceZkNyms.path, request: request, @@ -1398,9 +1302,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetZkNymsAvailableForDownloadCall( - _ request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getZkNymsAvailableForDownload.path, request: request, @@ -1434,9 +1338,9 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func makeGetAvailableTicketsCall( - _ request: Nym_Vpn_GetAvailableTicketsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { + ) -> GRPCAsyncUnaryCall { return self.makeAsyncUnaryCall( path: Nym_Vpn_NymVpndClientMetadata.Methods.getAvailableTickets.path, request: request, @@ -1444,36 +1348,12 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { interceptors: self.interceptors?.makeGetAvailableTicketsInterceptors() ?? [] ) } - - internal func makeFetchRawAccountSummaryCall( - _ request: Nym_Vpn_FetchRawAccountSummaryRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawAccountSummary.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawAccountSummaryInterceptors() ?? [] - ) - } - - internal func makeFetchRawDevicesCall( - _ request: Nym_Vpn_FetchRawDevicesRequest, - callOptions: CallOptions? = nil - ) -> GRPCAsyncUnaryCall { - return self.makeAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawDevices.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawDevicesInterceptors() ?? [] - ) - } } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) extension Nym_Vpn_NymVpndAsyncClientProtocol { internal func info( - _ request: Nym_Vpn_InfoRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_InfoResponse { return try await self.performAsyncUnaryCall( @@ -1497,7 +1377,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getSystemMessages( - _ request: Nym_Vpn_GetSystemMessagesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetSystemMessagesResponse { return try await self.performAsyncUnaryCall( @@ -1509,7 +1389,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getFeatureFlags( - _ request: Nym_Vpn_GetFeatureFlagsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetFeatureFlagsResponse { return try await self.performAsyncUnaryCall( @@ -1533,7 +1413,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func vpnDisconnect( - _ request: Nym_Vpn_DisconnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_DisconnectResponse { return try await self.performAsyncUnaryCall( @@ -1545,7 +1425,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func vpnStatus( - _ request: Nym_Vpn_StatusRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_StatusResponse { return try await self.performAsyncUnaryCall( @@ -1557,7 +1437,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func listenToConnectionStateChanges( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) -> GRPCAsyncResponseStream { return self.performAsyncServerStreamingCall( @@ -1569,7 +1449,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func listenToConnectionStatus( - _ request: Nym_Vpn_Empty, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) -> GRPCAsyncResponseStream { return self.performAsyncServerStreamingCall( @@ -1617,7 +1497,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func isAccountStored( - _ request: Nym_Vpn_IsAccountStoredRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_IsAccountStoredResponse { return try await self.performAsyncUnaryCall( @@ -1628,20 +1508,8 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { ) } - internal func removeAccount( - _ request: Nym_Vpn_RemoveAccountRequest, - callOptions: CallOptions? = nil - ) async throws -> Nym_Vpn_RemoveAccountResponse { - return try await self.performAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.removeAccount.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeRemoveAccountInterceptors() ?? [] - ) - } - internal func forgetAccount( - _ request: Nym_Vpn_ForgetAccountRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_ForgetAccountResponse { return try await self.performAsyncUnaryCall( @@ -1653,7 +1521,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getAccountIdentity( - _ request: Nym_Vpn_GetAccountIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetAccountIdentityResponse { return try await self.performAsyncUnaryCall( @@ -1677,7 +1545,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getAccountState( - _ request: Nym_Vpn_GetAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetAccountStateResponse { return try await self.performAsyncUnaryCall( @@ -1689,7 +1557,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func refreshAccountState( - _ request: Nym_Vpn_RefreshAccountStateRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_RefreshAccountStateResponse { return try await self.performAsyncUnaryCall( @@ -1701,7 +1569,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getAccountUsage( - _ request: Nym_Vpn_GetAccountUsageRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetAccountUsageResponse { return try await self.performAsyncUnaryCall( @@ -1713,7 +1581,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func isReadyToConnect( - _ request: Nym_Vpn_IsReadyToConnectRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_IsReadyToConnectResponse { return try await self.performAsyncUnaryCall( @@ -1737,7 +1605,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getDeviceIdentity( - _ request: Nym_Vpn_GetDeviceIdentityRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetDeviceIdentityResponse { return try await self.performAsyncUnaryCall( @@ -1749,7 +1617,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func registerDevice( - _ request: Nym_Vpn_RegisterDeviceRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_RegisterDeviceResponse { return try await self.performAsyncUnaryCall( @@ -1761,7 +1629,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getDevices( - _ request: Nym_Vpn_GetDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetDevicesResponse { return try await self.performAsyncUnaryCall( @@ -1773,7 +1641,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getActiveDevices( - _ request: Nym_Vpn_GetActiveDevicesRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetActiveDevicesResponse { return try await self.performAsyncUnaryCall( @@ -1785,7 +1653,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func requestZkNym( - _ request: Nym_Vpn_RequestZkNymRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_RequestZkNymResponse { return try await self.performAsyncUnaryCall( @@ -1797,7 +1665,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getDeviceZkNyms( - _ request: Nym_Vpn_GetDeviceZkNymsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetDeviceZkNymsResponse { return try await self.performAsyncUnaryCall( @@ -1809,7 +1677,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getZkNymsAvailableForDownload( - _ request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetZkNymsAvailableForDownloadResponse { return try await self.performAsyncUnaryCall( @@ -1845,7 +1713,7 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { } internal func getAvailableTickets( - _ request: Nym_Vpn_GetAvailableTicketsRequest, + _ request: SwiftProtobuf.Google_Protobuf_Empty, callOptions: CallOptions? = nil ) async throws -> Nym_Vpn_GetAvailableTicketsResponse { return try await self.performAsyncUnaryCall( @@ -1855,30 +1723,6 @@ extension Nym_Vpn_NymVpndAsyncClientProtocol { interceptors: self.interceptors?.makeGetAvailableTicketsInterceptors() ?? [] ) } - - internal func fetchRawAccountSummary( - _ request: Nym_Vpn_FetchRawAccountSummaryRequest, - callOptions: CallOptions? = nil - ) async throws -> Nym_Vpn_FetchRawAccountSummaryResponse { - return try await self.performAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawAccountSummary.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawAccountSummaryInterceptors() ?? [] - ) - } - - internal func fetchRawDevices( - _ request: Nym_Vpn_FetchRawDevicesRequest, - callOptions: CallOptions? = nil - ) async throws -> Nym_Vpn_FetchRawDevicesResponse { - return try await self.performAsyncUnaryCall( - path: Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawDevices.path, - request: request, - callOptions: callOptions ?? self.defaultCallOptions, - interceptors: self.interceptors?.makeFetchRawDevicesInterceptors() ?? [] - ) - } } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @@ -1901,31 +1745,31 @@ internal struct Nym_Vpn_NymVpndAsyncClient: Nym_Vpn_NymVpndAsyncClientProtocol { internal protocol Nym_Vpn_NymVpndClientInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when invoking 'info'. - func makeInfoInterceptors() -> [ClientInterceptor] + func makeInfoInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'setNetwork'. func makeSetNetworkInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getSystemMessages'. - func makeGetSystemMessagesInterceptors() -> [ClientInterceptor] + func makeGetSystemMessagesInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getFeatureFlags'. - func makeGetFeatureFlagsInterceptors() -> [ClientInterceptor] + func makeGetFeatureFlagsInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'vpnConnect'. func makeVpnConnectInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'vpnDisconnect'. - func makeVpnDisconnectInterceptors() -> [ClientInterceptor] + func makeVpnDisconnectInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'vpnStatus'. - func makeVpnStatusInterceptors() -> [ClientInterceptor] + func makeVpnStatusInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'listenToConnectionStateChanges'. - func makeListenToConnectionStateChangesInterceptors() -> [ClientInterceptor] + func makeListenToConnectionStateChangesInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'listenToConnectionStatus'. - func makeListenToConnectionStatusInterceptors() -> [ClientInterceptor] + func makeListenToConnectionStatusInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'listGateways'. func makeListGatewaysInterceptors() -> [ClientInterceptor] @@ -1937,55 +1781,52 @@ internal protocol Nym_Vpn_NymVpndClientInterceptorFactoryProtocol: Sendable { func makeStoreAccountInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'isAccountStored'. - func makeIsAccountStoredInterceptors() -> [ClientInterceptor] - - /// - Returns: Interceptors to use when invoking 'removeAccount'. - func makeRemoveAccountInterceptors() -> [ClientInterceptor] + func makeIsAccountStoredInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'forgetAccount'. - func makeForgetAccountInterceptors() -> [ClientInterceptor] + func makeForgetAccountInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getAccountIdentity'. - func makeGetAccountIdentityInterceptors() -> [ClientInterceptor] + func makeGetAccountIdentityInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getAccountLinks'. func makeGetAccountLinksInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getAccountState'. - func makeGetAccountStateInterceptors() -> [ClientInterceptor] + func makeGetAccountStateInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'refreshAccountState'. - func makeRefreshAccountStateInterceptors() -> [ClientInterceptor] + func makeRefreshAccountStateInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getAccountUsage'. - func makeGetAccountUsageInterceptors() -> [ClientInterceptor] + func makeGetAccountUsageInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'isReadyToConnect'. - func makeIsReadyToConnectInterceptors() -> [ClientInterceptor] + func makeIsReadyToConnectInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'resetDeviceIdentity'. func makeResetDeviceIdentityInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getDeviceIdentity'. - func makeGetDeviceIdentityInterceptors() -> [ClientInterceptor] + func makeGetDeviceIdentityInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'registerDevice'. - func makeRegisterDeviceInterceptors() -> [ClientInterceptor] + func makeRegisterDeviceInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getDevices'. - func makeGetDevicesInterceptors() -> [ClientInterceptor] + func makeGetDevicesInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getActiveDevices'. - func makeGetActiveDevicesInterceptors() -> [ClientInterceptor] + func makeGetActiveDevicesInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'requestZkNym'. - func makeRequestZkNymInterceptors() -> [ClientInterceptor] + func makeRequestZkNymInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getDeviceZkNyms'. - func makeGetDeviceZkNymsInterceptors() -> [ClientInterceptor] + func makeGetDeviceZkNymsInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getZkNymsAvailableForDownload'. - func makeGetZkNymsAvailableForDownloadInterceptors() -> [ClientInterceptor] + func makeGetZkNymsAvailableForDownloadInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getZkNymById'. func makeGetZkNymByIdInterceptors() -> [ClientInterceptor] @@ -1994,13 +1835,7 @@ internal protocol Nym_Vpn_NymVpndClientInterceptorFactoryProtocol: Sendable { func makeConfirmZkNymDownloadedInterceptors() -> [ClientInterceptor] /// - Returns: Interceptors to use when invoking 'getAvailableTickets'. - func makeGetAvailableTicketsInterceptors() -> [ClientInterceptor] - - /// - Returns: Interceptors to use when invoking 'fetchRawAccountSummary'. - func makeFetchRawAccountSummaryInterceptors() -> [ClientInterceptor] - - /// - Returns: Interceptors to use when invoking 'fetchRawDevices'. - func makeFetchRawDevicesInterceptors() -> [ClientInterceptor] + func makeGetAvailableTicketsInterceptors() -> [ClientInterceptor] } internal enum Nym_Vpn_NymVpndClientMetadata { @@ -2021,7 +1856,6 @@ internal enum Nym_Vpn_NymVpndClientMetadata { Nym_Vpn_NymVpndClientMetadata.Methods.listCountries, Nym_Vpn_NymVpndClientMetadata.Methods.storeAccount, Nym_Vpn_NymVpndClientMetadata.Methods.isAccountStored, - Nym_Vpn_NymVpndClientMetadata.Methods.removeAccount, Nym_Vpn_NymVpndClientMetadata.Methods.forgetAccount, Nym_Vpn_NymVpndClientMetadata.Methods.getAccountIdentity, Nym_Vpn_NymVpndClientMetadata.Methods.getAccountLinks, @@ -2040,8 +1874,6 @@ internal enum Nym_Vpn_NymVpndClientMetadata { Nym_Vpn_NymVpndClientMetadata.Methods.getZkNymById, Nym_Vpn_NymVpndClientMetadata.Methods.confirmZkNymDownloaded, Nym_Vpn_NymVpndClientMetadata.Methods.getAvailableTickets, - Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawAccountSummary, - Nym_Vpn_NymVpndClientMetadata.Methods.fetchRawDevices, ] ) @@ -2124,12 +1956,6 @@ internal enum Nym_Vpn_NymVpndClientMetadata { type: GRPCCallType.unary ) - internal static let removeAccount = GRPCMethodDescriptor( - name: "RemoveAccount", - path: "/nym.vpn.NymVpnd/RemoveAccount", - type: GRPCCallType.unary - ) - internal static let forgetAccount = GRPCMethodDescriptor( name: "ForgetAccount", path: "/nym.vpn.NymVpnd/ForgetAccount", @@ -2237,18 +2063,6 @@ internal enum Nym_Vpn_NymVpndClientMetadata { path: "/nym.vpn.NymVpnd/GetAvailableTickets", type: GRPCCallType.unary ) - - internal static let fetchRawAccountSummary = GRPCMethodDescriptor( - name: "FetchRawAccountSummary", - path: "/nym.vpn.NymVpnd/FetchRawAccountSummary", - type: GRPCCallType.unary - ) - - internal static let fetchRawDevices = GRPCMethodDescriptor( - name: "FetchRawDevices", - path: "/nym.vpn.NymVpnd/FetchRawDevices", - type: GRPCCallType.unary - ) } } @@ -2257,33 +2071,33 @@ internal protocol Nym_Vpn_NymVpndProvider: CallHandlerProvider { var interceptors: Nym_Vpn_NymVpndServerInterceptorFactoryProtocol? { get } /// Get info regarding the nym-vpnd in general, like version etc. - func info(request: Nym_Vpn_InfoRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func info(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Set the network. This requires a restart to take effect func setNetwork(request: Nym_Vpn_SetNetworkRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// List messages fetched from nym-vpn-api - func getSystemMessages(request: Nym_Vpn_GetSystemMessagesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getSystemMessages(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// List the feature flags fetched from the nym-vpn-api - func getFeatureFlags(request: Nym_Vpn_GetFeatureFlagsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getFeatureFlags(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Start the tunnel and connect func vpnConnect(request: Nym_Vpn_ConnectRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// Disconnect and stop the tunnel - func vpnDisconnect(request: Nym_Vpn_DisconnectRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func vpnDisconnect(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the current tunnel and connection status - func vpnStatus(request: Nym_Vpn_StatusRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func vpnStatus(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Listen for events that indicate that the connection state changes, such as /// from Connecting -> Connected - func listenToConnectionStateChanges(request: Nym_Vpn_Empty, context: StreamingResponseCallContext) -> EventLoopFuture + func listenToConnectionStateChanges(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext) -> EventLoopFuture /// Listen for general status evens emitted by nym-vpnd, which in turn might /// originate from elsewhere such as remote gateways. - func listenToConnectionStatus(request: Nym_Vpn_Empty, context: StreamingResponseCallContext) -> EventLoopFuture + func listenToConnectionStatus(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext) -> EventLoopFuture /// List the available gateways for the selected mode func listGateways(request: Nym_Vpn_ListGatewaysRequest, context: StatusOnlyCallContext) -> EventLoopFuture @@ -2295,58 +2109,55 @@ internal protocol Nym_Vpn_NymVpndProvider: CallHandlerProvider { func storeAccount(request: Nym_Vpn_StoreAccountRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// Check if the recovery phrase is stored - func isAccountStored(request: Nym_Vpn_IsAccountStoredRequest, context: StatusOnlyCallContext) -> EventLoopFuture - - /// Remove the recovery phrase from local storage - func removeAccount(request: Nym_Vpn_RemoveAccountRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func isAccountStored(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Removes everything related to the account, including the device identity, /// credential storage, mixnet keys, gateway registrations. - func forgetAccount(request: Nym_Vpn_ForgetAccountRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func forgetAccount(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the account identity of the locally stored recovery phrase - func getAccountIdentity(request: Nym_Vpn_GetAccountIdentityRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getAccountIdentity(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the set of account links for the user func getAccountLinks(request: Nym_Vpn_GetAccountLinksRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// Query the account state, which is synced from the nym-vpn-api account, as it /// is known and interpreted by nym-vpnd - func getAccountState(request: Nym_Vpn_GetAccountStateRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getAccountState(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// The vpn client will periodically refresh the account state in the /// background. This command triggers a manual refresh. - func refreshAccountState(request: Nym_Vpn_RefreshAccountStateRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func refreshAccountState(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the account usage from the nym-vpn-api - func getAccountUsage(request: Nym_Vpn_GetAccountUsageRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getAccountUsage(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Check if the local account state is ready to connect - func isReadyToConnect(request: Nym_Vpn_IsReadyToConnectRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func isReadyToConnect(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Reset the device identity func resetDeviceIdentity(request: Nym_Vpn_ResetDeviceIdentityRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the device identity - func getDeviceIdentity(request: Nym_Vpn_GetDeviceIdentityRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getDeviceIdentity(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Try to register the local device with the nym-vpn-api - func registerDevice(request: Nym_Vpn_RegisterDeviceRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func registerDevice(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the list of devices associated with this account from the nym-vpn-api - func getDevices(request: Nym_Vpn_GetDevicesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getDevices(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the list of active devices associated with this account from the nym-vpn-api - func getActiveDevices(request: Nym_Vpn_GetActiveDevicesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getActiveDevices(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Request new zk-nyms (ticketbooks) from the nym-vpn-api - func requestZkNym(request: Nym_Vpn_RequestZkNymRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func requestZkNym(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// List the zk-nyms associated with this device from the nym-vpn-api - func getDeviceZkNyms(request: Nym_Vpn_GetDeviceZkNymsRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getDeviceZkNyms(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// List the zk-nyms available for download from the nym-vpn-api - func getZkNymsAvailableForDownload(request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getZkNymsAvailableForDownload(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture /// Get a zk-nym by its id from the nym-vpn-api func getZkNymById(request: Nym_Vpn_GetZkNymByIdRequest, context: StatusOnlyCallContext) -> EventLoopFuture @@ -2355,13 +2166,7 @@ internal protocol Nym_Vpn_NymVpndProvider: CallHandlerProvider { func confirmZkNymDownloaded(request: Nym_Vpn_ConfirmZkNymDownloadedRequest, context: StatusOnlyCallContext) -> EventLoopFuture /// Get the available tickets in the local credential store - func getAvailableTickets(request: Nym_Vpn_GetAvailableTicketsRequest, context: StatusOnlyCallContext) -> EventLoopFuture - - /// Get the server side account summary directly from the nym-vpn-api - func fetchRawAccountSummary(request: Nym_Vpn_FetchRawAccountSummaryRequest, context: StatusOnlyCallContext) -> EventLoopFuture - - /// Get the list of devices directly from the nym-vpn-api - func fetchRawDevices(request: Nym_Vpn_FetchRawDevicesRequest, context: StatusOnlyCallContext) -> EventLoopFuture + func getAvailableTickets(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture } extension Nym_Vpn_NymVpndProvider { @@ -2379,7 +2184,7 @@ extension Nym_Vpn_NymVpndProvider { case "Info": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeInfoInterceptors() ?? [], userFunction: self.info(request:context:) @@ -2397,7 +2202,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetSystemMessages": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetSystemMessagesInterceptors() ?? [], userFunction: self.getSystemMessages(request:context:) @@ -2406,7 +2211,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetFeatureFlags": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetFeatureFlagsInterceptors() ?? [], userFunction: self.getFeatureFlags(request:context:) @@ -2424,7 +2229,7 @@ extension Nym_Vpn_NymVpndProvider { case "VpnDisconnect": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeVpnDisconnectInterceptors() ?? [], userFunction: self.vpnDisconnect(request:context:) @@ -2433,7 +2238,7 @@ extension Nym_Vpn_NymVpndProvider { case "VpnStatus": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeVpnStatusInterceptors() ?? [], userFunction: self.vpnStatus(request:context:) @@ -2442,7 +2247,7 @@ extension Nym_Vpn_NymVpndProvider { case "ListenToConnectionStateChanges": return ServerStreamingServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeListenToConnectionStateChangesInterceptors() ?? [], userFunction: self.listenToConnectionStateChanges(request:context:) @@ -2451,7 +2256,7 @@ extension Nym_Vpn_NymVpndProvider { case "ListenToConnectionStatus": return ServerStreamingServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeListenToConnectionStatusInterceptors() ?? [], userFunction: self.listenToConnectionStatus(request:context:) @@ -2487,25 +2292,16 @@ extension Nym_Vpn_NymVpndProvider { case "IsAccountStored": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeIsAccountStoredInterceptors() ?? [], userFunction: self.isAccountStored(request:context:) ) - case "RemoveAccount": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeRemoveAccountInterceptors() ?? [], - userFunction: self.removeAccount(request:context:) - ) - case "ForgetAccount": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeForgetAccountInterceptors() ?? [], userFunction: self.forgetAccount(request:context:) @@ -2514,7 +2310,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetAccountIdentity": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountIdentityInterceptors() ?? [], userFunction: self.getAccountIdentity(request:context:) @@ -2532,7 +2328,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetAccountState": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountStateInterceptors() ?? [], userFunction: self.getAccountState(request:context:) @@ -2541,7 +2337,7 @@ extension Nym_Vpn_NymVpndProvider { case "RefreshAccountState": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRefreshAccountStateInterceptors() ?? [], userFunction: self.refreshAccountState(request:context:) @@ -2550,7 +2346,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetAccountUsage": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountUsageInterceptors() ?? [], userFunction: self.getAccountUsage(request:context:) @@ -2559,7 +2355,7 @@ extension Nym_Vpn_NymVpndProvider { case "IsReadyToConnect": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeIsReadyToConnectInterceptors() ?? [], userFunction: self.isReadyToConnect(request:context:) @@ -2577,7 +2373,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetDeviceIdentity": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDeviceIdentityInterceptors() ?? [], userFunction: self.getDeviceIdentity(request:context:) @@ -2586,7 +2382,7 @@ extension Nym_Vpn_NymVpndProvider { case "RegisterDevice": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [], userFunction: self.registerDevice(request:context:) @@ -2595,7 +2391,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetDevices": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDevicesInterceptors() ?? [], userFunction: self.getDevices(request:context:) @@ -2604,7 +2400,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetActiveDevices": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetActiveDevicesInterceptors() ?? [], userFunction: self.getActiveDevices(request:context:) @@ -2613,7 +2409,7 @@ extension Nym_Vpn_NymVpndProvider { case "RequestZkNym": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRequestZkNymInterceptors() ?? [], userFunction: self.requestZkNym(request:context:) @@ -2622,7 +2418,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetDeviceZkNyms": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDeviceZkNymsInterceptors() ?? [], userFunction: self.getDeviceZkNyms(request:context:) @@ -2631,7 +2427,7 @@ extension Nym_Vpn_NymVpndProvider { case "GetZkNymsAvailableForDownload": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetZkNymsAvailableForDownloadInterceptors() ?? [], userFunction: self.getZkNymsAvailableForDownload(request:context:) @@ -2658,30 +2454,12 @@ extension Nym_Vpn_NymVpndProvider { case "GetAvailableTickets": return UnaryServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAvailableTicketsInterceptors() ?? [], userFunction: self.getAvailableTickets(request:context:) ) - case "FetchRawAccountSummary": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeFetchRawAccountSummaryInterceptors() ?? [], - userFunction: self.fetchRawAccountSummary(request:context:) - ) - - case "FetchRawDevices": - return UnaryServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeFetchRawDevicesInterceptors() ?? [], - userFunction: self.fetchRawDevices(request:context:) - ) - default: return nil } @@ -2696,7 +2474,7 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Get info regarding the nym-vpnd in general, like version etc. func info( - request: Nym_Vpn_InfoRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_InfoResponse @@ -2708,13 +2486,13 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// List messages fetched from nym-vpn-api func getSystemMessages( - request: Nym_Vpn_GetSystemMessagesRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetSystemMessagesResponse /// List the feature flags fetched from the nym-vpn-api func getFeatureFlags( - request: Nym_Vpn_GetFeatureFlagsRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetFeatureFlagsResponse @@ -2726,20 +2504,20 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Disconnect and stop the tunnel func vpnDisconnect( - request: Nym_Vpn_DisconnectRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_DisconnectResponse /// Get the current tunnel and connection status func vpnStatus( - request: Nym_Vpn_StatusRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_StatusResponse /// Listen for events that indicate that the connection state changes, such as /// from Connecting -> Connected func listenToConnectionStateChanges( - request: Nym_Vpn_Empty, + request: SwiftProtobuf.Google_Protobuf_Empty, responseStream: GRPCAsyncResponseStreamWriter, context: GRPCAsyncServerCallContext ) async throws @@ -2747,7 +2525,7 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Listen for general status evens emitted by nym-vpnd, which in turn might /// originate from elsewhere such as remote gateways. func listenToConnectionStatus( - request: Nym_Vpn_Empty, + request: SwiftProtobuf.Google_Protobuf_Empty, responseStream: GRPCAsyncResponseStreamWriter, context: GRPCAsyncServerCallContext ) async throws @@ -2772,26 +2550,20 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Check if the recovery phrase is stored func isAccountStored( - request: Nym_Vpn_IsAccountStoredRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_IsAccountStoredResponse - /// Remove the recovery phrase from local storage - func removeAccount( - request: Nym_Vpn_RemoveAccountRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Nym_Vpn_RemoveAccountResponse - /// Removes everything related to the account, including the device identity, /// credential storage, mixnet keys, gateway registrations. func forgetAccount( - request: Nym_Vpn_ForgetAccountRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_ForgetAccountResponse /// Get the account identity of the locally stored recovery phrase func getAccountIdentity( - request: Nym_Vpn_GetAccountIdentityRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetAccountIdentityResponse @@ -2804,26 +2576,26 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Query the account state, which is synced from the nym-vpn-api account, as it /// is known and interpreted by nym-vpnd func getAccountState( - request: Nym_Vpn_GetAccountStateRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetAccountStateResponse /// The vpn client will periodically refresh the account state in the /// background. This command triggers a manual refresh. func refreshAccountState( - request: Nym_Vpn_RefreshAccountStateRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_RefreshAccountStateResponse /// Get the account usage from the nym-vpn-api func getAccountUsage( - request: Nym_Vpn_GetAccountUsageRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetAccountUsageResponse /// Check if the local account state is ready to connect func isReadyToConnect( - request: Nym_Vpn_IsReadyToConnectRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_IsReadyToConnectResponse @@ -2835,43 +2607,43 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Get the device identity func getDeviceIdentity( - request: Nym_Vpn_GetDeviceIdentityRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetDeviceIdentityResponse /// Try to register the local device with the nym-vpn-api func registerDevice( - request: Nym_Vpn_RegisterDeviceRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_RegisterDeviceResponse /// Get the list of devices associated with this account from the nym-vpn-api func getDevices( - request: Nym_Vpn_GetDevicesRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetDevicesResponse /// Get the list of active devices associated with this account from the nym-vpn-api func getActiveDevices( - request: Nym_Vpn_GetActiveDevicesRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetActiveDevicesResponse /// Request new zk-nyms (ticketbooks) from the nym-vpn-api func requestZkNym( - request: Nym_Vpn_RequestZkNymRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_RequestZkNymResponse /// List the zk-nyms associated with this device from the nym-vpn-api func getDeviceZkNyms( - request: Nym_Vpn_GetDeviceZkNymsRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetDeviceZkNymsResponse /// List the zk-nyms available for download from the nym-vpn-api func getZkNymsAvailableForDownload( - request: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetZkNymsAvailableForDownloadResponse @@ -2889,21 +2661,9 @@ internal protocol Nym_Vpn_NymVpndAsyncProvider: CallHandlerProvider, Sendable { /// Get the available tickets in the local credential store func getAvailableTickets( - request: Nym_Vpn_GetAvailableTicketsRequest, + request: SwiftProtobuf.Google_Protobuf_Empty, context: GRPCAsyncServerCallContext ) async throws -> Nym_Vpn_GetAvailableTicketsResponse - - /// Get the server side account summary directly from the nym-vpn-api - func fetchRawAccountSummary( - request: Nym_Vpn_FetchRawAccountSummaryRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Nym_Vpn_FetchRawAccountSummaryResponse - - /// Get the list of devices directly from the nym-vpn-api - func fetchRawDevices( - request: Nym_Vpn_FetchRawDevicesRequest, - context: GRPCAsyncServerCallContext - ) async throws -> Nym_Vpn_FetchRawDevicesResponse } @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *) @@ -2928,7 +2688,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "Info": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeInfoInterceptors() ?? [], wrapping: { try await self.info(request: $0, context: $1) } @@ -2946,7 +2706,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetSystemMessages": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetSystemMessagesInterceptors() ?? [], wrapping: { try await self.getSystemMessages(request: $0, context: $1) } @@ -2955,7 +2715,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetFeatureFlags": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetFeatureFlagsInterceptors() ?? [], wrapping: { try await self.getFeatureFlags(request: $0, context: $1) } @@ -2973,7 +2733,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "VpnDisconnect": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeVpnDisconnectInterceptors() ?? [], wrapping: { try await self.vpnDisconnect(request: $0, context: $1) } @@ -2982,7 +2742,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "VpnStatus": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeVpnStatusInterceptors() ?? [], wrapping: { try await self.vpnStatus(request: $0, context: $1) } @@ -2991,7 +2751,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "ListenToConnectionStateChanges": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeListenToConnectionStateChangesInterceptors() ?? [], wrapping: { try await self.listenToConnectionStateChanges(request: $0, responseStream: $1, context: $2) } @@ -3000,7 +2760,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "ListenToConnectionStatus": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeListenToConnectionStatusInterceptors() ?? [], wrapping: { try await self.listenToConnectionStatus(request: $0, responseStream: $1, context: $2) } @@ -3036,25 +2796,16 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "IsAccountStored": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeIsAccountStoredInterceptors() ?? [], wrapping: { try await self.isAccountStored(request: $0, context: $1) } ) - case "RemoveAccount": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeRemoveAccountInterceptors() ?? [], - wrapping: { try await self.removeAccount(request: $0, context: $1) } - ) - case "ForgetAccount": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeForgetAccountInterceptors() ?? [], wrapping: { try await self.forgetAccount(request: $0, context: $1) } @@ -3063,7 +2814,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetAccountIdentity": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountIdentityInterceptors() ?? [], wrapping: { try await self.getAccountIdentity(request: $0, context: $1) } @@ -3081,7 +2832,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetAccountState": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountStateInterceptors() ?? [], wrapping: { try await self.getAccountState(request: $0, context: $1) } @@ -3090,7 +2841,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "RefreshAccountState": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRefreshAccountStateInterceptors() ?? [], wrapping: { try await self.refreshAccountState(request: $0, context: $1) } @@ -3099,7 +2850,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetAccountUsage": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAccountUsageInterceptors() ?? [], wrapping: { try await self.getAccountUsage(request: $0, context: $1) } @@ -3108,7 +2859,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "IsReadyToConnect": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeIsReadyToConnectInterceptors() ?? [], wrapping: { try await self.isReadyToConnect(request: $0, context: $1) } @@ -3126,7 +2877,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetDeviceIdentity": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDeviceIdentityInterceptors() ?? [], wrapping: { try await self.getDeviceIdentity(request: $0, context: $1) } @@ -3135,7 +2886,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "RegisterDevice": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRegisterDeviceInterceptors() ?? [], wrapping: { try await self.registerDevice(request: $0, context: $1) } @@ -3144,7 +2895,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetDevices": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDevicesInterceptors() ?? [], wrapping: { try await self.getDevices(request: $0, context: $1) } @@ -3153,7 +2904,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetActiveDevices": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetActiveDevicesInterceptors() ?? [], wrapping: { try await self.getActiveDevices(request: $0, context: $1) } @@ -3162,7 +2913,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "RequestZkNym": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeRequestZkNymInterceptors() ?? [], wrapping: { try await self.requestZkNym(request: $0, context: $1) } @@ -3171,7 +2922,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetDeviceZkNyms": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetDeviceZkNymsInterceptors() ?? [], wrapping: { try await self.getDeviceZkNyms(request: $0, context: $1) } @@ -3180,7 +2931,7 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetZkNymsAvailableForDownload": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetZkNymsAvailableForDownloadInterceptors() ?? [], wrapping: { try await self.getZkNymsAvailableForDownload(request: $0, context: $1) } @@ -3207,30 +2958,12 @@ extension Nym_Vpn_NymVpndAsyncProvider { case "GetAvailableTickets": return GRPCAsyncServerHandler( context: context, - requestDeserializer: ProtobufDeserializer(), + requestDeserializer: ProtobufDeserializer(), responseSerializer: ProtobufSerializer(), interceptors: self.interceptors?.makeGetAvailableTicketsInterceptors() ?? [], wrapping: { try await self.getAvailableTickets(request: $0, context: $1) } ) - case "FetchRawAccountSummary": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeFetchRawAccountSummaryInterceptors() ?? [], - wrapping: { try await self.fetchRawAccountSummary(request: $0, context: $1) } - ) - - case "FetchRawDevices": - return GRPCAsyncServerHandler( - context: context, - requestDeserializer: ProtobufDeserializer(), - responseSerializer: ProtobufSerializer(), - interceptors: self.interceptors?.makeFetchRawDevicesInterceptors() ?? [], - wrapping: { try await self.fetchRawDevices(request: $0, context: $1) } - ) - default: return nil } @@ -3241,7 +2974,7 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'info'. /// Defaults to calling `self.makeInterceptors()`. - func makeInfoInterceptors() -> [ServerInterceptor] + func makeInfoInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'setNetwork'. /// Defaults to calling `self.makeInterceptors()`. @@ -3249,11 +2982,11 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'getSystemMessages'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetSystemMessagesInterceptors() -> [ServerInterceptor] + func makeGetSystemMessagesInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getFeatureFlags'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetFeatureFlagsInterceptors() -> [ServerInterceptor] + func makeGetFeatureFlagsInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'vpnConnect'. /// Defaults to calling `self.makeInterceptors()`. @@ -3261,19 +2994,19 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'vpnDisconnect'. /// Defaults to calling `self.makeInterceptors()`. - func makeVpnDisconnectInterceptors() -> [ServerInterceptor] + func makeVpnDisconnectInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'vpnStatus'. /// Defaults to calling `self.makeInterceptors()`. - func makeVpnStatusInterceptors() -> [ServerInterceptor] + func makeVpnStatusInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'listenToConnectionStateChanges'. /// Defaults to calling `self.makeInterceptors()`. - func makeListenToConnectionStateChangesInterceptors() -> [ServerInterceptor] + func makeListenToConnectionStateChangesInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'listenToConnectionStatus'. /// Defaults to calling `self.makeInterceptors()`. - func makeListenToConnectionStatusInterceptors() -> [ServerInterceptor] + func makeListenToConnectionStatusInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'listGateways'. /// Defaults to calling `self.makeInterceptors()`. @@ -3289,19 +3022,15 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'isAccountStored'. /// Defaults to calling `self.makeInterceptors()`. - func makeIsAccountStoredInterceptors() -> [ServerInterceptor] - - /// - Returns: Interceptors to use when handling 'removeAccount'. - /// Defaults to calling `self.makeInterceptors()`. - func makeRemoveAccountInterceptors() -> [ServerInterceptor] + func makeIsAccountStoredInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'forgetAccount'. /// Defaults to calling `self.makeInterceptors()`. - func makeForgetAccountInterceptors() -> [ServerInterceptor] + func makeForgetAccountInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getAccountIdentity'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetAccountIdentityInterceptors() -> [ServerInterceptor] + func makeGetAccountIdentityInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getAccountLinks'. /// Defaults to calling `self.makeInterceptors()`. @@ -3309,19 +3038,19 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'getAccountState'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetAccountStateInterceptors() -> [ServerInterceptor] + func makeGetAccountStateInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'refreshAccountState'. /// Defaults to calling `self.makeInterceptors()`. - func makeRefreshAccountStateInterceptors() -> [ServerInterceptor] + func makeRefreshAccountStateInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getAccountUsage'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetAccountUsageInterceptors() -> [ServerInterceptor] + func makeGetAccountUsageInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'isReadyToConnect'. /// Defaults to calling `self.makeInterceptors()`. - func makeIsReadyToConnectInterceptors() -> [ServerInterceptor] + func makeIsReadyToConnectInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'resetDeviceIdentity'. /// Defaults to calling `self.makeInterceptors()`. @@ -3329,31 +3058,31 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'getDeviceIdentity'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetDeviceIdentityInterceptors() -> [ServerInterceptor] + func makeGetDeviceIdentityInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'registerDevice'. /// Defaults to calling `self.makeInterceptors()`. - func makeRegisterDeviceInterceptors() -> [ServerInterceptor] + func makeRegisterDeviceInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getDevices'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetDevicesInterceptors() -> [ServerInterceptor] + func makeGetDevicesInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getActiveDevices'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetActiveDevicesInterceptors() -> [ServerInterceptor] + func makeGetActiveDevicesInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'requestZkNym'. /// Defaults to calling `self.makeInterceptors()`. - func makeRequestZkNymInterceptors() -> [ServerInterceptor] + func makeRequestZkNymInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getDeviceZkNyms'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetDeviceZkNymsInterceptors() -> [ServerInterceptor] + func makeGetDeviceZkNymsInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getZkNymsAvailableForDownload'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetZkNymsAvailableForDownloadInterceptors() -> [ServerInterceptor] + func makeGetZkNymsAvailableForDownloadInterceptors() -> [ServerInterceptor] /// - Returns: Interceptors to use when handling 'getZkNymById'. /// Defaults to calling `self.makeInterceptors()`. @@ -3365,15 +3094,7 @@ internal protocol Nym_Vpn_NymVpndServerInterceptorFactoryProtocol: Sendable { /// - Returns: Interceptors to use when handling 'getAvailableTickets'. /// Defaults to calling `self.makeInterceptors()`. - func makeGetAvailableTicketsInterceptors() -> [ServerInterceptor] - - /// - Returns: Interceptors to use when handling 'fetchRawAccountSummary'. - /// Defaults to calling `self.makeInterceptors()`. - func makeFetchRawAccountSummaryInterceptors() -> [ServerInterceptor] - - /// - Returns: Interceptors to use when handling 'fetchRawDevices'. - /// Defaults to calling `self.makeInterceptors()`. - func makeFetchRawDevicesInterceptors() -> [ServerInterceptor] + func makeGetAvailableTicketsInterceptors() -> [ServerInterceptor] } internal enum Nym_Vpn_NymVpndServerMetadata { @@ -3394,7 +3115,6 @@ internal enum Nym_Vpn_NymVpndServerMetadata { Nym_Vpn_NymVpndServerMetadata.Methods.listCountries, Nym_Vpn_NymVpndServerMetadata.Methods.storeAccount, Nym_Vpn_NymVpndServerMetadata.Methods.isAccountStored, - Nym_Vpn_NymVpndServerMetadata.Methods.removeAccount, Nym_Vpn_NymVpndServerMetadata.Methods.forgetAccount, Nym_Vpn_NymVpndServerMetadata.Methods.getAccountIdentity, Nym_Vpn_NymVpndServerMetadata.Methods.getAccountLinks, @@ -3413,8 +3133,6 @@ internal enum Nym_Vpn_NymVpndServerMetadata { Nym_Vpn_NymVpndServerMetadata.Methods.getZkNymById, Nym_Vpn_NymVpndServerMetadata.Methods.confirmZkNymDownloaded, Nym_Vpn_NymVpndServerMetadata.Methods.getAvailableTickets, - Nym_Vpn_NymVpndServerMetadata.Methods.fetchRawAccountSummary, - Nym_Vpn_NymVpndServerMetadata.Methods.fetchRawDevices, ] ) @@ -3497,12 +3215,6 @@ internal enum Nym_Vpn_NymVpndServerMetadata { type: GRPCCallType.unary ) - internal static let removeAccount = GRPCMethodDescriptor( - name: "RemoveAccount", - path: "/nym.vpn.NymVpnd/RemoveAccount", - type: GRPCCallType.unary - ) - internal static let forgetAccount = GRPCMethodDescriptor( name: "ForgetAccount", path: "/nym.vpn.NymVpnd/ForgetAccount", @@ -3610,17 +3322,5 @@ internal enum Nym_Vpn_NymVpndServerMetadata { path: "/nym.vpn.NymVpnd/GetAvailableTickets", type: GRPCCallType.unary ) - - internal static let fetchRawAccountSummary = GRPCMethodDescriptor( - name: "FetchRawAccountSummary", - path: "/nym.vpn.NymVpnd/FetchRawAccountSummary", - type: GRPCCallType.unary - ) - - internal static let fetchRawDevices = GRPCMethodDescriptor( - name: "FetchRawDevices", - path: "/nym.vpn.NymVpnd/FetchRawDevices", - type: GRPCCallType.unary - ) } } diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.pb.swift b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.pb.swift index 74b6063055..6f17228508 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.pb.swift +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.pb.swift @@ -420,16 +420,6 @@ extension Nym_Vpn_DeviceStatus: CaseIterable { #endif // swift(>=4.2) -struct Nym_Vpn_Empty { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - /// Represents the identity of a gateway struct Nym_Vpn_Gateway { // SwiftProtobuf.Message conformance is added in an extension below. See the @@ -512,18 +502,18 @@ struct Nym_Vpn_EntryNode { set {entryNodeEnum = .location(newValue)} } - var randomLowLatency: Nym_Vpn_Empty { + var randomLowLatency: SwiftProtobuf.Google_Protobuf_Empty { get { if case .randomLowLatency(let v)? = entryNodeEnum {return v} - return Nym_Vpn_Empty() + return SwiftProtobuf.Google_Protobuf_Empty() } set {entryNodeEnum = .randomLowLatency(newValue)} } - var random: Nym_Vpn_Empty { + var random: SwiftProtobuf.Google_Protobuf_Empty { get { if case .random(let v)? = entryNodeEnum {return v} - return Nym_Vpn_Empty() + return SwiftProtobuf.Google_Protobuf_Empty() } set {entryNodeEnum = .random(newValue)} } @@ -533,8 +523,8 @@ struct Nym_Vpn_EntryNode { enum OneOf_EntryNodeEnum: Equatable { case gateway(Nym_Vpn_Gateway) case location(Nym_Vpn_Location) - case randomLowLatency(Nym_Vpn_Empty) - case random(Nym_Vpn_Empty) + case randomLowLatency(SwiftProtobuf.Google_Protobuf_Empty) + case random(SwiftProtobuf.Google_Protobuf_Empty) #if !swift(>=4.1) static func ==(lhs: Nym_Vpn_EntryNode.OneOf_EntryNodeEnum, rhs: Nym_Vpn_EntryNode.OneOf_EntryNodeEnum) -> Bool { @@ -598,10 +588,10 @@ struct Nym_Vpn_ExitNode { set {exitNodeEnum = .location(newValue)} } - var random: Nym_Vpn_Empty { + var random: SwiftProtobuf.Google_Protobuf_Empty { get { if case .random(let v)? = exitNodeEnum {return v} - return Nym_Vpn_Empty() + return SwiftProtobuf.Google_Protobuf_Empty() } set {exitNodeEnum = .random(newValue)} } @@ -612,7 +602,7 @@ struct Nym_Vpn_ExitNode { case address(Nym_Vpn_Address) case gateway(Nym_Vpn_Gateway) case location(Nym_Vpn_Location) - case random(Nym_Vpn_Empty) + case random(SwiftProtobuf.Google_Protobuf_Empty) #if !swift(>=4.1) static func ==(lhs: Nym_Vpn_ExitNode.OneOf_ExitNodeEnum, rhs: Nym_Vpn_ExitNode.OneOf_ExitNodeEnum) -> Bool { @@ -781,7 +771,6 @@ struct Nym_Vpn_UserAgent { /// Example: /// nym-vpn-app /// nym-vpnd - /// nym-vpn-cli var application: String = String() /// Format: version[-optional] [(daemon version[-optional])] @@ -1068,16 +1057,6 @@ struct Nym_Vpn_ValidatorDetails { fileprivate var _apiURL: Nym_Vpn_Url? = nil } -struct Nym_Vpn_InfoRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_InfoResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1249,16 +1228,6 @@ struct Nym_Vpn_SystemMessage { init() {} } -struct Nym_Vpn_GetSystemMessagesRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetSystemMessagesResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1271,16 +1240,6 @@ struct Nym_Vpn_GetSystemMessagesResponse { init() {} } -struct Nym_Vpn_GetFeatureFlagsRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetFeatureFlagsResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1562,16 +1521,6 @@ struct Nym_Vpn_ConnectResponse { fileprivate var _error: Nym_Vpn_ConnectRequestError? = nil } -struct Nym_Vpn_DisconnectRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_DisconnectResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -1635,16 +1584,6 @@ struct Nym_Vpn_ConnectionDetails { fileprivate var _since: SwiftProtobuf.Google_Protobuf_Timestamp? = nil } -struct Nym_Vpn_StatusRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_StatusResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2509,16 +2448,6 @@ struct Nym_Vpn_StoreAccountResponse { fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_IsAccountStoredRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_IsAccountStoredResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -2571,17 +2500,7 @@ struct Nym_Vpn_IsAccountStoredResponse { init() {} } -struct Nym_Vpn_RemoveAccountRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - -struct Nym_Vpn_RemoveAccountResponse { +struct Nym_Vpn_ForgetAccountResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -2604,47 +2523,25 @@ struct Nym_Vpn_RemoveAccountResponse { fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_ForgetAccountRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - -struct Nym_Vpn_ForgetAccountResponse { +struct Nym_Vpn_AccountIdentity { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. - var success: Bool = false - - var error: Nym_Vpn_AccountError { - get {return _error ?? Nym_Vpn_AccountError()} - set {_error = newValue} + var accountIdentity: String { + get {return _accountIdentity ?? String()} + set {_accountIdentity = newValue} } - /// Returns true if `error` has been explicitly set. - var hasError: Bool {return self._error != nil} - /// Clears the value of `error`. Subsequent reads from it will return its default value. - mutating func clearError() {self._error = nil} + /// Returns true if `accountIdentity` has been explicitly set. + var hasAccountIdentity: Bool {return self._accountIdentity != nil} + /// Clears the value of `accountIdentity`. Subsequent reads from it will return its default value. + mutating func clearAccountIdentity() {self._accountIdentity = nil} var unknownFields = SwiftProtobuf.UnknownStorage() init() {} - fileprivate var _error: Nym_Vpn_AccountError? = nil -} - -struct Nym_Vpn_GetAccountIdentityRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} + fileprivate var _accountIdentity: String? = nil } struct Nym_Vpn_GetAccountIdentityResponse { @@ -2654,10 +2551,10 @@ struct Nym_Vpn_GetAccountIdentityResponse { var id: Nym_Vpn_GetAccountIdentityResponse.OneOf_ID? = nil - var accountIdentity: String { + var accountIdentity: Nym_Vpn_AccountIdentity { get { if case .accountIdentity(let v)? = id {return v} - return String() + return Nym_Vpn_AccountIdentity() } set {id = .accountIdentity(newValue)} } @@ -2673,7 +2570,7 @@ struct Nym_Vpn_GetAccountIdentityResponse { var unknownFields = SwiftProtobuf.UnknownStorage() enum OneOf_ID: Equatable { - case accountIdentity(String) + case accountIdentity(Nym_Vpn_AccountIdentity) case error(Nym_Vpn_AccountError) #if !swift(>=4.1) @@ -3174,16 +3071,6 @@ struct Nym_Vpn_AccountStateSummary { fileprivate var _requestZkNymResult: Nym_Vpn_RequestZkNymResult? = nil } -struct Nym_Vpn_GetAccountStateRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetAccountStateResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3236,16 +3123,6 @@ struct Nym_Vpn_GetAccountStateResponse { init() {} } -struct Nym_Vpn_RefreshAccountStateRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_RefreshAccountStateResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3294,16 +3171,6 @@ struct Nym_Vpn_AccountUsage { init() {} } -struct Nym_Vpn_GetAccountUsageRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetAccountUsageResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3356,72 +3223,6 @@ struct Nym_Vpn_GetAccountUsageResponse { init() {} } -struct Nym_Vpn_FetchRawAccountSummaryRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - -struct Nym_Vpn_FetchRawAccountSummaryResponse { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var json: String = String() - - var error: Nym_Vpn_AccountError { - get {return _error ?? Nym_Vpn_AccountError()} - set {_error = newValue} - } - /// Returns true if `error` has been explicitly set. - var hasError: Bool {return self._error != nil} - /// Clears the value of `error`. Subsequent reads from it will return its default value. - mutating func clearError() {self._error = nil} - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} - - fileprivate var _error: Nym_Vpn_AccountError? = nil -} - -struct Nym_Vpn_FetchRawDevicesRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - -struct Nym_Vpn_FetchRawDevicesResponse { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var json: String = String() - - var error: Nym_Vpn_AccountError { - get {return _error ?? Nym_Vpn_AccountError()} - set {_error = newValue} - } - /// Returns true if `error` has been explicitly set. - var hasError: Bool {return self._error != nil} - /// Clears the value of `error`. Subsequent reads from it will return its default value. - mutating func clearError() {self._error = nil} - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} - - fileprivate var _error: Nym_Vpn_AccountError? = nil -} - struct Nym_Vpn_ResetDeviceIdentityRequest { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3467,16 +3268,6 @@ struct Nym_Vpn_ResetDeviceIdentityResponse { fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_GetDeviceIdentityRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetDeviceIdentityResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3529,16 +3320,6 @@ struct Nym_Vpn_GetDeviceIdentityResponse { init() {} } -struct Nym_Vpn_RegisterDeviceRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_RegisterDeviceResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3592,16 +3373,6 @@ struct Nym_Vpn_Devices { init() {} } -struct Nym_Vpn_GetDevicesRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetDevicesResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3654,16 +3425,6 @@ struct Nym_Vpn_GetDevicesResponse { init() {} } -struct Nym_Vpn_GetActiveDevicesRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetActiveDevicesResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3716,16 +3477,6 @@ struct Nym_Vpn_GetActiveDevicesResponse { init() {} } -struct Nym_Vpn_RequestZkNymRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_RequestZkNymResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3749,17 +3500,30 @@ struct Nym_Vpn_RequestZkNymResponse { fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_GetDeviceZkNymsRequest { +struct Nym_Vpn_GetDeviceZkNymsResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. + var json: String = String() + + var error: Nym_Vpn_AccountError { + get {return _error ?? Nym_Vpn_AccountError()} + set {_error = newValue} + } + /// Returns true if `error` has been explicitly set. + var hasError: Bool {return self._error != nil} + /// Clears the value of `error`. Subsequent reads from it will return its default value. + mutating func clearError() {self._error = nil} + var unknownFields = SwiftProtobuf.UnknownStorage() init() {} + + fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_GetDeviceZkNymsResponse { +struct Nym_Vpn_GetZkNymsAvailableForDownloadResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -3782,40 +3546,7 @@ struct Nym_Vpn_GetDeviceZkNymsResponse { fileprivate var _error: Nym_Vpn_AccountError? = nil } -struct Nym_Vpn_GetZkNymsAvailableForDownloadRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - -struct Nym_Vpn_GetZkNymsAvailableForDownloadResponse { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var json: String = String() - - var error: Nym_Vpn_AccountError { - get {return _error ?? Nym_Vpn_AccountError()} - set {_error = newValue} - } - /// Returns true if `error` has been explicitly set. - var hasError: Bool {return self._error != nil} - /// Clears the value of `error`. Subsequent reads from it will return its default value. - mutating func clearError() {self._error = nil} - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} - - fileprivate var _error: Nym_Vpn_AccountError? = nil -} - -struct Nym_Vpn_GetZkNymByIdRequest { +struct Nym_Vpn_GetZkNymByIdRequest { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -3929,16 +3660,6 @@ struct Nym_Vpn_AvailableTickets { init() {} } -struct Nym_Vpn_GetAvailableTicketsRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_GetAvailableTicketsResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -3991,16 +3712,6 @@ struct Nym_Vpn_GetAvailableTicketsResponse { init() {} } -struct Nym_Vpn_IsReadyToConnectRequest { - // SwiftProtobuf.Message conformance is added in an extension below. See the - // `Message` and `Message+*Additions` files in the SwiftProtobuf library for - // methods supported on all messages. - - var unknownFields = SwiftProtobuf.UnknownStorage() - - init() {} -} - struct Nym_Vpn_IsReadyToConnectResponse { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for @@ -4186,7 +3897,6 @@ extension Nym_Vpn_AccountState: @unchecked Sendable {} extension Nym_Vpn_SubscriptionState: @unchecked Sendable {} extension Nym_Vpn_DeviceState: @unchecked Sendable {} extension Nym_Vpn_DeviceStatus: @unchecked Sendable {} -extension Nym_Vpn_Empty: @unchecked Sendable {} extension Nym_Vpn_Gateway: @unchecked Sendable {} extension Nym_Vpn_Address: @unchecked Sendable {} extension Nym_Vpn_Location: @unchecked Sendable {} @@ -4208,16 +3918,13 @@ extension Nym_Vpn_NymNetworkDetails: @unchecked Sendable {} extension Nym_Vpn_NymVpnNetworkDetails: @unchecked Sendable {} extension Nym_Vpn_AccountManagement: @unchecked Sendable {} extension Nym_Vpn_ValidatorDetails: @unchecked Sendable {} -extension Nym_Vpn_InfoRequest: @unchecked Sendable {} extension Nym_Vpn_InfoResponse: @unchecked Sendable {} extension Nym_Vpn_SetNetworkRequest: @unchecked Sendable {} extension Nym_Vpn_SetNetworkResponse: @unchecked Sendable {} extension Nym_Vpn_SetNetworkRequestError: @unchecked Sendable {} extension Nym_Vpn_SetNetworkRequestError.SetNetworkRequestErrorType: @unchecked Sendable {} extension Nym_Vpn_SystemMessage: @unchecked Sendable {} -extension Nym_Vpn_GetSystemMessagesRequest: @unchecked Sendable {} extension Nym_Vpn_GetSystemMessagesResponse: @unchecked Sendable {} -extension Nym_Vpn_GetFeatureFlagsRequest: @unchecked Sendable {} extension Nym_Vpn_GetFeatureFlagsResponse: @unchecked Sendable {} extension Nym_Vpn_FeatureFlagGroup: @unchecked Sendable {} extension Nym_Vpn_Threshold: @unchecked Sendable {} @@ -4225,10 +3932,8 @@ extension Nym_Vpn_ConnectRequestError: @unchecked Sendable {} extension Nym_Vpn_ConnectRequestError.ConnectRequestErrorType: @unchecked Sendable {} extension Nym_Vpn_ConnectRequest: @unchecked Sendable {} extension Nym_Vpn_ConnectResponse: @unchecked Sendable {} -extension Nym_Vpn_DisconnectRequest: @unchecked Sendable {} extension Nym_Vpn_DisconnectResponse: @unchecked Sendable {} extension Nym_Vpn_ConnectionDetails: @unchecked Sendable {} -extension Nym_Vpn_StatusRequest: @unchecked Sendable {} extension Nym_Vpn_StatusResponse: @unchecked Sendable {} extension Nym_Vpn_ConnectionStateChange: @unchecked Sendable {} extension Nym_Vpn_ConnectionStatusUpdate: @unchecked Sendable {} @@ -4247,14 +3952,10 @@ extension Nym_Vpn_ListCountriesRequest: @unchecked Sendable {} extension Nym_Vpn_ListCountriesResponse: @unchecked Sendable {} extension Nym_Vpn_StoreAccountRequest: @unchecked Sendable {} extension Nym_Vpn_StoreAccountResponse: @unchecked Sendable {} -extension Nym_Vpn_IsAccountStoredRequest: @unchecked Sendable {} extension Nym_Vpn_IsAccountStoredResponse: @unchecked Sendable {} extension Nym_Vpn_IsAccountStoredResponse.OneOf_Resp: @unchecked Sendable {} -extension Nym_Vpn_RemoveAccountRequest: @unchecked Sendable {} -extension Nym_Vpn_RemoveAccountResponse: @unchecked Sendable {} -extension Nym_Vpn_ForgetAccountRequest: @unchecked Sendable {} extension Nym_Vpn_ForgetAccountResponse: @unchecked Sendable {} -extension Nym_Vpn_GetAccountIdentityRequest: @unchecked Sendable {} +extension Nym_Vpn_AccountIdentity: @unchecked Sendable {} extension Nym_Vpn_GetAccountIdentityResponse: @unchecked Sendable {} extension Nym_Vpn_GetAccountIdentityResponse.OneOf_ID: @unchecked Sendable {} extension Nym_Vpn_GetAccountLinksRequest: @unchecked Sendable {} @@ -4270,50 +3971,34 @@ extension Nym_Vpn_RequestZkNymSuccess: @unchecked Sendable {} extension Nym_Vpn_RequestZkNymError: @unchecked Sendable {} extension Nym_Vpn_RequestZkNymError.RequestZkNymErrorType: @unchecked Sendable {} extension Nym_Vpn_AccountStateSummary: @unchecked Sendable {} -extension Nym_Vpn_GetAccountStateRequest: @unchecked Sendable {} extension Nym_Vpn_GetAccountStateResponse: @unchecked Sendable {} extension Nym_Vpn_GetAccountStateResponse.OneOf_Result: @unchecked Sendable {} -extension Nym_Vpn_RefreshAccountStateRequest: @unchecked Sendable {} extension Nym_Vpn_RefreshAccountStateResponse: @unchecked Sendable {} extension Nym_Vpn_AccountUsages: @unchecked Sendable {} extension Nym_Vpn_AccountUsage: @unchecked Sendable {} -extension Nym_Vpn_GetAccountUsageRequest: @unchecked Sendable {} extension Nym_Vpn_GetAccountUsageResponse: @unchecked Sendable {} extension Nym_Vpn_GetAccountUsageResponse.OneOf_Result: @unchecked Sendable {} -extension Nym_Vpn_FetchRawAccountSummaryRequest: @unchecked Sendable {} -extension Nym_Vpn_FetchRawAccountSummaryResponse: @unchecked Sendable {} -extension Nym_Vpn_FetchRawDevicesRequest: @unchecked Sendable {} -extension Nym_Vpn_FetchRawDevicesResponse: @unchecked Sendable {} extension Nym_Vpn_ResetDeviceIdentityRequest: @unchecked Sendable {} extension Nym_Vpn_ResetDeviceIdentityResponse: @unchecked Sendable {} -extension Nym_Vpn_GetDeviceIdentityRequest: @unchecked Sendable {} extension Nym_Vpn_GetDeviceIdentityResponse: @unchecked Sendable {} extension Nym_Vpn_GetDeviceIdentityResponse.OneOf_ID: @unchecked Sendable {} -extension Nym_Vpn_RegisterDeviceRequest: @unchecked Sendable {} extension Nym_Vpn_RegisterDeviceResponse: @unchecked Sendable {} extension Nym_Vpn_Device: @unchecked Sendable {} extension Nym_Vpn_Devices: @unchecked Sendable {} -extension Nym_Vpn_GetDevicesRequest: @unchecked Sendable {} extension Nym_Vpn_GetDevicesResponse: @unchecked Sendable {} extension Nym_Vpn_GetDevicesResponse.OneOf_Result: @unchecked Sendable {} -extension Nym_Vpn_GetActiveDevicesRequest: @unchecked Sendable {} extension Nym_Vpn_GetActiveDevicesResponse: @unchecked Sendable {} extension Nym_Vpn_GetActiveDevicesResponse.OneOf_Result: @unchecked Sendable {} -extension Nym_Vpn_RequestZkNymRequest: @unchecked Sendable {} extension Nym_Vpn_RequestZkNymResponse: @unchecked Sendable {} -extension Nym_Vpn_GetDeviceZkNymsRequest: @unchecked Sendable {} extension Nym_Vpn_GetDeviceZkNymsResponse: @unchecked Sendable {} -extension Nym_Vpn_GetZkNymsAvailableForDownloadRequest: @unchecked Sendable {} extension Nym_Vpn_GetZkNymsAvailableForDownloadResponse: @unchecked Sendable {} extension Nym_Vpn_GetZkNymByIdRequest: @unchecked Sendable {} extension Nym_Vpn_GetZkNymByIdResponse: @unchecked Sendable {} extension Nym_Vpn_ConfirmZkNymDownloadedRequest: @unchecked Sendable {} extension Nym_Vpn_ConfirmZkNymDownloadedResponse: @unchecked Sendable {} extension Nym_Vpn_AvailableTickets: @unchecked Sendable {} -extension Nym_Vpn_GetAvailableTicketsRequest: @unchecked Sendable {} extension Nym_Vpn_GetAvailableTicketsResponse: @unchecked Sendable {} extension Nym_Vpn_GetAvailableTicketsResponse.OneOf_Resp: @unchecked Sendable {} -extension Nym_Vpn_IsReadyToConnectRequest: @unchecked Sendable {} extension Nym_Vpn_IsReadyToConnectResponse: @unchecked Sendable {} extension Nym_Vpn_IsReadyToConnectResponse.IsReadyToConnectResponseType: @unchecked Sendable {} extension Nym_Vpn_AccountError: @unchecked Sendable {} @@ -4400,25 +4085,6 @@ extension Nym_Vpn_DeviceStatus: SwiftProtobuf._ProtoNameProviding { ] } -extension Nym_Vpn_Empty: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".Empty" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_Empty, rhs: Nym_Vpn_Empty) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_Gateway: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".Gateway" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -4573,7 +4239,7 @@ extension Nym_Vpn_EntryNode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } }() case 3: try { - var v: Nym_Vpn_Empty? + var v: SwiftProtobuf.Google_Protobuf_Empty? var hadOneofValue = false if let current = self.entryNodeEnum { hadOneofValue = true @@ -4586,7 +4252,7 @@ extension Nym_Vpn_EntryNode: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem } }() case 4: try { - var v: Nym_Vpn_Empty? + var v: SwiftProtobuf.Google_Protobuf_Empty? var hadOneofValue = false if let current = self.entryNodeEnum { hadOneofValue = true @@ -4692,7 +4358,7 @@ extension Nym_Vpn_ExitNode: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme } }() case 4: try { - var v: Nym_Vpn_Empty? + var v: SwiftProtobuf.Google_Protobuf_Empty? var hadOneofValue = false if let current = self.exitNodeEnum { hadOneofValue = true @@ -5363,25 +5029,6 @@ extension Nym_Vpn_ValidatorDetails: SwiftProtobuf.Message, SwiftProtobuf._Messag } } -extension Nym_Vpn_InfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".InfoRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_InfoRequest, rhs: Nym_Vpn_InfoRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_InfoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".InfoResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -5664,25 +5311,6 @@ extension Nym_Vpn_SystemMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageIm } } -extension Nym_Vpn_GetSystemMessagesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetSystemMessagesRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetSystemMessagesRequest, rhs: Nym_Vpn_GetSystemMessagesRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetSystemMessagesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetSystemMessagesResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -5715,25 +5343,6 @@ extension Nym_Vpn_GetSystemMessagesResponse: SwiftProtobuf.Message, SwiftProtobu } } -extension Nym_Vpn_GetFeatureFlagsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetFeatureFlagsRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetFeatureFlagsRequest, rhs: Nym_Vpn_GetFeatureFlagsRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetFeatureFlagsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetFeatureFlagsResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -6118,25 +5727,6 @@ extension Nym_Vpn_ConnectResponse: SwiftProtobuf.Message, SwiftProtobuf._Message } } -extension Nym_Vpn_DisconnectRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".DisconnectRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_DisconnectRequest, rhs: Nym_Vpn_DisconnectRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_DisconnectResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".DisconnectResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -6223,25 +5813,6 @@ extension Nym_Vpn_ConnectionDetails: SwiftProtobuf.Message, SwiftProtobuf._Messa } } -extension Nym_Vpn_StatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".StatusRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_StatusRequest, rhs: Nym_Vpn_StatusRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_StatusResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".StatusResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -7077,25 +6648,6 @@ extension Nym_Vpn_StoreAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._Me } } -extension Nym_Vpn_IsAccountStoredRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".IsAccountStoredRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_IsAccountStoredRequest, rhs: Nym_Vpn_IsAccountStoredRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_IsAccountStoredResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".IsAccountStoredResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -7161,27 +6713,8 @@ extension Nym_Vpn_IsAccountStoredResponse: SwiftProtobuf.Message, SwiftProtobuf. } } -extension Nym_Vpn_RemoveAccountRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RemoveAccountRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_RemoveAccountRequest, rhs: Nym_Vpn_RemoveAccountRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_RemoveAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RemoveAccountResponse" +extension Nym_Vpn_ForgetAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".ForgetAccountResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ 1: .same(proto: "success"), 2: .same(proto: "error"), @@ -7214,7 +6747,7 @@ extension Nym_Vpn_RemoveAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._M try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Nym_Vpn_RemoveAccountResponse, rhs: Nym_Vpn_RemoveAccountResponse) -> Bool { + static func ==(lhs: Nym_Vpn_ForgetAccountResponse, rhs: Nym_Vpn_ForgetAccountResponse) -> Bool { if lhs.success != rhs.success {return false} if lhs._error != rhs._error {return false} if lhs.unknownFields != rhs.unknownFields {return false} @@ -7222,30 +6755,10 @@ extension Nym_Vpn_RemoveAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._M } } -extension Nym_Vpn_ForgetAccountRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ForgetAccountRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_ForgetAccountRequest, rhs: Nym_Vpn_ForgetAccountRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_ForgetAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".ForgetAccountResponse" +extension Nym_Vpn_AccountIdentity: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".AccountIdentity" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "success"), - 2: .same(proto: "error"), + 1: .standard(proto: "account_identity"), ] mutating func decodeMessage(decoder: inout D) throws { @@ -7254,8 +6767,7 @@ extension Nym_Vpn_ForgetAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._M // allocates stack space for every case branch when no optimizations are // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { - case 1: try { try decoder.decodeSingularBoolField(value: &self.success) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._error) }() + case 1: try { try decoder.decodeSingularStringField(value: &self._accountIdentity) }() default: break } } @@ -7266,37 +6778,14 @@ extension Nym_Vpn_ForgetAccountResponse: SwiftProtobuf.Message, SwiftProtobuf._M // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 - if self.success != false { - try visitor.visitSingularBoolField(value: self.success, fieldNumber: 1) - } - try { if let v = self._error { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + try { if let v = self._accountIdentity { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) } }() try unknownFields.traverse(visitor: &visitor) } - static func ==(lhs: Nym_Vpn_ForgetAccountResponse, rhs: Nym_Vpn_ForgetAccountResponse) -> Bool { - if lhs.success != rhs.success {return false} - if lhs._error != rhs._error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_GetAccountIdentityRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetAccountIdentityRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetAccountIdentityRequest, rhs: Nym_Vpn_GetAccountIdentityRequest) -> Bool { + static func ==(lhs: Nym_Vpn_AccountIdentity, rhs: Nym_Vpn_AccountIdentity) -> Bool { + if lhs._accountIdentity != rhs._accountIdentity {return false} if lhs.unknownFields != rhs.unknownFields {return false} return true } @@ -7316,10 +6805,15 @@ extension Nym_Vpn_GetAccountIdentityResponse: SwiftProtobuf.Message, SwiftProtob // enabled. https://github.com/apple/swift-protobuf/issues/1034 switch fieldNumber { case 1: try { - var v: String? - try decoder.decodeSingularStringField(value: &v) + var v: Nym_Vpn_AccountIdentity? + var hadOneofValue = false + if let current = self.id { + hadOneofValue = true + if case .accountIdentity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) if let v = v { - if self.id != nil {try decoder.handleConflictingOneOf()} + if hadOneofValue {try decoder.handleConflictingOneOf()} self.id = .accountIdentity(v) } }() @@ -7349,7 +6843,7 @@ extension Nym_Vpn_GetAccountIdentityResponse: SwiftProtobuf.Message, SwiftProtob switch self.id { case .accountIdentity?: try { guard case .accountIdentity(let v)? = self.id else { preconditionFailure() } - try visitor.visitSingularStringField(value: v, fieldNumber: 1) + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) }() case .error?: try { guard case .error(let v)? = self.id else { preconditionFailure() } @@ -7843,31 +7337,12 @@ extension Nym_Vpn_AccountStateSummary: SwiftProtobuf.Message, SwiftProtobuf._Mes } } -extension Nym_Vpn_GetAccountStateRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetAccountStateRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetAccountStateRequest, rhs: Nym_Vpn_GetAccountStateRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_GetAccountStateResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetAccountStateResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "account"), - 2: .same(proto: "error"), - ] +extension Nym_Vpn_GetAccountStateResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = _protobuf_package + ".GetAccountStateResponse" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "account"), + 2: .same(proto: "error"), + ] mutating func decodeMessage(decoder: inout D) throws { while let fieldNumber = try decoder.nextFieldNumber() { @@ -7932,25 +7407,6 @@ extension Nym_Vpn_GetAccountStateResponse: SwiftProtobuf.Message, SwiftProtobuf. } } -extension Nym_Vpn_RefreshAccountStateRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RefreshAccountStateRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_RefreshAccountStateRequest, rhs: Nym_Vpn_RefreshAccountStateRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_RefreshAccountStateResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RefreshAccountStateResponse" static let _protobuf_nameMap = SwiftProtobuf._NameMap() @@ -8076,25 +7532,6 @@ extension Nym_Vpn_AccountUsage: SwiftProtobuf.Message, SwiftProtobuf._MessageImp } } -extension Nym_Vpn_GetAccountUsageRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetAccountUsageRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetAccountUsageRequest, rhs: Nym_Vpn_GetAccountUsageRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetAccountUsageResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetAccountUsageResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8165,128 +7602,6 @@ extension Nym_Vpn_GetAccountUsageResponse: SwiftProtobuf.Message, SwiftProtobuf. } } -extension Nym_Vpn_FetchRawAccountSummaryRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".FetchRawAccountSummaryRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_FetchRawAccountSummaryRequest, rhs: Nym_Vpn_FetchRawAccountSummaryRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_FetchRawAccountSummaryResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".FetchRawAccountSummaryResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "json"), - 2: .same(proto: "error"), - ] - - mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._error) }() - default: break - } - } - } - - func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 1) - } - try { if let v = self._error { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_FetchRawAccountSummaryResponse, rhs: Nym_Vpn_FetchRawAccountSummaryResponse) -> Bool { - if lhs.json != rhs.json {return false} - if lhs._error != rhs._error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_FetchRawDevicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".FetchRawDevicesRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_FetchRawDevicesRequest, rhs: Nym_Vpn_FetchRawDevicesRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - -extension Nym_Vpn_FetchRawDevicesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".FetchRawDevicesResponse" - static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ - 1: .same(proto: "json"), - 2: .same(proto: "error"), - ] - - mutating func decodeMessage(decoder: inout D) throws { - while let fieldNumber = try decoder.nextFieldNumber() { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every case branch when no optimizations are - // enabled. https://github.com/apple/swift-protobuf/issues/1034 - switch fieldNumber { - case 1: try { try decoder.decodeSingularStringField(value: &self.json) }() - case 2: try { try decoder.decodeSingularMessageField(value: &self._error) }() - default: break - } - } - } - - func traverse(visitor: inout V) throws { - // The use of inline closures is to circumvent an issue where the compiler - // allocates stack space for every if/case branch local when no optimizations - // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and - // https://github.com/apple/swift-protobuf/issues/1182 - if !self.json.isEmpty { - try visitor.visitSingularStringField(value: self.json, fieldNumber: 1) - } - try { if let v = self._error { - try visitor.visitSingularMessageField(value: v, fieldNumber: 2) - } }() - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_FetchRawDevicesResponse, rhs: Nym_Vpn_FetchRawDevicesResponse) -> Bool { - if lhs.json != rhs.json {return false} - if lhs._error != rhs._error {return false} - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_ResetDeviceIdentityRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".ResetDeviceIdentityRequest" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8365,25 +7680,6 @@ extension Nym_Vpn_ResetDeviceIdentityResponse: SwiftProtobuf.Message, SwiftProto } } -extension Nym_Vpn_GetDeviceIdentityRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetDeviceIdentityRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetDeviceIdentityRequest, rhs: Nym_Vpn_GetDeviceIdentityRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetDeviceIdentityResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetDeviceIdentityResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8449,25 +7745,6 @@ extension Nym_Vpn_GetDeviceIdentityResponse: SwiftProtobuf.Message, SwiftProtobu } } -extension Nym_Vpn_RegisterDeviceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RegisterDeviceRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_RegisterDeviceRequest, rhs: Nym_Vpn_RegisterDeviceRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_RegisterDeviceResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RegisterDeviceResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8592,25 +7869,6 @@ extension Nym_Vpn_Devices: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen } } -extension Nym_Vpn_GetDevicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetDevicesRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetDevicesRequest, rhs: Nym_Vpn_GetDevicesRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetDevicesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetDevicesResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8681,25 +7939,6 @@ extension Nym_Vpn_GetDevicesResponse: SwiftProtobuf.Message, SwiftProtobuf._Mess } } -extension Nym_Vpn_GetActiveDevicesRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetActiveDevicesRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetActiveDevicesRequest, rhs: Nym_Vpn_GetActiveDevicesRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetActiveDevicesResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetActiveDevicesResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8770,25 +8009,6 @@ extension Nym_Vpn_GetActiveDevicesResponse: SwiftProtobuf.Message, SwiftProtobuf } } -extension Nym_Vpn_RequestZkNymRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".RequestZkNymRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_RequestZkNymRequest, rhs: Nym_Vpn_RequestZkNymRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_RequestZkNymResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".RequestZkNymResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8831,25 +8051,6 @@ extension Nym_Vpn_RequestZkNymResponse: SwiftProtobuf.Message, SwiftProtobuf._Me } } -extension Nym_Vpn_GetDeviceZkNymsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetDeviceZkNymsRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetDeviceZkNymsRequest, rhs: Nym_Vpn_GetDeviceZkNymsRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetDeviceZkNymsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetDeviceZkNymsResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -8892,25 +8093,6 @@ extension Nym_Vpn_GetDeviceZkNymsResponse: SwiftProtobuf.Message, SwiftProtobuf. } } -extension Nym_Vpn_GetZkNymsAvailableForDownloadRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetZkNymsAvailableForDownloadRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetZkNymsAvailableForDownloadRequest, rhs: Nym_Vpn_GetZkNymsAvailableForDownloadRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetZkNymsAvailableForDownloadResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetZkNymsAvailableForDownloadResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -9193,25 +8375,6 @@ extension Nym_Vpn_AvailableTickets: SwiftProtobuf.Message, SwiftProtobuf._Messag } } -extension Nym_Vpn_GetAvailableTicketsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".GetAvailableTicketsRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_GetAvailableTicketsRequest, rhs: Nym_Vpn_GetAvailableTicketsRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_GetAvailableTicketsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".GetAvailableTicketsResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ @@ -9282,25 +8445,6 @@ extension Nym_Vpn_GetAvailableTicketsResponse: SwiftProtobuf.Message, SwiftProto } } -extension Nym_Vpn_IsReadyToConnectRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { - static let protoMessageName: String = _protobuf_package + ".IsReadyToConnectRequest" - static let _protobuf_nameMap = SwiftProtobuf._NameMap() - - mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } - } - - func traverse(visitor: inout V) throws { - try unknownFields.traverse(visitor: &visitor) - } - - static func ==(lhs: Nym_Vpn_IsReadyToConnectRequest, rhs: Nym_Vpn_IsReadyToConnectRequest) -> Bool { - if lhs.unknownFields != rhs.unknownFields {return false} - return true - } -} - extension Nym_Vpn_IsReadyToConnectResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { static let protoMessageName: String = _protobuf_package + ".IsReadyToConnectResponse" static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ diff --git a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.proto b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.proto index c2826e14eb..f3fd68819f 100644 --- a/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.proto +++ b/nym-vpn-apple/ServicesMacOS/Sources/GRPCManager/proto/nym/vpn.proto @@ -2,7 +2,8 @@ syntax = "proto3"; package nym.vpn; -message Empty {} +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; // Represents the identity of a gateway message Gateway { @@ -24,8 +25,8 @@ message EntryNode { oneof entry_node_enum { Gateway gateway = 1; Location location = 2; - Empty random_low_latency = 3; - Empty random = 4; + google.protobuf.Empty random_low_latency = 3; + google.protobuf.Empty random = 4; } } @@ -34,7 +35,7 @@ message ExitNode { Address address = 1; Gateway gateway = 2; Location location = 3; - Empty random = 4; + google.protobuf.Empty random = 4; } } @@ -72,7 +73,6 @@ message UserAgent { // Example: // nym-vpn-app // nym-vpnd - // nym-vpn-cli string application = 1; // Format: version[-optional] [(daemon version[-optional])] // Example: @@ -138,8 +138,6 @@ message ValidatorDetails { Url api_url = 3; } -message InfoRequest {} - message InfoResponse { string version = 1; google.protobuf.Timestamp build_timestamp = 2; @@ -181,14 +179,10 @@ message SystemMessage { map properties = 3; } -message GetSystemMessagesRequest {} - message GetSystemMessagesResponse { repeated SystemMessage messages = 1; } -message GetFeatureFlagsRequest {} - message GetFeatureFlagsResponse { map flags = 1; map groups = 2; @@ -265,7 +259,6 @@ message ConnectResponse { ConnectRequestError error = 2; } -message DisconnectRequest {} message DisconnectResponse { bool success = 1; } @@ -280,8 +273,6 @@ enum ConnectionStatus { CONNECTION_FAILED = 6; } -import "google/protobuf/timestamp.proto"; - message ConnectionDetails { Gateway entry_gateway = 1; Gateway exit_gateway = 2; @@ -289,7 +280,6 @@ message ConnectionDetails { google.protobuf.Timestamp since = 4; } -message StatusRequest {} message StatusResponse { ConnectionStatus status = 1; ConnectionDetails details = 2; @@ -611,8 +601,6 @@ message StoreAccountResponse { AccountError error = 2; } -message IsAccountStoredRequest {} - message IsAccountStoredResponse { oneof resp { bool is_stored = 1; @@ -620,25 +608,18 @@ message IsAccountStoredResponse { } } -message RemoveAccountRequest {} - -message RemoveAccountResponse { - bool success = 1; - AccountError error = 2; -} - -message ForgetAccountRequest {} - message ForgetAccountResponse { bool success = 1; AccountError error = 2; } -message GetAccountIdentityRequest {} +message AccountIdentity { + optional string account_identity = 1; +} message GetAccountIdentityResponse { oneof id { - string account_identity = 1; + AccountIdentity account_identity = 1; AccountError error = 2; } } @@ -782,8 +763,6 @@ message AccountStateSummary { optional RequestZkNymResult request_zk_nym_result = 7; } -message GetAccountStateRequest {} - message GetAccountStateResponse { oneof result { AccountStateSummary account = 1; @@ -791,7 +770,6 @@ message GetAccountStateResponse { } } -message RefreshAccountStateRequest {} message RefreshAccountStateResponse {} message AccountUsages { @@ -809,7 +787,6 @@ message AccountUsage { double bandwidth_used_gb = 8; } -message GetAccountUsageRequest {} message GetAccountUsageResponse { oneof result { AccountUsages account_usages = 1; @@ -817,20 +794,6 @@ message GetAccountUsageResponse { } } -message FetchRawAccountSummaryRequest {} - -message FetchRawAccountSummaryResponse { - string json = 1; - AccountError error = 2; -} - -message FetchRawDevicesRequest {} - -message FetchRawDevicesResponse { - string json = 1; - AccountError error = 2; -} - message ResetDeviceIdentityRequest { // 32 byte seed, [u8; 32] optional bytes seed = 1; @@ -841,8 +804,6 @@ message ResetDeviceIdentityResponse { AccountError error = 2; } -message GetDeviceIdentityRequest {} - message GetDeviceIdentityResponse { oneof id { string device_identity = 1; @@ -850,8 +811,6 @@ message GetDeviceIdentityResponse { } } -message RegisterDeviceRequest {} - message RegisterDeviceResponse { string json = 1; AccountError error = 2; @@ -875,7 +834,6 @@ message Devices { repeated Device devices = 1; } -message GetDevicesRequest {} message GetDevicesResponse { oneof result { Devices devices = 1; @@ -883,7 +841,6 @@ message GetDevicesResponse { } } -message GetActiveDevicesRequest {} message GetActiveDevicesResponse { oneof result { Devices devices = 1; @@ -891,22 +848,16 @@ message GetActiveDevicesResponse { } } -message RequestZkNymRequest {} - message RequestZkNymResponse { string json = 1; AccountError error = 2; } -message GetDeviceZkNymsRequest {} - message GetDeviceZkNymsResponse { string json = 1; AccountError error = 2; } -message GetZkNymsAvailableForDownloadRequest {} - message GetZkNymsAvailableForDownloadResponse { string json = 1; AccountError error = 2; @@ -959,8 +910,6 @@ message AvailableTickets { string vpn_exit_data_si = 12; } -message GetAvailableTicketsRequest {} - message GetAvailableTicketsResponse { oneof resp { AvailableTickets available_tickets = 1; @@ -968,8 +917,6 @@ message GetAvailableTicketsResponse { } } -message IsReadyToConnectRequest {} - message IsReadyToConnectResponse { enum IsReadyToConnectResponseType { IS_READY_TO_CONNECT_RESPONSE_TYPE_UNSPECIFIED = 0; @@ -1032,33 +979,33 @@ message AccountError { service NymVpnd { // Get info regarding the nym-vpnd in general, like version etc. - rpc Info (InfoRequest) returns (InfoResponse) {} + rpc Info (google.protobuf.Empty) returns (InfoResponse) {} // Set the network. This requires a restart to take effect rpc SetNetwork (SetNetworkRequest) returns (SetNetworkResponse) {} // List messages fetched from nym-vpn-api - rpc GetSystemMessages (GetSystemMessagesRequest) returns (GetSystemMessagesResponse) {} + rpc GetSystemMessages (google.protobuf.Empty) returns (GetSystemMessagesResponse) {} // List the feature flags fetched from the nym-vpn-api - rpc GetFeatureFlags (GetFeatureFlagsRequest) returns (GetFeatureFlagsResponse) {} + rpc GetFeatureFlags (google.protobuf.Empty) returns (GetFeatureFlagsResponse) {} // Start the tunnel and connect rpc VpnConnect (ConnectRequest) returns (ConnectResponse) {} // Disconnect and stop the tunnel - rpc VpnDisconnect (DisconnectRequest) returns (DisconnectResponse) {} + rpc VpnDisconnect (google.protobuf.Empty) returns (DisconnectResponse) {} // Get the current tunnel and connection status - rpc VpnStatus (StatusRequest) returns (StatusResponse) {} + rpc VpnStatus (google.protobuf.Empty) returns (StatusResponse) {} // Listen for events that indicate that the connection state changes, such as // from Connecting -> Connected - rpc ListenToConnectionStateChanges (Empty) returns (stream ConnectionStateChange) {} + rpc ListenToConnectionStateChanges (google.protobuf.Empty) returns (stream ConnectionStateChange) {} // Listen for general status evens emitted by nym-vpnd, which in turn might // originate from elsewhere such as remote gateways. - rpc ListenToConnectionStatus (Empty) returns (stream ConnectionStatusUpdate) {} + rpc ListenToConnectionStatus (google.protobuf.Empty) returns (stream ConnectionStatusUpdate) {} // List the available gateways for the selected mode rpc ListGateways (ListGatewaysRequest) returns (ListGatewaysResponse) {} @@ -1074,58 +1021,55 @@ service NymVpnd { rpc StoreAccount (StoreAccountRequest) returns (StoreAccountResponse) {} // Check if the recovery phrase is stored - rpc IsAccountStored (IsAccountStoredRequest) returns (IsAccountStoredResponse) {} - - // Remove the recovery phrase from local storage - rpc RemoveAccount (RemoveAccountRequest) returns (RemoveAccountResponse) {} + rpc IsAccountStored (google.protobuf.Empty) returns (IsAccountStoredResponse) {} // Removes everything related to the account, including the device identity, // credential storage, mixnet keys, gateway registrations. - rpc ForgetAccount (ForgetAccountRequest) returns (ForgetAccountResponse) {} + rpc ForgetAccount (google.protobuf.Empty) returns (ForgetAccountResponse) {} // Get the account identity of the locally stored recovery phrase - rpc GetAccountIdentity (GetAccountIdentityRequest) returns (GetAccountIdentityResponse) {} + rpc GetAccountIdentity (google.protobuf.Empty) returns (GetAccountIdentityResponse) {} // Get the set of account links for the user rpc GetAccountLinks (GetAccountLinksRequest) returns (GetAccountLinksResponse) {} // Query the account state, which is synced from the nym-vpn-api account, as it // is known and interpreted by nym-vpnd - rpc GetAccountState (GetAccountStateRequest) returns (GetAccountStateResponse) {} + rpc GetAccountState (google.protobuf.Empty) returns (GetAccountStateResponse) {} // The vpn client will periodically refresh the account state in the // background. This command triggers a manual refresh. - rpc RefreshAccountState (RefreshAccountStateRequest) returns (RefreshAccountStateResponse) {} + rpc RefreshAccountState (google.protobuf.Empty) returns (RefreshAccountStateResponse) {} // Get the account usage from the nym-vpn-api - rpc GetAccountUsage (GetAccountUsageRequest) returns (GetAccountUsageResponse) {} + rpc GetAccountUsage (google.protobuf.Empty) returns (GetAccountUsageResponse) {} // Check if the local account state is ready to connect - rpc IsReadyToConnect (IsReadyToConnectRequest) returns (IsReadyToConnectResponse) {} + rpc IsReadyToConnect (google.protobuf.Empty) returns (IsReadyToConnectResponse) {} // Reset the device identity rpc ResetDeviceIdentity (ResetDeviceIdentityRequest) returns (ResetDeviceIdentityResponse) {} // Get the device identity - rpc GetDeviceIdentity (GetDeviceIdentityRequest) returns (GetDeviceIdentityResponse) {} + rpc GetDeviceIdentity (google.protobuf.Empty) returns (GetDeviceIdentityResponse) {} // Try to register the local device with the nym-vpn-api - rpc RegisterDevice (RegisterDeviceRequest) returns (RegisterDeviceResponse) {} + rpc RegisterDevice (google.protobuf.Empty) returns (RegisterDeviceResponse) {} // Get the list of devices associated with this account from the nym-vpn-api - rpc GetDevices (GetDevicesRequest) returns (GetDevicesResponse) {} + rpc GetDevices (google.protobuf.Empty) returns (GetDevicesResponse) {} // Get the list of active devices associated with this account from the nym-vpn-api - rpc GetActiveDevices (GetActiveDevicesRequest) returns (GetActiveDevicesResponse) {} + rpc GetActiveDevices (google.protobuf.Empty) returns (GetActiveDevicesResponse) {} // Request new zk-nyms (ticketbooks) from the nym-vpn-api - rpc RequestZkNym (RequestZkNymRequest) returns (RequestZkNymResponse) {} + rpc RequestZkNym (google.protobuf.Empty) returns (RequestZkNymResponse) {} // List the zk-nyms associated with this device from the nym-vpn-api - rpc GetDeviceZkNyms (GetDeviceZkNymsRequest) returns (GetDeviceZkNymsResponse) {} + rpc GetDeviceZkNyms (google.protobuf.Empty) returns (GetDeviceZkNymsResponse) {} // List the zk-nyms available for download from the nym-vpn-api - rpc GetZkNymsAvailableForDownload (GetZkNymsAvailableForDownloadRequest) returns (GetZkNymsAvailableForDownloadResponse) {} + rpc GetZkNymsAvailableForDownload (google.protobuf.Empty) returns (GetZkNymsAvailableForDownloadResponse) {} // Get a zk-nym by its id from the nym-vpn-api rpc GetZkNymById (GetZkNymByIdRequest) returns (GetZkNymByIdResponse) {} @@ -1134,15 +1078,6 @@ service NymVpnd { rpc ConfirmZkNymDownloaded (ConfirmZkNymDownloadedRequest) returns (ConfirmZkNymDownloadedResponse) {} // Get the available tickets in the local credential store - rpc GetAvailableTickets (GetAvailableTicketsRequest) returns (GetAvailableTicketsResponse) {} - - // -- Delegated remote calls -- - // These query the remote nym-vpn-api state directly - - // Get the server side account summary directly from the nym-vpn-api - rpc FetchRawAccountSummary (FetchRawAccountSummaryRequest) returns (FetchRawAccountSummaryResponse) {} - - // Get the list of devices directly from the nym-vpn-api - rpc FetchRawDevices (FetchRawDevicesRequest) returns (FetchRawDevicesResponse) {} + rpc GetAvailableTickets (google.protobuf.Empty) returns (GetAvailableTicketsResponse) {} } diff --git a/nym-vpn-apple/ServicesMutual/Sources/AppVersionProvider/AppVersionProvider.swift b/nym-vpn-apple/ServicesMutual/Sources/AppVersionProvider/AppVersionProvider.swift index 57d8121ef3..ba95799fe8 100644 --- a/nym-vpn-apple/ServicesMutual/Sources/AppVersionProvider/AppVersionProvider.swift +++ b/nym-vpn-apple/ServicesMutual/Sources/AppVersionProvider/AppVersionProvider.swift @@ -1,7 +1,7 @@ import Foundation public enum AppVersionProvider { - public static let libVersion = "1.1.1" + public static let libVersion = "1.1.0" public static var app: String { "nym-vpn-app" diff --git a/nym-vpn-apple/Settings/Sources/Settings/Support/SupportViewModel.swift b/nym-vpn-apple/Settings/Sources/Settings/Support/SupportViewModel.swift index a9a1c222ca..750e97ef41 100644 --- a/nym-vpn-apple/Settings/Sources/Settings/Support/SupportViewModel.swift +++ b/nym-vpn-apple/Settings/Sources/Settings/Support/SupportViewModel.swift @@ -9,11 +9,11 @@ final class SupportViewModel: ObservableObject { private let faqLink = Constants.supportURL.rawValue private let emailLink = Constants.emailLink.rawValue private let githubIssueLink = Constants.ghIssuesLink.rawValue - private let matrixLink = "https://matrix.to/#/%23NymVPN:nymtech.chat" + private let matrixLink = "https://nym.com/go/matrix" private let discordLink = Constants.discordLink.rawValue private let connectionManager: ConnectionManager - let title = "support".localizedString + let title = "settings.supportAndFeedback".localizedString @Binding var path: NavigationPath @Published var isResetVPNProfileDisplayed = false diff --git a/nym-vpn-apple/Theme/Sources/Theme/Resources/Localizable.xcstrings b/nym-vpn-apple/Theme/Sources/Theme/Resources/Localizable.xcstrings index 6c68284aca..6cb119bc46 100644 --- a/nym-vpn-apple/Theme/Sources/Theme/Resources/Localizable.xcstrings +++ b/nym-vpn-apple/Theme/Sources/Theme/Resources/Localizable.xcstrings @@ -623,7 +623,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Failure: entry gateway cannot be same as exit router" + "value" : "For privacy, NymVPN won't use the same gateway for entry and exit. Reconnect or choose different locations." } } } @@ -1517,7 +1517,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Help us refine our app during the beta phase! Your feedback is crucial for identifying and resolving issues. Opt-in for anonymous error monitoring (via" + "value" : "Help us refine our app! Your feedback is crucial for identifying and resolving issues. Opt-in for anonymous error monitoring (via" } } } @@ -1539,7 +1539,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Welcome\nto NymVPN beta" + "value" : "Welcome\nto NymVPN" } } } diff --git a/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Contents.json b/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Contents.json deleted file mode 100644 index 46d18a644f..0000000000 --- a/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "filename" : "Vector.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true, - "template-rendering-intent" : "template" - } -} diff --git a/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Vector.svg b/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Vector.svg deleted file mode 100644 index 78842d920f..0000000000 --- a/nym-vpn-apple/UIComponents/Sources/UIComponents/Resources/Assets.xcassets/Icons/addCredentialsLogo.imageset/Vector.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - -