package websocket import ( "html/template" "net/http" ) var indexTemplate = template.Must(template.New("index").Parse(` NOSTR-GRPC-RELAY/v1.0.0
RELAY.ONLINE
PROTOCOLS: 3
NIPs: 01/09/11

NOSTR-GRPC-RELAY

decentralized protocol node // multi-transport relay

gRPC ACTIVE
{{.GrpcAddr}}

Native binary protocol. High-throughput RPC interface for application-layer integration. Protocol Buffers over HTTP/2.

CONNECT ACTIVE
{{.HttpAddr}}/nostr.v1.NostrRelay/*

Browser-compatible HTTP/JSON interface. gRPC-Web with Connect protocol. CORS-enabled for web clients.

WEBSOCKET ACTIVE
ws://{{.WsAddr}}/

Standard Nostr protocol (NIP-01). Compatible with all Nostr clients. Real-time event streaming.

SUPPORTED_NIPS

NIP-01 NIP-09 NIP-11

RELAY_FEATURES

  • Binary-first storage
  • SQLite WAL mode
  • Event validation
  • Real-time subscriptions
  • Hard deletion (NIP-09)
`)) type IndexData struct { GrpcAddr string HttpAddr string WsAddr string } func (h *Handler) ServeIndex(w http.ResponseWriter, r *http.Request, data IndexData) { w.Header().Set("Content-Type", "text/html; charset=utf-8") indexTemplate.Execute(w, data) }