handlers

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnEventStored func(evt nostr.Event)

OnEventStored is called after an event is successfully stored. Set by the server package to broadcast events to active subscribers.

Functions

func ClearChallengeForConnection added in v0.5.0

func ClearChallengeForConnection(client nostr.ClientInterface)

ClearChallengeForConnection removes the challenge for a connection

func GetChallengeForConnection

func GetChallengeForConnection(client nostr.ClientInterface) string

GetChallengeForConnection retrieves the challenge string for a given connection

func HandleAuth

func HandleAuth(client nostr.ClientInterface, message []interface{})

HandleAuth processes the "AUTH" message type as defined in NIP-42

func HandleClose

func HandleClose(client nostr.ClientInterface, message []interface{})

HandleClose processes a "CLOSE" message from a client

func HandleEvent

func HandleEvent(client nostr.ClientInterface, message []interface{})

HandleEvent processes an "EVENT" message

func HandleReq

func HandleReq(client nostr.ClientInterface, message []interface{})

HandleReq processes a new subscription request with proper subscription management

func IsAuthenticated

func IsAuthenticated(client nostr.ClientInterface) bool

IsAuthenticated checks if a connection is authenticated

func SetAuthenticated

func SetAuthenticated(client nostr.ClientInterface)

SetAuthenticated marks a connection as authenticated

func SetChallengeForConnection

func SetChallengeForConnection(client nostr.ClientInterface, challenge string)

SetChallengeForConnection sets the challenge string for a given connection

func VerifyAuthEvent

func VerifyAuthEvent(client nostr.ClientInterface, evt nostr.Event) error

VerifyAuthEvent verifies the authentication event according to NIP-42

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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