mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-04-09 20:29:09 +02:00
nip05: IsValidIdentifier
This commit is contained in:
parent
f4cf242084
commit
9cb740764b
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user