added metadata and test

This commit is contained in:
2026-01-31 16:27:12 +01:00
parent 1becf76264
commit 9845dd025d
6 changed files with 178 additions and 1 deletions

View File

@@ -112,6 +112,26 @@ async fn main() -> anyhow::Result<()> {
println!(" [WARN] No posts found for tags (depends on relay traffic).");
}
// 10. Metadata Update (Kind 0)
println!("\n[STEP 8] Testing Profile Metadata Update...");
let metadata_id = ez
.set_metadata(
Some("EasyNostr Test Bot".to_string()),
Some("EasyNostr".to_string()),
Some("Automated test for metadata updates".to_string()),
None, // NIP-05
None, // LUD-16
Some("https://github.com/Bytemalte/easy-nostr".to_string()),
Some(
"https://raw.githubusercontent.com/Bytemalte/easy-nostr/main/banner.png"
.to_string(),
),
Some(true), // bot
Some("2024-01-31".to_string()), // birthday
)
.await?;
println!(" [OK] Metadata updated: {}", metadata_id.to_bech32()?);
println!("\n=== Test Complete ===");
Ok(())
}