diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 8c3be9c..110a9b0 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -59,6 +59,9 @@ pub struct CliOptions { /// Where your relays list. And repository relays if not included in naddr #[arg(short, long, required = true)] pub relays: Vec, + /// Proof of Work difficulty when creatring events + #[arg(long, default_value_t = 0)] + pub pow: u8, } #[derive(Parser, Debug)] diff --git a/src/cli/repo/announce.rs b/src/cli/repo/announce.rs index f25b4d3..51b3d6d 100644 --- a/src/cli/repo/announce.rs +++ b/src/cli/repo/announce.rs @@ -91,6 +91,7 @@ impl CommandRunner for AnnounceArgs { maintainers, self.labels.into_iter().map(utils::str_trim).collect(), )? + .pow(options.pow) .build(user_pubk); let nevent = Nip19Event::new(event.id.expect("There is an id")) .relays(write_relays.iter().take(3).cloned())