mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-29 00:10:47 +00:00
feat: add verify signer
This commit is contained in:
parent
bd2b6a3759
commit
3ba870be4b
@ -51,13 +51,12 @@ fn main() {
|
||||
// Create nostr connection
|
||||
let client = ClientBuilder::default().database(nostr_db).build();
|
||||
|
||||
// Add bootstrap relay
|
||||
// Add some bootstrap relays
|
||||
// #TODO: Add option to user config bootstrap relay
|
||||
client
|
||||
.add_relay("wss://nostr.mutinywallet.com")
|
||||
.await
|
||||
.expect("Failed to add bootstrap relay.");
|
||||
|
||||
// Add bootstrap relay
|
||||
client
|
||||
.add_relay("wss://bostr.nokotaro.com")
|
||||
.await
|
||||
@ -95,6 +94,7 @@ fn main() {
|
||||
nostr::keys::create_keys,
|
||||
nostr::keys::get_public_key,
|
||||
nostr::keys::update_signer,
|
||||
nostr::keys::verify_signer,
|
||||
nostr::metadata::get_metadata,
|
||||
nostr::event::get_event,
|
||||
commands::secret::secure_save,
|
||||
|
@ -42,3 +42,11 @@ pub async fn update_signer(key: String, app_state: State<'_, AppState>) -> Resul
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn verify_signer(app_state: State<'_, AppState>) -> Result<bool, ()> {
|
||||
let client = &app_state.nostr;
|
||||
let status = client.signer().await.is_ok();
|
||||
|
||||
Ok(status)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user