Skip to content

Commit

Permalink
note: expose signature field
Browse files Browse the repository at this point in the history
Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 7, 2024
1 parent 5010624 commit 87bf139
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ impl<'a> Note<'a> {
let tags = unsafe { bindings::ndb_note_tags(self.as_ptr()) };
Tags::new(tags, self)
}

pub fn sig(&self) -> &'a [u8; 32] {
unsafe {
let ptr = bindings::ndb_note_sig(self.as_ptr());
&*(ptr as *const [u8; 32])
}
}
}

impl<'a> Drop for Note<'a> {
Expand Down

0 comments on commit 87bf139

Please sign in to comment.