Page MenuHomePhabricator

D4938.id15903.diff
No OneTemporary

D4938.id15903.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,45 @@
}
#[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)]
struct Client {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 1:14 AM (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2598915
Default Alt Text
D4938.id15903.diff (1 KB)

Event Timeline