Page MenuHomePhabricator

D4938.diff
No OneTemporary

D4938.diff

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<Client>;
+ fn get_user_id_blocking(
+ client: Box<Client>,
+ auth_type: i32,
+ user_info: String,
+ ) -> Result<String>;
+ fn verify_user_token_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ access_token: String,
+ ) -> Result<bool>;
+ fn register_user_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ username: String,
+ password: String,
+ user_public_key: String,
+ ) -> Result<String>;
+ fn login_user_pake_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ password: String,
+ ) -> Result<String>;
+ fn login_user_wallet_blocking(
+ client: Box<Client>,
+ user_id: String,
+ device_id: String,
+ siwe_message: String,
+ siwe_signature: Vec<u8>,
+ user_public_key: String,
+ ) -> Result<String>;
+ }
+}
+
+#[derive(Debug)]
+enum AuthType {
+ Password = 0,
+ Wallet = 1,
+}
#[derive(Debug)]
struct Client {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 2:03 AM (15 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2581966
Default Alt Text
D4938.diff (1 KB)

Event Timeline