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 @@ -58,7 +58,51 @@ } #[cxx::bridge(namespace = "identity")] -mod ffi {} +mod ffi { + extern "Rust" { + type Client; + fn initialize_client() -> Box; + fn get_user_id_blocking( + client: Box, + auth_type: i32, + user_info: String, + ) -> Result; + fn verify_user_token_blocking( + client: Box, + user_id: String, + device_id: String, + access_token: String, + ) -> Result; + fn register_user_blocking( + client: Box, + user_id: String, + device_id: String, + username: String, + password: String, + user_public_key: String, + ) -> Result; + fn login_user_pake_blocking( + client: Box, + user_id: String, + device_id: String, + password: String, + ) -> Result; + fn login_user_wallet_blocking( + client: Box, + user_id: String, + device_id: String, + siwe_message: String, + siwe_signature: Vec, + user_public_key: String, + ) -> Result; + } +} + +#[derive(Debug)] +enum AuthType { + Password = 0, + Wallet = 1, +} #[derive(Debug)] struct Client {