actually it's better if nip11 pubkey is a pointer.
This commit is contained in:
@@ -17,8 +17,10 @@ func main() {
|
|||||||
relay := khatru.NewRelay()
|
relay := khatru.NewRelay()
|
||||||
|
|
||||||
// set up some basic properties (will be returned on the NIP-11 endpoint)
|
// set up some basic properties (will be returned on the NIP-11 endpoint)
|
||||||
|
pk := nostr.MustPubKeyFromHex("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
||||||
|
|
||||||
relay.Info.Name = "my relay"
|
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.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"
|
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"
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ import (
|
|||||||
type RelayInformationDocument struct {
|
type RelayInformationDocument struct {
|
||||||
URL string `json:"-"`
|
URL string `json:"-"`
|
||||||
|
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
PubKey nostr.PubKey `json:"pubkey,omitempty"`
|
PubKey *nostr.PubKey `json:"pubkey,omitempty"`
|
||||||
Contact string `json:"contact,omitempty"`
|
Contact string `json:"contact,omitempty"`
|
||||||
SupportedNIPs []any `json:"supported_nips,omitempty"`
|
SupportedNIPs []any `json:"supported_nips,omitempty"`
|
||||||
Software string `json:"software,omitempty"`
|
Software string `json:"software,omitempty"`
|
||||||
Version string `json:"version,omitempty"`
|
Version string `json:"version,omitempty"`
|
||||||
|
|
||||||
Limitation *RelayLimitationDocument `json:"limitation,omitempty"`
|
Limitation *RelayLimitationDocument `json:"limitation,omitempty"`
|
||||||
RelayCountries []string `json:"relay_countries,omitempty"`
|
RelayCountries []string `json:"relay_countries,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user