Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 1.03 KB

README.md

File metadata and controls

41 lines (32 loc) · 1.03 KB

Tiny Relay

A tiny nostr relay implemented in Go with an embedded SQLite database.

Todo

  • Add support for reference tag queries (i.e. #r)
  • Handle NIP-51 bookmark lists.
  • Broadcast received events to registered clients.
  • Implement structure logging.
  • Handle event basic and regular storage via NIP-16.
  • Handle NIP-11 requests for relay information.
  • Aggregate filter query to SQLite.
  • Send stored event to client REQ via event ID.
  • Send stored events to client REQ via author public key.
  • Store events in SQLite database.
  • Register connected clients via Hub-and-Spoke pattern.
  • Receive a NIP-01 text event and respond with a NIP-20 OK.

Usage

# Build binary
make build

# Run relay
./relay "localhost:8000"

From another terminal, send a text event via ixian:

./melange event -note "hello, friend"

[+] Text note published
[
    "OK",
    "4586db2f00bd7a01ec74ee30e514143a7ffbd68eae763ac5c32c07061beede90",
    true
]