Documentation
¶
Index ¶
- func CheckHandler(w http.ResponseWriter, r *http.Request)
- func Contains(pubkey nostr.PubKey) bool
- func Count() int
- func IsComputed() bool
- func PageHandler(w http.ResponseWriter, r *http.Request)
- func RejectAuthor(pk nostr.PubKey) (reject bool, msg string)
- func StartBackgroundComputation()
- type XorFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckHandler ¶ added in v1.4.0
func CheckHandler(w http.ResponseWriter, r *http.Request)
func Contains ¶ added in v1.3.2
Contains reports whether the given pubkey is in the latest aggregated WoT. It is safe to call at any time, even before the first computation (it will just return false).
func Count ¶ added in v1.3.2
func Count() int
Count returns the number of pubkeys in the latest aggregated WoT.
func IsComputed ¶ added in v1.3.2
func IsComputed() bool
IsComputed reports whether the WoT has been computed at least once.
func PageHandler ¶ added in v1.4.0
func PageHandler(w http.ResponseWriter, r *http.Request)
func RejectAuthor ¶ added in v1.4.0
RejectAuthor is the shared rejection policy for events written to relays whose write access is gated by the web-of-trust (inbox, network, moderated): the author must not be specifically blocked and must be a relay member or inside the aggregated web-of-trust.
func StartBackgroundComputation ¶
func StartBackgroundComputation()
StartBackgroundComputation begins a periodic background loop that recomputes the aggregated WoT every 48 hours. It sleeps 2 minutes before the first computation to let the system stabilise.
Types ¶
type XorFilter ¶
func ComputeAggregated ¶
ComputeAggregated computes the aggregated web-of-trust filter for all pyramid members: it fetches the follow lists of all members, then the follow lists of all those followed pubkeys, and builds a xor filter from the full set.