Expand description
This crate provides types for nostr protocol handling.
Structs§
- Delegation
Conditions - Conditions of delegation
- Encrypted
Private Key - This is an encrypted private key.
- Event
- The main event type
- Event
Pointer - An event id along with some relays in which that event may be found.
- Filter
- Filter which specify what events a client is looking for
- Id
- An event identifier, constructed as a SHA256 hash of the event fields according to NIP-01
- IdHex
- An event identifier, constructed as a SHA256 hash of the event fields according to NIP-01, as a hex string
- IdHex
Prefix - An event identifier prefix, constructed as a SHA256 hash of the event fields according to NIP-01, as a hex string
- Metadata
- Metadata about a user
- Nip05
- The content of a webserver’s /.well-known/nostr.json file used in NIP-05 and NIP-35
This allows lookup and verification of a nostr user via a
user@domain
style identifier. - PayRequest
Data - This is a response from a zapper lnurl
- PreEvent
- Data used to construct an event
- Private
Key - This is a private key which is to be kept secret and is used to prove identity
- Profile
- A person’s profile on nostr which consists of the data needed in order to follow someone.
- Public
Key - This is a public key, which identifies an actor (usually a person) and is shared.
- Public
KeyHex - This is a public key, which identifies an actor (usually a person) and is shared, as a hex string
- Public
KeyHex Prefix - This is a public key prefix, which identifies an actor (usually a person) and is shared, as a hex string
- Relay
Information Document - Relay information document as described in NIP-11, supplied by a relay
- Relay
Limitation - Relay limitations
- Relay
Url - A Url validated as a nostr relay url in canonical form
We don’t serialize/deserialize these directly, see
UncheckedUrl
for that - Signature
- A Schnorr signature that signs an Event, taken on the Event Id field
- Signature
Hex - A Schnorr signature that signs an Event, taken on the Event Id field, as a hex string
- Simple
Relay List - A list of relays with SimpleRelayUsage
- Simple
Relay Usage - When and how to use a Relay
- Subscription
Id - A random client-chosen string used to refer to a subscription
- Unchecked
Url - A string that is supposed to represent a URL but which might be invalid
- Unixtime
- An integer count of the number of seconds from 1st January 1970. This does not count any of the leap seconds that have occurred, it simply presumes UTC never had leap seconds; yet it is well known and well understood.
- Url
- A String representing a valid URL with an authority present including an Internet based host.
Enums§
- Client
Message - A message from a client to a relay
- Error
- Errors that can occur in the nostr-proto crate
- Event
Delegation - Delegation information for an Event
- Event
Kind - A kind of Event
- KeySecurity
- This indicates the security of the key by keeping track of whether the secret key material was handled carefully. If the secret is exposed in any way, or leaked and the memory not zeroed, the key security drops to Weak.
- Relay
Message - A message from a relay to a client
- Tag
- A tag on an Event