nip05

package
v0.42.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func IdentifierToURL added in v0.42.3

func IdentifierToURL(address string) string

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