nip05

package
v0.0.0-...-3d1c7b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NIP05_REGEX = regexp.MustCompile(`^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$`)

Functions

func IdentifierToURL

func IdentifierToURL(address string) string

func IsValidIdentifier

func IsValidIdentifier(input string) bool

func NormalizeIdentifier

func NormalizeIdentifier(fullname string) string

func ParseIdentifier

func ParseIdentifier(fullname string) (name string, domain string, err error)

func QueryIdentifier

func QueryIdentifier(ctx context.Context, fullname string) (*nostr.ProfilePointer, error)

Types

type WellKnownResponse

type WellKnownResponse struct {
	Names  map[string]string   `json:"names"`
	Relays map[string][]string `json:"relays,omitempty"`
	NIP46  map[string][]string `json:"nip46,omitempty"`
}

func Fetch

func Fetch(ctx context.Context, fullname string) (resp WellKnownResponse, name string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL