diff --git a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs --- a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs +++ b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs @@ -120,6 +120,16 @@ ) } +#[instrument] +fn verify_user_token_blocking( + client: Box, + user_id: String, + device_id: String, + access_token: String, +) -> Result { + RUNTIME.block_on(verify_user_token(client, user_id, device_id, access_token)) +} + async fn register_user( mut client: Box, user_id: String, @@ -182,6 +192,25 @@ handle_registration_token_response(message) } +#[instrument] +fn register_user_blocking( + client: Box, + user_id: String, + device_id: String, + username: String, + password: String, + user_public_key: String, +) -> Result { + RUNTIME.block_on(register_user( + client, + user_id, + device_id, + username, + password, + user_public_key, + )) +} + async fn login_user_pake( mut client: Box, user_id: String, @@ -244,6 +273,16 @@ handle_login_token_response(message) } +#[instrument] +fn login_user_pake_blocking( + client: Box, + user_id: String, + device_id: String, + password: String, +) -> Result { + RUNTIME.block_on(login_user_pake(client, user_id, device_id, password)) +} + async fn login_user_wallet( mut client: Box, user_id: String, @@ -286,6 +325,25 @@ handle_wallet_login_response(message) } +#[instrument] +fn login_user_wallet_blocking( + client: Box, + user_id: String, + device_id: String, + siwe_message: String, + siwe_signature: Vec, + user_public_key: String, +) -> Result { + RUNTIME.block_on(login_user_wallet( + client, + user_id, + device_id, + siwe_message, + siwe_signature, + user_public_key, + )) +} + fn pake_registration_start( rng: &mut (impl Rng + CryptoRng), user_id: String,