diff --git a/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/account.rs b/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/account.rs index 516e87a5c7..b1d05bf53b 100644 --- a/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/account.rs +++ b/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/account.rs @@ -154,14 +154,6 @@ impl From } } -//impl From for crate::RequestZkNymSuccess { -// fn from(request_success: nym_vpn_account_controller::RequestZkNymSuccess) -> Self { -// Self { -// id: request_success.id.to_string(), -// } -// } -//} - impl From for ProtoRequestZkNymSuccess { fn from(value: nym_vpn_lib_types::RequestZkNymSuccess) -> Self { Self { id: value.id } diff --git a/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/tunnel_state.rs b/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/tunnel_state.rs index 76e83d6b53..24085c6343 100644 --- a/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/tunnel_state.rs +++ b/nym-vpn-core/crates/nym-vpn-proto/src/conversions/into_proto/tunnel_state.rs @@ -3,8 +3,8 @@ use nym_vpn_lib_types::{ ActionAfterDisconnect, ConnectionData, ErrorStateReason, ForgetAccountError, Gateway, - MixnetConnectionData, RegisterDeviceError, StoreAccountError, - SyncAccountError, SyncDeviceError, TunnelConnectionData, TunnelState, VpnApiEndpointFailure, + MixnetConnectionData, RegisterDeviceError, StoreAccountError, SyncAccountError, + SyncDeviceError, TunnelConnectionData, TunnelState, VpnApiEndpointFailure, WireguardConnectionData, WireguardNode, }; @@ -19,7 +19,8 @@ use crate::{ BaseErrorStateReason as ProtoBaseErrorStateReason, Connected as ProtoConnected, Connecting as ProtoConnecting, Disconnected as ProtoDisconnected, Disconnecting as ProtoDisconnecting, Error as ProtoError, - ForgetAccountError as ProtoForgetAccountError, Offline as ProtoOffline, + ForgetAccountError as ProtoForgetAccountError, + GeneralAccountError as ProtoGeneralAccountError, Offline as ProtoOffline, RegisterDeviceError as ProtoRegisterDeviceError, State as ProtoState, StoreAccountError as ProtoStoreAccountError, SyncAccountError as ProtoSyncAccountError, SyncDeviceError as ProtoSyncDeviceError, @@ -119,7 +120,7 @@ impl From for ProtoErrorStateReason { } } -impl From for crate::tunnel_state::GeneralAccountError { +impl From for ProtoGeneralAccountError { fn from(value: String) -> Self { Self { error_message: value, diff --git a/proto/nym/vpn.proto b/proto/nym/vpn.proto index 410cddb9b1..79c7849eee 100644 --- a/proto/nym/vpn.proto +++ b/proto/nym/vpn.proto @@ -429,113 +429,6 @@ message RequestZkNymSuccess { string id = 1; } -message RequestZkNymError { - enum RequestZkNymErrorType { - REQUEST_ZK_NYM_ERROR_TYPE_UNSPECIFIED = 0; - - // Unspecified internal error - INTERNAL = 1; - - // General error - GENERAL = 2; - - // Error returned from the nym-vpn-api endpoint for get the zk-nyms that - // are available for download or resume. - GET_ZK_NYMS_AVAILABLE_FOR_DOWNLOAD_ENDPOINT_FAILURE = 9; - - // Failed to create the ecash key pair - CREATE_ECASH_KEY_PAIR = 10; - - // Failed to construct the withdrawal request - CONSTRUCT_WITHDRAWAL_REQUEST = 11; - - // Error returned from the nym-vpn-api endpoint - REQUEST_ZK_NYM_ENDPOINT_FAILURE = 3; - - // The vpn-api response contained an invalid ticket type - INVALID_TICKET_TYPE_IN_RESPONSE = 12; - - // The vpn-api response contained a ticket type that didn't match the one - // we requested - TICKET_TYPE_MISMATCH = 13; - - // Error returned from the nym-vpn-api polling endpoint - POLL_ZK_NYM_ENDPOINT_FAILURE = 4; - - // The task polling for the result failed - POLLING_TASK_ERROR = 5; - - // Timeout polling for the result - POLLING_TIMEOUT = 6; - - // Request finished correctly, but the nym-vpn-api returned an error - // with the result. - FINISHED_WITH_ERROR = 7; - - // The vpn-api response is missing the blinded shares - MISSING_BLINDED_SHARES = 14; - - // The vpn-api response is missing the master verification key - RESPONSE_HAS_INVALID_MASTER_VERIFICATION_KEY = 15; - - // The vpn-api response has an inconsistent epoch id - EPOCH_ID_MISMATCH = 16; - - // The vpn-api response has an inconsistent expiration date - EXPIRATION_DATE_MISMATCH = 17; - - // Error returned from the nym-vpn-api endpoint for getting the partial - // verification keys - GET_PARTIAL_VERIFICATION_KEYS_ENDPOINT_FAILURE = 18; - - // Missing the master verification key in storage - NO_MASTER_VERIFICATION_KEY_IN_STORAGE = 19; - - // Missing coin index signatures in storage - NO_COIN_INDEX_SIGNATURES_IN_STORAGE = 20; - - // Missing expiration date signatures in storage - NO_EXPIRATION_DATE_SIGNATURES_IN_STORAGE = 21; - - // The verification key is invalid - INVALID_VERIFICATION_KEY = 22; - - // Failed to deserialize the blinded signature - DESERIALIZE_BLINDED_SIGNATURE = 23; - - // Missing index when decoding keys - DECODED_KEYS_MISSING_INDEX = 24; - - // Failed to import the ticketbook into local storage - IMPORT = 8; - - // Failed to aggregate the wallets - AGGREGATE_WALLETS = 25; - - // The error returned from the vpn-api endpoint when confirming the zk-nym - // download - CONFIRM_ZK_NYM_DOWNLOAD_ENDPOINT_FAILURE = 26; - - // Error importing the zknym due to the storage missing the pending request data - MISSING_PENDING_REQUEST = 27; - - // Error removing the pending request from storage - REMOVE_PENDING_REQUEST = 28; - - // General credential storage error - CREDENTIAL_STORAGE = 29; - - // The vpn-api response contained an unexpected error - UNEXPECTED_ERROR_RESPONSE = 30; - } - - RequestZkNymErrorType kind = 1; - optional string id = 2; - optional string ticketbook_type = 3; - optional string message = 4; - optional string message_id = 5; -} - message RequestZkNymErrorOutcome { oneof outcome { VpnApiEndpointFailure vpn_api = 1;