handlers

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChallengeForConnection

func GetChallengeForConnection(pubKey string) 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(pubKey, challenge string)

SetChallengeForConnection sets the challenge string for a given connection

func VerifyAuthEvent

func VerifyAuthEvent(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