All basic functions plus guide README to use
This commit is contained in:
13
src/functions/publish.rs
Normal file
13
src/functions/publish.rs
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user