diff --git a/native/native_rust_library/src/identity_client.rs b/native/native_rust_library/src/identity_client.rs --- a/native/native_rust_library/src/identity_client.rs +++ b/native/native_rust_library/src/identity_client.rs @@ -4,29 +4,49 @@ pub async fn register_user( mut _client: Box, - _user_id: String, - _signing_public_key: String, _username: String, _password: String, + _key_payload: String, + _key_payload_signature: String, + _identity_prekey: String, + _identity_prekey_signature: String, + _notif_prekey: String, + _notif_prekey_signature: String, + _identity_onetime_keys: Vec, + _notif_onetime_keys: Vec, ) -> Result { unimplemented!(); } +// User could be logging in from new device, need to resend device information pub async fn login_user_pake( mut _client: Box, - _user_id: String, - _signing_public_key: String, + _username: String, _password: String, + _key_payload: String, + _key_payload_signature: String, + _identity_prekey: String, + _identity_prekey_signature: String, + _notif_prekey: String, + _notif_prekey_signature: String, + _identity_onetime_keys: Vec, + _notif_onetime_keys: Vec, ) -> Result { unimplemented!(); } pub async fn login_user_wallet( mut _client: Box, - _user_id: String, - _signing_public_key: String, _siwe_message: String, _siwe_signature: String, + _key_payload: String, + _key_payload_signature: String, + _identity_prekey: String, + _identity_prekey_signature: String, + _notif_prekey: String, + _notif_prekey_signature: String, + _identity_onetime_keys: Vec, + _notif_onetime_keys: Vec, ) -> Result { unimplemented!(); } diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs --- a/native/native_rust_library/src/lib.rs +++ b/native/native_rust_library/src/lib.rs @@ -47,27 +47,46 @@ #[cxx_name = "identityRegisterUserBlocking"] fn identity_register_user_blocking( client: Box, - user_id: String, - signing_public_key: String, username: String, password: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result; #[cxx_name = "identityLoginUserPakeBlocking"] fn identity_login_user_pake_blocking( client: Box, - user_id: String, - signing_public_key: String, + username: String, password: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result; #[cxx_name = "identityLoginUserWalletBlocking"] fn identity_login_user_wallet_blocking( client: Box, - user_id: String, - signing_public_key: String, siwe_message: String, siwe_signature: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result; // Tunnelbroker Service Client @@ -97,49 +116,87 @@ #[instrument] fn identity_register_user_blocking( client: Box, - user_id: String, - signing_public_key: String, username: String, password: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result { RUNTIME.block_on(identity_client::register_user( client, - user_id, - signing_public_key, username, password, + key_payload, + key_payload_signature, + identity_prekey, + identity_prekey_signature, + notif_prekey, + notif_prekey_signature, + identity_onetime_keys, + notif_onetime_keys, )) } #[instrument] fn identity_login_user_pake_blocking( client: Box, - user_id: String, - signing_public_key: String, + username: String, password: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result { RUNTIME.block_on(identity_client::login_user_pake( client, - user_id, - signing_public_key, + username, password, + key_payload, + key_payload_signature, + identity_prekey, + identity_prekey_signature, + notif_prekey, + notif_prekey_signature, + identity_onetime_keys, + notif_onetime_keys, )) } #[instrument] fn identity_login_user_wallet_blocking( client: Box, - user_id: String, - signing_public_key: String, siwe_message: String, siwe_signature: String, + key_payload: String, + key_payload_signature: String, + identity_prekey: String, + identity_prekey_signature: String, + notif_prekey: String, + notif_prekey_signature: String, + identity_onetime_keys: Vec, + notif_onetime_keys: Vec, ) -> Result { RUNTIME.block_on(identity_client::login_user_wallet( client, - user_id, - signing_public_key, siwe_message, siwe_signature, + key_payload, + key_payload_signature, + identity_prekey, + identity_prekey_signature, + notif_prekey, + notif_prekey_signature, + identity_onetime_keys, + notif_onetime_keys, )) }