Structured files/directories and nip01, nip02, nip17 implementation
This commit is contained in:
9
src/nips/nip01.rs
Normal file
9
src/nips/nip01.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use nostr_sdk::prelude::*;
|
||||
use anyhow::Result; // <--- Hinzufügen
|
||||
|
||||
// Das Result hier bezieht sich jetzt auf anyhow::Result
|
||||
pub async fn publish_text(client: &Client, content: &str) -> Result<EventId> {
|
||||
let builder = EventBuilder::text_note(content);
|
||||
let output = client.send_event_builder(builder).await?;
|
||||
Ok(*output.id())
|
||||
}
|
||||
Reference in New Issue
Block a user