Skip to content

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

@niamtokik

Description

@niamtokik

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.

  • Try to connect to an open-relay using only the Erlang shell and external modules. In parallel document how the protocol is working using a modern browser like Firefox, Chromium or Brave with javascript client.
    • Create a connection
    • Request for events
    • Create a key
    • Stop a connection
  • Create module nostr_client.erl
  • Document the implementation
  • Create tests when needed

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

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions