Skip to main content

Module event_json

Module event_json 

Source
Expand description

Events read from JSON: nostr-parse first, rust-nostr’s reader for anything it refuses.

nostr-parse is differential-tested against Event::from_json and UnsignedEvent::from_json: whatever it accepts, rust-nostr reads identically. It refuses a few spellings rust-nostr takes (uppercase hex, bech32 keys), and an empty tag fails the conversion; those go to rust-nostr, errors included, so these return exactly what from_json would.

Functions§

event
A signed event (a seal, a wrap, anything relay-shaped), as Event::from_json reads it.
unsigned
An unsigned event (a NIP-59 rumor), as UnsignedEvent::from_json reads it.