sdk

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputToEventPointer

func InputToEventPointer(input string) *nostr.EventPointer

InputToEventPointer turns any note/nevent/hex input into a EventPointer (or nil)

func InputToProfile

func InputToProfile(ctx context.Context, input string) *nostr.ProfilePointer

InputToProfile turns any npub/nprofile/hex/nip05 input into a ProfilePointer (or nil)

Types

type Reference added in v0.15.2

type Reference struct {
	Text    string
	Start   int
	End     int
	Profile *nostr.ProfilePointer
	Event   *nostr.EventPointer
	Entity  *nostr.EntityPointer
}

func ParseReferences added in v0.15.2

func ParseReferences(evt *nostr.Event) []*Reference

ParseReferences parses both NIP-08 and NIP-27 references in a single unifying interface.

type Relay added in v0.19.3

type Relay struct {
	URL    string
	Inbox  bool
	Outbox bool
}

func FetchRelaysForPubkey added in v0.19.3

func FetchRelaysForPubkey(ctx context.Context, pool *nostr.SimplePool, pubkey string, extraRelays ...string) []Relay

func ParseRelaysFromKind10002 added in v0.19.3

func ParseRelaysFromKind10002(evt *nostr.Event) []Relay

func ParseRelaysFromKind3 added in v0.19.3

func ParseRelaysFromKind3(evt *nostr.Event) []Relay

Jump to

Keyboard shortcuts

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