Files
easy-nostr/src/functions/publish.rs
2025-12-19 20:25:39 +01:00

14 lines
411 B
Rust

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
}