Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSignature ¶
CheckSignature verifies the event's signature and ID
func EventExpiration ¶ added in v0.6.0
EventExpiration returns the unix timestamp from a NIP-40 `expiration` tag, or (0, false) if the event has no expiration tag. Malformed values are treated as no-expiration so a bad tag never permanently rejects an otherwise-valid event — but the warning is logged for the operator.
func IsExpired ¶ added in v0.6.0
IsExpired reports whether the event carries a NIP-40 expiration that has already passed relative to `now` (unix seconds).
func IsProtectedEvent ¶ added in v0.6.0
IsProtectedEvent reports whether the event carries a NIP-70 protection marker — a single-element `["-"]` tag. Per NIP-70 such events MUST only be accepted from an authenticated connection whose pubkey matches the event author.
func ValidateEventTimestamp ¶
func ValidateEventTimestamp(evt nostr.Event, cfg *cfgType.ServerConfig) bool
Types ¶
type Result ¶
Result represents the outcome of a validation check
func CheckBlacklistAndWhitelistCached ¶
CheckBlacklistAndWhitelistCached uses cached pubkey lists for validation
func CheckRateAndSizeLimits ¶
CheckRateAndSizeLimits checks if an event passes per-client rate limits and global size limits.