erlang-punch / nostr

A pure Erlang implementation of the nostr protocol
https://github.com/erlang-punch/nostr
MIT License
16 stars 3 forks source link

test an open relay server to understand how the protocol is working #5

Closed niamtokik closed 1 year ago

niamtokik commented 1 year ago

nostr is an open protocol used on open relays. The goal of this issue is to create a small usable client using Erlang/OTP functions and few external modules like Thoas and Gun.

Summary

At this time, these functions were created to design the client. They will probably change during the development process based on the nostr protocol requirements.

Functions Examples Comments
nostr_client:connect/1 nostr_client:connect(Host) Connect to a remote server with default options
nostr_client:connect/2 nostr_client:connect(Host, Options) Connect to a remote server with specific options
nostr_client:request/2 nostr_client:request(Reference, EventsId) Request an event or a list of events
nostr_client:publish/2 nostr_client:publish(Reference, Event) Publish a new event
nostr_client:key/0 nostr_client:key() Generate a new key pair
nostr_client:disconnect/1 nostr_client:disconnect(Reference) Disconnect from a server

Specification

Work in progress.

References and Resources