nostr
Communicate with any participant, be it relays or clients, with elixir
Installation
As of now, this project needs rust to compile. We’re in the process of getting rid of that dependency despite rust still being used under the covers, thanks to rustler_precompiled.
def deps do
[
{:nostr, git: "https://github.com/RooSoft/nostr.git"}
]
endCreate a private key
iex -S mixK256.Schnorr.generate_random_signing_keyUse the example app
In the lib/examples, there is a NostrApp ready to be used. It connects to a relay and
retrieves your own notes and stuff. The easiest way to use it is to create a .iex.local.exs
file and paste that in
relay = "wss://relay.nostr.pro" ## here's a list of relays: https://nostr-registry.netlify.app
private_key = <<>> ### here goes your private key
NostrApp.start_link(relay, private_key)and start iex
iex -S mixNow what?
You’ll receive past and live events into the console, and are now able to send messages with that identity.
NostrApp.send("aren't you entertained?")