diff --git a/native/native_rust_library/src/identity.rs b/native/native_rust_library/src/identity.rs new file mode 100644 --- /dev/null +++ b/native/native_rust_library/src/identity.rs @@ -0,0 +1,3 @@ +pub mod exact_user_search; +pub mod farcaster; +pub mod wallet_registration; diff --git a/native/native_rust_library/src/exact_user_search.rs b/native/native_rust_library/src/identity/exact_user_search.rs rename from native/native_rust_library/src/exact_user_search.rs rename to native/native_rust_library/src/identity/exact_user_search.rs diff --git a/native/native_rust_library/src/farcaster.rs b/native/native_rust_library/src/identity/farcaster.rs rename from native/native_rust_library/src/farcaster.rs rename to native/native_rust_library/src/identity/farcaster.rs --- a/native/native_rust_library/src/farcaster.rs +++ b/native/native_rust_library/src/identity/farcaster.rs @@ -1,6 +1,8 @@ use crate::{ - handle_string_result_as_callback, handle_void_result_as_callback, Error, - CODE_VERSION, DEVICE_TYPE, IDENTITY_SOCKET_ADDR, RUNTIME, + utils::jsi_callbacks::{ + handle_string_result_as_callback, handle_void_result_as_callback, + }, + Error, CODE_VERSION, DEVICE_TYPE, IDENTITY_SOCKET_ADDR, RUNTIME, }; use grpc_clients::identity::{ get_auth_client, get_unauthenticated_client, diff --git a/native/native_rust_library/src/wallet_registration.rs b/native/native_rust_library/src/identity/wallet_registration.rs rename from native/native_rust_library/src/wallet_registration.rs rename to native/native_rust_library/src/identity/wallet_registration.rs --- a/native/native_rust_library/src/wallet_registration.rs +++ b/native/native_rust_library/src/identity/wallet_registration.rs @@ -1,6 +1,7 @@ use crate::{ - farcaster::farcaster_id_string_to_option, handle_string_result_as_callback, - Error, UserIDAndDeviceAccessToken, WalletUserInfo, CODE_VERSION, DEVICE_TYPE, + identity::farcaster::farcaster_id_string_to_option, + utils::jsi_callbacks::handle_string_result_as_callback, Error, + UserIDAndDeviceAccessToken, WalletUserInfo, CODE_VERSION, DEVICE_TYPE, IDENTITY_SOCKET_ADDR, RUNTIME, }; use grpc_clients::identity::{ 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 @@ -26,24 +26,22 @@ mod argon2_tools; mod backup; mod constants; -mod exact_user_search; -mod farcaster; +mod identity; mod utils; -mod wallet_registration; use crate::argon2_tools::compute_backup_key_str; -use crate::exact_user_search::{ +use crate::identity::exact_user_search::{ find_user_id_for_username, find_user_id_for_wallet_address, }; -use crate::farcaster::{ +use crate::identity::farcaster::{ farcaster_id_string_to_option, get_farcaster_users, link_farcaster_account, unlink_farcaster_account, }; +use crate::identity::wallet_registration::register_wallet_user; use crate::utils::jsi_callbacks::{ handle_bool_result_as_callback, handle_string_result_as_callback, handle_void_result_as_callback, }; -use crate::wallet_registration::register_wallet_user; mod generated { // We get the CODE_VERSION from this generated file