nip11, nip13, nip46 changes from promenade port.

and verify pubkey validity when decoding it from an arbitrary json object.
This commit is contained in:
fiatjaf
2025-05-11 17:42:15 -03:00
parent f60fc08f8d
commit 4befaa0129
4 changed files with 27 additions and 35 deletions

View File

@@ -2,18 +2,20 @@ package nip11
import (
"slices"
"fiatjaf.com/nostr"
)
type RelayInformationDocument struct {
URL string `json:"-"`
Name string `json:"name"`
Description string `json:"description"`
PubKey string `json:"pubkey"`
Contact string `json:"contact"`
SupportedNIPs []any `json:"supported_nips"`
Software string `json:"software"`
Version string `json:"version"`
Name string `json:"name"`
Description string `json:"description"`
PubKey nostr.PubKey `json:"pubkey"`
Contact string `json:"contact"`
SupportedNIPs []any `json:"supported_nips"`
Software string `json:"software"`
Version string `json:"version"`
Limitation *RelayLimitationDocument `json:"limitation,omitempty"`
RelayCountries []string `json:"relay_countries,omitempty"`