validation

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSignature

func CheckSignature(evt nostr.Event) bool

CheckSignature verifies the event's signature and ID

func ValidateEventTimestamp

func ValidateEventTimestamp(evt nostr.Event, cfg *cfgType.ServerConfig) bool

Types

type Result

type Result struct {
	Valid   bool
	Message string
}

Result represents the outcome of a validation check

func CheckBlacklistAndWhitelistCached

func CheckBlacklistAndWhitelistCached(evt noatr.Event) Result

CheckBlacklistAndWhitelistCached uses cached pubkey lists for validation

func CheckRateAndSizeLimits

func CheckRateAndSizeLimits(client noatr.ClientInterface, evt noatr.Event, eventSize int) Result

CheckRateAndSizeLimits checks if an event passes per-client rate limits and global size limits.

Jump to

Keyboard shortcuts

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