Structured files/directories and nip01, nip02, nip17 implementation

This commit is contained in:
Malte Schröder
2025-12-07 17:50:25 +01:00
commit b651c13fed
14 changed files with 1965 additions and 0 deletions

9
src/nips/nip01.rs Normal file
View 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())
}