diff --git a/khatru/examples/readme-demo/main.go b/khatru/examples/readme-demo/main.go index 8cd9fb2..27f7e59 100644 --- a/khatru/examples/readme-demo/main.go +++ b/khatru/examples/readme-demo/main.go @@ -17,8 +17,10 @@ func main() { relay := khatru.NewRelay() // set up some basic properties (will be returned on the NIP-11 endpoint) + pk := nostr.MustPubKeyFromHex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + relay.Info.Name = "my relay" - relay.Info.PubKey = nostr.MustPubKeyFromHex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798") + relay.Info.PubKey = &pk relay.Info.Description = "this is my custom relay" relay.Info.Icon = "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fliquipedia.net%2Fcommons%2Fimages%2F3%2F35%2FSCProbe.jpg&f=1&nofb=1&ipt=0cbbfef25bce41da63d910e86c3c343e6c3b9d63194ca9755351bb7c2efa3359&ipo=images" diff --git a/nip11/types.go b/nip11/types.go index a475c63..4c81885 100644 --- a/nip11/types.go +++ b/nip11/types.go @@ -9,13 +9,13 @@ import ( type RelayInformationDocument struct { URL string `json:"-"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` - PubKey nostr.PubKey `json:"pubkey,omitempty"` - Contact string `json:"contact,omitempty"` - SupportedNIPs []any `json:"supported_nips,omitempty"` - Software string `json:"software,omitempty"` - Version string `json:"version,omitempty"` + Name string `json:"name,omitempty"` + Description string `json:"description,omitempty"` + PubKey *nostr.PubKey `json:"pubkey,omitempty"` + Contact string `json:"contact,omitempty"` + SupportedNIPs []any `json:"supported_nips,omitempty"` + Software string `json:"software,omitempty"` + Version string `json:"version,omitempty"` Limitation *RelayLimitationDocument `json:"limitation,omitempty"` RelayCountries []string `json:"relay_countries,omitempty"`