feat: rewrite the nip-4e implementation #1

Merged
reya merged 17 commits from rewrite-nostr-backend into master 2026-01-13 16:00:09 +08:00
Showing only changes of commit df384a7b1e - Show all commits

View File

@@ -23,21 +23,17 @@ struct GlobalDeviceRegistry(Entity<DeviceRegistry>);
impl Global for GlobalDeviceRegistry {}
/// Device Registry
///
/// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
#[derive(Debug)]
pub struct DeviceRegistry {
/// Device signer
///
/// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
pub device_signer: Entity<Option<Arc<dyn NostrSigner>>>,
/// Device requests
///
/// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
requests: Entity<HashSet<Event>>,
/// Device state
///
/// NIP-4e: https://github.com/nostr-protocol/nips/blob/per-device-keys/4e.md
state: DeviceState,
/// Async tasks