diff --git a/nip05/nip05.go b/nip05/nip05.go index f2551e2..18bc00e 100644 --- a/nip05/nip05.go +++ b/nip05/nip05.go @@ -19,6 +19,10 @@ type WellKnownResponse struct { NIP46 map[string][]string `json:"nip46,omitempty"` } +func IsValidIdentifier(input string) bool { + return NIP05_REGEX.MatchString(input) +} + func ParseIdentifier(fullname string) (name string, domain string, err error) { res := NIP05_REGEX.FindStringSubmatch(fullname) if len(res) == 0 {