Changeset View
Changeset View
Standalone View
Standalone View
native/native_rust_library/src/lib.rs
use backup::ffi::*; | use backup::ffi::*; | ||||
use comm_opaque2::client::{Login, Registration}; | use comm_opaque2::client::{Login, Registration}; | ||||
use comm_opaque2::grpc::opaque_error_to_grpc_status as handle_error; | use comm_opaque2::grpc::opaque_error_to_grpc_status as handle_error; | ||||
use exact_user_search::{ | use exact_user_search::{ | ||||
find_user_id_for_username, find_user_id_for_wallet_address, | find_user_id_for_username, find_user_id_for_wallet_address, | ||||
}; | }; | ||||
use farcaster::{ | use farcaster::{ | ||||
farcaster_id_string_to_option, get_farcaster_users, link_farcaster_account, | farcaster_id_string_to_option, get_farcaster_users, link_farcaster_account, | ||||
unlink_farcaster_account, | |||||
}; | }; | ||||
use ffi::{bool_callback, string_callback, void_callback}; | use ffi::{bool_callback, string_callback, void_callback}; | ||||
use future_manager::ffi::*; | use future_manager::ffi::*; | ||||
use grpc_clients::identity::protos::auth::{ | use grpc_clients::identity::protos::auth::{ | ||||
GetDeviceListRequest, UpdateDeviceListRequest, | GetDeviceListRequest, UpdateDeviceListRequest, | ||||
}; | }; | ||||
use grpc_clients::identity::protos::authenticated::{ | use grpc_clients::identity::protos::authenticated::{ | ||||
InboundKeyInfo, InboundKeysForUserRequest, KeyserverKeysResponse, | InboundKeyInfo, InboundKeysForUserRequest, KeyserverKeysResponse, | ||||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | extern "Rust" { | ||||
fn link_farcaster_account( | fn link_farcaster_account( | ||||
user_id: String, | user_id: String, | ||||
device_id: String, | device_id: String, | ||||
access_token: String, | access_token: String, | ||||
farcaster_id: String, | farcaster_id: String, | ||||
promise_id: u32, | promise_id: u32, | ||||
); | ); | ||||
#[cxx_name = "identityUnlinkFarcasterAccount"] | |||||
fn unlink_farcaster_account( | |||||
user_id: String, | |||||
device_id: String, | |||||
access_token: String, | |||||
promise_id: u32, | |||||
); | |||||
// Argon2 | // Argon2 | ||||
#[cxx_name = "compute_backup_key"] | #[cxx_name = "compute_backup_key"] | ||||
fn compute_backup_key_str( | fn compute_backup_key_str( | ||||
password: &str, | password: &str, | ||||
backup_id: &str, | backup_id: &str, | ||||
) -> Result<[u8; 32]>; | ) -> Result<[u8; 32]>; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,256 Lines • Show Last 20 Lines |