API Reference Nostr v0.1.3

modules

Modules

This library is all about adding a nice abstraction layer on top of the nostr network

Connects to a relay through websockets

Raw websocket frames are sent to this module so they end up being dispatched to the right module depending on their types

Transforms simple functions into JSON requests that relays can interpret

Encoding events as JSON strings

A process creating and managing a live subscription to a user's contact list on a bunch of relays

A process creating and managing a live subscription to a user's deletion events on a bunch of relays

A process creating and managing a live subscription to a user's encrypted direct messages on a bunch of relays

A process creating and managing a live subscription to a user's note on a bunch of relays

A process creating and managing a live subscription to a user's notes on a bunch of relays

A process creating and managing a live subscription to a user's profile on a bunch of relays

A process creating and managing a live subscription to a user's reactions on a bunch of relays

A process creating and managing a live subscription to a user's reposts on a bunch of relays

A process creating and managing a live timeline subscription on a bunch of relays

A process that's responsible to subscribe and listen to relays so it can properly delete a bunch of events

A process that's responsible to subscribe and listen to relays so it can properly enable a user's to follow a new contact

A process that's responsible to subscribe and listen to relays so it can properly enable a user's to send a reaction

A process that's responsible to subscribe and listen to relays so it can properly enable a user's to send a repost

A process that's responsible to subscribe and listen to relays so it can properly enable a user's to unfollow a current contact

A process that's responsible to subscribe and listen to relays so it can properly update a user's profile

Crypto algorithms needed to communicate on the nostr network

Algorithm that encrypts and decrypts direct messages

Represents the basic structure of anything that's being sent to/from relays

Receive raw nostr protocol events and send them to the right module so it can be parsed in the appropriate way and sent back in a usable way

Event id conversion functions

Turns raw events from JSON websocket messages into elixir structs

Signs events, making sure they're going to be accepted on the nostr network as the user's own

Contacts event management, including event creation and parsing

Delete event management, including event creation and parsing

Encrypted direct message event management, including event creation and parsing

Representing an empty event that signals the end of a list of recorded event

Metadata event management, including event creation and parsing

Reaction event management, including event creation and parsing

Repost event management, including event creation and parsing

Text event management, including event creation and parsing

Makes sure a signature is valid

Converting computer stuff into other stuff humans can understand

A way to represent binaries in a human readable format that fits what's found on the web related to keys and addresses

Private keys management functions

Public keys management functions

Represents a nostr contact that's being followed by someone

Represents a nostr user's contact list

Note struct and manipulation functions

Note id conversion functions

Represents a user's profile

Reaction struct and manipulation functions

All things related to websocket connection with relays

Websocket frames are first sent here to be decoded and then sent to the frame dispatcher

Sends events to RelaySocket's subscribers

Responsible for sending frames through the websocket connection

The process handling all of the RelaySocket commands

Functions that have no home for now but that are meant to be reusable

An example of an app enabling pretty much every raw commands this lib has to offer

The server part of the NostrApp, which is an example of an app