wip: startup flow

This commit is contained in:
2024-11-21 08:43:42 +07:00
parent fb71f02ef3
commit c60a37a245
15 changed files with 910 additions and 82 deletions

20
crates/client/src/lib.rs Normal file
View File

@@ -0,0 +1,20 @@
use gpui::Global;
use nostr_sdk::prelude::*;
use state::get_client;
pub mod state;
pub struct NostrClient {
pub client: &'static Client,
}
impl Global for NostrClient {}
impl NostrClient {
pub async fn init() -> Self {
// Initialize nostr client
let client = get_client().await;
Self { client }
}
}