This commit is contained in:
2026-01-07 14:05:24 +07:00
parent 2d9563b888
commit 967355cd4a
12 changed files with 511 additions and 365 deletions

View File

@@ -1,5 +1,7 @@
use nostr_sdk::prelude::*;
use crate::Announcement;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum RelayState {
#[default]
@@ -19,6 +21,9 @@ pub struct Identity {
/// The public key of the account
public_key: Option<PublicKey>,
/// Encryption key announcement
announcement: Option<Announcement>,
/// Status of the current user NIP-65 relays
relay_list: RelayState,
@@ -36,6 +41,7 @@ impl Identity {
pub fn new() -> Self {
Self {
public_key: None,
announcement: None,
relay_list: RelayState::default(),
messaging_relays: RelayState::default(),
}