All basic functions plus guide README to use

This commit is contained in:
Malte Schröder
2025-12-19 20:25:39 +01:00
parent db48f07b78
commit 397635d43e
12 changed files with 486 additions and 22 deletions

13
src/functions/publish.rs Normal file
View File

@@ -0,0 +1,13 @@
use crate::nips::nip01;
use anyhow::Result;
use nostr_sdk::prelude::*;
/// Publishes a text post to the network.
///
/// # Arguments
/// * `client` - The Nostr client.
/// * `content` - The text content of the post.
pub async fn post_text_note(client: &Client, content: &str) -> Result<EventId> {
// We delegate the actual protocol work to the nip01 module
nip01::publish_text(client, content).await
}