A minimal Go library for the Nostr protocol.
1 dependency. Other Nostr libraries pull in 30+. This one has exactly one:
No WebSocket libraries, no logging frameworks, no kitchen sink. Just the core protocol, stdlib only.
key, _ := nostr.GenerateKey()
fmt.Println("npub:", key.Npub())
event := &nostr.Event{
Kind: nostr.KindTextNote,
Content: "Hello Nostr!",
}
key.Sign(event)
relay, _ := nostr.Connect(ctx, "wss://relay.damus.io")
relay.Publish(ctx, event)
This is a minimal core library. It implements NIP-01 and the basics. It doesn't implement every NIP, handle connection pooling, or manage relay discovery. Build that yourself, or don't.