nip05

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func IsValidIdentifier added in v0.29.0

func IsValidIdentifier(input string) bool

func NormalizeIdentifier

func NormalizeIdentifier(fullname string) string

func ParseIdentifier added in v0.29.0

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 added in v0.9.0

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 added in v0.29.0

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