chore: Add the signer to the client if found

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-06-08 20:26:38 +00:00
parent b1027b3b04
commit 9069adbe22
2 changed files with 16 additions and 12 deletions

View File

@@ -117,6 +117,14 @@ impl CliOptions {
unreachable!("There is no other method until now")
}
/// Returns the signer
pub fn signer(&self) -> Option<impl nostr::signer::IntoNostrSigner> {
if let Some(sk) = &self.secret_key {
return Some(Keys::new(sk.clone()));
}
None
}
/// Returns an error if there are no relays.
pub fn ensure_relays(&self) -> N34Result<()> {
if self.relays.is_empty() {