Documentation
¶
Index ¶
Constants ¶
View Source
const ( // KindLSPS5 is the dedicated Nostr kind for LSPS5 notifications KindLSPS5 = 31055 // TagLSPS5 is the tag used to identify LSPS5 events TagLSPS5 = "lsps5" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LSPS5 ¶
type LSPS5 struct {
// contains filtered or unexported fields
}
LSPS5 handles creation and parsing of LSPS5 notifications.
func (*LSPS5) CreateNotificationEvent ¶
func (s *LSPS5) CreateNotificationEvent(recipientPubKey string, method string, params interface{}) (*nostr.Event, error)
CreateNotificationEvent creates a signed kind 31055 Nostr event containing an encrypted LSPS5 notification.
func (*LSPS5) GenerateLsp5Uri ¶
GenerateLsp5Uri generates a nostr+lsps5 URI Format: nostr+lsps5://<pubkey>?relay=<relay1>&relay=<relay2>
func (*LSPS5) ParseNotificationEvent ¶
ParseNotificationEvent decrypts and parses an LSPS5 notification from a Nostr event.
type Notification ¶
type Notification struct {
JsonRpc string `json:"jsonrpc"`
Method string `json:"method"`
Params interface{} `json:"params,omitempty"`
}
Notification represents a JSON-RPC 2.0 notification object
func NewNotification ¶
func NewNotification(method string, params interface{}) *Notification
NewNotification creates a new JSON-RPC 2.0 notification
Click to show internal directories.
Click to hide internal directories.