From 5195d8031b7930069ba5441a6cd1e7a59c21c546 Mon Sep 17 00:00:00 2001 From: Clawd Date: Sun, 22 Feb 2026 14:08:54 -0800 Subject: NIP-11: make relay info configurable - Add relay config section (name, description, pubkey, contact, icon) - Wire config to NIP-11 handler - AuthRequired/RestrictedWrites now reflect actual auth config - Add NIP-42 to supported_nips list - Update example config --- internal/config/config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'internal/config') diff --git a/internal/config/config.go b/internal/config/config.go index 7eca750..36d3e1e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,6 +14,7 @@ import ( ) type Config struct { + Relay RelayConfig `yaml:"relay"` Server ServerConfig `yaml:"server"` Database DatabaseConfig `yaml:"database"` Auth AuthConfig `yaml:"auth"` @@ -23,6 +24,14 @@ type Config struct { Storage StorageConfig `yaml:"storage"` } +type RelayConfig struct { + Name string `yaml:"name"` + Description string `yaml:"description"` + Pubkey string `yaml:"pubkey"` + Contact string `yaml:"contact"` + Icon string `yaml:"icon"` +} + type ServerConfig struct { GrpcAddr string `yaml:"grpc_addr"` HttpAddr string `yaml:"http_addr"` @@ -90,6 +99,10 @@ type StorageConfig struct { // Default returns the default configuration. func Default() *Config { return &Config{ + Relay: RelayConfig{ + Name: "muxstr relay", + Description: "High-performance Nostr relay with gRPC, Connect, and WebSocket support", + }, Server: ServerConfig{ GrpcAddr: ":50051", HttpAddr: ":8080", -- cgit v1.2.3