Files
signed/crates/signed_nostr/src/update.rs
T
reya c76e909f7f
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s
chore: refactor backend around domain types (#26)
Reviewed-on: #26
2026-10-03 10:35:48 +00:00

21 lines
403 B
Rust

use nostr_sdk::prelude::*;
#[derive(Debug, Clone)]
pub struct Update {
pub kind: Kind,
pub coordinate: Option<Coordinate>,
pub author: PublicKey,
}
impl Update {
pub fn from_event(event: &Event) -> Self {
let coordinate = event.tags.coordinates().nth(0);
Self {
kind: event.kind,
coordinate,
author: event.pubkey,
}
}
}