Add 'more options' to each note

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-09-19 18:20:17 -04:00
parent 2208e68726
commit 6f5f090fbe
9 changed files with 193 additions and 28 deletions

View File

@@ -68,6 +68,10 @@ impl Pubkey {
Ok(Pubkey(data.1.try_into().unwrap()))
}
}
pub fn to_bech(&self) -> Option<String> {
nostr::bech32::encode::<nostr::bech32::Bech32>(HRP_NPUB, &self.0).ok()
}
}
impl fmt::Display for Pubkey {