Co-authored-by: Awiteb <a@4rs.nl>
This commit is contained in:
fiatjaf_
2026-04-13 18:46:31 -03:00
committed by GitHub
parent 98fdcd3e92
commit db1e1d25cd

10
5C.md
View File

@@ -269,23 +269,23 @@ Returns a pointer to a buffer containing the event content (follows the String C
Returns the total number of tags on this event.
### `nostr.event_get_tag_item_count(event_handle: i32, tag_index: i32) -> u32`
### `nostr.event_get_tag_item_count(event_handle: i32, tag_index: u32) -> u32`
Returns the number of items in the tag at `tag_index`; or `0` if such tag doesn't exist.
### `nostr.event_get_tag_item(event_handle: i32, tag_index: i32, item_index: i32) -> i32`
### `nostr.event_get_tag_item(event_handle: i32, tag_index: u32, item_index: u32) -> i32`
Returns a pointer to a buffer containing the item at `(tag_index, item_index)` (follows the String Convention above); or `0` if such tag doesn't exist.
### `nostr.event_get_tag_item_bin32(event_handle: i32, tag_index: i32, item_index: i32) -> i32`
### `nostr.event_get_tag_item_bin32(event_handle: i32, tag_index: u32, item_index: u32) -> i32`
Same as `event_get_tag_item`, but returns a pointer to a 32-byte buffer of the item if it happened to be a pubkey or an event id; `0` otherwise.
### `nostr.event_get_tag_item_by_name(event_handle: i32, name_ptr: i32, name_len: i32, item_index: i32) -> i32`
### `nostr.event_get_tag_item_by_name(event_handle: i32, name_ptr: i32, name_len: i32, item_index: u32) -> i32`
Finds the first tag whose name (item 0) matches the string at `name_ptr/name_len`, then returns a pointer to a buffer containing item `item_index` from that tag; `0` if no matching tag is found.
### `nostr.event_get_tag_item_by_name_bin32(event_handle: i32, name_ptr: i32, name_len: i32, item_index: i32) -> i32`
### `nostr.event_get_tag_item_by_name_bin32(event_handle: i32, name_ptr: i32, name_len: i32, item_index: u32) -> i32`
Same as `event_get_tag_item_by_name`, but returns a pointer to a 32-byte buffer of the value if it happened to be a pubkey or an event id; `0` otherwise.