noticeenvelope

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: CC0-1.0, CC0-1.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	Text string
}

T is a relay message intended to be shown to users in a nostr client interface.

func NewNoticeEnvelope

func NewNoticeEnvelope(text string) (E *T)

func (*T) Bytes

func (E *T) Bytes() (s []byte)

func (*T) Label

func (E *T) Label() string

Label returns the label enum/type of the envelope. The relevant bytes could be retrieved using nip1.List[T]

func (*T) MarshalJSON

func (E *T) MarshalJSON() ([]byte, error)

func (*T) String

func (E *T) String() (s string)

func (*T) ToArray

func (E *T) ToArray() array.T

func (*T) Unmarshal

func (E *T) Unmarshal(buf *text.Buffer) (err error)

Unmarshal the envelope.

func (*T) UnmarshalJSON

func (E *T) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

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