nostrdb-rs

nostrdb in rust!
git clone git://jb55.com/nostrdb-rs
Log | Files | Refs | Submodules | README | LICENSE

commit 52e1d860cfbb37ef4dc2408af48ead4310501edd
parent eabf4b12b45507cdce11a6eebe23a68dd1b1cd4b
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 27 Apr 2024 00:20:08 -0700

nip10: add root function to get root id

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/util/nip10.rs | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/util/nip10.rs b/src/util/nip10.rs @@ -141,6 +141,10 @@ impl<'a> NoteReply<'a> { self.root.is_some() && self.reply.is_none() } + pub fn root(self) -> Option<NoteIdRef<'a>> { + self.root + } + pub fn is_reply(&self) -> bool { self.reply().is_some() }