Changeset View
Changeset View
Standalone View
Standalone View
native/native_rust_library/src/identity_client.rs
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | ) -> Result<String, Status> { | ||||
handle_login_token_response(message) | handle_login_token_response(message) | ||||
} | } | ||||
pub async fn login_user_wallet( | pub async fn login_user_wallet( | ||||
mut client: Box<IdentityClient>, | mut client: Box<IdentityClient>, | ||||
user_id: String, | user_id: String, | ||||
signing_public_key: String, | signing_public_key: String, | ||||
siwe_message: String, | siwe_message: String, | ||||
siwe_signature: Vec<u8>, | siwe_signature: String, | ||||
) -> Result<String, Status> { | ) -> Result<String, Status> { | ||||
// Create a LoginRequest channel and use ReceiverStream to turn the | // Create a LoginRequest channel and use ReceiverStream to turn the | ||||
// MPSC receiver into a Stream for outbound messages | // MPSC receiver into a Stream for outbound messages | ||||
let (tx, rx) = mpsc::channel(1); | let (tx, rx) = mpsc::channel(1); | ||||
let stream = ReceiverStream::new(rx); | let stream = ReceiverStream::new(rx); | ||||
let request = Request::new(stream); | let request = Request::new(stream); | ||||
// `response` is the Stream for inbound messages | // `response` is the Stream for inbound messages | ||||
▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines |